Opened 2 years ago

Closed 6 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

Attachments (0)

Change History (3)

comment:1 Changed 2 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 8 months ago by steinar+boost@…

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

comment:3 Changed 6 months ago by awulkiew

Milestone: To Be DeterminedBoost 1.65.0
Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Peder Holt.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.