當前位置: 首頁>>代碼示例>>C++>>正文


C++ BOOST_RANGE_CONCEPT_ASSERT函數代碼示例

本文整理匯總了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));
}
開發者ID:00liujj,項目名稱:dealii,代碼行數:12,代碼來源:mismatch.hpp

示例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);
 }
開發者ID:EricAlex,項目名稱:PDAL,代碼行數:13,代碼來源:transform.hpp

示例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 )
    );
}
開發者ID:UCLOrengoGroup,項目名稱:cath-tools,代碼行數:13,代碼來源:boost_check_equal_ranges.hpp

示例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);
}
開發者ID:EricAlex,項目名稱:PDAL,代碼行數:14,代碼來源:find_end.hpp

示例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);
}
開發者ID:Iinvictus,項目名稱:mars,代碼行數:14,代碼來源:search_n.hpp

示例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);
}
開發者ID:imos,項目名稱:icfpc2015,代碼行數:14,代碼來源:find_first_of.hpp

示例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 );
        }
開發者ID:12307,項目名稱:EasyDarwin,代碼行數:7,代碼來源:filtered.hpp

示例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;
}
開發者ID:InstitutoDOr,項目名稱:FriendENGINE,代碼行數:7,代碼來源:fill_n.hpp

示例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 );
 }
開發者ID:Caraul,項目名稱:airgit,代碼行數:7,代碼來源:adjacent_filtered.hpp

示例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;
}
開發者ID:imos,項目名稱:icfpc2015,代碼行數:7,代碼來源:partial_sort.hpp

示例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 );
 }
開發者ID:0xDEC0DE8,項目名稱:mcsema,代碼行數:7,代碼來源:numeric.hpp

示例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));
}
開發者ID:PandaPYH,項目名稱:boost-svn,代碼行數:7,代碼來源:erase.hpp

示例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));
}
開發者ID:PandaPYH,項目名稱:boost-svn,代碼行數:7,代碼來源:erase.hpp

示例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);
}
開發者ID:3DJ,項目名稱:ofxOgre,代碼行數:7,代碼來源:unique_copy.hpp

示例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);
    }
開發者ID:Iinvictus,項目名稱:mars,代碼行數:7,代碼來源:numeric.hpp


注:本文中的BOOST_RANGE_CONCEPT_ASSERT函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。