public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: LIU Hao <lh_mouse@126.com>
To: leon zadorin <leonleon77@gmail.com>, gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: which compiler is right (either to compile or to barf)...
Date: Thu, 1 Dec 2022 17:35:04 +0800	[thread overview]
Message-ID: <bd6ceb41-d909-ca8a-0927-5ce492090c1d@126.com> (raw)
In-Reply-To: <CAPpySAbkd8_tZ2DXBJbbgaAWYtrEXoi65Litt16ApVNWeTvATw@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 541 bytes --]

在 2022/12/1 12:51, leon zadorin via Gcc-help 写道:
> Hi everyone,
> 
> I would be interested to hear the opinions of C++ standard experts on which
> compiler is correctly dealing with the below code (GCC 12.2 -std=c++20
>   compiles fine, MSVC19.33 /std:c++20 compiles fine, Clang 15.0.0 -std=c++20
> barfs)
> 

I think this is a bug in Clang. Instantiation of `shared_ptr<T<U>>` is not meant to instantiate 
`T<U>`. Your code actually compiles fine if the definition of `J` was not provided.

-- 
Best regards,
LIU Hao


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

  reply	other threads:[~2022-12-01  9:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-01  4:51 leon zadorin
2022-12-01  9:35 ` LIU Hao [this message]
2022-12-01 23:26   ` leon zadorin
2022-12-01 23:54     ` Jonathan Wakely
2022-12-01 23:56       ` Jonathan Wakely
2022-12-02  0:17       ` leon zadorin
2022-12-02  6:37         ` LIU Hao
2022-12-02  7:18           ` leon zadorin
2022-12-02  7:22             ` leon zadorin
2022-12-02  7:45             ` LIU Hao
2022-12-02  8:34               ` leon zadorin
2022-12-02  9:16                 ` leon zadorin
2022-12-02 10:50                   ` leon zadorin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bd6ceb41-d909-ca8a-0927-5ce492090c1d@126.com \
    --to=lh_mouse@126.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=leonleon77@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).