本文整理汇总了C++中reference_wrapper类的典型用法代码示例。如果您正苦于以下问题:C++ reference_wrapper类的具体用法?C++ reference_wrapper怎么用?C++ reference_wrapper使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了reference_wrapper类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: operator
Type operator()(
const reference_wrapper<
typename remove_const<
typename remove_reference<Value>::type>::type>& x,int=0)const
{
return operator()(x.get());
}
示例2: compare_equal
bool
compare_equal(const Function& f, const reference_wrapper<Functor>& g,
int, false_type)
{
if (const Functor* fp = f.template target<Functor>())
return fp == g.get_pointer();
else return false;
}
示例3: operator
Type operator()(
const reference_wrapper<
typename remove_const<
typename remove_reference<Value>::type>::type>& x
#if BOOST_WORKAROUND(BOOST_MSVC,==1310)
/* http://lists.boost.org/Archives/boost/2015/10/226135.php */
,int=0
#endif
)const
{
return operator()(x.get());
}
示例4: operator
Type operator()(const reference_wrapper<Class>& x)const
{
return operator()(x.get());
}
示例5: m_visit_reference_wrapper
void m_visit_reference_wrapper(const reference_wrapper<T> &t, const mpl::bool_<true> &) const
{
m_visit_pointer(t.get_pointer(), mpl::bool_<true>());
}
示例6: call
static void
call(reference_wrapper<T> const& val, Attribute& attr)
{
assign_to(val.get(), attr);
}
示例7: call
static type call(reference_wrapper<basic_regex<BidiIter> const> const &rex)
{
typedef core_access<BidiIter> access;
shared_ptr<regex_impl<BidiIter> > impl = access::get_regex_impl(rex.get());
return type(impl);
}
示例8: fmt_wrapper
/*!
* Constructor
*
* \param obj Object to be referenced
*/
explicit fmt_wrapper(reference_wrapper< T > const& obj) : m_T(obj.get()) {}
示例9: operator
inline Return operator() ( const reference_wrapper< const Type >& v_ref ) const
{
return this->operator() ( v_ref.get() );
}
示例10: call
static type call(reference_wrapper<Attribute> const& attr, Context& ctx)
{
return extract_from<Exposed>(attr.get(), ctx);
}
示例11:
inline bool operator>=(const reference_wrapper<T>& lhs, const reference_wrapper<T>& rhs){
return lhs.get() >= rhs.get();
}
示例12: put
inline void
put(reference_wrapper<M> mapp, K a, V p)
{
mapp.get()[a] = p;
}
示例13: worker_died_unexpectedly
void worker_died_unexpectedly(size_t const new_worker_count)
{
m_pool.get().resize(new_worker_count + 1);
}
示例14: resize
bool resize(size_t const worker_count)
{
return m_pool.get().resize(worker_count);
}