/
usr
/
include
/
boost
/
multi_index
/
detail
/
/usr/include/boost/multi_index/detail
mkdir
upload
Name
Size
Mode
Actions
access_specifier.hpp
2115
0644
edit
dl
rm
adl_swap.hpp
858
0644
edit
dl
rm
allocator_traits.hpp
4957
0644
edit
dl
rm
archive_constructed.hpp
1991
0644
edit
dl
rm
auto_space.hpp
2907
0644
edit
dl
rm
base_type.hpp
1981
0644
edit
dl
rm
bidir_node_iterator.hpp
2584
0644
edit
dl
rm
bucket_array.hpp
7730
0644
edit
dl
rm
cons_stdtuple.hpp
2206
0644
edit
dl
rm
converter.hpp
1372
0644
edit
dl
rm
copy_map.hpp
4713
0644
edit
dl
rm
define_if_constexpr_macro.hpp
876
0644
edit
dl
rm
do_not_copy_elements_tag.hpp
762
0644
edit
dl
rm
duplicates_iterator.hpp
2574
0644
edit
dl
rm
hash_index_args.hpp
3066
0644
edit
dl
rm
hash_index_iterator.hpp
4407
0644
edit
dl
rm
hash_index_node.hpp
23170
0644
edit
dl
rm
has_tag.hpp
915
0644
edit
dl
rm
header_holder.hpp
1296
0644
edit
dl
rm
ignore_wstrict_aliasing.hpp
548
0644
edit
dl
rm
index_base.hpp
9189
0644
edit
dl
rm
index_loader.hpp
3472
0644
edit
dl
rm
index_matcher.hpp
6134
0644
edit
dl
rm
index_node_base.hpp
3500
0644
edit
dl
rm
index_saver.hpp
3787
0644
edit
dl
rm
invariant_assert.hpp
578
0644
edit
dl
rm
is_function.hpp
1439
0644
edit
dl
rm
is_index_list.hpp
978
0644
edit
dl
rm
is_transparent.hpp
3616
0644
edit
dl
rm
iter_adaptor.hpp
7591
0644
edit
dl
rm
modify_key_adaptor.hpp
1066
0644
edit
dl
rm
node_handle.hpp
6249
0644
edit
dl
rm
node_type.hpp
1783
0644
edit
dl
rm
no_duplicate_tags.hpp
2213
0644
edit
dl
rm
ord_index_args.hpp
2363
0644
edit
dl
rm
ord_index_impl.hpp
49850
0644
edit
dl
rm
ord_index_impl_fwd.hpp
4024
0644
edit
dl
rm
ord_index_node.hpp
20137
0644
edit
dl
rm
ord_index_ops.hpp
7629
0644
edit
dl
rm
promotes_arg.hpp
1886
0644
edit
dl
rm
raw_ptr.hpp
1187
0644
edit
dl
rm
restore_wstrict_aliasing.hpp
457
0644
edit
dl
rm
rnd_index_loader.hpp
4886
0644
edit
dl
rm
rnd_index_node.hpp
6453
0644
edit
dl
rm
rnd_index_ops.hpp
6003
0644
edit
dl
rm
rnd_index_ptr_array.hpp
3499
0644
edit
dl
rm
rnd_node_iterator.hpp
3135
0644
edit
dl
rm
rnk_index_ops.hpp
8621
0644
edit
dl
rm
safe_mode.hpp
18103
0644
edit
dl
rm
scope_guard.hpp
13703
0644
edit
dl
rm
seq_index_node.hpp
5455
0644
edit
dl
rm
seq_index_ops.hpp
6152
0644
edit
dl
rm
serialization_version.hpp
1801
0644
edit
dl
rm
uintptr_type.hpp
2446
0644
edit
dl
rm
unbounded.hpp
1556
0644
edit
dl
rm
undef_if_constexpr_macro.hpp
459
0644
edit
dl
rm
value_compare.hpp
1240
0644
edit
dl
rm
vartempl_support.hpp
10965
0644
edit
dl
rm
Edit:
/usr/include/boost/multi_index/detail/index_base.hpp
(9189B)
/* Copyright 2003-2020 Joaquin M Lopez Munoz. * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * See http://www.boost.org/libs/multi_index for library home page. */ #ifndef BOOST_MULTI_INDEX_DETAIL_INDEX_BASE_HPP #define BOOST_MULTI_INDEX_DETAIL_INDEX_BASE_HPP #if defined(_MSC_VER) #pragma once #endif #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */ #include <boost/core/addressof.hpp> #include <boost/core/no_exceptions_support.hpp> #include <boost/detail/workaround.hpp> #include <boost/move/utility_core.hpp> #include <boost/mpl/vector.hpp> #include <boost/multi_index/detail/allocator_traits.hpp> #include <boost/multi_index/detail/copy_map.hpp> #include <boost/multi_index/detail/do_not_copy_elements_tag.hpp> #include <boost/multi_index/detail/node_handle.hpp> #include <boost/multi_index/detail/node_type.hpp> #include <boost/multi_index/detail/vartempl_support.hpp> #include <boost/multi_index_container_fwd.hpp> #include <boost/tuple/tuple.hpp> #include <utility> #if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION) #include <boost/multi_index/detail/index_loader.hpp> #include <boost/multi_index/detail/index_saver.hpp> #endif namespace boost{ namespace multi_index{ namespace detail{ /* The role of this class is threefold: * - tops the linear hierarchy of indices. * - terminates some cascading backbone function calls (insert_, etc.), * - grants access to the backbone functions of the final * multi_index_container class (for access restriction reasons, these * cannot be called directly from the index classes.) */ struct lvalue_tag{}; struct rvalue_tag{}; struct emplaced_tag{}; template<typename Value,typename IndexSpecifierList,typename Allocator> class index_base { protected: typedef index_node_base<Value,Allocator> index_node_type; typedef typename multi_index_node_type< Value,IndexSpecifierList,Allocator>::type final_node_type; typedef multi_index_container< Value,IndexSpecifierList,Allocator> final_type; typedef tuples::null_type ctor_args_list; typedef typename rebind_alloc_for< Allocator,typename Allocator::value_type >::type final_allocator_type; typedef node_handle< final_node_type,final_allocator_type> final_node_handle_type; typedef mpl::vector0<> index_type_list; typedef mpl::vector0<> iterator_type_list; typedef mpl::vector0<> const_iterator_type_list; typedef copy_map< final_node_type, final_allocator_type> copy_map_type; #if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION) typedef index_saver< index_node_type, final_allocator_type> index_saver_type; typedef index_loader< index_node_type, final_node_type, final_allocator_type> index_loader_type; #endif private: typedef Value value_type; typedef allocator_traits<Allocator> alloc_traits; typedef typename alloc_traits::size_type size_type; protected: explicit index_base(const ctor_args_list&,const Allocator&){} index_base( const index_base<Value,IndexSpecifierList,Allocator>&, do_not_copy_elements_tag) {} void copy_( const index_base<Value,IndexSpecifierList,Allocator>&,const copy_map_type&) {} final_node_type* insert_(const value_type& v,final_node_type*& x,lvalue_tag) { x=final().allocate_node(); BOOST_TRY{ final().construct_value(x,v); } BOOST_CATCH(...){ final().deallocate_node(x); BOOST_RETHROW; } BOOST_CATCH_END return x; } final_node_type* insert_(const value_type& v,final_node_type*& x,rvalue_tag) { x=final().allocate_node(); BOOST_TRY{ final().construct_value(x,boost::move(const_cast<value_type&>(v))); } BOOST_CATCH(...){ final().deallocate_node(x); BOOST_RETHROW; } BOOST_CATCH_END return x; } final_node_type* insert_(const value_type&,final_node_type*& x,emplaced_tag) { return x; } final_node_type* insert_( const value_type& v,index_node_type*,final_node_type*& x,lvalue_tag) { return insert_(v,x,lvalue_tag()); } final_node_type* insert_( const value_type& v,index_node_type*,final_node_type*& x,rvalue_tag) { return insert_(v,x,rvalue_tag()); } final_node_type* insert_( const value_type&,index_node_type*,final_node_type*& x,emplaced_tag) { return x; } void extract_(index_node_type*){} void clear_(){} template<typename BoolConstant> void swap_( index_base<Value,IndexSpecifierList,Allocator>&, BoolConstant /* swap_allocators */) {} void swap_elements_(index_base<Value,IndexSpecifierList,Allocator>&){} bool replace_(const value_type& v,index_node_type* x,lvalue_tag) { x->value()=v; return true; } bool replace_(const value_type& v,index_node_type* x,rvalue_tag) { x->value()=boost::move(const_cast<value_type&>(v)); return true; } bool modify_(index_node_type*){return true;} bool modify_rollback_(index_node_type*){return true;} bool check_rollback_(index_node_type*)const{return true;} #if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION) /* serialization */ template<typename Archive> void save_(Archive&,const unsigned int,const index_saver_type&)const{} template<typename Archive> void load_(Archive&,const unsigned int,const index_loader_type&){} #endif #if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING) /* invariant stuff */ bool invariant_()const{return true;} #endif /* access to backbone memfuns of Final class */ final_type& final(){return *static_cast<final_type*>(this);} const final_type& final()const{return *static_cast<const final_type*>(this);} final_node_type* final_header()const{return final().header();} bool final_empty_()const{return final().empty_();} size_type final_size_()const{return final().size_();} size_type final_max_size_()const{return final().max_size_();} std::pair<final_node_type*,bool> final_insert_(const value_type& x) {return final().insert_(x);} std::pair<final_node_type*,bool> final_insert_rv_(const value_type& x) {return final().insert_rv_(x);} template<typename T> std::pair<final_node_type*,bool> final_insert_ref_(const T& t) {return final().insert_ref_(t);} template<typename T> std::pair<final_node_type*,bool> final_insert_ref_(T& t) {return final().insert_ref_(t);} std::pair<final_node_type*,bool> final_insert_nh_(final_node_handle_type& nh) {return final().insert_nh_(nh);} template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK> std::pair<final_node_type*,bool> final_emplace_( BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK) { return final().emplace_(BOOST_MULTI_INDEX_FORWARD_PARAM_PACK); } std::pair<final_node_type*,bool> final_insert_( const value_type& x,final_node_type* position) {return final().insert_(x,position);} std::pair<final_node_type*,bool> final_insert_rv_( const value_type& x,final_node_type* position) {return final().insert_rv_(x,position);} template<typename T> std::pair<final_node_type*,bool> final_insert_ref_( const T& t,final_node_type* position) {return final().insert_ref_(t,position);} template<typename T> std::pair<final_node_type*,bool> final_insert_ref_( T& t,final_node_type* position) {return final().insert_ref_(t,position);} std::pair<final_node_type*,bool> final_insert_nh_( final_node_handle_type& nh,final_node_type* position) {return final().insert_nh_(nh,position);} template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK> std::pair<final_node_type*,bool> final_emplace_hint_( final_node_type* position,BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK) { return final().emplace_hint_( position,BOOST_MULTI_INDEX_FORWARD_PARAM_PACK); } final_node_handle_type final_extract_(final_node_type* x) { return final().extract_(x); } void final_erase_(final_node_type* x){final().erase_(x);} void final_delete_node_(final_node_type* x){final().delete_node_(x);} void final_delete_all_nodes_(){final().delete_all_nodes_();} void final_clear_(){final().clear_();} void final_swap_(final_type& x){final().swap_(x);} bool final_replace_( const value_type& k,final_node_type* x) {return final().replace_(k,x);} bool final_replace_rv_( const value_type& k,final_node_type* x) {return final().replace_rv_(k,x);} template<typename Modifier> bool final_modify_(Modifier& mod,final_node_type* x) {return final().modify_(mod,x);} template<typename Modifier,typename Rollback> bool final_modify_(Modifier& mod,Rollback& back,final_node_type* x) {return final().modify_(mod,back,x);} #if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING) void final_check_invariant_()const{final().check_invariant_();} #endif }; } /* namespace multi_index::detail */ } /* namespace multi_index */ } /* namespace boost */ #endif
Save
cmd:
run