Could not make this code cross compile between MSVC 2015 and GCC 7.3
This seems to work for all compilers I have tested:
template <typename X>
template <typename Y>
inline auto Outer<X>::Inner<Y>::operator++()
-> Inner<Y> &
{
++y;
return *this;
}
VS 2017 (15.9 update) builds this code just fine. Upgrade to the latest version which is more C++11/C++14 compliant than VS 2015 Update 3.
cl /permissive- /W4 /EHsc t.cpp
Check out the Community Edition to see if the license meets your requirements.