diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-03-13 07:21:50 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-03-13 07:21:50 +0000 |
commit | e37f484ab9a65ce4e5f90adcfa20add4215e0783 (patch) | |
tree | f237ca4abc197242dadacbf18a2dff9f62230985 /test/CXX | |
parent | 7c5d28b6342229fb648aea59dc063f67ff16bc81 (diff) |
Implement [temp.param]p5: the top-level cv-qualifiers on a non-type template
parameter's declaration are ignored when determining the parameter's type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152619 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CXX')
-rw-r--r-- | test/CXX/temp/temp.param/p5.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CXX/temp/temp.param/p5.cpp b/test/CXX/temp/temp.param/p5.cpp new file mode 100644 index 0000000000..3cbb3b7c01 --- /dev/null +++ b/test/CXX/temp/temp.param/p5.cpp @@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -verify %s -std=c++11 + +template<const int I> struct S { + decltype(I) n; + int &&r = I; +}; +S<5> s; + +template<typename T, T v> struct U { + decltype(v) n; + int &&r = v; +}; +U<const int, 6> u; |