From 22b8964463be8fafbfa31d1d1108b2fdc30eb15d Mon Sep 17 00:00:00 2001 From: Joris Vaillant Date: Thu, 4 Jan 2024 11:03:04 +0100 Subject: [PATCH] veg: Use std::declval instead of custom declval to avoid pack expansion issue with visual studio --- include/proxsuite/linalg/veg/internal/macros.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/proxsuite/linalg/veg/internal/macros.hpp b/include/proxsuite/linalg/veg/internal/macros.hpp index 18919a6fd..c926c1387 100644 --- a/include/proxsuite/linalg/veg/internal/macros.hpp +++ b/include/proxsuite/linalg/veg/internal/macros.hpp @@ -5,6 +5,7 @@ #include "proxsuite/linalg/veg/internal/preprocessor.hpp" #include "proxsuite/linalg/veg/internal/prologue.hpp" #include +#include //////////////////////////////////////////////////////////////////////////////// @@ -128,7 +129,7 @@ #endif #if defined(VEG_WITH_CXX17_SUPPORT) -#define VEG_DECLVAL(...) (static_cast<__VA_ARGS__ (*)() noexcept>(nullptr)()) +#define VEG_DECLVAL(...) (std::declval<__VA_ARGS__>()) #else #define VEG_DECLVAL(...) \ (::proxsuite::linalg::veg::_detail::_meta::declval<__VA_ARGS__>())