#include <utility>
 
struct my_complex
{
        float r, i;
 
        my_complex(float r, float i)
                : r(r), i(i)
        {}
 
        template <typename Expr>
        my_complex(Expr expr)
        {
                auto result = expr();
                r = result.r;
                i = result.i;
        }
};
 
struct addition
{
        my_complex const& lhs;
        my_complex const& rhs;
 
        addition(my_complex const& lhs, my_complex const& rhs)
                : lhs(lhs), rhs(rhs)
        {}
 
        my_complex operator () ()
        {
                return my_complex(lhs.r + rhs.r, lhs.i + rhs.i);
        }
};
 
addition operator + (my_complex const& lhs, my_complex const& rhs)
{
        return addition(lhs, rhs);
}
 
int main()
{
        my_complex a(42.f, 666.f);
        my_complex b(3.14f, 2.7f);
 
        auto c = a + b;
 
        std::swap(a, c);
}