Boost C++ Libraries: Ticket #10783: BOOST_DELETED_FUNCTION must stay on the public section https://svn.boost.org/trac10/ticket/10783 <p> The definition of this macro on a public section show a bug </p> <pre class="wiki">#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) # define BOOST_DELETED_FUNCTION(fun) fun = delete; #else # define BOOST_DELETED_FUNCTION(fun) private: fun; #endif </pre><p> This should be </p> <pre class="wiki"># define BOOST_DELETED_FUNCTION(fun) private: fun; public: </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10783 Trac 1.4.3 John Maddock Wed, 12 Nov 2014 16:45:09 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/10783#comment:1 https://svn.boost.org/trac10/ticket/10783#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">wontfix</span> </li> </ul> <p> The behavior you see is what's documented, specifically the docs say: "Since the macro may change the access mode, it is recommended to use this macro at the end of the class definition" and then go on to give an example that shows the access mode <em>may</em> be changed to private by this macro. If you need different behavior, I suggest you use BOOST_NO_CXX11_DELETED_FUNCTIONS in a #if...#else block. </p> Ticket