diff options
Diffstat (limited to 'libcxx/test/support/is_transparent.h')
-rw-r--r-- | libcxx/test/support/is_transparent.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/libcxx/test/support/is_transparent.h b/libcxx/test/support/is_transparent.h index 541689314b8..f7cdbbc14cc 100644 --- a/libcxx/test/support/is_transparent.h +++ b/libcxx/test/support/is_transparent.h @@ -22,7 +22,17 @@ struct transparent_less noexcept(noexcept(std::forward<T>(t) < std::forward<U>(u))) -> decltype (std::forward<T>(t) < std::forward<U>(u)) { return std::forward<T>(t) < std::forward<U>(u); } - typedef void is_transparent; // correct + using is_transparent = void; // correct +}; + +struct transparent_less_not_referenceable +{ + template <class T, class U> + constexpr auto operator()(T&& t, U&& u) const + noexcept(noexcept(std::forward<T>(t) < std::forward<U>(u))) + -> decltype (std::forward<T>(t) < std::forward<U>(u)) + { return std::forward<T>(t) < std::forward<U>(u); } + using is_transparent = void () const &; // it's a type; a weird one, but a type }; struct transparent_less_no_type @@ -33,7 +43,7 @@ struct transparent_less_no_type -> decltype (std::forward<T>(t) < std::forward<U>(u)) { return std::forward<T>(t) < std::forward<U>(u); } private: -// typedef void is_transparent; // error - should exist +// using is_transparent = void; // error - should exist }; struct transparent_less_private @@ -44,7 +54,7 @@ struct transparent_less_private -> decltype (std::forward<T>(t) < std::forward<U>(u)) { return std::forward<T>(t) < std::forward<U>(u); } private: - typedef void is_transparent; // error - should be accessible + using is_transparent = void; // error - should be accessible }; struct transparent_less_not_a_type |