Skip to content

Commit

Permalink
Q::sscanf VS2013 fix
Browse files Browse the repository at this point in the history
VS2013 doesn't support default move constructors. Shame.
  • Loading branch information
mrwonko committed Nov 22, 2015
1 parent a8a00a0 commit 54d16f9
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions shared/qcommon/safe/sscanf.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,20 @@ namespace Q
char* data = const_cast< CharT* >( view.data() );
this->setg( data, data, data + view.size() );
}
// alas no default move constructors on VS2013.
// TODO DELETEME once we drop VS2013 (because fuck that).
#if defined( _MSC_VER ) && _MSC_VER < 1900
ArrayViewStreambuf( ArrayViewStreambuf&& rhs )
: std::basic_streambuf< CharT >( std::move( rhs ) )
{
}
ArrayViewStreambuf& operator=( ArrayViewStreambuf&& rhs )
{
std::basic_streambuf< CharT >& self = *this;
self = std::move( rhs );
return self;
}
#endif

protected:
/// @note required by istream.tellg()
Expand Down

0 comments on commit 54d16f9

Please sign in to comment.