Skip to content
Snippets Groups Projects
Commit 89603dc1 authored by Jan Trávníček's avatar Jan Trávníček
Browse files

add all same type trait

parent a342886d
No related branches found
No related tags found
No related merge requests found
...@@ -104,6 +104,20 @@ namespace std { ...@@ -104,6 +104,20 @@ namespace std {
typedef typename match_cv_ref_rec < Ref, typename decay < Type >::type >::type type; typedef typename match_cv_ref_rec < Ref, typename decay < Type >::type >::type type;
}; };
   
// ----------------------------------------------------------------------------------------------------
template < typename ... T >
struct all_same : std::false_type { };
template < >
struct all_same < > : std::true_type { };
template < typename T >
struct all_same < T > : std::true_type { };
template < typename T, typename ... Ts >
struct all_same < T, T, Ts ... > : all_same < T, Ts ... > { };
} /* namespace std */ } /* namespace std */
   
#endif /* __TYPE_TRAITS_HPP_ */ #endif /* __TYPE_TRAITS_HPP_ */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment