Fix rvalue bug in __has_operator_addressof
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@221398 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -41,9 +41,19 @@ struct E
|
||||
};
|
||||
|
||||
struct F {};
|
||||
|
||||
constexpr F* operator&(F const &) { return nullptr; }
|
||||
|
||||
struct G {};
|
||||
constexpr G* operator&(G &&) { return nullptr; }
|
||||
|
||||
struct H {};
|
||||
constexpr H* operator&(H const &&) { return nullptr; }
|
||||
|
||||
struct J
|
||||
{
|
||||
constexpr J* operator&() &&;
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_CONSTEXPR
|
||||
|
||||
int main()
|
||||
@@ -54,5 +64,8 @@ int main()
|
||||
static_assert(std::__has_operator_addressof<B>::value == true, "");
|
||||
static_assert(std::__has_operator_addressof<E>::value == true, "");
|
||||
static_assert(std::__has_operator_addressof<F>::value == true, "");
|
||||
static_assert(std::__has_operator_addressof<G>::value == true, "");
|
||||
static_assert(std::__has_operator_addressof<H>::value == true, "");
|
||||
static_assert(std::__has_operator_addressof<J>::value == true, "");
|
||||
#endif // _LIBCPP_HAS_NO_CONSTEXPR
|
||||
}
|
||||
|
Reference in New Issue
Block a user