[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [aspell-devel] The two MakeAlwaysEndEnumerationParms template classe

From: Kevin Atkinson
Subject: Re: [aspell-devel] The two MakeAlwaysEndEnumerationParms template classes are
Date: Sun, 06 Feb 2005 21:50:43 -0700 (MST)

On Sun, 6 Feb 2005, Gary Setter wrote:

> In enumeration.hpp, we have two template classes that VC6 can not
> distinguish between. Justifiably, it issues an error. I plan to
> submit a patch to remove the second template, the one that uses
> the first template to make a pointer version. The second template
> is not being used.
> Can anyone tell me why the second was defined?
> The code:
>   template <class Value>
>   struct MakeAlwaysEndEnumerationParms {
>     Value end_state() const {return Value();}
>   };
>   template <class Value>
>   struct MakeAlwaysEndEnumerationParms<Value *> {
>     Value * end_state() const {return 0;}
>   };

It is redundant.  I wrote it before I realized that Value() will be zero 
for integer and pointer types.  Before you remove it make sure that the 
following really is zero with all your compilers, it should be.

  typedef void * Value;
  void * p = Value();


reply via email to

[Prev in Thread] Current Thread [Next in Thread]