Prototypes for a default constructor

Why isn't 'Bar(const Bar&b)' a default constructor as well?
1
2
3
4
5
6
7
8
Which of the following are prototypes for a default constructor?   
Bar(int a=0, int b=0);
    
Bar();
    
Bar(const Bar& b);
    
Bar() = 0;
A default constructor is a constructor which can be called with no arguments (either defined with an empty parameter list, or with default arguments provided for every parameter).
https://en.cppreference.com/w/cpp/language/default_constructor

1
2
3
4
5
6
7
8
9
10
struct bar
{
    explicit bar( int v ) : value(v) {}

    // this would be a default constructor
    // it can be invoked with no arguments (there is a default argument)
    bar( const bar& that = bar(0) ) : value(that.value) {}

    int value ;
};
Topic archived. No new replies allowed.