
23 Mar
2007
23 Mar
'07
9:05 p.m.
On Friday 23 March 2007 16:57 pm, David Abrahams wrote:
on Fri Mar 23 2007, "Zach Laine" <whatwasthataddress-AT-gmail.com> wrote:
+ // Test auto-disconnection, part 2 + int value = 0; + BOOST_CHECK(value == 0); + { + short_lived_2 *shorty_2 = new short_lived_2; + boost::signal0<int> s2; + s2.connect(boost::bind(&short_lived_2::f, shorty_2)); + delete shorty_2; + value = s2(); + } + BOOST_CHECK(value == 0); +
It looks to me like this test has undefined behaviour? That is, it is calling last_value with a non-void return value with no slots connected (assuming tracking is working). -- Frank