選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

33 行
672 B

  1. #pragma once
  2. #include <cpputils/mp/core/const.h>
  3. namespace utl {
  4. namespace mp {
  5. namespace __impl /* forward declaration */
  6. {
  7. template<typename T, typename = void>
  8. struct is_default_impl;
  9. }
  10. template<typename T>
  11. using is_default = __impl::is_default_impl<T>;
  12. namespace __impl /* implementation */
  13. {
  14. struct default_ { };
  15. template<typename T, typename>
  16. struct is_default_impl :
  17. public c_false_t
  18. { };
  19. template<typename T>
  20. struct is_default_impl<T, decltype((void)static_cast<default_>(std::declval<T>()))> :
  21. public c_true_t
  22. { };
  23. }
  24. }
  25. }