//===----------------------------------------------------------------------===// // // 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 // // template constexpr bool ratio_equal_v; #include #include namespace ex = std::experimental; int main() { { typedef std::ratio<1, 1> R1; typedef std::ratio<1, 1> R2; static_assert( ex::ratio_equal_v, "" ); static_assert( ex::ratio_equal_v == std::ratio_equal::value, "" ); static_assert( std::is_same), const bool>::value , "" ); } { typedef std::ratio<1, 1> R1; typedef std::ratio<1, -1> R2; static_assert( !ex::ratio_equal_v, "" ); static_assert( ex::ratio_equal_v == std::ratio_equal::value, "" ); } }