public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gcc-bugs at marehr dot dialup.fu-berlin.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/94819] [10 Regression] Inherited and constrained constructors are "ambiguous" even if they aren't Pt. 2
Date: Tue, 28 Apr 2020 13:21:13 +0000	[thread overview]
Message-ID: <bug-94819-4-v0YEqeTFdc@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-94819-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #1 from gcc-bugs at marehr dot dialup.fu-berlin.de ---
A slightly more reduced example:

```c++
#include <utility>

template <typename component_types>
struct alphabet_tuple_base
{
    template <typename component_type>
        requires std::is_same_v<component_type, component_types>
    constexpr alphabet_tuple_base(component_type) {} // commenting out
constexpr works?!

    template <typename indirect_component_type>
        requires (!std::is_same_v<indirect_component_type, component_types>)
    alphabet_tuple_base(indirect_component_type) {};
};

template <typename sequence_alphabet_t>
struct structured_rna : alphabet_tuple_base<sequence_alphabet_t> {
    using base_type = alphabet_tuple_base<sequence_alphabet_t>;
    using base_type::base_type;
};

struct dna4 {};
struct rna4 {};

structured_rna<rna4> t1{rna4{}}; // commenting out any of these works?!
structured_rna<rna4> t2{dna4{}}; // commenting out any of these works?!
structured_rna<rna4> t3{rna4{}}; // commenting out any of these works?!
```

https://godbolt.org/z/VACou9

  reply	other threads:[~2020-04-28 13:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-28 13:02 [Bug c++/94819] New: " gcc-bugs at marehr dot dialup.fu-berlin.de
2020-04-28 13:21 ` gcc-bugs at marehr dot dialup.fu-berlin.de [this message]
2020-04-28 13:37 ` [Bug c++/94819] " rguenth at gcc dot gnu.org
2020-04-28 17:04 ` daniel.kruegler at googlemail dot com
2020-04-28 17:37 ` ppalka at gcc dot gnu.org
2020-04-29  2:09 ` cvs-commit at gcc dot gnu.org
2020-04-29  2:11 ` ppalka at gcc dot gnu.org

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=bug-94819-4-v0YEqeTFdc@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).