|
Boost Users : |
Subject: Re: [Boost-users] variant visitor using SFINAE problem
From: Igor R (boost.lists_at_[hidden])
Date: 2013-05-26 09:20:54
>> What visit() overload did you intend to call for vector<int>? Note
>> that enable_if condition:
>> mpl::and_<
>> boost::has_range_const_iterator<VisitableT>,
>> boost::is_void<typename VisitorT::result_type>
>> >,
>>
>> seems to be fulfilled for vector<int> case, doesn't it? But it's
>> obviously not the right overload, as int is not variant.
>
>
> thank you, you did point out it; unfortunately, my extension doesn't
> compile.
Because you actually should apply is_variant metafunction to the
value_type of the container, not to the container itself:
mpl::not_<is_variant<typename VisitableT::value_type> >,
<....>
is_variant<typename VisitableT::value_type>,
HTH,
Igor'.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net