Skip to content

Commit

Permalink
Boost/1.76.0: Fix #include inside boost namespace patch
Browse files Browse the repository at this point in the history
- The existing code fails to build if <utility> was not already included.
- boostorg/math#670
  • Loading branch information
ashley-b committed Feb 3, 2023
1 parent ff414d9 commit 825b259
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
4 changes: 4 additions & 0 deletions recipes/boost/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@ patches:
- patch_file: "patches/1.69.0-locale-no-system.patch"
patch_description: "This library links to boost_system, even though that library is header-only"
patch_type: "conan"
- patch_file: "patches/1.76.0-0001-fix-include-inside-boost-namespace.patch"
patch_description: "Fix #include inside boost namespace"
patch_type: "official"
patch_source: "https://github.com/boostorg/math/pull/670"
- patch_file: "patches/1.77.0-type_erasure-no-system.patch"
patch_description: "This library links to boost_system, even though that library is header-only"
patch_type: "conan"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
From 1ec5c98d80de97f9e962c5627e1a0e6096099894 Mon Sep 17 00:00:00 2001
From: Daniel Scharrer <daniel@constexpr.org>
Date: Wed, 28 Jul 2021 19:56:31 +0200
Subject: [PATCH] Fix #include inside boost namespace

The existing code fails to build if <utility> was not already included.
---
boost/math/tools/mp.hpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/boost/math/tools/mp.hpp b/boost/math/tools/mp.hpp
index 35565646f..dc8440988 100644
--- a/boost/math/tools/mp.hpp
+++ b/boost/math/tools/mp.hpp
@@ -13,6 +13,7 @@

#include <type_traits>
#include <cstddef>
+#include <utility>

namespace boost { namespace math { namespace tools { namespace meta_programming {

@@ -338,7 +339,6 @@ using mp_remove_if_q = mp_remove_if<L, Q::template fn>;
// Index sequence
// Use C++14 index sequence if available
#if defined(__cpp_lib_integer_sequence) && (__cpp_lib_integer_sequence >= 201304)
-#include <utility>
template<std::size_t... I>
using index_sequence = std::index_sequence<I...>;

--
2.39.1

0 comments on commit 825b259

Please sign in to comment.