Bug#1009081: g++-11: friend statement not used for template specialization

2022-04-07 Thread Vincent Danjean
Hi, More strange: by adding an unused static method, the behavior of the previous templates change. $ cat toto6.cpp #include struct X { template struct check_is_map { static constexpr bool value = false; }; template struct check_is_map { static constexpr bool value

Bug#1009081: g++-11: friend statement not used for template specialization

2022-04-06 Thread Vincent Danjean
Package: g++-11 Version: 11.2.0-19 Severity: normal Contrary to clang++, g++ does not honor "friend" statement when evaluating template specialization Here is a short example: $ cat toto6.cpp #include struct X { template struct check_is_map { static constexpr bool value = false; };