On Tue, May 10, 2005 at 09:58:34PM -0400, Steve M. Robbins wrote:
> On Mon, May 09, 2005 at 09:59:43AM +0200, martin f krafft wrote:
> 
> > Some of us like to use -Werror. Some of boost does not. 
> 
> That's a little cryptic.  ;-)

no, it isn't :)

> I assume you're saying that some boost code generates a warning.  
> What warning?

a warning about unused variable, i suppose :)

> > diff -u /tmp/interface_oarchive.hpp 
> > /usr/include/boost/archive/detail/interface_oarchive.hpp
> > --- /tmp/interface_oarchive.hpp 2005-05-09 09:54:24.897652747 +0200
> > +++ /usr/include/boost/archive/detail/interface_oarchive.hpp  2005-05-09 
> > 09:54:56.611522300 +0200
> > @@ -57,7 +57,7 @@
> >      }
> >  
> >      template<class T>
> > -    const basic_pointer_oserializer * register_type(T * t = NULL){
> > +    const basic_pointer_oserializer * register_type(T * = NULL){
> >          const basic_pointer_oserializer & bpos =
> >              instantiate_pointer_oserializer(
> >                  static_cast<Archive *>(NULL),
> 
> I don't understand how the patched code is legal C++.  

yes, it is. the parameter name is not part of the function signature.

when you declare functions you can always omit the parameters name,
when you define function you can omit only those you are not using.

you can even specify different parameter names in function declaration
and definition.

> The original code defines a templated function "register_type" that
> takes an optional parameter "t" of type "T*".  Is removing the
> parameter name really legal?

definitely yes.

cheers
domenico

-----[ Domenico Andreoli, aka cavok
 --[ http://people.debian.org/~cavok/gpgkey.asc
   ---[ 3A0F 2F80 F79C 678A 8936  4FEE 0677 9033 A20E BC50


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to