Boost C++ Libraries: Ticket #11986: TTI: has_static_member_function doesn't like function local classes with GCC https://svn.boost.org/trac10/ticket/11986 <p> Hi </p> <p> Not sure if this expected or known or impossible to fix, but it seems has_static_member_function doesn't work with function scope local classes in GCC (or clang; it's OK in VC++). </p> <p> Personally, I only tripped over it writing a test so the fix was simple (no function scope class) but I thought best to report it. </p> <p> Thanks </p> <p> Luke Elliott. </p> <pre class="wiki">#include &lt;boost/tti/has_static_member_function.hpp&gt; #include &lt;boost/static_assert.hpp&gt; BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION(StaticFunction) int main() { class Nested { public: static void StaticFunction() { } }; BOOST_STATIC_ASSERT_MSG((has_static_member_function_StaticFunction&lt;Nested, void ()&gt;::value), "That's not gone well."); } </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11986 Trac 1.4.3 Edward Diener Fri, 19 Feb 2016 21:25:22 GMT <link>https://svn.boost.org/trac10/ticket/11986#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11986#comment:1</guid> <description> <p> Thanks for reporting this. I will take a look at this and try to determine why it is failing. </p> </description> <category>Ticket</category> </item> </channel> </rss>