From 51c3f37596dde7a3215279c8031613a8717db746 Mon Sep 17 00:00:00 2001 From: ergo720 <45463469+ergo720@users.noreply.github.com> Date: Tue, 12 Oct 2021 19:02:42 +0200 Subject: [PATCH] Fixed non-const lvalue reference to type 'std::from_chars_result' cannot bind to a temporary of type 'std::from_chars_result' --- src/common/input/InputDevice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/input/InputDevice.cpp b/src/common/input/InputDevice.cpp index aa63b6dc7..e333cc7d4 100644 --- a/src/common/input/InputDevice.cpp +++ b/src/common/input/InputDevice.cpp @@ -109,7 +109,7 @@ std::string PortUserFormat(std::string_view port) void PortStr2Int(std::string_view port, int *port_num, int *slot) { *slot = PORT_INVALID; - auto &ret = std::from_chars(port.data(), port.data() + port.size(), *port_num); + auto ret = std::from_chars(port.data(), port.data() + port.size(), *port_num); assert(ret.ec != std::errc::invalid_argument); if (ret.ptr != port.data() + port.size()) { ++ret.ptr;