-
Notifications
You must be signed in to change notification settings - Fork 40
Fix compatibility with ubuntu22.04 for real-time usage #383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| #pragma once | ||
|
|
||
| #include <pinocchio/fwd.hpp> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's not an acceptable change, because Pinocchio is an optional dependency. You could add include guards but most likely including Pinocchio's fwd header is too coarse a solution (what was the problem here?) |
||
| #include "aligator/context.hpp" | ||
|
|
||
| namespace boost { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,7 +16,7 @@ int main() { | |
| solver.setup(problem); | ||
| solver.run(problem); | ||
|
|
||
| fmt::print("{}\n", fmt::streamed(solver.results_)); | ||
| fmt::print("{}\n", solver.results_); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This breaks with recent versions of fmtlib. A possible solution would be to specialise the required template class from fmtlib using |
||
|
|
||
| return 0; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| /* | ||
| Copyright 2023 Glen Joseph Fernandes | ||
| ([email protected]) | ||
|
|
||
| Distributed under the Boost Software License, Version 1.0. | ||
| (http://www.boost.org/LICENSE_1_0.txt) | ||
| */ | ||
| #ifndef BOOST_CORE_DATA_HPP | ||
| #define BOOST_CORE_DATA_HPP | ||
|
|
||
| #include <iterator> | ||
|
|
||
| // Note: MSVC doesn't define __cpp_lib_nonmember_container_access but supports the feature even in C++14 mode | ||
| #if (defined(__cpp_lib_nonmember_container_access) && (__cpp_lib_nonmember_container_access >= 201411l)) || \ | ||
| (defined(_MSC_VER) && (_MSC_VER >= 1900)) | ||
|
|
||
| namespace boost { | ||
| using std::data; | ||
| } /* boost */ | ||
|
|
||
| #else // (defined(__cpp_lib_nonmember_container_access) ... | ||
|
|
||
| #include <cstddef> | ||
| #include <initializer_list> | ||
|
|
||
| namespace boost { | ||
|
|
||
| template<class C> | ||
| inline constexpr auto | ||
| data(C& c) noexcept(noexcept(c.data())) -> decltype(c.data()) | ||
| { | ||
| return c.data(); | ||
| } | ||
|
|
||
| template<class C> | ||
| inline constexpr auto | ||
| data(const C& c) noexcept(noexcept(c.data())) -> decltype(c.data()) | ||
| { | ||
| return c.data(); | ||
| } | ||
|
|
||
| template<class T, std::size_t N> | ||
| inline constexpr T* | ||
| data(T(&a)[N]) noexcept | ||
| { | ||
| return a; | ||
| } | ||
|
|
||
| template<class T> | ||
| inline constexpr const T* | ||
| data(std::initializer_list<T> l) noexcept | ||
| { | ||
| return l.begin(); | ||
| } | ||
|
|
||
| } /* boost */ | ||
|
|
||
| #endif // (defined(__cpp_lib_nonmember_container_access) ... | ||
|
|
||
| #endif |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| /* | ||
| Copyright 2025 Glen Joseph Fernandes | ||
| ([email protected]) | ||
|
|
||
| Distributed under the Boost Software License, Version 1.0. | ||
| (http://www.boost.org/LICENSE_1_0.txt) | ||
| */ | ||
| #undef BOOST_CORE_DETAIL_ASSERT | ||
|
|
||
| #if !defined(__clang__) && \ | ||
| !defined(__INTEL_COMPILER) && \ | ||
| defined(__GNUC__) && \ | ||
| (__GNUC__ < 5) | ||
| #define BOOST_CORE_DETAIL_ASSERT(expr) void(0) | ||
| #else | ||
| #include <boost/assert.hpp> | ||
| #define BOOST_CORE_DETAIL_ASSERT(expr) BOOST_ASSERT(expr) | ||
| #endif |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| /* | ||
| Copyright 2023 Glen Joseph Fernandes | ||
| ([email protected]) | ||
|
|
||
| Distributed under the Boost Software License, Version 1.0. | ||
| (http://www.boost.org/LICENSE_1_0.txt) | ||
| */ | ||
| #ifndef BOOST_CORE_MAKE_SPAN_HPP | ||
| #define BOOST_CORE_MAKE_SPAN_HPP | ||
|
|
||
| #include "aligator/compat/boost/core/span.hpp" | ||
|
|
||
| namespace boost { | ||
|
|
||
| template<class I> | ||
| inline constexpr span<I> | ||
| make_span(I* f, std::size_t c) noexcept | ||
| { | ||
| return span<I>(f, c); | ||
| } | ||
|
|
||
| template<class I> | ||
| inline constexpr span<I> | ||
| make_span(I* f, I* l) noexcept | ||
| { | ||
| return span<I>(f, l); | ||
| } | ||
|
|
||
| template<class T, std::size_t N> | ||
| inline constexpr span<T, N> | ||
| make_span(T(&a)[N]) noexcept | ||
| { | ||
| return span<T, N>(a); | ||
| } | ||
|
|
||
| template<class T, std::size_t N> | ||
| inline constexpr span<T, N> | ||
| make_span(std::array<T, N>& a) noexcept | ||
| { | ||
| return span<T, N>(a); | ||
| } | ||
|
|
||
| template<class T, std::size_t N> | ||
| inline constexpr span<const T, N> | ||
| make_span(const std::array<T, N>& a) noexcept | ||
| { | ||
| return span<const T, N>(a); | ||
| } | ||
|
|
||
| template<class R> | ||
| inline span<typename detail::span_data<R>::type> | ||
| make_span(R&& r) | ||
| { | ||
| return span<typename detail::span_data<R>::type>(std::forward<R>(r)); | ||
| } | ||
|
|
||
| } /* boost */ | ||
|
|
||
| #endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. C++17 is required.