removed move assignments from input adapters
This commit is contained in:
parent
7eadd6daef
commit
41b0704ce1
2 changed files with 6 additions and 32 deletions
|
@ -43,7 +43,7 @@ class file_input_adapter
|
||||||
file_input_adapter(const file_input_adapter&) = delete;
|
file_input_adapter(const file_input_adapter&) = delete;
|
||||||
file_input_adapter(file_input_adapter&&) = default;
|
file_input_adapter(file_input_adapter&&) = default;
|
||||||
file_input_adapter& operator=(const file_input_adapter&) = delete;
|
file_input_adapter& operator=(const file_input_adapter&) = delete;
|
||||||
file_input_adapter& operator=(file_input_adapter&&) = default;
|
file_input_adapter& operator=(file_input_adapter&&) = delete;
|
||||||
|
|
||||||
std::char_traits<char>::int_type get_character() noexcept
|
std::char_traits<char>::int_type get_character() noexcept
|
||||||
{
|
{
|
||||||
|
@ -85,6 +85,7 @@ class input_stream_adapter
|
||||||
// delete because of pointer members
|
// delete because of pointer members
|
||||||
input_stream_adapter(const input_stream_adapter&) = delete;
|
input_stream_adapter(const input_stream_adapter&) = delete;
|
||||||
input_stream_adapter& operator=(input_stream_adapter&) = delete;
|
input_stream_adapter& operator=(input_stream_adapter&) = delete;
|
||||||
|
input_stream_adapter& operator=(input_stream_adapter&& rhs) = delete;
|
||||||
|
|
||||||
input_stream_adapter(input_stream_adapter&& rhs) : is(rhs.is), sb(rhs.sb)
|
input_stream_adapter(input_stream_adapter&& rhs) : is(rhs.is), sb(rhs.sb)
|
||||||
{
|
{
|
||||||
|
@ -92,20 +93,6 @@ class input_stream_adapter
|
||||||
rhs.sb = nullptr;
|
rhs.sb = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
input_stream_adapter& operator=(input_stream_adapter&& rhs)
|
|
||||||
{
|
|
||||||
if (is)
|
|
||||||
{
|
|
||||||
is->clear(is->rdstate() & std::ios::eofbit);
|
|
||||||
}
|
|
||||||
|
|
||||||
is = rhs.is;
|
|
||||||
sb = rhs.sb;
|
|
||||||
rhs.is = nullptr;
|
|
||||||
rhs.sb = nullptr;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
// std::istream/std::streambuf use std::char_traits<char>::to_int_type, to
|
// std::istream/std::streambuf use std::char_traits<char>::to_int_type, to
|
||||||
// ensure that std::char_traits<char>::eof() and the character 0xFF do not
|
// ensure that std::char_traits<char>::eof() and the character 0xFF do not
|
||||||
// end up as the same value, eg. 0xFFFFFFFF.
|
// end up as the same value, eg. 0xFFFFFFFF.
|
||||||
|
@ -138,7 +125,7 @@ class input_buffer_adapter
|
||||||
input_buffer_adapter(const input_buffer_adapter&) = delete;
|
input_buffer_adapter(const input_buffer_adapter&) = delete;
|
||||||
input_buffer_adapter& operator=(input_buffer_adapter&) = delete;
|
input_buffer_adapter& operator=(input_buffer_adapter&) = delete;
|
||||||
input_buffer_adapter(input_buffer_adapter&&) = default;
|
input_buffer_adapter(input_buffer_adapter&&) = default;
|
||||||
input_buffer_adapter& operator=(input_buffer_adapter&&) = default;
|
input_buffer_adapter& operator=(input_buffer_adapter&&) = delete;
|
||||||
|
|
||||||
std::char_traits<char>::int_type get_character() noexcept
|
std::char_traits<char>::int_type get_character() noexcept
|
||||||
{
|
{
|
||||||
|
|
|
@ -3906,7 +3906,7 @@ class file_input_adapter
|
||||||
file_input_adapter(const file_input_adapter&) = delete;
|
file_input_adapter(const file_input_adapter&) = delete;
|
||||||
file_input_adapter(file_input_adapter&&) = default;
|
file_input_adapter(file_input_adapter&&) = default;
|
||||||
file_input_adapter& operator=(const file_input_adapter&) = delete;
|
file_input_adapter& operator=(const file_input_adapter&) = delete;
|
||||||
file_input_adapter& operator=(file_input_adapter&&) = default;
|
file_input_adapter& operator=(file_input_adapter&&) = delete;
|
||||||
|
|
||||||
std::char_traits<char>::int_type get_character() noexcept
|
std::char_traits<char>::int_type get_character() noexcept
|
||||||
{
|
{
|
||||||
|
@ -3948,6 +3948,7 @@ class input_stream_adapter
|
||||||
// delete because of pointer members
|
// delete because of pointer members
|
||||||
input_stream_adapter(const input_stream_adapter&) = delete;
|
input_stream_adapter(const input_stream_adapter&) = delete;
|
||||||
input_stream_adapter& operator=(input_stream_adapter&) = delete;
|
input_stream_adapter& operator=(input_stream_adapter&) = delete;
|
||||||
|
input_stream_adapter& operator=(input_stream_adapter&& rhs) = delete;
|
||||||
|
|
||||||
input_stream_adapter(input_stream_adapter&& rhs) : is(rhs.is), sb(rhs.sb)
|
input_stream_adapter(input_stream_adapter&& rhs) : is(rhs.is), sb(rhs.sb)
|
||||||
{
|
{
|
||||||
|
@ -3955,20 +3956,6 @@ class input_stream_adapter
|
||||||
rhs.sb = nullptr;
|
rhs.sb = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
input_stream_adapter& operator=(input_stream_adapter&& rhs)
|
|
||||||
{
|
|
||||||
if (is)
|
|
||||||
{
|
|
||||||
is->clear(is->rdstate() & std::ios::eofbit);
|
|
||||||
}
|
|
||||||
|
|
||||||
is = rhs.is;
|
|
||||||
sb = rhs.sb;
|
|
||||||
rhs.is = nullptr;
|
|
||||||
rhs.sb = nullptr;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
// std::istream/std::streambuf use std::char_traits<char>::to_int_type, to
|
// std::istream/std::streambuf use std::char_traits<char>::to_int_type, to
|
||||||
// ensure that std::char_traits<char>::eof() and the character 0xFF do not
|
// ensure that std::char_traits<char>::eof() and the character 0xFF do not
|
||||||
// end up as the same value, eg. 0xFFFFFFFF.
|
// end up as the same value, eg. 0xFFFFFFFF.
|
||||||
|
@ -4001,7 +3988,7 @@ class input_buffer_adapter
|
||||||
input_buffer_adapter(const input_buffer_adapter&) = delete;
|
input_buffer_adapter(const input_buffer_adapter&) = delete;
|
||||||
input_buffer_adapter& operator=(input_buffer_adapter&) = delete;
|
input_buffer_adapter& operator=(input_buffer_adapter&) = delete;
|
||||||
input_buffer_adapter(input_buffer_adapter&&) = default;
|
input_buffer_adapter(input_buffer_adapter&&) = default;
|
||||||
input_buffer_adapter& operator=(input_buffer_adapter&&) = default;
|
input_buffer_adapter& operator=(input_buffer_adapter&&) = delete;
|
||||||
|
|
||||||
std::char_traits<char>::int_type get_character() noexcept
|
std::char_traits<char>::int_type get_character() noexcept
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue