You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libcxx/test/std/utilities/memory/specialized.algorithms/specialized.addressof/addressof.temp.fail.cpp

27 lines
598 B
C++

//===----------------------------------------------------------------------===//
//
// 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.
//
//===----------------------------------------------------------------------===//
// <memory>
// template <ObjectType T> T* addressof(T&& r) = delete;
#include <memory>
#include <cassert>
#include "test_macros.h"
int main()
{
#if TEST_STD_VER > 14
const int *p = std::addressof<const int>(0);
#else
#error
#endif
}