// { dg-do compile { target c++11 } } // LWG 4324. unique_ptr::operator* is not SFINAE-friendly #include template struct nothrow_dereference : std::false_type { }; template struct nothrow_dereference())> : std::true_type { }; static_assert( nothrow_dereference>::value, ""); static_assert( ! nothrow_dereference>::value, ""); #if __cplusplus >= 202002L // C++20 template concept dereferenceable = requires(T& t) { *t; }; static_assert( dereferenceable>); static_assert(!dereferenceable>); #endif