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
  • 8,514
  • 9
  • 36
  • 44
αλεχολυτ
  • 4,504
  • 1
  • 27
  • 66

0 Answers0