Boost logo

Boost :

Subject: [boost] Recommended Boost file structure?
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2016-03-04 12:04:31

I've been looking at the structure of Phil Bouchard's prototype block_ptr library and am wondering if the structure of the header
files is optimal/Boost_Standard/wrong.

describes the Boost structure, but looks well out of date to me.

(Can/should anyone still update this to reflect Modular Boost?)

And looking through libraries, there seems some variation.

I'm asking for views on what the best structure should be, (or if it doesn't matter much?)

Some libraries have a structure

modular_boost/libs/algorithm/include/boost/algorithm which contains

algorithm.hpp and string.hpp that one might use directly.

Others like asio contain /asio and just a asio.hpp that includes (all?) other headers.

Others like multiprecision contain just a single folder


but no other header files, not even forwarding header(s).

So should the structure be that all headers (except forwarding headers - or a single header) are within


so the user should include with

  #include <boost/some_library/some_header.hpp
  #include <boost/some_library/other_header.hpp

or to get everything useful

  #include <boost/some_library/some_library_fwd.hpp>

possibly with a /detail folder containing headers that should not be called by users.

Just checking...


Paul A. Bristow
Prizet Farmhouse
Kendal UK LA8 8AB
+44 (0) 1539 561830

Boost list run by bdawes at, gregod at, cpdaniel at, john at