Skip to content

Commit 68a76e1

Browse files
committed
Fix g++14, fix test compilation
1 parent ab014ed commit 68a76e1

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/base/refl/auto_struct.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -549,9 +549,9 @@ template <class T, class U, class... MemberFunctors>
549549
constexpr static inline auto FuncPtr = +[](const T &t) -> U &
550550
{
551551
using Composite::operator>>;
552-
auto &v = (t >> ... >> MemberFunctors{});
553-
return const_cast<std::remove_cvref_t<decltype(v)> &>( // NOLINT
554-
v);
552+
const auto *v = &(t >> ... >> MemberFunctors{});
553+
return const_cast<std::remove_cvref_t<decltype(*v)> &>( // NOLINT
554+
*v);
555555
};
556556

557557
template <class... MemberFunctors>

test/unit/base/conv/numtostr.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#include "base/conv/numtostr.h"
22

3+
#include <cmath>
4+
35
#include "../../util/test.h"
46

57
using Conv::NumberToString;

0 commit comments

Comments
 (0)