On Sunday, March 20, 2016 8:11 AM, Gonzalo BG
wrote: I want to make a minor remark about this:
[...]
1. Inline functions are weak symbols and don't violate ODR 2. Static variables in C++ do violate ODR (btw in C they do not) so basically you COPY every instance of the functions across compilation unit.
[...]
FIT (and range-v3, and many other libraries) follow the best practice we currently have in C++ < 17 here, which is Eric Niebler's N4381 Suggested Design for Customization Points [0].
It seems, however, that from the discussion here and in the other reviews of FIT, this best practice is not "common practice" yet.
The failure is only on us for not giving it enough exposure.
IMO all new Boost libraries should be following N4381 as FIT does.
On first encounter, however, a macro like BOOST_FIT_STATIC_LAMBDA is going to look very suspicious: why is this required? what about ODR? ...
Since these macros are going to remain the only viable solution for a long time (until we drop support for C++<17) we should address these questions on first usage in the documentation of new libraries, maybe by linking against N4381 directly (which addresses the issue in great detail) or by providing a small summary of N4381 in the documentation or the
Boost wiki.
I agree and plan to add this to the documentation.
[0] http://ericniebler.github.io/std/wg21/D4381.html#no-violations-of-the-one-de...
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost