Yarp: "using namespace std" directive in several headers

Created on 28 Jun 2017  路  6Comments  路  Source: robotology/yarp

i found the directive using namespace std; in 21 headers (libYARP_manager and yarpmanager plus one in the mainwindow.h of yarpdataplayer).

this can cause several problem.. for instance by including vector or map in ResurceFinder.h arise some ambiguities between std and libYARP_OS.

YARP v2.3.70 GUI - yarpdataplayer GUI - yarpmanager

Most helpful comment

I totally agree.
using namespace (in general, not only std) should be prohibited at least in library headers.

All 6 comments

I totally agree.
using namespace (in general, not only std) should be prohibited at least in library headers.

should --> must be prohibited! Please fix all library header files which contain the using directive.

Fixed by #1294

it's not compiling... just fixing

the problem was present only in devel after merging.
Fixed.

@pattacini Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xEnVrE picture xEnVrE  路  3Comments

jeljaik picture jeljaik  路  3Comments

Nicogene picture Nicogene  路  3Comments

traversaro picture traversaro  路  3Comments

diegoferigo picture diegoferigo  路  3Comments