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++/86098] New: [concepts] canonical types differ for identical types


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

            Bug ID: 86098
           Summary: [concepts] canonical types differ for identical types
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: eric.niebler at gmail dot com
  Target Milestone: ---

Compile with -std=c++2a -O3 -fconcepts

namespace std {
    template <class _Res> class future;
    template <class _Res> class promise;
}

template <class T>
T&& declval() requires true;
template <class T>
void declval();

template<template <class...> class T>
struct construct_deduced {
  template <class... AN>
  using deduced_t = decltype(T{declval<AN>()...});
  template<class... AN>
    requires requires {typename deduced_t<AN...>;} 
  auto operator()(AN&&... an) const {
    return T{(AN&&)an...};
  }
};

template <class A>
concept bool Foo = true;

template<class T, class Out>
  requires Foo<std::promise<T>>
std::future<T> future_from(Out singleSender);



Result:
<source>:26:29: internal compiler error: canonical types differ for identical
types '_Res' and 'T'
   requires Foo<std::promise<T>>
                             ^
mmap: Invalid argument
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
Compiler returned: 1

See https://godbolt.org/g/4HkFdn

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