This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++/7136: Template constants deduction


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/
 
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]