
1 Jun
2005
1 Jun
'05
3:06 a.m.
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