Boost logo

Boost :

Subject: Re: [boost] [Fit] formal review starts today
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2016-03-06 01:13:38


AMDG

  Another (obscure) reason to be careful about
using inheritance:

#include <boost/fit/flip.hpp>

struct base { base(int) {} };

struct derived : virtual base {
    derived() : base(1) {}
    void operator()(int, void *) const {}
};

int main() {
    boost::fit::flip(derived())(nullptr, 2);
}

boost/fit/flip.hpp(56): error C2512: 'base::base': no appropriate
default constructor available

In Christ,
Steven Watanabe


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk