1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-12 09:58:36 +00:00
freebsd/contrib/libc++/include
Dimitry Andric 687571a78b Pull in r321963 from upstream libc++ trunk (by me):
Add pre-C++11 is_constructible wrappers for 3 arguments

  Summary:
  After rL319736 for D28253 (which fixes PR28929), gcc cannot compile
  <memory> anymore in pre-C+11 modes, complaining:

  In file included from /usr/include/c++/v1/memory:648:0,
                   from test.cpp:1:
  /usr/include/c++/v1/memory: In static member function 'static std::__1::shared_ptr<_Tp> std::__1::shared_ptr<_Tp>::make_shared(_A0&, _A1&, _A2&)':
  /usr/include/c++/v1/memory:4365:5: error: wrong number of template arguments (4, should be at least 1)
       static_assert((is_constructible<_Tp, _A0, _A1, _A2>::value), "Can't construct object in make_shared" );
       ^
  In file included from /usr/include/c++/v1/memory:649:0,
                   from test.cpp:1:
  /usr/include/c++/v1/type_traits:3198:29: note: provided for 'template<class _Tp, class _A0, class _A1> struct std::__1::is_constructible'
   struct _LIBCPP_TEMPLATE_VIS is_constructible
                               ^~~~~~~~~~~~~~~~
  In file included from /usr/include/c++/v1/memory:648:0,
                   from test.cpp:1:
  /usr/include/c++/v1/memory:4365:5: error: template argument 1 is invalid
       static_assert((is_constructible<_Tp, _A0, _A1, _A2>::value), "Can't construct object in make_shared" );
       ^
  /usr/include/c++/v1/memory: In static member function 'static std::__1::shared_ptr<_Tp> std::__1::shared_ptr<_Tp>::allocate_shared(const _Alloc&, _A0&, _A1&, _A2&)':
  /usr/include/c++/v1/memory:4444:5: error: wrong number of template arguments (4, should be at least 1)
       static_assert((is_constructible<_Tp, _A0, _A1, _A2>::value), "Can't construct object in allocate_shared" );
       ^
  In file included from /usr/include/c++/v1/memory:649:0,
                   from test.cpp:1:
  /usr/include/c++/v1/type_traits:3198:29: note: provided for 'template<class _Tp, class _A0, class _A1> struct std::__1::is_constructible'
   struct _LIBCPP_TEMPLATE_VIS is_constructible
                               ^~~~~~~~~~~~~~~~
  In file included from /usr/include/c++/v1/memory:648:0,
                   from test.cpp:1:
  /usr/include/c++/v1/memory:4444:5: error: template argument 1 is invalid
       static_assert((is_constructible<_Tp, _A0, _A1, _A2>::value), "Can't construct object in allocate_shared" );
       ^

  This is also reported in https://bugs.freebsd.org/224946 (FreeBSD is
  apparently one of the very few projects that regularly builds
  programs against libc++ with gcc).

  The reason is that the static assertions are invoking
  is_constructible with three arguments, while gcc does not have the
  built-in is_constructible feature, and the pre-C++11 is_constructible
  wrappers in <type_traits> only provide up to two arguments.

  I have added additional wrappers for three arguments, modified the
  is_constructible entry point to take three arguments instead, and
  added a simple test to is_constructible.pass.cpp.

  Reviewers: EricWF, mclow.lists

  Reviewed By: EricWF

  Subscribers: krytarowski, cfe-commits, emaste

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

This should allow gcc to compile the libc++ 6.0.0 <memory> header
without problems, in pre-C++11 mode.

Reported by:    jbeich
PR:             224946
2018-01-07 18:33:19 +00:00
..
experimental Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
ext Merge llvm, clang, lld, lldb, compiler-rt and libc++ r303197, and update 2017-05-16 21:50:29 +00:00
__bit_reference Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304460, and update 2017-06-01 22:47:02 +00:00
__bsd_locale_defaults.h Upgrade our copies of clang, llvm and libc++ to r310316 from the 2017-08-09 17:32:39 +00:00
__bsd_locale_fallbacks.h Upgrade our copies of clang, llvm and libc++ to r310316 from the 2017-08-09 17:32:39 +00:00
__config Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_60 r321788, 2018-01-06 23:44:14 +00:00
__debug Merge libc++ trunk r300890, and update build glue. 2017-04-22 18:59:50 +00:00
__functional_03 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r305575, and update 2017-06-17 00:09:34 +00:00
__functional_base Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_60 r321788, 2018-01-06 23:44:14 +00:00
__functional_base_03 Update libc++ to 3.8.0. Excerpted list of fixes (with upstream revision 2016-05-26 18:52:49 +00:00
__hash_table Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304659, and update 2017-06-03 18:18:34 +00:00
__libcpp_version Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
__locale Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
__mutex_base Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_60 r321788, 2018-01-06 23:44:14 +00:00
__nullptr Merge libc++ r291274, and update the library Makefile. 2017-01-08 19:39:03 +00:00
__split_buffer Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304460, and update 2017-06-01 22:47:02 +00:00
__sso_allocator Merge libc++ trunk r291476, update Makefile, ObsoleteFiles.inc and 2017-01-09 22:41:53 +00:00
__std_stream Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304460, and update 2017-06-01 22:47:02 +00:00
__string Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304460, and update 2017-06-01 22:47:02 +00:00
__threading_support Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304460, and update 2017-06-01 22:47:02 +00:00
__tree Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
__tuple Merge libc++ trunk r300890, and update build glue. 2017-04-22 18:59:50 +00:00
__undef_macros Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304460, and update 2017-06-01 22:47:02 +00:00
algorithm Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
any Merge libc++ trunk r300890, and update build glue. 2017-04-22 18:59:50 +00:00
array Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
atomic Merge llvm, clang, lld, lldb, compiler-rt and libc++ r301441, and update 2017-04-26 22:33:09 +00:00
bitset Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
cassert
ccomplex
cctype Update libc++ to release_39 branch r279689. 2016-08-30 18:27:31 +00:00
cerrno Update libc++ to 3.8.0. Excerpted list of fixes (with upstream revision 2016-05-26 18:52:49 +00:00
cfenv Update libc++ to 3.8.0. Excerpted list of fixes (with upstream revision 2016-05-26 18:52:49 +00:00
cfloat Update libc++ to 3.8.0. Excerpted list of fixes (with upstream revision 2016-05-26 18:52:49 +00:00
chrono Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_60 r321788, 2018-01-06 23:44:14 +00:00
cinttypes Update libc++ to 3.8.0. Excerpted list of fixes (with upstream revision 2016-05-26 18:52:49 +00:00
ciso646
climits
clocale Update libc++ to 3.7.0 release. 2015-09-16 22:26:52 +00:00
cmath Merge llvm, clang, lld, lldb, compiler-rt and libc++ r307894, and update 2017-07-13 21:58:45 +00:00
codecvt Merge libc++ r291274, and update the library Makefile. 2017-01-08 19:39:03 +00:00
complex Merge llvm, clang, lld, lldb, compiler-rt and libc++ r307894, and update 2017-07-13 21:58:45 +00:00
complex.h Update libc++ to 3.8.0. Excerpted list of fixes (with upstream revision 2016-05-26 18:52:49 +00:00
condition_variable Merge libc++ trunk r300890, and update build glue. 2017-04-22 18:59:50 +00:00
csetjmp Update libc++ to 3.8.0. Excerpted list of fixes (with upstream revision 2016-05-26 18:52:49 +00:00
csignal
cstdarg
cstdbool
cstddef Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
cstdint
cstdio Merge libc++ trunk r300890, and update build glue. 2017-04-22 18:59:50 +00:00
cstdlib Merge libc++ trunk r300890, and update build glue. 2017-04-22 18:59:50 +00:00
cstring Update libc++ to release_39 branch r279689. 2016-08-30 18:27:31 +00:00
ctgmath
ctime Update libc++ to 3.7.0 release. 2015-09-16 22:26:52 +00:00
ctype.h Merge llvm, clang, lld, lldb, compiler-rt and libc++ r303197, and update 2017-05-16 21:50:29 +00:00
cwchar Merge libc++ r291274, and update the library Makefile. 2017-01-08 19:39:03 +00:00
cwctype Update libc++ to 3.8.0. Excerpted list of fixes (with upstream revision 2016-05-26 18:52:49 +00:00
deque Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
errno.h Update libc++ to 3.8.0. Excerpted list of fixes (with upstream revision 2016-05-26 18:52:49 +00:00
exception Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
float.h Update libc++ to 3.8.0. Excerpted list of fixes (with upstream revision 2016-05-26 18:52:49 +00:00
forward_list Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
fstream Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
functional Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_60 r321788, 2018-01-06 23:44:14 +00:00
future Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
initializer_list Merge libc++ trunk r300890, and update build glue. 2017-04-22 18:59:50 +00:00
inttypes.h Merge libc++ r291274, and update the library Makefile. 2017-01-08 19:39:03 +00:00
iomanip Merge libc++ r291274, and update the library Makefile. 2017-01-08 19:39:03 +00:00
ios Merge libc++ trunk r300890, and update build glue. 2017-04-22 18:59:50 +00:00
iosfwd Merge libc++ r291274, and update the library Makefile. 2017-01-08 19:39:03 +00:00
iostream Update libc++ to 3.7.0 release. 2015-09-16 22:26:52 +00:00
istream Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
iterator Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
limits Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304460, and update 2017-06-01 22:47:02 +00:00
limits.h Merge libc++ r291274, and update the library Makefile. 2017-01-08 19:39:03 +00:00
list Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
locale Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
locale.h Merge libc++ r291274, and update the library Makefile. 2017-01-08 19:39:03 +00:00
map Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
math.h Merge llvm, clang, lld, lldb, compiler-rt and libc++ r301441, and update 2017-04-26 22:33:09 +00:00
memory Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_60 r321788, 2018-01-06 23:44:14 +00:00
module.modulemap Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304460, and update 2017-06-01 22:47:02 +00:00
mutex Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_60 r321788, 2018-01-06 23:44:14 +00:00
new Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
numeric Merge llvm, clang, lld, lldb, compiler-rt and libc++ r306325, and update 2017-06-27 06:40:39 +00:00
optional Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_60 r321788, 2018-01-06 23:44:14 +00:00
ostream Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
queue Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
random Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
ratio Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_60 r321788, 2018-01-06 23:44:14 +00:00
regex Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
scoped_allocator Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
set Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
setjmp.h Update libc++ to 3.8.0. Excerpted list of fixes (with upstream revision 2016-05-26 18:52:49 +00:00
shared_mutex Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304460, and update 2017-06-01 22:47:02 +00:00
sstream Merge libc++ trunk r321414 to contrib/libc++. 2017-12-24 01:16:28 +00:00
stack Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
stdbool.h Update libc++ to release_39 branch r279689. 2016-08-30 18:27:31 +00:00
stddef.h Merge libc++ trunk r300890, and update build glue. 2017-04-22 18:59:50 +00:00
stdexcept Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304460, and update 2017-06-01 22:47:02 +00:00
stdint.h Merge libc++ r291274, and update the library Makefile. 2017-01-08 19:39:03 +00:00
stdio.h Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304460, and update 2017-06-01 22:47:02 +00:00
stdlib.h Merge llvm, clang, lld, lldb, compiler-rt and libc++ r303197, and update 2017-05-16 21:50:29 +00:00
streambuf Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
string Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
string_view Merge libc++ trunk r321414 to contrib/libc++. 2017-12-24 01:16:28 +00:00
string.h Update libc++ to release_39 branch r279689. 2016-08-30 18:27:31 +00:00
strstream Merge libc++ trunk r300890, and update build glue. 2017-04-22 18:59:50 +00:00
system_error Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_60 r321788, 2018-01-06 23:44:14 +00:00
tgmath.h
thread Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304460, and update 2017-06-01 22:47:02 +00:00
tuple Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_60 r321788, 2018-01-06 23:44:14 +00:00
type_traits Pull in r321963 from upstream libc++ trunk (by me): 2018-01-07 18:33:19 +00:00
typeindex Merge libc++ r291274, and update the library Makefile. 2017-01-08 19:39:03 +00:00
typeinfo Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
unordered_map Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
unordered_set Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
utility Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_60 r321788, 2018-01-06 23:44:14 +00:00
valarray Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304460, and update 2017-06-01 22:47:02 +00:00
variant Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_60 r321788, 2018-01-06 23:44:14 +00:00
vector Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
wchar.h Merge libc++ trunk r321017 to contrib/libc++. 2017-12-20 19:16:11 +00:00
wctype.h Update libc++ to 3.8.0. Excerpted list of fixes (with upstream revision 2016-05-26 18:52:49 +00:00