[GRASS-dev] Compiling r.viewshed and r.terraflow with C++11

Vaclav Petras wenzeslaus at gmail.com
Fri Dec 13 11:01:06 PST 2013


On Fri, Dec 13, 2013 at 7:11 AM, Glynn Clements <glynn at gclements.plus.com>wrote:

>
> Vaclav Petras wrote:
>
> > > The right fix is to remove all occurrences of "using namespace std;",
> > > then fix the (probably hundreds) of errors which arise, either by
> > > using qualified names (e.g. std::vector) or by adding "using"
> > > statements for individual names (e.g. "using std::vector;").
> > >
> > > I tried to delete all "using namespace std;" but the error "
> > reference...ambiguous" was still there in slightly different form
>
> The issue was also present in the libiostream headers used by
> r.terraflow and r.viewshed.
>
> Try r58455.
>

Thanks Glynn, I haven't noticed GRASS libiostream. Now it compiles (make
distclean && make). Tested with clang on Ubuntu and Mac.

Vaclav

For the record: r58434 is reverted in r58455 because r58455 makes r58434
unnecessary.

[r58434] https://trac.osgeo.org/grass/changeset/58434
[r58455] https://trac.osgeo.org/grass/changeset/58455

By the way, grepping "using namespace" now returns:

./imagery/i.atcorr/common.h:14:using namespace std;
./lib/iostream/mm_utils.cpp:41:using namespace std;
./lib/iostream/mm.cpp:44:using namespace std;


> --
> Glynn Clements <glynn at gclements.plus.com>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20131213/0b51ed25/attachment.html>


More information about the grass-dev mailing list