hamzasood updated this revision to Diff 156857.
hamzasood added a comment.
- Made the suggested test changes.
The compiler is meant to create these; Clang doesn't do this yet but I'm
working on the implementation.
I was under the impression that the compiler support would require the library
s
mclow.lists added inline comments.
Comment at: test/libcxx/language.support/support.contract/version.pass.cpp:9
+//===--===//
+
+//
All the tests need `// UNSUPPORTED: c++03, c++11, c++14, c++17
mclow.lists added a comment.
I'd like to be clear that I'm not against using `ASSERT_NOEXCEPT` or
`ASSERT_SAME_TYPE` - that's fine.
But I'd rather you use `declval<>` - which is only useful in an unevaluated
context, rather than having a function that takes a parameter - which someone
might act
mclow.lists added a comment.
> Testing whether it's actually hooked up correctly is quite problematic; it
> isn't meant to be instantiable. What's the best way to proceed with this?
The compiler is supposed to create these - right?
Does clang currently do this?
- If not, we should wait for them
hamzasood updated this revision to Diff 156808.
hamzasood added a comment.
- Added a missing visibility attribute.
- Added a simple test that type-checks the expected public interface.
Testing whether it's actually hooked up correctly is quite problematic; it
isn't meant to be instantiable. What
mclow.lists added a comment.
I get that lib++ will not make these things, but we still need some tests
showing that the whole machinery works.
Repository:
rCXX libc++
https://reviews.llvm.org/D49647
___
cfe-commits mailing list
cfe-commits@lists
mclow.lists added a comment.
Thanks for doing this, but it needs tests before it can land.
If I were to define `class contract_violation {};` that would pass the tests
you've provided.
(Heck, if I removed the entire definition of `contract_violation`, it would
still pass.)
Co
hamzasood created this revision.
hamzasood added reviewers: EricWF, mclow.lists, rsmith.
Herald added subscribers: cfe-commits, ldionne, christof.
This patch adds the library components needed for contracts in C++2a.
The wording says that a contract_violation object is populated in an
implementa