This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/86378] New: [7/8/9 regression] typedef breaks functional cast in noexcept-qualifier


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

            Bug ID: 86378
           Summary: [7/8/9 regression] typedef breaks functional cast in
                    noexcept-qualifier
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: jason at gcc dot gnu.org
          Reporter: jason at gcc dot gnu.org
  Target Milestone: ---

From https://bugzilla.redhat.com/show_bug.cgi?id=1597104

struct Pepper {};
struct Apple { Apple(int) {} };

struct Combination : Apple, Pepper
{
  Combination(Pepper p, Apple a)
    : Apple(a), Pepper(p)
  {}
};

struct MyCombination
{
  using Spice = Pepper;
  using Fruit = Apple;

  Combination combination;

  template<typename T>
  constexpr MyCombination(T&& t)
  noexcept(noexcept(Combination(Spice(), Fruit(t))))
    : combination(Spice(), Fruit(t))
  {}
};

MyCombination obj(Apple(4));

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]