This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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;                                                                     
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]