How do I declare template function outside the class declaration

后端 未结 2 1078
臣服心动
臣服心动 2020-12-20 00:19
#include 
#include  
#include 

template 
class A
{
public:

    typedef typename std::vector

        
2条回答
  •  没有蜡笔的小新
    2020-12-20 00:55

    You are again missing the typename in the return value. The function should be:

    template 
    std::pair >::iterator, bool > A::foo()
    {
        iterator aIter;
        return std::pair >::iterator, bool >(aIter ,false);
    }
    

提交回复
热议问题