Issue with friend template functions clang++ / msvc++ and enable_if
I get a compiler error in clang++. MSVC++ is happy. I believe my declarations are correct. Am I incorrect in my beliefs and I am "lucky" in MSVC? Is there a non #ifndef _MSC_VER ... public: way to make this work in both compilers? I'd like to keep the constructor private. The real code is slightly more complex. (additional template meta-programming and "perfect forwarding") The following is a distilled version for the question and to isolate the issue as much as possible. I've tried a number of variations for the friend declaration. The one that "seems best" is shown in the example. #include