summaryrefslogtreecommitdiff
path: root/boost/intrusive/detail/size_holder.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/intrusive/detail/size_holder.hpp')
-rw-r--r--boost/intrusive/detail/size_holder.hpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/boost/intrusive/detail/size_holder.hpp b/boost/intrusive/detail/size_holder.hpp
index de1933ed50..9802ac32f1 100644
--- a/boost/intrusive/detail/size_holder.hpp
+++ b/boost/intrusive/detail/size_holder.hpp
@@ -21,6 +21,8 @@
# pragma once
#endif
+#include <boost/intrusive/detail/workaround.hpp>
+
namespace boost {
namespace intrusive {
namespace detail {
@@ -31,22 +33,22 @@ struct size_holder
static const bool constant_time_size = ConstantSize;
typedef SizeType size_type;
- SizeType get_size() const
+ BOOST_INTRUSIVE_FORCEINLINE SizeType get_size() const
{ return size_; }
- void set_size(SizeType size)
+ BOOST_INTRUSIVE_FORCEINLINE void set_size(SizeType size)
{ size_ = size; }
- void decrement()
+ BOOST_INTRUSIVE_FORCEINLINE void decrement()
{ --size_; }
- void increment()
+ BOOST_INTRUSIVE_FORCEINLINE void increment()
{ ++size_; }
- void increase(SizeType n)
+ BOOST_INTRUSIVE_FORCEINLINE void increase(SizeType n)
{ size_ += n; }
- void decrease(SizeType n)
+ BOOST_INTRUSIVE_FORCEINLINE void decrease(SizeType n)
{ size_ -= n; }
SizeType size_;
@@ -58,22 +60,22 @@ struct size_holder<false, SizeType, Tag>
static const bool constant_time_size = false;
typedef SizeType size_type;
- size_type get_size() const
+ BOOST_INTRUSIVE_FORCEINLINE size_type get_size() const
{ return 0; }
- void set_size(size_type)
+ BOOST_INTRUSIVE_FORCEINLINE void set_size(size_type)
{}
- void decrement()
+ BOOST_INTRUSIVE_FORCEINLINE void decrement()
{}
- void increment()
+ BOOST_INTRUSIVE_FORCEINLINE void increment()
{}
- void increase(SizeType)
+ BOOST_INTRUSIVE_FORCEINLINE void increase(SizeType)
{}
- void decrease(SizeType)
+ BOOST_INTRUSIVE_FORCEINLINE void decrease(SizeType)
{}
};