2019-06-14 Jonathan Wakely <jwakely@redhat.com>
+ * include/experimental/type_traits (experimental::nonesuch): Use
+ pragma to disable -Wctor-dtor-privacy warnings.
+ * include/std/type_traits (__is_convertible_helper<From, To, false>)
+ (__is_nt_convertible_helper<From, To, false>, __nonesuch): Likewise.
+
* include/std/version (__cpp_lib_bind_front): Add missing macro.
2019-06-12 Jonathan Wakely <jwakely@redhat.com>
template<typename...> using void_t = void;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
struct __nonesuchbase {};
struct nonesuch : private __nonesuchbase
{
nonesuch(nonesuch const&) = delete;
void operator=(nonesuch const&) = delete;
};
+#pragma GCC diagnostic pop
template<template<typename...> class _Op, typename... _Args>
using is_detected
typedef typename is_void<_To>::type type;
};
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
template<typename _From, typename _To>
class __is_convertible_helper<_From, _To, false>
{
public:
typedef decltype(__test<_From, _To>(0)) type;
};
-
+#pragma GCC diagnostic pop
/// is_convertible
template<typename _From, typename _To>
: is_void<_To>
{ };
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
template<typename _From, typename _To>
class __is_nt_convertible_helper<_From, _To, false>
{
public:
using type = decltype(__test<_From, _To>(0));
};
+#pragma GCC diagnostic pop
// is_nothrow_convertible for C++11
template<typename _From, typename _To>
__call_is_nothrow_<_Fn, _Args...>>::type
{ };
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
struct __nonesuchbase {};
struct __nonesuch : private __nonesuchbase {
~__nonesuch() = delete;
__nonesuch(__nonesuch const&) = delete;
void operator=(__nonesuch const&) = delete;
};
+#pragma GCC diagnostic pop
#if __cplusplus >= 201703L
# define __cpp_lib_is_invocable 201703