diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/template/arg3.C')
-rw-r--r-- | gcc/testsuite/g++.dg/template/arg3.C | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/arg3.C b/gcc/testsuite/g++.dg/template/arg3.C new file mode 100644 index 000000000..050aa33bc --- /dev/null +++ b/gcc/testsuite/g++.dg/template/arg3.C @@ -0,0 +1,17 @@ +// { dg-do compile } + +// Copyright (C) 2003 Free Software Foundation, Inc. +// Contributed by Nathan Sidwell 27 Mar 2003 <nathan@codesourcery.com> + +// PR 10224. Rejected a valid constant argument. + +template <bool B> struct X { + struct I {}; +}; + +template <typename T> struct Y { + static const bool selector = true; + typedef typename X<selector>::I helper; +}; + +Y<int> i; |