Browse Source

[libc++] Mark several tests as XFAIL on macosx10.7

Those tests fail when linking against a new dylib but running against
macosx10.7. I believe this is caused by a duplicate definition of the
RTTI for exception classes in libc++.dylib and libc++abi.dylib, but
this matter still needs some investigation.

This issue was not caught previously because all the tests always linked
against the same dylib used for running (because LIT made it impossible
to do otherwise before r349171).

rdar://problem/46809586

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@354940 91177308-0d34-0410-b5e6-96231b3b80d8
Louis Dionne 6 years ago
parent
commit
21c042e77e
36 changed files with 179 additions and 0 deletions
  1. 4 0
      test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/do_allocate_and_deallocate.pass.cpp
  2. 5 0
      test/std/strings/basic.string/string.access/at.pass.cpp
  3. 5 0
      test/std/strings/basic.string/string.capacity/reserve.pass.cpp
  4. 5 0
      test/std/strings/basic.string/string.capacity/resize_size.pass.cpp
  5. 5 0
      test/std/strings/basic.string/string.capacity/resize_size_char.pass.cpp
  6. 5 0
      test/std/strings/basic.string/string.cons/substr.pass.cpp
  7. 5 0
      test/std/strings/basic.string/string.modifiers/string_append/T_size_size.pass.cpp
  8. 5 0
      test/std/strings/basic.string/string.modifiers/string_append/string_size_size.pass.cpp
  9. 5 0
      test/std/strings/basic.string/string.modifiers/string_assign/T_size_size.pass.cpp
  10. 5 0
      test/std/strings/basic.string/string.modifiers/string_assign/string_size_size.pass.cpp
  11. 5 0
      test/std/strings/basic.string/string.modifiers/string_copy/copy.pass.cpp
  12. 5 0
      test/std/strings/basic.string/string.modifiers/string_erase/size_size.pass.cpp
  13. 5 0
      test/std/strings/basic.string/string.modifiers/string_insert/size_T_size_size.pass.cpp
  14. 5 0
      test/std/strings/basic.string/string.modifiers/string_insert/size_pointer.pass.cpp
  15. 5 0
      test/std/strings/basic.string/string.modifiers/string_insert/size_pointer_size.pass.cpp
  16. 5 0
      test/std/strings/basic.string/string.modifiers/string_insert/size_size_char.pass.cpp
  17. 5 0
      test/std/strings/basic.string/string.modifiers/string_insert/size_string.pass.cpp
  18. 5 0
      test/std/strings/basic.string/string.modifiers/string_insert/size_string_size_size.pass.cpp
  19. 5 0
      test/std/strings/basic.string/string.modifiers/string_insert/string_view.pass.cpp
  20. 5 0
      test/std/strings/basic.string/string.modifiers/string_replace/size_size_T_size_size.pass.cpp
  21. 5 0
      test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer.pass.cpp
  22. 5 0
      test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer_size.pass.cpp
  23. 5 0
      test/std/strings/basic.string/string.modifiers/string_replace/size_size_size_char.pass.cpp
  24. 5 0
      test/std/strings/basic.string/string.modifiers/string_replace/size_size_string.pass.cpp
  25. 5 0
      test/std/strings/basic.string/string.modifiers/string_replace/size_size_string_size_size.pass.cpp
  26. 5 0
      test/std/strings/basic.string/string.modifiers/string_replace/size_size_string_view.pass.cpp
  27. 5 0
      test/std/strings/basic.string/string.ops/string_compare/size_size_pointer.pass.cpp
  28. 5 0
      test/std/strings/basic.string/string.ops/string_compare/size_size_pointer_size.pass.cpp
  29. 5 0
      test/std/strings/basic.string/string.ops/string_compare/size_size_string.pass.cpp
  30. 5 0
      test/std/strings/basic.string/string.ops/string_compare/size_size_string_size_size.pass.cpp
  31. 5 0
      test/std/strings/basic.string/string.ops/string_compare/size_size_string_view.pass.cpp
  32. 5 0
      test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp
  33. 5 0
      test/std/strings/string.conversions/stod.pass.cpp
  34. 5 0
      test/std/strings/string.conversions/stoi.pass.cpp
  35. 5 0
      test/std/strings/string.conversions/stold.pass.cpp
  36. 5 0
      test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp

+ 4 - 0
test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/do_allocate_and_deallocate.pass.cpp

@@ -15,6 +15,10 @@
 // void * do_allocate(size_t size, size_t align)
 // void   do_deallocate(void*, size_t, size_t)
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
 
 #include <experimental/memory_resource>
 #include <type_traits>

+ 5 - 0
test/std/strings/basic.string/string.access/at.pass.cpp

@@ -11,6 +11,11 @@
 // const_reference at(size_type pos) const;
 //       reference at(size_type pos);
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <string>
 #include <stdexcept>
 #include <cassert>

+ 5 - 0
test/std/strings/basic.string/string.capacity/reserve.pass.cpp

@@ -12,6 +12,11 @@
 // void reserve();
 // void reserve(size_type res_arg);
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <string>
 #include <stdexcept>
 #include <cassert>

+ 5 - 0
test/std/strings/basic.string/string.capacity/resize_size.pass.cpp

@@ -10,6 +10,11 @@
 
 // void resize(size_type n);
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <string>
 #include <stdexcept>
 #include <cassert>

+ 5 - 0
test/std/strings/basic.string/string.capacity/resize_size_char.pass.cpp

@@ -10,6 +10,11 @@
 
 // void resize(size_type n, charT c);
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <string>
 #include <stdexcept>
 #include <cassert>

+ 5 - 0
test/std/strings/basic.string/string.cons/substr.pass.cpp

@@ -16,6 +16,11 @@
 //              size_type pos,
 //              const Allocator& a = Allocator());
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <string>
 #include <stdexcept>
 #include <algorithm>

+ 5 - 0
test/std/strings/basic.string/string.modifiers/string_append/T_size_size.pass.cpp

@@ -11,6 +11,11 @@
 // template <class T>
 //    basic_string& append(const T& t, size_type pos, size_type n=npos); // C++17
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <string>
 #include <string>
 #include <stdexcept>

+ 5 - 0
test/std/strings/basic.string/string.modifiers/string_append/string_size_size.pass.cpp

@@ -12,6 +12,11 @@
 //   append(const basic_string<charT,traits>& str, size_type pos, size_type n = npos);
 //  the "= npos" was added for C++14
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <string>
 #include <stdexcept>
 #include <cassert>

+ 5 - 0
test/std/strings/basic.string/string.modifiers/string_assign/T_size_size.pass.cpp

@@ -11,6 +11,11 @@
 // template <class T>
 //    basic_string& assign(const T& t, size_type pos, size_type n=npos); // C++17
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <string>
 #include <stdexcept>
 #include <cassert>

+ 5 - 0
test/std/strings/basic.string/string.modifiers/string_assign/string_size_size.pass.cpp

@@ -12,6 +12,11 @@
 //   assign(const basic_string<charT,traits>& str, size_type pos, size_type n=npos);
 // the =npos was added for C++14
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <string>
 #include <stdexcept>
 #include <cassert>

+ 5 - 0
test/std/strings/basic.string/string.modifiers/string_copy/copy.pass.cpp

@@ -10,6 +10,11 @@
 
 // size_type copy(charT* s, size_type n, size_type pos = 0) const;
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <string>
 #include <stdexcept>
 #include <algorithm>

+ 5 - 0
test/std/strings/basic.string/string.modifiers/string_erase/size_size.pass.cpp

@@ -11,6 +11,11 @@
 // basic_string<charT,traits,Allocator>&
 //   erase(size_type pos = 0, size_type n = npos);
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <string>
 #include <stdexcept>
 #include <cassert>

+ 5 - 0
test/std/strings/basic.string/string.modifiers/string_insert/size_T_size_size.pass.cpp

@@ -13,6 +13,11 @@
 //
 //  Mostly we're testing string_view here
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <string>
 #include <stdexcept>
 #include <cassert>

+ 5 - 0
test/std/strings/basic.string/string.modifiers/string_insert/size_pointer.pass.cpp

@@ -11,6 +11,11 @@
 // basic_string<charT,traits,Allocator>&
 //   insert(size_type pos, const charT* s);
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <string>
 #include <stdexcept>
 #include <cassert>

+ 5 - 0
test/std/strings/basic.string/string.modifiers/string_insert/size_pointer_size.pass.cpp

@@ -11,6 +11,11 @@
 // basic_string<charT,traits,Allocator>&
 //   insert(size_type pos, const charT* s, size_type n);
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <string>
 #include <stdexcept>
 #include <cassert>

+ 5 - 0
test/std/strings/basic.string/string.modifiers/string_insert/size_size_char.pass.cpp

@@ -11,6 +11,11 @@
 // basic_string<charT,traits,Allocator>&
 //   insert(size_type pos, size_type n, charT c);
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <string>
 #include <stdexcept>
 #include <cassert>

+ 5 - 0
test/std/strings/basic.string/string.modifiers/string_insert/size_string.pass.cpp

@@ -11,6 +11,11 @@
 // basic_string<charT,traits,Allocator>&
 //   insert(size_type pos1, const basic_string& str);
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <string>
 #include <stdexcept>
 #include <cassert>

+ 5 - 0
test/std/strings/basic.string/string.modifiers/string_insert/size_string_size_size.pass.cpp

@@ -13,6 +13,11 @@
 //          size_type pos2, size_type n=npos);
 // the "=npos" was added in C++14
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <string>
 #include <stdexcept>
 #include <cassert>

+ 5 - 0
test/std/strings/basic.string/string.modifiers/string_insert/string_view.pass.cpp

@@ -11,6 +11,11 @@
 // basic_string<charT,traits,Allocator>&
 //   insert(size_type pos, string_view sv);
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <string>
 #include <stdexcept>
 #include <cassert>

+ 5 - 0
test/std/strings/basic.string/string.modifiers/string_replace/size_size_T_size_size.pass.cpp

@@ -14,6 +14,11 @@
 //
 //  Mostly we're testing string_view here
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <string>
 #include <stdexcept>
 #include <algorithm>

+ 5 - 0
test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer.pass.cpp

@@ -11,6 +11,11 @@
 // basic_string<charT,traits,Allocator>&
 //   replace(size_type pos, size_type n1, const charT* s);
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <string>
 #include <stdexcept>
 #include <algorithm>

+ 5 - 0
test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer_size.pass.cpp

@@ -11,6 +11,11 @@
 // basic_string<charT,traits,Allocator>&
 //   replace(size_type pos, size_type n1, const charT* s, size_type n2);
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <string>
 #include <stdexcept>
 #include <algorithm>

+ 5 - 0
test/std/strings/basic.string/string.modifiers/string_replace/size_size_size_char.pass.cpp

@@ -11,6 +11,11 @@
 // basic_string<charT,traits,Allocator>&
 //   replace(size_type pos, size_type n1, size_type n2, charT c);
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <string>
 #include <stdexcept>
 #include <algorithm>

+ 5 - 0
test/std/strings/basic.string/string.modifiers/string_replace/size_size_string.pass.cpp

@@ -11,6 +11,11 @@
 // basic_string<charT,traits,Allocator>&
 //   replace(size_type pos1, size_type n1, const basic_string<charT,traits,Allocator>& str);
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <string>
 #include <stdexcept>
 #include <algorithm>

+ 5 - 0
test/std/strings/basic.string/string.modifiers/string_replace/size_size_string_size_size.pass.cpp

@@ -13,6 +13,11 @@
 //           size_type pos2, size_type n2=npos);
 //  the "=npos" was added in C++14
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <string>
 #include <stdexcept>
 #include <algorithm>

+ 5 - 0
test/std/strings/basic.string/string.modifiers/string_replace/size_size_string_view.pass.cpp

@@ -11,6 +11,11 @@
 // basic_string<charT,traits,Allocator>&
 //   replace(size_type pos1, size_type n1, basic_string_view<charT,traits> sv);
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <string>
 #include <stdexcept>
 #include <algorithm>

+ 5 - 0
test/std/strings/basic.string/string.ops/string_compare/size_size_pointer.pass.cpp

@@ -10,6 +10,11 @@
 
 // int compare(size_type pos, size_type n1, const charT *s) const;
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <string>
 #include <stdexcept>
 #include <cassert>

+ 5 - 0
test/std/strings/basic.string/string.ops/string_compare/size_size_pointer_size.pass.cpp

@@ -10,6 +10,11 @@
 
 // int compare(size_type pos, size_type n1, const charT *s, size_type n2) const;
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <string>
 #include <stdexcept>
 #include <cassert>

+ 5 - 0
test/std/strings/basic.string/string.ops/string_compare/size_size_string.pass.cpp

@@ -10,6 +10,11 @@
 
 // int compare(size_type pos1, size_type n1, const basic_string& str) const;
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <string>
 #include <stdexcept>
 #include <cassert>

+ 5 - 0
test/std/strings/basic.string/string.ops/string_compare/size_size_string_size_size.pass.cpp

@@ -12,6 +12,11 @@
 //             size_type pos2, size_type n2=npos) const;
 //  the "=npos" was added in C++14
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <string>
 #include <stdexcept>
 #include <cassert>

+ 5 - 0
test/std/strings/basic.string/string.ops/string_compare/size_size_string_view.pass.cpp

@@ -10,6 +10,11 @@
 
 // int compare(size_type pos1, size_type n1, basic_string_vew sv) const;
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <string>
 #include <stdexcept>
 #include <cassert>

+ 5 - 0
test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp

@@ -10,6 +10,11 @@
 
 // basic_string substr(size_type pos = 0, size_type n = npos) const;
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <string>
 #include <stdexcept>
 #include <algorithm>

+ 5 - 0
test/std/strings/string.conversions/stod.pass.cpp

@@ -11,6 +11,11 @@
 // double stod(const string& str, size_t *idx = 0);
 // double stod(const wstring& str, size_t *idx = 0);
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <string>
 #include <cmath>
 #include <cassert>

+ 5 - 0
test/std/strings/string.conversions/stoi.pass.cpp

@@ -11,6 +11,11 @@
 // int stoi(const string& str, size_t *idx = 0, int base = 10);
 // int stoi(const wstring& str, size_t *idx = 0, int base = 10);
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <string>
 #include <cassert>
 #include <stdexcept>

+ 5 - 0
test/std/strings/string.conversions/stold.pass.cpp

@@ -11,6 +11,11 @@
 // long double stold(const string& str, size_t *idx = 0);
 // long double stold(const wstring& str, size_t *idx = 0);
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <iostream>
 
 #include <string>

+ 5 - 0
test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp

@@ -12,6 +12,11 @@
 // allocator:
 // pointer allocate(size_type n, allocator<void>::const_pointer hint=0);
 
+// When back-deploying to macosx10.7, the RTTI for exception classes
+// incorrectly provided by libc++.dylib is mixed with the one in
+// libc++abi.dylib and exceptions are not caught properly.
+// XFAIL: with_system_cxx_lib=macosx10.7
+
 #include <memory>
 #include <cassert>