00001 00002 #ifndef _INSTIGATE_OPEN_SOURCE_INTERNAL_HEADER_IN_CONCEPT 00003 #error This is an internal header file used to implement Instigate Algebra.\ 00004 It should never be included directly by a program. 00005 #endif 00006 00007 #ifndef INSTIGATE_ALGEBRA_MULTIPLICATIVE_SEMI_GROUP_HPP 00008 #define INSTIGATE_ALGEBRA_MULTIPLICATIVE_SEMI_GROUP_HPP 00009 00035 // Headers from this project 00036 #include "_multiplicative_magma.hpp" 00037 00038 // Headers from other projects 00039 #include <generic/base.hpp> 00040 00041 // Headers from standard libraries 00042 00043 // Forward declarations 00044 namespace instigate { 00045 00046 namespace algebra { 00047 00056 namespace multiplicative_semi_group { 00057 struct tag; 00058 template <typename T> struct interface; 00059 template <typename T> struct requirements; 00060 00061 } // namespace instigate::algebra::multiplicative_semi_group 00062 00063 } // namespace instigate::algebra 00064 00065 } // namespace instigate 00066 00073 struct instigate::algebra::multiplicative_semi_group::tag {}; 00074 00080 template <typename T> 00081 struct instigate::algebra::multiplicative_semi_group::interface : 00082 instigate::algebra::multiplicative_magma::interface<T> 00083 { 00084 00089 static const bool is_specialized = instigate::algebra::interface<T>:: 00090 is_multiplicative_assocativity; 00091 }; 00092 00101 template <typename T> 00102 struct instigate::algebra::multiplicative_semi_group::requirements : 00103 instigate::algebra::multiplicative_magma::requirements<T> 00104 { 00105 00107 static void require_associativity() 00108 { 00109 CHECK(instigate::generic::require<instigate:: 00110 algebra::multiplicative_semi_group:: 00111 interface<T>::is_specialized>); 00112 } 00113 00120 requirements() 00121 { 00122 (void)&require_associativity; 00123 }; 00124 }; 00125 00126 // vim:et:tabstop=8:shiftwidth=8:cindent:fo=croq:textwidth=80: 00127 00128 #endif //INSTIGATE_ALGEBRA_MULTIPLICATIVE_SEMI_GROUP_HPP