Adam Dreaver
Adam Dreaver

Reputation: 341

What does class Derived1 : Base {}; mean?

I know what

class Derived1 : public Base {};  

class Derived1 : private Base {}; 

mean, but what does

class Derived1 : Base {}; 

mean?

I found an example of this in the excellent boost article on exception handling: http://www.boost.org/community/error_handling.html under the section "2) virtual inheritance".

Upvotes: 0

Views: 92

Answers (1)

alf
alf

Reputation: 18550

When the visibility is not specified, private is used. So:

class Derived1 : Base {}; 

is the same as

class Derived1 : private Base {};

Upvotes: 5

Related Questions