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

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).