In the following code you can see that I'm inheriting the base class ctors into the derived class under the "private" access specifier. My initial tho ...
In the following code you can see that I'm inheriting the base class ctors into the derived class under the "private" access specifier. My initial tho ...
I have a base class defining a constant and the child class can use it using alias. The construct is as below However, when I define a subclass of ...
We have a templated type Foo<T>. In the codebase, it's 99% instantiated with a couple of types, and I would like to use a distinct name for thos ...
(You might see this question as a duplicate of this, but, to be honest, I've not really understood the matter, so I'm asking separately with my own wo ...
The following code Is compiled fine by GCC 8.2 (calls the size_t, string constructor). However, clang up to 14 rejects it with as if V had no co ...
I have an array with items of type variant that I want to iterator over using the generic std::array iterator. Now I want to do the management of the ...
I'm a bit confused about the implications of the using declaration. The keyword implies that a new type is merely declared. This would allow for incom ...
I have a chain of nested templated using declarations. It looks something like this: The following gives me trouble: I also get an error at the ...
Is there an alternative to have some using-declarations in concept/constraint? Something like: The possible ways I have found are: use intermed ...
Per § 12.2.2.1 [over.match.funcs.general]/9-sentence-2: A constructor inherited from class type C ([class.inhctor.init]) that has a first paramete ...
I'm afraid this is not possible: In other words: you cannot have two member functions variants only one of which is virtual? Is that observation co ...
So say I have a namespace X and a namespace Y that both contain a variable of type int called var. When I say using namespace X; what I imagine happ ...
I have a class, Tracker, where I declare an alias From Tracker.h: In the .cpp file, where I define the function: How can I use ArgsMap in the f ...
Consider following code snippet with C++20 using-enum-declaration: gcc-trunk rejects it with: However, msvc accepts it. Interestingly, if I add ...
We know that a 'using declaration' for a namespace's member name in a scope where another entity is defined there with the same name, causes a compile ...
According to the C++ 17 Standard (10.3.3 The using declaration) 1 Each using-declarator in a using-declaration98 introduces a set of declarations ...
According to cppreference, both gcc and msvc have completed the implementation of C++20 feature using enum, which means we can using-declaration with ...
With 'using declarations' I can introduce a base class member into definition of my class: However, in my case, I want to only 'use' one specific o ...
After reading the accepted answer from this question, I thought I understood why the program failed, since the using directive does not actually decla ...
I would be grateful if someone could tell me if I am declaring my arrays properly in my declaration statement so that they will be available in all of ...