c++ - gcc: wrong number of template arguments -


Why does this code successfully compile in VS13 and fails to compile by GCC?

  // /// file my_map.h ///// namespace My {// My custom map template & lt; typename K, typename V, typename command = low & lt; K>, typename allocator = cached_alloc & lt; Page_Alocator & lt; pair & lt; K, V & gt; & Gt; & Gt; & Gt; Class map: public set_base and lieutenant; Pair & lt; K, V>, K, select1st, order, ins_unique, allocator & gt; {...}; } ///// file test.h ///// # include "my_map.h" template & lt; Typename T & gt; Class base {secure: typed my :: map & lt; T, double & gt; MyMap; Mam map m_map; // This line is NN Public: Zero Function (const T & amp; key) {typename MyMap :: iterator = m_map.find (key); If (this! = M_map.end ()) {// ....}}}; Square Inherited 1: Public Base & lt; Char & gt; {}; Square Inherited 2: Public Base & lt; Int & gt; {};   

This results in the following errors (gcc 4.1.2)

  filepath.h: LineNN error: Invalid number of template arguments (must be 1, 4 ) ..: Error: 'Template and LT; Class, class V, class command, square allocation & gt; It is not clear to me that what does the compiler actually mean by "the wrong number of template arguments"?   

The compiler you are using is too old. GCC 4.1.2 was released seven years ago. It was difficult to find the problem as an old VC compiler of that era, it is difficult to find the problem because the new compiler works well. Try updating your compiler.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -