[ create a new paste ] login | about

Link: http://codepad.org/97oaJNfl    [ raw code | output | fork ]

C++, pasted on Jan 31:
1
2
3
4
5
6
7
8
9
10
struct A {
private:
  A(A const&) {}
};

A f();

int main() {
  A const &ref = f();
}


Output:
1
2
3
In function 'int main()':
Line 3: error: 'A::A(const A&)' is private
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: