Why is not the boost :: shared_ptr - & gt; The operator is declared online?
source link: https://www.codesd.com/item/why-is-not-the-boost-shared-ptr-the-operator-is-declared-online.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Why is not the boost :: shared_ptr - & gt; The operator is declared online?
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? :-)
Functions defined (i.e. with a body) inside a class are implicitly candidates for inlining. There is no need to use the inline
keyword in these cases, and it is unusual to do so.
Related Articles
Why does not the forward structure declaration work in my code? When can I use it in C?
SQL Server Why is not the index used with OR
Why does not the $ variable return the last assigned value of the variable in a shell script?
In TypeScript, why is not the second overload of the splice function found?
Why does not the Python function print a default?
Why does not the string of a euro sign in a string literal using UTF8 produce a UCN?
Why does not the insertion of the list fail when a sufficient size is provided during construction?
Why does not the jQuery Tablesorter Plugin work on this Wordpress page?
Why does not the next function stop for input 1?
Why did not the value of this UISlider update its position?
Why can not the different servers bind to the same port?
Why can not the same opencl code be run on IMX.6?
Why does not the bootstrap scrollspy work?
Why does not the STL find () algorithm work on maps?
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK