fixed "explicit" problem

[SVN r35732]
This commit is contained in:
Joel de Guzman
2006-10-24 23:26:52 +00:00
parent 3732bb538a
commit aede3f3300
7 changed files with 17 additions and 14 deletions

View File

@ -85,7 +85,7 @@ namespace boost { namespace fusion
: car(rhs.car), cdr(rhs.cdr) {} : car(rhs.car), cdr(rhs.cdr) {}
template <typename Sequence> template <typename Sequence>
explicit cons( cons(
Sequence const& seq Sequence const& seq
, typename disable_if< , typename disable_if<
mpl::or_< mpl::or_<

View File

@ -35,8 +35,8 @@ namespace boost { namespace fusion
list(list<BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, U)> const& rhs) list(list<BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, U)> const& rhs)
: inherited_type(rhs) {} : inherited_type(rhs) {}
template <typename T> template <typename Sequence>
explicit list(T const& rhs) list(Sequence const& rhs)
: inherited_type(rhs) {} : inherited_type(rhs) {}
// Expand a couple of forwarding constructors for arguments // Expand a couple of forwarding constructors for arguments

View File

@ -45,8 +45,8 @@ namespace boost { namespace fusion
map() map()
: data() {} : data() {}
template <typename T> template <typename Sequence>
explicit map(T const& rhs) map(Sequence const& rhs)
: data(rhs) {} : data(rhs) {}
#include <boost/fusion/sequence/container/map/detail/map_forward_ctor.hpp> #include <boost/fusion/sequence/container/map/detail/map_forward_ctor.hpp>

View File

@ -45,8 +45,8 @@ namespace boost { namespace fusion
set() set()
: data() {} : data() {}
template <typename T> template <typename Sequence>
explicit set(T const& rhs) set(Sequence const& rhs)
: data(rhs) {} : data(rhs) {}
#include <boost/fusion/sequence/container/set/detail/set_forward_ctor.hpp> #include <boost/fusion/sequence/container/set/detail/set_forward_ctor.hpp>

View File

@ -88,7 +88,10 @@
typedef mpl::int_<N> size; typedef mpl::int_<N> size;
BOOST_PP_CAT(vector, N)() {} BOOST_PP_CAT(vector, N)() {}
#if (N == 1)
explicit
#endif
BOOST_PP_CAT(vector, N)( BOOST_PP_CAT(vector, N)(
BOOST_PP_ENUM_BINARY_PARAMS( BOOST_PP_ENUM_BINARY_PARAMS(
N, typename detail::call_param<T, >::type _)) N, typename detail::call_param<T, >::type _))
@ -100,7 +103,7 @@
: base_type(BOOST_PP_ENUM_PARAMS(N, vec.m)) {} : base_type(BOOST_PP_ENUM_PARAMS(N, vec.m)) {}
template <typename Sequence> template <typename Sequence>
explicit BOOST_PP_CAT(vector, N)( BOOST_PP_CAT(vector, N)(
Sequence const& seq Sequence const& seq
, typename disable_if<is_convertible<Sequence, T0> >::type* dummy = 0) , typename disable_if<is_convertible<Sequence, T0> >::type* dummy = 0)
: base_type(base_type::init_from_sequence(seq)) {} : base_type(base_type::init_from_sequence(seq)) {}

View File

@ -56,10 +56,10 @@ namespace boost { namespace fusion
vector(vector const& rhs) vector(vector const& rhs)
: vec(rhs.vec) {} : vec(rhs.vec) {}
template <typename T> template <typename Sequence>
explicit vector(T const& rhs) vector(Sequence const& rhs)
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1400) #if BOOST_WORKAROUND(BOOST_MSVC, <= 1400)
: vec(ctor_helper(rhs, is_base_of<vector, T>())) {} : vec(ctor_helper(rhs, is_base_of<vector, Sequence>())) {}
#else #else
: vec(rhs) {} : vec(rhs) {}
#endif #endif

View File

@ -30,8 +30,8 @@ namespace boost { namespace fusion
tuple() tuple()
: base_type() {} : base_type() {}
template <typename T> template <typename Sequence>
explicit tuple(T const& rhs) tuple(Sequence const& rhs)
: base_type(rhs) {} : base_type(rhs) {}
#include <boost/fusion/tuple/detail/tuple_forward_ctor.hpp> #include <boost/fusion/tuple/detail/tuple_forward_ctor.hpp>