Opened 14 years ago

Last modified 13 years ago

#1966 new Bugs

Need VC8 workaround

Reported by: Dave Abrahams Owned by: Daniel Wallin
Milestone: Boost 1.36.0 Component: parameter
Version: Boost 1.35.0 Severity: Problem
Keywords: Cc:

Description

template <class A0, class A1 = boost::parameter::void_>
struct sparse
  : sparse_impl<
        typename sparse_signature::bind<A0,A1>::type
    >
{
    typedef sparse_impl< typename sparse_signature::bind<A0,A1>::type > base;
    
    BOOST_PARAMETER_CONSTRUCTOR(
        sparse, (base), tag,
        (required
         (nrows, (std::size_t))
        )
        (optional
         (nstored, (std::size_t))
        )
    )

    // workarounds for VC8 bugs
    sparse(sparse const& rhs)
    : sparse_impl((sparse_impl const&)rhs)
    {}
    sparse& operator=(sparse const& rhs)
    {
        *(sparse_impl*)this = (sparse_impl const&)rhs;
        return *this;
    }
};

The problem is that the automatically-generated copy ctor and assignment essentially leave out the casts above, and get routed to the templated ctor in the base class. The question is, should we incorporate these fixes in BOOST_PARAMETER_CONSTRUCTOR?

Change History (1)

comment:1 by Steven Watanabe, 13 years ago

Component: Noneparameter
Note: See TracTickets for help on using tickets.