template specialization, is this valid C++?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



gcc version 4.7.2 20121109 (Red Hat 4.7.2-8) (GCC)
compiles the following code under Fedora.

My question is,
if the omitting of the second template parameter of f,
is valid C++?

Andre

------------------------------------
#include <iostream>

template< int size, class T >
int f( int x, T& t )
{
        return size + x;
}

int main()
{
        double z = 1.0;
        std::cout << f<11>(22,z) << std::endl;
        return 0;
}
-------------------------------------




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux