Inspired by the test @EricWF added in r220722.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Why not make it fail at compile time?
#ifdef _LIBCPP_HAS_NO_THREADS #error <error message> #endif int main() {}
Comment Actions
Making it an execute test, IMHO, gives stronger guarantees that it's failing the way we want it to. I don't really have any other reasons to prefer one version over the other.
Comment Actions
I wasn't suggesting making it a .pass.cpp test. Just making it fail during compilation instead. I would prefer using a #error directive so the output of the test failure is clearer, but it's up to you.
Otherwise, LGTM.
Comment Actions
Nevermind... I'm being silly. Ignore my previous comment.
I don't really have a preference either way.