derive_from.fail.cpp 661 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. // XFAIL: c++11, c++14
  11. // <functional>
  12. #include <functional>
  13. #include <type_traits>
  14. #include "test_macros.h"
  15. struct S : public std::function<void()> { using function::function; };
  16. int main() {
  17. S f1( [](){} );
  18. S f2(std::allocator_arg, std::allocator<int>{}, f1);
  19. }