]> granicus.if.org Git - clang/commit
Teach the evaluation of the __is_convertible_to trait to translate
authorDouglas Gregor <dgregor@apple.com>
Thu, 27 Jan 2011 22:31:44 +0000 (22:31 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 27 Jan 2011 22:31:44 +0000 (22:31 +0000)
commit1eee5dc0465c0ab4810e21d365e881152d7f53c0
treee1bfa3ceb9e43935af8bb55969d8ee14d0c79508
parent1e4162fb02058324d4866763f1be8d69a54f3b7c
Teach the evaluation of the __is_convertible_to trait to translate
access control errors into SFINAE errors, so that the trait provides
enough support to implement the C++0x std::is_convertible type trait.

To get there, the SFINAETrap now knows how to set up a SFINAE context
independent of any template instantiations or template argument
deduction steps, and (separately) can set a Sema flag to translate
access control errors into SFINAE errors. The latter can also be
useful if we decide that access control errors during template argument
deduction should cause substitution failure (rather than a hard error)
as has been proposed for C++0x.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124446 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Sema/Sema.h
lib/Sema/Sema.cpp
lib/Sema/SemaExprCXX.cpp
lib/Sema/SemaTemplateInstantiate.cpp
test/SemaCXX/type-traits.cpp