00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef INSTIGATE_SCRIPTING_GENERIC_STATIC_CHECK_HPP
00017 #define INSTIGATE_SCRIPTING_GENERIC_STATIC_CHECK_HPP
00018
00019 namespace instigate {
00020
00021 namespace scripting {
00022
00023 namespace generic {
00024
00025 namespace _implementation
00026 {
00027 template <bool> struct compile_time_error;
00028
00029 template<> struct compile_time_error<true> {};
00030
00031 template <bool> struct compile_time_checker
00032 {
00033 compile_time_checker(...);
00034 };
00035
00036 template <> struct compile_time_checker<false> {};
00037 }
00038
00039 #define static_check(expression) \
00040 (_implementation::compile_time_error<(expression) != 0>())
00041
00042 }
00043
00044 }
00045
00046 }
00047
00048 #endif // INSTIGATE_SCRIPTING_GENERIC_STATIC_CHECK_HPP