if.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00013 #ifndef meta_if_h
00014 #define meta_if_h
00015
00016 #include <cml/core/meta/common.h>
00017
00018 namespace cml {
00019
00021 template<bool yn, typename TrueT, typename FalseT> struct select_if;
00022
00024 template<typename TrueT, typename FalseT>
00025 struct select_if<true,TrueT,FalseT> {
00026 typedef TrueT result;
00027 enum { is_true = true };
00028 };
00029
00031 template<typename TrueT, typename FalseT>
00032 struct select_if<false,TrueT,FalseT> {
00033 typedef FalseT result;
00034 enum { is_true = false };
00035 };
00036
00037 }
00038
00039 #endif
00040
00041
00042