Boost logo

Boost :

From: Ivan Matek (libbooze_at_[hidden])
Date: 2024-12-07 00:46:30


On Sat, Dec 7, 2024 at 1:29 AM Andrey Semashev via Boost <
boost_at_[hidden]> wrote:

> On 12/7/24 03:23, Ivan Matek wrote:
>
> It may be UB if the hasher's result() has an rvalue-qualified overload
> that moves parts of its internal representation out in the returned hash
> value.
>

I believe in code we will not call && overload.
One reason is I think is that named rvalue reference is lvalue reference
Second is that we are anyway calling std::move on wrapper, not on stored
member, i.e. wrapper result function does not destroy/move/reset member.

auto result() {
    return h.result();
}


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk