Typedef template C ++ 0x

I found some questions about typedefs patterns in C ++ 0x that are resolved using the using keyword; however, with GCC 4.6.1 ( g++ -std=c++0x works), I get the following error:

error: expected unqualified identifier before use

Can you help me find where I'm wrong? I tried to solve it for hours ...

The code:

 #include <map> template<typename INDEX, typename VALUE> class GenericSparseVector { protected: std::map<INDEX, VALUE> indices_to_values; }; template <typename VALUE> using StandardSparseVector = GenericSparseVector<int, VALUE>; 
+4
source share
1 answer

Template aliases are supported since gcc 4.7.

+7
source

Source: https://habr.com/ru/post/1403577/


All Articles