Boost logo

Boost :

Subject: Re: [boost] Header Inclusion practices
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2017-04-11 21:11:04


> // example using he safe numerics library
>
> #include <iostream>
> #include <limits>
> #include <boost/integer.hpp>
>
> #include "../include/cpp.hpp"
> #include "../include/exception.hpp"
> #include "../include/safe_integer.hpp"
> #include "../include/safe_range.hpp"

This is in your ~/example directory right in the base directory of
library right?

In which case your example code is confusing. It should be:

#include "../include/boost/safe_numerics/safe_range.hpp"

... or something like that if you're going to be consistent.

> This has raised consternation in some quarters - but I don't see
> anything wrong with it. It basically means that only the <boost
> libraries are depended on the whole b2 business. I didn't want the
> incubator version of the the safe numeric library to depend on the
> library having been accepted into boost have have b2 run. Also I don't
> like adding the library to boost - and having to change all the headers.
> What if someone want's to run the tests/examples outside of the boost
> tree.
>
> As far as I know this question has never been asked before and I'm
> curious to know what others might have to say about this.

I think there are big changes coming to how new C++ libraries #include
stuff. If you want to transparently support Modules, ABI version pinning
and precompiled headers at least. You'll be seeing (to my knowledge) the
first C++ Modules ready Boost format library up for review with Outcome
end of May. You'll be glad to know it ICEs MSVC handily, but in theory
it will work one day when the compiler gets debugged :)

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