Author
anonymous
over 8 years ago
Language
Compiler
Options
Author
anonymous
over 8 years ago
$
prog.cc:20:40: error: call to deleted constructor of 'Base'
Derived::Derived(init_with_string_t) : Base(init_with_string_t::value ? Base("forty-two") : Base(42))
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.cc:8:5: note: 'Base' has been explicitly marked deleted here
Base(const Base&&) = delete;
^
prog.cc:27:45: error: no matching constructor for initialization of 'Derived'
return std::unique_ptr<Derived>(new Derived(std::true_type{}));
^ ~~~~~~~~~~~~~~~~
prog.cc:11:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::true_type' (aka 'std::__1::integral_constant<bool, true>') to 'const Derived' for 1st argument
struct Derived : Base{
^
prog.cc:29:45: error: no matching constructor for initialization of 'Derived'
return std::unique_ptr<Derived>(new Derived(std::true_type{}));
^ ~~~~~~~~~~~~~~~~
prog.cc:11:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::true_type' (aka 'std::__1::integral_constant<bool, true>') to 'const Derived' for 1st argument
struct Derived : Base{
^
3 errors generated.
Exit Code:
1