зеркало из https://github.com/microsoft/STL.git
`<streambuf>`: fix seekpos and seekoff (#2121)
This commit is contained in:
Родитель
0f8ec3a306
Коммит
3ce4c8fcb9
|
@ -357,12 +357,12 @@ protected:
|
|||
virtual pos_type __CLR_OR_THIS_CALL seekoff(
|
||||
off_type, ios_base::seekdir, ios_base::openmode = ios_base::in | ios_base::out) {
|
||||
// change position by offset, according to way and mode
|
||||
return streampos(-1);
|
||||
return pos_type(off_type(-1));
|
||||
}
|
||||
|
||||
virtual pos_type __CLR_OR_THIS_CALL seekpos(pos_type, ios_base::openmode = ios_base::in | ios_base::out) {
|
||||
// change to specified position, according to mode
|
||||
return streampos(-1);
|
||||
return pos_type(off_type(-1));
|
||||
}
|
||||
|
||||
virtual basic_streambuf* __CLR_OR_THIS_CALL setbuf(_Elem*, streamsize) {
|
||||
|
|
|
@ -179,6 +179,7 @@ tests\GH_001850_clog_tied_to_cout
|
|||
tests\GH_001914_cached_position
|
||||
tests\GH_002039_byte_is_not_trivially_swappable
|
||||
tests\GH_002058_debug_iterator_race
|
||||
tests\GH_002120_streambuf_seekpos_and_seekoff
|
||||
tests\LWG2597_complex_branch_cut
|
||||
tests\LWG3018_shared_ptr_function
|
||||
tests\P0019R8_atomic_ref
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
RUNALL_INCLUDE ..\usual_matrix.lst
|
|
@ -0,0 +1,18 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
#include <streambuf>
|
||||
#include <string>
|
||||
|
||||
using namespace std;
|
||||
|
||||
struct State {};
|
||||
|
||||
struct CharTraits : char_traits<char> {
|
||||
using state_type = State;
|
||||
using pos_type = fpos<State>;
|
||||
};
|
||||
|
||||
struct Streambuf : basic_streambuf<char, CharTraits> {};
|
||||
|
||||
int main() {} // COMPILE-ONLY
|
Загрузка…
Ссылка в новой задаче