diff --git a/examples/viewcopy/viewcopy.cpp b/examples/viewcopy/viewcopy.cpp index ee680149f1..f1c1448ac2 100644 --- a/examples/viewcopy/viewcopy.cpp +++ b/examples/viewcopy/viewcopy.cpp @@ -3,7 +3,6 @@ #include "../common/ttjet_13tev_june2019.hpp" #include -#include #include #include #include diff --git a/include/llama/Core.hpp b/include/llama/Core.hpp index 89b9150354..0151c27ba3 100644 --- a/include/llama/Core.hpp +++ b/include/llama/Core.hpp @@ -4,10 +4,10 @@ #pragma once #include "Array.hpp" +#include "Meta.hpp" #include "RecordCoord.hpp" #include -#include #include #include diff --git a/include/llama/Meta.hpp b/include/llama/Meta.hpp new file mode 100644 index 0000000000..d1cad2680b --- /dev/null +++ b/include/llama/Meta.hpp @@ -0,0 +1,51 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +#pragma once + +#include + +#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 + struct mp_flatten_impl + { + template + using fn = mp_if, T, mp_list>; + }; + } // namespace detail + + template> + using mp_flatten = mp_apply, L>, mp_clear>>; +} // namespace boost::mp11 +#endif diff --git a/include/llama/RecordCoord.hpp b/include/llama/RecordCoord.hpp index 47653c1f39..17fdfdbc04 100644 --- a/include/llama/RecordCoord.hpp +++ b/include/llama/RecordCoord.hpp @@ -3,8 +3,9 @@ #pragma once +#include "Meta.hpp" + #include -#include #include namespace llama diff --git a/include/llama/Tuple.hpp b/include/llama/Tuple.hpp index 2f9619d20f..ea52eb72e5 100644 --- a/include/llama/Tuple.hpp +++ b/include/llama/Tuple.hpp @@ -3,10 +3,9 @@ #pragma once +#include "Meta.hpp" #include "macros.hpp" -#include - namespace llama { template diff --git a/include/llama/llama.hpp b/include/llama/llama.hpp index 3936b65ed7..1e96926694 100644 --- a/include/llama/llama.hpp +++ b/include/llama/llama.hpp @@ -35,6 +35,7 @@ #include "BlobAllocators.hpp" #include "Copy.hpp" #include "Core.hpp" +#include "Meta.hpp" #include "Vector.hpp" #include "View.hpp" #include "VirtualRecord.hpp"