Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. template <typename T>
  2. concept bool Initializable = requires(T t) {
  3. { t.init() } ->void;
  4. };
  5.  
  6. struct S {
  7. void init() {}
  8. };
  9.  
  10. static_assert(Initializable<S>);
  11.  
  12. struct T {
  13. void init(int) {}
  14. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement