Advertisement
frasl

Untitled

Feb 18th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. template <typename T, typename U> struct is_convertible_test {
  2.     typedef char small_t;
  3.     class Big { char dummy[2]; };
  4.     static small_t test(U);
  5.     static Big test(...);
  6.     static T make_T();
  7.  
  8.  
  9.     enum {
  10.         value = std::is_same<decltype(test(make_T())), small_t>::value
  11.     };
  12. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement