57 lines
1.0 KiB
C++
Raw Normal View History

2013-03-16 19:13:01 +02:00
#ifndef BOOL_PROP1
2018-08-09 18:06:22 +02:00
# error Expected BOOL_PROP1
2013-03-16 19:13:01 +02:00
#endif
#ifndef BOOL_PROP2
2018-08-09 18:06:22 +02:00
# error Expected BOOL_PROP2
2013-03-16 19:13:01 +02:00
#endif
#ifndef BOOL_PROP3
2018-08-09 18:06:22 +02:00
# error Expected BOOL_PROP3
2013-03-16 19:13:01 +02:00
#endif
#ifndef STRING_PROP1
2018-08-09 18:06:22 +02:00
# error Expected STRING_PROP1
2013-03-16 19:13:01 +02:00
#endif
#ifndef STRING_PROP2
2018-08-09 18:06:22 +02:00
# error Expected STRING_PROP2
2013-03-16 19:13:01 +02:00
#endif
#ifndef STRING_PROP3
2018-08-09 18:06:22 +02:00
# error Expected STRING_PROP3
2013-03-16 19:13:01 +02:00
#endif
2016-07-09 11:21:54 +02:00
template <bool test>
2014-08-03 19:52:23 +02:00
struct CMakeStaticAssert;
2016-07-09 11:21:54 +02:00
template <>
struct CMakeStaticAssert<true>
{
};
2014-08-03 19:52:23 +02:00
2016-07-09 11:21:54 +02:00
enum
{
2014-08-03 19:52:23 +02:00
NumericMaxTest1 = sizeof(CMakeStaticAssert<NUMBER_MAX_PROP1 == 100>),
NumericMaxTest2 = sizeof(CMakeStaticAssert<NUMBER_MAX_PROP2 == 250>),
NumericMinTest1 = sizeof(CMakeStaticAssert<NUMBER_MIN_PROP1 == 50>),
NumericMinTest2 = sizeof(CMakeStaticAssert<NUMBER_MIN_PROP2 == 200>),
NumericMinTest3 = sizeof(CMakeStaticAssert<NUMBER_MIN_PROP3 == 0xA>),
NumericMinTest4 = sizeof(CMakeStaticAssert<NUMBER_MIN_PROP4 == 0x10>)
};
2013-03-16 19:13:01 +02:00
#include "iface2.h"
2015-04-27 22:25:09 +02:00
int foo();
#ifdef _WIN32
__declspec(dllimport)
#endif
2016-07-09 11:21:54 +02:00
int bar();
2015-04-27 22:25:09 +02:00
2016-07-09 11:21:54 +02:00
int main(int argc, char** argv)
2013-03-16 19:13:01 +02:00
{
Iface2 if2;
2015-04-27 22:25:09 +02:00
return if2.foo() + foo() + bar();
2013-03-16 19:13:01 +02:00
}