mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-06-25 14:06:27 +02:00
Separate C++03 and 11.
This commit is contained in:
parent
8febbfd9f5
commit
c93a42b5f4
@ -623,19 +623,29 @@ private:
|
||||
append_buffer(&Stream::write, buf, len);
|
||||
}
|
||||
|
||||
#if defined(MSGPACK_USE_CPP03)
|
||||
|
||||
template <typename Ret, typename Cls, typename SizeType>
|
||||
void append_buffer(Ret (Cls::*)(const char*, SizeType), const char* buf, size_t len)
|
||||
{
|
||||
m_stream.write(buf, static_cast<SizeType>(len));
|
||||
}
|
||||
|
||||
#if !defined(MSGPACK_USE_CPP03)
|
||||
#else // defined(MSGPACK_USE_CPP03)
|
||||
|
||||
template <typename Ret, typename Cls, typename SizeType>
|
||||
void append_buffer(Ret (Cls::*)(const char*, SizeType) noexcept, const char* buf, size_t len) noexcept
|
||||
void append_buffer(Ret (Cls::*)(const char*, SizeType) noexcept(false), const char* buf, size_t len) noexcept(false)
|
||||
{
|
||||
m_stream.write(buf, static_cast<SizeType>(len));
|
||||
}
|
||||
#endif // !defined(MSGPACK_USE_CPP03)
|
||||
|
||||
template <typename Ret, typename Cls, typename SizeType>
|
||||
void append_buffer(Ret (Cls::*)(const char*, SizeType) noexcept(true), const char* buf, size_t len) noexcept(true)
|
||||
{
|
||||
m_stream.write(buf, static_cast<SizeType>(len));
|
||||
}
|
||||
|
||||
#endif // defined(MSGPACK_USE_CPP03)
|
||||
|
||||
private:
|
||||
Stream& m_stream;
|
||||
|
Loading…
x
Reference in New Issue
Block a user