// empty
{
any a;
- a = a;
+ a = (any &)a;
assertEmpty(a);
assert(globalMemCounter.checkOutstandingNewEq(0));
}
any a((small(1)));
assert(small::count == 1);
- a = a;
+ a = (any &)a;
assert(small::count == 1);
assertContains<small>(a, 1);
any a(large(1));
assert(large::count == 1);
- a = a;
+ a = (any &)a;
assert(large::count == 1);
assertContains<large>(a, 1);
{
typedef std::function<int()> Func;
Func f = g0;
- Func& fr = (f = f);
+ Func& fr = (f = (Func &)f);
assert(&fr == &f);
assert(*f.target<int(*)()>() == g0);
}
{
typedef std::function<int(int)> Func;
Func f = g;
- Func& fr = (f = f);
+ Func& fr = (f = (Func &)f);
assert(&fr == &f);
assert(*f.target<int(*)(int)>() == g);
}
{
typedef std::function<int(int, int)> Func;
Func f = g2;
- Func& fr = (f = f);
+ Func& fr = (f = (Func &)f);
assert(&fr == &f);
assert(*f.target<int(*)(int, int)>() == g2);
}
{
typedef std::function<int(int, int, int)> Func;
Func f = g3;
- Func& fr = (f = f);
+ Func& fr = (f = (Func &)f);
assert(&fr == &f);
assert(*f.target<int(*)(int, int, int)>() == g3);
}