Boost logo

Boost :

From: Mike (mike.dev_at_[hidden])
Date: 2021-03-15 16:00:11


> Gesendet: Montag, 15. März 2021 um 12:48 Uhr
> Von: "Damian Vicino via Boost" <boost_at_[hidden]>
>
> Hi,
> And, I noticed there was nothing in the development guidelines about when
> to implement as headers-only vs built library.

Well, I've no idea about the historical context, but one obvious point
(that I still feel the need to make) is that many boost libraries are very
heavily templated (and/or constexpr) and as such have to be header only anyway.
Of course, you often can put part of the functionality into a regular function
that you then implement in a cpp file, but if 90% of your code is in headers
already, there is usually little benefit in putting the remainign 10%
into a separate source file and force the user to handle the
increased complexity of building the lib (in a compatible manner).

In an ideal world, c++ would quickly adapt modules and the recommendation
for future contributors would be to just use modules, but thats not really
a practical suggestion.

Best Mike

> Best,
> Damian
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>


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