Add BOOST_CONTAINER_FORCEINLINE to trivial functions

This commit is contained in:
Ion Gaztañaga
2022-05-04 23:42:40 +02:00
parent def7a52269
commit d004191b45
2 changed files with 13 additions and 13 deletions

View File

@ -32,11 +32,11 @@ class equal_to_value
const value_type &t_;
public:
explicit equal_to_value(const value_type &t)
BOOST_CONTAINER_FORCEINLINE explicit equal_to_value(const value_type &t)
: t_(t)
{}
bool operator()(const value_type &t)const
BOOST_CONTAINER_FORCEINLINE bool operator()(const value_type &t)const
{ return t_ == t; }
};
@ -47,28 +47,28 @@ struct value_to_node_compare
typedef Pred predicate_type;
typedef Node node_type;
value_to_node_compare()
BOOST_CONTAINER_FORCEINLINE value_to_node_compare()
: Pred()
{}
explicit value_to_node_compare(Pred pred)
BOOST_CONTAINER_FORCEINLINE explicit value_to_node_compare(Pred pred)
: Pred(pred)
{}
Ret operator()(const Node &a, const Node &b) const
BOOST_CONTAINER_FORCEINLINE Ret operator()(const Node &a, const Node &b) const
{ return static_cast<const Pred&>(*this)(a.get_data(), b.get_data()); }
Ret operator()(const Node &a) const
BOOST_CONTAINER_FORCEINLINE Ret operator()(const Node &a) const
{ return static_cast<const Pred&>(*this)(a.get_data()); }
Ret operator()(const Node &a, const Node &b)
BOOST_CONTAINER_FORCEINLINE Ret operator()(const Node &a, const Node &b)
{ return static_cast<Pred&>(*this)(a.get_data(), b.get_data()); }
Ret operator()(const Node &a)
BOOST_CONTAINER_FORCEINLINE Ret operator()(const Node &a)
{ return static_cast<Pred&>(*this)(a.get_data()); }
predicate_type & predicate() { return static_cast<predicate_type&>(*this); }
const predicate_type & predicate() const { return static_cast<predicate_type&>(*this); }
BOOST_CONTAINER_FORCEINLINE predicate_type & predicate() { return static_cast<predicate_type&>(*this); }
BOOST_CONTAINER_FORCEINLINE const predicate_type & predicate() const { return static_cast<predicate_type&>(*this); }
};
template<class KeyPred, class KeyOfValue, class Node, class Ret = bool>

View File

@ -221,7 +221,7 @@ struct node_alloc_holder
, ICont, hasher, dtl::nat3) intrusive_val_hasher;
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT
(boost::container::dtl::
, ICont, bucket_traits, dtl::natN<0>) intrusive_bucket_traits;
, ICont, bucket_traits, dtl::natN<0>) intrusive_bucket_traits;
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT
(boost::container::dtl::
, ICont, bucket_type, dtl::natN<1>) intrusive_bucket_type;
@ -592,10 +592,10 @@ struct node_alloc_holder
{ return static_cast<const NodeAlloc &>(*this); }
public:
BOOST_CONTAINER_FORCEINLINE ICont &icont()
BOOST_CONTAINER_FORCEINLINE ICont &icont()
{ return this->m_icont; }
BOOST_CONTAINER_FORCEINLINE const ICont &icont() const
BOOST_CONTAINER_FORCEINLINE const ICont &icont() const
{ return this->m_icont; }
private: