00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef CONCEPTS_HH
00018 # define CONCEPTS_HH
00019
00020 # include "../type_traits/is_callable.hh"
00021 # include "concept_tools.hh"
00022 # include <type_traits>
00023
00024 namespace catsfoot {
00025
00028 template <typename T, typename U = T>
00029 struct equality: public auto_concept {
00030 typedef concept_list<
00031 is_callable<op_eq(T, U)>,
00032 std::is_convertible<typename is_callable<op_eq(T, U)>::result_type,
00033 bool>
00034 > requirements;
00035 };
00036
00039 template <typename T, typename U>
00040 struct printable: public auto_concept {
00041 typedef concept_list<
00042 is_callable<op_lsh(T, U)>
00043 > requirements;
00044 };
00045
00046 namespace details {
00047 template <typename T, typename U>
00048 struct is_same: public std::false_type {
00049 };
00050
00051 template <typename T>
00052 struct is_same<T, T>: public std::true_type {
00053 };
00054 }
00055
00058 template <typename T, typename U>
00059 struct is_same: public details::is_same<T,U> {};
00060
00061 }
00062
00063 #endif