[PATCH] D26142: Protect std::experimental::optional tests under libcpp-no-exceptions

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 4 18:19:53 PDT 2016


EricWF accepted this revision.
EricWF added a comment.
This revision is now accepted and ready to land.

LGTM after addressing inline comments.

Thanks again!



================
Comment at: test/std/experimental/optional/optional.object/optional.object.ctor/copy.pass.cpp:30
     try
+#endif
     {
----------------
```
#ifdef TEST_HAS_NO_EXCEPTIONS
  if (is_going_to_throw) return;
#else
  try
#endif


================
Comment at: test/std/experimental/optional/optional.object/optional.object.ctor/copy.pass.cpp:41
     {
         assert(i == 6);
     }
----------------
also add ```assert(is_going_to_throw);```


================
Comment at: test/std/experimental/optional/optional.object/optional.object.ctor/move.pass.cpp:30
     bool rhs_engaged = static_cast<bool>(rhs);
+#ifndef TEST_HAS_NO_EXCEPTIONS
     try
----------------
Some comments as above.


https://reviews.llvm.org/D26142





More information about the cfe-commits mailing list