public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/94765] New: Floating point type template parameter
@ 2020-04-25 20:06 emmanuel.le-trong@cnrs-orleans.fr
  2020-04-25 23:16 ` [Bug c++/94765] " redi at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: emmanuel.le-trong@cnrs-orleans.fr @ 2020-04-25 20:06 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94765
           Summary: Floating point type template parameter
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: emmanuel.le-trong@cnrs-orleans.fr
  Target Milestone: ---

With C++20, non-type template parameters can now be any scalar type[0] which
include floating point types[1]. So this

    template <double> struct S {};

should compile. The rules for type equivalence are straightforward[2]

[0] http://eel.is/c++draft/temp#param-6
[1] http://eel.is/c++draft/basic.types#9
[2] http://eel.is/c++draft/temp.type#2

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

* [Bug c++/94765] Floating point type template parameter
  2020-04-25 20:06 [Bug c++/94765] New: Floating point type template parameter emmanuel.le-trong@cnrs-orleans.fr
@ 2020-04-25 23:16 ` redi at gcc dot gnu.org
  2020-05-07 19:01 ` mpolacek at gcc dot gnu.org
  2020-08-03 23:23 ` mpolacek at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2020-04-25 23:16 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
           Keywords|                            |rejects-valid
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2020-04-25

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
https://gcc.gnu.org/projects/cxx-status.html says that P1907R1 is supported
since GCC 9, which seems unlikely when P1907R1 wasn't approved until 6 months
after GCC 9.1 was released.

That page also says that the relevant feature test macro check is
__cpp_nontype_template_parameter_class >= 201806, which is wrong because the
check for P1907R1 is __cpp_nontype_template_args >= 201911, and GCC defines:

#define __cpp_nontype_template_args 201411L

I think it's a doc bug, and the feature is not implemented yet.

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

* [Bug c++/94765] Floating point type template parameter
  2020-04-25 20:06 [Bug c++/94765] New: Floating point type template parameter emmanuel.le-trong@cnrs-orleans.fr
  2020-04-25 23:16 ` [Bug c++/94765] " redi at gcc dot gnu.org
@ 2020-05-07 19:01 ` mpolacek at gcc dot gnu.org
  2020-08-03 23:23 ` mpolacek at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-05-07 19:01 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |mpolacek at gcc dot gnu.org
             Status|NEW                         |ASSIGNED
                 CC|                            |mpolacek at gcc dot gnu.org

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

* [Bug c++/94765] Floating point type template parameter
  2020-04-25 20:06 [Bug c++/94765] New: Floating point type template parameter emmanuel.le-trong@cnrs-orleans.fr
  2020-04-25 23:16 ` [Bug c++/94765] " redi at gcc dot gnu.org
  2020-05-07 19:01 ` mpolacek at gcc dot gnu.org
@ 2020-08-03 23:23 ` mpolacek at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-08-03 23:23 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Implemented in GCC 11.

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

end of thread, other threads:[~2020-08-03 23:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-25 20:06 [Bug c++/94765] New: Floating point type template parameter emmanuel.le-trong@cnrs-orleans.fr
2020-04-25 23:16 ` [Bug c++/94765] " redi at gcc dot gnu.org
2020-05-07 19:01 ` mpolacek at gcc dot gnu.org
2020-08-03 23:23 ` mpolacek 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).