hello, i'm struggling to come up with the correct syntax.
that works and compiles...until i put Foo into a vector, and it complains i don't have a assignment operator.Code:class Foo { public: Foo(const Bar& bar); private: const Bar& m_bar; }; Foo::Foo(const Bar& bar) : m_bar(bar) { }
ok, so i define one...but now i have a problem where i don't want to change the m_bar reference because i can't assign it something else...
is there a way around this?