summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2014-06-12 15:16:24 -0400
committerBernard Normier <bernard@zeroc.com>2014-06-12 15:16:24 -0400
commitae9802577257a6da3cd36fa585d81e52151ce961 (patch)
tree49d7c538a1c46a0f201f3e859b71a607a538cf16 /cpp
parentFix for ICE-5542: add message to ICE_DEPRECATED_API in C++ (diff)
downloadice-ae9802577257a6da3cd36fa585d81e52151ce961.tar.bz2
ice-ae9802577257a6da3cd36fa585d81e52151ce961.tar.xz
ice-ae9802577257a6da3cd36fa585d81e52151ce961.zip
Fix ICE-5549: Added write(const char*, bool) to BasicStream
Diffstat (limited to 'cpp')
-rw-r--r--cpp/include/Ice/BasicStream.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/cpp/include/Ice/BasicStream.h b/cpp/include/Ice/BasicStream.h
index 236a6a57bd5..c34e10d1d45 100644
--- a/cpp/include/Ice/BasicStream.h
+++ b/cpp/include/Ice/BasicStream.h
@@ -654,15 +654,6 @@ public:
void read(std::vector<Ice::Double>&);
void read(std::pair<const Ice::Double*, const Ice::Double*>&, ::IceUtil::ScopedArray<Ice::Double>&);
- //
- // NOTE: This function is not implemented. It is declared here to
- // catch programming errors that assume a call such as write("")
- // will invoke write(const std::string&), when in fact the compiler
- // will silently select a different overloading. A link error is the
- // intended result.
- //
- void write(const char*);
-
// String
void write(const std::string& v, bool convert = true)
{
@@ -682,6 +673,7 @@ public:
}
}
}
+
// for custom strings
void write(const char* vdata, size_t vsize, bool convert = true)
{
@@ -702,6 +694,12 @@ public:
}
}
+ // Null-terminated C string
+ void write(const char* vdata, bool convert = true)
+ {
+ write(vdata, strlen(vdata), convert);
+ }
+
void write(const std::string*, const std::string*, bool = true);
void read(std::string& v, bool convert = true)