Closed JulZimmermann closed 3 years ago
Hmm, it seems like a GCC bug to me, it tries to eagerly instantiate create
function for template<class...>
which shouldn't even match the overload set and bails out on the deprecated warning
After commenting the warning it seems to work :thinking: https://godbolt.org/z/shDx7e
Needs some more digging, though :bug:
Any update on this? It's really sad not to be able to use GCC 10 because of this 😕
As a workaround, I defined __BOOST_DI_DEPRECATED
with nothing. Are there any drawbacks to this?
Still getting this error with Msys2 MinGW 9.3.0 (x86_64-w64-mingw32/9.3.0).
Defining __BOOST_DI_DEPRECATED
as nothing helps, but this is not good solution still.
Meanwhile I think the problem is bigger then GCC 10 (and apparently mingw 9) support.
Undefining __BOOST_DI_DEPRECATED
helped me with the error messages when forgeting to register a type.
With __BOOST_DI_DEPRECATED
I always get obscure template creation error messages similar to the one in my first post. Without it, the compiler gives a straight 2 line message about the missing type.
So, I think there is a problem with __BOOST_DI_DEPRECATED
in general. I will keep define it as nothing.
Hmm, it seems like a GCC bug to me
For the archive records, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95302
Expected Behavior
Expected to compile.
Actual Behavior
Can't compile the quick guide example (or any other application using boost::di) with the gcc 10 compiler
Error Message:
Steps to Reproduce the Problem
Here is a Compiler Explorer link showing the problem: https://godbolt.org/z/xvHTfd By switching the compiler to gcc 9.3 the code compiles just fine.
Specifications