[LLVMdev] name collision - llvm::tie and boost::tie

Chris Lattner sabre at nondot.org
Thu Sep 22 08:12:49 PDT 2005


On Thu, 22 Sep 2005, Tzu-Chien Chiu wrote:

> On 22/09/05, Bill Wendling <isanbard at gmail.com> wrote:
>> Couldn't you state the explicit namespaces. So not using "using
>> namespace llvm" and instead prefix all calls with "llvm::"?
>
> The header files in boost do not use fully-qualified tie(). I probably
> should not modify them. But my .cpp file #include them.

That should be fine if they are in a namespace boost {}.

> I hope I could "using namespace"  boost and llvm in .cpp file, because
> it's tedious to use fully-qualified identifiers in boost and llvm
> namespace.

Add:

using boost::somethingyoucareabout;
using boost::somethingelseyoucareabout;
using namespace llvm;

Or whatever you prefer.  This way you only import the symbols you want.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/




More information about the llvm-dev mailing list