0

The following code snippet

class C {
    friend void f(int = 42);
};

gives me an error:

 friend declaration specifying a default argument must be a definition

What is the reason to prevent only declaration here? In which situation it can be an issue if it would be allowed?

Azat Ibrakov
  • 9,998
  • 9
  • 38
  • 50
αλεχολυτ
  • 4,792
  • 1
  • 35
  • 71

0 Answers0