This is the mail archive of the
gcc-bugs@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: "Philippe A. Bouchard" <philippeb at videotron dot ca>
- Cc: gcc-bugs at gcc dot gnu dot org, <gcc-gnats at gcc dot gnu dot org>
- Date: Thu, 23 Jan 2003 09:03:30 -0600 (CST)
- Subject: Re: c++/7136: Template constants deduction
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/