From b3d96882ec01a0c98e447b392f20a5d25f77a0ce Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Mon, 23 May 2016 17:21:55 +0000 Subject: Clang support for __is_assignable intrinsic MSVC now supports the __is_assignable type trait intrinsic, to enable easier and more efficient implementation of the Standard Library's is_assignable trait. As of Visual Studio 2015 Update 3, the VC Standard Library implementation uses the new intrinsic unconditionally. The implementation is pretty straightforward due to the previously existing is_nothrow_assignable and is_trivially_assignable. We handle __is_assignable via the same code as the other two except that we skip the extra checks for nothrow or triviality. Patch by Dave Bartolomeo! Differential Revision: http://reviews.llvm.org/D20492 llvm-svn: 270458 --- clang/test/Lexer/has_feature_type_traits.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'clang/test/Lexer') diff --git a/clang/test/Lexer/has_feature_type_traits.cpp b/clang/test/Lexer/has_feature_type_traits.cpp index f772d6d1845..6636e7b3963 100644 --- a/clang/test/Lexer/has_feature_type_traits.cpp +++ b/clang/test/Lexer/has_feature_type_traits.cpp @@ -45,6 +45,11 @@ int is_abstract(); #endif // CHECK: int is_abstract(); +#if __has_feature(is_assignable) +int is_assignable(); +#endif +// CHECK: int is_assignable(); + #if __has_feature(is_base_of) int is_base_of(); #endif -- cgit v1.2.3