diff options
Diffstat (limited to 'test/std/input.output/iostreams.base/fpos/fpos.operations/addition.pass.cpp')
-rw-r--r-- | test/std/input.output/iostreams.base/fpos/fpos.operations/addition.pass.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/std/input.output/iostreams.base/fpos/fpos.operations/addition.pass.cpp b/test/std/input.output/iostreams.base/fpos/fpos.operations/addition.pass.cpp new file mode 100644 index 0000000000000..a602e3e94beff --- /dev/null +++ b/test/std/input.output/iostreams.base/fpos/fpos.operations/addition.pass.cpp @@ -0,0 +1,28 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// <ios> + +// template <class StateT> class fpos + +// Addition + +#include <ios> +#include <cassert> + +int main() +{ + typedef std::fpos<std::mbstate_t> P; + P p(5); + std::streamoff o(6); + P q = p + o; + assert(q == P(11)); + p += o; + assert(p == q); +} |