Marshall Clow | 1c7fe12 | 2016-11-14 18:22:19 +0000 | [diff] [blame] | 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
Chandler Carruth | 57b08b0 | 2019-01-19 10:56:40 +0000 | [diff] [blame] | 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
Marshall Clow | 1c7fe12 | 2016-11-14 18:22:19 +0000 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
Stephan T. Lavavej | d72ece6 | 2016-11-23 22:03:28 +0000 | [diff] [blame] | 8 | // |
Marshall Clow | 1c7fe12 | 2016-11-14 18:22:19 +0000 | [diff] [blame] | 9 | // UNSUPPORTED: c++98, c++03, c++11, c++14 |
| 10 | // <numeric> |
| 11 | |
| 12 | // template<class _M, class _N> |
| 13 | // constexpr common_type_t<_M,_N> gcd(_M __m, _N __n) |
| 14 | |
Stephan T. Lavavej | d72ece6 | 2016-11-23 22:03:28 +0000 | [diff] [blame] | 15 | // Remarks: If either M or N is not an integer type, |
Marshall Clow | 1c7fe12 | 2016-11-14 18:22:19 +0000 | [diff] [blame] | 16 | // or if either is (a possibly cv-qualified) bool, the program is ill-formed. |
| 17 | |
| 18 | #include <numeric> |
| 19 | |
| 20 | |
JF Bastien | 2df59c5 | 2019-02-04 20:31:13 +0000 | [diff] [blame] | 21 | int main(int, char**) |
Marshall Clow | 1c7fe12 | 2016-11-14 18:22:19 +0000 | [diff] [blame] | 22 | { |
| 23 | std::gcd<int, const bool>(2, true); |
JF Bastien | 2df59c5 | 2019-02-04 20:31:13 +0000 | [diff] [blame] | 24 | |
| 25 | return 0; |
Marshall Clow | 1c7fe12 | 2016-11-14 18:22:19 +0000 | [diff] [blame] | 26 | } |