Compare commits

..

1 Commits

Author SHA1 Message Date
09f53833cc Rework as esp-idf component 2023-11-23 17:17:05 +01:00
18 changed files with 47 additions and 134 deletions

View File

@ -344,8 +344,6 @@ jobs:
git submodule init libs/type_traits
git submodule init libs/typeof
git submodule init libs/utility
git submodule init libs/describe
git submodule init libs/mp11
git submodule init libs/headers tools/boost_install tools/build
git submodule update
rm -rf libs/fusion
@ -454,8 +452,6 @@ jobs:
git submodule init libs/type_traits
git submodule init libs/typeof
git submodule init libs/utility
git submodule init libs/describe
git submodule init libs/mp11
git submodule init libs/headers tools/boost_install tools/build
git submodule update
rm -rf libs/fusion
@ -468,4 +464,4 @@ jobs:
./b2 -j`(nproc || sysctl -n hw.ncpu) 2> /dev/null` libs/fusion/test toolset=$TOOLSET cxxstd=$CXXSTD
fi
fi

View File

@ -2,6 +2,8 @@
# Distributed under the Boost Software License, Version 1.0.
# See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
if(NOT DEFINED IDF_TARGET)
cmake_minimum_required(VERSION 3.5...3.20)
project(boost_fusion VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
@ -24,6 +26,30 @@ target_link_libraries(boost_fusion
Boost::typeof
Boost::utility
Boost::functional
Boost::describe
Boost::mp11
)
else()
FILE(GLOB_RECURSE headers include/*.h include/*.hpp)
idf_component_register(
SRCS
${headers}
INCLUDE_DIRS
include
REQUIRES
boost_config
boost_container_hash
boost_core
boost_function_types
boost_mpl
boost_preprocessor
boost_static_assert
boost_tuple
boost_type_traits
boost_typeof
boost_utility
boost_functional
)
endif()

View File

@ -82,8 +82,6 @@ install:
- git submodule init libs/type_traits
- git submodule init libs/typeof
- git submodule init libs/utility
- git submodule init libs/describe
- git submodule init libs/mp11
- git submodule init libs/headers tools/boost_install tools/build
- git submodule update

View File

@ -143,7 +143,7 @@
I, \
ATTRIBUTE)
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1935)
#ifdef BOOST_MSVC
# define BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAM(R,_,ELEM) \
typedef ELEM ELEM;
# define BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS_IMPL(SEQ) \

View File

@ -10,6 +10,7 @@
#define FUSION_IN_05052005_0121
#include <boost/fusion/support/config.hpp>
#include <istream>
#include <boost/fusion/sequence/io/detail/manip.hpp>
#include <boost/mpl/bool.hpp>

View File

@ -36,10 +36,10 @@ namespace boost { namespace fusion
namespace detail
{
template <typename Tag>
int get_xalloc_index(int xalloc())
int get_xalloc_index(Tag* = 0)
{
// each Tag will have a unique index
static int const index = xalloc();
static int index = std::ios::xalloc();
return index;
}
@ -66,12 +66,12 @@ namespace boost { namespace fusion
{
static arena ar; // our arena
ar.data.push_back(new T(data));
stream.pword(get_xalloc_index<Tag>(stream.xalloc)) = ar.data.back();
stream.pword(get_xalloc_index<Tag>()) = ar.data.back();
}
static T const* get(Stream& stream)
{
return (T const*)stream.pword(get_xalloc_index<Tag>(stream.xalloc));
return (T const*)stream.pword(get_xalloc_index<Tag>());
}
};
@ -114,6 +114,7 @@ namespace boost { namespace fusion
{
// read a delimiter
string_type const* p = stream_data_t::get(stream);
std::ws(stream);
if (p)
{
@ -140,7 +141,7 @@ namespace boost { namespace fusion
if (stream.get() != c)
{
stream.unget();
stream.setstate(Stream::failbit);
stream.setstate(std::ios::failbit);
}
}
}

View File

@ -10,6 +10,7 @@
#define FUSION_OUT_05052005_0121
#include <boost/fusion/support/config.hpp>
#include <ostream>
#include <boost/fusion/sequence/io/detail/manip.hpp>
#include <boost/mpl/bool.hpp>

View File

@ -10,9 +10,9 @@
#define BOOST_IN_05042005_0120
#include <boost/fusion/support/config.hpp>
#include <istream>
#include <boost/fusion/sequence/io/detail/in.hpp>
#include <boost/fusion/support/is_sequence.hpp>
#include <iosfwd>
namespace boost { namespace fusion
{

View File

@ -10,11 +10,11 @@
#define BOOST_OUT_05042005_0120
#include <boost/fusion/support/config.hpp>
#include <ostream>
#include <boost/fusion/sequence/io/detail/out.hpp>
#include <boost/fusion/support/is_sequence.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/mpl/or.hpp>
#include <iosfwd>
namespace boost { namespace fusion
{

View File

@ -120,17 +120,6 @@ namespace boost { namespace fusion
return pair<First, typename detail::as_fusion_element<Second>::type>(val);
}
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename First, typename Second>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::make_pair<First,Second>::type
make_pair(Second&& val)
{
return pair<First, typename detail::as_fusion_element<Second>::type>(
BOOST_FUSION_FWD_ELEM(Second, val));
}
#endif
template <typename First, typename Second>
inline std::ostream&
operator<<(std::ostream& os, pair<First, Second> const& p)

View File

@ -48,17 +48,11 @@ namespace boost { namespace fusion
{
BOOST_MPL_HAS_XXX_TRAIT_DEF(fusion_tag)
template<typename Sequence, typename Active=void>
struct tag_of_fallback
{
typedef non_fusion_tag type;
};
template <typename Sequence, typename Active>
struct tag_of_impl
: mpl::if_<fusion::detail::is_mpl_sequence<Sequence>,
mpl::identity<mpl_sequence_tag>,
mpl::identity<typename tag_of_fallback<Sequence>::type> >::type
mpl::identity<non_fusion_tag> >::type
{};
template <typename Sequence>

View File

@ -9,13 +9,6 @@
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/iterator/deref.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/type_traits/remove_const.hpp>
#include <boost/type_traits/add_reference.hpp>
#include <boost/type_traits/add_const.hpp>
#include <boost/type_traits/is_reference.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/utility/result_of.hpp>
#include <boost/mpl/if.hpp>
namespace boost { namespace fusion

View File

@ -9,8 +9,6 @@
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/iterator/deref.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/type_traits/remove_const.hpp>
#include <boost/utility/result_of.hpp>
namespace boost { namespace fusion

View File

@ -9,8 +9,6 @@
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/iterator/deref.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/type_traits/remove_const.hpp>
#include <boost/utility/result_of.hpp>
namespace boost { namespace fusion

View File

@ -23,11 +23,6 @@
#include <boost/fusion/view/transform_view/detail/value_of_data_impl.hpp>
#include <boost/fusion/view/transform_view/detail/deref_data_impl.hpp>
#ifdef _MSC_VER
# pragma warning(push)
# pragma warning(disable: 4512) // assignment operator could not be generated.
#endif
namespace boost { namespace fusion
{
// Unary Version
@ -49,6 +44,9 @@ namespace boost { namespace fusion
first_type first;
transform_type f;
// silence MSVC warning C4512: assignment operator could not be generated
BOOST_DELETED_FUNCTION(transform_view_iterator& operator= (transform_view_iterator const&))
};
// Binary Version
@ -73,13 +71,12 @@ namespace boost { namespace fusion
first1_type first1;
first2_type first2;
transform_type f;
// silence MSVC warning C4512: assignment operator could not be generated
BOOST_DELETED_FUNCTION(transform_view_iterator2& operator= (transform_view_iterator2 const&))
};
}}
#ifdef _MSC_VER
# pragma warning(pop)
#endif
#ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408
namespace std
{

View File

@ -271,11 +271,6 @@ project
: [ requires cxx11_variadic_templates ] ]
[ compile support/tag_of.cpp ]
[ compile support/unused.cpp ]
[ compile support/detail/tag_of_fallback.cpp ]
[ compile-fail support/make_pair_r-value.cpp ]
[ compile support/make_pair_r-value.cpp
: [ requires cxx11_rvalue_references ] ]
# [ compile-fail xxx.cpp ]

View File

@ -1,50 +0,0 @@
/*=============================================================================
Copyright (c) 2022 Denis Mikhailov
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#include <boost/fusion/support/tag_of.hpp>
#include <boost/static_assert.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/core/enable_if.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/if.hpp>
namespace mpl = boost::mpl;
template<typename T>
struct my_is_implicitly_reflectable;
namespace boost { namespace fusion
{
struct boost_my_reflectable_tag;
namespace detail
{
template<typename Sequence>
struct tag_of_fallback<Sequence, typename boost::enable_if<boost::is_same<Sequence, Sequence> >::type>
{
typedef typename mpl::if_<my_is_implicitly_reflectable<Sequence>
, boost_my_reflectable_tag
, non_fusion_tag
>::type type;
};
}
}}
struct reflectable {};
struct non_reflectable {};
template<typename T>
struct my_is_implicitly_reflectable : mpl::false_ {};
template<>
struct my_is_implicitly_reflectable<reflectable> : mpl::true_ {};
typedef boost::fusion::traits::tag_of<reflectable>::type ReflectableTag;
typedef boost::fusion::traits::tag_of<non_reflectable>::type NonReflectableTag;
BOOST_STATIC_ASSERT((boost::is_same<ReflectableTag, boost::fusion::boost_my_reflectable_tag>::value));
BOOST_STATIC_ASSERT((boost::is_same<NonReflectableTag, boost::fusion::non_fusion_tag>::value));
int
main() { }

View File

@ -1,24 +0,0 @@
/*=============================================================================
Copyright (c) 2022 niXman (github dot nixman at pm.me)
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#include <boost/fusion/support/pair.hpp>
struct noncopyable_type {
noncopyable_type(const noncopyable_type &) = delete;
noncopyable_type& operator=(const noncopyable_type &) = delete;
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
noncopyable_type(noncopyable_type &&) = default;
noncopyable_type& operaotr=(noncopyable_type &&) = default;
#endif
};
int main() {
using namespace boost::fusion;
pair<int, noncopyable_type> val = make_pair<int>(noncopyable_type{});
return 0;
}