anonymous enums and templates
  Home FAQ Contact Sign in
comp.lang.c++.moderated only
 
Advanced search
POPULAR GROUPS

more...

 Up
anonymous enums and templates         

Group: comp.lang.c++.moderated · Group Profile
Author: Roman.Perepelitsa
Date: Apr 11, 2008 09:42

Is this program valid? Why? If yes then what it prints?

#include
#include

enum { value };

template
int f(T) { return 1; }

int f(int) { return 2; }

int main()
{
std::cout << f(value) << std::endl;
}

Roman Perepelitsa.

--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
3 Comments
diggit! del.icio.us! reddit!

RELATED THREADS
SubjectArticles qty Group
has anyone used a template from Template Monster?netobjects.fusion10.webdesign ·