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


C++ reference_wrapper::get方法代码示例

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


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

示例1: test_range

result_list runner::test_range(files_iterator begin, files_iterator end, std::reference_wrapper<report_type> report) const
{
    config defaults;
    result_list results;

    for (runner::files_iterator i = begin; i != end; i++)
    {
        runner::path_type const & file = *i;
        if (file.extension() == ".xml")
        {
            try
            {
                result_list r = test_one(file, defaults, report);
                std::move(r.begin(), r.end(), std::back_inserter(results));
            }
            catch (std::exception const& ex)
            {
                result r;
                r.state = STATE_ERROR;
                r.name = file.string();
                r.error_message = ex.what();
                results.emplace_back(r);
                mapnik::util::apply_visitor(report_visitor(r), report.get());
            }
        }
    }

    return results;
}
开发者ID:cailu2121,项目名称:mapnik,代码行数:29,代码来源:runner.cpp

示例2: get

 static std::shared_ptr<Data> get(std::reference_wrapper<T> obj, bool t_return_value)
 {
   auto p = &obj.get();
   return std::make_shared<Data>(
         detail::Get_Type_Info<T>::get(),
         chaiscript::detail::Any(std::move(obj)),
         true,
         p,
         t_return_value
       );
 }
开发者ID:Arpit007,项目名称:ChaiScript,代码行数:11,代码来源:boxed_value.hpp

示例3: jsonStoreInterpolations

void jsonStoreInterpolations(std::reference_wrapper<RevisionThree> json, const InterpolationList &interpolations)
{
    namespace Base64VLQ = SourceMap::intern::Base64VLQ;
    if (interpolations.empty()) return; // nothing to store

    QString encoded;
    for(const auto& p : interpolations) {
        Base64VLQ::encode(encoded, static_cast<int>(p.first));
        Base64VLQ::encode(encoded, p.second);
    }
    json.get().insert(INTERPOLATIONS_KEY, encoded);
}
开发者ID:ChewieSC,项目名称:SourceMap-Qt,代码行数:12,代码来源:Interpolation.cpp

示例4: operator

 void operator() ()
 {
     results.get().call = true;
 }
开发者ID:619213152,项目名称:vpal20,代码行数:4,代码来源:shared_handler.test.cpp

示例5: consume

 void consume(std::reference_wrapper<T>& x) {
   return consume(x.get());
 }
开发者ID:crudbug,项目名称:actor-framework,代码行数:3,代码来源:stringification_inspector.hpp

示例6: operator

 void operator()(msgpack::object::with_zone& o, const std::reference_wrapper<T>& v) const {
     msgpack::adaptor::object_with_zone<typename std::remove_const<T>::type>()(o, v.get());
 }
开发者ID:ankit-cliqz,项目名称:keyvi,代码行数:3,代码来源:reference_wrapper.hpp

示例7: write

 /**
  * Write implementation delegated to the underlying sink
  * 
  * @param buffer source buffer
  * @param length number of bytes to process
  * @return number of bytes processed
  */
 std::streamsize write(const char* buffer, std::streamsize length) {
     return sink.get().write(buffer, length);
 }
开发者ID:staticlibs,项目名称:staticlib_io,代码行数:10,代码来源:reference_sink.hpp

示例8: ref

 ranges::reference_wrapper<T> operator()(std::reference_wrapper<T> ref) const
 {
     return ranges::ref(ref.get());
 }
开发者ID:CornedBee,项目名称:range-v3,代码行数:4,代码来源:all.hpp

示例9:

 output_stream(std::reference_wrapper<std::ostream> os)
   : write_f(make_std_ostream_write_function(os.get()))
 {}
开发者ID:7ev3n,项目名称:hpx,代码行数:3,代码来源:output_stream.hpp

示例10: read

 /**
  * Read implementation delegated to the underlying source
  * 
  * @param buffer output buffer
  * @param length number of bytes to process
  * @return number of bytes processed
  */
 std::streamsize read(char* buffer, std::streamsize length) {
     return src.get().read(buffer, length);
 }
开发者ID:staticlibs,项目名称:staticlib_io,代码行数:10,代码来源:reference_source.hpp

示例11:

 /**
  * Underlying source accessor
  * 
  * @return underlying source reference
  */
 Source& get_source() {
     return src.get();
 }
开发者ID:staticlibs,项目名称:staticlib_io,代码行数:8,代码来源:reference_source.hpp

示例12: optional

		optional(const std::reference_wrapper<Tc>& t) : optional(std::addressof(t.get())) {

		}
开发者ID:daviddhas,项目名称:CS-gO,代码行数:3,代码来源:optional.hpp

示例13: flush

 /**
  * Flushes destination sink
  * 
  * @return number of bytes flushed
  */
 std::streamsize flush() {
     return sink.get().flush();
 }
开发者ID:staticlibs,项目名称:staticlib_io,代码行数:8,代码来源:reference_sink.hpp

示例14: wait

 void wait() {
     m_task.get().wait();
 }
开发者ID:jamelo,项目名称:raytracer,代码行数:3,代码来源:ThreadPool.hpp

示例15:

 /**
  * Underlying sink accessor
  * 
  * @return underlying sink reference
  */
 Sink& get_sink() {
     return sink.get();
 }
开发者ID:staticlibs,项目名称:staticlib_io,代码行数:8,代码来源:reference_sink.hpp


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