diff options
Diffstat (limited to 'lib/entityx/cxx11')
-rw-r--r-- | lib/entityx/cxx11/c++11-test-__func__-N2340.cpp | 8 | ||||
-rw-r--r-- | lib/entityx/cxx11/c++11-test-auto-N2546.cpp | 12 | ||||
-rw-r--r-- | lib/entityx/cxx11/c++11-test-constexpr-N2235.cpp | 19 | ||||
-rw-r--r-- | lib/entityx/cxx11/c++11-test-cstdint.cpp | 10 | ||||
-rw-r--r-- | lib/entityx/cxx11/c++11-test-decltype-N2343.cpp | 11 | ||||
-rw-r--r-- | lib/entityx/cxx11/c++11-test-lambda-N2927.cpp | 5 | ||||
-rw-r--r-- | lib/entityx/cxx11/c++11-test-long_long-N1811.cpp | 7 | ||||
-rw-r--r-- | lib/entityx/cxx11/c++11-test-nullptr-N2431.cpp | 5 | ||||
-rw-r--r-- | lib/entityx/cxx11/c++11-test-nullptr-N2431_fail_compile.cpp | 5 | ||||
-rw-r--r-- | lib/entityx/cxx11/c++11-test-rvalue_references-N2118.cpp | 15 | ||||
-rw-r--r-- | lib/entityx/cxx11/c++11-test-sizeof_member-N2253.cpp | 14 | ||||
-rw-r--r-- | lib/entityx/cxx11/c++11-test-static_assert-N1720.cpp | 5 | ||||
-rw-r--r-- | lib/entityx/cxx11/c++11-test-static_assert-N1720_fail_compile.cpp | 5 | ||||
-rw-r--r-- | lib/entityx/cxx11/c++11-test-variadic_templates-N2555.cpp | 23 | ||||
-rw-r--r-- | lib/entityx/cxx11/demo.cpp | 23 |
15 files changed, 0 insertions, 167 deletions
diff --git a/lib/entityx/cxx11/c++11-test-__func__-N2340.cpp b/lib/entityx/cxx11/c++11-test-__func__-N2340.cpp deleted file mode 100644 index d961df8..0000000 --- a/lib/entityx/cxx11/c++11-test-__func__-N2340.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include <cstring> - -int main() -{ - if (!__func__) { return 1; } - if(std::strlen(__func__) <= 0) { return 1; } - return 0; -} diff --git a/lib/entityx/cxx11/c++11-test-auto-N2546.cpp b/lib/entityx/cxx11/c++11-test-auto-N2546.cpp deleted file mode 100644 index 948648e..0000000 --- a/lib/entityx/cxx11/c++11-test-auto-N2546.cpp +++ /dev/null @@ -1,12 +0,0 @@ - -int main() -{ - auto i = 5; - auto f = 3.14159f; - auto d = 3.14159; - bool ret = ( - (sizeof(f) < sizeof(d)) && - (sizeof(i) == sizeof(int)) - ); - return ret ? 0 : 1; -} diff --git a/lib/entityx/cxx11/c++11-test-constexpr-N2235.cpp b/lib/entityx/cxx11/c++11-test-constexpr-N2235.cpp deleted file mode 100644 index ed62451..0000000 --- a/lib/entityx/cxx11/c++11-test-constexpr-N2235.cpp +++ /dev/null @@ -1,19 +0,0 @@ -constexpr int square(int x) -{ - return x*x; -} - -constexpr int the_answer() -{ - return 42; -} - -int main() -{ - int test_arr[square(3)]; - bool ret = ( - (square(the_answer()) == 1764) && - (sizeof(test_arr)/sizeof(test_arr[0]) == 9) - ); - return ret ? 0 : 1; -} diff --git a/lib/entityx/cxx11/c++11-test-cstdint.cpp b/lib/entityx/cxx11/c++11-test-cstdint.cpp deleted file mode 100644 index 6ba852f..0000000 --- a/lib/entityx/cxx11/c++11-test-cstdint.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include <cstdint> -int main() -{ - bool test = - (sizeof(std::int8_t) == 1) && - (sizeof(std::int16_t) == 2) && - (sizeof(std::int32_t) == 4) && - (sizeof(std::int64_t) == 8); - return test ? 0 : 1; -} diff --git a/lib/entityx/cxx11/c++11-test-decltype-N2343.cpp b/lib/entityx/cxx11/c++11-test-decltype-N2343.cpp deleted file mode 100644 index 843f83a..0000000 --- a/lib/entityx/cxx11/c++11-test-decltype-N2343.cpp +++ /dev/null @@ -1,11 +0,0 @@ - -bool check_size(int i) -{ - return sizeof(int) == sizeof(decltype(i)); -} - -int main() -{ - bool ret = check_size(42); - return ret ? 0 : 1; -} diff --git a/lib/entityx/cxx11/c++11-test-lambda-N2927.cpp b/lib/entityx/cxx11/c++11-test-lambda-N2927.cpp deleted file mode 100644 index 4c33ed5..0000000 --- a/lib/entityx/cxx11/c++11-test-lambda-N2927.cpp +++ /dev/null @@ -1,5 +0,0 @@ -int main() -{ - int ret = 0; - return ([&ret]() -> int { return ret; })(); -} diff --git a/lib/entityx/cxx11/c++11-test-long_long-N1811.cpp b/lib/entityx/cxx11/c++11-test-long_long-N1811.cpp deleted file mode 100644 index 0911127..0000000 --- a/lib/entityx/cxx11/c++11-test-long_long-N1811.cpp +++ /dev/null @@ -1,7 +0,0 @@ -int main(void) -{ - long long l; - unsigned long long ul; - - return ((sizeof(l) >= 8) && (sizeof(ul) >= 8)) ? 0 : 1; -} diff --git a/lib/entityx/cxx11/c++11-test-nullptr-N2431.cpp b/lib/entityx/cxx11/c++11-test-nullptr-N2431.cpp deleted file mode 100644 index c78fac4..0000000 --- a/lib/entityx/cxx11/c++11-test-nullptr-N2431.cpp +++ /dev/null @@ -1,5 +0,0 @@ -int main() -{ - int* test = nullptr; - return test ? 1 : 0; -} diff --git a/lib/entityx/cxx11/c++11-test-nullptr-N2431_fail_compile.cpp b/lib/entityx/cxx11/c++11-test-nullptr-N2431_fail_compile.cpp deleted file mode 100644 index 7ab77a2..0000000 --- a/lib/entityx/cxx11/c++11-test-nullptr-N2431_fail_compile.cpp +++ /dev/null @@ -1,5 +0,0 @@ -int main() -{ - int i = nullptr; - return 1; -} diff --git a/lib/entityx/cxx11/c++11-test-rvalue_references-N2118.cpp b/lib/entityx/cxx11/c++11-test-rvalue_references-N2118.cpp deleted file mode 100644 index 75fb555..0000000 --- a/lib/entityx/cxx11/c++11-test-rvalue_references-N2118.cpp +++ /dev/null @@ -1,15 +0,0 @@ -int foo(int& lvalue) -{ - return 123; -} - -int foo(int&& rvalue) -{ - return 321; -} - -int main() -{ - int i = 42; - return ((foo(i) == 123) && (foo(42) == 321)) ? 0 : 1; -} diff --git a/lib/entityx/cxx11/c++11-test-sizeof_member-N2253.cpp b/lib/entityx/cxx11/c++11-test-sizeof_member-N2253.cpp deleted file mode 100644 index a55fc09..0000000 --- a/lib/entityx/cxx11/c++11-test-sizeof_member-N2253.cpp +++ /dev/null @@ -1,14 +0,0 @@ -struct foo { - char bar; - int baz; -}; - -int main(void) -{ - bool ret = ( - (sizeof(foo::bar) == 1) && - (sizeof(foo::baz) >= sizeof(foo::bar)) && - (sizeof(foo) >= sizeof(foo::bar)+sizeof(foo::baz)) - ); - return ret ? 0 : 1; -} diff --git a/lib/entityx/cxx11/c++11-test-static_assert-N1720.cpp b/lib/entityx/cxx11/c++11-test-static_assert-N1720.cpp deleted file mode 100644 index c3d74ca..0000000 --- a/lib/entityx/cxx11/c++11-test-static_assert-N1720.cpp +++ /dev/null @@ -1,5 +0,0 @@ -int main() -{ - static_assert(0 < 1, "your ordering of integers is screwed"); - return 0; -} diff --git a/lib/entityx/cxx11/c++11-test-static_assert-N1720_fail_compile.cpp b/lib/entityx/cxx11/c++11-test-static_assert-N1720_fail_compile.cpp deleted file mode 100644 index 4cb1183..0000000 --- a/lib/entityx/cxx11/c++11-test-static_assert-N1720_fail_compile.cpp +++ /dev/null @@ -1,5 +0,0 @@ -int main() -{ - static_assert(1 < 0, "this should fail"); - return 0; -} diff --git a/lib/entityx/cxx11/c++11-test-variadic_templates-N2555.cpp b/lib/entityx/cxx11/c++11-test-variadic_templates-N2555.cpp deleted file mode 100644 index 4518e88..0000000 --- a/lib/entityx/cxx11/c++11-test-variadic_templates-N2555.cpp +++ /dev/null @@ -1,23 +0,0 @@ -int Accumulate() -{ - return 0; -} - -template<typename T, typename... Ts> -int Accumulate(T v, Ts... vs) -{ - return v + Accumulate(vs...); -} - -template<int... Is> -int CountElements() -{ - return sizeof...(Is); -} - -int main() -{ - int acc = Accumulate(1, 2, 3, 4, -5); - int count = CountElements<1,2,3,4,5>(); - return ((acc == 5) && (count == 5)) ? 0 : 1; -} diff --git a/lib/entityx/cxx11/demo.cpp b/lib/entityx/cxx11/demo.cpp deleted file mode 100644 index f647d15..0000000 --- a/lib/entityx/cxx11/demo.cpp +++ /dev/null @@ -1,23 +0,0 @@ - -#include <iostream> - -int main() -{ - std::cout << "Testing\n"; - std::cout << "Has static_assert: " << -#ifdef HAS_CXX11_STATIC_ASSERT - "yes :)" -#else - "no" -#endif - << "\n"; - std::cout << "Has variadic templates: " << -#ifdef HAS_CXX11_VARIADIC_TEMPLATES - "yes :)" -#else - "no" -#endif - << "\n"; - return 0; -} - |