llvm.org GIT mirror llvm / 6997bd2
Attempt to fix MSVC build broken by r294326 MSVC does not think that `char []` can be constexpr. Switch to regular const. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294327 91177308-0d34-0410-b5e6-96231b3b80d8 Pavel Labath 3 years ago
2 changed file(s) with 14 addition(s) and 20 deletion(s). Raw diff Collapse all Expand all
7575 /// display unit or you request that the unit is not displayed.
7676
7777 namespace detail {
78 template struct unit { static constexpr char value[] = ""; };
79 template constexpr char unit::value[];
78 template struct unit { static const char value[]; };
79 template const char unit::value[] = "";
8080
81 template <> struct unit> {
82 static constexpr char value[] = "h";
83 };
84
85 template <> struct unit> {
86 static constexpr char value[] = "m";
87 };
88
89 template <> struct unit> { static constexpr char value[] = "s"; };
90 template <> struct unit { static constexpr char value[] = "ms"; };
91 template <> struct unit { static constexpr char value[] = "us"; };
92 template <> struct unitnano> { static constexpr char value[] = "ns"; };
81 template <> struct unitratio<3600>> { static const char value[]; };
82 template <> struct unit> { static const char value[]; };
83 template <> struct unit> { static const char value[]; };
84 template <> struct unit { static const char value[]; };
85 template <> struct unit { static const char value[]; };
86 template <> struct unit { static const char value[]; };
9387 } // namespace detail
9488
9589 template
1515
1616 using namespace sys;
1717
18 constexpr char detail::unit>::value[];
19 constexpr char detail::unit>::value[];
20 constexpr char detail::unit>::value[];
21 constexpr char detail::unit::value[];
22 constexpr char detail::unit::value[];
23 constexpr char detail::unit::value[];
18 const char detail::unit>::value[] = "h";
19 const char detail::unit>::value[] = "m";
20 const char detail::unit>::value[] = "s";
21 const char detail::unit::value[] = "ms";
22 const char detail::unit::value[] = "us";
23 const char detail::unit::value[] = "ns";
2424
2525 static inline struct tm getStructTM(TimePoint<> TP) {
2626 struct tm Storage;