// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++14 // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++17 void foo(int* a, int *b) { a -= b; // expected-error {{incompatible integer to pointer conversion assigning to 'int *' from}} } template T declval(); struct true_type { static const bool value = true; }; struct false_type { static const bool value = false; }; template struct select { using type = T; }; template struct select { using type = U; }; template typename select<(sizeof(declval() -= declval(), 1) != 1), true_type, false_type>::type test(...); template false_type test(...); template static const auto has_minus_assign = decltype(test())::value; static_assert(has_minus_assign, "failed"); // expected-error {{static_assert failed due to requirement 'has_minus_assign' "failed"}}