[llvm] 0292ddc - [FormatVariadic] Put back return type in an attempt to make GCC happy

Benjamin Kramer via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 11 06:12:28 PDT 2020


Author: Benjamin Kramer
Date: 2020-04-11T15:11:44+02:00
New Revision: 0292ddc711444574b3331e9adf50abf42c7dcaa0

URL: https://github.com/llvm/llvm-project/commit/0292ddc711444574b3331e9adf50abf42c7dcaa0
DIFF: https://github.com/llvm/llvm-project/commit/0292ddc711444574b3331e9adf50abf42c7dcaa0.diff

LOG: [FormatVariadic] Put back return type in an attempt to make GCC happy

Added: 
    

Modified: 
    llvm/include/llvm/Support/FormatVariadic.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Support/FormatVariadic.h b/llvm/include/llvm/Support/FormatVariadic.h
index 60ea07506838..16debe22e804 100644
--- a/llvm/include/llvm/Support/FormatVariadic.h
+++ b/llvm/include/llvm/Support/FormatVariadic.h
@@ -246,7 +246,9 @@ template <typename Tuple> class formatv_object : public formatv_object_base {
 // assertion.  Otherwise, it will try to do something reasonable, but in general
 // the details of what that is are undefined.
 //
-template <typename... Ts> inline auto formatv(const char *Fmt, Ts &&... Vals) {
+template <typename... Ts>
+inline auto formatv(const char *Fmt, Ts &&... Vals) -> formatv_object<decltype(
+    std::make_tuple(detail::build_format_adapter(std::forward<Ts>(Vals))...))> {
   using ParamTuple = decltype(
       std::make_tuple(detail::build_format_adapter(std::forward<Ts>(Vals))...));
   return formatv_object<ParamTuple>(


        


More information about the llvm-commits mailing list