templates - C++ - recursive type or function dependency too complex -
i try compile same code, succeed using g++ , failed when using msvc12. here code:
template <typename t> struct kernel_type { typedef t ret; }; template <typename tag, typename a, typename b, unsigned offset = 0> struct binary_op_ { typedef typename kernel_type<a>::ret a1; enum { offset_a1 = 16 - ((16 - 1 + offset) % 16) - 1, offset_a2 = 16 - ((16 - 1 + (offset + offset_a1 + sizeof(a1))) % 16) - 1 }; };
the error caused offset_a1 in offset_a2 expression, somehow msvc12 compiler unable derive offset_a1 expression. if replace offset_a1 full expression, error fixed. knows happens here or missed change settings in msvc12?
Comments
Post a Comment