Compare commits

..

27 Commits

Author SHA1 Message Date
500e4c120f Update CMakeLists.txt 2021-06-10 01:00:55 +03:00
38060fab3a Merge pull request #228 from eldiener/develop
[skip ci] Add "cxxstd" json field
2021-01-20 08:12:50 +08:00
198458a9f2 [skip ci] Add "cxxstd" json field. The "cxxstd" json field is being added to each Boost library's meta json information for libraries in order to specify the minumum C++ standard compilation level. The value of this field matches one of the values for 'cxxstd' in Boost.Build. The purpose of doing this is to provide information for the Boost website documentation for each library which will specify the minimum C++ standard compilation that an end-user must employ in order to use the particular library. This will aid end-users who want to know if they can successfully use a Boost library based on their C++ compiler's compilation level, without having to search the library's documentation to find this out. 2021-01-19 17:22:00 -05:00
4a699a39f5 Merge pull request #222 from k15tfu/fix-issue-221
Fix definition-of-implicit-copy-constructor-is-deprecated warnings
2020-10-06 09:20:17 +08:00
b93b4c9a86 Merge pull request #226 from giomasce-throwaway/develop
Fix missing name copyright headers.
2020-10-06 09:14:40 +08:00
5a9bfa3d7d Fix missing name copyright headers.
The name was reconstructed from the Git history.
2020-10-05 19:31:34 +02:00
c46e492d45 Merge pull request #223 from Kojoley/deprecated-copy
Fix -Wdeprecated-copy
2020-05-30 01:51:15 +08:00
4979945690 Fix -Wdeprecated-copy 2020-04-30 02:47:37 +03:00
9dca58bd33 Fix definition-of-implicit-copy-constructor-is-deprecated warnings
Fixes #221
2020-04-20 19:02:10 +03:00
c3af48d345 Merge pull request #220 from eldiener/develop
Changes for Embarcadero C++ clang-based compilers, targeting Boost 1.74. Change __BORLANDC__ to BOOST_BORLANDC, which is defined in Boost conf…
2020-04-09 21:44:43 +08:00
70c38c7bf7 Change __BORLANDC__ to BOOST_BORLANDC, which is defined in Boost config for the Embarcadero non-clang-based compilers. 2020-03-31 08:30:37 -04:00
edddad2b4e Merge branch 'master' into develop 2020-03-26 19:13:17 +08:00
b3c212c47f Merge pull request #216 from Kojoley/fix-comparison-operators-enabler
Fix comparison operators enabler
2019-12-04 14:24:27 +08:00
4778c4c180 Fix comparison operators enabler
Overloads must not be presented until both arguments are Fusion sequences.
2019-12-04 03:04:34 +03:00
5f30a8da60 Merge pull request #212 from Romain-Geissler-1A/delete-private-copy-operators
Explicitly delete all non implemented assignment operators.
2019-11-19 09:40:12 +08:00
fc32335387 Merge pull request #215 from Kojoley/patch-1
CI: Fix Appveyor builds
2019-11-01 08:32:51 +08:00
b5751ae85d CI: Fix Appveyor builds 2019-10-31 22:12:43 +03:00
e5a007579f Merge pull request #214 from Jac1494/develop
Disabled two test which tries to return local address
2019-07-27 10:54:46 +08:00
3e07b3f66b Disabled two test which tries to return local address 2019-07-25 18:10:22 +05:30
08076be2ac Explicitly delete all non implemented assignment operators.
Commit (almost) automatically generated with the following sed command:
sed -i -ne '1h;1!H;${g;s|\n[[:blank:]]*private:\n\([[:blank:]]*\)// silence MSVC warning C4512: assignment operator could not be generated\n\([[:blank:]]*\)\([^\n]\+\);\n|\n\1// silence MSVC warning C4512: assignment operator could not be generated\n\2BOOST_DELETED_FUNCTION(\3)\n|g;p}' $(git ls-files)
2019-05-08 17:11:37 +00:00
4c51811315 Merge pull request #208 from Mike-Devel/min_cmake
[CMake] Add minimal cmake file
2019-03-08 08:55:47 +09:00
19d6c7ad3b Fix is_view_impl to return false for non fusion sequences (just like is_sequence_impl). (reverted from commit 1c693f05bf) 2019-02-18 13:59:58 +08:00
1c693f05bf Fix is_view_impl to return false for non fusion sequences (just like is_sequence_impl). 2019-02-18 12:45:36 +08:00
b180146e3d [CMake] Add disclaimer and turn tabs into spaces 2019-01-28 13:02:40 +01:00
68affa1706 [CMake] Generate cmake target that other libraries can use
... to express their dependency on this library and retrieve any
configuration information such as the include directory, binary
to link to (if any), transitive dependencies, necessary compiler
options or the required c++ standards level.
2019-01-23 19:03:03 +01:00
f0089a640e Merge pull request #205 from Kojoley/sequence-intrinsic-at
Tweak sequence intrinsic at
2019-01-16 18:03:12 +09:00
908a34a4ed Tweak sequence intrinsic at
A bit clearer and slightly less work for the inliner
2018-11-01 02:01:15 +03:00
33 changed files with 103 additions and 85 deletions

26
CMakeLists.txt Normal file
View File

@ -0,0 +1,26 @@
# Copyright 2018 Mike Dev
# 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
cmake_minimum_required(VERSION 3.5...3.20)
project(boost_fusion VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
add_library(boost_fusion INTERFACE)
add_library(Boost::fusion ALIAS boost_fusion)
target_include_directories(boost_fusion INTERFACE include)
target_link_libraries(boost_fusion
INTERFACE
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
)

View File

@ -9,16 +9,16 @@ shallow_clone: true
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
TOOLSET: msvc-9.0
CXXSTD: latest # fake
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
TOOLSET: msvc-10.0
CXXSTD: latest # fake
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
TOOLSET: msvc-11.0
CXXSTD: latest # fake
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
TOOLSET: msvc-12.0
CXXSTD: latest # fake
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015

View File

@ -103,9 +103,7 @@ namespace boost { namespace fusion
}
};
private:
array_iterator<Array, Pos>& operator=(array_iterator<Array, Pos> const&);
BOOST_DELETED_FUNCTION(array_iterator& operator=(array_iterator const&))
};
}}

View File

@ -144,9 +144,8 @@ namespace boost { namespace fusion
: is_same<typename I1::identity, typename I2::identity>
{};
private:
// silence MSVC warning C4512: assignment operator could not be generated
boost_tuple_iterator& operator= (boost_tuple_iterator const&);
BOOST_DELETED_FUNCTION(boost_tuple_iterator& operator= (boost_tuple_iterator const&))
};
template <typename Null>

View File

@ -100,9 +100,7 @@ namespace boost { namespace fusion
}
};
private:
std_array_iterator<Array, Pos>& operator=(std_array_iterator<Array, Pos> const&);
BOOST_DELETED_FUNCTION(std_array_iterator& operator=(std_array_iterator const&))
};
}}

View File

@ -28,8 +28,7 @@
\
WRAPPED_TYPE& obj; \
\
private: \
NAME& operator= (NAME const&); \
BOOST_DELETED_FUNCTION(NAME& operator= (NAME const&)) \
}; \
\
BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DEFINITION_END(NAMESPACE_SEQ)

View File

@ -1,6 +1,6 @@
/*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
Copyright (c) 2007
Copyright (c) 2007 Dan Marsden
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)

View File

@ -111,9 +111,8 @@ namespace boost { namespace fusion {
Seq& seq_;
private:
// silence MSVC warning C4512: assignment operator could not be generated
deque_iterator& operator= (deque_iterator const&);
BOOST_DELETED_FUNCTION(deque_iterator& operator= (deque_iterator const&))
};
}}

View File

@ -42,9 +42,8 @@ namespace boost { namespace fusion
cons_type& cons;
private:
// silence MSVC warning C4512: assignment operator could not be generated
cons_iterator& operator= (cons_iterator const&);
BOOST_DELETED_FUNCTION(cons_iterator& operator= (cons_iterator const&))
};
struct nil_iterator : iterator_base<nil_iterator>

View File

@ -156,9 +156,8 @@ namespace boost { namespace fusion
Seq& seq_;
private:
// silence MSVC warning C4512: assignment operator could not be generated
map_iterator& operator= (map_iterator const&);
BOOST_DELETED_FUNCTION(map_iterator& operator= (map_iterator const&))
};
}}

View File

@ -41,11 +41,14 @@ namespace boost { namespace fusion
vector_iterator(Vector& in_vec)
: vec(in_vec) {}
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
vector_iterator(vector_iterator const& rhs)
: vec(rhs.vec) {}
Vector& vec;
private:
// silence MSVC warning C4512: assignment operator could not be generated
vector_iterator& operator= (vector_iterator const&);
BOOST_DELETED_FUNCTION(vector_iterator& operator= (vector_iterator const&))
};
}}

View File

@ -60,7 +60,7 @@ namespace boost { namespace fusion { namespace detail
template <typename PtrOrSmartPtr> struct non_const_pointee;
#if defined(BOOST_MSVC) || (defined(__BORLANDC__) && !defined(BOOST_DISABLE_WIN32))
#if defined(BOOST_MSVC) || (defined(BOOST_BORLANDC) && !defined(BOOST_DISABLE_WIN32))
# define BOOST_FUSION_TRAIT_DECL __cdecl
#else
# define BOOST_FUSION_TRAIT_DECL /**/

View File

@ -20,13 +20,13 @@ namespace boost { namespace fusion { namespace traits
{
template <typename Seq1, typename Seq2, typename Enable = void>
struct enable_equality
: mpl::or_<traits::is_sequence<Seq1>, traits::is_sequence<Seq2> >
: mpl::and_<traits::is_sequence<Seq1>, traits::is_sequence<Seq2> >
{};
template <typename Seq1, typename Seq2, typename Enable = void>
struct enable_comparison
: mpl::and_<
mpl::or_<traits::is_sequence<Seq1>, traits::is_sequence<Seq2> >
traits::is_sequence<Seq1>, traits::is_sequence<Seq2>
, mpl::equal_to<result_of::size<Seq1>, result_of::size<Seq2> >
>
{};

View File

@ -118,7 +118,7 @@ namespace boost { namespace fusion
>::type
at_c(Sequence& seq)
{
return fusion::at<mpl::int_<N> >(seq);
return result_of::at_c<Sequence, N>::call(seq);
}
template <int N, typename Sequence>
@ -126,7 +126,7 @@ namespace boost { namespace fusion
inline typename result_of::at_c<Sequence const, N>::type
at_c(Sequence const& seq)
{
return fusion::at<mpl::int_<N> >(seq);
return result_of::at_c<Sequence const, N>::call(seq);
}
}}

View File

@ -144,9 +144,8 @@ namespace boost { namespace fusion
Stream& stream;
private:
// silence MSVC warning C4512: assignment operator could not be generated
string_ios_manip& operator= (string_ios_manip const&);
BOOST_DELETED_FUNCTION(string_ios_manip& operator= (string_ios_manip const&))
};
} // detail

View File

@ -28,24 +28,11 @@ namespace boost { namespace fusion
{
})
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
BOOST_DEFAULTED_FUNCTION(
unused_type(unused_type const&) BOOST_FUSION_NOEXCEPT_ON_DEFAULTED,
{
})
template <typename T>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
unused_type(T const&) BOOST_NOEXCEPT
{
}
BOOST_FUSION_CONSTEXPR_THIS BOOST_FUSION_GPU_ENABLED
unused_type const&
operator=(unused_type const&) const BOOST_NOEXCEPT
{
return *this;
}
};
BOOST_CONSTEXPR_OR_CONST unused_type unused = unused_type();

View File

@ -51,15 +51,19 @@ namespace boost { namespace fusion
: seq(in_seq)
{}
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
filter_view(filter_view const& rhs)
: seq(rhs.seq)
{}
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
first_type first() const { return fusion::begin(seq); }
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
last_type last() const { return fusion::end(seq); }
typename mpl::if_<traits::is_view<Sequence>, Sequence, Sequence&>::type seq;
private:
// silence MSVC warning C4512: assignment operator could not be generated
filter_view& operator= (filter_view const&);
BOOST_DELETED_FUNCTION(filter_view& operator= (filter_view const&))
};
}}

View File

@ -59,11 +59,14 @@ namespace boost { namespace fusion
filter_iterator(First const& in_first)
: first(filter::iter_call(first_converter::call(in_first))) {}
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
filter_iterator(filter_iterator const& rhs)
: first(rhs.first) {}
first_type first;
private:
// silence MSVC warning C4512: assignment operator could not be generated
filter_iterator& operator= (filter_iterator const&);
BOOST_DELETED_FUNCTION(filter_iterator& operator= (filter_iterator const&))
};
}}

View File

@ -69,10 +69,10 @@ namespace boost { namespace fusion
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
concat_last_type concat_last() const { return fusion::end(seq2); }
private:
// silence MSVC warning C4512: assignment operator could not be generated
joint_view& operator= (joint_view const&);
BOOST_DELETED_FUNCTION(joint_view& operator= (joint_view const&))
private:
typename mpl::if_<traits::is_view<Sequence1>, Sequence1, Sequence1&>::type seq1;
typename mpl::if_<traits::is_view<Sequence2>, Sequence2, Sequence2&>::type seq2;
};

View File

@ -50,9 +50,8 @@ namespace boost { namespace fusion
first_type first;
concat_type concat;
private:
// silence MSVC warning C4512: assignment operator could not be generated
joint_view_iterator& operator= (joint_view_iterator const&);
BOOST_DELETED_FUNCTION(joint_view_iterator& operator= (joint_view_iterator const&))
};
}}

View File

@ -47,9 +47,8 @@ namespace boost { namespace fusion
Sequence& seq;
private:
// silence MSVC warning C4512: assignment operator could not be generated
nview_iterator& operator= (nview_iterator const&);
BOOST_DELETED_FUNCTION(nview_iterator& operator= (nview_iterator const&))
};
}}

View File

@ -44,9 +44,8 @@ namespace boost { namespace fusion
stored_seq_type seq;
private:
// silence MSVC warning C4512: assignment operator could not be generated
repetitive_view& operator= (repetitive_view const&);
BOOST_DELETED_FUNCTION(repetitive_view& operator= (repetitive_view const&))
};
}}

View File

@ -47,9 +47,8 @@ namespace boost { namespace fusion
Sequence& seq;
pos_type pos;
private:
// silence MSVC warning C4512: assignment operator could not be generated
repetitive_view_iterator& operator= (repetitive_view_iterator const&);
BOOST_DELETED_FUNCTION(repetitive_view_iterator& operator= (repetitive_view_iterator const&))
};
}}

View File

@ -61,9 +61,8 @@ namespace boost { namespace fusion
last_type last() const { return fusion::end(seq); }
typename mpl::if_<traits::is_view<Sequence>, Sequence, Sequence&>::type seq;
private:
// silence MSVC warning C4512: assignment operator could not be generated
reverse_view& operator= (reverse_view const&);
BOOST_DELETED_FUNCTION(reverse_view& operator= (reverse_view const&))
};
}}

View File

@ -48,9 +48,8 @@ namespace boost { namespace fusion
first_type first;
private:
// silence MSVC warning C4512: assignment operator could not be generated
reverse_view_iterator& operator= (reverse_view_iterator const&);
BOOST_DELETED_FUNCTION(reverse_view_iterator& operator= (reverse_view_iterator const&))
};
}}

View File

@ -20,11 +20,6 @@
#include <boost/fusion/view/single_view/detail/value_of_impl.hpp>
#include <boost/config.hpp>
#if defined (BOOST_MSVC)
# pragma warning(push)
# pragma warning (disable: 4512) // assignment operator could not be generated.
#endif
namespace boost { namespace fusion
{
struct single_view_iterator_tag;
@ -46,8 +41,7 @@ namespace boost { namespace fusion
SingleView& view;
private:
single_view_iterator& operator=(single_view_iterator const&);
BOOST_DELETED_FUNCTION(single_view_iterator& operator=(single_view_iterator const&))
};
}}
@ -60,10 +54,6 @@ namespace std
}
#endif
#if defined (BOOST_MSVC)
# pragma warning(pop)
#endif
#endif

View File

@ -76,9 +76,8 @@ namespace boost { namespace fusion
typename mpl::if_<traits::is_view<Sequence1>, Sequence1, Sequence1&>::type seq1;
typename mpl::if_<traits::is_view<Sequence2>, Sequence2, Sequence2&>::type seq2;
private:
// silence MSVC warning C4512: assignment operator could not be generated
transform_view& operator= (transform_view const&);
BOOST_DELETED_FUNCTION(transform_view& operator= (transform_view const&))
};
// Unary Version
@ -113,9 +112,8 @@ namespace boost { namespace fusion
typename mpl::if_<traits::is_view<Sequence>, Sequence, Sequence&>::type seq;
transform_type f;
private:
// silence MSVC warning C4512: assignment operator could not be generated
transform_view& operator= (transform_view const&);
BOOST_DELETED_FUNCTION(transform_view& operator= (transform_view const&))
};
}}

View File

@ -42,9 +42,8 @@ namespace boost { namespace fusion
first_type first;
transform_type f;
private:
// silence MSVC warning C4512: assignment operator could not be generated
transform_view_iterator& operator= (transform_view_iterator const&);
BOOST_DELETED_FUNCTION(transform_view_iterator& operator= (transform_view_iterator const&))
};
// Binary Version
@ -70,9 +69,8 @@ namespace boost { namespace fusion
first2_type first2;
transform_type f;
private:
// silence MSVC warning C4512: assignment operator could not be generated
transform_view_iterator2& operator= (transform_view_iterator2 const&);
BOOST_DELETED_FUNCTION(transform_view_iterator2& operator= (transform_view_iterator2 const&))
};
}}

View File

@ -16,5 +16,6 @@
"Joel de Guzman <joel -at- boost-consulting.com>",
"Dan Marsden <danmarsden -at- yahoo.co.uk>",
"Tobias Schwinger <tschwinger -at- isonews2.com>"
]
],
"cxxstd": "03"
}

View File

@ -388,7 +388,8 @@ void test_sequence_n(Sequence & seq, mpl::int_<0>)
BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_ref_ctx,seq)) = that.data));
BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_ptr_ctx,seq)) = that.data));
BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_spt_ctx,seq)) = that.data));
BOOST_TEST(that.data == fusion::invoke(& members::data, fusion::join(sv_obj_c_ctx,seq)));
// disabling this test, since it tries to return local address which is undefined behavior
//~ BOOST_TEST(that.data == fusion::invoke(& members::data, fusion::join(sv_obj_c_ctx,seq)));
BOOST_TEST(that.data == fusion::invoke(& members::data, fusion::join(sv_ref_c_ctx,seq)));
BOOST_TEST(that.data == fusion::invoke(& members::data, fusion::join(sv_ptr_c_ctx,seq)));
BOOST_TEST(that.data == fusion::invoke(& members::data, fusion::join(sv_spt_c_ctx,seq)));
@ -398,7 +399,8 @@ void test_sequence_n(Sequence & seq, mpl::int_<0>)
BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_ref_d_ctx,seq)) = that.data));
BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_ptr_d_ctx,seq)) = that.data));
BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_spt_d_ctx,seq)) = that.data));
BOOST_TEST(that.data == fusion::invoke(& members::data, fusion::join(sv_obj_c_d_ctx,seq)));
// disabling this test, since it tries to return local address which is undefined behavior
//~ BOOST_TEST(that.data == fusion::invoke(& members::data, fusion::join(sv_obj_c_d_ctx,seq)));
BOOST_TEST(that.data == fusion::invoke(& members::data, fusion::join(sv_ref_c_d_ctx,seq)));
BOOST_TEST(that.data == fusion::invoke(& members::data, fusion::join(sv_ptr_c_d_ctx,seq)));
BOOST_TEST(that.data == fusion::invoke(& members::data, fusion::join(sv_spt_c_d_ctx,seq)));

View File

@ -8,6 +8,20 @@
#include <boost/detail/lightweight_test.hpp>
#include <boost/fusion/sequence/comparison.hpp>
struct not_a_fusion_container {};
template <typename T>
inline bool operator==(not_a_fusion_container, T const&) { return true; }
template <typename T>
inline bool operator!=(not_a_fusion_container, T const&) { return true; }
template <typename T>
inline bool operator<(not_a_fusion_container, T const&) { return true; }
template <typename T>
inline bool operator<=(not_a_fusion_container, T const&) { return true; }
template <typename T>
inline bool operator>(not_a_fusion_container, T const&) { return true; }
template <typename T>
inline bool operator>=(not_a_fusion_container, T const&) { return true; }
void
equality_test()
{
@ -28,6 +42,9 @@ equality_test()
BOOST_TEST(!(v1 == v5));
BOOST_TEST(v5 != v1);
BOOST_TEST(!(v5 == v1));
BOOST_TEST(not_a_fusion_container() == v1);
BOOST_TEST(not_a_fusion_container() != v1);
}
void
@ -51,6 +68,11 @@ ordering_test()
FUSION_SEQUENCE<int, char, bool> v5(5, 'a', true);
v1 >= v5;
#endif
BOOST_TEST(not_a_fusion_container() > v1);
BOOST_TEST(not_a_fusion_container() >= v1);
BOOST_TEST(not_a_fusion_container() < v1);
BOOST_TEST(not_a_fusion_container() <= v1);
}

View File

@ -1,7 +1,7 @@
/*=============================================================================
Copyright (c) 1999-2003 Jaakko Jarvi
Copyright (c) 2001-2011 Joel de Guzman
Copyright (c) 2006
Copyright (c) 2006 Dan Marsden
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)

View File

@ -1,7 +1,7 @@
/*=============================================================================
Copyright (c) 1999-2003 Jaakko Jarvi
Copyright (c) 2001-2011 Joel de Guzman
Copyright (c) 2006
Copyright (c) 2006 Dan Marsden
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)