gcc/libstdc++-v3/include/std
Ville Voutilainen b42cc3ca24 Implement new C++ intrinsics __is_assignable and __is_constructible.
c-family/

Implement new C++ intrinsics __is_assignable and __is_constructible.
* c-common.c (__is_assignable, __is_constructible): New.
* c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.

cp/

PR c++/80654
PR c++/80682
Implement new C++ intrinsics __is_assignable and __is_constructible.
* cp-tree.h (CPTK_IS_ASSIGNABLE, CPTK_IS_CONSTRUCTIBLE): New.
(is_xible): New.
* cxx-pretty-print.c (pp_cxx_trait_expression): Handle
CPTK_IS_ASSIGNABLE and CPTK_IS_CONSTRUCTIBLE.
* method.c (constructible_expr): Set cp_unevaluated.
(is_xible_helper): New.
(is_trivially_xible): Adjust.
(is_xible): New.
* parser.c (cp_parser_primary_expression): Handle
RID_IS_ASSIGNABLE and RID_IS_CONSTRUCTIBLE.
(cp_parser_trait_expr): Likewise.
* semantics.c (trait_expr_value): Handle
CPTK_IS_ASSIGNABLE and CPTK_IS_CONSTRUCTIBLE.

testsuite/

* g++.dg/ext/80654.C: New.

libstdc++-v3/

Implement new C++ intrinsics __is_assignable and __is_constructible.
* include/std/type_traits (__do_is_static_castable_impl): Remove.
(__is_static_castable_impl, __is_static_castable_safe): Likewise.
(__is_static_castable, __do_is_direct_constructible_impl): Likewise.
(__is_direct_constructible_impl): Likewise.
(__is_direct_constructible_new_safe): Likewise.
(__is_base_to_derived_ref, __is_lvalue_to_rvalue_ref): Likewise.
(__is_direct_constructible_ref_cast): Likewise.
(__is_direct_constructible_new, __is_direct_constructible): Likewise.
(__do_is_nary_constructible_impl): Likewise.
(__is_nary_constructible_impl, __is_nary_constructible): Likewise.
(__is_constructible_impl): Likewise.
(is_constructible): Call the intrinsic.
(__is_assignable_helper): Remove.
(is_assignable): Call the intrinsic.
(is_trivially_constructible): Likewise.
(__is_trivially_copy_constructible_impl): New.
(is_trivially_copy_constructible): Use it.
(__is_trivially_move_constructible_impl): New.
(is_trivially_move_constructible): Use it.
(is_trivially_assignable): Call the intrinsic.
(__is_trivially_copy_assignable_impl): New.
(is_trivially_copy_assignable): Use it.
(__is_trivially_move_assignable_impl): New.
(is_trivially_move_assignable): Use it.
(testsuite/20_util/declval/requirements/1_neg.cc): Adjust.
(testsuite/20_util/is_trivially_copy_assignable/value.cc):
Add test for void.
(testsuite/20_util/is_trivially_copy_constructible/value.cc): Likewise.
(testsuite/20_util/is_trivially_move_assignable/value.cc): Likewise.
(testsuite/20_util/is_trivially_move_constructible/value.cc): Likewise.
(testsuite/20_util/make_signed/requirements/typedefs_neg.cc): Adjust.
(testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc):
Likewise.

From-SVN: r248153
2017-05-17 16:54:23 +03:00
..
algorithm Update copyright years. 2017-01-01 13:07:43 +01:00
any Implement LWG 2857, {variant,optional,any}::emplace should return the constructed value. 2017-03-16 01:13:20 +02:00
array Add deduction guides for C++17 (P0433R2, partial) 2017-03-22 15:58:35 +00:00
atomic PR79862 check macro for type aliases that depend on <stdint.h> 2017-04-20 14:04:28 +01:00
bitset Update copyright years. 2017-01-01 13:07:43 +01:00
chrono Implement P0607R0 "Inline Variables for Standard Library" for C++17 2017-03-23 19:40:07 +00:00
codecvt Update copyright years. 2017-01-01 13:07:43 +01:00
complex PR libstdc++/70607 make proj(T) and conj(T) return complex<T> 2017-01-25 15:01:05 +00:00
condition_variable Update copyright years. 2017-01-01 13:07:43 +01:00
deque Update copyright years. 2017-01-01 13:07:43 +01:00
forward_list Update copyright years. 2017-01-01 13:07:43 +01:00
fstream Update copyright years. 2017-01-01 13:07:43 +01:00
functional Fix incorrect results from std::boyer_moore_searcher 2017-04-18 12:08:00 +01:00
future PR libstdc++/80316 make promise::set_value throw no_state error 2017-04-21 15:49:19 +01:00
iomanip Update copyright years. 2017-01-01 13:07:43 +01:00
ios Update copyright years. 2017-01-01 13:07:43 +01:00
iosfwd Update copyright years. 2017-01-01 13:07:43 +01:00
iostream Update copyright years. 2017-01-01 13:07:43 +01:00
istream Update copyright years. 2017-01-01 13:07:43 +01:00
iterator Update copyright years. 2017-01-01 13:07:43 +01:00
limits Update copyright years. 2017-01-01 13:07:43 +01:00
list Update copyright years. 2017-01-01 13:07:43 +01:00
locale Update copyright years. 2017-01-01 13:07:43 +01:00
map Update copyright years. 2017-01-01 13:07:43 +01:00
memory PR libstdc++/79789 fix non-reserved names in headers 2017-03-02 03:43:49 +00:00
mutex Add std::scoped_lock for C++17 2017-03-05 18:38:35 +00:00
numeric Update copyright years. 2017-01-01 13:07:43 +01:00
optional optional (_Optional_base::_M_get): Check precondition. 2017-05-16 12:54:16 +00:00
ostream Update copyright years. 2017-01-01 13:07:43 +01:00
queue Update copyright years. 2017-01-01 13:07:43 +01:00
random Update copyright years. 2017-01-01 13:07:43 +01:00
ratio Implement P0607R0 "Inline Variables for Standard Library" for C++17 2017-03-23 19:40:07 +00:00
regex Update copyright years. 2017-01-01 13:07:43 +01:00
scoped_allocator Update copyright years. 2017-01-01 13:07:43 +01:00
set Update copyright years. 2017-01-01 13:07:43 +01:00
shared_mutex Update copyright years. 2017-01-01 13:07:43 +01:00
sstream Update copyright years. 2017-01-01 13:07:43 +01:00
stack Update copyright years. 2017-01-01 13:07:43 +01:00
stdexcept Update copyright years. 2017-01-01 13:07:43 +01:00
streambuf Update copyright years. 2017-01-01 13:07:43 +01:00
string Update copyright years. 2017-01-01 13:07:43 +01:00
string_view Fix namespace versioning and remove __detail::__identity helpers 2017-01-26 18:32:55 +00:00
system_error Implement LWG 2686, std::hash<error_condition>, for C++17 2017-03-23 19:40:16 +00:00
thread Add deleted std::thread(const thread&&) constructor 2017-01-03 13:31:26 +00:00
tuple Implement P0607R0 "Inline Variables for Standard Library" for C++17 2017-03-23 19:40:07 +00:00
type_traits Implement new C++ intrinsics __is_assignable and __is_constructible. 2017-05-17 16:54:23 +03:00
typeindex Update copyright years. 2017-01-01 13:07:43 +01:00
unordered_map Update copyright years. 2017-01-01 13:07:43 +01:00
unordered_set Update copyright years. 2017-01-01 13:07:43 +01:00
utility PR libstdc++/78939 make tuple_size<cv T> depend on tuple_size<T> 2017-05-12 15:43:11 +01:00
valarray Add deduction guides for C++17 (P0433R2, partial) 2017-03-22 15:58:35 +00:00
variant Bump version namespace. 2017-05-10 20:40:28 +00:00
vector Update copyright years. 2017-01-01 13:07:43 +01:00