From 3d5039ed9521b4e4ee5a376274eb13ca41bca758 Mon Sep 17 00:00:00 2001 From: tqcq <99722391+tqcq@users.noreply.github.com> Date: Fri, 1 Mar 2024 19:40:00 +0800 Subject: [PATCH] fix timestamp const function --- CMakeLists.txt | 4 ++-- include/sled/status_or.h | 2 +- include/sled/units/timestamp.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 511b150..d512a80 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 2.8) -project(sled LANGUAGES C CXX) +cmake_minimum_required(VERSION 3.10) +project(sled VERSION 0.1.0 LANGUAGES C CXX) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) diff --git a/include/sled/status_or.h b/include/sled/status_or.h index 3356431..455e06d 100644 --- a/include/sled/status_or.h +++ b/include/sled/status_or.h @@ -28,7 +28,7 @@ public: StatusOr(StatusOr &&other) : status_(std::move(other.status_)), - value_(std::move(value_)) + value_(std::move(other.value_)) { other.status_ = MakeDefaultStatus(); } diff --git a/include/sled/units/timestamp.h b/include/sled/units/timestamp.h index e0911cb..0ec164f 100644 --- a/include/sled/units/timestamp.h +++ b/include/sled/units/timestamp.h @@ -63,7 +63,7 @@ public: } template - constexpr T ns() + constexpr T ns() const { return ToMultiple<1000, T>(); }