Skip to content
Snippets Groups Projects
Commit a4101e5a authored by Jason Merrill's avatar Jason Merrill
Browse files

c++: Fix NaN as C++20 template argument

C++20 allows floating-point types for non-type template parameters;
floating-point values are considered to be equivalent template arguments if
they are "identical", which conveniently seems to map onto an existing GCC
predicate.

gcc/cp/ChangeLog:

	* tree.c (cp_tree_equal): Use real_identical.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp2a/nontype-float1.C: New test.
parent 0251051d
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment