How to use trailing return type with a templated class member

后端 未结 2 398
-上瘾入骨i
-上瘾入骨i 2021-01-22 23:38

I\'m trying to implement the following class:

template 
class reverse_adaptor
{
public: // Construction
    reverse_adaptor(Container &         


        
2条回答
  •  被撕碎了的回忆
    2021-01-23 00:24

    The name m_container has not been introduced at the point the functions are declared. Switch the order of declarations, and the code will work.

    See working version here.

提交回复
热议问题