Question.2
A developer creates a type alias for a templated ring buffer:
template<typename T> class RingBuffer { /* ... */ }; using AudioBuffer = RingBuffer<float>; using CommandBuffer = RingBuffer<uint8_t>;
Can this be done with typedef?
typedef
Select Answer
Yes -- typedef works with templates identically
No -- typedef cannot create aliases for template specializations; using is required
using
Yes -- but only with C++17
No -- neither typedef nor using works with templates