Guest User

Untitled

a guest
Jun 20th, 2018
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. template<typename T>
  2. struct Wrapper {
  3. Wrapper(T) {}
  4. void operator()() { }
  5. };
  6.  
  7. template<typename T>
  8. Wrapper(T) -> Wrapper<T>;
  9.  
  10. int main() {
  11. // works in gcc, not in clang
  12. Wrapper{int{}}();
  13.  
  14. // works with both
  15. // Wrapper a{int{}}; a();
  16. }
Add Comment
Please, Sign In to add comment