Fix #9169 - Add BOOST_FORCEINLINE on boost::ref for performance issue

[SVN r86124]

Conflicts:
	include/boost/ref.hpp
This commit is contained in:
Joel Falcou 2013-10-01 15:02:28 +00:00 committed by Peter Dimov
parent 9382b69eb1
commit 3bac7b132a

View File

@ -40,15 +40,15 @@ public:
#else
explicit reference_wrapper(T& t): t_(boost::addressof(t)) {}
BOOST_FORCEINLINE explicit reference_wrapper(T& t): t_(boost::addressof(t)) {}
#endif
operator T& () const { return *t_; }
BOOST_FORCEINLINE operator T& () const { return *t_; }
T& get() const { return *t_; }
BOOST_FORCEINLINE T& get() const { return *t_; }
T* get_pointer() const { return t_; }
BOOST_FORCEINLINE T* get_pointer() const { return t_; }
private:
@ -61,12 +61,12 @@ private:
# define BOOST_REF_CONST const
# endif
template<class T> inline reference_wrapper<T> BOOST_REF_CONST ref(T & t)
template<class T> BOOST_FORCEINLINE reference_wrapper<T> BOOST_REF_CONST ref(T & t)
{
return reference_wrapper<T>(t);
}
template<class T> inline reference_wrapper<T const> BOOST_REF_CONST cref(T const & t)
template<class T> BOOST_FORCEINLINE reference_wrapper<T const> BOOST_REF_CONST cref(T const & t)
{
return reference_wrapper<T const>(t);
}
@ -173,13 +173,13 @@ class unwrap_reference
# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <class T> inline typename unwrap_reference<T>::type&
template <class T> BOOST_FORCEINLINE typename unwrap_reference<T>::type&
unwrap_ref(T& t)
{
return t;
}
template<class T> inline T* get_pointer( reference_wrapper<T> const & r )
template<class T> BOOST_FORCEINLINE T* get_pointer( reference_wrapper<T> const & r )
{
return r.get_pointer();
}