aboutsummaryrefslogtreecommitdiff
path: root/std-core.mxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-09-11 19:51:44 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-09-11 19:51:44 +0200
commit45041f708eb9660f14b9735883b600b6ba16b585 (patch)
tree6ba7f4148b0f3796764aa7014970e1075a20ddb9 /std-core.mxx
parent3907313f934ca3673f6edbd0989d46fb889c2330 (diff)
libstd++ modularization fixes
Diffstat (limited to 'std-core.mxx')
-rw-r--r--std-core.mxx39
1 files changed, 38 insertions, 1 deletions
diff --git a/std-core.mxx b/std-core.mxx
index 3aba712..27f9f1e 100644
--- a/std-core.mxx
+++ b/std-core.mxx
@@ -29,10 +29,23 @@ export module std.core;
export
{
#include <cstddef>
+
+ // These are defined in <bits/c++config.h> which we have pre-included.
+ //
+#ifdef __GLIBCXX__
+ namespace std
+ {
+ typedef std::size_t size_t;
+ typedef std::ptrdiff_t ptrdiff_t;
+ typedef std::nullptr_t nullptr_t;
+ }
+#endif
+
#include <cstdint>
#include <cstdlib>
#include <utility>
+#include <type_traits>
#include <exception>
#include <stdexcept>
@@ -46,7 +59,12 @@ export
#include <string>
#include <cstring> // @@ Not in the proposal.
+#include <array>
#include <vector>
+#include <set>
+#include <map>
+#include <unordered_set>
+#include <unordered_map>
}
#if defined(_MSC_VER) || defined(__clang__)
@@ -56,8 +74,27 @@ export
#include <iosfwd>
#include <istream>
#include <ostream>
-#include <iostream>
#include <sstream>
#include <fstream>
+
+#ifndef __GLIBCXX__
+# include <iostream>
+#else
+// Contents of <iostream> without static __ioinit.
+//
+namespace std _GLIBCXX_VISIBILITY(default)
+{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+ extern istream cin;
+ extern ostream cout;
+ extern ostream cerr;
+ extern ostream clog;
+
+ //static ios_base::Init __ioinit;
+_GLIBCXX_END_NAMESPACE_VERSION
+}
+#endif
}
+
+
#endif