Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

almost 5 years ago

Language

Compiler

Options

Author

anonymous

almost 5 years ago

$
prog.cc:27:38: error: 'Base' is a private member of 'Base'
    explicit Derived(std::unique_ptr<Base> base) : base_{std::move(base)} {}
                                     ^
prog.cc:19:21: note: constrained by private inheritance here
class AnotherBase : private Base {
                    ^~~~~~~~~~~~
prog.cc:6:7: note: member is declared here
class Base {
      ^
prog.cc:34:21: error: 'Base' is a private member of 'Base'
    std::unique_ptr<Base> base_;
                    ^
prog.cc:19:21: note: constrained by private inheritance here
class AnotherBase : private Base {
                    ^~~~~~~~~~~~
prog.cc:6:7: note: member is declared here
class Base {
      ^
2 errors generated.
Exit Code:
1