[Bug libstdc++/102026] The comment on the instantiation description of __variant::__gen_vtable_impl can be updated

2021-08-29 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102026

--- Comment #3 from 康桓瑋  ---
It seems that all lambdas used in  can remove the mutable keyword
since there are no members that need to be "mutable" inside the lambda.

[Bug libstdc++/102026] The comment on the instantiation description of __variant::__gen_vtable_impl can be updated

2021-08-23 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102026

--- Comment #2 from Jonathan Wakely  ---
Yes, it should be [[__unlikely__]], thanks.

[Bug libstdc++/102026] The comment on the instantiation description of __variant::__gen_vtable_impl can be updated

2021-08-23 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102026

--- Comment #1 from 康桓瑋  ---
Another thing that seems noteworthy is in variant#L402:

 void _M_reset()
  {
if (!_M_valid()) [[unlikely]]
  return;

We use C++20 attributes in the C++17 feature library, so I don’t know whether
we should use the underlined [[__unlikely__]] like we do in variant #L1310 or
it doesn’t matter.

[Bug libstdc++/102026] The comment on the instantiation description of __variant::__gen_vtable_impl can be updated

2021-08-23 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102026

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2021-08-23
 Ever confirmed|0   |1
   Keywords||documentation