RE: C++0x: rvalue references, std::vector::push_back, move semantics

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Minor addendum: I post this here because I am not sure if this
a C++0x "problem", a gcc one, or none at all.


Also, of course it should be ...

template <typename A, typename B>
vint operator | (A &&lhs, A &&rhs) {
        std::cout << "operator A|B{{" << std::endl;
        vint ret;
        ret.push_back(std::forward<A>(lhs));
        ret.push_back(std::forward<B>(rhs));
        std::cout << "}}" << std::endl;
        return ret;
}

... but the results are the same.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux