Skip to content

Commit

Permalink
veg: Use std::declval instead of custom declval to avoid pack expansi…
Browse files Browse the repository at this point in the history
…on issue with visual studio
  • Loading branch information
jorisv committed Jan 4, 2024
1 parent 6ff0a76 commit 22b8964
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/proxsuite/linalg/veg/internal/macros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "proxsuite/linalg/veg/internal/preprocessor.hpp"
#include "proxsuite/linalg/veg/internal/prologue.hpp"
#include <initializer_list>
#include <utility>

////////////////////////////////////////////////////////////////////////////////

Expand Down Expand Up @@ -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__>())
Expand Down

0 comments on commit 22b8964

Please sign in to comment.