Boost C++ Libraries: Ticket #3305: BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS should be defined for gcc 3.4.x https://svn.boost.org/trac10/ticket/3305 <p> The attached piece of code fails to compile under gcc 3.4.2 (MinGW official). Output: </p> <p> test.cpp:3:3: #error BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS not defined! test.cpp: In function `int main()': test.cpp:13: error: call of overloaded `F(const int&amp;)' is ambiguous test.cpp:6: note: candidates are: void F(C&amp;) [with int i = 0, C = const int] test.cpp:7: note: void F(const C&amp;) [with int i = 0, C = int] </p> <p> I think BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS should be defined for this compiler version. At the moment, Boost.Config just defines BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS for gcc 3.1.x and 3.2.x . </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3305 Trac 1.4.3 Christopher Schmidt Thu, 30 Jul 2009 16:23:09 GMT attachment set https://svn.boost.org/trac10/ticket/3305 https://svn.boost.org/trac10/ticket/3305 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">test.cpp</span> </li> </ul> <p> testcase </p> Ticket John Maddock Thu, 30 Jul 2009 17:34:26 GMT status changed https://svn.boost.org/trac10/ticket/3305#comment:1 https://svn.boost.org/trac10/ticket/3305#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> I'm not sure if that is *exactly* the use case that that macro was intended for - is there a specific use case within Boost that requires this? I'm asking because I'd rather not disable features (or whole libraries in the case of Boost.Units) for gcc-3.4 unless we really have to. </p> <p> Thanks, John. </p> Ticket Christopher Schmidt Thu, 30 Jul 2009 17:51:25 GMT <link>https://svn.boost.org/trac10/ticket/3305#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3305#comment:2</guid> <description> <p> I need a macro that describes that defect for my work on Boost.Fusion. At the moment, this problem is workarounded by the general use of boost::lazy_disable_if (e.g. <a class="ext-link" href="https://svn.boost.org/trac/boost/browser/trunk/boost/fusion/sequence/intrinsic/at.hpp#L70"><span class="icon">​</span>https://svn.boost.org/trac/boost/browser/trunk/boost/fusion/sequence/intrinsic/at.hpp#L70</a>). Of course I can still live with a general lazy_disable_if, but unfortunately this is not fast in terms of compile time and neither looks nor feels right. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Christopher Schmidt</dc:creator> <pubDate>Thu, 30 Jul 2009 18:00:22 GMT</pubDate> <title>cc set https://svn.boost.org/trac10/ticket/3305#comment:3 https://svn.boost.org/trac10/ticket/3305#comment:3 <ul> <li><strong>cc</strong> <span class="trac-author">Christopher Schmidt</span> added </li> </ul> Ticket John Maddock Fri, 31 Jul 2009 16:13:47 GMT <link>https://svn.boost.org/trac10/ticket/3305#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3305#comment:4</guid> <description> <p> The thing is if we change this, then it'll make Boost::Units unusable on cygwin (and maybe other libraries too). </p> <p> Can you not use something like: </p> <table class="wiki"> <tr>#if defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS) <td> BOOST_WORKAROUND(<span class="underline">GNUC</span>, &lt;4) </td></tr></table> <p> <em> workaround here #else </em> conforming code #endif </p> <p> ? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Christopher Schmidt</dc:creator> <pubDate>Fri, 31 Jul 2009 23:11:15 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/3305#comment:5 https://svn.boost.org/trac10/ticket/3305#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">worksforme</span> </li> </ul> <p> A hardcoded BOOST_WORKAROUND looks reasonable to me. I am fine with this. </p> Ticket