Boost C++ Libraries: Ticket #12397: static_assert in arg.hpp failing when using boost::placeholder with std::bind https://svn.boost.org/trac10/ticket/12397 <p> In our project we currently use std::bind with boost::placeholers because boost::placeholders are already global namespace and some some of the dependency (header) libraries might depend on this so we can't use BOOST_BIND_NO_PLACEHOLDERS currently. </p> <p> So we make boost::placeholers work with std::bin with this code: </p> <pre class="wiki">namespace std { template&lt;int N&gt; struct is_placeholder&lt;boost::arg&lt;N&gt;&gt; : public integral_constant&lt;int, N&gt; {}; } </pre><p> This worked fine, but since boost 1.60 when BOOST_CONSTEXPR was added to the boost::arg contructor the compliation fails for some of our developers with </p> <pre class="wiki">error: static assertion failed: I == is_placeholder&lt;T&gt;::value BOOST_STATIC_ASSERT( I == is_placeholder&lt;T&gt;::value ); </pre><p> from arg.hpp </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12397 Trac 1.4.3 loonycyborg Wed, 17 Aug 2016 12:03:26 GMT <link>https://svn.boost.org/trac10/ticket/12397#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12397#comment:1</guid> <description> <p> I'm contributor to the same project(namely Battle for Wesnoth), and I got this issue on debian while using mingw-w64 cross toolchain(gcc 4.9). While my gentoo crossdev based cross toolchain(gcc5.3 and the same boost version) compiled same code without errors. atm I'm using 5.3.0 for native builds and not getting this issue there either. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Peter Dimov</dc:creator> <pubDate>Wed, 17 Aug 2016 15:54:40 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12397#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12397#comment:2</guid> <description> <p> I'll look into this if someone can present a simple example that triggers the error. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>loonycyborg</dc:creator> <pubDate>Thu, 18 Aug 2016 12:13:46 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/12397 https://svn.boost.org/trac10/ticket/12397 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">test_case.cpp</span> </li> </ul> Ticket loonycyborg Thu, 18 Aug 2016 12:17:02 GMT <link>https://svn.boost.org/trac10/ticket/12397#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12397#comment:3</guid> <description> <p> This compiles fine with gcc 5.4.0 but fails with gcc 4.8.5 and 4.9.3, using -std=c++11 option </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Peter Dimov</dc:creator> <pubDate>Fri, 19 Aug 2016 22:35:54 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12397#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12397#comment:4</guid> <description> <p> Should be fixed in <a class="ext-link" href="https://github.com/boostorg/bind/commit/3c56630b5400c43d1a4393d685a407e68a69ce9e"><span class="icon">​</span>https://github.com/boostorg/bind/commit/3c56630b5400c43d1a4393d685a407e68a69ce9e</a> </p> </description> <category>Ticket</category> </item> </channel> </rss>