[Top][All Lists]

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

Re: Reason for ::error calls?

From: John W. Eaton
Subject: Re: Reason for ::error calls?
Date: Wed, 05 Aug 2015 16:45:16 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0

On 08/05/2015 04:18 PM, rik wrote:


I am seeing a lot of mixed calling conventions for the error function in
libinterp.  Some of the time the function is called as '::error' and other
times it is the bare word 'error'.  As an example, ov-fcn-handle.cc:85 uses
'::error', but all other instances in the same file use just 'error'.
Since the C++ files are using '#include "error.h"' they should be getting
the prototypes they need.  Is there a reason not to simplify a lot of these
instances by removing the '::' operator?

I think the reason for having ::error in member functions was that sometimes the class might have defined a member function with the name error (either directly or in a parent class). If that's not the case for a class now, then I'd say go ahead and remove the "::".


reply via email to

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