Boost C++ Libraries: Ticket #11066: smart_ptr/detail/sp_convertible.hpp should include <cstddef> https://svn.boost.org/trac10/ticket/11066 <p> smart_ptr/detail/sp_convertible.hpp uses std::size_t type but does not include cstddef standard header. </p> <p> This can lead to errors if &lt;cstddef&gt; is not included by config headers (happens if stdlib configuration part of config headers is disabled). </p> <pre class="wiki">] cat smart1.cc #include &lt;boost/smart_ptr/intrusive_ptr.hpp&gt; ] gcc smart1.cc -DBOOST_NO_CONFIG -I . In file included from ./boost/smart_ptr/intrusive_ptr.hpp:20:0, from smart1.cc:1: ./boost/smart_ptr/detail/sp_convertible.hpp:61:25: error: 'std::size_t' has not been declared ] </pre><p> I got this behavior on Solaris (with Solaris Studio compiler first), but I bet it does not matter. </p> <p> There is a simple fix: </p> <pre class="wiki">] git diff . diff --git a/include/boost/smart_ptr/detail/sp_convertible.hpp b/include/boost/smart_ptr/detail/sp_convertible.hpp index 31b2627..4bba9ed 100644 --- a/include/boost/smart_ptr/detail/sp_convertible.hpp +++ b/include/boost/smart_ptr/detail/sp_convertible.hpp @@ -16,6 +16,7 @@ // http://www.boost.org/LICENSE_1_0.txt #include &lt;boost/config.hpp&gt; +#include &lt;cstddef&gt; #if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) &amp;&amp; defined( BOOST_NO_SFINAE ) # define BOOST_SP_NO_SP_CONVERTIBLE ] </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11066 Trac 1.4.3