[array] remove static qualifier for size(), empty() and max_size() member function

Hi, I guess that the static qualifier for size(), empty() and max_size() makes the boost::array template class unsuitable for the STL sequence container interface. I recommend to remove the static qualifier. Anyone agrees with me ? best regards, herve

I'm not certain it actually does cause a problem. I'd have to check, but doesn't the standard technically just specify the behavior of the expression your_container.size(), etc., not that the functions must be non-static? You can still do your_array.size() or your_array.empty(), etc. even though the functions are static to the class. On Sun, Mar 15, 2009 at 8:33 AM, herve martin <hervemart1@gmail.com> wrote:
Hi,
I guess that the static qualifier for size(), empty() and max_size() makes the boost::array template class unsuitable for the STL sequence container interface. I recommend to remove the static qualifier.
Anyone agrees with me ?
best regards, herve _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- -Matt Calabrese

I guess that the static qualifier for size(), empty() and max_size() makes the boost::array template class unsuitable for the STL sequence container interface. I recommend to remove the static qualifier.
Why? The only way that the qualifier can be detected is by taking the address of the function: but the types of member functions of STL containers are "unknowable" according to the std already. In other words the array class already conforms to the container requirements IMO. John.

John Maddock wrote:
I guess that the static qualifier for size(), empty() and max_size()
makes the boost::array template class unsuitable for the STL sequence container interface. I recommend to remove the static qualifier.
Why? The only way that the qualifier can be detected is by taking the address of the function: but the types of member functions of STL containers are "unknowable" according to the std already. In other words the array class already conforms to the container requirements IMO.
John.
thanks for your answers and sorry about this thread. I must admit that I have opened it a bit too hurriedly. best regards, herve
participants (3)
-
herve martin
-
John Maddock
-
Matt Calabrese