You can also write your own guide to derive the type while allowing the user to provide a type. u ) : values_ // ill-formed as types are not the same. This class's internal pointer is set to point to its parent's internal vector's data.Īs far as I can tell this appears to be bug free to the best of my knowledge and it is producing expected values. It has the corresponding matching constructors as its parent class, a set of overloaded subscript-indexing operators and a public method to retrieve it's internal pointer. It only has one member and that is a pointer to. The child class inherits this functionality. The base class also contains a size that is inferred by its populated member vector, a function to return its size and an overloaded operator operator()() that will return its internal vector. The base class stores the contents from two flavors of constructors either a Variadic Constructor, or a Variadic Constructor that takes an std::initializer_list as it's parameter. Consider the following line of code: int x 5 This statement uses copy initialization to initialize newly created integer variable x to the value of 5. I have an inheritance class that mimics the behavior of C style array's brace initialization by using a class template that has a variadic constructor but the template itself is not a variadic template.
0 Comments
Leave a Reply. |