codice:
/*
$ g++ --version
i686-apple-darwin10-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646) (dot 1)
$ g++ -Wall -ansi -pedantic -Wextra -Wconversion main.cpp
*/
#include <iostream>
template <typename pluto> class pippo{
public:
template <typename U> friend bool operator < (const pippo<U> &x , const pippo<U> &y);
};
template <typename U> bool operator < (const pippo<U> &, const pippo<U> & ){
return true;
}
int main (void){
pippo <int> pippo1;
pippo <int> pippo2;
std::cout << (pippo1 < pippo2) << std::endl;
return 0;
}