Skip to content

Commit c74059c

Browse files
philnik777tstellar
authored andcommitted
[libc++] Implement P1004R2 (constexpr std::vector)
Reviewed By: #libc, ldionne Spies: mgorny, var-const, ormris, philnik, miscco, hiraditya, steven_wu, jkorous, ldionne, christof, libcxx-commits Differential Revision: https://reviews.llvm.org/D68365 (cherry picked from commit 98d3d5b)
1 parent 2647f72 commit c74059c

File tree

122 files changed

+1817
-736
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+1817
-736
lines changed

libcxx/docs/ReleaseNotes.rst

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ almost complete. The ``ranges`` library is considered experimental.
5050
Implemented Papers
5151
------------------
5252

53+
- P1004R2 - Making ``std::vector`` constexpr
5354
- P0627R6 - Function to mark unreachable code
5455
- P1165R1 - Make stateful allocator propagation more consistent for ``operator+(basic_string)``
5556
- P0674R1 - Support arrays in ``make_shared`` and ``allocate_shared``

libcxx/docs/Status/Cxx20Papers.csv

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
"`P0660R10 <https://wg21.link/P0660R10>`__","LWG","Stop Token and Joining Thread, Rev 10","Cologne","",""
108108
"`P0784R7 <https://wg21.link/P0784R7>`__","CWG","More constexpr containers","Cologne","|Complete|","12.0"
109109
"`P0980R1 <https://wg21.link/P0980R1>`__","LWG","Making std::string constexpr","Cologne","|Complete|","15.0"
110-
"`P1004R2 <https://wg21.link/P1004R2>`__","LWG","Making std::vector constexpr","Cologne","",""
110+
"`P1004R2 <https://wg21.link/P1004R2>`__","LWG","Making std::vector constexpr","Cologne","|Complete|","15.0"
111111
"`P1035R7 <https://wg21.link/P1035R7>`__","LWG","Input Range Adaptors","Cologne","",""
112112
"`P1065R2 <https://wg21.link/P1065R2>`__","LWG","Constexpr INVOKE","Cologne","|Complete|","12.0"
113113
"`P1135R6 <https://wg21.link/P1135R6>`__","LWG","The C++20 Synchronization Library","Cologne","|Complete|","11.0"

libcxx/include/__algorithm/fill.h

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
_LIBCPP_BEGIN_NAMESPACE_STD
2222

23+
// fill isn't specialized for std::memset, because the compiler already optimizes the loop to a call to std::memset.
24+
2325
template <class _ForwardIterator, class _Tp>
2426
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
2527
void

libcxx/include/__algorithm/fill_n.h

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
_LIBCPP_BEGIN_NAMESPACE_STD
2121

22+
// fill_n isn't specialized for std::memset, because the compiler already optimizes the loop to a call to std::memset.
23+
2224
template <class _OutputIterator, class _Size, class _Tp>
2325
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
2426
_OutputIterator

0 commit comments

Comments
 (0)