1*0a6a1f1dSLionel Sambuc //===----------------------------------------------------------------------===//
2*0a6a1f1dSLionel Sambuc //
3*0a6a1f1dSLionel Sambuc //                     The LLVM Compiler Infrastructure
4*0a6a1f1dSLionel Sambuc //
5*0a6a1f1dSLionel Sambuc // This file is dual licensed under the MIT and the University of Illinois Open
6*0a6a1f1dSLionel Sambuc // Source Licenses. See LICENSE.TXT for details.
7*0a6a1f1dSLionel Sambuc //
8*0a6a1f1dSLionel Sambuc //===----------------------------------------------------------------------===//
9*0a6a1f1dSLionel Sambuc 
104684ddb6SLionel Sambuc #include <functional>
114684ddb6SLionel Sambuc #include <string>
124684ddb6SLionel Sambuc 
134684ddb6SLionel Sambuc template <class _Tp>
144684ddb6SLionel Sambuc struct is_transparent
154684ddb6SLionel Sambuc {
164684ddb6SLionel Sambuc private:
174684ddb6SLionel Sambuc     struct __two {char __lx; char __lxx;};
184684ddb6SLionel Sambuc     template <class _Up> static __two __test(...);
194684ddb6SLionel Sambuc     template <class _Up> static char __test(typename _Up::is_transparent* = 0);
204684ddb6SLionel Sambuc public:
214684ddb6SLionel Sambuc     static const bool value = sizeof(__test<_Tp>(0)) == 1;
224684ddb6SLionel Sambuc };
234684ddb6SLionel Sambuc 
244684ddb6SLionel Sambuc 
main()254684ddb6SLionel Sambuc int main () {
264684ddb6SLionel Sambuc #if _LIBCPP_STD_VER > 11
274684ddb6SLionel Sambuc 
284684ddb6SLionel Sambuc     static_assert ( !is_transparent<std::logical_and<int>>::value, "" );
294684ddb6SLionel Sambuc     static_assert ( !is_transparent<std::logical_and<std::string>>::value, "" );
304684ddb6SLionel Sambuc     static_assert (  is_transparent<std::logical_and<void>>::value, "" );
314684ddb6SLionel Sambuc     static_assert (  is_transparent<std::logical_and<>>::value, "" );
324684ddb6SLionel Sambuc 
334684ddb6SLionel Sambuc     static_assert ( !is_transparent<std::logical_or<int>>::value, "" );
344684ddb6SLionel Sambuc     static_assert ( !is_transparent<std::logical_or<std::string>>::value, "" );
354684ddb6SLionel Sambuc     static_assert (  is_transparent<std::logical_or<void>>::value, "" );
364684ddb6SLionel Sambuc     static_assert (  is_transparent<std::logical_or<>>::value, "" );
374684ddb6SLionel Sambuc 
384684ddb6SLionel Sambuc     static_assert ( !is_transparent<std::logical_not<int>>::value, "" );
394684ddb6SLionel Sambuc     static_assert ( !is_transparent<std::logical_not<std::string>>::value, "" );
404684ddb6SLionel Sambuc     static_assert (  is_transparent<std::logical_not<void>>::value, "" );
414684ddb6SLionel Sambuc     static_assert (  is_transparent<std::logical_not<>>::value, "" );
424684ddb6SLionel Sambuc 
434684ddb6SLionel Sambuc #endif
444684ddb6SLionel Sambuc 
454684ddb6SLionel Sambuc     return 0;
464684ddb6SLionel Sambuc     }
47