Strange declaration with using in C++

c++, c++11

Solution

That's a type alias, a new syntax available since c++11.

What you're actually doing is typedefing the type of an array

const_buffer_t 

will be an array of const char with length = SIZE

Problem

On a piece of code in a previous question in stackoverflow I saw this, strange to me, declaration with `using`: ``` template <std::size_t SIZE> class A { public: ... using const_buffer_t = const char(&)[SIZE]; ... }; ``` Could someone please address the following questions: - What type it represents? - Where do we need such kind of declarations?

Original source

Related problems