fork download
  1. template <typename T>
  2. struct is_op_ptr {
  3. private:
  4. template <class AT>
  5. static constexpr std::false_type is_it_a_ptr(...); // note the false_type return
  6. template <class AT>
  7. static constexpr typename ::std::enable_if<
  8. ::std::is_same<
  9. AT,
  10. typename operation<typename AT::element_type::result_type>::ptr_t>::value,
  11. std::true_type>::type // note the true_type return
  12. is_it_a_ptr(int); // no definition needed
  13.  
  14. public:
  15. // do everything unevaluated
  16. static constexpr bool value = decltype(is_it_a_ptr<T> /* you can just pass T explicitly */ (0))::value;
  17. };
  18.  
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty