All pastes #793572 Raw Edit

Something

public cpp v1 · immutable
·published 2007-11-22 12:01 UTC
rendered paste body
#include <string>namespace lab2 {    template<typename T>    class WeirdCpp {    public:        template<typename U> friend std::ostream& operator<<(std::ostream &of,const WeirdCpp<U> &c);        T nada;    };        template<typename U> std::ostream &operator<<(std::ostream &of, const WeirdCpp<U> &c){        of << "apa\n"; //this doesn't work, gives        //weirdcpp.h:12: error: no match for ‘operator<<’ in ‘of << "apa\012"’                //this works        of << std::string("apa");                return of;    }};