diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-04-04 23:09:20 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-04-04 23:09:20 +0000 |
commit | 5b4bf13761303978c22f67984b4548379a189166 (patch) | |
tree | dbf0f8f0d6526e8df04227c824c7e73a4d6de49d /test/SemaCXX | |
parent | 3953911de1e81aec780c00102b39a2bfac8f4734 (diff) |
Allow a conversion from the empty initializer list {} to an
std::initializer_list<T> so long as <T> is known. This conversion has
identity rank.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154065 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX')
-rw-r--r-- | test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp b/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp index 3437849f93..7384309f97 100644 --- a/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp +++ b/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp @@ -166,3 +166,12 @@ namespace Decay { for( auto s : {"A", "BB", "CCC", "DDD"}) { } } } + +namespace PR12436 { + struct X { + template<typename T> + X(std::initializer_list<int>, T); + }; + + X x({}, 17); +} |