Boost logo

Boost Users :

Subject: Re: [Boost-users] [lexical_cast] Compilation issues with gcc 4.6 -std=c++0x
From: Scott Meyers (NeverRead_at_[hidden])
Date: 2011-11-15 23:29:00


On 11/15/2011 6:54 PM, Nathan Ridge wrote:
> Try compiling with -std=gnu++0x

That works, thanks.

> GCC's -std flag is a little confusing:
> * no -std flag means "C++98 with GNU extensions"
> * -std=c++98 means "C++98 with no GNU extensions"
> * -std=c++0x means "C++0x with no GNU extensions"
> * -std=gnu++0x means "C++0x with GNU extensions"
>
> So, if before you were compiling with no -std flag, and now
> you are compiling with -std=c++0x, then in addition to
> enabling C++0x features, you are disabling GNU extensions,
> which I'm guessing wasn't your intention.

Bingo, thanks again.

> Now admittedly, Boost should work in the absence of GNU
> extensions, so there *is* a bug in either Boost or MinGW
> behind the scenes, but you have a workaround for now.

I do, indeed.

Thanks once more.

Scott


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net