AMDG On 08/03/2012 02:32 PM, Sergey Mitsyn wrote:
Hello,
Just some questions:
1) Missing #include <cassert> in "boost\type_erasure\detail\storage.hpp"
This header doesn't use assert.
2) Maybe i'm missing something, but it feels like the library doesn't support concept function arguments an return types that contain placeholder as a template parameter. Imagine a concept that returns "std::pair
", where TIterator is another any: template
struct foo_concept { typedef std::pair result_type; static result_type apply(C& c) { return std::make_pair(c.begin(),c.end()); } }; Probably the problem is with detail::rebind_placeholders_in_argument. The expected behavior is replacing 'TIterator' with something like 'std::_Vector_iterator' (or what it should be in specific case), just like mpl::lambda replaces its mpl::_N placeholders.
Also I cannot just replace std::pair with another any - I'm trying to match the preexisting concepts.
I've put an example into attachment.
The library can't handle this without
special knowledge of std::pair. This
would mean creating some kind of extension
point, which I'm not willing to do at this point.
The easiest way to handle this particular
case is to use output parameters
template