Opened 12 years ago
#4526 new Bugs
[MSVC 10 & 9 & 8] forward declarations of concept checked function templates don't work (compiler bug?)
Reported by: | Owned by: | jsiek | |
---|---|---|---|
Milestone: | Boost 1.44.0 | Component: | concept_check |
Version: | Boost 1.43.0 | Severity: | Problem |
Keywords: | concept_check forward-declaration | Cc: |
Description
As posted by Lorenzo Caminiti to comp.lib.boost.devel (8/9/2010) forward declarations of concept checked function templates lead to ambiguity errors even though the function signatures are identical when compiled with MSVC (I tested MSVC 10 & MSVC9, Caminit MSVC8)
I believe it boils down to a compiler error where MSVC fails to recognize that signatures are identical when the return type depends on fairly complex expressions that include non type template arguments. I've got a patch that seems to work for MSVC10. Since I used decltype it doesn't help for the older versions though. I haven't tested it much and I'm sure I'm breaking all kinds of boost coding guidelines but maybe it's of help anyway.
Attachments (4)
Change History (4)
by , 12 years ago
Attachment: | patchfile.patch added |
---|
by , 12 years ago
Attachment: | pathfile2.patch added |
---|
Removed unncessary decltype. Now works at least on msvc10 and msvc9
by , 12 years ago
Attachment: | patchfile3.patch added |
---|
removed unneccsary macros, added value enum member to template to make sure value of _requires_ gets evaluated in absence of decltype(...::value), changed PP condition to use BOOST_TESTED_AT
patch for boost\concept\requires.hpp