Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions include/boost/config/compiler/visualc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,11 @@
#define BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS
#endif

#if _MSC_FULL_VER >= 192829913
// Works with /std:c++14 and /std:c++17, and performs optimization
#define BOOST_ATTRIBUTE_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]]
#endif

//
// Things that don't work in clr mode:
//
Expand Down
4 changes: 2 additions & 2 deletions include/boost/config/detail/suffix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1097,15 +1097,15 @@ namespace std{ using ::type_info; }
#if __has_attribute(nodiscard)
# define BOOST_ATTRIBUTE_NODISCARD [[nodiscard]]
#endif
#if __has_attribute(no_unique_address)
#if __has_attribute(no_unique_address) && !defined(BOOST_ATTRIBUTE_NO_UNIQUE_ADDRESS)
# define BOOST_ATTRIBUTE_NO_UNIQUE_ADDRESS [[no_unique_address]]
#endif
#elif defined(__has_cpp_attribute)
// clang-6 accepts [[nodiscard]] with -std=c++14, but warns about it -pedantic
#if __has_cpp_attribute(nodiscard) && !(defined(__clang__) && (__cplusplus < 201703L)) && !(defined(__GNUC__) && (__cplusplus < 201100))
# define BOOST_ATTRIBUTE_NODISCARD [[nodiscard]]
#endif
#if __has_cpp_attribute(no_unique_address) && !(defined(__GNUC__) && (__cplusplus < 201100))
#if __has_cpp_attribute(no_unique_address) && !(defined(__GNUC__) && (__cplusplus < 201100)) && !defined(BOOST_ATTRIBUTE_NO_UNIQUE_ADDRESS)
# define BOOST_ATTRIBUTE_NO_UNIQUE_ADDRESS [[no_unique_address]]
#endif
#endif
Expand Down
Loading