Category : alias

I am writing a class Sequence. Its constructor takes two templated vector iterators as arguments. Here is the code: template <class T> using ConstIterator_t = typename std::vector<T>::const_iterator; template <class T> class Sequence{ public: Sequence(ConstIterator_t start, ConstIterator_t end); //rest of the code }; When I compile the code it shows me this error: expected ‘)’ before ..

Read more

I have a legacy interface that has a function with a signature that looks like the following: int provide_values(int &x, int &y) x and y are considered output parameters in this function. Note: I’m aware of the drawbacks of using output parameters and that there are better design choices for such an interface. I’m not ..

Read more