[flang-commits] [PATCH] D85657: [flang][msvc] Remove default arguments for function specializations.
Michael Kruse via Phabricator via flang-commits
flang-commits at lists.llvm.org
Mon Aug 10 08:39:39 PDT 2020
Meinersbur created this revision.
Meinersbur added reviewers: isuruf, DavidTruby, sscalpone, klausler, tskeith.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Meinersbur requested review of this revision.
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 <http://lists.llvm.org/pipermail/flang-dev/2020-July/000448.html>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D85657
Files:
flang/include/flang/Decimal/decimal.h
Index: flang/include/flang/Decimal/decimal.h
===================================================================
--- flang/include/flang/Decimal/decimal.h
+++ flang/include/flang/Decimal/decimal.h
@@ -105,17 +105,17 @@
const char *&, enum FortranRounding = RoundNearest);
extern template ConversionToBinaryResult<8> ConvertToBinary<8>(
- const char *&, enum FortranRounding = RoundNearest);
+ const char *&, enum FortranRounding);
extern template ConversionToBinaryResult<11> ConvertToBinary<11>(
- const char *&, enum FortranRounding = RoundNearest);
+ const char *&, enum FortranRounding);
extern template ConversionToBinaryResult<24> ConvertToBinary<24>(
- const char *&, enum FortranRounding = RoundNearest);
+ const char *&, enum FortranRounding);
extern template ConversionToBinaryResult<53> ConvertToBinary<53>(
- const char *&, enum FortranRounding = RoundNearest);
+ const char *&, enum FortranRounding);
extern template ConversionToBinaryResult<64> ConvertToBinary<64>(
- const char *&, enum FortranRounding = RoundNearest);
+ const char *&, enum FortranRounding);
extern template ConversionToBinaryResult<113> ConvertToBinary<113>(
- const char *&, enum FortranRounding = RoundNearest);
+ const char *&, enum FortranRounding);
} // namespace Fortran::decimal
extern "C" {
#define NS(x) Fortran::decimal::x
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85657.284389.patch
Type: text/x-patch
Size: 1369 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20200810/4d21c636/attachment.bin>
More information about the flang-commits
mailing list