Opened 15 years ago

Closed 15 years ago

#1477 closed Bugs (fixed)

boost::sizer declaration ill-formed

Reported by: anonymous Owned by: Thorsten Ottosen
Milestone: To Be Determined Component: range
Version: Boost 1.34.1 Severity: Problem
Keywords: Cc:

Description

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):

template< typename T, std::size_t sz >

char& sizer( const T BOOST_RANGE_ARRAY_REF()[sz] )[sz];

This declaration is ill-formed, because it corresponds to a function that returns an array. The declaration should be fixed to say

template< typename T, std::size_t sz >

char (& sizer( const T BOOST_RANGE_ARRAY_REF()[sz] ) )[sz];

(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.

Change History (2)

comment:1 by Thorsten Ottosen, 15 years ago

Status: newassigned

I'll apply to trunk and then see if the regressions are affected ... if not we can move it to the release branch.

-Thorsten

comment:2 by Thorsten Ottosen, 15 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.