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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Brad King
KWSys
Commits
2cd73d8c
Commit
2cd73d8c
authored
Apr 19, 2007
by
Brad King
Browse files
Options
Downloads
Patches
Plain Diff
ENH: Fixed stl string streaming operators for Watcom.
parent
35bd6f0d
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+3
-3
3 additions, 3 deletions
CMakeLists.txt
kwsys_stl_string.hxx.in
+12
-1
12 additions, 1 deletion
kwsys_stl_string.hxx.in
with
15 additions
and
4 deletions
CMakeLists.txt
+
3
−
3
View file @
2cd73d8c
...
...
@@ -395,17 +395,17 @@ ELSE(KWSYS_STL_HAS_ALLOCATOR_TEMPLATE)
ENDIF
(
KWSYS_STL_HAS_ALLOCATOR_TEMPLATE
)
KWSYS_PLATFORM_CXX_TEST
(
KWSYS_STL_HAS_ALLOCATOR_OBJECTS
"Checking whether stl containers support allocator objects."
DIRECT
)
IF
(
KWSYS_IOS_USE_ANSI
)
IF
(
KWSYS_IOS_USE_ANSI
AND NOT WATCOM
)
# ANSI streams always have string operators.
SET
(
KWSYS_STL_STRING_HAVE_OSTREAM 1
)
SET
(
KWSYS_STL_STRING_HAVE_ISTREAM 1
)
ELSE
(
KWSYS_IOS_USE_ANSI
)
ELSE
(
KWSYS_IOS_USE_ANSI
AND NOT WATCOM
)
# There may not be string operators for old streams.
KWSYS_PLATFORM_CXX_TEST
(
KWSYS_STL_STRING_HAVE_OSTREAM
"Checking whether stl string has ostream operator<<"
DIRECT
)
KWSYS_PLATFORM_CXX_TEST
(
KWSYS_STL_STRING_HAVE_ISTREAM
"Checking whether stl string has istream operator>>"
DIRECT
)
ENDIF
(
KWSYS_IOS_USE_ANSI
)
ENDIF
(
KWSYS_IOS_USE_ANSI
AND NOT WATCOM
)
SET
(
KWSYS_PLATFORM_CXX_TEST_DEFINES
)
KWSYS_PLATFORM_CXX_TEST
(
KWSYS_CXX_HAS_NULL_TEMPLATE_ARGS
...
...
This diff is collapsed.
Click to expand it.
kwsys_stl_string.hxx.in
+
12
−
1
View file @
2cd73d8c
...
...
@@ -29,6 +29,13 @@
# define @KWSYS_NAMESPACE@_STL_STRING_ISTREAM_DEFINED
# include <ctype.h> // isspace
# include <@KWSYS_NAMESPACE@/ios/iostream>
# if defined(__WATCOMC__)
namespace @KWSYS_NAMESPACE@
{
struct ios_istream_hack: public kwsys_ios::istream
{ void eatwhite() { this->@KWSYS_NAMESPACE@_ios::istream::eatwhite(); } };
}
# endif
inline @KWSYS_NAMESPACE@_ios::istream&
operator>>(@KWSYS_NAMESPACE@_ios::istream& is,
@KWSYS_NAMESPACE@_stl::string& s)
...
...
@@ -43,8 +50,12 @@ operator>>(@KWSYS_NAMESPACE@_ios::istream& is,
s.erase();
// Skip leading whitespace.
#if defined(__WATCOMC__)
static_cast<@KWSYS_NAMESPACE@::ios_istream_hack&>(is).eatwhite();
#else
is.eatwhite();
istream& okay = is;
#endif
@KWSYS_NAMESPACE@_ios::istream& okay = is;
if(okay)
{
...
...
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