summaryrefslogtreecommitdiffstats
path: root/Source/cmStandardIncludes.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2001-10-31 23:56:19 (GMT)
committerBrad King <brad.king@kitware.com>2001-10-31 23:56:19 (GMT)
commiteb6e54c64b86a4696fedc1935d3ad1609ce53c0f (patch)
tree58ef67c0c030b5f24db6df5ee1ad857a7bf409e8 /Source/cmStandardIncludes.h
parent4ba36ca453792be53916d29ee056f94232fd85f7 (diff)
downloadCMake-eb6e54c64b86a4696fedc1935d3ad1609ce53c0f.zip
CMake-eb6e54c64b86a4696fedc1935d3ad1609ce53c0f.tar.gz
CMake-eb6e54c64b86a4696fedc1935d3ad1609ce53c0f.tar.bz2
ENH: Replaced cmStdString implementation to make it more transparently a std:string.
Diffstat (limited to 'Source/cmStandardIncludes.h')
-rw-r--r--Source/cmStandardIncludes.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h
index aaafcfc..0b0852a 100644
--- a/Source/cmStandardIncludes.h
+++ b/Source/cmStandardIncludes.h
@@ -136,13 +136,23 @@ inline bool operator==(std::string const& a, const char* b)
// when combined with a map or set, the symbols can be > 2000 chars!
struct cmStdString : public std::string
{
- typedef std::string Parent;
- cmStdString(const char* s) : Parent(s)
- {
- }
- cmStdString(std::string const&s) : Parent(s)
- {
- }
+ typedef std::string StdString;
+ typedef StdString::value_type value_type;
+ typedef StdString::pointer pointer;
+ typedef StdString::reference reference;
+ typedef StdString::const_reference const_reference;
+ typedef StdString::size_type size_type;
+ typedef StdString::difference_type difference_type;
+ typedef StdString::iterator iterator;
+ typedef StdString::const_iterator const_iterator;
+ typedef StdString::reverse_iterator reverse_iterator;
+ typedef StdString::const_reverse_iterator const_reverse_iterator;
+
+ cmStdString(): StdString() {}
+ cmStdString(const value_type* s): StdString(s) {}
+ cmStdString(const value_type* s, size_type n): StdString(s, n) {}
+ cmStdString(const StdString& s, size_type pos=0, size_type n=npos):
+ StdString(s, pos, n) {}
};
#endif