Mirror reflection library 0.5.13
|
00001 00011 #ifndef MIRROR_META_PROG_CAN_BE_CALLED_1102211340_HPP 00012 #define MIRROR_META_PROG_CAN_BE_CALLED_1102211340_HPP 00013 00014 #include <mirror/meta_prog/forward_decl.hpp> 00015 #include <mirror/meta_prog/is_a.hpp> 00016 00017 MIRROR_NAMESPACE_BEGIN 00018 00019 template <template <class> class Getter> 00020 struct required_param_of; 00021 00022 namespace mp { 00023 00024 template <typename Expr> 00025 struct can_be_called 00026 { 00027 typedef typename can_be_called< 00028 typename Expr::type 00029 >::type type; 00030 }; 00031 00032 template <template <class> class MetaFn, typename Param> 00033 struct can_be_called<MetaFn<Param> > 00034 { 00035 typedef typename is_a< 00036 Param, 00037 typename mirror::required_param_of<MetaFn>::type 00038 >::type type; 00039 }; 00040 00041 } // namespace mp 00042 MIRROR_NAMESPACE_END 00043 00044 #endif //include guard 00045