diff --git a/libcxx/docs/DesignDocs/ExperimentalFeatures.rst b/libcxx/docs/DesignDocs/ExperimentalFeatures.rst new file mode 100644 --- /dev/null +++ b/libcxx/docs/DesignDocs/ExperimentalFeatures.rst @@ -0,0 +1,197 @@ +===================== +Experimental Features +===================== + +.. contents:: + :local: + +Overview +======== + +Libc++ implements technical specifications (TSes) and ships them as experimental +features that users are free to try out. The goal is to allow getting feedback +on those experimental features. + +However, libc++ does not provide the same guarantees about those features as +it does for the rest of the library. In particular, no ABI or API stability +is guaranteed, and experimental features are deprecated once the non-experimental +equivalent has shipped in the library. This document outlines the details of +that process. + +Background +========== + +The "end game" of a Technical Specification (TS) is to have the features in +there added to a future version of the C++ standard. When this happens, the TS +can be retired. Sometimes, only part of at TS is added to the standard, and +the rest of the features may be incorporated into the next version of the TS. + +Adoption leaves library implementors with two implementations of a feature, +one in namespace ``std``, and the other in namespace ``std::experimental``. +The first one will continue to evolve (via issues and papers), while the other +will not. Gradually they will diverge. It's not good for users to have two +(subtly) different implementations of the same functionality in the same library. + +Design +====== + +When a feature is adopted into the main standard, we implement it in namespace +``std``. We then create a deprecation warning for the corresponding experimental +feature warning users to move off of it and to the now-standardized feature. + +These deprecation warnings are guarded by a macro of the form +``_LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_``, which +can be defined by users to disable the deprecation warning. + +After **2 releases**, the experimental feature is removed completely (and the +deprecation notice too). Using the experimental feature simply becomes an +error. Furthermore, when an experimental header becomes empty due to the +removal of the corresponding experimental feature, the header is removed. +Keeping the header around creates incorrect assumptions from users and breaks +``__has_include``. + + +Status of TSes +============== + +Library Fundamentals TS `V1 `__ and `V2 `__ +--------------------------------------------------------------------------------------------- + +Most (but not all) of the features of the LFTS were accepted into C++17. + ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| Section | Feature | Shipped in ``std`` | To be removed from ``std::experimental`` | Notes | ++=========+=======================================================+====================+==========================================+=========================+ +| 2.1 | ``uses_allocator construction`` | 5.0 | 7.0 | | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 3.1.2 | ``erased_type`` | | n/a | Not part of C++17 | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 3.2.1 | ``tuple_size_v`` | 5.0 | 7.0 | Removed | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 3.2.2 | ``apply`` | 5.0 | 7.0 | Removed | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 3.3.1 | All of the ``_v`` traits in ```` | 5.0 | 7.0 | Removed | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 3.3.2 | ``invocation_type`` and ``raw_invocation_type`` | | n/a | Not part of C++17 | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 3.3.3 | Logical operator traits | 5.0 | 7.0 | Removed | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 3.3.3 | Detection Idiom | 5.0 | | Only partially in C++17 | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 3.4.1 | All of the ``_v`` traits in ```` | 5.0 | 7.0 | Removed | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 3.5.1 | All of the ``_v`` traits in ```` | 5.0 | 7.0 | Removed | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 3.6.1 | All of the ``_v`` traits in ```` | 5.0 | 7.0 | Removed | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 3.7 | ``propagate_const`` | | n/a | Not part of C++17 | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 4.2 | Enhancements to ``function`` | Not yet | | | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 4.3 | searchers | 7.0 | 9.0 | | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 5 | optional | 5.0 | 7.0 | Removed | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 6 | ``any`` | 5.0 | 7.0 | Removed | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 7 | ``string_view`` | 5.0 | 7.0 | Removed | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 8.2.1 | ``shared_ptr`` enhancements | Not yet | Never added | | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 8.2.2 | ``weak_ptr`` enhancements | Not yet | Never added | | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 8.5 | ``memory_resource`` | Not yet | | | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 8.6 | ``polymorphic_allocator`` | Not yet | | | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 8.7 | ``resource_adaptor`` | | n/a | Not part of C++17 | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 8.8 | Access to program-wide ``memory_resource`` objects | Not yet | | | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 8.9 | Pool resource classes | Not yet | | | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 8.10 | ``monotonic_buffer_resource`` | Not yet | | | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 8.11 | Alias templates using polymorphic memory resources | Not yet | | | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 8.12 | Non-owning pointers | | n/a | Not part of C++17 | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 11.2 | ``promise`` | | n/a | Not part of C++17 | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 11.3 | ``packaged_task`` | | n/a | Not part of C++17 | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 12.2 | ``search`` | 7.0 | 9.0 | | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 12.3 | ``sample`` | 5.0 | 7.0 | Removed | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 12.4 | ``shuffle`` | | | Not part of C++17 | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 13.1 | ``gcd`` and ``lcm`` | 5.0 | 7.0 | Removed | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 13.2 | Random number generation | | | Not part of C++17 | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +| 14 | Reflection Library | | | Not part of C++17 | ++---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ + + +`FileSystem TS `__ +------------------------------------------- +The FileSystem TS was accepted (in toto) for C++17. +The FileSystem TS implementation was shipped in namespace ``std`` in LLVM 7.0, and will be removed in LLVM 11.0 (due to the lack of deprecation warnings before LLVM 9.0). + +Parallelism TS `V1 `__ and `V2 `__ +------------------------------------------------------------------------------------ +Some (most) of the Parallelism TS was accepted for C++17. +We have not yet shipped an implementation of the Parallelism TS. + +`Coroutines TS `__ +------------------------------------------- +The Coroutines TS is not yet part of a shipping standard. +We are shipping (as of v5.0) an implementation of the Coroutines TS in namespace ``std::experimental``. + +`Networking TS `__ +------------------------------------------- +The Networking TS is not yet part of a shipping standard. +We have not yet shipped an implementation of the Networking TS. + +`Ranges TS `__ +--------------------------------------- +The Ranges TS is not yet part of a shipping standard. +We have not yet shipped an implementation of the Ranges TS. + +`Concepts TS `__ +----------------------------------------- +The Concepts TS is not yet part of a shipping standard, but it has been adopted into the C++20 working draft. +We have not yet shipped an implementation of the Concepts TS. + +`Concurrency TS `__ +-------------------------------------------- +The Concurrency TS was adopted in Kona (2015). +None of the Concurrency TS was accepted for C++17. +We have not yet shipped an implementation of the Concurrency TS. + +.. +---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +.. | Section | Feature | Shipped in ``std`` | To be removed from ``std::experimental`` | Notes | +.. +=========+=======================================================+====================+==========================================+=========================+ +.. | 2.3 | class template ``future`` | | | | +.. +---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +.. | 2.4 | class template ``shared_future`` | | | | +.. +---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +.. | 2.5 | class template ``promise`` | | | Only using ``future`` | +.. +---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +.. | 2.6 | class template ``packaged_task`` | | | Only using ``future`` | +.. +---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +.. | 2.7 | function template ``when_all`` | | | Not part of C++17 | +.. +---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +.. | 2.8 | class template ``when_any_result`` | | | Not part of C++17 | +.. +---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +.. | 2.9 | function template ``when_any`` | | | Not part of C++17 | +.. +---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +.. | 2.10 | function template ``make_ready_future`` | | | Not part of C++17 | +.. +---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +.. | 2.11 | function template ``make_exeptional_future`` | | | Not part of C++17 | +.. +---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +.. | 3 | ``latches`` and ``barriers`` | | | Not part of C++17 | +.. +---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ +.. | 4 | Atomic Smart Pointers | | | Adopted for C++20 | +.. +---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+ diff --git a/libcxx/docs/UsingLibcxx.rst b/libcxx/docs/UsingLibcxx.rst --- a/libcxx/docs/UsingLibcxx.rst +++ b/libcxx/docs/UsingLibcxx.rst @@ -84,6 +84,9 @@ * The contents of the ```` headers and ``libc++experimental.a`` library will not remain compatible between versions. * No guarantees of API or ABI stability are provided. + * When we implement the standardized version of an experimental feature, + the experimental feature is removed two releases after the non-experimental + version has shipped. Using libc++ on Linux ===================== diff --git a/libcxx/docs/index.rst b/libcxx/docs/index.rst --- a/libcxx/docs/index.rst +++ b/libcxx/docs/index.rst @@ -137,6 +137,7 @@ DesignDocs/DebugMode DesignDocs/CapturingConfigInfo DesignDocs/ABIVersioning + DesignDocs/ExperimentalFeatures DesignDocs/VisibilityMacros DesignDocs/ThreadingSupportAPI DesignDocs/FileTimeType diff --git a/libcxx/include/CMakeLists.txt b/libcxx/include/CMakeLists.txt --- a/libcxx/include/CMakeLists.txt +++ b/libcxx/include/CMakeLists.txt @@ -65,8 +65,6 @@ experimental/__config experimental/__memory experimental/algorithm - experimental/any - experimental/chrono experimental/coroutine experimental/deque experimental/filesystem @@ -76,17 +74,11 @@ experimental/list experimental/map experimental/memory_resource - experimental/numeric - experimental/optional experimental/propagate_const - experimental/ratio experimental/regex experimental/set experimental/simd experimental/string - experimental/string_view - experimental/system_error - experimental/tuple experimental/type_traits experimental/unordered_map experimental/unordered_set diff --git a/libcxx/include/experimental/any b/libcxx/include/experimental/any deleted file mode 100644 --- a/libcxx/include/experimental/any +++ /dev/null @@ -1,20 +0,0 @@ -// -*- C++ -*- -//===------------------------------- any ----------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -#ifndef _LIBCPP_EXPERIMENTAL_ANY -#define _LIBCPP_EXPERIMENTAL_ANY - -#include <__config> - -#ifdef _LIBCPP_WARNING -_LIBCPP_WARNING(" has been removed. Use instead.") -#else -# warning " has been removed. Use instead." -#endif - -#endif // _LIBCPP_EXPERIMENTAL_ANY diff --git a/libcxx/include/experimental/chrono b/libcxx/include/experimental/chrono deleted file mode 100644 --- a/libcxx/include/experimental/chrono +++ /dev/null @@ -1,20 +0,0 @@ -// -*- C++ -*- -//===---------------------------- chrono ----------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -#ifndef _LIBCPP_EXPERIMENTAL_CHRONO -#define _LIBCPP_EXPERIMENTAL_CHRONO - -#include <__config> - -#ifdef _LIBCPP_WARNING -_LIBCPP_WARNING(" has been removed. Use instead.") -#else -# warning " has been removed. Use instead." -#endif - -#endif // _LIBCPP_EXPERIMENTAL_CHRONO diff --git a/libcxx/include/experimental/filesystem b/libcxx/include/experimental/filesystem --- a/libcxx/include/experimental/filesystem +++ b/libcxx/include/experimental/filesystem @@ -236,6 +236,14 @@ #pragma GCC system_header #endif +#if !defined(_LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_FILESYSTEM) +# if defined(_LIBCPP_WARNING) + _LIBCPP_WARNING("std::experimental::filesystem has now been deprecated in favor of C++17's std::filesystem. Please stop using it and start using std::filesystem. This experimental version will be removed in LLVM 11. You can remove this warning by defining the _LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_FILESYSTEM macro.") +# else +# warning "std::experimental::filesystem has now been deprecated in favor of C++17's std::filesystem. Please stop using it and start using std::filesystem. This experimental version will be removed in LLVM 11. You can remove this warning by defining the _LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_FILESYSTEM macro." +# endif +#endif + _LIBCPP_PUSH_MACROS #include <__undef_macros> diff --git a/libcxx/include/experimental/numeric b/libcxx/include/experimental/numeric deleted file mode 100644 --- a/libcxx/include/experimental/numeric +++ /dev/null @@ -1,20 +0,0 @@ -// -*- C++ -*- -//===--------------------------- numeric ----------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -#ifndef _LIBCPP_EXPERIMENTAL_NUMERIC -#define _LIBCPP_EXPERIMENTAL_NUMERIC - -#include <__config> - -#ifdef _LIBCPP_WARNING -_LIBCPP_WARNING(" has been removed. Use instead.") -#else -# warning " has been removed. Use instead." -#endif - -#endif // _LIBCPP_EXPERIMENTAL_NUMERIC diff --git a/libcxx/include/experimental/optional b/libcxx/include/experimental/optional deleted file mode 100644 --- a/libcxx/include/experimental/optional +++ /dev/null @@ -1,20 +0,0 @@ -// -*- C++ -*- -//===-------------------------- optional ----------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -#ifndef _LIBCPP_EXPERIMENTAL_OPTIONAL -#define _LIBCPP_EXPERIMENTAL_OPTIONAL - -#include <__config> - -#ifdef _LIBCPP_WARNING -_LIBCPP_WARNING(" has been removed. Use instead.") -#else -# warning " has been removed. Use instead." -#endif - -#endif // _LIBCPP_EXPERIMENTAL_OPTIONAL diff --git a/libcxx/include/experimental/ratio b/libcxx/include/experimental/ratio deleted file mode 100644 --- a/libcxx/include/experimental/ratio +++ /dev/null @@ -1,20 +0,0 @@ -// -*- C++ -*- -//===----------------------------- ratio ----------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -#ifndef _LIBCPP_EXPERIMENTAL_RATIO -#define _LIBCPP_EXPERIMENTAL_RATIO - -#include <__config> - -#ifdef _LIBCPP_WARNING -_LIBCPP_WARNING(" has been removed. Use instead.") -#else -# warning " has been removed. Use instead." -#endif - -#endif // _LIBCPP_EXPERIMENTAL_RATIO diff --git a/libcxx/include/experimental/string_view b/libcxx/include/experimental/string_view deleted file mode 100644 --- a/libcxx/include/experimental/string_view +++ /dev/null @@ -1,20 +0,0 @@ -// -*- C++ -*- -//===------------------------ string_view ---------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -#ifndef _LIBCPP_EXPERIMENTAL_STRING_VIEW -#define _LIBCPP_EXPERIMENTAL_STRING_VIEW - -#include <__config> - -#ifdef _LIBCPP_WARNING -_LIBCPP_WARNING(" has been removed. Use instead.") -#else -# warning " has been removed. Use instead." -#endif - -#endif // _LIBCPP_EXPERIMENTAL_STRING_VIEW diff --git a/libcxx/include/experimental/system_error b/libcxx/include/experimental/system_error deleted file mode 100644 --- a/libcxx/include/experimental/system_error +++ /dev/null @@ -1,20 +0,0 @@ -// -*- C++ -*- -//===-------------------------- system_error ------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -#ifndef _LIBCPP_EXPERIMENTAL_SYSTEM_ERROR -#define _LIBCPP_EXPERIMENTAL_SYSTEM_ERROR - -#include <__config> - -#ifdef _LIBCPP_WARNING -_LIBCPP_WARNING(" has been removed. Use instead.") -#else -# warning " has been removed. Use instead." -#endif - -#endif // _LIBCPP_EXPERIMENTAL_SYSTEM_ERROR diff --git a/libcxx/include/experimental/tuple b/libcxx/include/experimental/tuple deleted file mode 100644 --- a/libcxx/include/experimental/tuple +++ /dev/null @@ -1,20 +0,0 @@ -// -*- C++ -*- -//===----------------------------- tuple ----------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -#ifndef _LIBCPP_EXPERIMENTAL_TUPLE -#define _LIBCPP_EXPERIMENTAL_TUPLE - -#include <__config> - -#ifdef _LIBCPP_WARNING -_LIBCPP_WARNING(" has been removed. Use instead.") -#else -# warning " has been removed. Use instead." -#endif - -#endif // _LIBCPP_EXPERIMENTAL_TUPLE diff --git a/libcxx/test/libcxx/experimental/diagnostics/syserr/use_header_warning.fail.cpp b/libcxx/test/libcxx/experimental/diagnostics/syserr/use_header_warning.fail.cpp deleted file mode 100644 --- a/libcxx/test/libcxx/experimental/diagnostics/syserr/use_header_warning.fail.cpp +++ /dev/null @@ -1,19 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// - -// REQUIRES: verify-support - -// - -#include - -// expected-error@experimental/system_error:* {{" has been removed. Use instead."}} - -int main(int, char**) { - return 0; -} diff --git a/libcxx/test/libcxx/experimental/diagnostics/syserr/version.pass.cpp b/libcxx/test/libcxx/experimental/diagnostics/syserr/version.pass.cpp deleted file mode 100644 --- a/libcxx/test/libcxx/experimental/diagnostics/syserr/version.pass.cpp +++ /dev/null @@ -1,22 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// - -// - -#ifdef __GNUC__ -#pragma GCC diagnostic ignored "-W#warnings" -#endif -#include - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main(int, char**) { - return 0; -} diff --git a/libcxx/test/libcxx/experimental/strings/string.view/use_header_warning.fail.cpp b/libcxx/test/libcxx/experimental/filesystem/use_header_warning.fail.cpp rename from libcxx/test/libcxx/experimental/strings/string.view/use_header_warning.fail.cpp rename to libcxx/test/libcxx/experimental/filesystem/use_header_warning.fail.cpp --- a/libcxx/test/libcxx/experimental/strings/string.view/use_header_warning.fail.cpp +++ b/libcxx/test/libcxx/experimental/filesystem/use_header_warning.fail.cpp @@ -8,11 +8,11 @@ // REQUIRES: verify-support -// +// -#include +#include -// expected-error@experimental/string_view:* {{" has been removed. Use instead."}} +// expected-error@experimental/filesystem:* {{"std::experimental::filesystem has now been deprecated in favor of C++17's std::filesystem. Please stop using it and start using std::filesystem. This experimental version will be removed in LLVM 11. You can remove this warning by defining the _LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_FILESYSTEM macro."}} int main(int, char**) { return 0; diff --git a/libcxx/test/libcxx/experimental/filesystem/version.pass.cpp b/libcxx/test/libcxx/experimental/filesystem/version.pass.cpp --- a/libcxx/test/libcxx/experimental/filesystem/version.pass.cpp +++ b/libcxx/test/libcxx/experimental/filesystem/version.pass.cpp @@ -8,6 +8,8 @@ // +#define _LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_FILESYSTEM + #include #ifndef _LIBCPP_VERSION diff --git a/libcxx/test/libcxx/experimental/numerics/numeric.ops/use_header_warning.fail.cpp b/libcxx/test/libcxx/experimental/numerics/numeric.ops/use_header_warning.fail.cpp deleted file mode 100644 --- a/libcxx/test/libcxx/experimental/numerics/numeric.ops/use_header_warning.fail.cpp +++ /dev/null @@ -1,19 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// - -// REQUIRES: verify-support - -// - -#include - -// expected-error@experimental/numeric:* {{" has been removed. Use instead."}} - -int main(int, char**) { - return 0; -} diff --git a/libcxx/test/libcxx/experimental/numerics/numeric.ops/version.pass.cpp b/libcxx/test/libcxx/experimental/numerics/numeric.ops/version.pass.cpp deleted file mode 100644 --- a/libcxx/test/libcxx/experimental/numerics/numeric.ops/version.pass.cpp +++ /dev/null @@ -1,22 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// - -// - -#ifdef __GNUC__ -#pragma GCC diagnostic ignored "-W#warnings" -#endif -#include - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main(int, char**) { - return 0; -} diff --git a/libcxx/test/libcxx/experimental/strings/string.view/version.pass.cpp b/libcxx/test/libcxx/experimental/strings/string.view/version.pass.cpp deleted file mode 100644 --- a/libcxx/test/libcxx/experimental/strings/string.view/version.pass.cpp +++ /dev/null @@ -1,22 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// - -// - -#ifdef __GNUC__ -#pragma GCC diagnostic ignored "-W#warnings" -#endif -#include - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main(int, char**) { - return 0; -} diff --git a/libcxx/test/libcxx/experimental/utilities/any/use_header_warning.fail.cpp b/libcxx/test/libcxx/experimental/utilities/any/use_header_warning.fail.cpp deleted file mode 100644 --- a/libcxx/test/libcxx/experimental/utilities/any/use_header_warning.fail.cpp +++ /dev/null @@ -1,19 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// - -// REQUIRES: verify-support - -// - -#include - -// expected-error@experimental/any:* {{" has been removed. Use instead."}} - -int main(int, char**) { - return 0; -} diff --git a/libcxx/test/libcxx/experimental/utilities/any/version.pass.cpp b/libcxx/test/libcxx/experimental/utilities/any/version.pass.cpp deleted file mode 100644 --- a/libcxx/test/libcxx/experimental/utilities/any/version.pass.cpp +++ /dev/null @@ -1,22 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// - -// - -#ifdef __GNUC__ -#pragma GCC diagnostic ignored "-W#warnings" -#endif -#include - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main(int, char**) { - return 0; -} diff --git a/libcxx/test/libcxx/experimental/utilities/optional/use_header_warning.fail.cpp b/libcxx/test/libcxx/experimental/utilities/optional/use_header_warning.fail.cpp deleted file mode 100644 --- a/libcxx/test/libcxx/experimental/utilities/optional/use_header_warning.fail.cpp +++ /dev/null @@ -1,19 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// - -// REQUIRES: verify-support - -// - -#include - -// expected-error@experimental/optional:* {{" has been removed. Use instead."}} - -int main(int, char**) { - return 0; -} diff --git a/libcxx/test/libcxx/experimental/utilities/optional/version.pass.cpp b/libcxx/test/libcxx/experimental/utilities/optional/version.pass.cpp deleted file mode 100644 --- a/libcxx/test/libcxx/experimental/utilities/optional/version.pass.cpp +++ /dev/null @@ -1,22 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// - -// - -#ifdef __GNUC__ -#pragma GCC diagnostic ignored "-W#warnings" -#endif -#include - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main(int, char**) { - return 0; -} diff --git a/libcxx/test/libcxx/experimental/utilities/ratio/use_header_warning.fail.cpp b/libcxx/test/libcxx/experimental/utilities/ratio/use_header_warning.fail.cpp deleted file mode 100644 --- a/libcxx/test/libcxx/experimental/utilities/ratio/use_header_warning.fail.cpp +++ /dev/null @@ -1,19 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// - -// REQUIRES: verify-support - -// - -#include - -// expected-error@experimental/ratio:* {{" has been removed. Use instead."}} - -int main(int, char**) { - return 0; -} diff --git a/libcxx/test/libcxx/experimental/utilities/ratio/version.pass.cpp b/libcxx/test/libcxx/experimental/utilities/ratio/version.pass.cpp deleted file mode 100644 --- a/libcxx/test/libcxx/experimental/utilities/ratio/version.pass.cpp +++ /dev/null @@ -1,22 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// - -// - -#ifdef __GNUC__ -#pragma GCC diagnostic ignored "-W#warnings" -#endif -#include - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main(int, char**) { - return 0; -} diff --git a/libcxx/test/libcxx/experimental/utilities/time/use_header_warning.fail.cpp b/libcxx/test/libcxx/experimental/utilities/time/use_header_warning.fail.cpp deleted file mode 100644 --- a/libcxx/test/libcxx/experimental/utilities/time/use_header_warning.fail.cpp +++ /dev/null @@ -1,19 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// - -// REQUIRES: verify-support - -// - -#include - -// expected-error@experimental/chrono:* {{" has been removed. Use instead."}} - -int main(int, char**) { - return 0; -} diff --git a/libcxx/test/libcxx/experimental/utilities/time/version.pass.cpp b/libcxx/test/libcxx/experimental/utilities/time/version.pass.cpp deleted file mode 100644 --- a/libcxx/test/libcxx/experimental/utilities/time/version.pass.cpp +++ /dev/null @@ -1,22 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// - -// - -#ifdef __GNUC__ -#pragma GCC diagnostic ignored "-W#warnings" -#endif -#include - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main(int, char**) { - return 0; -} diff --git a/libcxx/test/libcxx/experimental/utilities/tuple/use_header_warning.fail.cpp b/libcxx/test/libcxx/experimental/utilities/tuple/use_header_warning.fail.cpp deleted file mode 100644 --- a/libcxx/test/libcxx/experimental/utilities/tuple/use_header_warning.fail.cpp +++ /dev/null @@ -1,19 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// - -// REQUIRES: verify-support - -// - -#include - -// expected-error@experimental/tuple:* {{" has been removed. Use instead."}} - -int main(int, char**) { - return 0; -} diff --git a/libcxx/test/libcxx/experimental/utilities/tuple/version.pass.cpp b/libcxx/test/libcxx/experimental/utilities/tuple/version.pass.cpp deleted file mode 100644 --- a/libcxx/test/libcxx/experimental/utilities/tuple/version.pass.cpp +++ /dev/null @@ -1,22 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// - -// - -#ifdef __GNUC__ -#pragma GCC diagnostic ignored "-W#warnings" -#endif -#include - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main(int, char**) { - return 0; -} diff --git a/libcxx/test/std/experimental/filesystem/lit.local.cfg b/libcxx/test/std/experimental/filesystem/lit.local.cfg new file mode 100644 --- /dev/null +++ b/libcxx/test/std/experimental/filesystem/lit.local.cfg @@ -0,0 +1 @@ +config.test_format.cxx.compile_flags += ['-D_LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_FILESYSTEM'] diff --git a/libcxx/www/TS_deprecation.html b/libcxx/www/TS_deprecation.html deleted file mode 100644 --- a/libcxx/www/TS_deprecation.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - libc++ Technical Specification Status - - - - - - - -
-

The "end game" of a Technical Specification (TS) is to have the features in there added to a future version of the C++ standard. When this happens, the TS can be retired. Sometimes, only part of at TS is added to the standard, and the rest of the features may be incorporated into the next version of the TS.

- -

Adoption leaves library implementors with two implementations of a feature, one in namespace std, and the other in namespace std::experimental. The first one will continue to evolve (via issues and papers), while the other will not. Gradually they will diverge. It's not good for users to have two (subtly) different implementations of the same functionality in the same library.

- -

As features are adopted into the main standard, we will implement them in namespace std, and then remove the versions in std::experimental. The removal will not happen immediately, because that would be unhelpful for users - giving them no chance to update their code.

- -

The rule of thumb that libc++ will follow is: one year.
One year after we ship an implementation of a feature in std, we will remove it from std::experimental.

- -

A specific example: The first release of clang/libc++ that officially supported C++17 was 5.0. For the 7.0 release (one year after 5.0), we will remove the features that were adopted into C++17 from the TSes, and that were present in namespace std in the 5.0 release.

- -

Library Fundamentals TS V1 and V2

- -

Most (but not all) of the features of the LFTS were accepted into C++17.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SectionFeatureshipped in
std
To be removed from
std::experimental
Notes
2.1uses_allocator construction
5.0
7.0
3.1.2erased_type
n/a
Not part of C++17
3.2.1tuple_size_v
5.0
7.0
Removed
3.2.2apply
5.0
7.0
Removed
3.3.1All of the '_v' traits in <type_traits>
5.0
7.0
Removed
3.3.2invocation_type and raw_invocation_type
n/a
Not part of C++17
3.3.3Logical operator traits
5.0
7.0
Removed
3.3.3Detection Idiom
5.0
Only partially in C++17
3.4.1All of the '_v' traits in <ratio>
5.0
7.0
Removed
3.5.1All of the '_v' traits in <chrono>
5.0
7.0
Removed
3.6.1All of the '_v' traits in <system_error>
5.0
7.0
Removed
3.7propagate_const
n/a
Not part of C++17
4.2Enhancements to function
Not yet
4.3searchers
7.0
9.0
5optional
5.0
7.0
Removed
6any
5.0
7.0
Removed
7string_view
5.0
7.0
Removed
8.2.1shared_ptr enhancements
Not yet
Never added
8.2.2weak_ptr enhancements
Not yet
Never added
8.5memory_resource
Not yet
8.6polymorphic_allocator
Not yet
8.7resource_adaptor
n/a
Not part of C++17
8.8Access to program-wide memory_resource objects
Not yet
8.9Pool resource classes
Not yet
8.10monotonic_buffer_resource
Not yet
8.11Alias templates using polymorphic memory resources
Not yet
8.12Non-owning pointers
n/a
Not part of C++17
11.2promise
n/a
Not part of C++17
11.3packaged_task
n/a
Not part of C++17
12.2search
7.0
9.0
12.3sample
5.0
7.0
Removed
12.4shuffleNot part of C++17
13.1gcd and lcm
5.0
7.0
Removed
13.2Random number generationNot part of C++17
14Reflection LibraryNot part of C++17
- -

FileSystem TS

-

The FileSystem TS was accepted (in toto) for C++17.

-

The FileSystem TS implementation is still (as of v6.0) in namespace std::experimental.

- -

Parallelism TS V1 and V2

-

Some (most) of the Parallelism TS was accepted for C++17.

-

We have not yet shipped an implementation of the Parallelism TS.

- -

Coroutines TS

-

The Coroutines TS is not yet part of a shipping standard.

-

We are shipping (as of v5.0) an implementation of the Coroutines TS in namespace std::experimental.

- -

Networking TS

-

The Networking TS is not yet part of a shipping standard.

-

We have not yet shipped an implementation of the Networking TS.

- -

Ranges TS

-

The Ranges TS is not yet part of a shipping standard.

-

We have not yet shipped an implementation of the Ranges TS.

- -

Concepts TS

-

The Concepts TS is not yet part of a shipping standard, but it has been adopted into the C++20 working draft.

-

We have not yet shipped an implementation of the Concepts TS.

- -

Concurrency TS

- -

None of the Concurrency TS was accepted for C++17.

-

We have not yet shipped an implementation of the Concurrency TS.

- - - - - -
-

Last Updated: 8-Feb-2018

-
- - diff --git a/libcxx/www/index.html b/libcxx/www/index.html --- a/libcxx/www/index.html +++ b/libcxx/www/index.html @@ -145,7 +145,7 @@ and the current status of these features can be found here.

As features get moved from the Technical Specifications into the main standard, we will (after a period for migration) remove them from the TS implementation. This - process is detailed here.

+ process is detailed here.

Build Bots