Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008239Open CASCADE[OCCT] OCCT:Foundation Classespublic2005-02-22 10:172017-08-15 12:49
Assigned Toabv 
PlatformOSWindows NTOS Version
Product Version 
Target Version[OCCT] UnscheduledFixed in Version 
Summary0008239: Directive "using namespace std" doesn't allow to build application with OCC and other 3rd party libraries
DescriptionIf custom application uses the OCC and other 3rd party library (for example VTK
or Qt) based on ANSI streams then compiler fails during determination stream
symbols: istream, ostream, ... (compiler error C2872). Directive "using
namespace std" export the all symbol from std namespace into global scope.
Possible solution is not to use directive "using namespace std", but explicitly
specify STL stream symbols (std::ostream) and define preprocessor directive as
namespace prefix name for it.

Enclosed archive (OCC_Streams.tgz) contains example which illustrate proposed
solution with preprocessor directive OCC_STREAM_STD.

Do not hestitate to contact me.

TagsNo tags attached.
Test case number
Attached Filestgz file icon OCC_Streams.tgz (10,240 bytes) 2005-02-22 08:17
tgz file icon Sun_Forte_log.tgz (6,415 bytes) 2005-02-22 12:23

- Relationships

-  Notes
abv (manager)
2014-04-04 06:50

Currently we have a set of uses statements for a set of symbols from std namespace (mostly streams) in Standard_Stream.hxx. This can still cause incompatibilities, thus it might be reasonable to remove these, adding prefix std:: explicitly to all references to these symbols in OCCT code.

- Issue History
Date Modified Username Field Change
2005-02-22 10:19 bugmaster Assigned To bugmaster => imv
2005-02-22 10:19 bugmaster Status new => assigned
2005-02-22 14:24 bugmaster Assigned To imv => stv
2007-07-06 18:22 abv Assigned To stv => abv
2011-08-02 11:23 bugmaster Category OCCT:FDC => OCCT:Foundation Classes
2012-01-19 14:38 atp Fixed in Version EMPTY =>
2012-01-19 14:38 atp Description Updated View Revisions
2014-04-04 06:50 abv Note Added: 0028666
2014-09-12 14:29 abv Target Version => 7.1.0
2016-11-01 06:21 abv Target Version 7.1.0 => 7.2.0
2017-08-15 12:49 abv Target Version 7.2.0 => Unscheduled

Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker