Boost logo

Boost Users :

Subject: Re: [Boost-users] boost and std collisons in c++0x
From: Michael Fawcett (michael.fawcett_at_[hidden])
Date: 2009-02-05 15:09:49


On Thu, Feb 5, 2009 at 2:55 PM, Sergey Sadovnikov
<flex_ferrum_at_[hidden]> wrote:
>
> From the common point of view I completely agree with your opinion. But
> now we are talking about fundamental language libraries. I think it
> looks too strange if, for example, C# source code contains something
> like:
>
> System.String str = "blah-blah-blah";
> System.Console.WriteLine(str);
> //...
> System.Collections.Generic.List<int> some_list = new
> System.Collections.Generic.List<int>();
>
> :) Because standard C# file template contains at least three usings
> (System, System.Collections.Generic and System.Text)

We're getting off-topic, but I couldn't resist.

What happens when I do:

using System.Drawing;
using Microsoft.XNA.Framework;

Point p = new Point(); // Doh!

You see, these problems occur in C# too, and the same answer (from
C++) is given as to how to correct the issue. Make a namespace alias,
or use full qualification.

If you want to use boost, use boost::. If you want to use the STD
library, use std::.

--Michael Fawcett


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net