1// -*- C++ -*- 2//===----------------------------------------------------------------------===// 3// 4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 5// See https://llvm.org/LICENSE.txt for license information. 6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7// 8//===----------------------------------------------------------------------===// 9 10#ifndef _LIBCPP___AVAILABILITY 11#define _LIBCPP___AVAILABILITY 12 13#include <__config> 14 15#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 16# pragma GCC system_header 17#endif 18 19// Libc++ is shipped by various vendors. In particular, it is used as a system 20// library on macOS, iOS and other Apple platforms. In order for users to be 21// able to compile a binary that is intended to be deployed to an older version 22// of a platform, Clang provides availability attributes [1]. These attributes 23// can be placed on declarations and are used to describe the life cycle of a 24// symbol in the library. 25// 26// The main goal is to ensure a compile-time error if a symbol that hasn't been 27// introduced in a previously released library is used in a program that targets 28// that previously released library. Normally, this would be a load-time error 29// when one tries to launch the program against the older library. 30// 31// For example, the filesystem library was introduced in the dylib in macOS 10.15. 32// If a user compiles on a macOS 10.15 host but targets macOS 10.13 with their 33// program, the compiler would normally not complain (because the required 34// declarations are in the headers), but the dynamic loader would fail to find 35// the symbols when actually trying to launch the program on macOS 10.13. To 36// turn this into a compile-time issue instead, declarations are annotated with 37// when they were introduced, and the compiler can produce a diagnostic if the 38// program references something that isn't available on the deployment target. 39// 40// This mechanism is general in nature, and any vendor can add their markup to 41// the library (see below). Whenever a new feature is added that requires support 42// in the shared library, two macros are added below to allow marking the feature 43// as unavailable: 44// 1. A macro named `_LIBCPP_AVAILABILITY_HAS_NO_<feature>` which must be defined 45// exactly when compiling for a target that doesn't support the feature. 46// 2. A macro named `_LIBCPP_AVAILABILITY_<feature>`, which must always be defined 47// and must expand to the proper availability attribute for the platform. 48// 49// When vendors decide to ship the feature as part of their shared library, they 50// can update these macros appropriately for their platform, and the library will 51// use those to provide an optimal user experience. 52// 53// Furthermore, many features in the standard library have corresponding 54// feature-test macros. The `_LIBCPP_AVAILABILITY_HAS_NO_<feature>` macros 55// are checked by the corresponding feature-test macros generated by 56// generate_feature_test_macro_components.py to ensure that the library 57// doesn't announce a feature as being implemented if it is unavailable on 58// the deployment target. 59// 60// Note that this mechanism is disabled by default in the "upstream" libc++. 61// Availability annotations are only meaningful when shipping libc++ inside 62// a platform (i.e. as a system library), and so vendors that want them should 63// turn those annotations on at CMake configuration time. 64// 65// [1]: https://clang.llvm.org/docs/AttributeReference.html#availability 66 67 68// For backwards compatibility, allow users to define _LIBCPP_DISABLE_AVAILABILITY 69// for a while. 70#if defined(_LIBCPP_DISABLE_AVAILABILITY) 71# if !defined(_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS) 72# define _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS 73# endif 74#endif 75 76// Availability markup is disabled when building the library, or when the compiler 77// doesn't support the proper attributes. 78#if defined(_LIBCPP_BUILDING_LIBRARY) || \ 79 defined(_LIBCXXABI_BUILDING_LIBRARY) || \ 80 !__has_feature(attribute_availability_with_strict) || \ 81 !__has_feature(attribute_availability_in_templates) || \ 82 !__has_extension(pragma_clang_attribute_external_declaration) 83# if !defined(_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS) 84# define _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS 85# endif 86#endif 87 88#if defined(_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS) 89 90 // This controls the availability of std::shared_mutex and std::shared_timed_mutex, 91 // which were added to the dylib later. 92// # define _LIBCPP_AVAILABILITY_HAS_NO_SHARED_MUTEX 93# define _LIBCPP_AVAILABILITY_SHARED_MUTEX 94 95 // These macros control the availability of std::bad_optional_access and 96 // other exception types. These were put in the shared library to prevent 97 // code bloat from every user program defining the vtable for these exception 98 // types. 99 // 100 // Note that when exceptions are disabled, the methods that normally throw 101 // these exceptions can be used even on older deployment targets, but those 102 // methods will abort instead of throwing. 103// # define _LIBCPP_AVAILABILITY_HAS_NO_BAD_OPTIONAL_ACCESS 104# define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS 105 106// # define _LIBCPP_AVAILABILITY_HAS_NO_BAD_VARIANT_ACCESS 107# define _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS 108 109// # define _LIBCPP_AVAILABILITY_HAS_NO_BAD_ANY_CAST 110# define _LIBCPP_AVAILABILITY_BAD_ANY_CAST 111 112 // This controls the availability of std::uncaught_exceptions(). 113// # define _LIBCPP_AVAILABILITY_HAS_NO_UNCAUGHT_EXCEPTIONS 114# define _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS 115 116 // This controls the availability of the sized version of ::operator delete, 117 // ::operator delete[], and their align_val_t variants, which were all added 118 // in C++17, and hence not present in early dylibs. 119// # define _LIBCPP_AVAILABILITY_HAS_NO_SIZED_NEW_DELETE 120# define _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE 121 122 // This controls the availability of the std::future_error exception. 123 // 124 // Note that when exceptions are disabled, the methods that normally throw 125 // std::future_error can be used even on older deployment targets, but those 126 // methods will abort instead of throwing. 127// # define _LIBCPP_AVAILABILITY_HAS_NO_FUTURE_ERROR 128# define _LIBCPP_AVAILABILITY_FUTURE_ERROR 129 130 // This controls the availability of std::type_info's vtable. 131 // I can't imagine how using std::type_info can work at all if 132 // this isn't supported. 133// # define _LIBCPP_AVAILABILITY_HAS_NO_TYPEINFO_VTABLE 134# define _LIBCPP_AVAILABILITY_TYPEINFO_VTABLE 135 136 // This controls the availability of std::locale::category members 137 // (e.g. std::locale::collate), which are defined in the dylib. 138// # define _LIBCPP_AVAILABILITY_HAS_NO_LOCALE_CATEGORY 139# define _LIBCPP_AVAILABILITY_LOCALE_CATEGORY 140 141 // This controls the availability of atomic operations on std::shared_ptr 142 // (e.g. `std::atomic_store(std::shared_ptr)`), which require a shared 143 // lock table located in the dylib. 144// # define _LIBCPP_AVAILABILITY_HAS_NO_ATOMIC_SHARED_PTR 145# define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR 146 147 // These macros control the availability of all parts of <filesystem> that 148 // depend on something in the dylib. 149// # define _LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM 150# define _LIBCPP_AVAILABILITY_FILESYSTEM 151# define _LIBCPP_AVAILABILITY_FILESYSTEM_PUSH 152# define _LIBCPP_AVAILABILITY_FILESYSTEM_POP 153 154 // This controls the availability of floating-point std::to_chars functions. 155 // These overloads were added later than the integer overloads. 156// # define _LIBCPP_AVAILABILITY_HAS_NO_TO_CHARS_FLOATING_POINT 157# define _LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT 158 159 // This controls the availability of the C++20 synchronization library, 160 // which requires shared library support for various operations 161 // (see libcxx/src/atomic.cpp). This includes <barier>, <latch>, 162 // <semaphore>, and notification functions on std::atomic. 163// # define _LIBCPP_AVAILABILITY_HAS_NO_SYNC 164# define _LIBCPP_AVAILABILITY_SYNC 165 166 // This controls whether the library claims to provide a default verbose 167 // termination function, and consequently whether the headers will try 168 // to use it when the mechanism isn't overriden at compile-time. 169// # define _LIBCPP_AVAILABILITY_HAS_NO_VERBOSE_ABORT 170# define _LIBCPP_AVAILABILITY_VERBOSE_ABORT 171 172#elif defined(__APPLE__) 173 174 // shared_mutex and shared_timed_mutex 175# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101200) || \ 176 (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 100000) || \ 177 (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 100000) || \ 178 (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 30000) 179# define _LIBCPP_AVAILABILITY_HAS_NO_SHARED_MUTEX 180# endif 181# define _LIBCPP_AVAILABILITY_SHARED_MUTEX \ 182 __attribute__((availability(macos,strict,introduced=10.12))) \ 183 __attribute__((availability(ios,strict,introduced=10.0))) \ 184 __attribute__((availability(tvos,strict,introduced=10.0))) \ 185 __attribute__((availability(watchos,strict,introduced=3.0))) 186 187 // bad_optional_access, bad_variant_access and bad_any_cast 188 // Note: bad_optional_access & friends were not introduced in the matching 189 // macOS and iOS versions, so the version mismatch between macOS and others 190 // is intended. 191# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101300) || \ 192 (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 120000) || \ 193 (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 120000) || \ 194 (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 50000) 195# define _LIBCPP_AVAILABILITY_HAS_NO_BAD_OPTIONAL_ACCESS 196# define _LIBCPP_AVAILABILITY_HAS_NO_BAD_VARIANT_ACCESS 197# define _LIBCPP_AVAILABILITY_HAS_NO_BAD_ANY_CAST 198# endif 199# define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS \ 200 __attribute__((availability(macos,strict,introduced=10.13))) \ 201 __attribute__((availability(ios,strict,introduced=12.0))) \ 202 __attribute__((availability(tvos,strict,introduced=12.0))) \ 203 __attribute__((availability(watchos,strict,introduced=5.0))) 204# define _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS \ 205 _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS 206# define _LIBCPP_AVAILABILITY_BAD_ANY_CAST \ 207 _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS 208 209 // uncaught_exceptions 210# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101200) || \ 211 (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 100000) || \ 212 (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 100000) || \ 213 (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 30000) 214# define _LIBCPP_AVAILABILITY_HAS_NO_UNCAUGHT_EXCEPTIONS 215# endif 216# define _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS \ 217 __attribute__((availability(macos,strict,introduced=10.12))) \ 218 __attribute__((availability(ios,strict,introduced=10.0))) \ 219 __attribute__((availability(tvos,strict,introduced=10.0))) \ 220 __attribute__((availability(watchos,strict,introduced=3.0))) 221 222 // sized operator new and sized operator delete 223# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101200) || \ 224 (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 100000) || \ 225 (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 100000) || \ 226 (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 30000) 227# define _LIBCPP_AVAILABILITY_HAS_NO_SIZED_NEW_DELETE 228# endif 229# define _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE \ 230 __attribute__((availability(macos,strict,introduced=10.12))) \ 231 __attribute__((availability(ios,strict,introduced=10.0))) \ 232 __attribute__((availability(tvos,strict,introduced=10.0))) \ 233 __attribute__((availability(watchos,strict,introduced=3.0))) 234 235 // future_error 236# if (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 60000) 237# define _LIBCPP_AVAILABILITY_HAS_NO_FUTURE_ERROR 238# endif 239# define _LIBCPP_AVAILABILITY_FUTURE_ERROR \ 240 __attribute__((availability(ios,strict,introduced=6.0))) 241 242 // type_info's vtable 243# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 100900) || \ 244 (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 70000) 245# define _LIBCPP_AVAILABILITY_HAS_NO_TYPEINFO_VTABLE 246# endif 247# define _LIBCPP_AVAILABILITY_TYPEINFO_VTABLE \ 248 __attribute__((availability(macos,strict,introduced=10.9))) \ 249 __attribute__((availability(ios,strict,introduced=7.0))) 250 251 // locale::category 252# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 100900) || \ 253 (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 70000) 254# define _LIBCPP_AVAILABILITY_HAS_NO_LOCALE_CATEGORY 255# endif 256# define _LIBCPP_AVAILABILITY_LOCALE_CATEGORY \ 257 __attribute__((availability(macos,strict,introduced=10.9))) \ 258 __attribute__((availability(ios,strict,introduced=7.0))) 259 260 // atomic operations on shared_ptr 261# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 100900) || \ 262 (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 70000) 263# define _LIBCPP_AVAILABILITY_HAS_NO_ATOMIC_SHARED_PTR 264# endif 265# define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR \ 266 __attribute__((availability(macos,strict,introduced=10.9))) \ 267 __attribute__((availability(ios,strict,introduced=7.0))) 268 269 // <filesystem> 270# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101500) || \ 271 (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 130000) || \ 272 (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 130000) || \ 273 (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 60000) 274# define _LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM 275# endif 276# define _LIBCPP_AVAILABILITY_FILESYSTEM \ 277 __attribute__((availability(macos,strict,introduced=10.15))) \ 278 __attribute__((availability(ios,strict,introduced=13.0))) \ 279 __attribute__((availability(tvos,strict,introduced=13.0))) \ 280 __attribute__((availability(watchos,strict,introduced=6.0))) 281# define _LIBCPP_AVAILABILITY_FILESYSTEM_PUSH \ 282 _Pragma("clang attribute push(__attribute__((availability(macos,strict,introduced=10.15))), apply_to=any(function,record))") \ 283 _Pragma("clang attribute push(__attribute__((availability(ios,strict,introduced=13.0))), apply_to=any(function,record))") \ 284 _Pragma("clang attribute push(__attribute__((availability(tvos,strict,introduced=13.0))), apply_to=any(function,record))") \ 285 _Pragma("clang attribute push(__attribute__((availability(watchos,strict,introduced=6.0))), apply_to=any(function,record))") 286# define _LIBCPP_AVAILABILITY_FILESYSTEM_POP \ 287 _Pragma("clang attribute pop") \ 288 _Pragma("clang attribute pop") \ 289 _Pragma("clang attribute pop") \ 290 _Pragma("clang attribute pop") 291 292 // std::to_chars(floating-point) 293# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 130300) || \ 294 (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 160300) || \ 295 (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 160300) || \ 296 (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 90300) 297# define _LIBCPP_AVAILABILITY_HAS_NO_TO_CHARS_FLOATING_POINT 298# endif 299# define _LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT \ 300 __attribute__((availability(macos,strict,introduced=13.3))) \ 301 __attribute__((availability(ios,strict,introduced=16.3))) \ 302 __attribute__((availability(tvos,strict,introduced=16.3))) \ 303 __attribute__((availability(watchos,strict,introduced=9.3))) 304 305 // c++20 synchronization library 306# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 110000) || \ 307 (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 140000) || \ 308 (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 140000) || \ 309 (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 70000) 310# define _LIBCPP_AVAILABILITY_HAS_NO_SYNC 311# endif 312# define _LIBCPP_AVAILABILITY_SYNC \ 313 __attribute__((availability(macos,strict,introduced=11.0))) \ 314 __attribute__((availability(ios,strict,introduced=14.0))) \ 315 __attribute__((availability(tvos,strict,introduced=14.0))) \ 316 __attribute__((availability(watchos,strict,introduced=7.0))) 317 318 // __libcpp_verbose_abort 319# if 1 // TODO: Update once this is released 320# define _LIBCPP_AVAILABILITY_HAS_NO_VERBOSE_ABORT 321# endif 322# define _LIBCPP_AVAILABILITY_VERBOSE_ABORT \ 323 __attribute__((unavailable)) 324 325#else 326 327// ...New vendors can add availability markup here... 328 329# error "It looks like you're trying to enable vendor availability markup, but you haven't defined the corresponding macros yet!" 330 331#endif 332 333// Define availability attributes that depend on _LIBCPP_HAS_NO_EXCEPTIONS. 334// Those are defined in terms of the availability attributes above, and 335// should not be vendor-specific. 336#if defined(_LIBCPP_HAS_NO_EXCEPTIONS) 337# define _LIBCPP_AVAILABILITY_FUTURE 338# define _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST 339# define _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS 340# define _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS 341#else 342# define _LIBCPP_AVAILABILITY_FUTURE _LIBCPP_AVAILABILITY_FUTURE_ERROR 343# define _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST _LIBCPP_AVAILABILITY_BAD_ANY_CAST 344# define _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS 345# define _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS 346#endif 347 348#endif // _LIBCPP___AVAILABILITY 349