My gut feeling is it is not. I am in the following situation:
class PluginLoader { public: Builder* const p_Builder; Logger* const p_Logger; //Others }; PluginLoader::PluginLoader(Builder* const pBuilder) :p_Builder(pBuilder), p_Logger(pBuilder->GetLogger()) { //Stuff }
Or should I change the constructor and pass a Logger* const from where PluginLoader is constructed?
Logger* const
PluginLoader
That's perfectly fine and normal. p_Builder was initialized before it.
p_Builder
1.4m articles
1.4m replys
5 comments
57.0k users