I always thought that if I declare a member of a class inside a class, this member is known throughout the scope of the class, which:
class X { public: X(int a) :v_(a) {} private: int v_;
So that makes sense to me.
In any case, this is not because I get an error that v_ not known.
class X { public: X(decltype(v_) a) :v_(a)//error on this line, compiler doesn't know v_ {} private: int v_; };
I would be glad to know why.
I am using intel compiler v14 SP1
Thanks.
source share