Implement LCM and GCD for C++17. Same code as for Library Fundamentals TS.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@276751 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2016-07-26 14:29:45 +00:00
parent f3e7cacb35
commit 1c1e91d9a3
9 changed files with 426 additions and 5 deletions

View File

@@ -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> lcm(_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::lcm(2.0, 4);
}