View Issue Details

IDProjectCategoryView StatusLast Update
0005531Open CASCADEOCCT:Foundation Classespublic2020-10-15 07:48
ReporterapoAssigned Totizmaylo 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
OSAll 
Fixed in Version7.4.0 
Summary0005531: Foundation classes - it is impossible avoid "using namespace std" directive when use OCC
DescriptionIn this case there is follow problems.

1. There is dependecies from order of included header files.

2. There is possibility of name conflict with different from std namespaces.

In other words, definition of using some namespace directive must be inside
other namespace or take place in source code, not header files.
 
I suggest to solve the problem like is written in
Bjarne Straustrap"The C++ programming languige", 3-th edition, in 8.2.9.1 paragraf
TagsNo tags attached.
Test case numberNot required

Relationships

related to 0008239 closedbugmaster Foundation Classes - directive "using namespace std" doesn't allow to build application with OCC and other 3rd party libraries 
related to 0030895 closedbugmaster Coding Rules - specify std namespace explicitly for std::cout and streams 

Activities

apv

2017-09-08 12:17

tester   ~0070338

Problem described in issue is reproduced on current state of OCCT.

abv

2020-10-15 07:48

manager   ~0095985

The remaining uses of objects from std:: namespace without prefix have been fixed within 0030895, and remaining "using" directives for std namespace have been removed from OCCT header files in 0008239.

Issue History

Date Modified Username Field Change
2004-03-26 19:08 bugmaster Assigned To bugmaster => imv
2004-03-26 19:08 bugmaster Status new => assigned
2004-03-29 11:36 bugmaster Status assigned => closed
2004-03-29 11:36 bugmaster Resolution @0@ => suspended
2004-03-29 11:36 bugmaster validate => 1
2011-08-02 11:31 bugmaster Category OCCT:MOA => OCCT:Modeling Algorithms
2017-09-08 12:17 apv Test case number => Not required
2017-09-08 12:17 apv Note Added: 0070338
2017-09-08 12:17 apv Category OCCT:Modeling Algorithms => OCCT:Foundation Classes
2017-09-08 12:17 apv Fixed in Version EMPTY =>
2017-09-08 12:17 apv Description Updated
2019-07-18 18:56 kgv Relationship added related to 0008239
2019-07-21 12:24 tizmaylo Summary It is impossible avoid "using namespace std" directive when use OCC => Foundation classes - it is impossible avoid "using namespace std" directive when use OCC
2020-10-15 07:46 abv Relationship added related to 0030895
2020-10-15 07:48 abv Note Added: 0095985
2020-10-15 07:48 abv Assigned To imv => tizmaylo
2020-10-15 07:48 abv Severity trivial => minor
2020-10-15 07:48 abv Status acknowledged => closed
2020-10-15 07:48 abv Resolution suspended => fixed
2020-10-15 07:48 abv Fixed in Version => 7.4.0