Previously, LIBCXX_ENABLE_FILESYSTEM controlled only whether the filesystem support was compiled into libc++'s library. This commit promotes the setting to a first-class option like LIBCXX_ENABLE_LOCALIZATION, where the whole library is aware of the setting and features that depend on <filesystem> won't be provided at all. The test suite is also properly annotated such that tests that depend on <filesystem> are disabled when the library doesn't support it. This is an alternative to https://llvm.org/D94824, but also an improvement along the lines of LIBCXX_ENABLE_LOCALIZATION that I had been wanting to make for a while. Differential Revision: https://reviews.llvm.org/D94921
29 lines
792 B
C++
29 lines
792 B
C++
//===----------------------------------------------------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// UNSUPPORTED: c++03
|
|
// UNSUPPORTED: libcpp-has-no-filesystem-library
|
|
|
|
// <experimental/filesystem>
|
|
|
|
// namespace std::experimental::filesystem::v1
|
|
|
|
#include <experimental/filesystem>
|
|
#include <type_traits>
|
|
|
|
#include "test_macros.h"
|
|
|
|
int main(int, char**) {
|
|
static_assert(std::is_same<
|
|
std::experimental::filesystem::path,
|
|
std::experimental::filesystem::v1::path
|
|
>::value, "");
|
|
|
|
return 0;
|
|
}
|