[Top][All Lists]

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

Re: gnulib and C++

From: Bruno Haible
Subject: Re: gnulib and C++
Date: Sat, 20 Feb 2010 19:54:22 +0100
User-agent: KMail/1.9.9

Hi John,

> But how about the following example?  Does it have all the required
> features?  It seems to work for me

Indeed, it works for me too. Apparently it was the
'using namespace gnulib_system_namespace;' that collided with
'using gnulib::open;'.

But there's a big caveat: I don't know whether including system
headers inside a namespace

  namespace gnulib_system_namespace {
  #include <fcntl.h>

is portable or not. There are several ways in which this can fail:
  - system headers that don't support this,
  - system headers that are included by 3rd-party library headers.

Until you have made a large-scale test of this approach, on an entire package,
I would not recommend it.


reply via email to

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