Circular dependencies are just bad design. If you feel the urge to have a child/owned object “know about” its parent/owner, you should pass the child a std::function instead of a full reference to the owner.
More Related Contents:
- Where are static variables stored in C and C++?
- What’s the difference between __PRETTY_FUNCTION__, __FUNCTION__, __func__?
- How to make a .lib file when have a .dll file and a header file
- Tool to track #include dependencies [closed]
- C++ Redefinition Header Files (winsock2.h)
- What is special about numbers starting with zero?
- Best compiler warning level for C/C++ compilers? [closed]
- Do unused functions get optimized out?
- Change the current working directory in C++
- How to include header files in GCC search path?
- Why does C need “struct” keyword and not C++?
- Unexpected order of evaluation (compiler bug?) [duplicate]
- Can I separate C++ main function and classes from Objective-C and/or C routines at compile and link?
- Template within template: why “`>>’ should be `> >’ within a nested template argument list”
- C++ Header order [closed]
- Difference between and ?
- Can I write C++ code without headers (repetitive function declarations)?
- Declaring and initializing a variable in a Conditional or Control statement in C++
- Portability of #warning preprocessor directive
- Update GCC on OSX
- What happens with an extern inline function?
- c++ template and header files [duplicate]
- Including C headers inside a C++ program
- Understanding stack frame of function call in C/C++? [closed]
- Template instantiation details of GCC and MS compilers
- C++ string literal data type storage
- Uses for anonymous namespaces in header files
- Two classes that refer to each other
- error: Class has not been declared despite header inclusion, and the code compiling fine elsewhere
- _iterator_debug_level value ‘0’ doesn’t match value ‘2’