[Bug libstdc++/66338] std::forward_as_tuple() issue with single argument

ptomulik at meil dot pw.edu.pl gcc-bugzilla@gcc.gnu.org
Fri May 29 20:15:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66338

--- Comment #1 from Pawel Tomulik <ptomulik at meil dot pw.edu.pl> ---
As a side note, the following variant also does not compile:


int main()                                                                      
{                                                                               
  S const s{};                                                                  
  std::tuple<S const&>(std::forward_as_tuple(s));                               
  return 0;                                                                     
}    


but the non-const lvalue reference goes smoothly:

int main()                                                                      
{                                                                               
  S s{};                                                                        
  std::tuple<S&>(std::forward_as_tuple(s));                                     
  return 0;                                                                     
}



More information about the Gcc-bugs mailing list