Boost C++ Libraries: Ticket #4526: [MSVC 10 & 9 & 8] forward declarations of concept checked function templates don't work (compiler bug?) https://svn.boost.org/trac10/ticket/4526 <p> 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 &amp; MSVC9, Caminit MSVC8) </p> <p> 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. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4526 Trac 1.4.3 Stefan van Kessel <van_kessel@…> Wed, 11 Aug 2010 06:22:33 GMT attachment set https://svn.boost.org/trac10/ticket/4526 https://svn.boost.org/trac10/ticket/4526 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">patchfile.patch</span> </li> </ul> <p> patch for boost\concept\requires.hpp </p> Ticket Stefan van Kessel <van_kessel@…> Wed, 11 Aug 2010 06:23:52 GMT attachment set https://svn.boost.org/trac10/ticket/4526 https://svn.boost.org/trac10/ticket/4526 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">broken.cpp</span> </li> </ul> <p> example code that breaks </p> Ticket Stefan van Kessel <van_kessel@…> Wed, 11 Aug 2010 20:49:04 GMT attachment set https://svn.boost.org/trac10/ticket/4526 https://svn.boost.org/trac10/ticket/4526 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">pathfile2.patch</span> </li> </ul> <p> Removed unncessary decltype. Now works at least on msvc10 and msvc9 </p> Ticket Stefan van Kessel <van_kessel@…> Fri, 13 Aug 2010 21:33:42 GMT attachment set https://svn.boost.org/trac10/ticket/4526 https://svn.boost.org/trac10/ticket/4526 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">patchfile3.patch</span> </li> </ul> <p> 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 </p> Ticket