summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/InitPreprocessor.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2017-02-14 00:25:28 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2017-02-14 00:25:28 +0000
commit32918776561cf298c1f76b3d1812a9698cd94a20 (patch)
tree8391eb0285fac7d680fc7bc9be224a3f84cd0bfa /clang/lib/Frontend/InitPreprocessor.cpp
parent075276218096f0386590a1eaff1e742b4264d75c (diff)
downloadbcm5719-llvm-32918776561cf298c1f76b3d1812a9698cd94a20.tar.gz
bcm5719-llvm-32918776561cf298c1f76b3d1812a9698cd94a20.zip
[c++1z] Synthesize implicit deduction guides from constructors on demand. Rank
such guides below explicit ones, and ensure that references to the class's template parameters are not treated as forwarding references. We make a few tweaks to the wording in the current standard: 1) The constructor parameter list is copied faithfully to the deduction guide, without losing default arguments or a varargs ellipsis (which the standard wording loses by omission). 2) If the class template declares no constructors, we add a T() -> T<...> guide (which will only ever work if T has default arguments for all non-pack template parameters). 3) If the class template declares nothing that looks like a copy or move constructor, we add a T(T<...>) -> T<...> guide. #2 and #3 follow from the "pretend we had a class type with these constructors" philosophy for deduction guides. llvm-svn: 295007
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud