This is an archive of the discontinued LLVM Phabricator instance.

[flang][msvc] Remove default arguments for function specializations.
ClosedPublic

Authored by Meinersbur on Aug 10 2020, 8:39 AM.

Details

Summary

C++ does not allow function template specializations to have default arguments. IIUC callers will only use the default arguments of the primary template. gcc and clang accept the syntax anyway, but msvc emits an error.

See https://en.cppreference.com/w/cpp/language/template_specialization for more details.

This patch is part of the series to make flang compilable with MS Visual Studio.

Diff Detail