Skip to content

Commit 820deda

Browse files
soerengrunewaldalt-graph
authored andcommitted
date: Resolve literal white-space deprecation warnings
[Why] If compiled with clang, the compiler complains: > include/gul14/date.h:912:41: warning: identifier '_d' preceded by whitespace in a literal operator declaration is deprecated [-Wdeprecated-literal-operator] > 912 | constexpr gul14::date::day operator "" _d(unsigned long long d) noexcept; > | ~~~~~~~~~~~~^~ > | operator""_d > include/gul14/date.h:913:41: warning: identifier '_y' preceded by whitespace in a literal operator declaration is deprecated [-Wdeprecated-literal-operator] > 913 | constexpr gul14::date::year operator "" _y(unsigned long long y) noexcept; > | ~~~~~~~~~~~~^~ > | operator""_y > include/gul14/date.h:1813:13: warning: identifier '_d' preceded by whitespace in a literal operator declaration is deprecated [-Wdeprecated-literal-operator] > 1813 | operator "" _d(unsigned long long d) noexcept > | ~~~~~~~~~~~~^~ > | operator""_d > include/gul14/date.h:1820:13: warning: identifier '_y' preceded by whitespace in a literal operator declaration is deprecated [-Wdeprecated-literal-operator] > 1820 | operator "" _y(unsigned long long y) noexcept > | ~~~~~~~~~~~~^~ > | operator""_y Signed-off-by: Soeren Grunewald <soeren.grunewald@desy.de>
1 parent 470d735 commit 820deda

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/gul17/date.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -908,8 +908,8 @@ operator<<(std::basic_ostream<CharT, Traits>& os, const year_month_weekday_last&
908908
inline namespace literals
909909
{
910910

911-
constexpr gul17::date::day operator "" _d(unsigned long long d) noexcept;
912-
constexpr gul17::date::year operator "" _y(unsigned long long y) noexcept;
911+
constexpr gul17::date::day operator ""_d(unsigned long long d) noexcept;
912+
constexpr gul17::date::year operator ""_y(unsigned long long y) noexcept;
913913

914914
} // inline namespace literals
915915
#endif // !defined(_MSC_VER) || (_MSC_VER >= 1900)
@@ -1809,14 +1809,14 @@ inline namespace literals
18091809

18101810
constexpr inline
18111811
gul17::date::day
1812-
operator "" _d(unsigned long long d) noexcept
1812+
operator ""_d(unsigned long long d) noexcept
18131813
{
18141814
return gul17::date::day{static_cast<unsigned>(d)};
18151815
}
18161816

18171817
constexpr inline
18181818
gul17::date::year
1819-
operator "" _y(unsigned long long y) noexcept
1819+
operator ""_y(unsigned long long y) noexcept
18201820
{
18211821
return gul17::date::year(static_cast<int>(y));
18221822
}

0 commit comments

Comments
 (0)