But, with further examination, because -fconcepts isn't used, __cpp_concepts isn't defined, so concepts.cpp winds up being a completely empty main().
Compiling with -fconcepts leads to the attached error, on gcc 9.1. (Similar errors on gcc 6.x, 7.x, 8.x.)
The full errors are attached, but it starts:
In file included from /home/jamespharvey20/home/code/di.git/extension/include/boost/di/extension/injections/concepts.hpp:12,
from /home/jamespharvey20/home/code/di.git/extension/test/injections/concepts.cpp:11:
/home/jamespharvey20/home/code/di.git/include/boost/di.hpp:3328:103: error: decltype cannot resolve address of overloaded function
3328 | ::boost::di::v1_1_0::detail::combine_t<::boost::di::v1_1_0::aux::function_traits_t<decltype(ctor)>, \
| ^
...
/home/jamespharvey20/home/code/di.git/include/boost/di.hpp:3328:104: error: template argument 1 is invalid
3328 | ::boost::di::v1_1_0::detail::combine_t<::boost::di::v1_1_0::aux::function_traits_t<decltype(ctor)>, \
| ^
I'm thinking it's not built by extension/test/CMakeLists.txt because of these errors, but I'm posting this because: (1) I'm hoping it can be fixed; and (2) as it's on the website as a "Run this code!" it makes it look like it's implemented and working.
Steps to Reproduce the Problem
Modify /CMakeLists.txt to include -fconcepts in CMAKE_CXX_FLAGS for g++.
Modify extension/test/CMakeLists.txt to include test(injections/concepts).
Expected Behavior
test.injections_concepts
should be able to compile if__cpp_concepts
is defined.Actual Behavior
At first,
test.injections_concepts
appears to compile and pass. Technically, it does. And, it's on the website as a "Run this code!" example.But, with further examination, because
-fconcepts
isn't used,__cpp_concepts
isn't defined, soconcepts.cpp
winds up being a completely emptymain()
.Compiling with
-fconcepts
leads to the attached error, on gcc 9.1. (Similar errors on gcc 6.x, 7.x, 8.x.)The full errors are attached, but it starts:
I'm thinking it's not built by
extension/test/CMakeLists.txt
because of these errors, but I'm posting this because: (1) I'm hoping it can be fixed; and (2) as it's on the website as a "Run this code!" it makes it look like it's implemented and working.Steps to Reproduce the Problem
/CMakeLists.txt
to include-fconcepts
inCMAKE_CXX_FLAGS
forg++
.extension/test/CMakeLists.txt
to includetest(injections/concepts)
.test.injections.concepts
Specifications