Template default arguments

前端 未结 4 1595
耶瑟儿~
耶瑟儿~ 2020-11-29 17:19

If I am allowed to do the following:

template 
class Foo{
};

Why am I not allowed to do the following in main?

4条回答
  •  一向
    一向 (楼主)
    2020-11-29 17:49

    You are not allowed to do that but you can do this

    typedef Foo<> Fooo;
    

    and then do

    Fooo me;
    

提交回复
热议问题