All pastes #915274 Raw Edit

Jemand

public cpp v1 · immutable
#915274 ·published 2008-02-23 17:42 UTC
rendered paste body
class A {  .....};class B {protected:   A & m_1;  A & m_2;  ...public  B(A& a1, A& a2);  ~B();  void foo();};B::B(A& a1, A& a2): m_1(a1), m_2(a2){}B::~B() {}void B::foo(){  A& a(m_1);  if (some condition)    a = m_2;  // error here: class 'A' does not have 'operator ='  ....}