view release on metacpan or search on metacpan
include/boost/config/compiler/gcc.hpp view on Meta::CPAN
// versions check:
// we don't know gcc prior to version 3.30:
#if (BOOST_GCC_VERSION< 30300)
# error "Compiler not configured - please reconfigure"
#endif
//
// last known and checked version is 7.1:
#if (BOOST_GCC_VERSION > 70100)
# if defined(BOOST_ASSERT_CONFIG)
# error "Boost.Config is older than your compiler - please check for an updated Boost release."
# else
// we don't emit warnings here anymore since there are no defect macros defined for
// gcc post 3.4, so any failures are gcc regressions...
//# warning "Unknown compiler version - please run the configure tests and report the results"
# endif
#endif
include/boost/config/compiler/intel.hpp view on Meta::CPAN
#if defined(__LP64__) && defined(__GNUC__) && (BOOST_INTEL_CXX_VERSION >= 1310) && !defined(BOOST_NVCC_CXX03)
# define BOOST_HAS_INT128
#endif
#endif // defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500) && (defined(_MSC_VER) || defined(__GNUC__))
//
// last known and checked version:
#if (BOOST_INTEL_CXX_VERSION > 1700)
# if defined(BOOST_ASSERT_CONFIG)
# error "Boost.Config is older than your compiler - please check for an updated Boost release."
# elif defined(_MSC_VER)
//
// We don't emit this warning any more, since we have so few
// defect macros set anyway (just the one).
//
//# pragma message("Unknown compiler version - please run the configure tests and report the results")
# endif
#endif
include/boost/config/compiler/sunpro_cc.hpp view on Meta::CPAN
//
// versions check:
// we don't support sunpro prior to version 4:
#if __SUNPRO_CC < 0x400
#error "Compiler not supported or configured - please reconfigure"
#endif
//
// last known and checked version:
#if (__SUNPRO_CC > 0x5150)
# if defined(BOOST_ASSERT_CONFIG)
# error "Boost.Config is older than your compiler - please check for an updated Boost release."
# endif
#endif
include/boost/config/compiler/visualc.hpp view on Meta::CPAN
//
// last known and checked version is 19.12.25830.2 (VC++ 2017.3):
#if (_MSC_VER > 1912)
# if defined(BOOST_ASSERT_CONFIG)
# error "Boost.Config is older than your current compiler version."
# elif !defined(BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE)
//
// Disabled as of March 2018 - the pace of VS releases is hard to keep up with
// and in any case, we have relatively few defect macros defined now.
// BOOST_PRAGMA_MESSAGE("Info: Boost.Config is older than your compiler version - probably nothing bad will happen - but you may wish to look for an updated Boost version. Define BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE to suppress this message."...
# endif
#endif
include/boost/container/flat_map.hpp view on Meta::CPAN
//! Effects: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
//! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
//! as if by insert, constructing it from value_type(k, forward<M>(obj)).
//!
//! No iterators or references are invalidated. If the insertion is successful, pointers and references
//! to the element obtained while it is held in the node handle are invalidated, and pointers and
//! references obtained to that element before it was extracted become valid.
//!
//! Returns: The bool component is true if the insertion took place and false if the assignment
//! took place. The iterator component is pointing at the element that was inserted or updated.
//!
//! Complexity: Logarithmic in the size of the container.
template <class M>
BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> insert_or_assign(const key_type& k, BOOST_FWD_REF(M) obj)
{
return dtl::force_copy< std::pair<iterator, bool> >
(this->m_flat_tree.insert_or_assign
( impl_const_iterator(), k, ::boost::forward<M>(obj))
);
}
//! Effects: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
//! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
//! as if by insert, constructing it from value_type(k, move(obj)).
//!
//! No iterators or references are invalidated. If the insertion is successful, pointers and references
//! to the element obtained while it is held in the node handle are invalidated, and pointers and
//! references obtained to that element before it was extracted become valid.
//!
//! Returns: The bool component is true if the insertion took place and false if the assignment
//! took place. The iterator component is pointing at the element that was inserted or updated.
//!
//! Complexity: Logarithmic in the size of the container.
template <class M>
BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> insert_or_assign(BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj)
{
return dtl::force_copy< std::pair<iterator, bool> >
(this->m_flat_tree.insert_or_assign
( impl_const_iterator(), ::boost::move(k), ::boost::forward<M>(obj))
);
}
include/boost/container/flat_map.hpp view on Meta::CPAN
//! Effects: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
//! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
//! as if by insert, constructing it from value_type(k, forward<M>(obj)) and the new element
//! to the container as close as possible to the position just before hint.
//!
//! No iterators or references are invalidated. If the insertion is successful, pointers and references
//! to the element obtained while it is held in the node handle are invalidated, and pointers and
//! references obtained to that element before it was extracted become valid.
//!
//! Returns: The bool component is true if the insertion took place and false if the assignment
//! took place. The iterator component is pointing at the element that was inserted or updated.
//!
//! Complexity: Logarithmic in the size of the container in general, but amortized constant if
//! the new element is inserted just before hint.
template <class M>
BOOST_CONTAINER_FORCEINLINE iterator insert_or_assign(const_iterator hint, const key_type& k, BOOST_FWD_REF(M) obj)
{
return dtl::force_copy< std::pair<iterator, bool> >
(this->m_flat_tree.insert_or_assign
( dtl::force_copy<impl_const_iterator>(hint)
, k, ::boost::forward<M>(obj))
include/boost/container/flat_map.hpp view on Meta::CPAN
//! Effects: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
//! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
//! as if by insert, constructing it from value_type(k, move(obj)) and the new element
//! to the container as close as possible to the position just before hint.
//!
//! No iterators or references are invalidated. If the insertion is successful, pointers and references
//! to the element obtained while it is held in the node handle are invalidated, and pointers and
//! references obtained to that element before it was extracted become valid.
//!
//! Returns: The bool component is true if the insertion took place and false if the assignment
//! took place. The iterator component is pointing at the element that was inserted or updated.
//!
//! Complexity: Logarithmic in the size of the container in general, but amortized constant if
//! the new element is inserted just before hint.
template <class M>
BOOST_CONTAINER_FORCEINLINE iterator insert_or_assign(const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj)
{
return dtl::force_copy< std::pair<iterator, bool> >
(this->m_flat_tree.insert_or_assign
( dtl::force_copy<impl_const_iterator>(hint)
, ::boost::move(k), ::boost::forward<M>(obj))
include/boost/container/map.hpp view on Meta::CPAN
//! <b>Effects</b>: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
//! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
//! as if by insert, constructing it from value_type(k, forward<M>(obj)).
//!
//! No iterators or references are invalidated. If the insertion is successful, pointers and references
//! to the element obtained while it is held in the node handle are invalidated, and pointers and
//! references obtained to that element before it was extracted become valid.
//!
//! <b>Returns</b>: The bool component is true if the insertion took place and false if the assignment
//! took place. The iterator component is pointing at the element that was inserted or updated.
//!
//! <b>Complexity</b>: Logarithmic in the size of the container.
template <class M>
BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> insert_or_assign(const key_type& k, BOOST_FWD_REF(M) obj)
{ return this->base_t::insert_or_assign(const_iterator(), k, ::boost::forward<M>(obj)); }
//! <b>Effects</b>: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
//! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
//! as if by insert, constructing it from value_type(k, move(obj)).
//!
//! No iterators or references are invalidated. If the insertion is successful, pointers and references
//! to the element obtained while it is held in the node handle are invalidated, and pointers and
//! references obtained to that element before it was extracted become valid.
//!
//! <b>Returns</b>: The bool component is true if the insertion took place and false if the assignment
//! took place. The iterator component is pointing at the element that was inserted or updated.
//!
//! <b>Complexity</b>: Logarithmic in the size of the container.
template <class M>
BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> insert_or_assign(BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj)
{ return this->base_t::insert_or_assign(const_iterator(), ::boost::move(k), ::boost::forward<M>(obj)); }
//! <b>Effects</b>: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
//! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
//! as if by insert, constructing it from value_type(k, forward<M>(obj)) and the new element
//! to the container as close as possible to the position just before hint.
//!
//! No iterators or references are invalidated. If the insertion is successful, pointers and references
//! to the element obtained while it is held in the node handle are invalidated, and pointers and
//! references obtained to that element before it was extracted become valid.
//!
//! <b>Returns</b>: The bool component is true if the insertion took place and false if the assignment
//! took place. The iterator component is pointing at the element that was inserted or updated.
//!
//! <b>Complexity</b>: Logarithmic in the size of the container in general, but amortized constant if
//! the new element is inserted just before hint.
template <class M>
BOOST_CONTAINER_FORCEINLINE iterator insert_or_assign(const_iterator hint, const key_type& k, BOOST_FWD_REF(M) obj)
{ return this->base_t::insert_or_assign(hint, k, ::boost::forward<M>(obj)); }
//! <b>Effects</b>: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
//! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
//! as if by insert, constructing it from value_type(k, move(obj)) and the new element
//! to the container as close as possible to the position just before hint.
//!
//! No iterators or references are invalidated. If the insertion is successful, pointers and references
//! to the element obtained while it is held in the node handle are invalidated, and pointers and
//! references obtained to that element before it was extracted become valid.
//!
//! <b>Returns</b>: The bool component is true if the insertion took place and false if the assignment
//! took place. The iterator component is pointing at the element that was inserted or updated.
//!
//! <b>Complexity</b>: Logarithmic in the size of the container in general, but amortized constant if
//! the new element is inserted just before hint.
template <class M>
BOOST_CONTAINER_FORCEINLINE iterator insert_or_assign(const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj)
{ return this->base_t::insert_or_assign(hint, ::boost::move(k), ::boost::forward<M>(obj)); }
//! <b>Returns</b>: A reference to the element whose key is equivalent to x.
//! Throws: An exception object of type out_of_range if no such element is present.
//! <b>Complexity</b>: logarithmic.
include/boost/intrusive/bstree_algorithms.hpp view on Meta::CPAN
NodeTraits::set_parent(node2, temp);
//Now adjust adjacent nodes for newly inserted node 1
if((temp = NodeTraits::get_left(node1))){
NodeTraits::set_parent(temp, node1);
}
if((temp = NodeTraits::get_right(node1))){
NodeTraits::set_parent(temp, node1);
}
if((temp = NodeTraits::get_parent(node1)) &&
//The header has been already updated so avoid it
temp != header2){
if(NodeTraits::get_left(temp) == node2){
NodeTraits::set_left(temp, node1);
}
if(NodeTraits::get_right(temp) == node2){
NodeTraits::set_right(temp, node1);
}
}
//Now adjust adjacent nodes for newly inserted node 2
if((temp = NodeTraits::get_left(node2))){
NodeTraits::set_parent(temp, node2);
}
if((temp = NodeTraits::get_right(node2))){
NodeTraits::set_parent(temp, node2);
}
if((temp = NodeTraits::get_parent(node2)) &&
//The header has been already updated so avoid it
temp != header1){
if(NodeTraits::get_left(temp) == node1){
NodeTraits::set_left(temp, node2);
}
if(NodeTraits::get_right(temp) == node1){
NodeTraits::set_right(temp, node2);
}
}
}
include/boost/intrusive/bstree_algorithms.hpp view on Meta::CPAN
NodeTraits::set_parent(new_node, NodeTraits::get_parent(node_to_be_replaced));
//Now adjust adjacent nodes for newly inserted node
if((temp = NodeTraits::get_left(new_node))){
NodeTraits::set_parent(temp, new_node);
}
if((temp = NodeTraits::get_right(new_node))){
NodeTraits::set_parent(temp, new_node);
}
if((temp = NodeTraits::get_parent(new_node)) &&
//The header has been already updated so avoid it
temp != header){
if(NodeTraits::get_left(temp) == node_to_be_replaced){
NodeTraits::set_left(temp, new_node);
}
if(NodeTraits::get_right(temp) == node_to_be_replaced){
NodeTraits::set_right(temp, new_node);
}
}
}
include/boost/intrusive/bstree_algorithms.hpp view on Meta::CPAN
NodeTraits::set_parent(p_left, p_parent);
set_child(header, p_left, p_parent, p_was_left);
}
private:
static void subtree_to_vine(node_ptr vine_tail, std::size_t &size)
{
//Inspired by LibAVL:
//It uses a clever optimization for trees with parent pointers.
//No parent pointer is updated when transforming a tree to a vine as
//most of them will be overriten during compression rotations.
//A final pass must be made after the rebalancing to updated those
//pointers not updated by tree_to_vine + compression calls
std::size_t len = 0;
node_ptr remainder = NodeTraits::get_right(vine_tail);
while(remainder){
node_ptr tempptr = NodeTraits::get_left(remainder);
if(!tempptr){ //move vine-tail down one
vine_tail = remainder;
remainder = NodeTraits::get_right(remainder);
++len;
}
else{ //rotate
include/boost/intrusive/bstree_algorithms.hpp view on Meta::CPAN
const std::size_t one_szt = 1u;
std::size_t leaf_nodes = count + one_szt - std::size_t(one_szt << detail::floor_log2(count + one_szt));
compress_subtree(super_root, leaf_nodes); //create deepest leaves
std::size_t vine_nodes = count - leaf_nodes;
while(vine_nodes > 1){
vine_nodes /= 2;
compress_subtree(super_root, vine_nodes);
}
//Update parents of nodes still in the in the original vine line
//as those have not been updated by subtree_to_vine or compress_subtree
for ( node_ptr q = super_root, p = NodeTraits::get_right(super_root)
; p
; q = p, p = NodeTraits::get_right(p)){
NodeTraits::set_parent(p, q);
}
}
//! <b>Requires</b>: "n" must be a node inserted in a tree.
//!
//! <b>Effects</b>: Returns a pointer to the header node of the tree.
include/boost/intrusive/pointer_plus_bits.hpp view on Meta::CPAN
#include <boost/intrusive/detail/mpl.hpp> //ls_zeros
#include <boost/intrusive/detail/assert.hpp> //BOOST_INTRUSIVE_INVARIANT_ASSERT
#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
//GCC reports uninitialized values when an uninitialized pointer plus bits type
//is asigned some bits or some pointer value, but that's ok, because we don't want
//to default initialize parts that are not being updated.
#if defined(BOOST_GCC)
# if (BOOST_GCC >= 40600)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wuninitialized"
# if (BOOST_GCC >= 40700)
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
# endif
# endif
#endif
include/boost/move/algo/detail/adaptive_sort_merge.hpp view on Meta::CPAN
}
template<class RandIt>
void insert(iterator pos, RandIt it)
{
if(pos == (m_ptr + m_size)){
this->add(it);
}
else{
this->add(m_ptr+m_size-1);
//m_size updated
boost::move_backward(pos, m_ptr+m_size-2, m_ptr+m_size-1);
*pos = boost::move(*it);
}
}
void set_size(std::size_t size)
{
m_size = size;
}