From 19b4035f29bafe7d5ddd07e10d15faae05f0e0f5 Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Tue, 26 Jul 2016 14:29:45 +0000 Subject: Implement LCM and GCD for C++17. Same code as for Library Fundamentals TS. llvm-svn: 276751 --- .../numeric.ops.gcd/gcd.not_integral1.fail.cpp | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.not_integral1.fail.cpp (limited to 'libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.not_integral1.fail.cpp') diff --git a/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.not_integral1.fail.cpp b/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.not_integral1.fail.cpp new file mode 100644 index 00000000000..585e40bac8a --- /dev/null +++ b/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.not_integral1.fail.cpp @@ -0,0 +1,24 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// UNSUPPORTED: c++98, c++03, c++11, c++14 +// + +// template +// constexpr common_type_t<_M,_N> gcd(_M __m, _N __n) + +// Remarks: If either M or N is not an integer type, the program is ill-formed. + +#include + + +int main() +{ + std::gcd(2.0, 4); +} -- cgit v1.2.3