[Boost-bugs] [Boost C++ Libraries] #11986: TTI: has_static_member_function doesn't like function local classes with GCC

Subject: [Boost-bugs] [Boost C++ Libraries] #11986: TTI: has_static_member_function doesn't like function local classes with GCC
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-02-15 17:54:38


#11986: TTI: has_static_member_function doesn't like function local classes with
GCC
------------------------------+----------------------
 Reporter: lukester_null@… | Owner: eldiener
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: tti
  Version: Boost 1.59.0 | Severity: Problem
 Keywords: |
------------------------------+----------------------
 Hi

 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++).

 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.

 Thanks

 Luke Elliott.

 {{{
 #include <boost/tti/has_static_member_function.hpp>
 #include <boost/static_assert.hpp>

 BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION(StaticFunction)

 int main()
 {
     class Nested
     {
     public:
         static void StaticFunction()
         {
         }
     };
 BOOST_STATIC_ASSERT_MSG((has_static_member_function_StaticFunction<Nested,
 void ()>::value), "That's not gone well.");
 }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11986>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:19 UTC