PR libstdc++/88338 Implement P0898R3, C++20 concepts library
The implementation is already complete but this updates the docs and adds tests for the feature test macro. * doc/xml/manual/status_cxx2020.xml: Update status. * doc/html/*: Regenerate. * testsuite/std/concepts/1.cc: New test. * testsuite/std/concepts/2.cc: New test. From-SVN: r277371
This commit is contained in:
parent
bbf0495dd2
commit
02819d3919
@ -1,5 +1,11 @@
|
||||
2019-10-24 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
PR libstdc++/88338 Implement P0898R3, C++20 concepts library
|
||||
* doc/xml/manual/status_cxx2020.xml: Update status.
|
||||
* doc/html/*: Regenerate.
|
||||
* testsuite/std/concepts/1.cc: New test.
|
||||
* testsuite/std/concepts/2.cc: New test.
|
||||
|
||||
* include/bits/random.h (uniform_random_bit_generator): Define for
|
||||
C++20.
|
||||
* testsuite/26_numerics/random/concept.cc: New test.
|
||||
|
@ -1214,11 +1214,11 @@ Feature-testing recommendations for C++</a>.
|
||||
<a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0892r2.html" target="_top">
|
||||
P0892R2
|
||||
</a>
|
||||
</td><td align="center"> Note 1 </td><td align="left"> </td></tr><tr bgcolor="#C8B0B0"><td align="left"> Standard Library Concepts </td><td align="left">
|
||||
</td><td align="center"> Note 1 </td><td align="left"> </td></tr><tr><td align="left"> Standard Library Concepts </td><td align="left">
|
||||
<a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0898r3.pdf" target="_top">
|
||||
P0898R3
|
||||
</a>
|
||||
</td><td align="center"> </td><td align="left"> </td></tr><tr><td align="left"> Eradicating unnecessarily explicit default constructors from the standard library </td><td align="left">
|
||||
</td><td align="center"> 10.1 </td><td align="left"> <code class="code">__cpp_lib_concepts >= 201806L</code> </td></tr><tr><td align="left"> Eradicating unnecessarily explicit default constructors from the standard library </td><td align="left">
|
||||
<a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0935r0.html" target="_top">
|
||||
P0935R0
|
||||
</a>
|
||||
|
@ -535,15 +535,14 @@ Feature-testing recommendations for C++</link>.
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<?dbhtml bgcolor="#C8B0B0" ?>
|
||||
<entry> Standard Library Concepts </entry>
|
||||
<entry>
|
||||
<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0898r3.pdf">
|
||||
P0898R3
|
||||
</link>
|
||||
</entry>
|
||||
<entry align="center"> </entry>
|
||||
<entry />
|
||||
<entry align="center"> 10.1 </entry>
|
||||
<entry> <code>__cpp_lib_concepts >= 201806L</code> </entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
|
27
libstdc++-v3/testsuite/std/concepts/1.cc
Normal file
27
libstdc++-v3/testsuite/std/concepts/1.cc
Normal file
@ -0,0 +1,27 @@
|
||||
// Copyright (C) 2019 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU General Public License as published by the
|
||||
// Free Software Foundation; either version 3, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License along
|
||||
// with this library; see the file COPYING3. If not see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-options "-std=gnu++2a" }
|
||||
// { dg-do preprocess { target c++2a } }
|
||||
|
||||
#include <concepts>
|
||||
|
||||
#ifndef __cpp_lib_concepts
|
||||
# error "Feature test macro for concepts is missing in <concepts>"
|
||||
#elif __cpp_lib_concepts < 201806L
|
||||
# error "Feature test macro for concepts has wrong value in <concepts>"
|
||||
#endif
|
27
libstdc++-v3/testsuite/std/concepts/2.cc
Normal file
27
libstdc++-v3/testsuite/std/concepts/2.cc
Normal file
@ -0,0 +1,27 @@
|
||||
// Copyright (C) 2019 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU General Public License as published by the
|
||||
// Free Software Foundation; either version 3, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License along
|
||||
// with this library; see the file COPYING3. If not see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-options "-std=gnu++2a" }
|
||||
// { dg-do preprocess { target c++2a } }
|
||||
|
||||
#include <version>
|
||||
|
||||
#ifndef __cpp_lib_concepts
|
||||
# error "Feature test macro for concepts is missing in <version>"
|
||||
#elif __cpp_lib_concepts < 201806L
|
||||
# error "Feature test macro for concepts has wrong value in <version>"
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user