diff --git a/include/Point.h b/include/Point.h index 47a9cce..172ffcc 100644 --- a/include/Point.h +++ b/include/Point.h @@ -33,6 +33,7 @@ #include #include #include +#include #include "influxdb_export.h" @@ -54,6 +55,12 @@ namespace influxdb /// Adds field Point&& addField(std::string_view name, const std::variant& value); + template , int>> + Point&& addField(std::string_view name, T value) + { + return this->addField(name, std::string{value}); + } + /// Generates current timestamp /// \deprecated Will be removed in v0.8.0 [[deprecated("getCurrentTimestamp() will be removed in v0.8.0")]] static auto getCurrentTimestamp() -> decltype(std::chrono::system_clock::now());