Boost logo

Boost :

Subject: Re: [boost] [mpl] Problem with VC++14 and boost::mpl::size_t
From: Matt Calabrese (rivorus_at_[hidden])
Date: 2015-07-25 02:48:09


On Fri, Jul 24, 2015 at 7:41 PM, Edward Diener <eldiener_at_[hidden]>
wrote:

> pointing to the line after it encounters 'struct size_t' as far as I can
> make out ( you need to preprocess the size_t.cpp test, comment out the
> #line directives and run the test against the preprocessed result to see
> what the compiler is objecting to ). It therefore fails a number of mpl
> tests which all prior versions of VC++ pass.
>
> It flags this error in 5 mpl tests which use the boost::mpl::size_t
> integral wrapper, among which the easiest to analyze is the size_t.cpp test
> itself.
>
> Anybody have any idea what is going on here with the compiler, or whether
> it can be fixed somehow in VC++14 for the mpl code ?
>

I don't have the compiler, but my guess is it's probably actually confused
on the line:

typedef size_t type;

A simple workaround to try could be to change the typedef to:

typedef mpl::size_t<N> type;

If that fix works, I'd be surprised if such a change would break any other
compilers. This is all just a guess, though.

-- 
-Matt Calabrese

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk