mirror of
https://github.com/boostorg/fusion.git
synced 2025-07-30 04:27:30 +02:00
Tweaks for VC7.1
[SVN r35054]
This commit is contained in:
@ -87,12 +87,17 @@ namespace boost { namespace fusion
|
|||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
explicit cons(
|
explicit cons(
|
||||||
Sequence const& seq
|
Sequence const& seq
|
||||||
|
#if defined(BOOST_MSVC)
|
||||||
|
// VC++ gets confused when RHS is a derived type. It fails to call
|
||||||
|
// the copy ctor and attempts to call this templated constructor instead.
|
||||||
, typename disable_if<
|
, typename disable_if<
|
||||||
mpl::or_<
|
mpl::or_<
|
||||||
is_convertible<Sequence, cons> // use copy ctor instead
|
is_convertible<Sequence, cons> // use copy ctor instead
|
||||||
, is_convertible<Sequence, Car> // use copy to car instead
|
, is_convertible<Sequence, Car> // use copy to car instead
|
||||||
>
|
>
|
||||||
>::type* dummy = 0)
|
>::type* dummy = 0
|
||||||
|
#endif
|
||||||
|
)
|
||||||
: car(*fusion::begin(seq))
|
: car(*fusion::begin(seq))
|
||||||
, cdr(fusion::next(fusion::begin(seq)), mpl::true_()) {}
|
, cdr(fusion::next(fusion::begin(seq)), mpl::true_()) {}
|
||||||
|
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
#include <boost/mpl/bool.hpp>
|
#include <boost/mpl/bool.hpp>
|
||||||
#include <boost/type_traits/add_reference.hpp>
|
#include <boost/type_traits/add_reference.hpp>
|
||||||
#include <boost/type_traits/add_const.hpp>
|
#include <boost/type_traits/add_const.hpp>
|
||||||
|
#include <boost/type_traits/is_convertible.hpp>
|
||||||
|
#include <boost/utility/enable_if.hpp>
|
||||||
|
|
||||||
namespace boost { namespace fusion
|
namespace boost { namespace fusion
|
||||||
{
|
{
|
||||||
@ -52,7 +54,16 @@ namespace boost { namespace fusion
|
|||||||
: vec(rhs.vec) {}
|
: vec(rhs.vec) {}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
explicit vector(T const& rhs)
|
explicit vector(
|
||||||
|
T const& rhs
|
||||||
|
#if defined(BOOST_MSVC)
|
||||||
|
// VC++ gets confused when RHS is a derived type. It fails to call
|
||||||
|
// the copy ctor and attempts to call this templated constructor instead.
|
||||||
|
, typename disable_if<
|
||||||
|
is_convertible<T, vector> // use copy ctor instead
|
||||||
|
>::type* dummy = 0
|
||||||
|
#endif
|
||||||
|
)
|
||||||
: vec(rhs) {}
|
: vec(rhs) {}
|
||||||
|
|
||||||
// Expand a couple of forwarding constructors for arguments
|
// Expand a couple of forwarding constructors for arguments
|
||||||
|
Reference in New Issue
Block a user