// { dg-do compile { target c++14 } } // Copyright (C) 2014-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License along // with this library; see the file COPYING3. If not see // . // 20.9.5-20.9.9 #include static_assert(std::plus()(1,2)==3, ""); static_assert(std::minus()(3,2)==1, ""); static_assert(std::multiplies()(3,2)==6, ""); static_assert(std::divides()(6,2)==3, ""); static_assert(std::modulus()(7,2)==1, ""); static_assert(std::negate()(-5)==5, ""); static_assert(std::plus()(1,2)==3, ""); static_assert(std::minus()(3,2)==1, ""); static_assert(std::multiplies()(3,2)==6, ""); static_assert(std::divides()(6,2)==3, ""); static_assert(std::modulus()(7,2)==1, ""); static_assert(std::negate()(-5)==5, ""); static_assert(std::equal_to()(2,2), ""); static_assert(std::not_equal_to()(1,2), ""); static_assert(std::greater()(2,1), ""); static_assert(std::less()(1,2), ""); static_assert(std::greater_equal()(2,2), ""); static_assert(std::less_equal()(2,2), ""); static_assert(std::equal_to()(2,2), ""); static_assert(std::not_equal_to()(1,2), ""); static_assert(std::greater()(2,1), ""); static_assert(std::less()(1,2), ""); static_assert(std::greater_equal()(2,2), ""); static_assert(std::less_equal()(2,2), ""); static_assert(std::logical_and()(1,1), ""); static_assert(std::logical_or()(0,1), ""); static_assert(std::logical_not()(0), ""); static_assert(std::logical_and()(1,1), ""); static_assert(std::logical_or()(0,1), ""); static_assert(std::logical_not()(0), ""); static_assert(std::bit_and()(3,2)==2, ""); static_assert(std::bit_or()(1,2)==3, ""); static_assert(std::bit_xor()(1,1)==0, ""); static_assert(std::bit_not()(std::bit_not()(0))==0, ""); static_assert(std::bit_and()(3,2)==2, ""); static_assert(std::bit_or()(1,2)==3, ""); static_assert(std::bit_xor()(1,1)==0, ""); static_assert(std::bit_not()(std::bit_not()(0))==0, ""); static_assert(std::unary_negate> (std::logical_not())(1), ""); static_assert(std::not1(std::logical_not())(1), ""); static_assert(std::binary_negate> (std::logical_and())(0,0), ""); static_assert(std::not2(std::logical_and())(0,0), "");