boost-ext / di

C++14 Dependency Injection Library
https://boost-ext.github.io/di
1.16k stars 140 forks source link

example.tutorial_basic_first_steps_with_dynamic_bindings: Fails compilation on gcc 9+ #407

Open jamespharvey20 opened 5 years ago

jamespharvey20 commented 5 years ago

Expected Behavior

example.tutorial_basic_first_steps_with_dynamic_bindings should compile.

Actual Behavior

gcc 9 may be released as early as tomorrow. Using its current git build, or using the new gcc 10 git build, fails with the error below.

No pull request coming from me on this. :-) I'm just temporarily commenting out the is_same<>.

[ 40%] Building CXX object test/CMakeFiles/test.ut_type_traits_ctor_traits.dir/ut/type_traits/ctor_traits.cpp.o
cd /home/jamespharvey20/home/code/di.my.git/build/test && /usr/bin/c++   -I/home/jamespharvey20/home/code/di.my.git/test -I/home/jamespharvey20/home/code/di.my.git/include -I/home/jamespharvey20/home/code/di.my.git/extension/include  -std=c++1y -fno-exceptions -pedantic -pedantic-errors -Wall -Wextra -Werror -DBOOST_DI_NAMESPACE= -include common/test.hpp -O3 -DNDEBUG   -o CMakeFiles/test.ut_type_traits_ctor_traits.dir/ut/type_traits/ctor_traits.cpp.o -c /home/jamespharvey20/home/code/di.my.git/test/ut/type_traits/ctor_traits.cpp
In file included from <command-line>:
/home/jamespharvey20/home/code/di.my.git/test/ut/type_traits/ctor_traits.cpp: In instantiation of ‘void type_traits::test_ctor_traits() [with T = type_traits::<lambda()>::rvalue; TInitialization = type_traits::direct; Ts = {core::any_type_1st_ref_fwd<type_traits::<lambda()>::rvalue>}]’:
/home/jamespharvey20/home/code/di.my.git/test/ut/type_traits/ctor_traits.cpp:120:72:   required from here
/home/jamespharvey20/home/code/di.my.git/test/ut/type_traits/ctor_traits.cpp:39:122: error: static assertion failed: fail
   39 |       std::is_same<aux::pair<T, aux::pair<TInitialization, aux::type_list<Ts...>>>, typename ctor_traits__<T, T>::type>::value);
/home/jamespharvey20/home/code/di.my.git/test/common/test.hpp:22:43: note: in definition of macro ‘static_expect’
   22 | #define static_expect(...) static_assert((__VA_ARGS__), "fail")
      |                                           ^~~~~~~~~~~

Steps to Reproduce the Problem

  1. Install gcc 9+
  2. make example.tutorial_basic_first_steps_with_dynamic_bindings

Specifications