This is the mail archive of the gcc-patches@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]

[PATCH] LWG 2733, LWG 2759 reject bool in gcd and lcm


These DRs are only in Tentatively Ready status, but they're not
controversial so implementing them immediately seems sensible.

The deleted function is sufficient, but the static assertions are more
user-friendly (and are only tested once, not in every recursive call
to __gcd or __lcm).

	* include/experimental/numeric (gcd, lcm): Make bool arguments
	ill-formed.
	* include/std/numeric (gcd, lcm): Likewise.
	* testsuite/26_numerics/gcd/gcd_neg.cc: New test.
	* testsuite/26_numerics/lcm/lcm_neg.cc: New test.

Tested x86_64-linux, committed to trunk.

Attachment: patch.txt
Description: Text document


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