Boost C++ Libraries: Ticket #7815: boost/intrusive/detail/has_member_function_callable_with.hpp: inheriting from a const class https://svn.boost.org/trac10/ticket/7815 <p> Hello, </p> <p> I tried to use a boost::container::vector with a Texas Instruments compiler, and I got an error pointing to line 88 of &lt;boost/intrusive/detail/has_member_function_callable_with.hpp&gt; "Invalid base class", with Type=const std::allocator&lt;something&gt;" </p> <p> Here's the context: </p> <pre class="wiki"> template &lt;typename Type&gt; class BOOST_PP_CAT(has_member_function_named_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME) { struct BaseMixin { void BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME(); }; struct Base : public Type, public BaseMixin { Base(); }; // &lt;-- line 88 </pre><p> The problem seems to be the constness of Type. Here's a simplified example: </p> <pre class="wiki">struct X {}; template &lt; class T &gt; struct Y : T { Y() {} }; int main() { Y&lt;const X&gt; y; } </pre><p> The above example compiles fine with Linux gcc version 4.5.4, and MinGW 4.5.0, but fails with my TI compiler. </p> <p> For now, my workaround is: </p> <pre class="wiki">struct Base : public ::boost::remove_cv&lt;Type&gt;::type, public BaseMixin { Base(); }; // &lt;-- line 88 </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7815 Trac 1.4.3 1czajnik@… Thu, 20 Dec 2012 10:23:46 GMT attachment set https://svn.boost.org/trac10/ticket/7815 https://svn.boost.org/trac10/ticket/7815 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">7815.patch</span> </li> </ul> Ticket Krzysztof Czaiński <1czajnik@…> Thu, 20 Dec 2012 17:54:43 GMT cc set https://svn.boost.org/trac10/ticket/7815#comment:1 https://svn.boost.org/trac10/ticket/7815#comment:1 <ul> <li><strong>cc</strong> <span class="trac-author">1czajnik@…</span> added </li> </ul> Ticket Ion Gaztañaga Thu, 20 Dec 2012 21:13:38 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/7815#comment:2 https://svn.boost.org/trac10/ticket/7815#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Thanks for the report, fixed in trunk in revision 82126. </p> Ticket