construct.fail.cpp 718 B

12345678910111213141516171819202122232425
  1. //===----------------------------------------------------------------------===//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file is dual licensed under the MIT and the University of Illinois Open
  6. // Source Licenses. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. // UNSUPPORTED: c++98, c++03
  10. // <experimental/memory_resource>
  11. // Check that memory_resource is not constructible
  12. #include <experimental/memory_resource>
  13. #include <type_traits>
  14. #include <cassert>
  15. namespace ex = std::experimental::pmr;
  16. int main()
  17. {
  18. ex::memory_resource m; // expected-error {{variable type 'ex::memory_resource' is an abstract class}}
  19. }