Boost C++ Libraries: Ticket #1477: boost::sizer declaration ill-formed https://svn.boost.org/trac10/ticket/1477 <p> Since the acception of boost::range there exists the file /range/detail/sizer.hpp (I think it was taken from still older history) which contains two overloads of sizer, which are written as (I provide only the first overload): </p> <p> template&lt; typename T, std::size_t sz &gt; </p> <blockquote> <p> char&amp; sizer( const T BOOST_RANGE_ARRAY_REF()[sz] )[sz]; </p> </blockquote> <p> This declaration is ill-formed, because it corresponds to a function that returns an array. The declaration should be fixed to say </p> <p> template&lt; typename T, std::size_t sz &gt; </p> <blockquote> <p> char (&amp; sizer( const T BOOST_RANGE_ARRAY_REF()[sz] ) )[sz]; </p> </blockquote> <p> (similarily for the other overload). Interestingly, the declaration is *not* contained in some detail(s) namespace, but you might consider this file to be part of the implementation. In this case another option could be to remove this file, although I would regret this choice. Note that boost is often quoted in the internet (including this sizer facility!) so it seems better to fix the declaration. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1477 Trac 1.4.3 Thorsten Ottosen Mon, 03 Dec 2007 09:06:02 GMT status changed https://svn.boost.org/trac10/ticket/1477#comment:1 https://svn.boost.org/trac10/ticket/1477#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> I'll apply to trunk and then see if the regressions are affected ... if not we can move it to the release branch. </p> <p> -Thorsten </p> Ticket Thorsten Ottosen Wed, 05 Dec 2007 17:34:59 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/1477#comment:2 https://svn.boost.org/trac10/ticket/1477#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket