[libcxx] Slightly improved policy for handling experimental features

Summary:
Following the discussion on the libcxx-dev mailing list
(http://lists.llvm.org/pipermail/libcxx-dev/2019-May/000358.html),
this implements the new policy for handling experimental features and
their deprecation. We basically add a deprecation warning for
std::experimental::filesystem, and we remove a bunch of <experimental/*>
headers that were now empty.

Reviewers: mclow.lists, EricWF

Subscribers: mgorny, christof, jkorous, dexonsmith, arphaman, libcxx-commits, jfb

Tags: #libc

Differential Revision: https://reviews.llvm.org/D62428

llvm-svn: 363072
This commit is contained in:
Louis Dionne 2019-06-11 14:48:40 +00:00
parent 10ed68189a
commit 776acf225b
36 changed files with 238 additions and 697 deletions

View File

@ -0,0 +1,203 @@
=====================
Experimental Features
=====================
.. contents::
:local:
.. _experimental features:
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``. Once that implementation is complete, 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_<FEATURE>``, which
can be defined by users to disable the deprecation warning. Whenever
possible, deprecation warnings are put on a per-declaration basis
using the ``[[deprecated]]`` attribute, which also allows disabling
the warnings using ``-Wno-deprecated-declarations``.
After **2 releases** of LLVM, 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 <https://wg21.link/N4480>`__ and `V2 <https://wg21.link/N4617>`__
---------------------------------------------------------------------------------------------
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 ``<type_traits>`` | 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 ``<ratio>`` | 5.0 | 7.0 | Removed |
+---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+
| 3.5.1 | All of the ``_v`` traits in ``<chrono>`` | 5.0 | 7.0 | Removed |
+---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+
| 3.6.1 | All of the ``_v`` traits in ``<system_error>`` | 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 <https://wg21.link/N4100>`__
-------------------------------------------
The FileSystem TS was accepted (in totality) 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 <https://wg21.link/N4507>`__ and `V2 <https://wg21.link/N4706>`__
------------------------------------------------------------------------------------
Some (most) of the Parallelism TS was accepted for C++17.
We have not yet shipped an implementation of the Parallelism TS.
`Coroutines TS <https://wg21.link/N4680>`__
-------------------------------------------
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 <https://wg21.link/N4656>`__
-------------------------------------------
The Networking TS is not yet part of a shipping standard.
We have not yet shipped an implementation of the Networking TS.
`Ranges TS <https://wg21.link/N4685>`__
---------------------------------------
The Ranges TS is not yet part of a shipping standard.
We have not yet shipped an implementation of the Ranges TS.
`Concepts TS <https://wg21.link/N4641>`__
-----------------------------------------
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 <https://wg21.link/P0159>`__
--------------------------------------------
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 |
.. +---------+-------------------------------------------------------+--------------------+------------------------------------------+-------------------------+

View File

@ -84,6 +84,9 @@ page.
* The contents of the ``<experimental/...>`` 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. The full policy is explained :ref:`here <experimental features>`.
Using libc++ on Linux
=====================

View File

@ -137,6 +137,7 @@ Design Documents
DesignDocs/DebugMode
DesignDocs/CapturingConfigInfo
DesignDocs/ABIVersioning
DesignDocs/ExperimentalFeatures
DesignDocs/VisibilityMacros
DesignDocs/ThreadingSupportAPI
DesignDocs/FileTimeType

View File

@ -65,8 +65,6 @@ set(files
experimental/__config
experimental/__memory
experimental/algorithm
experimental/any
experimental/chrono
experimental/coroutine
experimental/deque
experimental/filesystem
@ -76,17 +74,11 @@ set(files
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

View File

@ -36,8 +36,14 @@
namespace chrono { namespace experimental { inline namespace fundamentals_v1 {
#define _LIBCPP_END_NAMESPACE_CHRONO_LFTS _LIBCPP_END_NAMESPACE_STD } } }
#if defined(_LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_FILESYSTEM)
# define _LIBCPP_DEPRECATED_EXPERIMENTAL_FILESYSTEM /* nothing */
#else
# define _LIBCPP_DEPRECATED_EXPERIMENTAL_FILESYSTEM __attribute__((deprecated("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
#define _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_FILESYSTEM \
_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL namespace filesystem { \
_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL namespace filesystem _LIBCPP_DEPRECATED_EXPERIMENTAL_FILESYSTEM { \
inline namespace v1 {
#define _LIBCPP_END_NAMESPACE_EXPERIMENTAL_FILESYSTEM \

View File

@ -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("<experimental/any> has been removed. Use <any> instead.")
#else
# warning "<experimental/any> has been removed. Use <any> instead."
#endif
#endif // _LIBCPP_EXPERIMENTAL_ANY

View File

@ -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("<experimental/chrono> has been removed. Use <chrono> instead.")
#else
# warning "<experimental/chrono> has been removed. Use <chrono> instead."
#endif
#endif // _LIBCPP_EXPERIMENTAL_CHRONO

View File

@ -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("<experimental/numeric> has been removed. Use <numeric> instead.")
#else
# warning "<experimental/numeric> has been removed. Use <numeric> instead."
#endif
#endif // _LIBCPP_EXPERIMENTAL_NUMERIC

View File

@ -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("<experimental/optional> has been removed. Use <optional> instead.")
#else
# warning "<experimental/optional> has been removed. Use <optional> instead."
#endif
#endif // _LIBCPP_EXPERIMENTAL_OPTIONAL

View File

@ -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("<experimental/ratio> has been removed. Use <ratio> instead.")
#else
# warning "<experimental/ratio> has been removed. Use <ratio> instead."
#endif
#endif // _LIBCPP_EXPERIMENTAL_RATIO

View File

@ -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("<experimental/string_view> has been removed. Use <string_view> instead.")
#else
# warning "<experimental/string_view> has been removed. Use <string_view> instead."
#endif
#endif // _LIBCPP_EXPERIMENTAL_STRING_VIEW

View File

@ -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("<experimental/system_error> has been removed. Use <system_error> instead.")
#else
# warning "<experimental/system_error> has been removed. Use <system_error> instead."
#endif
#endif // _LIBCPP_EXPERIMENTAL_SYSTEM_ERROR

View File

@ -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("<experimental/tuple> has been removed. Use <tuple> instead.")
#else
# warning "<experimental/tuple> has been removed. Use <tuple> instead."
#endif
#endif // _LIBCPP_EXPERIMENTAL_TUPLE

View File

@ -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
// <experimental/system_error>
#include <experimental/system_error>
// expected-error@experimental/system_error:* {{"<experimental/system_error> has been removed. Use <system_error> instead."}}
int main(int, char**) {
return 0;
}

View File

@ -1,24 +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
//
//===----------------------------------------------------------------------===//
// <experimental/system_error>
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-W#warnings"
#endif
#include <experimental/system_error>
#include "test_macros.h"
#ifndef _LIBCPP_VERSION
#error _LIBCPP_VERSION not defined
#endif
int main(int, char**) {
return 0;
}

View File

@ -0,0 +1,20 @@
//===----------------------------------------------------------------------===//
//
// 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
// UNSUPPORTED: c++98, c++03
// <experimental/filesystem>
#include <experimental/filesystem>
using namespace std::experimental::filesystem; // expected-error {{'filesystem' is deprecated: 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;
}

View File

@ -8,6 +8,8 @@
// <experimental/filesystem>
#define _LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_FILESYSTEM
#include <experimental/filesystem>
#include "test_macros.h"

View File

@ -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
// <experimental/numeric>
#include <experimental/numeric>
// expected-error@experimental/numeric:* {{"<experimental/numeric> has been removed. Use <numeric> instead."}}
int main(int, char**) {
return 0;
}

View File

@ -1,24 +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
//
//===----------------------------------------------------------------------===//
// <experimental/numeric>
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-W#warnings"
#endif
#include <experimental/numeric>
#include "test_macros.h"
#ifndef _LIBCPP_VERSION
#error _LIBCPP_VERSION not defined
#endif
int main(int, char**) {
return 0;
}

View File

@ -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
// <experimental/string_view>
#include <experimental/string_view>
// expected-error@experimental/string_view:* {{"<experimental/string_view> has been removed. Use <string_view> instead."}}
int main(int, char**) {
return 0;
}

View File

@ -1,24 +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
//
//===----------------------------------------------------------------------===//
// <experimental/string_view>
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-W#warnings"
#endif
#include <experimental/string_view>
#include "test_macros.h"
#ifndef _LIBCPP_VERSION
#error _LIBCPP_VERSION not defined
#endif
int main(int, char**) {
return 0;
}

View File

@ -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
// <experimental/any>
#include <experimental/any>
// expected-error@experimental/any:* {{"<experimental/any> has been removed. Use <any> instead."}}
int main(int, char**) {
return 0;
}

View File

@ -1,24 +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
//
//===----------------------------------------------------------------------===//
// <experimental/any>
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-W#warnings"
#endif
#include <experimental/any>
#include "test_macros.h"
#ifndef _LIBCPP_VERSION
#error _LIBCPP_VERSION not defined
#endif
int main(int, char**) {
return 0;
}

View File

@ -1,23 +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
//
//===----------------------------------------------------------------------===//
// <experimental/type_traits>
#include <experimental/type_traits>
#include "test_macros.h"
#ifndef _LIBCPP_VERSION
#error _LIBCPP_VERSION not defined
#endif
int main(int, char**)
{
return 0;
}

View File

@ -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
// <experimental/optional>
#include <experimental/optional>
// expected-error@experimental/optional:* {{"<experimental/optional> has been removed. Use <optional> instead."}}
int main(int, char**) {
return 0;
}

View File

@ -1,24 +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
//
//===----------------------------------------------------------------------===//
// <experimental/optional>
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-W#warnings"
#endif
#include <experimental/optional>
#include "test_macros.h"
#ifndef _LIBCPP_VERSION
#error _LIBCPP_VERSION not defined
#endif
int main(int, char**) {
return 0;
}

View File

@ -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
// <experimental/ratio>
#include <experimental/ratio>
// expected-error@experimental/ratio:* {{"<experimental/ratio> has been removed. Use <ratio> instead."}}
int main(int, char**) {
return 0;
}

View File

@ -1,24 +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
//
//===----------------------------------------------------------------------===//
// <experimental/ratio>
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-W#warnings"
#endif
#include <experimental/ratio>
#include "test_macros.h"
#ifndef _LIBCPP_VERSION
#error _LIBCPP_VERSION not defined
#endif
int main(int, char**) {
return 0;
}

View File

@ -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
// <experimental/chrono>
#include <experimental/chrono>
// expected-error@experimental/chrono:* {{"<experimental/chrono> has been removed. Use <chrono> instead."}}
int main(int, char**) {
return 0;
}

View File

@ -1,24 +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
//
//===----------------------------------------------------------------------===//
// <experimental/chrono>
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-W#warnings"
#endif
#include <experimental/chrono>
#include "test_macros.h"
#ifndef _LIBCPP_VERSION
#error _LIBCPP_VERSION not defined
#endif
int main(int, char**) {
return 0;
}

View File

@ -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
// <experimental/tuple>
#include <experimental/tuple>
// expected-error@experimental/tuple:* {{"<experimental/tuple> has been removed. Use <tuple> instead."}}
int main(int, char**) {
return 0;
}

View File

@ -1,24 +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
//
//===----------------------------------------------------------------------===//
// <experimental/tuple>
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-W#warnings"
#endif
#include <experimental/tuple>
#include "test_macros.h"
#ifndef _LIBCPP_VERSION
#error _LIBCPP_VERSION not defined
#endif
int main(int, char**) {
return 0;
}

View File

@ -1,23 +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
//
//===----------------------------------------------------------------------===//
// <experimental/utility>
#include <experimental/utility>
#include "test_macros.h"
#ifndef _LIBCPP_VERSION
#error _LIBCPP_VERSION not defined
#endif
int main(int, char**)
{
return 0;
}

View File

@ -0,0 +1 @@
config.test_format.cxx.compile_flags += ['-D_LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_FILESYSTEM']

View File

@ -1,137 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ -->
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>libc++ Technical Specification Status</title>
<link type="text/css" rel="stylesheet" href="menu.css">
<link type="text/css" rel="stylesheet" href="content.css">
</head>
<body>
<div id="menu">
<div>
<a href="https://llvm.org/">LLVM Home</a>
</div>
<div class="submenu">
<label>libc++ Info</label>
<a href="/index.html">About</a>
</div>
<div class="submenu">
<label>Quick Links</label>
<a href="https://lists.llvm.org/mailman/listinfo/cfe-dev">cfe-dev</a>
<a href="https://lists.llvm.org/mailman/listinfo/cfe-commits">cfe-commits</a>
<a href="https://bugs.llvm.org/">Bug Reports</a>
<a href="https://github.com/llvm/llvm-project/tree/master/libcxx/">Browse Sources</a>
</div>
</div>
<div id="content">
<p>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.</p>
<p>Adoption leaves library implementors with two implementations of a feature, one in namespace <tt>std</tt>, and the other in namespace <tt>std::experimental</tt>. 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.</p>
<p>As features are adopted into the main standard, we will implement them in namespace <tt>std</tt>, and then remove the versions in <tt>std::experimental</tt>. The removal will not happen immediately, because that would be unhelpful for users - giving them no chance to update their code.</p>
<p>The rule of thumb that libc++ will follow is: <b>one year</b>. <br/>One year after we ship an implementation of a feature in <tt>std</tt>, we will remove it from <tt>std::experimental</tt>.</p>
<p>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, <i>and</i> that were present in namespace <tt>std</tt> in the 5.0 release.</p>
<h2>Library Fundamentals TS <a href="https://wg21.link/N4480">V1</a> and <a href="https://wg21.link/N4617">V2</a></h2>
<p>Most (but not all) of the features of the LFTS were accepted into C++17.</p>
<table id="LFTS" border="1">
<tr><th>Section</th><th>Feature</th><th>shipped in<br/><tt>std</tt></th><th>To be removed from<br/><tt>std::experimental</tt></th><th>Notes</th></tr>
<tr><td>2.1</td><td>uses_allocator construction</td><td><center>5.0</center></td><td><center>7.0</center></td><td></td></tr>
<tr><td>3.1.2</td><td><tt>erased_type</tt></td><td></td><td><center>n/a</center></td><td><i>Not part of C++17</i></td></tr>
<tr><td>3.2.1</td><td><tt>tuple_size_v</tt></td><td><center>5.0</center></td><td><center>7.0</center></td><td><i>Removed</i></td></tr>
<tr><td>3.2.2</td><td><tt>apply</tt></td><td><center>5.0</center></td><td><center>7.0</center></td><td><i>Removed</i></td></tr>
<tr><td>3.3.1</td><td>All of the '_v' traits in &lt;type_traits&gt;</td><td><center>5.0</center></td><td><center>7.0</center></td><td><i>Removed</i></td></tr>
<tr><td>3.3.2</td><td><tt>invocation_type</tt> and <tt>raw_invocation_type</tt></td><td></td><td><center>n/a</center></td><td><I>Not part of C++17</I></td></tr>
<tr><td>3.3.3</td><td>Logical operator traits</td><td><center>5.0</center></td><td><center>7.0</center></td><td><i>Removed</i></td></tr>
<tr><td>3.3.3</td><td>Detection Idiom</td><td><center>5.0</center></td><td></td><td><I>Only partially in C++17</I></td></tr>
<tr><td>3.4.1</td><td>All of the '_v' traits in &lt;ratio&gt;</td><td><center>5.0</center></td><td><center>7.0</center></td><td><i>Removed</i></td></tr>
<tr><td>3.5.1</td><td>All of the '_v' traits in &lt;chrono&gt;</td><td><center>5.0</center></td><td><center>7.0</center></td><td><i>Removed</i></td></tr>
<tr><td>3.6.1</td><td>All of the '_v' traits in &lt;system_error&gt;</td><td><center>5.0</center></td><td><center>7.0</center></td><td><i>Removed</i></td></tr>
<tr><td>3.7</td><td><tt>propagate_const</tt></td><td></td><td><center>n/a</center></td><td><I>Not part of C++17</I></td></tr>
<tr><td>4.2</td><td>Enhancements to <tt>function</tt></td><td><center>Not yet</center></td><td></td><td></td></tr>
<tr><td>4.3</td><td>searchers</td><td><center>7.0</center></td><td><center>9.0</center></td><td></td></tr>
<tr><td>5</td><td><tt>optional</tt></td><td><center>5.0</center></td><td><center>7.0</center></td><td><i>Removed</i></td></tr>
<tr><td>6</td><td><tt>any</tt></td><td><center>5.0</center></td><td><center>7.0</center></td><td><i>Removed</i></td></tr>
<tr><td>7</td><td><tt>string_view</tt></td><td><center>5.0</center></td><td><center>7.0</center></td><td><i>Removed</i></td></tr>
<tr><td>8.2.1</td><td><tt>shared_ptr</tt> enhancements</td><td><center>Not yet</center></td><td><center>Never added</center></td><td></td></tr>
<tr><td>8.2.2</td><td><tt>weak_ptr</tt> enhancements</td><td><center>Not yet</center></td><td><center>Never added</center></td><td></td></tr>
<tr><td>8.5</td><td><tt>memory_resource</tt></td><td><center>Not yet</center></td><td></td><td></td></tr>
<tr><td>8.6</td><td><tt>polymorphic_allocator</tt></td><td><center>Not yet</center></td><td></td><td></td></tr>
<tr><td>8.7</td><td><tt>resource_adaptor</tt></tt></td><td><center></center></td><td><center>n/a</center></td><td><I>Not part of C++17</I></td></tr>
<tr><td>8.8</td><td>Access to program-wide <tt>memory_resource</tt> objects</td><td><center>Not yet</center></td><td></td><td></td></tr>
<tr><td>8.9</td><td>Pool resource classes</td><td><center>Not yet</center></td><td></td><td></td></tr>
<tr><td>8.10</td><td><tt>monotonic_buffer_resource</tt></td><td><center>Not yet</center></td><td></td><td></td></tr>
<tr><td>8.11</td><td>Alias templates using polymorphic memory resources</td><td><center>Not yet</center></td><td></td><td></td></tr>
<tr><td>8.12</td><td>Non-owning pointers</td><td></td><td><center>n/a</center></td><td><I>Not part of C++17</I></td></tr>
<tr><td>11.2</td><td><tt>promise</tt></td><td></td><td><center>n/a</center></td><td><I>Not part of C++17</I></td></tr>
<tr><td>11.3</td><td><tt>packaged_task</tt></td><td></td><td><center>n/a</center></td><td><I>Not part of C++17</I></td></tr>
<tr><td>12.2</td><td><tt>search</tt></td><td><center>7.0</center></td><td><center>9.0</center></td><td><I></I></td></tr>
<tr><td>12.3</td><td><tt>sample</tt></td><td><center>5.0</center></td><td><center>7.0</center></td><td><i>Removed</i></td></tr>
<tr><td>12.4</td><td><tt>shuffle</tt></td><td></td><td></td><td><I>Not part of C++17</I></td></tr>
<tr><td>13.1</td><td><tt>gcd</tt> and <tt>lcm</tt></td><td><center>5.0</center></td><td><center>7.0</center></td><td><i>Removed</i></td></tr>
<tr><td>13.2</td><td>Random number generation</td><td></td><td><td><I>Not part of C++17</I></td></tr>
<tr><td>14</td><td>Reflection Library</td><td></td><td><td><I>Not part of C++17</I></td></tr>
</table>
<h2><a href="https://wg21.link/N4100">FileSystem TS</a></h2>
<p>The FileSystem TS was accepted (in toto) for C++17.</p>
<p>The FileSystem TS implementation is still (as of v6.0) in namespace <tt>std::experimental</tt>.</p>
<h2>Parallelism TS <a href="https://wg21.link/N4507">V1</a> and <a href="https://wg21.link/N4706">V2</a></h2>
<p>Some (most) of the Parallelism TS was accepted for C++17.</p>
<p>We have not yet shipped an implementation of the Parallelism TS.</p>
<h2><a href="https://wg21.link/N4680">Coroutines TS</a></h2>
<p>The Coroutines TS is not yet part of a shipping standard.</p>
<p>We are shipping (as of v5.0) an implementation of the Coroutines TS in namespace <tt>std::experimental</tt>.</p>
<h2><a href="https://wg21.link/N4656">Networking TS</a></h2>
<p>The Networking TS is not yet part of a shipping standard.</p>
<p>We have not yet shipped an implementation of the Networking TS.</p>
<h2><a href="https://wg21.link/N4685">Ranges TS</a></h2>
<p>The Ranges TS is not yet part of a shipping standard.</p>
<p>We have not yet shipped an implementation of the Ranges TS.</p>
<h2><a href="https://wg21.link/N4641">Concepts TS</a></h2>
<p>The Concepts TS is not yet part of a shipping standard, but it has been adopted into the C++20 working draft.</p>
<p>We have not yet shipped an implementation of the Concepts TS.</p>
<h2><a href="https://wg21.link/P0159">Concurrency TS</a></h2>
<!-- The Concurrency TS was adopted in Kona (2015). -->
<p>None of the Concurrency TS was accepted for C++17.</p>
<p>We have not yet shipped an implementation of the Concurrency TS.</p>
<!--
><table id="Concurrency" border="1">
<tr><th>Section</th><th>Feature</th><th>shipped in <tt>std</tt></th><th>To be removed from <tt>std::experimental</tt></th><th>Notes</th></tr>
<tr><td>2.3</td><td>class template <tt>future</tt></td><td></td><td><td></td></tr>
<tr><td>2.4</td><td>class template <tt>shared_future</tt></td><td></td><td><td></td></tr>
<tr><td>2.5</td><td>class template <tt>promise</tt></td><td></td><td><td><center><I>Only using <tt>future</tt></I></center></td></tr>
<tr><td>2.6</td><td>class template <tt>packaged_task</tt></td><td></td><td><td><center><I>Only using <tt>future</tt></I></center></td></tr>
<tr><td>2.7</td><td>function template <tt>when_all</tt></td><td></td><td><td><center><I>Not part of C++17</I></center></td></tr>
<tr><td>2.8</td><td>class template <tt>when_any_result</tt></td><td></td><td><td><center><I>Not part of C++17</I></center></td></tr>
<tr><td>2.9</td><td>function template <tt>when_any</tt></td><td></td><td><td><center><I>Not part of C++17</I></center></td></tr>
<tr><td>2.10</td><td>function template <tt>make_ready_future</tt></td><td></td><td><td><center><I>Not part of C++17</I></center></td></tr>
<tr><td>2.11</td><td>function template <tt>make_exeptional_future</tt></td><td></td><td><td><center><I>Not part of C++17</I></center></td></tr>
<tr><td>3</td><td><tt>latches</tt> and <tt>barriers</tt></td><td></td><td><td><center><I>Not part of C++17</I></center></td></tr>
<tr><td>4</td><td>Atomic Smart Pointers</td><td></td><td><td><center><I>Adopted for C++20</I></center></td></tr>
-->
</table>
<hr/>
<p>Last Updated: 8-Feb-2018</p>
</div>
</body>
</html>

View File

@ -145,7 +145,7 @@
and the current status of these features can be found <a href="ts1z_status.html">here</a>.</p>
<p>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 <a href="TS_deprecation.html">here</a>.</p>
process is detailed <a href="DesignDocs/ExperimentalFeatures.html">here</a>.</p>
<!--======================================================================-->
<h2 id="buildbots">Build Bots</h2>