Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as C++ by henke ( 15 years ago )
#include <iostream>

template<typename types>
class test
{
public:
        void f1(typename types::arg_type f)
        {
                std::cout << "f1: " << f << std::endl;
        }

        void f2()
        {
                std::cout << "f2" << std::endl;
        }
};

class my_types
{
public:
        typedef int arg_type;
};

int main()
{
        test<my_types> t;
        t.f1(5);
        t.f2();
        return 0;
}

 

Revise this Paste

Your Name: Code Language: