Boost logo

Boost :

Subject: Re: [boost] [config] 'requres' doesn't take differing -std into account
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2015-06-22 19:50:03


On 22 Jun 2015 at 7:46, Robert Ramey wrote:

> > I do wish to reiterate my desire for a std=98|03|11|14|1z parameter
> > for ./b2. I think users get confused - as you can see on
> > stackoverflow - on how to build Boost for C++ 11 or 14 or 1z. A
> > simple
> >
> > ./b2 toolset=clang std=14
> >
> > ... I think is clear and obvious and memorable.
>
> Hmmm currently I use b2 toolset=clang cxxflags=-std=c++03 is that so bad?

1. That command wouldn't work on MSVC. In documentation you have to
keep saying "If using MSVC use the b2 command, else use this other b2
command". This is confusing for users.

2. You need std=XX put into the path generated inside bin.v2 to
disambiguate binaries built using different std. Using cxxflags lets
differing even incompatible binaries mix. This can be confusing. Even
I have seen weird link errors at times, and realised only after some
head scratching it's because I'm using a non-C++ 11 Boost and I
accidentally typed the MSVC b2 command form on POSIX without
thinking.

What I would really prefer is a failure to find a library at all when
I use mismatched std=XX config.

Niall

-- 
ned Productions Limited Consulting
http://www.nedproductions.biz/ 
http://ie.linkedin.com/in/nialldouglas/



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