Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Child {};
- class Container
- {
- public:
- Container() : field(Child())
- {
- }
- protected:
- const Child field;
- };
- class ContainerRef
- {
- public:
- ContainerRef() : field(Child())
- {
- }
- protected:
- const Child &field;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement