And here is one of the errors :
boost_1_49_0\boost\variant\variant.hpp(1399): error C2666:
'boost::variant<T0_,T1,T2,T3,T4>::convert_construct' : 2 overloads have
similar conversions
1> with
1> [
1>
T0_=MultVarVar<Variant1,Variant2>,
1>
T1=Zero1,
1>
T2=One1,
1>
T3=Variant1,
1>
T4=Variant2
1> ]
1>
c:\_petros\_otc\ext\boost_1_49_0\boost\variant\variant.hpp(1384): could be 'void
boost::variant<T0_,T1,T2,T3,T4>::convert_construct<_V,_Z,_U,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_,boost::detail::variant::void_>(const
boost::variant<_V,T1,T2> &,long)'
1> with
1> [
1>
T0_=MultVarVar<Variant1,Variant2>,
1>
T1=Zero1,
1>
T2=One1,
1>
T3=Variant1,
1>
T4=Variant2,
1>
_V=Vector1,
1>
_Z=Zero1,
1>
_U=One1
1> ]
1>
c:\_petros\_otc\ext\boost_1_49_0\boost\variant\variant.hpp(1315):
or 'void
boost::variant<T0_,T1,T2,T3,T4>::convert_construct<const T>(T
&,int,boost::mpl::false_)'
1> with
1> [
1>
T0_=MultVarVar<Variant1,Variant2>,
1>
T1=Zero1,
1>
T2=One1,
1>
T3=Variant1,
1>
T4=Variant2,
1>
T=Variant1
1> ]
1> while trying to
match the argument list '(const Variant1, long)'
1>
c:\_petros\_otc\tests\variant\variant\main.cpp(120) : see reference to function
template instantiation
'boost::variant<T0_,T1,T2,T3,T4>::variant<_V>(const T &)' being
compiled
1> with
1> [
1>
T0_=MultVarVar<Variant1,Variant2>,
1>
T1=Zero1,
1>
T2=One1,
1>
T3=Variant1,
1>
T4=Variant2,
1>
_V=Variant1,
1>
T=Variant1
1> ]
1>
c:\_petros\_otc\tests\variant\variant\main.cpp(151) : see reference to function
template instantiation
'MultVarVarResult<_V1,_V2>::MultVarVarResult<_V1>(const _V &)'
being compiled
1> with
1> [
1>
_V1=Variant1,
1>
_V2=Variant2,
1>
_V=Variant1
1> ]
1>
Any help on this will be greatly appreciated!
And the questions:
What happens if a variant contains two identical template arguments ? when
I create a (variant) object from one of the two identicals, how does it know
which template argument I need ?