Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@ ci:
submodules: true
repos:
- repo: https://github.com/BlankSpruce/gersemi
rev: 0.19.3
rev: 0.22.3
hooks:
- id: gersemi
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.2
rev: v0.13.3
hooks:
- id: ruff
args:
- --fix
- --exit-non-zero-on-fix
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v20.1.7
rev: v21.1.2
hooks:
- id: clang-format
args:
- '--style={BasedOnStyle: Mozilla, SortIncludes: false}'
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: trailing-whitespace
17 changes: 8 additions & 9 deletions include/proxsuite/helpers/tl-optional.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -980,8 +980,7 @@ class optional
#ifndef TL_OPTIONAL_NO_CONSTRR
template<class F>
constexpr decltype(optional_map_impl(std::declval<const optional&&>(),
std::declval<F&&>()))
map(F&& f) const&&
std::declval<F&&>())) map(F&& f) const&&
{
return optional_map_impl(std::move(*this), std::forward<F>(f));
}
Expand Down Expand Up @@ -1044,8 +1043,8 @@ class optional
#ifndef TL_OPTIONAL_NO_CONSTRR
template<class F>
constexpr decltype(optional_map_impl(std::declval<const optional&&>(),
std::declval<F&&>()))
transform(F&& f) const&&
std::declval<F&&>())) transform(F&& f)
const&&
{
return optional_map_impl(std::move(*this), std::forward<F>(f));
}
Expand Down Expand Up @@ -2035,8 +2034,8 @@ class optional<T&>
#ifndef TL_OPTIONAL_NO_CONSTRR
template<class F>
constexpr decltype(detail::optional_map_impl(std::declval<const optional&&>(),
std::declval<F&&>()))
map(F&& f) const&&
std::declval<F&&>())) map(F&& f)
const&&
{
return detail::optional_map_impl(std::move(*this), std::forward<F>(f));
}
Expand Down Expand Up @@ -2101,9 +2100,9 @@ class optional<T&>

#ifndef TL_OPTIONAL_NO_CONSTRR
template<class F>
constexpr decltype(detail::optional_map_impl(std::declval<const optional&&>(),
std::declval<F&&>()))
transform(F&& f) const&&
constexpr decltype(detail::optional_map_impl(
std::declval<const optional&&>(),
std::declval<F&&>())) transform(F&& f) const&&
{
return detail::optional_map_impl(std::move(*this), std::forward<F>(f));
}
Expand Down
3 changes: 1 addition & 2 deletions include/proxsuite/linalg/veg/internal/dyn_index.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ struct Dyn
(typename R),
requires(VEG_CONCEPT(index<R>) &&
VEG_CONCEPT(index<typename _detail::binary_traits<Dyn, R>::Div>)),
VEG_NODISCARD VEG_INLINE constexpr auto
operator/,
VEG_NODISCARD VEG_INLINE constexpr auto operator/,
(b, R))
const VEG_NOEXCEPT->typename _detail::binary_traits<Dyn, R>::Div
{
Expand Down
3 changes: 1 addition & 2 deletions include/proxsuite/linalg/veg/internal/fix_index.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,7 @@ struct Fix : _detail::idx::adl::IdxBase<Fix<N>>
(typename R),
requires(VEG_CONCEPT(index<R>) &&
VEG_CONCEPT(index<typename _detail::binary_traits<Fix, R>::Div>)),
VEG_NODISCARD VEG_INLINE constexpr auto
operator/,
VEG_NODISCARD VEG_INLINE constexpr auto operator/,
(b, R))
const VEG_NOEXCEPT->typename _detail::binary_traits<Fix, R>::Div
{
Expand Down
5 changes: 1 addition & 4 deletions include/proxsuite/linalg/veg/internal/macros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -587,10 +587,7 @@
template<typename... Ts> \
struct Name \
{ \
void apply(Ts&&... args) \
{ \
Fn(VEG_FWD(args)...); \
} \
void apply(Ts&&... args) { Fn(VEG_FWD(args)...); } \
}; \
template struct Name<__VA_ARGS__>

Expand Down
3 changes: 1 addition & 2 deletions include/proxsuite/linalg/veg/memory/placement.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,7 @@ struct bit_cast
requires((VEG_CONCEPT(trivially_copyable<From>) && //
VEG_CONCEPT(trivially_copyable<To>) && //
(sizeof(From) == sizeof(To)))),
VEG_INLINE VEG_BITCAST_CONSTEXPR auto
operator(),
VEG_INLINE VEG_BITCAST_CONSTEXPR auto operator(),
(from, From const&))
const VEG_NOEXCEPT->To
{
Expand Down
2 changes: 1 addition & 1 deletion include/proxsuite/linalg/veg/type_traits/constructible.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ VEG_DEF_CONCEPT_FROM_BUILTIN_OR_TRAIT(typename T,
VEG_CONCEPT_EXPR((typename T, typename... Ts),
(T, Ts...),
inplace_constructible,
new(static_cast<void*>(nullptr)) T(VEG_DECLVAL(Ts&&)...),
new (static_cast<void*>(nullptr)) T(VEG_DECLVAL(Ts&&)...),
true);

VEG_DEF_CONCEPT_FROM_BUILTIN_OR_STD((typename T, typename... Ts),
Expand Down
12 changes: 6 additions & 6 deletions test/doctest/doctest.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,8 @@ consume(const int*, int) noexcept
#define DOCTEST_BREAK_INTO_DEBUGGER() __debugbreak()
#elif defined(__MINGW32__)
DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH("-Wredundant-decls")
extern "C" __declspec(dllimport) void __stdcall DebugBreak();
extern "C" __declspec(dllimport) void __stdcall
DebugBreak();
DOCTEST_GCC_SUPPRESS_WARNING_POP
#define DOCTEST_BREAK_INTO_DEBUGGER() ::DebugBreak()
#else // linux
Expand Down Expand Up @@ -1454,8 +1455,7 @@ struct DOCTEST_INTERFACE Approx
#ifdef DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS
template<typename T>
typename std::enable_if<std::is_constructible<double, T>::value,
Approx&>::type
epsilon(const T& newEpsilon)
Approx&>::type epsilon(const T& newEpsilon)
{
m_epsilon = static_cast<double>(newEpsilon);
return *this;
Expand All @@ -1467,8 +1467,7 @@ struct DOCTEST_INTERFACE Approx
#ifdef DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS
template<typename T>
typename std::enable_if<std::is_constructible<double, T>::value,
Approx&>::type
scale(const T& newScale)
Approx&>::type scale(const T& newScale)
{
m_scale = static_cast<double>(newScale);
return *this;
Expand Down Expand Up @@ -5046,7 +5045,8 @@ getContextOptions()

DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4738)
template<typename F>
IsNaN<F>::operator bool() const
IsNaN<F>::
operator bool() const
{
return std::isnan(value) ^ flipped;
}
Expand Down
Loading