public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/95986] New: Partial specialization of class template is not found when class template has NTTP of class type
@ 2020-06-29 20:02 bence.kodaj at gmail dot com
  2021-07-20  7:46 ` [Bug c++/95986] " bence.kodaj at gmail dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: bence.kodaj at gmail dot com @ 2020-06-29 20:02 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 95986
           Summary: Partial specialization of class template is not found
                    when class template has NTTP of class type
           Product: gcc
           Version: 10.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bence.kodaj at gmail dot com
  Target Milestone: ---

In the code below I would expect the static assertion __not__ to fail, but it
does.
OS: Ubuntu 18.04.
Godbolt: https://godbolt.org/z/absUyx

---------------------------
#include <type_traits>

template< typename, template< auto... > typename >
struct IsInstantationOf : std::false_type {};

template< template< auto... > typename Template, auto... Arg >
struct IsInstantationOf< Template< Arg... >, Template > : std::true_type {};

template< std::size_t N >
struct StrLiteral {

    constexpr StrLiteral( const char ( & )[ N ] ) {}
};

template< StrLiteral >
struct Template {};

int main()
{
    const auto a = StrLiteral( "a" );

    static_assert( IsInstantationOf< Template< a >, Template >::value );

    return 0;
}
---------------------------

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/95986] Partial specialization of class template is not found when class template has NTTP of class type
  2020-06-29 20:02 [Bug c++/95986] New: Partial specialization of class template is not found when class template has NTTP of class type bence.kodaj at gmail dot com
@ 2021-07-20  7:46 ` bence.kodaj at gmail dot com
  2022-04-19 17:15 ` bence.kodaj at gmail dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: bence.kodaj at gmail dot com @ 2021-07-20  7:46 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid

W E Brown <webrown.cpp at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |webrown.cpp at gmail dot com

--- Comment #1 from Bence Kodaj <bence.kodaj at gmail dot com> ---
For what it's worth, the bug is still present in gcc 11.1:
https://godbolt.org/z/Mrbqnjsrj.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/95986] Partial specialization of class template is not found when class template has NTTP of class type
  2020-06-29 20:02 [Bug c++/95986] New: Partial specialization of class template is not found when class template has NTTP of class type bence.kodaj at gmail dot com
  2021-07-20  7:46 ` [Bug c++/95986] " bence.kodaj at gmail dot com
@ 2022-04-19 17:15 ` bence.kodaj at gmail dot com
  2022-05-11 16:33 ` ppalka at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: bence.kodaj at gmail dot com @ 2022-04-19 17:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Bence Kodaj <bence.kodaj at gmail dot com> ---
For what it's worth #2: In gcc 11.2, instead of a failed static assertion, we
get an internal compiler error.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/95986] Partial specialization of class template is not found when class template has NTTP of class type
  2020-06-29 20:02 [Bug c++/95986] New: Partial specialization of class template is not found when class template has NTTP of class type bence.kodaj at gmail dot com
  2021-07-20  7:46 ` [Bug c++/95986] " bence.kodaj at gmail dot com
  2022-04-19 17:15 ` bence.kodaj at gmail dot com
@ 2022-05-11 16:33 ` ppalka at gcc dot gnu.org
  2022-05-11 16:48 ` bence.kodaj at gmail dot com
  2022-05-11 16:55 ` ppalka at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: ppalka at gcc dot gnu.org @ 2022-05-11 16:33 UTC (permalink / raw)
  To: gcc-bugs

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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |10.3.0, 11.3.0
                 CC|                            |ppalka at gcc dot gnu.org
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |ice-on-valid-code
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=103672
   Last reconfirmed|                            |2022-05-11
      Known to work|                            |12.1.0

--- Comment #3 from Patrick Palka <ppalka at gcc dot gnu.org> ---
This appears to be fixed in GCC 12 ever since r12-6773-g09845ad7569bac.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/95986] Partial specialization of class template is not found when class template has NTTP of class type
  2020-06-29 20:02 [Bug c++/95986] New: Partial specialization of class template is not found when class template has NTTP of class type bence.kodaj at gmail dot com
                   ` (2 preceding siblings ...)
  2022-05-11 16:33 ` ppalka at gcc dot gnu.org
@ 2022-05-11 16:48 ` bence.kodaj at gmail dot com
  2022-05-11 16:55 ` ppalka at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: bence.kodaj at gmail dot com @ 2022-05-11 16:48 UTC (permalink / raw)
  To: gcc-bugs

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

Bence Kodaj <bence.kodaj at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Bence Kodaj <bence.kodaj at gmail dot com> ---
Fixed in GCC 12.1.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/95986] Partial specialization of class template is not found when class template has NTTP of class type
  2020-06-29 20:02 [Bug c++/95986] New: Partial specialization of class template is not found when class template has NTTP of class type bence.kodaj at gmail dot com
                   ` (3 preceding siblings ...)
  2022-05-11 16:48 ` bence.kodaj at gmail dot com
@ 2022-05-11 16:55 ` ppalka at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: ppalka at gcc dot gnu.org @ 2022-05-11 16:55 UTC (permalink / raw)
  To: gcc-bugs

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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-05-11 16:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-29 20:02 [Bug c++/95986] New: Partial specialization of class template is not found when class template has NTTP of class type bence.kodaj at gmail dot com
2021-07-20  7:46 ` [Bug c++/95986] " bence.kodaj at gmail dot com
2022-04-19 17:15 ` bence.kodaj at gmail dot com
2022-05-11 16:33 ` ppalka at gcc dot gnu.org
2022-05-11 16:48 ` bence.kodaj at gmail dot com
2022-05-11 16:55 ` ppalka at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).