------- Comment #2 from jason at gcc dot gnu dot org 2010-08-11 13:06 ------- This result, while unfortunate, is not a bug; template argument deduction only uses the type and lvalueness of the function argument (unsigned, lvalue) and therefore deduces the type of __x to be unsigned&. But an reference cannot bind to a bitfield, so the call is ill-formed.
You can work around this issue by using the unary + to make the argument an rvalue: std::make_pair ( + X::s.addr, true ); -- jason at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45253