Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
KWSys
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Utils
KWSys
Commits
0b48bc1d
Commit
0b48bc1d
authored
18 years ago
by
Mathieu Malaterre
Browse files
Options
Downloads
Patches
Plain Diff
BUG: Remove stringstream implementation, this was a wrong interface anyway.
parent
119e89c2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
kwsys_ios_sstream.h.in
+2
-14
2 additions, 14 deletions
kwsys_ios_sstream.h.in
testIOS.cxx
+1
-30
1 addition, 30 deletions
testIOS.cxx
with
3 additions
and
44 deletions
kwsys_ios_sstream.h.in
+
2
−
14
View file @
0b48bc1d
...
...
@@ -64,7 +64,6 @@ using @KWSYS_NAMESPACE@_ios_namespace::ostream;
using @KWSYS_NAMESPACE@_ios_namespace::istream;
using @KWSYS_NAMESPACE@_ios_namespace::istrstream;
using @KWSYS_NAMESPACE@_ios_namespace::ostrstream;
using @KWSYS_NAMESPACE@_ios_namespace::strstream;
using @KWSYS_NAMESPACE@_ios_namespace::ios;
using @KWSYS_NAMESPACE@_ios_namespace::endl;
using @KWSYS_NAMESPACE@_ios_namespace::ends;
...
...
@@ -92,9 +91,9 @@ public:
{
ostringstream_cleanup cleanup(*this);
ostringstream_cleanup::IgnoreUnusedVariable(cleanup);
int count = this->pcount();
int
p
count = this->pcount();
const char* ptr = this->Superclass::str();
return kwsys_stl::string(ptr?ptr:"", count);
return kwsys_stl::string(ptr?ptr:"",
p
count);
}
void str(const kwsys_stl::string& s)
{
...
...
@@ -135,17 +134,6 @@ private:
# pragma warning (pop)
#endif
class stringstream: public istringstream, public ostringstream
{
public:
stringstream():istringstream(),ostringstream() {}
kwsys_stl::string str() const { return istringstream::str(); }
kwsys_stl::string str() { return ostringstream::str(); }
private:
stringstream(const stringstream&);
void operator=(const stringstream&);
};
} // namespace @KWSYS_NAMESPACE@_ios
#endif
...
...
This diff is collapsed.
Click to expand it.
testIOS.cxx
+
1
−
30
View file @
0b48bc1d
...
...
@@ -13,37 +13,8 @@
int
main
()
{
const
char
refstring
[]
=
"Hello, World!"
;
kwsys_ios
::
ostringstream
ostr
;
ostr
<<
refstring
;
ostr
<<
"Hello, World!"
;
kwsys_ios
::
cout
<<
ostr
.
str
()
<<
kwsys_ios
::
endl
;
if
(
ostr
.
str
()
!=
refstring
)
{
return
1
;
}
kwsys_ios
::
istringstream
istr
;
istr
.
str
(
refstring
);
kwsys_ios
::
cout
<<
istr
.
str
()
<<
kwsys_ios
::
endl
;
if
(
istr
.
str
()
!=
refstring
)
{
return
1
;
}
const
int
val
=
12345
;
const
char
valstr
[]
=
"12345"
;
kwsys_ios
::
stringstream
sstr
;
sstr
<<
val
;
int
v
=
0
;
sstr
>>
v
;
kwsys_ios
::
cout
<<
sstr
.
str
()
<<
kwsys_ios
::
endl
;
if
(
/*v != val ||*/
sstr
.
str
()
!=
valstr
)
{
kwsys_ios
::
cerr
<<
v
<<
" should be "
<<
val
<<
kwsys_ios
::
endl
;
return
1
;
}
return
0
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment