Guest User

Untitled

a guest
Dec 16th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. struct pin_in_out { static void set( bool v ){} };
  2. struct pin_in{ };
  3.  
  4. template< typename T >
  5. concept bool test_case = requires( bool v ) {
  6. { T::set( v ) } -> void;
  7. };
  8.  
  9. int main(){
  10. std::cout << test_case< pin_in_out > << "n";
  11. std::cout << test_case< pin_in > << "n";
  12. }
  13.  
  14. 1
  15. 0
Add Comment
Please, Sign In to add comment