|
Boost : |
From: Jonathan Turkanis (technews_at_[hidden])
Date: 2005-05-31 22:06:17
christopher diggins wrote:
> violates the container postconditions. Just for example consider the
> following common idiom:
>
> template<class Container_T>
> void some_very_dangerous_code(Container_T& x) {
> x = Container_T();
> if (x.empty()} {
> SayHelloToAlphaCentauri();
> }
> else {
> SendNukesToAlphaCentauri();
> }
> }
>
> Obviously this will not work as expected.
What's expected here?
Jonathan
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk