Mirror reflection library 0.5.13
|
00001 00010 #ifndef MIRROR_META_PROG_OR_1011291729_HPP 00011 #define MIRROR_META_PROG_OR_1011291729_HPP 00012 00013 00014 #include <mirror/meta_prog/forward_decl.hpp> 00015 00016 MIRROR_NAMESPACE_BEGIN 00017 namespace mp { 00018 00019 // Single-parameter or_ meta function specialization 00020 template <class Bool> 00021 struct or_<Bool> 00022 : public ::std::integral_constant<bool, Bool::value> 00023 { }; 00024 00025 // Multi-parameter or_ meta function specialization 00026 template <class Bool, class ... Bools> 00027 struct or_<Bool, Bools...> 00028 : public ::std::integral_constant< 00029 bool, 00030 Bool::value || or_<Bools...>::value 00031 >{ }; 00032 00033 #ifdef MIRROR_DOCUMENTATION_ONLY 00034 00035 00040 template <typename ... BooleanConstants> 00041 struct or_ : public BooleanConstant 00042 { }; 00043 #endif 00044 00045 00046 } // namespace mp 00047 MIRROR_NAMESPACE_END 00048 00049 #endif //include guard 00050