diff options
author | Mark Mitchell <mark@codesourcery.com> | 2005-09-12 19:00:57 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2005-09-12 19:00:57 +0000 |
commit | c8b3a7929b6b0a961c8dd4c69b89649f07ffe72b (patch) | |
tree | eb4a52883c5d52a526f6c4310a540a25303ef214 /gcc | |
parent | ef3381664e516d137c80ebbf48c085220d5810ab (diff) | |
download | gcc-c8b3a7929b6b0a961c8dd4c69b89649f07ffe72b.zip gcc-c8b3a7929b6b0a961c8dd4c69b89649f07ffe72b.tar.gz gcc-c8b3a7929b6b0a961c8dd4c69b89649f07ffe72b.tar.bz2 |
re PR c++/23691 (`mpl_::bool_<false>::value' is not a valid template argument for type `bool' because it is a non-constant expression)
PR c++/23691
* g++.dg/template/static16.C: New test.
From-SVN: r104186
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/template/static16.C | 20 |
2 files changed, 25 insertions, 5 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 434e539..f8ba4db 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-09-12 Mark Mitchell <mark@codesourcery.com> + + PR c++/23691 + * g++.dg/template/static16.C: New test. + 2005-09-12 Josh Conner <jconner@apple.com> PR middle-end/23237 @@ -103,11 +108,6 @@ PR fortran/23765 * gfortran.dg/common_6.f90: New test. -2005-09-08 Mark Mitchell <mark@codesourcery.com> - - PR c++/23691 - * g++.dg/template/static16.C: New test. - 2005-09-08 Richard Sandiford <richard@codesourcery.com> PR fortran/15326 diff --git a/gcc/testsuite/g++.dg/template/static16.C b/gcc/testsuite/g++.dg/template/static16.C new file mode 100644 index 0000000..f33ac3a --- /dev/null +++ b/gcc/testsuite/g++.dg/template/static16.C @@ -0,0 +1,20 @@ +// PR c++/23691 + +namespace std { + class type_info { + bool operator==(const type_info& __arg) const; + }; +} +template <class T, T val> struct integral_constant { + static const T value = val; +}; +template< typename T > struct is_integral : integral_constant<bool,false> {}; +template <bool B> struct enable_if_c {}; +template<typename Functor> +typename enable_if_c<(is_integral<Functor>::value)>::type +operator==(const int& f, Functor g); +template<class D> +int get_deleter( std::type_info const & ti ) +{ + return ti == typeid(D); +} |