@@ -297,12 +297,12 @@ template<typename F, typename V, typename R>
297
297
struct dispatcher <F, V, R>
298
298
{
299
299
using result_type = R;
300
- VARIANT_INLINE static result_type apply_const (V const &, F const &)
300
+ VARIANT_INLINE static result_type apply_const (V const &, F const & f )
301
301
{
302
302
throw std::runtime_error (std::string (" unary dispatch: FAIL " ) + typeid (V).name ());
303
303
}
304
304
305
- VARIANT_INLINE static result_type apply (V &, F &)
305
+ VARIANT_INLINE static result_type apply (V &, F & f )
306
306
{
307
307
throw std::runtime_error (std::string (" unary dispatch: FAIL " ) + typeid (V).name ());
308
308
}
@@ -716,7 +716,7 @@ class variant
716
716
// unary
717
717
template <typename F, typename V>
718
718
auto VARIANT_INLINE
719
- static visit (V const & v, F const & f)
719
+ static visit (V const & v, F & f)
720
720
-> decltype(detail::dispatcher<F, V,
721
721
typename detail::result_of_unary_visit<F,
722
722
typename detail::select_type<0 , Types...>::type>::type, Types...>::apply_const(v, f))
@@ -740,7 +740,7 @@ class variant
740
740
// const
741
741
template <typename F, typename V>
742
742
auto VARIANT_INLINE
743
- static binary_visit (V const & v0, V const & v1, F const & f)
743
+ static binary_visit (V const & v0, V const & v1, F & f)
744
744
-> decltype(detail::binary_dispatcher<F, V,
745
745
typename detail::result_of_binary_visit<F,
746
746
typename detail::select_type<0 , Types...>::type>::type, Types...>::apply_const(v0, v1, f))
@@ -751,7 +751,7 @@ class variant
751
751
// non-const
752
752
template <typename F, typename V>
753
753
auto VARIANT_INLINE
754
- static binary_visit (V& v0, V& v1, F const & f)
754
+ static binary_visit (V& v0, V& v1, F & f)
755
755
-> decltype(detail::binary_dispatcher<F, V,
756
756
typename detail::result_of_binary_visit<F,
757
757
typename detail::select_type<0 , Types...>::type>::type, Types...>::apply(v0, v1, f))
0 commit comments