This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/7136: Template constants deduction
- From: Wolfgang Bangerth <bangerth at ticam dot utexas dot edu>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 23 Jan 2003 15:06:01 -0000
- Subject: Re: c++/7136: Template constants deduction
- Reply-to: Wolfgang Bangerth <bangerth at ticam dot utexas dot edu>
The following reply was made to PR c++/7136; it has been noted by GNATS.
From: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
To: "Philippe A. Bouchard" <philippeb@videotron.ca>
Cc: gcc-bugs@gcc.gnu.org, <gcc-gnats@gcc.gnu.org>
Subject: Re: c++/7136: Template constants deduction
Date: Thu, 23 Jan 2003 09:03:30 -0600 (CST)
On Thu, 23 Jan 2003, Philippe A. Bouchard wrote:
> Yes you're right but the following won't work either under gcc 2.95:
>
> struct Type
> {
> int i;
> };
>
> template <typename _T, int _T::* _I>
> struct Number {};
>
> template <typename _T, int _T::* _I>
> void foo(Number<_T, _I> const &)
> {
> }
>
> int main()
> {
> foo(Number<Type, & Type::i>());
> }
>
> Returns:
> template.cpp: In function `int main()':
> template.cpp:15: no matching function for call to `foo
> (Number<Type,&Type::i>)'
True, but there's not much that we can do about it: that's simply a bug in
gcc2.95 that was fixed in 3.0. gcc2.95 is not maintained any more, so I
fear that you will have to find a workaround for gcc2.95.
W.
-------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth@ticam.utexas.edu
www: http://www.ticam.utexas.edu/~bangerth/