Add ASAN detection macro (BOOST_CONTAINER_ASAN)

This commit is contained in:
Ion Gaztañaga
2018-09-26 01:09:44 +02:00
parent d242914572
commit 1e509c308e

View File

@@ -108,4 +108,15 @@
#define BOOST_CONTAINER_FORCEINLINE BOOST_FORCEINLINE
#endif
#if !defined(__has_feature)
#define BOOST_CONTAINER_HAS_FEATURE(feature) 0
#else
#define BOOST_CONTAINER_HAS_FEATURE(feature) __has_feature(feature)
#endif
//Detect address sanitizer
#if defined(__SANITIZE_ADDRESS__) || BOOST_CONTAINER_HAS_FEATURE(address_sanitizer)
#define BOOST_CONTAINER_ASAN
#endif
#endif //#ifndef BOOST_CONTAINER_DETAIL_WORKAROUND_HPP