当前位置: 首页>>代码示例>>C++>>正文


C++ message::begin方法代码示例

本文整理汇总了C++中message::begin方法的典型用法代码示例。如果您正苦于以下问题:C++ message::begin方法的具体用法?C++ message::begin怎么用?C++ message::begin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在message的用法示例。


在下文中一共展示了message::begin方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: operator

 bool operator()(const message& tup, pseudo_tuple<Us...>* out) const {
   auto& tarr = static_types_array<Ts...>::arr;
   if (sizeof...(Us) == 0) {
     // this pattern only has wildcards and thus always matches
     return true;
   }
   if (tup.size() < sizeof...(Us)) {
     return false;
   }
   if (out) {
     size_t pos = 0;
     size_t fallback_pos = 0;
     auto fpush = [&](const typename message::const_iterator& iter) {
       (*out)[pos++] = const_cast<void*>(iter.value());
     };
     auto fcommit = [&] { fallback_pos = pos; };
     auto frollback = [&] { pos = fallback_pos; };
     return (*this)(tup.begin(), tup.end(), tarr.begin(), tarr.end(), fpush,
                    fcommit, frollback);
   }
   auto no_push = [](const typename message::const_iterator&) { };
   auto nop = [] { };
   return (*this)(tup.begin(), tup.end(), tarr.begin(), tarr.end(), no_push,
                  nop, nop);
 }
开发者ID:ariosx,项目名称:actor-framework,代码行数:25,代码来源:matcher.hpp


注:本文中的message::begin方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。