File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
clickhouse/include/userver/storages/clickhouse/io Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 33// / @file userver/storages/clickhouse/io/floating_point_types.hpp
44// / @brief @copybrief storages::clickhouse::io::FloatingWithPrecision
55
6+ #if FMT_VERSION >= 110000
7+ #include < fmt/base.h> // Y_IGNORE
8+ #endif
69#include < fmt/format.h>
710
811USERVER_NAMESPACE_BEGIN
@@ -53,12 +56,29 @@ class FloatingWithPrecision {
5356private:
5457 FloatingPointT value_;
5558
59+ #if FMT_VERSION >= 110100
60+ constexpr static fmt::format_specs spec_ = []() {
61+ fmt::format_specs spec;
62+ spec.precision = Precision;
63+ spec.set_type (fmt::presentation_type::fixed);
64+ return spec;
65+ }();
66+ #elif FMT_VERSION >= 110000
67+ constexpr static fmt::format_specs spec_ = []() {
68+ fmt::format_specs spec;
69+ spec.precision = Precision;
70+ spec.type = fmt::presentation_type::fixed;
71+ return spec;
72+ }();
73+ #else
5674 constexpr static fmt::basic_format_specs<char > spec_ = []() {
5775 fmt::basic_format_specs<char > spec;
5876 spec.precision = Precision;
5977 spec.type = fmt::presentation_type::fixed_lower;
6078 return spec;
6179 }();
80+ #endif
81+
6282 template <typename U, std::uint32_t AnotherPrecision, typename >
6383 friend class FloatingWithPrecision ;
6484};
You can’t perform that action at this time.
0 commit comments