From 40b70509cc808b3ea06a3a9453073903b10df059 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Sat, 14 Jul 2001 18:46:42 +0000 Subject: [PATCH] mixin_test.cpp: - Test persistence of mixins when assigning to a function object [SVN r10616] --- test/mixin_test.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/mixin_test.cpp b/test/mixin_test.cpp index a17981b..6cee480 100644 --- a/test/mixin_test.cpp +++ b/test/mixin_test.cpp @@ -23,7 +23,7 @@ struct id_mixin { id_mixin(const id_mixin& rhs) : id(rhs.id) {} id_mixin& operator=(const id_mixin& rhs){id = rhs.id; return *this;} - id_mixin(){ id = 0;} + id_mixin(int i = 0){ id = i;} int id; }; @@ -31,9 +31,9 @@ typedef boost::function::mixin::type func; int test_main(int, char*[]) { - func f; + func f(id_mixin(3)); f = std::plus(); - BOOST_TEST(f.id == 0); + BOOST_TEST(f.id == 3); f.clear(); f.id = 7;