Sha256: 3b3e9309810d019a85d38681f46c92f59f802ead6b6a200d130e6956f42bac23

Contents?: true

Size: 1.65 KB

Versions: 12

Compression:

Stored size: 1.65 KB

Contents

/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga  2014-2014
//
// 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/intrusive for documentation.
//
/////////////////////////////////////////////////////////////////////////////

#ifndef BOOST_INTRUSIVE_DETAIL_SIZE_HOLDER_HPP
#define BOOST_INTRUSIVE_DETAIL_SIZE_HOLDER_HPP

#ifndef BOOST_CONFIG_HPP
#  include <boost/config.hpp>
#endif

#if defined(BOOST_HAS_PRAGMA_ONCE)
#  pragma once
#endif

namespace boost {
namespace intrusive {
namespace detail {

template<bool ConstantSize, class SizeType, class Tag = void>
struct size_holder
{
   static const bool constant_time_size = ConstantSize;
   typedef SizeType  size_type;

   SizeType get_size() const
   {  return size_;  }

   void set_size(SizeType size)
   {  size_ = size; }

   void decrement()
   {  --size_; }

   void increment()
   {  ++size_; }

   void increase(SizeType n)
   {  size_ += n; }

   void decrease(SizeType n)
   {  size_ -= n; }

   SizeType size_;
};

template<class SizeType, class Tag>
struct size_holder<false, SizeType, Tag>
{
   static const bool constant_time_size = false;
   typedef SizeType  size_type;

   size_type get_size() const
   {  return 0;  }

   void set_size(size_type)
   {}

   void decrement()
   {}

   void increment()
   {}

   void increase(SizeType)
   {}

   void decrease(SizeType)
   {}
};

}  //namespace detail{
}  //namespace intrusive{
}  //namespace boost{

#endif //BOOST_INTRUSIVE_DETAIL_SIZE_HOLDER_HPP

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
passenger-5.1.4 src/cxx_supportlib/vendor-modified/boost/intrusive/detail/size_holder.hpp
passenger-5.1.3 src/cxx_supportlib/vendor-modified/boost/intrusive/detail/size_holder.hpp
passenger-5.1.2 src/cxx_supportlib/vendor-modified/boost/intrusive/detail/size_holder.hpp
passenger-5.1.1 src/cxx_supportlib/vendor-modified/boost/intrusive/detail/size_holder.hpp
passenger-5.1.0 src/cxx_supportlib/vendor-modified/boost/intrusive/detail/size_holder.hpp
passenger-5.0.30 src/cxx_supportlib/vendor-modified/boost/intrusive/detail/size_holder.hpp
passenger-5.0.29 src/cxx_supportlib/vendor-modified/boost/intrusive/detail/size_holder.hpp
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/passenger-5.0.28/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/size_holder.hpp
passenger-5.0.28 src/cxx_supportlib/vendor-modified/boost/intrusive/detail/size_holder.hpp
passenger-5.0.27 src/cxx_supportlib/vendor-modified/boost/intrusive/detail/size_holder.hpp
passenger-5.0.26 src/cxx_supportlib/vendor-modified/boost/intrusive/detail/size_holder.hpp
passenger-5.0.25 src/cxx_supportlib/vendor-modified/boost/intrusive/detail/size_holder.hpp