diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2016-07-26 14:29:45 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2016-07-26 14:29:45 +0000 |
commit | 19b4035f29bafe7d5ddd07e10d15faae05f0e0f5 (patch) | |
tree | 57640a0bf3eac97c38bd589f5ad4a46037a59e1f /libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.not_integral1.fail.cpp | |
parent | ab581e79aa3ee4cdbcb30b9c5a76ff4e40281365 (diff) | |
download | bcm5719-llvm-19b4035f29bafe7d5ddd07e10d15faae05f0e0f5.tar.gz bcm5719-llvm-19b4035f29bafe7d5ddd07e10d15faae05f0e0f5.zip |
Implement LCM and GCD for C++17. Same code as for Library Fundamentals TS.
llvm-svn: 276751
Diffstat (limited to 'libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.not_integral1.fail.cpp')
-rw-r--r-- | libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.not_integral1.fail.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
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 +// <numeric> + +// template<class _M, class _N> +// 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 <numeric> + + +int main() +{ + std::gcd(2.0, 4); +} |