http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59768

--- Comment #1 from Casey Carter <Casey at Carter dot net> ---
This behavior would appear to NOT be erroneous. I was operating under the
assumption that the behavior of the std::thread constructor and std::bind were
identical by design given that both use the "INVOKE" machinery defined by the
standard in [func.require]/1. However, the replacement of reference_wrapper<A>
with its stored reference is specified only for std::bind in
[func.bind.bind]/10:


The values of the bound arguments v1, v2, ..., vN and their corresponding types
V1, V2, ..., VN depend on the types TiD derived from the call to bind and the
cv-qualifiers cv of the call wrapper g as follows:

— if TiD is reference_wrapper<T>, the argument is tid.get() and its type Vi is
T&;


This would then not be a regression in the 4.8 line, but a correction to a
long-standing bug. I apologize for wasting your time with an erroneous bug
report.

Reply via email to