QUSIR / staff

Automatically exported from code.google.com/p/staff
Apache License 2.0
0 stars 0 forks source link

Unable to use namespace #180

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Generated service interface template Calculator.h
2.In the Calculator.h, add the line: using namespace std;
3.execute: staff_codegen -u -tcomponent Calculator.h
  error info:
  ERROR 15-08-2012 15:57:25.927 src\main.cpp[304] main: src\CppParser.cpp[1749]: Unknown lexeme: "using": before
-----------------
namespace std;
-----------------
 While parsing Calculator.h[9]

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
revision r699. windows xp

Please provide any additional information below.

Original issue reported on code.google.com by bingqing...@gmail.com on 15 Aug 2012 at 8:19

GoogleCodeExporter commented 9 years ago
Using namespace (especially std) in header file is a *very bad idea*.

This feature will be never supported by staff_codegen.

Original comment by loentar on 15 Aug 2012 at 9:15

GoogleCodeExporter commented 9 years ago
Strange bug in issue tracker. Issue is still visible and with "New" status.

Original comment by loentar on 16 Aug 2012 at 5:15