diff options
author | Louis Dionne <ldionne@apple.com> | 2018-11-19 15:37:04 +0000 |
---|---|---|
committer | Louis Dionne <ldionne@apple.com> | 2018-11-19 15:37:04 +0000 |
commit | 8a063df19435af25eadd30734be1b76275cbb56b (patch) | |
tree | 7de98d729291dc7bc5d4a790cfea9618bdd3c4ca /libcxx/test/support/any_helpers.h | |
parent | 08c0a0ac58764944adf5b116c82c2bc98ac6df1a (diff) | |
download | bcm5719-llvm-8a063df19435af25eadd30734be1b76275cbb56b.tar.gz bcm5719-llvm-8a063df19435af25eadd30734be1b76275cbb56b.zip |
[libcxx] Add availability markup for bad_optional_access, bad_variant_access and bad_any_cast
Reviewers: dexonsmith, EricWF
Subscribers: christof, arphaman, libcxx-commits
Differential Revision: https://reviews.llvm.org/D53256
llvm-svn: 347219
Diffstat (limited to 'libcxx/test/support/any_helpers.h')
-rw-r--r-- | libcxx/test/support/any_helpers.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libcxx/test/support/any_helpers.h b/libcxx/test/support/any_helpers.h index afc85c97ff4..ec8654d1903 100644 --- a/libcxx/test/support/any_helpers.h +++ b/libcxx/test/support/any_helpers.h @@ -68,6 +68,7 @@ template <class> constexpr bool has_value_member(long) { return false; } // Assert that an 'any' object stores the specified 'Type' and 'value'. template <class Type> std::enable_if_t<has_value_member<Type>(0)> +_LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST assertContains(std::any const& a, int value) { assert(a.has_value()); assert(containsType<Type>(a)); @@ -76,6 +77,7 @@ assertContains(std::any const& a, int value) { template <class Type, class Value> std::enable_if_t<!has_value_member<Type>(0)> +_LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST assertContains(std::any const& a, Value value) { assert(a.has_value()); assert(containsType<Type>(a)); @@ -86,6 +88,7 @@ assertContains(std::any const& a, Value value) { // 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::any& a, int value) { using namespace std; using namespace std::experimental; |