Opened 3 years ago

Closed 12 months ago

#11821 closed Bugs (fixed)

clang-cl fails using typeof.hpp

Reported by: Yaron Keren <yaron.keren@…> Owned by: Peder Holt
Milestone: Boost 1.65.0 Component: typeof
Version: Boost 1.59.0 Severity: Problem
Keywords: Cc:


clang-cl svn (r253440) fails to compile

#include <boost/typeof/typeof.hpp>


typeof_impl.hpp:150:31: error: template specialization or definition

      requires a template parameter list corresponding to the nested type 'base_type' (aka 'msvc_extract_type<ID>')
            struct base_type::id2type // This uses nice VC6.5 and VC7.1 bugfeature
                   ~~~~~~~~~  ^

this is due to BOOST_MSVC not defined. When this is worked around with -DBOOST_MSVC=1800, there is another failure in the same file:

typeof_impl.hpp:125:20: error: explicit specialization of
      non-template struct 'id2type_impl'
            struct id2type_impl<true>  //VC8.0 specific bugfeature
                   ^           ~~~~~~

please see ideas to fix at

Change History (3)

comment:1 Changed 3 years ago by Yaron Keren <yaron.keren@…>

The fix to boost is to modify typeof.hpp:52 from

 #elif defined(__GNUC__)


 #elif defined(__GNUC__) || defined(__clang__)

taking indeed the "typeof" branch before the msvc hacks branch.

comment:2 Changed 14 months ago by steinar+boost@…

Still there in 1.64.0. Is there a way to get this in?

comment:3 Changed 12 months ago by awulkiew

Milestone: To Be DeterminedBoost 1.65.0
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.