public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/111717] New: syntax error When CTAD encounters complex alias template
@ 2023-10-06 16:35 hewillk at gmail dot com
  2023-10-06 16:35 ` [Bug c++/111717] " hewillk at gmail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: hewillk at gmail dot com @ 2023-10-06 16:35 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111717
           Summary: syntax error When CTAD encounters complex alias
                    template
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hewillk at gmail dot com
  Target Milestone: ---

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/111717] syntax error When CTAD encounters complex alias template
  2023-10-06 16:35 [Bug c++/111717] New: syntax error When CTAD encounters complex alias template hewillk at gmail dot com
@ 2023-10-06 16:35 ` hewillk at gmail dot com
  2023-10-06 16:56 ` pinskia at gcc dot gnu.org
  2024-04-13  8:29 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: hewillk at gmail dot com @ 2023-10-06 16:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from 康桓瑋 <hewillk at gmail dot com> ---
#include <utility>

namespace std {
constexpr size_t dynamic_extent = -1;

template<class IndexType, size_t... Extents>
class extents { };

template<class IndexType, size_t Rank>
using dextents = decltype([]<size_t... Is>(index_sequence<Is...>) {
  return extents<IndexType, ((void)Is, dynamic_extent)...>{};
}(make_index_sequence<Rank>{}));

// this works well
static_assert(std::is_same_v<
  dextents<int, 3>,
  extents<int, dynamic_extent, dynamic_extent, dynamic_extent>>
);

template<class ElementType, class Extents>
class mdspan {
  template<class Ptr, class... Integrals>
  explicit mdspan(Ptr ptr, Integrals... exts);
};

template<class ElementType, class... Integrals>
explicit mdspan(ElementType*, Integrals...)
  ->mdspan<ElementType, dextents<size_t, sizeof...(Integrals)>>;

}

https://godbolt.org/z/E45dcb4G8

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/111717] syntax error When CTAD encounters complex alias template
  2023-10-06 16:35 [Bug c++/111717] New: syntax error When CTAD encounters complex alias template hewillk at gmail dot com
  2023-10-06 16:35 ` [Bug c++/111717] " hewillk at gmail dot com
@ 2023-10-06 16:56 ` pinskia at gcc dot gnu.org
  2024-04-13  8:29 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-10-06 16:56 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |c++-lambda

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This looks like another one of the lamdba inside a decltype for a type alias
issues.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/111717] syntax error When CTAD encounters complex alias template
  2023-10-06 16:35 [Bug c++/111717] New: syntax error When CTAD encounters complex alias template hewillk at gmail dot com
  2023-10-06 16:35 ` [Bug c++/111717] " hewillk at gmail dot com
  2023-10-06 16:56 ` pinskia at gcc dot gnu.org
@ 2024-04-13  8:29 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-13  8:29 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|UNCONFIRMED                 |RESOLVED
   Target Milestone|---                         |14.0

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed on the trunk for GCC 14 by the recent lambda template patches.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-04-13  8:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-06 16:35 [Bug c++/111717] New: syntax error When CTAD encounters complex alias template hewillk at gmail dot com
2023-10-06 16:35 ` [Bug c++/111717] " hewillk at gmail dot com
2023-10-06 16:56 ` pinskia at gcc dot gnu.org
2024-04-13  8:29 ` pinskia 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).