[range] Boost.Range adaptor return types

I would like to return an adapted Boost.Range from a function and would like to know what return type to put for the function. In my case, I am wrapping a counting_range with transformed(). Is there a metafunction to compute these return types? Should I just be using boost::result_of? The result_of expression is very long because of the nesting (though of course a typedef can help with the inner parts of that). Thank you for your help. -- Jeremiah Willcock

Le 22/07/2010 18:42, Jeremiah Willcock wrote:
I would like to return an adapted Boost.Range from a function and would like to know what return type to put for the function. In my case, I am wrapping a counting_range with transformed(). Is there a metafunction to compute these return types? Should I just be using boost::result_of? The result_of expression is very long because of the nesting (though of course a typedef can help with the inner parts of that). Thank you for your help.
boost::transform_range

On Thu, 22 Jul 2010, Mathias Gaunard wrote:
Le 22/07/2010 18:42, Jeremiah Willcock wrote:
I would like to return an adapted Boost.Range from a function and would like to know what return type to put for the function. In my case, I am wrapping a counting_range with transformed(). Is there a metafunction to compute these return types? Should I just be using boost::result_of? The result_of expression is very long because of the nesting (though of course a typedef can help with the inner parts of that). Thank you for your help.
boost::transform_range
. It seems however that the naming of these things is not consistent, as some have a name that ends with -ed. I have file a ticket about this.
I didn't see this in the manual, and I also missed the "using" in the source code that pulls in the class from range_detail so I had assumed the exact type was internal. Thank you for clarifying it. -- Jeremiah Willcock
participants (2)
-
Jeremiah Willcock
-
Mathias Gaunard