Is this valid ISO C++?

From: Ioannis Vranos (ivr_at_remove.this.grad.com)
Date: 03/30/05


Date: Wed, 30 Mar 2005 03:53:05 +0300

This compiles with MINGW GCC 3.4.2 but not with my other compilers. Is it valid ISO C++?

#include <vector>

template< template<class> class ContainerTemplate, class ValueType>
inline void test(const ValueType &val)
{
     ContainerTemplate<ValueType> container(val);
}

int main()
{
     using namespace std;

     test<vector>(10);
}

-- 
Ioannis Vranos
http://www23.brinkster.com/noicys


Relevant Pages

  • lvalue rvalue
    ... The following compiles: ... struct DoubleInDisguise ... inline void Manipulate ... int main ...
    (comp.lang.cpp)
  • Re: inline doesnt work - what I am doing wrong?
    ... inline void hello_world; ... static inline void exc; ... I strongly recommend adding some more warning options, but it compiles without diagnostics even with all the warning options turned on that I ... A conforming implementation of C99 must parse the keyword, recognize it, and check for syntax errors and constraint violations associated with that keyword. ...
    (comp.lang.c)