El 06/05/2017 a las 16:49, Edward Diener via Boost escribió:
The explanation you cite with the link above is a tutorial, not an explanation. Furthermore, perhaps for the sake of syntactical brevity, you cite an example in which a lambda function returns another lambda function !!! This may be exceedingly clever but it can hardly be a mainstream explanation of your functionality which most programmers would easily understand as how a function collection "works". Your examples above are a much better and more mainstream example of how the function_collection works, and even the short explanation you have given me should have been in the documentation.
Will think about how to make the intro part more accessible along the lines you suggest.
It is also hard to understand what the advantage of a poly collection of these objects entail over a more normal C++ collection ( vector, array etc. ) of std::function<Signature> objects, since the latter object type already represents a generalized callable construct in C++. Some of your performance tests suggest there is little or no advantage, so a discussion of this would have been welcome in the documentation.
Performance is actually the *only* reason for using Boost.PolyCollection
as opposed to say
std:.vector