PR libstdc++/83830
* include/std/type_traits (has_unique_object_representations_v): Add
variable template.
* testsuite/20_util/has_unique_object_representations/value.cc: Check
variable template.
From-SVN: r256701
+2018-01-15 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/83830
+ * include/std/type_traits (has_unique_object_representations_v): Add
+ variable template.
+ * testsuite/20_util/has_unique_object_representations/value.cc: Check
+ variable template.
+
2018-01-15 Ville Voutilainen <ville.voutilainen@gmail.com>
Make optional conditionally
remove_cv_t<remove_all_extents_t<_Tp>>
)>
{ };
+
+ template<typename _Tp>
+ inline constexpr bool has_unique_object_representations_v
+ = has_unique_object_representations<_Tp>::value;
#endif
#undef _GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP
static_assert(test_category<has_unique_object_representations,
Aligned[][1]>(false), "");
}
+
+void
+test02()
+{
+ using std::has_unique_object_representations;
+ using std::has_unique_object_representations_v;
+
+ static_assert(has_unique_object_representations_v<int>
+ == has_unique_object_representations<int>::value);
+ static_assert(has_unique_object_representations_v<void>
+ == has_unique_object_representations<void>::value);
+ static_assert(has_unique_object_representations_v<float>
+ == has_unique_object_representations<float>::value);
+}