summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2018-11-12 15:43:13 +0100
committerDaniel Kolesa <d.kolesa@samsung.com>2018-11-12 15:43:13 +0100
commitac95f38d1b06ac6977ea6d8b9f14f9405396858f (patch)
treef6bcca4f1acb46dcbece424cf0aa9d05de5af1ac
parent1af272b557ee2323437478e25e02fa39e1e08547 (diff)
downloadefl-ac95f38d1b06ac6977ea6d8b9f14f9405396858f.tar.gz
cxx: explicitly require c++11 and fix tests to conform
We weren't setting a C++ version for build previously, which would result in compiler specific default being used, most likely C++11 with GNU extensions on modern compilers and C++03 with GNU exts on old compilers. This is bad because it potentially breaks build on older toolchains that don't default to a modern C++. Now we enable pure C++11 without GNU exts; this resulted in some of the build breaking because of use of typeof() GNU C/C++ ext in tests code, so fix that to use standard decltype() from C++11. @fix
-rw-r--r--meson.build2
-rw-r--r--src/tests/eolian_cxx/complex_cxx.cc48
2 files changed, 25 insertions, 25 deletions
diff --git a/meson.build b/meson.build
index 6e1a574ca8..9c090149fa 100644
--- a/meson.build
+++ b/meson.build
@@ -1,6 +1,6 @@
project('efl', ['c','cpp'],
version: '1.21.99',
- default_options : ['buildtype=plain'],
+ default_options : ['buildtype=plain', 'cpp_std=c++11'],
meson_version : '>=0.47'
)
diff --git a/src/tests/eolian_cxx/complex_cxx.cc b/src/tests/eolian_cxx/complex_cxx.cc
index da92b5cb08..37e9661400 100644
--- a/src/tests/eolian_cxx/complex_cxx.cc
+++ b/src/tests/eolian_cxx/complex_cxx.cc
@@ -37,27 +37,27 @@ struct test_param_type<void(T::*)(P), U>
static_assert(std::is_same<P, U>::value, "Wrong type");
};
-test_param_type<typeof( & nonamespace::Complex::inclasscont ), efl::eina::range_list<efl::Object>> inclasscont;
-test_param_type<typeof( & nonamespace::Complex::incontcont ), efl::eina::range_list<efl::eina::range_list<const int &> >> incontcont;
-test_param_type<typeof( & nonamespace::Complex::incontcontown ), efl::eina::list<efl::eina::range_list<const int &> >const&> incontcontown;
-test_param_type<typeof( & nonamespace::Complex::incontowncontown ), efl::eina::list<efl::eina::list<const int &> >const&> incontowncontown;
-test_param_type<typeof( & nonamespace::Complex::incontowncont ), efl::eina::range_list<efl::eina::list<const int &> >> incontowncont;
-test_param_type<typeof( & nonamespace::Complex::instringcont ), efl::eina::range_list<efl::eina::string_view>> instringcont;
-test_param_type<typeof( & nonamespace::Complex::instringowncont ), efl::eina::range_list<efl::eina::string_view>> instringowncont;
-test_param_type<typeof( & nonamespace::Complex::instringcontown ), efl::eina::list<efl::eina::string_view>const&> instringcontown;
-
-test_param_type<typeof( & nonamespace::Complex::outclasscont ), efl::eina::range_list<efl::Object>&> outclasscont;
-test_param_type<typeof( & nonamespace::Complex::outcontcont ), efl::eina::range_list<efl::eina::range_list<const int &> >&> outcontcont;
-test_param_type<typeof( & nonamespace::Complex::outcontcontown ), efl::eina::list<efl::eina::range_list<const int &> >&> outcontcontown;
-test_param_type<typeof( & nonamespace::Complex::outcontowncontown ), efl::eina::list<efl::eina::list<const int &> >&> outcontowncontown;
-test_param_type<typeof( & nonamespace::Complex::outcontowncont ), efl::eina::range_list<efl::eina::list<const int &> >&> outcontowncont;
-test_param_type<typeof( & nonamespace::Complex::outstringcont ), efl::eina::range_list<efl::eina::string_view>&> outstringcont;
-test_param_type<typeof( & nonamespace::Complex::outstringowncont ), efl::eina::range_list<efl::eina::string_view>&> outstringowncont;
-test_param_type<typeof( & nonamespace::Complex::outstringcontown ), efl::eina::list<efl::eina::string_view>&> outstringcontown;
-
-test_param_type<typeof( & nonamespace::Complex::foo ), efl::eina::range_list<const int &> > foo;
-test_return_type<typeof( & nonamespace::Complex::bar ), efl::eina::range_array<const int &> > bar;
-test_return_type<typeof( & nonamespace::Complex::wrapper_r ), nonamespace::Complex> wrapper_r;
-test_param_type<typeof( & nonamespace::Complex::wrapper_in ), nonamespace::Complex> wrapper_in;
-test_param_type<typeof( & nonamespace::Complex::wrapper_inout ), nonamespace::Complex&> wrapper_inout;
-test_param_type<typeof( & nonamespace::Complex::wrapper_out ), nonamespace::Complex&> wrapper_out;
+test_param_type<decltype( & nonamespace::Complex::inclasscont ), efl::eina::range_list<efl::Object>> inclasscont;
+test_param_type<decltype( & nonamespace::Complex::incontcont ), efl::eina::range_list<efl::eina::range_list<const int &> >> incontcont;
+test_param_type<decltype( & nonamespace::Complex::incontcontown ), efl::eina::list<efl::eina::range_list<const int &> >const&> incontcontown;
+test_param_type<decltype( & nonamespace::Complex::incontowncontown ), efl::eina::list<efl::eina::list<const int &> >const&> incontowncontown;
+test_param_type<decltype( & nonamespace::Complex::incontowncont ), efl::eina::range_list<efl::eina::list<const int &> >> incontowncont;
+test_param_type<decltype( & nonamespace::Complex::instringcont ), efl::eina::range_list<efl::eina::string_view>> instringcont;
+test_param_type<decltype( & nonamespace::Complex::instringowncont ), efl::eina::range_list<efl::eina::string_view>> instringowncont;
+test_param_type<decltype( & nonamespace::Complex::instringcontown ), efl::eina::list<efl::eina::string_view>const&> instringcontown;
+
+test_param_type<decltype( & nonamespace::Complex::outclasscont ), efl::eina::range_list<efl::Object>&> outclasscont;
+test_param_type<decltype( & nonamespace::Complex::outcontcont ), efl::eina::range_list<efl::eina::range_list<const int &> >&> outcontcont;
+test_param_type<decltype( & nonamespace::Complex::outcontcontown ), efl::eina::list<efl::eina::range_list<const int &> >&> outcontcontown;
+test_param_type<decltype( & nonamespace::Complex::outcontowncontown ), efl::eina::list<efl::eina::list<const int &> >&> outcontowncontown;
+test_param_type<decltype( & nonamespace::Complex::outcontowncont ), efl::eina::range_list<efl::eina::list<const int &> >&> outcontowncont;
+test_param_type<decltype( & nonamespace::Complex::outstringcont ), efl::eina::range_list<efl::eina::string_view>&> outstringcont;
+test_param_type<decltype( & nonamespace::Complex::outstringowncont ), efl::eina::range_list<efl::eina::string_view>&> outstringowncont;
+test_param_type<decltype( & nonamespace::Complex::outstringcontown ), efl::eina::list<efl::eina::string_view>&> outstringcontown;
+
+test_param_type<decltype( & nonamespace::Complex::foo ), efl::eina::range_list<const int &> > foo;
+test_return_type<decltype( & nonamespace::Complex::bar ), efl::eina::range_array<const int &> > bar;
+test_return_type<decltype( & nonamespace::Complex::wrapper_r ), nonamespace::Complex> wrapper_r;
+test_param_type<decltype( & nonamespace::Complex::wrapper_in ), nonamespace::Complex> wrapper_in;
+test_param_type<decltype( & nonamespace::Complex::wrapper_inout ), nonamespace::Complex&> wrapper_inout;
+test_param_type<decltype( & nonamespace::Complex::wrapper_out ), nonamespace::Complex&> wrapper_out;