summaryrefslogtreecommitdiff
path: root/test/support/experimental_any_helpers.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-06-26 20:33:34 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-06-26 20:33:34 +0000
commitd23de13b3208b94a25e1de463ea3155911512e61 (patch)
treec2bc9a0cec68a68070eda79306ab632043b91fea /test/support/experimental_any_helpers.h
parent8462a49537476f8c62bcabfe490226af0d7c1cae (diff)
Notes
Diffstat (limited to 'test/support/experimental_any_helpers.h')
-rw-r--r--test/support/experimental_any_helpers.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/support/experimental_any_helpers.h b/test/support/experimental_any_helpers.h
index 50bd6d68fba5..9c906e6bf76a 100644
--- a/test/support/experimental_any_helpers.h
+++ b/test/support/experimental_any_helpers.h
@@ -55,6 +55,7 @@ void assertEmpty(std::experimental::any const& a) {
// Assert that an 'any' object stores the specified 'Type' and 'value'.
template <class Type>
+_LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST
void assertContains(std::experimental::any const& a, int value = 1) {
assert(!a.empty());
RTTI_ASSERT(a.type() == typeid(Type));
@@ -64,6 +65,7 @@ void assertContains(std::experimental::any const& a, int value = 1) {
// Modify the value of a "test type" stored within an any to the specified
// 'value'.
template <class Type>
+_LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST
void modifyValue(std::experimental::any& a, int value) {
assert(!a.empty());
RTTI_ASSERT(a.type() == typeid(Type));