mirror of
https://github.com/boostorg/poly_collection.git
synced 2026-07-21 13:33:37 +00:00
removed DR1467 workaround as defect is now avoided everywhere
This commit is contained in:
@@ -1119,6 +1119,10 @@ to allow for the definition of container-level `operator<` and related operators
|
|||||||
|
|
||||||
[section Release notes]
|
[section Release notes]
|
||||||
|
|
||||||
|
[section Boost 1.67]
|
||||||
|
|
||||||
|
* Maintenance fixes.
|
||||||
|
|
||||||
[section Boost 1.66]
|
[section Boost 1.66]
|
||||||
|
|
||||||
* Boost.PolyCollection has been backported to GCC 4.8 to 4.9 and Clang 3.3 to 3.6.
|
* Boost.PolyCollection has been backported to GCC 4.8 to 4.9 and Clang 3.3 to 3.6.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright 2016-2017 Joaquin M Lopez Munoz.
|
/* Copyright 2016-2018 Joaquin M Lopez Munoz.
|
||||||
* Distributed under the Boost Software License, Version 1.0.
|
* Distributed under the Boost Software License, Version 1.0.
|
||||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
* http://www.boost.org/LICENSE_1_0.txt)
|
* http://www.boost.org/LICENSE_1_0.txt)
|
||||||
@@ -19,7 +19,6 @@
|
|||||||
#include <boost/poly_collection/detail/iterator_traits.hpp>
|
#include <boost/poly_collection/detail/iterator_traits.hpp>
|
||||||
#include <boost/poly_collection/detail/segment_split.hpp>
|
#include <boost/poly_collection/detail/segment_split.hpp>
|
||||||
#include <boost/poly_collection/detail/type_restitution.hpp>
|
#include <boost/poly_collection/detail/type_restitution.hpp>
|
||||||
#include <boost/poly_collection/detail/workaround_dr1467.hpp>
|
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
@@ -91,8 +90,6 @@ bool none_of(const Iterator& first,const Iterator& last,Predicate pred)
|
|||||||
|
|
||||||
struct for_each_alg
|
struct for_each_alg
|
||||||
{
|
{
|
||||||
BOOST_POLY_COLLECTION_WORKAROUND_DR1467(for_each_alg)
|
|
||||||
|
|
||||||
template<typename InputIterator,typename Function>
|
template<typename InputIterator,typename Function>
|
||||||
void operator()(
|
void operator()(
|
||||||
InputIterator first,InputIterator last,Function& f)const /* note the & */
|
InputIterator first,InputIterator last,Function& f)const /* note the & */
|
||||||
@@ -197,8 +194,6 @@ Iterator find_first_of(
|
|||||||
template<typename... Ts>
|
template<typename... Ts>
|
||||||
struct adjacent_find_alg
|
struct adjacent_find_alg
|
||||||
{
|
{
|
||||||
BOOST_POLY_COLLECTION_WORKAROUND_DR1467(adjacent_find_alg)
|
|
||||||
|
|
||||||
template<
|
template<
|
||||||
typename LocalIterator,typename BinaryPredicate,typename LocalBaseIterator
|
typename LocalIterator,typename BinaryPredicate,typename LocalBaseIterator
|
||||||
>
|
>
|
||||||
@@ -289,8 +284,6 @@ std::ptrdiff_t count_if(
|
|||||||
|
|
||||||
struct mismatch_alg
|
struct mismatch_alg
|
||||||
{
|
{
|
||||||
BOOST_POLY_COLLECTION_WORKAROUND_DR1467(mismatch_alg)
|
|
||||||
|
|
||||||
template<
|
template<
|
||||||
typename InputIterator1,
|
typename InputIterator1,
|
||||||
typename InputIterator2,typename BinaryPredicate
|
typename InputIterator2,typename BinaryPredicate
|
||||||
@@ -374,8 +367,6 @@ std::pair<Iterator,InputIterator> mismatch(
|
|||||||
|
|
||||||
struct equal_alg
|
struct equal_alg
|
||||||
{
|
{
|
||||||
BOOST_POLY_COLLECTION_WORKAROUND_DR1467(equal_alg)
|
|
||||||
|
|
||||||
template<
|
template<
|
||||||
typename InputIterator1,
|
typename InputIterator1,
|
||||||
typename InputIterator2,typename BinaryPredicate
|
typename InputIterator2,typename BinaryPredicate
|
||||||
@@ -603,8 +594,6 @@ Iterator find_end(
|
|||||||
|
|
||||||
struct search_n_alg
|
struct search_n_alg
|
||||||
{
|
{
|
||||||
BOOST_POLY_COLLECTION_WORKAROUND_DR1467(search_n_alg)
|
|
||||||
|
|
||||||
template<
|
template<
|
||||||
typename ForwardIterator,typename Size,
|
typename ForwardIterator,typename Size,
|
||||||
typename T,typename BinaryPredicate
|
typename T,typename BinaryPredicate
|
||||||
@@ -764,8 +753,6 @@ OutputIterator transform(
|
|||||||
|
|
||||||
struct transform2_alg
|
struct transform2_alg
|
||||||
{
|
{
|
||||||
BOOST_POLY_COLLECTION_WORKAROUND_DR1467(transform2_alg)
|
|
||||||
|
|
||||||
template<
|
template<
|
||||||
typename InputIterator1,typename InputIterator2,
|
typename InputIterator1,typename InputIterator2,
|
||||||
typename OutputIterator,typename BinaryOperation
|
typename OutputIterator,typename BinaryOperation
|
||||||
@@ -799,8 +786,6 @@ struct replace_copy_alg
|
|||||||
* conditional operator".
|
* conditional operator".
|
||||||
*/
|
*/
|
||||||
|
|
||||||
BOOST_POLY_COLLECTION_WORKAROUND_DR1467(replace_copy_alg)
|
|
||||||
|
|
||||||
template<typename InputIterator,typename OutputIterator,typename T>
|
template<typename InputIterator,typename OutputIterator,typename T>
|
||||||
OutputIterator operator()(
|
OutputIterator operator()(
|
||||||
InputIterator first,InputIterator last,OutputIterator res,
|
InputIterator first,InputIterator last,OutputIterator res,
|
||||||
@@ -832,8 +817,6 @@ struct replace_copy_if_alg
|
|||||||
* conditional operator".
|
* conditional operator".
|
||||||
*/
|
*/
|
||||||
|
|
||||||
BOOST_POLY_COLLECTION_WORKAROUND_DR1467(replace_copy_if_alg)
|
|
||||||
|
|
||||||
template<
|
template<
|
||||||
typename InputIterator,typename OutputIterator,
|
typename InputIterator,typename OutputIterator,
|
||||||
typename Predicate,typename T
|
typename Predicate,typename T
|
||||||
@@ -890,8 +873,6 @@ OutputIterator remove_copy_if(
|
|||||||
template<typename... Ts>
|
template<typename... Ts>
|
||||||
struct unique_copy_alg
|
struct unique_copy_alg
|
||||||
{
|
{
|
||||||
BOOST_POLY_COLLECTION_WORKAROUND_DR1467(unique_copy_alg)
|
|
||||||
|
|
||||||
template<
|
template<
|
||||||
typename LocalIterator,typename OutputIterator,
|
typename LocalIterator,typename OutputIterator,
|
||||||
typename BinaryPredicate,typename LocalBaseIterator
|
typename BinaryPredicate,typename LocalBaseIterator
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright 2016-2017 Joaquin M Lopez Munoz.
|
/* Copyright 2016-2018 Joaquin M Lopez Munoz.
|
||||||
* Distributed under the Boost Software License, Version 1.0.
|
* Distributed under the Boost Software License, Version 1.0.
|
||||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
* http://www.boost.org/LICENSE_1_0.txt)
|
* http://www.boost.org/LICENSE_1_0.txt)
|
||||||
@@ -16,7 +16,6 @@
|
|||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
#include <boost/detail/workaround.hpp>
|
#include <boost/detail/workaround.hpp>
|
||||||
#include <boost/poly_collection/detail/integer_sequence.hpp>
|
#include <boost/poly_collection/detail/integer_sequence.hpp>
|
||||||
#include <boost/poly_collection/detail/workaround_dr1467.hpp>
|
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
@@ -40,8 +39,6 @@ struct name \
|
|||||||
#define BOOST_POLY_COLLECTION_DEFINE_OVERLOAD_SET(name,f) \
|
#define BOOST_POLY_COLLECTION_DEFINE_OVERLOAD_SET(name,f) \
|
||||||
struct name \
|
struct name \
|
||||||
{ \
|
{ \
|
||||||
BOOST_POLY_COLLECTION_WORKAROUND_DR1467(name) \
|
|
||||||
\
|
|
||||||
template<typename... Args> \
|
template<typename... Args> \
|
||||||
auto operator()(Args&&... args)const-> \
|
auto operator()(Args&&... args)const-> \
|
||||||
decltype(f(std::forward<Args>(args)...)) \
|
decltype(f(std::forward<Args>(args)...)) \
|
||||||
@@ -184,8 +181,6 @@ deref_1st_to_class<F> deref_1st_to(const F& f)
|
|||||||
|
|
||||||
struct transparent_equal_to
|
struct transparent_equal_to
|
||||||
{
|
{
|
||||||
BOOST_POLY_COLLECTION_WORKAROUND_DR1467(transparent_equal_to)
|
|
||||||
|
|
||||||
template<typename T,typename U>
|
template<typename T,typename U>
|
||||||
auto operator()(T&& x,U&& y)const
|
auto operator()(T&& x,U&& y)const
|
||||||
noexcept(noexcept(std::forward<T>(x)==std::forward<U>(y)))
|
noexcept(noexcept(std::forward<T>(x)==std::forward<U>(y)))
|
||||||
|
|||||||
@@ -1,35 +0,0 @@
|
|||||||
/* Copyright 2017 Joaquin M Lopez Munoz.
|
|
||||||
* 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)
|
|
||||||
*
|
|
||||||
* See http://www.boost.org/libs/poly_collection for library home page.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef BOOST_POLY_COLLECTION_DETAIL_WORKAROUND_DR1467_HPP
|
|
||||||
#define BOOST_POLY_COLLECTION_DETAIL_WORKAROUND_DR1467_HPP
|
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
|
||||||
#pragma once
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <boost/config.hpp>
|
|
||||||
#include <boost/detail/workaround.hpp>
|
|
||||||
|
|
||||||
#if BOOST_WORKAROUND(BOOST_GCC_VERSION,<50000)||\
|
|
||||||
defined(BOOST_CLANG)&&\
|
|
||||||
(__clang_major__<3||(__clang_major__==3&&__clang_minor__<=6))
|
|
||||||
/* Defect report 1467 denounces that for aggregate types an intended {}-style
|
|
||||||
* copy construction will be mistaken for aggregate initialization:
|
|
||||||
* http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1467
|
|
||||||
*
|
|
||||||
* A solution is to define a default constructor for the offending class so
|
|
||||||
* that it is no longer an aggregate.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define BOOST_POLY_COLLECTION_WORKAROUND_DR1467(name) name(){}
|
|
||||||
#else
|
|
||||||
#define BOOST_POLY_COLLECTION_WORKAROUND_DR1467(name)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
+1
-3
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright 2016-2017 Joaquin M Lopez Munoz.
|
/* Copyright 2016-2018 Joaquin M Lopez Munoz.
|
||||||
* Distributed under the Boost Software License, Version 1.0.
|
* Distributed under the Boost Software License, Version 1.0.
|
||||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
* http://www.boost.org/LICENSE_1_0.txt)
|
* http://www.boost.org/LICENSE_1_0.txt)
|
||||||
@@ -66,8 +66,6 @@ using t5=boost::type_erasure::any<
|
|||||||
|
|
||||||
struct to_int
|
struct to_int
|
||||||
{
|
{
|
||||||
to_int(){};
|
|
||||||
|
|
||||||
template<typename Concept,typename Tag>
|
template<typename Concept,typename Tag>
|
||||||
int operator()(const boost::type_erasure::any<Concept,Tag>& x)const
|
int operator()(const boost::type_erasure::any<Concept,Tag>& x)const
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-3
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright 2016-2017 Joaquin M Lopez Munoz.
|
/* Copyright 2016-2018 Joaquin M Lopez Munoz.
|
||||||
* Distributed under the Boost Software License, Version 1.0.
|
* Distributed under the Boost Software License, Version 1.0.
|
||||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
* http://www.boost.org/LICENSE_1_0.txt)
|
* http://www.boost.org/LICENSE_1_0.txt)
|
||||||
@@ -83,8 +83,6 @@ using t5=derived5;
|
|||||||
|
|
||||||
struct to_int
|
struct to_int
|
||||||
{
|
{
|
||||||
to_int(){};
|
|
||||||
|
|
||||||
template<typename F>
|
template<typename F>
|
||||||
int operator()(const F& f)const{return f(1);}
|
int operator()(const F& f)const{return f(1);}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright 2016-2017 Joaquin M Lopez Munoz.
|
/* Copyright 2016-2018 Joaquin M Lopez Munoz.
|
||||||
* Distributed under the Boost Software License, Version 1.0.
|
* Distributed under the Boost Software License, Version 1.0.
|
||||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
* http://www.boost.org/LICENSE_1_0.txt)
|
* http://www.boost.org/LICENSE_1_0.txt)
|
||||||
@@ -135,8 +135,6 @@ inline bool operator==(const t4&,const t2&){return false;}
|
|||||||
|
|
||||||
struct to_int
|
struct to_int
|
||||||
{
|
{
|
||||||
to_int(){};
|
|
||||||
|
|
||||||
template<typename F>
|
template<typename F>
|
||||||
int operator()(const F& f)const{return f(1);}
|
int operator()(const F& f)const{return f(1);}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user