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>