monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] [PATCH] scope fix for dump() inside sanity.hh


From: Nathaniel Smith
Subject: Re: [Monotone-devel] [PATCH] scope fix for dump() inside sanity.hh
Date: Thu, 26 Jan 2006 15:29:05 -0800
User-agent: Mutt/1.5.11

On Thu, Jan 26, 2006 at 03:49:53PM +0100, Stéphane Gimenez wrote:
> --- sanity.hh d2494fb0f9188882227ca0ce6584efadb48fbb8b
> +++ sanity.hh ef8ef5e7d48f661c3c75259b6bf206a0c8fd2249
> @@ -279,6 +279,8 @@
>    T const & obj;
>  };
>  
> +void dump(std::string const & obj, std::string & out);
> +
>  // The header line must be printed into the "out" string before
>  // dump() is called.
>  // This is so that even if the call to dump() throws an error,
> @@ -314,6 +316,5 @@
>  #define MM(obj) /* */ 
>  #endif
>  
> -void dump(std::string const & obj, std::string & out);
>  
>  #endif // __SANITY_HH__

Does anyone understand _why_ this matters?  Surely a template can
refer to functions that are not declared when the template is
defined -- especially when those functions are resolved based on the
template type?

I'm worried because there are lots of dump() overloads, and if this
one has to be declared before we define Musing<T>::gasp, then what
about the others?

-- Nathaniel

-- 
"...All of this suggests that if we wished to find a modern-day model
for British and American speech of the late eighteenth century, we could
probably do no better than Yosemite Sam."




reply via email to

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