mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-27 05:50:12 +00:00
[libc++] Disable incomplete library features.
Adds a new CMake option to disable the usage of incomplete headers. These incomplete headers are not guaranteed to be ABI stable. This option is intended to be used by vendors so they can avoid their users from code that's not ready for production usage. The option is enabled by default. Differential Revision: https://reviews.llvm.org/D106763
This commit is contained in:
parent
d1c7a57fe8
commit
71909de374
@ -123,6 +123,11 @@ option(LIBCXX_ENABLE_VENDOR_AVAILABILITY_ANNOTATIONS
|
||||
to provide compile-time errors when using features unavailable on some version of
|
||||
the shared library they shipped should turn this on and see `include/__availability`
|
||||
for more details." OFF)
|
||||
option(LIBCXX_ENABLE_INCOMPLETE_FEATURES
|
||||
"Whether to enable support for incomplete library features. Incomplete features
|
||||
are new library features under development. These features don't guarantee
|
||||
ABI stability nor the quality of completed library features. Vendors
|
||||
shipping the library may want to disable this option." ON)
|
||||
set(LIBCXX_TEST_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/test/configs/legacy.cfg.in" CACHE STRING
|
||||
"The Lit testing configuration to use when running the tests.")
|
||||
set(LIBCXX_TEST_PARAMS "" CACHE STRING
|
||||
@ -883,6 +888,10 @@ config_define_if_not(LIBCXX_ENABLE_FILESYSTEM _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
|
||||
config_define_if_not(LIBCXX_ENABLE_RANDOM_DEVICE _LIBCPP_HAS_NO_RANDOM_DEVICE)
|
||||
config_define_if_not(LIBCXX_ENABLE_LOCALIZATION _LIBCPP_HAS_NO_LOCALIZATION)
|
||||
config_define_if_not(LIBCXX_ENABLE_VENDOR_AVAILABILITY_ANNOTATIONS _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS)
|
||||
# Incomplete features get their own specific disabling flags. This makes it
|
||||
# easier to grep for target specific flags once the feature is complete.
|
||||
config_define_if_not(LIBCXX_ENABLE_INCOMPLETE_FEATURES _LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
|
||||
config_define_if_not(LIBCXX_ENABLE_INCOMPLETE_FEATURES _LIBCPP_HAS_NO_INCOMPLETE_RANGES)
|
||||
|
||||
if (LIBCXX_ABI_DEFINES)
|
||||
set(abi_defines)
|
||||
|
@ -11,6 +11,7 @@ set(LIBCXX_CXX_ABI libcxxabi CACHE STRING "")
|
||||
set(LIBCXX_HIDE_FROM_ABI_PER_TU_BY_DEFAULT ON CACHE BOOL "")
|
||||
set(LIBCXX_ENABLE_DEBUG_MODE_SUPPORT OFF CACHE BOOL "")
|
||||
set(LIBCXX_ENABLE_VENDOR_AVAILABILITY_ANNOTATIONS ON CACHE BOOL "")
|
||||
set(LIBCXX_ENABLE_INCOMPLETE_FEATURES OFF CACHE BOOL "")
|
||||
|
||||
set(LIBCXX_HERMETIC_STATIC_LIBRARY ON CACHE BOOL "")
|
||||
set(LIBCXXABI_HERMETIC_STATIC_LIBRARY ON CACHE BOOL "")
|
||||
|
@ -251,6 +251,15 @@ libc++ specific options
|
||||
This option can be used to enable or disable the filesystem components on
|
||||
platforms that may not support them. For example on Windows.
|
||||
|
||||
.. option:: LIBCXX_ENABLE_INCOMPLETE_FEATURES:BOOL
|
||||
|
||||
**Default**: ``ON``
|
||||
|
||||
Whether to enable support for incomplete library features. Incomplete features
|
||||
are new library features under development. These features don't guarantee
|
||||
ABI stability nor the quality of completed library features. Vendors
|
||||
shipping the library may want to disable this option.
|
||||
|
||||
.. option:: LIBCXX_INSTALL_LIBRARY_DIR:PATH
|
||||
|
||||
**Default**: ``lib${LIBCXX_LIBDIR_SUFFIX}``
|
||||
|
@ -34,6 +34,8 @@
|
||||
#cmakedefine _LIBCPP_HAS_PARALLEL_ALGORITHMS
|
||||
#cmakedefine _LIBCPP_HAS_NO_RANDOM_DEVICE
|
||||
#cmakedefine _LIBCPP_HAS_NO_LOCALIZATION
|
||||
#cmakedefine _LIBCPP_HAS_NO_INCOMPLETE_FORMAT
|
||||
#cmakedefine _LIBCPP_HAS_NO_INCOMPLETE_RANGES
|
||||
|
||||
@_LIBCPP_ABI_DEFINES@
|
||||
|
||||
|
@ -60,6 +60,10 @@ namespace std {
|
||||
#include <__format/format_parse_context.h>
|
||||
#include <version>
|
||||
|
||||
#if defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
|
||||
# error "The Format library is not supported since libc++ has been configured with LIBCXX_ENABLE_INCOMPLETE_FEATURES disabled"
|
||||
#endif
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
#endif
|
||||
|
@ -183,6 +183,10 @@ namespace std::ranges {
|
||||
#include <type_traits>
|
||||
#include <version>
|
||||
|
||||
#if defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
|
||||
# error "The Ranges library is not supported since libc++ has been configured with LIBCXX_ENABLE_INCOMPLETE_FEATURES disabled"
|
||||
#endif
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
@ -12,7 +12,6 @@ set(LIBCXX_SOURCES
|
||||
condition_variable.cpp
|
||||
condition_variable_destructor.cpp
|
||||
exception.cpp
|
||||
format.cpp
|
||||
functional.cpp
|
||||
future.cpp
|
||||
hash.cpp
|
||||
@ -74,6 +73,12 @@ if (LIBCXX_ENABLE_LOCALIZATION)
|
||||
)
|
||||
endif()
|
||||
|
||||
if(LIBCXX_ENABLE_INCOMPLETE_FEATURES)
|
||||
list(APPEND LIBCXX_SOURCES
|
||||
format.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND LIBCXX_SOURCES
|
||||
support/win32/locale_win32.cpp
|
||||
|
@ -91,7 +91,9 @@
|
||||
# include <filesystem>
|
||||
#endif
|
||||
#include <float.h>
|
||||
#include <format>
|
||||
#ifndef _LIBCPP_HAS_NO_INCOMPLETE_FORMAT
|
||||
# include <format>
|
||||
#endif
|
||||
#include <forward_list>
|
||||
#ifndef _LIBCPP_HAS_NO_LOCALIZATION
|
||||
# include <fstream>
|
||||
@ -143,7 +145,9 @@
|
||||
#endif
|
||||
#include <queue>
|
||||
#include <random>
|
||||
#include <ranges>
|
||||
#ifndef _LIBCPP_HAS_NO_INCOMPLETE_RANGES
|
||||
# include <ranges>
|
||||
#endif
|
||||
#include <ratio>
|
||||
#ifndef _LIBCPP_HAS_NO_LOCALIZATION
|
||||
# include <regex>
|
||||
|
@ -12,6 +12,7 @@
|
||||
// clang-format off
|
||||
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// <ranges>
|
||||
|
||||
|
@ -136,8 +136,10 @@ TEST_MACROS();
|
||||
#endif
|
||||
#include <float.h>
|
||||
TEST_MACROS();
|
||||
#include <format>
|
||||
#ifndef _LIBCPP_HAS_NO_INCOMPLETE_FORMAT
|
||||
# include <format>
|
||||
TEST_MACROS();
|
||||
#endif
|
||||
#include <forward_list>
|
||||
TEST_MACROS();
|
||||
#ifndef _LIBCPP_HAS_NO_LOCALIZATION
|
||||
@ -218,8 +220,10 @@ TEST_MACROS();
|
||||
TEST_MACROS();
|
||||
#include <random>
|
||||
TEST_MACROS();
|
||||
#include <ranges>
|
||||
#ifndef _LIBCPP_HAS_NO_INCOMPLETE_RANGES
|
||||
# include <ranges>
|
||||
TEST_MACROS();
|
||||
#endif
|
||||
#include <ratio>
|
||||
TEST_MACROS();
|
||||
#ifndef _LIBCPP_HAS_NO_LOCALIZATION
|
||||
|
@ -84,7 +84,9 @@
|
||||
# include <filesystem>
|
||||
#endif
|
||||
#include <float.h>
|
||||
#include <format>
|
||||
#ifndef _LIBCPP_HAS_NO_INCOMPLETE_FORMAT
|
||||
# include <format>
|
||||
#endif
|
||||
#include <forward_list>
|
||||
#ifndef _LIBCPP_HAS_NO_LOCALIZATION
|
||||
# include <fstream>
|
||||
@ -136,7 +138,9 @@
|
||||
#endif
|
||||
#include <queue>
|
||||
#include <random>
|
||||
#include <ranges>
|
||||
#ifndef _LIBCPP_HAS_NO_INCOMPLETE_RANGES
|
||||
# include <ranges>
|
||||
#endif
|
||||
#include <ratio>
|
||||
#ifndef _LIBCPP_HAS_NO_LOCALIZATION
|
||||
# include <regex>
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// <copyable-box>& operator=(<copyable-box> const&)
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// <copyable-box>& operator=(<copyable-box>&&)
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// <copyable-box>::<copyable-box>()
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// template<class ...Args>
|
||||
// explicit <copyable-box>::<copyable-box>(in_place_t, Args&& ...args);
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// T& <copyable-box>::operator*()
|
||||
// T const& <copyable-box>::operator*() const
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// bool <copyable-box>::__has_value() const
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// This test ensures that <copyable-box> behaves correctly when it holds an empty type.
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// Test various properties of <copyable-box>
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// __non_propagating_cache& operator=(__non_propagating_cache const&);
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// __non_propagating_cache& operator=(__non_propagating_cache&&);
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// template<class T>
|
||||
// requires is_object_v<T>
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// __non_propagating_cache(__non_propagating_cache const&);
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// __non_propagating_cache();
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// __non_propagating_cache(__non_propagating_cache&&);
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// constexpr T const& operator*() const;
|
||||
// constexpr T& operator*();
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// constexpr bool __has_value() const;
|
||||
|
||||
|
@ -11,6 +11,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
#include <ranges>
|
||||
|
||||
|
@ -11,6 +11,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
#include <ranges>
|
||||
|
||||
|
@ -11,6 +11,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
#include <ranges>
|
||||
|
||||
|
@ -6,6 +6,8 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// <ranges>
|
||||
|
||||
#include <ranges>
|
||||
|
@ -6,6 +6,8 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-format
|
||||
|
||||
// <format>
|
||||
|
||||
#include <format>
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// map
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// multimap
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// multiset
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// set
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// array
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// deque
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// forward_list
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// list
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// vector
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// vector
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// unordered_map
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// unordered_multimap
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// unordered_multiset
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// unordered_multiset
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// span
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
// XFAIL: *
|
||||
|
||||
// directory_iterator, recursive_directory_iterator
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// path
|
||||
|
||||
|
@ -16,7 +16,9 @@
|
||||
// common_iterator& operator=(const common_iterator<I2, S2>& x);
|
||||
|
||||
#include <iterator>
|
||||
#ifndef _LIBCPP_HAS_NO_INCOMPLETE_RANGES
|
||||
#include <ranges>
|
||||
#endif
|
||||
#include <cassert>
|
||||
|
||||
#include "test_macros.h"
|
||||
@ -55,6 +57,7 @@ void test() {
|
||||
assert(*commonIter2 == 2);
|
||||
assert(commonIter1 == commonIter2);
|
||||
}
|
||||
#ifndef _LIBCPP_HAS_NO_INCOMPLETE_RANGES
|
||||
{
|
||||
auto iter1 = random_access_iterator<int*>(buffer);
|
||||
auto commonIter1 = std::common_iterator<decltype(iter1), sentinel_type<int*>>(iter1);
|
||||
@ -81,6 +84,7 @@ void test() {
|
||||
assert(std::ranges::next(commonIter1, 6) == commonSent1);
|
||||
assert(std::ranges::next(commonIter1, 6) == commonSent2);
|
||||
}
|
||||
#endif
|
||||
{
|
||||
auto iter1 = assignable_iterator<int*>(buffer);
|
||||
auto iter2 = forward_iterator<int*>(buffer + 1);
|
||||
@ -99,13 +103,17 @@ void test() {
|
||||
assert(*commonIter2 == 2);
|
||||
assert(commonIter1 == commonIter2);
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_INCOMPLETE_RANGES
|
||||
assert(std::ranges::next(commonIter1, 6) != commonSent1);
|
||||
assert(std::ranges::next(commonIter1, 6) == commonSent2);
|
||||
#endif
|
||||
|
||||
commonSent1 = commonSent2;
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_INCOMPLETE_RANGES
|
||||
assert(std::ranges::next(commonIter1, 6) == commonSent1);
|
||||
assert(std::ranges::next(commonIter1, 6) == commonSent2);
|
||||
#endif
|
||||
|
||||
commonIter1 = commonSent1;
|
||||
|
||||
|
@ -11,6 +11,8 @@
|
||||
//
|
||||
// clang-format off
|
||||
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-format
|
||||
|
||||
// <format>
|
||||
|
||||
// Test the feature test macros defined by <format>
|
||||
|
@ -11,6 +11,8 @@
|
||||
//
|
||||
// clang-format off
|
||||
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// <ranges>
|
||||
|
||||
// Test the feature test macros defined by <ranges>
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// std::ranges::begin
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: clang-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// unspecified begin;
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: clang-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// ranges::cbegin;
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: clang-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// unspecified begin;
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// std::ranges::end
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: clang-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// unspecified begin;
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: clang-10
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// std::ranges::data
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// std::ranges::data
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: clang-10
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// std::ranges::empty
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// std::ranges::empty
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// std::ranges::size
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// std::ranges::ssize
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// std::views::all;
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// template<viewable_range R>
|
||||
// using all_t = decltype(views::all(declval<R>()));
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// constexpr V base() const& requires copy_constructible<V>;
|
||||
// constexpr V base() &&;
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// constexpr auto begin();
|
||||
// constexpr auto begin() const requires range<const V>;
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// template<class T>
|
||||
// inline constexpr bool enable_borrowed_range<common_view<T>> = enable_borrowed_range<T>;
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// template<class R>
|
||||
// common_view(R&&) -> common_view<views::all_t<R>>;
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// common_view() requires default_initializable<V> = default;
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// constexpr explicit common_view(V r);
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// constexpr auto end();
|
||||
// constexpr auto end() const requires range<const V>;
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// constexpr auto size() requires sized_range<V>
|
||||
// constexpr auto size() const requires sized_range<const V>
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// constexpr V base() const& requires copy_constructible<V> { return base_; }
|
||||
// constexpr V base() && { return std::move(base_); }
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// constexpr auto begin()
|
||||
// requires (!(simple-view<V> &&
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// template<class R>
|
||||
// drop_view(R&&, range_difference_t<R>) -> drop_view<views::all_t<R>>;
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// drop_view() requires default_initializable<V> = default;
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// constexpr drop_view(V base, range_difference_t<V> count);
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// If we have a copy-propagating cache, when we copy ZeroOnDestroy, we will get a
|
||||
// dangling reference to the copied-from object. This test ensures that we do not
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// constexpr auto end()
|
||||
// requires (!simple-view<V>)
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// Some basic examples of how drop_view might be used in the wild. This is a general
|
||||
// collection of sample algorithms and functions that try to mock general usage of
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// constexpr auto size()
|
||||
// requires sized_range<V>
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// template<class T>
|
||||
// class empty_view;
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// template<range R>
|
||||
// requires is_object_v<R>
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// constexpr V base() const& requires copy_constructible<V>
|
||||
// constexpr V base() &&
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// constexpr iterator<false> begin();
|
||||
// constexpr iterator<true> begin() const
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// CTAD tests.
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// constexpr sentinel<false> end();
|
||||
// constexpr iterator<false> end() requires common_range<V>;
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// Some basic examples of how transform_view might be used in the wild. This is a general
|
||||
// collection of sample algorithms and functions that try to mock general usage of
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// transform_view::<iterator>::operator{++,--,+=,-=}
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// transform_view::<iterator>::base
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// transform_view::<iterator>::operator{<,>,<=,>=}
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// transform_view::<iterator>::transform_view::<iterator>();
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// transform_view::<iterator>::operator*
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// transform_view::<iterator>::operator[]
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// transform_view::<iterator>::operator{+,-}
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// The requirements for transform_view::<iterator>'s members.
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// class transform_view::<sentinel>;
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
||||
// UNSUPPORTED: libcpp-no-concepts
|
||||
// UNSUPPORTED: gcc-10
|
||||
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
|
||||
|
||||
// transform_view::<iterator>::operator[]
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user