diff --git a/3party/opening_hours/opening_hours.cpp b/3party/opening_hours/opening_hours.cpp index b3ccf02f60..81f7fd0997 100644 --- a/3party/opening_hours/opening_hours.cpp +++ b/3party/opening_hours/opening_hours.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include namespace @@ -94,8 +95,10 @@ class StreamFlagsKeeper std::ios_base::fmtflags m_flags; }; -void PrintPaddedNumber(std::ostream & ost, uint32_t const number, uint32_t const padding = 1) +template +void PrintPaddedNumber(std::ostream & ost, TNumber const number, uint32_t const padding = 1) { + static_assert(std::is_integral::value, "number should be of integral type."); StreamFlagsKeeper keeper(ost); ost << std::setw(padding) << std::setfill('0') << number; }