// Check that we can't accidentally assign a temporary location to an ArrayRef.
// (Unfortunately we can't make use of the same thing with constructors.)
-//
-// Disable this check under MSVC; even MSVC 2015 isn't inconsistent between
-// std::is_assignable and actually writing such an assignment.
-#if !defined(_MSC_VER)
static_assert(
!std::is_assignable<ArrayRef<int *>&, int *>::value,
"Assigning from single prvalue element");
static_assert(
!std::is_assignable<ArrayRef<int *>&, std::initializer_list<int *>>::value,
"Assigning from an initializer list");
-#endif
namespace {
// Check that we can't accidentally assign a temporary std::string to a
// StringRef. (Unfortunately we can't make use of the same thing with
// constructors.)
-//
-// Disable this check under MSVC; even MSVC 2015 isn't consistent between
-// std::is_assignable and actually writing such an assignment.
-#if !defined(_MSC_VER)
static_assert(
!std::is_assignable<StringRef&, std::string>::value,
"Assigning from prvalue std::string");
static_assert(
std::is_assignable<StringRef&, const char * &>::value,
"Assigning from lvalue C string");
-#endif
-
namespace {
TEST(StringRefTest, Construction) {