Boost logo

Boost :

Subject: Re: [boost] Adding spirit::is_container to boost::traits
From: Thijs (M.A.) van den Berg (thijs_at_[hidden])
Date: 2014-05-27 11:30:38

On May 27, 2014, at 5:08 PM, Rodrigo Madera <rodrigo.madera_at_[hidden]> wrote

> On Tue, May 27, 2014 at 11:28 AM, Felipe Magno de Almeida
> <felipe.m.almeida_at_[hidden]> wrote:
>> That traits is meant for users to specialize if they work with non-STL
>> container types. It doesn't seem very appropriate for boost.traits
>> because they can't deduce it in C++03 and in C++17 we will have
>> concepts lite anyway.
> I beg to differ.
> The need to identify container types (be it STL or user defined types)
> arises in some contexts. It would be very useful to have these in a
> standard boost library like traits, and not (ab)using Spirit internals
> for that.
> To me, having is_container looks interesting for boost::traits.

My view is that can't have enough type traits, however they need to have very clear meaning to be usable and reliable.

What does is_container mean? Does it imply that I can access a begin() member function?

What about versioning: some C++11 STL containers have a shrink_to_fit member function that the C++98 STL containers don't have.

Boost list run by bdawes at, gregod at, cpdaniel at, john at