本文整理汇总了C++中BOOST_RANGE_CONCEPT_ASSERT函数的典型用法代码示例。如果您正苦于以下问题:C++ BOOST_RANGE_CONCEPT_ASSERT函数的具体用法?C++ BOOST_RANGE_CONCEPT_ASSERT怎么用?C++ BOOST_RANGE_CONCEPT_ASSERT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了BOOST_RANGE_CONCEPT_ASSERT函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mismatch
inline std::pair<
BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type,
BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange2>::type >
mismatch(SinglePassRange1& rng1, const SinglePassRange2 & rng2)
{
BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> ));
BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
return ::boost::range_detail::mismatch_impl(
::boost::begin(rng1), ::boost::end(rng1),
::boost::begin(rng2), ::boost::end(rng2));
}
示例2: transform
inline OutputIterator
transform(const SinglePassRange1& rng1,
const SinglePassRange2& rng2,
OutputIterator out,
BinaryOperation fun)
{
BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
return pdalboost::range_detail::transform_impl(
pdalboost::begin(rng1), pdalboost::end(rng1),
pdalboost::begin(rng2), pdalboost::end(rng2),
out, fun);
}
示例3: BOOST_CHECK_EQUAL_RANGES
void BOOST_CHECK_EQUAL_RANGES(const RNG1 &arg_rng_1, ///< TODOCUMENT
const RNG2 &arg_rng_2 ///< TODOCUMENT
) {
BOOST_RANGE_CONCEPT_ASSERT(( boost::SinglePassRangeConcept< const RNG1 > ));
BOOST_RANGE_CONCEPT_ASSERT(( boost::SinglePassRangeConcept< const RNG2 > ));
BOOST_CHECK_EQUAL_COLLECTIONS(
common::cbegin( arg_rng_1 ),
common::cend ( arg_rng_1 ),
common::cbegin( arg_rng_2 ),
common::cend ( arg_rng_2 )
);
}
示例4: find_end
inline BOOST_DEDUCED_TYPENAME disable_if<
is_const<ForwardRange1>,
BOOST_DEDUCED_TYPENAME range_return<ForwardRange1,re>::type
>::type
find_end(ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred)
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange1> ));
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
return range_return<ForwardRange1,re>::
pack(std::find_end(pdalboost::begin(rng1), pdalboost::end(rng1),
pdalboost::begin(rng2), pdalboost::end(rng2), pred),
rng1);
}
示例5: search_n
inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
search_n(const ForwardRange& rng, Integer count, const Value& value,
BinaryPredicate pred)
{
BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<const ForwardRange>));
BOOST_RANGE_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate,
BOOST_DEDUCED_TYPENAME range_value<const ForwardRange>::type,
const Value&>));
return range_return<const ForwardRange,re>::
pack(range_detail::search_n_pred_impl(mars_boost::begin(rng),
mars_boost::end(rng),
count, value, pred),
rng);
}
示例6: find_first_of
inline BOOST_DEDUCED_TYPENAME disable_if<
is_const<SinglePassRange1>,
BOOST_DEDUCED_TYPENAME range_return<SinglePassRange1,re>::type
>::type
find_first_of(SinglePassRange1& rng1, const ForwardRange2& rng2)
{
BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> ));
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
return range_return<SinglePassRange1,re>::
pack(std::find_first_of(boost::begin(rng1), boost::end(rng1),
boost::begin(rng2), boost::end(rng2)),
rng1);
}
示例7: filter
inline filtered_range<Predicate, ForwardRange>
filter(ForwardRange& rng, Predicate filter_pred)
{
BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
return range_detail::filtered_range<Predicate, ForwardRange>( filter_pred, rng );
}
示例8: fill_n
inline ForwardRange& fill_n(ForwardRange& rng, Size n, const Value& val)
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
BOOST_ASSERT( static_cast<Size>(std::distance(boost::begin(rng), boost::end(rng))) >= n );
std::fill_n(boost::begin(rng), n, val);
return rng;
}
示例9: BOOST_RANGE_CONCEPT_ASSERT
inline adjacent_filtered_range<BinPredicate, ForwardRng, false>
operator|( ForwardRng& r,
const adjacent_excl_holder<BinPredicate>& f )
{
BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRng>));
return adjacent_filtered_range<BinPredicate, ForwardRng, false>( f.val, r );
}
示例10: partial_sort
inline const RandomAccessRange& partial_sort(const RandomAccessRange& rng,
BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type middle)
{
BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
std::partial_sort(boost::begin(rng), middle, boost::end(rng));
return rng;
}
示例11: adjacent_difference
inline OutputIterator adjacent_difference ( const SinglePassRange& rng,
OutputIterator result )
{
BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange> ));
return std::adjacent_difference( boost::begin(rng), boost::end(rng),
result );
}
示例12: remove_erase_if
inline void remove_erase_if( Container& on, Pred pred )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<Container> ));
on.erase(
std::remove_if(boost::begin(on), boost::end(on), pred),
boost::end(on));
}
示例13: remove_erase
inline void remove_erase( Container& on, const T& val )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<Container> ));
on.erase(
std::remove(boost::begin(on), boost::end(on), val),
boost::end(on));
}
示例14: unique_copy
inline OutputIterator
unique_copy( const SinglePassRange& rng, OutputIterator out_it,
BinaryPredicate pred )
{
BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange> ));
return std::unique_copy(boost::begin(rng), boost::end(rng), out_it, pred);
}
示例15: accumulate
inline Value accumulate(const SinglePassRange& rng, Value init)
{
BOOST_RANGE_CONCEPT_ASSERT((
SinglePassRangeConcept<const SinglePassRange>));
return std::accumulate(mars_boost::begin(rng), mars_boost::end(rng), init);
}