Should I feel “uncomfortable” using auto in C++? [duplicate]
We use auto where we don’t have a specific reason to mention the type
explicitly. “Specific reasons” include:
How to maintain encapsulation with composition in C++?
I am designing a class Master
that is composed from multiple other classes, A
, Base
, C
and D
. These four classes have absolutely no use outside of Master
and are meant to split up its functionality into manageable and logically divided packages. They also provide extensible functionality as in the case of Base
, which can be inherited from by clients.
How to maintain encapsulation with composition in C++?
I am designing a class Master
that is composed from multiple other classes, A
, Base
, C
and D
. These four classes have absolutely no use outside of Master
and are meant to split up its functionality into manageable and logically divided packages. They also provide extensible functionality as in the case of Base
, which can be inherited from by clients.
How to maintain encapsulation with composition in C++?
I am designing a class Master
that is composed from multiple other classes, A
, Base
, C
and D
. These four classes have absolutely no use outside of Master
and are meant to split up its functionality into manageable and logically divided packages. They also provide extensible functionality as in the case of Base
, which can be inherited from by clients.
How to maintain encapsulation with composition in C++?
I am designing a class Master
that is composed from multiple other classes, A
, Base
, C
and D
. These four classes have absolutely no use outside of Master
and are meant to split up its functionality into manageable and logically divided packages. They also provide extensible functionality as in the case of Base
, which can be inherited from by clients.
C++ strongly typed typedef
I’ve been trying to think of a way of declaring strongly typed typedefs, to catch a certain class of bugs in the compilation stage. It’s often the case that I’ll typedef an int into several types of ids, or a vector to position or velocity:
High-level description of how experimental C++ features are developed?
Herb Sutter in a video answers a question about the concepts proposal considered for C++11 and from his remarks it sounds like multiple groups offered prototype implementations but all of them left concerns about slow compile times. The comment surprised me because it suggests that, at least in some cases, the prototypes being developed are not just proofs of concept — they’re even expected to perform. All the work that must take has me curious.
High-level description of how experimental C++ features are developed?
Herb Sutter in a video answers a question about the concepts proposal considered for C++11 and from his remarks it sounds like multiple groups offered prototype implementations but all of them left concerns about slow compile times. The comment surprised me because it suggests that, at least in some cases, the prototypes being developed are not just proofs of concept — they’re even expected to perform. All the work that must take has me curious.
High-level description of how experimental C++ features are developed?
Herb Sutter in a video answers a question about the concepts proposal considered for C++11 and from his remarks it sounds like multiple groups offered prototype implementations but all of them left concerns about slow compile times. The comment surprised me because it suggests that, at least in some cases, the prototypes being developed are not just proofs of concept — they’re even expected to perform. All the work that must take has me curious.
Public versus private inheritance when some of the parent’s methods need to be exposed?
Public inheritance means that all fields from the base class retain their declared visibility, while private means that they are forced to ‘private’ within the derived class’s scope.