summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/offset.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/offset.pass.cpp')
-rw-r--r--libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/offset.pass.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/offset.pass.cpp b/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/offset.pass.cpp
new file mode 100644
index 00000000000..9c6ebd9f74e
--- /dev/null
+++ b/libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/offset.pass.cpp
@@ -0,0 +1,25 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+
+// converts to and from streamoff
+
+#include <ios>
+#include <cassert>
+
+int main()
+{
+ typedef std::fpos<std::mbstate_t> P;
+ P p(std::streamoff(7));
+ std::streamoff offset(p);
+ assert(offset == 7);
+}
OpenPOWER on IntegriCloud