blob: e17c3a2f68aaa8115f3b863bd4e40f52346012cf [file] [log] [blame]
Eric Fiselier62b959c2016-12-08 06:37:41 +00001// define the module for __config outside of the top level 'std' module
2// since __config may be included from C headers which may create an
3// include cycle.
4module std_config [system] [extern_c] {
5 header "__config"
6}
7
Richard Smith31cfef02014-05-21 00:33:49 +00008module std [system] {
Eric Fiselier62b959c2016-12-08 06:37:41 +00009 export std_config
Richard Smith31cfef02014-05-21 00:33:49 +000010 // FIXME: The standard does not require that each of these submodules
11 // re-exports its imported modules. We should provide an alternative form of
12 // export that issues a warning if a name from the submodule is used, and
13 // use that to provide a 'strict mode' for libc++.
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000014
15 // Deprecated C-compatibility headers. These can all be included from within
16 // an 'extern "C"' context.
17 module depr [extern_c] {
18 // <assert.h> provided by C library.
19 module ctype_h {
20 header "ctype.h"
21 export *
22 }
23 module errno_h {
24 header "errno.h"
25 export *
26 }
27 // <fenv.h> provided by C library.
28 // <float.h> provided by compiler or C library.
29 module inttypes_h {
30 header "inttypes.h"
31 export stdint_h
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000032 export *
33 }
34 // <iso646.h> provided by compiler.
35 // <limits.h> provided by compiler or C library.
Eric Fiselierc6213332016-11-19 01:14:15 +000036 module locale_h {
37 header "locale.h"
Eric Fiselierc6213332016-11-19 01:14:15 +000038 export *
39 }
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000040 module math_h {
41 header "math.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000042 export *
43 }
44 module setjmp_h {
45 header "setjmp.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000046 export *
47 }
48 // FIXME: <stdalign.h> is missing.
49 // <signal.h> provided by C library.
50 // <stdarg.h> provided by compiler.
Eric Fiselier5163fa12016-12-06 09:48:32 +000051 // <stdbool.h> provided by compiler.
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000052 module stddef_h {
53 // <stddef.h>'s __need_* macros require textual inclusion.
54 textual header "stddef.h"
55 }
Eric Fiseliercbda4fb2016-11-22 20:05:19 +000056 module stdint_h {
57 header "stdint.h"
58 export *
59 // FIXME: This module only exists on OS X and for some reason the
60 // wildcard above doesn't export it.
61 export Darwin.C.stdint
62 }
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000063 module stdio_h {
64 // <stdio.h>'s __need_* macros require textual inclusion.
65 textual header "stdio.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000066 export *
Eric Fiselier3b733092016-12-06 07:40:46 +000067 export Darwin.C.stdio
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000068 }
69 module stdlib_h {
70 // <stdlib.h>'s __need_* macros require textual inclusion.
71 textual header "stdlib.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000072 export *
73 }
74 module string_h {
75 header "string.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000076 export *
77 }
78 // FIXME: <uchar.h> is missing.
79 // <time.h> provided by C library.
80 module wchar_h {
81 // <wchar.h>'s __need_* macros require textual inclusion.
82 textual header "wchar.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000083 export *
84 }
85 module wctype_h {
86 header "wctype.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000087 export *
88 }
89 }
90
91 // <complex.h> and <tgmath.h> are not C headers in any real sense, do not
92 // allow their use in extern "C" contexts.
93 module complex_h {
94 header "complex.h"
95 export ccomplex
96 export *
97 }
98 module tgmath_h {
99 header "tgmath.h"
100 export ccomplex
101 export cmath
102 export *
103 }
104
105 // C compatibility headers.
106 module compat {
107 module cassert {
108 // <cassert>'s use of NDEBUG requires textual inclusion.
109 textual header "cassert"
110 }
111 module ccomplex {
112 header "ccomplex"
113 export complex
114 export *
115 }
116 module cctype {
117 header "cctype"
118 export *
119 }
120 module cerrno {
121 header "cerrno"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000122 export *
123 }
124 module cfenv {
125 header "cfenv"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000126 export *
127 }
128 module cfloat {
129 header "cfloat"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000130 export *
131 }
132 module cinttypes {
133 header "cinttypes"
134 export cstdint
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000135 export *
136 }
137 module ciso646 {
138 header "ciso646"
139 export *
140 }
141 module climits {
142 header "climits"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000143 export *
144 }
145 module clocale {
146 header "clocale"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000147 export *
148 }
149 module cmath {
150 header "cmath"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000151 export *
152 }
153 module csetjmp {
154 header "csetjmp"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000155 export *
156 }
157 module csignal {
158 header "csignal"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000159 export *
160 }
161 // FIXME: <cstdalign> is missing.
162 module cstdarg {
163 header "cstdarg"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000164 export *
165 }
166 module cstdbool {
167 header "cstdbool"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000168 export *
169 }
170 module cstddef {
171 header "cstddef"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000172 export *
173 }
174 module cstdint {
175 header "cstdint"
Eric Fiseliercbda4fb2016-11-22 20:05:19 +0000176 export depr.stdint_h
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000177 export *
178 }
179 module cstdio {
180 header "cstdio"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000181 export *
182 }
183 module cstdlib {
184 header "cstdlib"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000185 export *
186 }
187 module cstring {
188 header "cstring"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000189 export *
190 }
191 module ctgmath {
192 header "ctgmath"
193 export ccomplex
194 export cmath
195 export *
196 }
197 module ctime {
198 header "ctime"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000199 export *
200 }
201 // FIXME: <cuchar> is missing.
202 module cwchar {
203 header "cwchar"
Eric Fiselier3b733092016-12-06 07:40:46 +0000204 export depr.stdio_h
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000205 export *
206 }
207 module cwctype {
208 header "cwctype"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000209 export *
210 }
211 }
212
Richard Smith31cfef02014-05-21 00:33:49 +0000213 module algorithm {
214 header "algorithm"
215 export initializer_list
216 export *
217 }
Eric Fiselier006458b2016-12-05 23:33:19 +0000218 module any {
219 header "any"
220 export *
221 }
Richard Smith31cfef02014-05-21 00:33:49 +0000222 module array {
223 header "array"
224 export initializer_list
225 export *
226 }
227 module atomic {
228 header "atomic"
229 export *
Richard Smith31cfef02014-05-21 00:33:49 +0000230 }
231 module bitset {
232 header "bitset"
233 export string
234 export iosfwd
235 export *
236 }
237 // No submodule for cassert. It fundamentally needs repeated, textual inclusion.
Richard Smith31cfef02014-05-21 00:33:49 +0000238 module chrono {
239 header "chrono"
240 export *
241 }
Richard Smith31cfef02014-05-21 00:33:49 +0000242 module codecvt {
243 header "codecvt"
244 export *
245 }
Eric Fiseliere0074fc2018-04-06 21:37:23 +0000246 module compare {
247 header "compare"
248 export *
249 }
Richard Smith31cfef02014-05-21 00:33:49 +0000250 module complex {
251 header "complex"
252 export *
253 }
254 module condition_variable {
255 header "condition_variable"
256 export *
257 }
Richard Smith31cfef02014-05-21 00:33:49 +0000258 module deque {
259 header "deque"
260 export initializer_list
261 export *
262 }
263 module exception {
264 header "exception"
265 export *
266 }
267 module forward_list {
268 header "forward_list"
269 export initializer_list
270 export *
271 }
272 module fstream {
273 header "fstream"
274 export *
275 }
276 module functional {
277 header "functional"
278 export *
279 }
280 module future {
281 header "future"
282 export *
283 }
284 module initializer_list {
285 header "initializer_list"
286 export *
287 }
288 module iomanip {
289 header "iomanip"
290 export *
291 }
292 module ios {
293 header "ios"
294 export iosfwd
295 export *
296 }
297 module iosfwd {
298 header "iosfwd"
299 export *
300 }
301 module iostream {
302 header "iostream"
303 export ios
304 export streambuf
305 export istream
306 export ostream
307 export *
308 }
309 module istream {
310 header "istream"
311 // FIXME: should re-export ios, streambuf?
312 export *
313 }
314 module iterator {
315 header "iterator"
316 export *
317 }
318 module limits {
319 header "limits"
320 export *
321 }
322 module list {
323 header "list"
324 export initializer_list
325 export *
326 }
327 module locale {
328 header "locale"
329 export *
330 }
331 module map {
332 header "map"
333 export initializer_list
334 export *
335 }
336 module memory {
337 header "memory"
338 export *
339 }
340 module mutex {
341 header "mutex"
342 export *
343 }
344 module new {
345 header "new"
346 export *
347 }
348 module numeric {
349 header "numeric"
350 export *
351 }
Eric Fiselier006458b2016-12-05 23:33:19 +0000352 module optional {
353 header "optional"
354 export *
355 }
Richard Smith31cfef02014-05-21 00:33:49 +0000356 module ostream {
357 header "ostream"
358 // FIXME: should re-export ios, streambuf?
359 export *
360 }
361 module queue {
362 header "queue"
363 export initializer_list
364 export *
365 }
366 module random {
367 header "random"
368 export initializer_list
369 export *
370 }
371 module ratio {
372 header "ratio"
373 export *
374 }
375 module regex {
376 header "regex"
377 export initializer_list
378 export *
379 }
380 module scoped_allocator {
381 header "scoped_allocator"
382 export *
383 }
384 module set {
385 header "set"
386 export initializer_list
387 export *
388 }
389 module sstream {
390 header "sstream"
391 // FIXME: should re-export istream, ostream, ios, streambuf, string?
392 export *
393 }
394 module stack {
395 header "stack"
396 export initializer_list
397 export *
398 }
399 module stdexcept {
400 header "stdexcept"
401 export *
402 }
403 module streambuf {
404 header "streambuf"
405 export *
406 }
407 module string {
408 header "string"
409 export initializer_list
Eric Fiselier2d357f72016-12-05 23:53:23 +0000410 export string_view
411 export __string
412 export *
413 }
414 module string_view {
415 header "string_view"
416 export initializer_list
417 export __string
Richard Smith31cfef02014-05-21 00:33:49 +0000418 export *
419 }
420 module strstream {
421 header "strstream"
Eric Fiselierbdc20862016-12-05 23:16:07 +0000422 export *
Richard Smith31cfef02014-05-21 00:33:49 +0000423 }
424 module system_error {
425 header "system_error"
426 export *
427 }
428 module thread {
429 header "thread"
430 export *
431 }
432 module tuple {
433 header "tuple"
434 export *
435 }
436 module type_traits {
437 header "type_traits"
438 export *
439 }
440 module typeindex {
441 header "typeindex"
442 export *
443 }
444 module typeinfo {
445 header "typeinfo"
446 export *
447 }
448 module unordered_map {
449 header "unordered_map"
450 export initializer_list
451 export *
452 }
453 module unordered_set {
454 header "unordered_set"
455 export initializer_list
456 export *
457 }
458 module utility {
459 header "utility"
460 export initializer_list
461 export *
462 }
463 module valarray {
464 header "valarray"
465 export initializer_list
466 export *
467 }
Eric Fiselier006458b2016-12-05 23:33:19 +0000468 module variant {
469 header "variant"
470 export *
471 }
Richard Smith31cfef02014-05-21 00:33:49 +0000472 module vector {
473 header "vector"
474 export initializer_list
475 export *
476 }
Eric Fiseliera604a7d2018-04-04 04:21:54 +0000477 module version {
478 header "version"
479 export *
480 }
Richard Smith31cfef02014-05-21 00:33:49 +0000481
482 // FIXME: These should be private.
483 module __bit_reference { header "__bit_reference" export * }
Richard Smith31cfef02014-05-21 00:33:49 +0000484 module __debug { header "__debug" export * }
Zhihao Yuan1f3533c2018-07-03 03:25:10 +0000485 module __errc { header "__errc" export * }
Richard Smith31cfef02014-05-21 00:33:49 +0000486 module __functional_base { header "__functional_base" export * }
487 module __hash_table { header "__hash_table" export * }
488 module __locale { header "__locale" export * }
489 module __mutex_base { header "__mutex_base" export * }
490 module __split_buffer { header "__split_buffer" export * }
491 module __sso_allocator { header "__sso_allocator" export * }
492 module __std_stream { header "__std_stream" export * }
Eric Fiselier2d357f72016-12-05 23:53:23 +0000493 module __string { header "__string" export * }
Richard Smith31cfef02014-05-21 00:33:49 +0000494 module __tree { header "__tree" export * }
495 module __tuple { header "__tuple" export * }
Eric Fiselierf4433a32017-05-31 22:07:49 +0000496 module __undef_macros { header "__undef_macros" export * }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000497
498 module experimental {
Eric Fiselier92ae1af2016-12-06 01:34:24 +0000499 requires cplusplus11
500
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000501 module algorithm {
502 header "experimental/algorithm"
503 export *
504 }
Eric Fiselierf0426152017-05-25 23:39:29 +0000505 module coroutine {
Eric Fiseliere4a3dab2017-05-29 23:17:28 +0000506 requires coroutines
Eric Fiselierf0426152017-05-25 23:39:29 +0000507 header "experimental/coroutine"
508 export *
509 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000510 module deque {
511 header "experimental/deque"
512 export *
513 }
514 module dynarray {
515 header "experimental/dynarray"
516 export *
517 }
518 module filesystem {
519 header "experimental/filesystem"
520 export *
521 }
522 module forward_list {
523 header "experimental/forward_list"
524 export *
525 }
526 module functional {
527 header "experimental/functional"
528 export *
529 }
530 module iterator {
531 header "experimental/iterator"
532 export *
533 }
534 module list {
535 header "experimental/list"
536 export *
537 }
538 module map {
539 header "experimental/map"
540 export *
541 }
542 module memory_resource {
543 header "experimental/memory_resource"
544 export *
545 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000546 module propagate_const {
547 header "experimental/propagate_const"
548 export *
549 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000550 module regex {
551 header "experimental/regex"
552 export *
553 }
Tim Shen158e51b2018-04-23 21:54:06 +0000554 module simd {
555 header "experimental/simd"
556 export *
557 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000558 module set {
559 header "experimental/set"
560 export *
561 }
Marshall Clowd2ad87e2018-07-24 03:01:02 +0000562 module span {
563 header "span"
564 export *
565 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000566 module string {
567 header "experimental/string"
568 export *
569 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000570 module type_traits {
571 header "experimental/type_traits"
572 export *
573 }
574 module unordered_map {
575 header "experimental/unordered_map"
576 export *
577 }
578 module unordered_set {
579 header "experimental/unordered_set"
580 export *
581 }
582 module utility {
583 header "experimental/utility"
584 export *
585 }
586 module vector {
587 header "experimental/vector"
588 export *
589 }
590 // FIXME these should be private
591 module __memory {
592 header "experimental/__memory"
593 export *
594 }
595 } // end experimental
Richard Smith31cfef02014-05-21 00:33:49 +0000596}