Why isn't the boost::shared_ptr -> operator inlined?
Posted
by Alan
on Stack Overflow
See other posts from Stack Overflow
or by Alan
Published on 2010-05-18T14:38:52Z
Indexed on
2010/05/18
15:20 UTC
Read the original article
Hit count: 219
Since boost::shared_ptr
could be called very frequently and simply returns a pointer, isn't the ->
operator a good candidate for being inlined
?
T * operator-> () const // never throws
{
BOOST_ASSERT(px != 0);
return px;
}
Would a good compiler automatically inline
this anyway?
Should I lose any sleep over this? :-)
© Stack Overflow or respective owner