Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. #include <iostream>
  2. #include <type_traits>
  3. #include <functional>
  4.  
  5. namespace shogun
  6. {
  7. struct CSGObject;
  8. struct Kernel;
  9. }
  10.  
  11. namespace std
  12. {
  13. template <typename T, typename U = typename enable_if<is_same<shogun::Kernel, T>::value>::type>
  14. using sfinae_dummy = T;
  15.  
  16. template <typename T>
  17. struct hash<sfinae_dummy<T>>
  18. {
  19. /** using statements for parent **/
  20. constexpr static int value = 4;
  21. };
  22. };
  23.  
  24. namespace shogun
  25. {
  26. struct CSGObject
  27. {
  28. };
  29.  
  30. struct Kernel
  31. {
  32. };
  33. }
  34.  
  35.  
  36.  
  37. int main()
  38. {
  39. std::cout << std::hash<shogun::Kernel>::value << '\n';
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement