help-octave
[Top][All Lists]
Advanced

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

Re: pkg: sockets-1.0.2.tar.gz


From: Michael Goffioul
Subject: Re: pkg: sockets-1.0.2.tar.gz
Date: Thu, 18 Oct 2007 09:41:04 +0200

On 10/18/07, Tatsuro MATSUOKA <address@hidden> wrote:
> Hello John
> Thank you for your reply.
>
> I am using gcc 3.4.4 on cygwin but specially configured with 
> --dissabel-sjlj-expeptions.
>
> I looked in the file 'sockets.cc'
>
>  '::close'
>
> The class name is unspecified.
> The namespace is defined for std (but it may be usual coding) .
> What is the default class on this case ?

This is the standard way to access the global namespace in
C++. For instance, consider this code

class A
{
public:
    void close(int fd)
    {
        ::close(fd);
    }
};

Without the 2 colons, the compiler would interpret this as a
recursion (close would call itself). The :: tells the compiler to
use the close function from the global namespace (which is
unnamed; hence it's left empty).

Michael.


reply via email to

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