In a.hpp I defined:
#include <utility> namespace Board { template<int W, int H> struct GroupNode { using PointType = std::pair<int, int>; // ... }; }
Then in b.cpp I defined:
#include "a.hpp" namespace Board { template<int W, int H> struct NodeList { using StdList = std::list < /* typename */ GroupNode<W, H>>; } } // and then use NodeList<19, 19> nl;
The code above can be compiled on both gcc-6 and clang-3.9 without warning. However, Clion 2016.3 complained cannot resolve variable GroupNode to b.cpp . Uncommenting typename might tame Clion's warning, but I was wondering if typename is required? If so, why didn't g ++ / clang ++ give any warnings?
source share