[Boost-bugs] [Boost C++ Libraries] #9754: boost::is_function VS compile error (for const operator function)

Subject: [Boost-bugs] [Boost C++ Libraries] #9754: boost::is_function VS compile error (for const operator function)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-03-07 11:20:06


#9754: boost::is_function VS compile error (for const operator function)
------------------------------------------------+-------------------------
 Reporter: Yaroslav Lukyanchuk <yarosladov@…> | Owner: johnmaddock
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: type_traits
  Version: Boost 1.55.0 | Severity: Problem
 Keywords: boost::is_function, compile error |
------------------------------------------------+-------------------------
 If you try to evaluate boost::is_function on functions that have the same
 signature and one of them are member const operator function, VC++ (10
 through 12) fires compile error:

 Sample minimal code:

 struct Functor {
   void operator()() const {}
   };
 boost::is_function<void()>::value;
 boost::is_function<decltype(Functor().operator())>::value;

 Compiler output:
 1>$(path)\boost\type_traits\is_function.hpp(72): error C2373: 't' :
 redefinition; different type modifiers
 1> $(path)\boost\type_traits\is_function.hpp(72) : see
 declaration of 't'
 1> $(path)\boost\type_traits\is_function.hpp(97) : see reference
 to class template instantiation 'boost::detail::is_function_impl<T>' being
 compiled

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9754>
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:15 UTC