diff options
author | Jose <jose@zeroc.com> | 2012-08-10 23:53:37 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2012-08-10 23:53:37 +0200 |
commit | 1d5c04bb8c0e786a717e36467e17f34bcc4f1d95 (patch) | |
tree | c1c91f034589260e97033131061d536ecfc2b9cb /cpp/include/Ice/Stream.h | |
parent | ICE-4702 - Poor hash algorithm (diff) | |
download | ice-1d5c04bb8c0e786a717e36467e17f34bcc4f1d95.tar.bz2 ice-1d5c04bb8c0e786a717e36467e17f34bcc4f1d95.tar.xz ice-1d5c04bb8c0e786a717e36467e17f34bcc4f1d95.zip |
C++11 ami lambda support
Diffstat (limited to 'cpp/include/Ice/Stream.h')
-rw-r--r-- | cpp/include/Ice/Stream.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/cpp/include/Ice/Stream.h b/cpp/include/Ice/Stream.h index 6ec33c5e2e1..3257def6c6a 100644 --- a/cpp/include/Ice/Stream.h +++ b/cpp/include/Ice/Stream.h @@ -331,7 +331,24 @@ public: virtual void write(const Float*, const Float*) = 0; virtual void write(const Double*, const Double*) = 0; - virtual void writeOptional(Int, OptionalType) = 0; + virtual void writeOptional(Int, OptionalType) = 0; + +// +// COMPILER FIX: clang using libc++ cannot use the StreamHelper to write +// vector<bool>, as vector<bool> get optimized to +// __bit_const_reference that has not size member function. +// +#if defined(__clang__) && defined(_LIBCPP_VERSION) + virtual void write(const ::std::vector<bool>& v) + { + writeSize(static_cast<Int>(v.size())); + for(::std::vector<bool>::const_iterator p = v.begin(); p != v.end(); ++p) + { + bool v = (*p); + write(v); + } + } +#endif template<typename T> inline void write(const T& v) { |