From: David Abrahams (dave_at_[hidden])
Date: 2005-06-01 14:34:40
christopher diggins <cdiggins_at_[hidden]> writes:
>> You've presented one argument against, namely that generic code that
>> requires models of the container concept will misbehave when given a
>> type that doesn't model the container concept. That's a simple
>> violation of preconditions - which can be statically enforced with
>> concept checks.
> Good point, but I should point out very little existing code actually uses
> concept checks (at least for the time being, hopefully this will change
> soon). I am concerned that people will assume that max_size() and empty()
> exist to make Boost.Array an STL conformant container, which I think would
> be a very reasonable assumption!
> -Christopher Diggins
I think the risks are low. The standard Container concept is a very
weak one that almost never shows up in generic code anyway.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk