Modify

Opened 10 years ago

Last modified 9 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?

Attachments (0)

Change History (1)

comment:1 Changed 9 years ago by Steven Watanabe

Component: Noneparameter

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain Daniel Wallin.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.