[boost][range] - fix for ticket 6888 - unique predicate overloads

[SVN r85686]
This commit is contained in:
Neil Groves
2013-09-15 19:44:36 +00:00
parent a59819fc6e
commit 90ce7f3703
7 changed files with 183 additions and 15 deletions

View File

@ -86,14 +86,14 @@ unique( const ForwardRange& rng )
/// \overload
template< class ForwardRange, class BinaryPredicate >
inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange, return_begin_found>::type
unique( ForwardRange& rng, BinaryPredicate )
unique( ForwardRange& rng, BinaryPredicate pred )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
return ::boost::range::unique<return_begin_found>(rng);
return ::boost::range::unique<return_begin_found>(rng, pred);
}
/// \overload
template< class ForwardRange, class BinaryPredicate >
inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange, return_begin_found>::type
unique( const ForwardRange& rng, BinaryPredicate pred )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));

6
include/boost/range/config.hpp Executable file → Normal file
View File

@ -48,6 +48,12 @@
#define BOOST_RANGE_ARRAY_REF() (&boost_range_array)
#endif
#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)))
# define BOOST_RANGE_UNUSED __attribute__((unused))
#else
# define BOOST_RANGE_UNUSED
#endif
#endif