fork download
  1. #include <iostream>
  2. #include <type_traits>
  3. #include <vector>
  4. template <typename T>
  5. struct is_foo
  6. {
  7. static bool const value = true;
  8. };
  9. template<
  10. typename Ty,
  11. bool foo = is_foo<Ty>::value
  12. >
  13. struct bar {
  14. static bool const value = true;
  15. };
  16. int main() {
  17. int elem;
  18. std::cout << bar<decltype(elem)>::value << std::endl;
  19. return 0;
  20. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
1