Skip to content

Commit

Permalink
Require Boost 1.74
Browse files Browse the repository at this point in the history
This gets rid of some workarounds and sets the baseline to where alpaka
is.
  • Loading branch information
bernhardmgruber committed Feb 22, 2023
1 parent ada23e3 commit 6ee96be
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 50 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required (VERSION 3.18.3)
project (llama CXX)

# llama
find_package(Boost 1.70.0 REQUIRED)
find_package(Boost 1.74.0 REQUIRED)
find_package(fmt CONFIG QUIET)
add_library(${PROJECT_NAME} INTERFACE)
target_include_directories(${PROJECT_NAME} INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
Expand Down
2 changes: 1 addition & 1 deletion cmake/llama-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ set(llama_INCLUDE_DIR ${llama_INCLUDE_DIR} "${PACKAGE_PREFIX_DIR}/include")
target_include_directories(llama INTERFACE ${llama_INCLUDE_DIR})

# dependencies
find_package(Boost 1.70.0 REQUIRED)
find_package(Boost 1.74.0 REQUIRED)
find_package(fmt CONFIG QUIET)
target_link_libraries(llama INTERFACE Boost::headers)
if (fmt_FOUND)
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ LLAMA library
At its core, using the LLAMA library requires:

- cmake 3.18.3 or higher
- Boost 1.70.0 or higher
- Boost 1.74.0 or higher
- libfmt 6.2.1 or higher (optional) for support to dump mappings as SVG/HTML

Tests
Expand Down
46 changes: 0 additions & 46 deletions include/llama/Meta.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,52 +4,6 @@

#include <boost/mp11.hpp>

#if BOOST_MP11_VERSION < 107300
// Copyright 2015 Peter Dimov.
//
// Distributed under the Boost Software License, Version 1.0.
//
// Boost Software License - Version 1.0 - August 17th, 2003
//
// Permission is hereby granted, free of charge, to any person or organization
// obtaining a copy of the software and accompanying documentation covered by
// this license (the "Software") to use, reproduce, display, distribute,
// execute, and transmit the Software, and to prepare derivative works of the
// Software, and to permit third-parties to whom the Software is furnished to
// do so, all subject to the following:
//
// The copyright notices in the Software and this entire statement, including
// the above license grant, this restriction and the following disclaimer,
// must be included in all copies of the Software, in whole or in part, and
// all derivative works of the Software, unless such copies or derivative
// works are solely in the form of machine-executable object code generated by
// a source language processor.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.

namespace boost::mp11
{
namespace detail
{
template<class L2>
struct mp_flatten_impl
{
template<class T>
using fn = mp_if<mp_similar<L2, T>, T, mp_list<T>>;
};
} // namespace detail

template<class L, class L2 = mp_clear<L>>
using mp_flatten = mp_apply<mp_append, mp_push_front<mp_transform_q<detail::mp_flatten_impl<L2>, L>, mp_clear<L>>>;
} // namespace boost::mp11
#endif

namespace llama
{
// make mp11 directly available in the llama namespace
Expand Down
2 changes: 1 addition & 1 deletion include/llama/Tuple.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,10 @@ namespace llama

/// Applies a functor to every element of a tuple, creating a new tuple with the result of the element
/// transformations. The functor needs to implement a template `operator()` to which all tuple elements are passed.
// TODO(bgruber): replace by mp11 version in Boost 1.74.
template<typename... Elements, typename Functor>
LLAMA_FN_HOST_ACC_INLINE constexpr auto tupleTransform(const Tuple<Elements...>& tuple, const Functor& functor)
{
// note: cannot use mp11::tuple_transform since that returns a std::tuple
return internal::tupleTransformHelper(std::make_index_sequence<sizeof...(Elements)>{}, tuple, functor);
}

Expand Down

0 comments on commit 6ee96be

Please sign in to comment.