本文整理汇总了C++中detail::moved_object类的典型用法代码示例。如果您正苦于以下问题:C++ moved_object类的具体用法?C++ moved_object怎么用?C++ moved_object使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了moved_object类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: scoped_lock
explicit scoped_lock(detail::moved_object<upgradable_lock<Mutex> > upgr)
: mp_mutex(0), m_locked(false)
{
upgradable_lock<mutex_type> &u_lock = upgr.get();
if(u_lock.owns()){
u_lock.mutex()->unlock_upgradable_and_lock();
m_locked = true;
}
mp_mutex = u_lock.release();
}
开发者ID:GDXN,项目名称:fitsliberator,代码行数:10,代码来源:scoped_lock.hpp
示例2: upgradable_lock
upgradable_lock(detail::moved_object<scoped_lock<mutex_type> > scop)
: mp_mutex(0), m_locked(false)
{
scoped_lock<mutex_type> &u_lock = scop.get();
if(u_lock.owns()){
u_lock.mutex()->unlock_and_lock_upgradable();
m_locked = true;
}
mp_mutex = u_lock.release();
}
开发者ID:TheForum,项目名称:Earth-and-Beyond-server,代码行数:10,代码来源:upgradable_lock.hpp
示例3: construct
static void construct(const NodePtr &ptr, detail::moved_object<std::pair<Convertible1, Convertible2> > value)
{
typedef typename Node::hook_type hook_type;
typedef typename Node::value_type::first_type first_type;
typedef typename Node::value_type::second_type second_type;
Node *nodeptr = detail::get_pointer(ptr);
//Hook constructor does not throw
new(static_cast<hook_type*>(nodeptr))hook_type();
//Now construct pair members_holder
value_type *valueptr = &nodeptr->get_data();
new((void*)&valueptr->first) first_type(detail::move_impl(value.get().first));
BOOST_TRY{
new((void*)&valueptr->second) second_type(detail::move_impl(value.get().second));
}
BOOST_CATCH(...){
valueptr->first.~first_type();
static_cast<hook_type*>(nodeptr)->~hook_type();
BOOST_RETHROW
}
开发者ID:leloulight,项目名称:lbanet,代码行数:20,代码来源:node_alloc_holder.hpp
示例4: scoped_lock
scoped_lock(detail::moved_object<upgradable_lock<Mutex> > upgr
,boost::posix_time::ptime &abs_time)
: mp_mutex(0), m_locked(false)
{
upgradable_lock<mutex_type> &u_lock = upgr.get();
if(u_lock.owns()){
if((m_locked = u_lock.mutex()->timed_unlock_upgradable_and_lock(abs_time)) == true){
mp_mutex = u_lock.release();
}
}
else{
u_lock.release();
}
}
开发者ID:denisrosset,项目名称:flocking,代码行数:14,代码来源:scoped_lock.hpp
示例5: node_alloc_holder
node_alloc_holder(detail::moved_object<ValAlloc> a, const Pred &c)
: members_(a.get(), typename ICont::value_compare(c))
{}
开发者ID:leloulight,项目名称:lbanet,代码行数:3,代码来源:node_alloc_holder.hpp
示例6:
basic_managed_mapped_file
(detail::moved_object<basic_managed_mapped_file> moved)
{ this->swap(moved.get()); }
开发者ID:MigertKapaj,项目名称:nupic,代码行数:3,代码来源:managed_mapped_file.hpp
示例7: swap
void swap(detail::moved_object<upgradable_lock<mutex_type> > other)
{
std::swap(mp_mutex, other.get().mp_mutex);
std::swap(m_locked, other.get().m_locked);
}
开发者ID:TheForum,项目名称:Earth-and-Beyond-server,代码行数:5,代码来源:upgradable_lock.hpp
示例8:
basic_managed_windows_shared_memory
(detail::moved_object<basic_managed_windows_shared_memory> &moved)
{ this->swap(moved.get()); }
开发者ID:foxostro,项目名称:CheeseTesseract,代码行数:3,代码来源:managed_windows_shared_memory.hpp
示例9:
file_wrapper
(detail::moved_object<file_wrapper> moved)
{ this->swap(moved.get()); }
开发者ID:Aantonb,项目名称:gotham,代码行数:3,代码来源:file_wrapper.hpp
示例10:
basic_managed_heap_memory
(detail::moved_object<basic_managed_heap_memory> &moved)
{ this->swap(moved.get()); }
开发者ID:GDXN,项目名称:fitsliberator,代码行数:3,代码来源:managed_heap_memory.hpp
示例11:
basic_managed_external_buffer
(detail::moved_object<basic_managed_external_buffer> moved)
{
this->swap(moved.get());
}
开发者ID:engalex,项目名称:ISA100.11a-Gateway,代码行数:5,代码来源:managed_external_buffer.hpp
注:本文中的detail::moved_object类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论