亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ret.hpp

?? boost庫提供標準的C++ API 配合dev c++使用,功能更加強大
?? HPP
字號:
// Boost Lambda Library  ret.hpp -----------------------------------------

// Copyright (C) 1999, 2000 Jaakko J鋜vi (jaakko.jarvi@cs.utu.fi)
//
// Permission to copy, use, sell and distribute this software is granted
// provided this copyright notice appears in all copies. 
// Permission to modify the code and to distribute modified code is granted
// provided this copyright notice appears in all copies, and a notice 
// that the code was modified is included with the copyright notice.
//
// This software is provided "as is" without express or implied warranty, 
// and with no claim as to its suitability for any purpose.
//
// For more information, see www.boost.org


#ifndef BOOST_LAMBDA_RET_HPP
#define BOOST_LAMBDA_RET_HPP

namespace boost { 
namespace lambda {

  // TODO:

//  Add specializations for function references for ret, protect and unlambda
//  e.g void foo(); unlambda(foo); fails, as it would add a const qualifier
  // for a function type. 
  // on the other hand unlambda(*foo) does work


// -- ret -------------------------
// the explicit return type template 

  // TODO: It'd be nice to make ret a nop for other than lambda functors
  // but causes an ambiguiyty with gcc (not with KCC), check what is the
  // right interpretation.

  //  // ret for others than lambda functors has no effect
  // template <class U, class T>
  // inline const T& ret(const T& t) { return t; }


template<class RET, class Arg>
inline const 
lambda_functor<
  lambda_functor_base<
    explicit_return_type_action<RET>, 
    tuple<lambda_functor<Arg> >
  > 
>
ret(const lambda_functor<Arg>& a1)
{
  return  
    lambda_functor_base<
      explicit_return_type_action<RET>, 
      tuple<lambda_functor<Arg> >
    > 
    (tuple<lambda_functor<Arg> >(a1));
}

// protect ------------------

  // protecting others than lambda functors has no effect
template <class T>
inline const T& protect(const T& t) { return t; }

template<class Arg>
inline const 
lambda_functor<
  lambda_functor_base<
    protect_action, 
    tuple<lambda_functor<Arg> >
  > 
>
protect(const lambda_functor<Arg>& a1)
{
  return 
      lambda_functor_base<
        protect_action, 
        tuple<lambda_functor<Arg> >
      > 
    (tuple<lambda_functor<Arg> >(a1));
}
   
// -------------------------------------------------------------------

// Hides the lambda functorness of a lambda functor. 
// After this, the functor is immune to argument substitution, etc.
// This can be used, e.g. to make it safe to pass lambda functors as 
// arguments to functions, which might use them as target functions

// note, unlambda and protect are different things. Protect hides the lambda
// functor for one application, unlambda for good.

template <class LambdaFunctor>
class non_lambda_functor
{
  LambdaFunctor lf;
public:
  
  // This functor defines the result_type typedef.
  // The result type must be deducible without knowing the arguments

  template <class SigArgs> struct sig {
    typedef typename 
      LambdaFunctor::inherited:: 
        template sig<typename SigArgs::tail_type>::type type;
  };

  explicit non_lambda_functor(const LambdaFunctor& a) : lf(a) {}

  typename LambdaFunctor::nullary_return_type  
  operator()() const {
    return lf.template 
      call<typename LambdaFunctor::nullary_return_type>
        (cnull_type(), cnull_type(), cnull_type(), cnull_type()); 
  }

  template<class A>
  typename sig<tuple<const non_lambda_functor, A&> >::type 
  operator()(A& a) const {
    return lf.template call<typename sig<tuple<const non_lambda_functor, A&> >::type >(a, cnull_type(), cnull_type(), cnull_type()); 
  }

  template<class A, class B>
  typename sig<tuple<const non_lambda_functor, A&, B&> >::type 
  operator()(A& a, B& b) const {
    return lf.template call<typename sig<tuple<const non_lambda_functor, A&, B&> >::type >(a, b, cnull_type(), cnull_type()); 
  }

  template<class A, class B, class C>
  typename sig<tuple<const non_lambda_functor, A&, B&, C&> >::type 
  operator()(A& a, B& b, C& c) const {
    return lf.template call<typename sig<tuple<const non_lambda_functor, A&, B&, C&> >::type>(a, b, c, cnull_type()); 
  }
};

template <class Arg>
inline const Arg& unlambda(const Arg& a) { return a; }

template <class Arg>
inline const non_lambda_functor<lambda_functor<Arg> > 
unlambda(const lambda_functor<Arg>& a)
{
  return non_lambda_functor<lambda_functor<Arg> >(a);
}

  // Due to a language restriction, lambda functors cannot be made to
  // accept non-const rvalue arguments. Usually iterators do not return 
  // temporaries, but sometimes they do. That's why a workaround is provided.
  // Note, that this potentially breaks const correctness, so be careful!

// any lambda functor can be turned into a const_incorrect_lambda_functor
// The operator() takes arguments as consts and then casts constness
// away. So this breaks const correctness!!! but is a necessary workaround
// in some cases due to language limitations.
// Note, that this is not a lambda_functor anymore, so it can not be used
// as a sub lambda expression.

template <class LambdaFunctor>
struct const_incorrect_lambda_functor {
  LambdaFunctor lf;
public:

  explicit const_incorrect_lambda_functor(const LambdaFunctor& a) : lf(a) {}

  template <class SigArgs> struct sig {
    typedef typename
      LambdaFunctor::inherited::template 
        sig<typename SigArgs::tail_type>::type type;
  };

  // The nullary case is not needed (no arguments, no parameter type problems)

  template<class A>
  typename sig<tuple<const const_incorrect_lambda_functor, A&> >::type
  operator()(const A& a) const {
    return lf.template call<typename sig<tuple<const const_incorrect_lambda_functor, A&> >::type >(const_cast<A&>(a), cnull_type(), cnull_type(), cnull_type());
  }

  template<class A, class B>
  typename sig<tuple<const const_incorrect_lambda_functor, A&, B&> >::type
  operator()(const A& a, const B& b) const {
    return lf.template call<typename sig<tuple<const const_incorrect_lambda_functor, A&, B&> >::type >(const_cast<A&>(a), const_cast<B&>(b), cnull_type(), cnull_type());
  }

  template<class A, class B, class C>
  typename sig<tuple<const const_incorrect_lambda_functor, A&, B&, C&> >::type
  operator()(const A& a, const B& b, const C& c) const {
    return lf.template call<typename sig<tuple<const const_incorrect_lambda_functor, A&, B&, C&> >::type>(const_cast<A&>(a), const_cast<B&>(b), const_cast<C&>(c), cnull_type());
  }
};

// ------------------------------------------------------------------------
// any lambda functor can be turned into a const_parameter_lambda_functor
// The operator() takes arguments as const.
// This is useful if lambda functors are called with non-const rvalues.
// Note, that this is not a lambda_functor anymore, so it can not be used
// as a sub lambda expression.

template <class LambdaFunctor>
struct const_parameter_lambda_functor {
  LambdaFunctor lf;
public:

  explicit const_parameter_lambda_functor(const LambdaFunctor& a) : lf(a) {}

  template <class SigArgs> struct sig {
    typedef typename
      LambdaFunctor::inherited::template 
        sig<typename SigArgs::tail_type>::type type;
  };

  // The nullary case is not needed: no arguments, no constness problems.

  template<class A>
  typename sig<tuple<const const_parameter_lambda_functor, const A&> >::type
  operator()(const A& a) const {
    return lf.template call<typename sig<tuple<const const_parameter_lambda_functor, const A&> >::type >(a, cnull_type(), cnull_type(), cnull_type());
  }

  template<class A, class B>
  typename sig<tuple<const const_parameter_lambda_functor, const A&, const B&> >::type
  operator()(const A& a, const B& b) const {
    return lf.template call<typename sig<tuple<const const_parameter_lambda_functor, const A&, const B&> >::type >(a, b, cnull_type(), cnull_type());
  }

  template<class A, class B, class C>
  typename sig<tuple<const const_parameter_lambda_functor, const A&, const B&, const C&>
>::type
  operator()(const A& a, const B& b, const C& c) const {
    return lf.template call<typename sig<tuple<const const_parameter_lambda_functor, const A&, const B&, const C&> >::type>(a, b, c, cnull_type());
  }
};

template <class Arg>
inline const const_incorrect_lambda_functor<lambda_functor<Arg> >
break_const(const lambda_functor<Arg>& lf)
{
  return const_incorrect_lambda_functor<lambda_functor<Arg> >(lf);
}


template <class Arg>
inline const const_parameter_lambda_functor<lambda_functor<Arg> >
const_parameters(const lambda_functor<Arg>& lf)
{
  return const_parameter_lambda_functor<lambda_functor<Arg> >(lf);
}

// make void ------------------------------------------------
// make_void( x ) turns a lambda functor x with some return type y into
// another lambda functor, which has a void return type
// when called, the original return type is discarded

// we use this action. The action class will be called, which means that
// the wrapped lambda functor is evaluated, but we just don't do anything
// with the result.
struct voidifier_action {
  template<class Ret, class A> static void apply(A&) {}
};

template<class Args> struct return_type_N<voidifier_action, Args> {
  typedef void type;
};

template<class Arg1>
inline const 
lambda_functor<
  lambda_functor_base<
    action<1, voidifier_action>,
    tuple<lambda_functor<Arg1> >
  > 
> 
make_void(const lambda_functor<Arg1>& a1) { 
return 
    lambda_functor_base<
      action<1, voidifier_action>,
      tuple<lambda_functor<Arg1> >
    > 
  (tuple<lambda_functor<Arg1> > (a1));
}

// for non-lambda functors, make_void does nothing 
// (the argument gets evaluated immediately)

template<class Arg1>
inline const 
lambda_functor<
  lambda_functor_base<do_nothing_action, null_type> 
> 
make_void(const Arg1& a1) { 
return 
    lambda_functor_base<do_nothing_action, null_type>();
}

// std_functor -----------------------------------------------------

//  The STL uses the result_type typedef as the convention to let binders know
//  the return type of a function object. 
//  LL uses the sig template.
//  To let LL know that the function object has the result_type typedef 
//  defined, it can be wrapped with the std_functor function.


// Just inherit form the template parameter (the standard functor), 
// and provide a sig template. So we have a class which is still the
// same functor + the sig template.

template<class T>
struct result_type_to_sig : public T {
  template<class Args> struct sig { typedef typename T::result_type type; };
  result_type_to_sig(const T& t) : T(t) {}
};

template<class F>
inline result_type_to_sig<F> std_functor(const F& f) { return f; }


} // namespace lambda 
} // namespace boost

#endif







?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产电影| 国产成人午夜视频| 中文字幕亚洲不卡| 久久久久久**毛片大全| 精品成人私密视频| 久久久久久久综合狠狠综合| 久久免费的精品国产v∧| 欧美tk—视频vk| 久久免费看少妇高潮| 国产亚洲视频系列| 国产精品理论片在线观看| 亚洲日本成人在线观看| 一区二区三区国产豹纹内裤在线| 亚洲免费视频成人| 视频一区中文字幕| 毛片不卡一区二区| 欧美日本在线观看| 韩国视频一区二区| 大白屁股一区二区视频| 色综合天天综合色综合av| 91片黄在线观看| 欧美日韩一级黄| 日韩免费一区二区三区在线播放| 337p日本欧洲亚洲大胆色噜噜| 久久亚洲精华国产精华液| 国产精品少妇自拍| 午夜精品久久久久久久久| 九九九久久久精品| 91国产福利在线| 久久午夜免费电影| 亚洲午夜羞羞片| 国产综合色在线视频区| 91福利小视频| 久久精品人人爽人人爽| 亚洲成人777| 一区二区三区日韩| 伊人开心综合网| 最新热久久免费视频| 天天综合色天天综合| 国产精品69毛片高清亚洲| 欧美午夜精品久久久久久超碰 | 欧美日本在线看| 国产亚洲视频系列| 日韩国产欧美三级| 色偷偷88欧美精品久久久| 日韩一区二区不卡| 亚洲午夜久久久久久久久电影院| 激情五月播播久久久精品| 精品视频全国免费看| 国产视频一区在线播放| 日韩电影在线一区二区三区| 99九九99九九九视频精品| 欧美大黄免费观看| 亚洲国产精品欧美一二99| 成人免费视频免费观看| 久久这里只精品最新地址| 天堂一区二区在线| 色天使久久综合网天天| 国产精品每日更新| 国产麻豆9l精品三级站| 日韩一区二区不卡| 蜜乳av一区二区三区| 欧美丰满美乳xxx高潮www| 亚洲另类春色国产| 99热这里都是精品| **网站欧美大片在线观看| 国产不卡视频一区二区三区| 精品国产乱码久久久久久老虎 | 韩日av一区二区| 精品视频色一区| 亚洲成av人片一区二区三区| 欧美性视频一区二区三区| 尤物av一区二区| 99v久久综合狠狠综合久久| 亚洲免费伊人电影| 亚洲第一精品在线| 亚洲综合久久久| 欧美电影免费观看高清完整版| 99久久精品国产观看| 99精品视频一区| 秋霞影院一区二区| 中文字幕亚洲视频| 久久影院午夜论| 欧美视频一区二区在线观看| 国产一区二区影院| 亚洲成人资源网| 亚洲摸摸操操av| 国产片一区二区| 日韩一卡二卡三卡四卡| 欧美日韩中文字幕一区二区| 粉嫩aⅴ一区二区三区四区五区| 日韩高清一区二区| 亚洲一区免费视频| 国产精品久久久久久久岛一牛影视 | 综合久久综合久久| 精品国精品国产| 777奇米四色成人影色区| 91欧美一区二区| av在线这里只有精品| 韩国成人精品a∨在线观看| 视频一区二区三区在线| 亚洲精品久久久蜜桃| 亚洲欧美怡红院| 国产精品久久久久久久岛一牛影视 | 91精品国产综合久久精品性色| 成人av在线网站| 九九国产精品视频| 免费成人美女在线观看.| 午夜精品福利一区二区三区av| 国产精品麻豆久久久| 欧美国产日本视频| 国产精品高清亚洲| 国产精品美女久久久久久久久 | 亚洲激情自拍偷拍| 亚洲欧洲成人精品av97| 亚洲欧洲日韩一区二区三区| 国产精品美女久久久久av爽李琼| 亚洲国产中文字幕在线视频综合| 欧美精品日韩一区| 成人av网在线| 国产精一区二区三区| 国产成人8x视频一区二区| 国产精品69毛片高清亚洲| 国产精品香蕉一区二区三区| 国产91在线|亚洲| 成人免费观看男女羞羞视频| 9i看片成人免费高清| 91一区二区三区在线观看| 91在线观看美女| 欧美日韩另类一区| 日韩欧美视频在线 | 91麻豆免费看片| 色婷婷综合久久| 欧美人妇做爰xxxⅹ性高电影| 91麻豆精品国产91久久久使用方法 | 国产欧美一区视频| 欧美成人一区二区三区片免费 | 国产精品一区久久久久| 国产精品2024| av中文字幕在线不卡| 欧美色男人天堂| 精品免费国产一区二区三区四区| 久久久九九九九| 18欧美乱大交hd1984| 亚洲3atv精品一区二区三区| 蜜桃精品视频在线观看| 成人动漫av在线| 欧美日韩卡一卡二| 久久久精品蜜桃| 一区二区三区毛片| 捆绑调教美女网站视频一区| 国产91高潮流白浆在线麻豆| 欧美影院一区二区三区| 2020国产精品| 亚洲精品免费在线观看| 美女mm1313爽爽久久久蜜臀| 成人小视频在线| 9191精品国产综合久久久久久| 亚洲欧美在线另类| 日韩激情视频网站| 99re在线精品| 欧美videos中文字幕| 亚洲欧洲综合另类在线| 国精产品一区一区三区mba视频 | 日韩女同互慰一区二区| 中文字幕亚洲综合久久菠萝蜜| 视频一区视频二区中文字幕| bt欧美亚洲午夜电影天堂| 337p亚洲精品色噜噜狠狠| 国产精品国产三级国产普通话99| 天天操天天色综合| 不卡高清视频专区| 精品国产一区二区三区av性色| 亚洲欧美激情在线| 国产老妇另类xxxxx| 欧美一区二区三区喷汁尤物| 亚洲欧美偷拍另类a∨色屁股| 久久精品二区亚洲w码| 欧美色综合影院| 亚洲精品写真福利| 成人蜜臀av电影| 久久一日本道色综合| 另类综合日韩欧美亚洲| 欧美日韩国产a| 一区二区高清免费观看影视大全| 国产成人在线免费| 久久一区二区视频| 韩国毛片一区二区三区| 欧美成人精品3d动漫h| 蜜桃久久久久久久| 日韩欧美自拍偷拍| 日韩和的一区二区| 欧美精品一二三四| 香港成人在线视频| 欧美日本一区二区三区| 怡红院av一区二区三区| 色哟哟精品一区| 一区二区三区四区不卡视频| 色综合久久久久综合| 亚洲宅男天堂在线观看无病毒|