summaryrefslogtreecommitdiffstats
path: root/libcxx/test/support
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2017-06-18 14:52:26 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2017-06-18 14:52:26 +0000
commitb1cb279014e2b2b09211afa09e348ea923650674 (patch)
treeeb967a36cc9aaeb16ed6988dd1b7f5f1d000cf98 /libcxx/test/support
parent44e3d4c812b0a3eda2b9b0fbd67a30ebcececab5 (diff)
downloadbcm5719-llvm-b1cb279014e2b2b09211afa09e348ea923650674.tar.gz
bcm5719-llvm-b1cb279014e2b2b09211afa09e348ea923650674.zip
any: Add availability for experimental::bad_any_cast
As a follow up to r302172, add missing availability for bad_any_cast. rdar://problem/32161524 llvm-svn: 305647
Diffstat (limited to 'libcxx/test/support')
-rw-r--r--libcxx/test/support/experimental_any_helpers.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libcxx/test/support/experimental_any_helpers.h b/libcxx/test/support/experimental_any_helpers.h
index 50bd6d68fba..9c906e6bf76 100644
--- a/libcxx/test/support/experimental_any_helpers.h
+++ b/libcxx/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));
OpenPOWER on IntegriCloud