Skip to content

Commit 4211451

Browse files
committed
[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 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@363072 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent dbcfe75 commit 4211451

36 files changed

+238
-697
lines changed

docs/DesignDocs/ExperimentalFeatures.rst

Lines changed: 203 additions & 0 deletions
Large diffs are not rendered by default.

docs/UsingLibcxx.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ page.
8484
* The contents of the ``<experimental/...>`` headers and ``libc++experimental.a``
8585
library will not remain compatible between versions.
8686
* No guarantees of API or ABI stability are provided.
87+
* When we implement the standardized version of an experimental feature,
88+
the experimental feature is removed two releases after the non-experimental
89+
version has shipped. The full policy is explained :ref:`here <experimental features>`.
8790

8891
Using libc++ on Linux
8992
=====================

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ Design Documents
137137
DesignDocs/DebugMode
138138
DesignDocs/CapturingConfigInfo
139139
DesignDocs/ABIVersioning
140+
DesignDocs/ExperimentalFeatures
140141
DesignDocs/VisibilityMacros
141142
DesignDocs/ThreadingSupportAPI
142143
DesignDocs/FileTimeType

include/CMakeLists.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ set(files
6565
experimental/__config
6666
experimental/__memory
6767
experimental/algorithm
68-
experimental/any
69-
experimental/chrono
7068
experimental/coroutine
7169
experimental/deque
7270
experimental/filesystem
@@ -76,17 +74,11 @@ set(files
7674
experimental/list
7775
experimental/map
7876
experimental/memory_resource
79-
experimental/numeric
80-
experimental/optional
8177
experimental/propagate_const
82-
experimental/ratio
8378
experimental/regex
8479
experimental/set
8580
experimental/simd
8681
experimental/string
87-
experimental/string_view
88-
experimental/system_error
89-
experimental/tuple
9082
experimental/type_traits
9183
experimental/unordered_map
9284
experimental/unordered_set

include/experimental/__config

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,14 @@
3636
namespace chrono { namespace experimental { inline namespace fundamentals_v1 {
3737
#define _LIBCPP_END_NAMESPACE_CHRONO_LFTS _LIBCPP_END_NAMESPACE_STD } } }
3838

39+
#if defined(_LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_FILESYSTEM)
40+
# define _LIBCPP_DEPRECATED_EXPERIMENTAL_FILESYSTEM /* nothing */
41+
#else
42+
# 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.")))
43+
#endif
44+
3945
#define _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_FILESYSTEM \
40-
_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL namespace filesystem { \
46+
_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL namespace filesystem _LIBCPP_DEPRECATED_EXPERIMENTAL_FILESYSTEM { \
4147
inline namespace v1 {
4248

4349
#define _LIBCPP_END_NAMESPACE_EXPERIMENTAL_FILESYSTEM \

include/experimental/any

Lines changed: 0 additions & 20 deletions
This file was deleted.

include/experimental/chrono

Lines changed: 0 additions & 20 deletions
This file was deleted.

include/experimental/numeric

Lines changed: 0 additions & 20 deletions
This file was deleted.

include/experimental/optional

Lines changed: 0 additions & 20 deletions
This file was deleted.

include/experimental/ratio

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)