|
Boost : |
Subject: Re: [boost] [type_erasure] Force any to have typedef
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2014-07-09 10:34:37
AMDG
On 07/09/2014 03:49 AM, Benedek Thaler wrote:
> Assume I have the following function template:
>
> template <typename Container>
> typename Container::value_type get_front(const Container& c)
> {
> return c.front();
> }
>
> Is there a way I can force type_erasure::any<> to have a `value_type`
> typedef? I can create a concept which requires the underlying type to have
> it, but I'd like to make `any` to have such a typedef.
>
Specialize concept_interface. See
http://www.boost.org/doc/html/boost_typeerasure/concept.html#boost_typeerasure.concept.custom
and
http://www.boost.org/doc/html/boost/type_erasure/concept_interface.html
In Christ,
Steven Watanabe
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk