Opened 8 years ago
Closed 7 years ago
#10295 closed Bugs (fixed)
Boost Type Erasure does't compile on Visual Studio 2013
Reported by: | Owned by: | Steven Watanabe | |
---|---|---|---|
Milestone: | To Be Determined | Component: | type_erasure |
Version: | Boost 1.56.0 | Severity: | Problem |
Keywords: | Type Erasure Visual Studio 2013 | Cc: |
Description
Even the most trivial example of usage doesn't compile:
http://www.boost.org/doc/libs/1_56_0_b1/libs/type_erasure/example/basic.cpp
The error is "unkown identifier: type" or something like that, and is present in various headers when calling something like "typedef typename ::boost::type_erasure::detail::" .. and obtatining the type via "::type". There may be also other problems
I would gladly help if possible, the library seems good
Attachments (2)
Change History (7)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
I'm having the same problem. The workaround with BOOST_NO_CXX11_VARIADIC_TEMPLATES is ok-ish, but I'd rather see this work out of the box. Isn't MSVC2013 supposed to fully support variadic templates?
comment:3 by , 8 years ago
Support for variadic templates in VS2013 is very buggy. I did fix this, but it appears that I failed to push the merge to master.
comment:4 by , 7 years ago
I've managed to patch the library for VS2013 to bring back support for variadic templates. Almost all examples and tests build successfully - except for:
- printf.cpp example - asserts that any_printable needs the relaxed concept (I believe it is a bug in the example)
- test_free.cpp - this test fails to build. VS2013 compiler seems to require that all overloaded declarations of injected free functions are seen before the first instantiation. Therefore when all the BOOST_TYPE_ERASURE_FREE(...) lines are moved above all the test cases, the test runs ok.
The patched callable.hpp also fixes overloaded callable concepts (multifunction.cpp example) which failed to built in VS2013. A bug in the compiler causes ambiguities between the overloaded function call operators imported via using declarations.
Sorry for double post of the attachment, the upload seemed stuck and the file didn't appear so I tried it again...
comment:5 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Replying to miticodonati@…:
EDIT: Adding #define BOOST_NO_CXX11_VARIADIC_TEMPLATES seems to solve the issue