blob: bbfe90ed57f5565ec1cf580820c7b04303b7499e [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 }
Eric Fiselier5dddf722019-02-11 23:47:19 +000027 module fenv_h {
28 header "fenv.h"
29 export *
30 }
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000031 // <float.h> provided by compiler or C library.
32 module inttypes_h {
33 header "inttypes.h"
34 export stdint_h
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000035 export *
36 }
37 // <iso646.h> provided by compiler.
38 // <limits.h> provided by compiler or C library.
Eric Fiselierc6213332016-11-19 01:14:15 +000039 module locale_h {
40 header "locale.h"
Eric Fiselierc6213332016-11-19 01:14:15 +000041 export *
42 }
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000043 module math_h {
44 header "math.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000045 export *
46 }
47 module setjmp_h {
48 header "setjmp.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000049 export *
50 }
51 // FIXME: <stdalign.h> is missing.
52 // <signal.h> provided by C library.
53 // <stdarg.h> provided by compiler.
Eric Fiselier5163fa12016-12-06 09:48:32 +000054 // <stdbool.h> provided by compiler.
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000055 module stddef_h {
56 // <stddef.h>'s __need_* macros require textual inclusion.
57 textual header "stddef.h"
58 }
Eric Fiseliercbda4fb2016-11-22 20:05:19 +000059 module stdint_h {
60 header "stdint.h"
61 export *
62 // FIXME: This module only exists on OS X and for some reason the
63 // wildcard above doesn't export it.
64 export Darwin.C.stdint
65 }
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000066 module stdio_h {
67 // <stdio.h>'s __need_* macros require textual inclusion.
68 textual header "stdio.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000069 export *
Eric Fiselier3b733092016-12-06 07:40:46 +000070 export Darwin.C.stdio
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000071 }
72 module stdlib_h {
73 // <stdlib.h>'s __need_* macros require textual inclusion.
74 textual header "stdlib.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000075 export *
76 }
77 module string_h {
78 header "string.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000079 export *
80 }
81 // FIXME: <uchar.h> is missing.
82 // <time.h> provided by C library.
83 module wchar_h {
84 // <wchar.h>'s __need_* macros require textual inclusion.
85 textual header "wchar.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000086 export *
87 }
88 module wctype_h {
89 header "wctype.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000090 export *
91 }
92 }
93
94 // <complex.h> and <tgmath.h> are not C headers in any real sense, do not
95 // allow their use in extern "C" contexts.
96 module complex_h {
97 header "complex.h"
98 export ccomplex
99 export *
100 }
101 module tgmath_h {
102 header "tgmath.h"
103 export ccomplex
104 export cmath
105 export *
106 }
107
108 // C compatibility headers.
109 module compat {
110 module cassert {
111 // <cassert>'s use of NDEBUG requires textual inclusion.
112 textual header "cassert"
113 }
114 module ccomplex {
115 header "ccomplex"
116 export complex
117 export *
118 }
119 module cctype {
120 header "cctype"
121 export *
122 }
123 module cerrno {
124 header "cerrno"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000125 export *
126 }
127 module cfenv {
128 header "cfenv"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000129 export *
130 }
131 module cfloat {
132 header "cfloat"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000133 export *
134 }
135 module cinttypes {
136 header "cinttypes"
137 export cstdint
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000138 export *
139 }
140 module ciso646 {
141 header "ciso646"
142 export *
143 }
144 module climits {
145 header "climits"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000146 export *
147 }
148 module clocale {
149 header "clocale"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000150 export *
151 }
152 module cmath {
153 header "cmath"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000154 export *
155 }
156 module csetjmp {
157 header "csetjmp"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000158 export *
159 }
160 module csignal {
161 header "csignal"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000162 export *
163 }
164 // FIXME: <cstdalign> is missing.
165 module cstdarg {
166 header "cstdarg"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000167 export *
168 }
169 module cstdbool {
170 header "cstdbool"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000171 export *
172 }
173 module cstddef {
174 header "cstddef"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000175 export *
176 }
177 module cstdint {
178 header "cstdint"
Eric Fiseliercbda4fb2016-11-22 20:05:19 +0000179 export depr.stdint_h
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000180 export *
181 }
182 module cstdio {
183 header "cstdio"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000184 export *
185 }
186 module cstdlib {
187 header "cstdlib"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000188 export *
189 }
190 module cstring {
191 header "cstring"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000192 export *
193 }
194 module ctgmath {
195 header "ctgmath"
196 export ccomplex
197 export cmath
198 export *
199 }
200 module ctime {
201 header "ctime"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000202 export *
203 }
204 // FIXME: <cuchar> is missing.
205 module cwchar {
206 header "cwchar"
Eric Fiselier3b733092016-12-06 07:40:46 +0000207 export depr.stdio_h
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000208 export *
209 }
210 module cwctype {
211 header "cwctype"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000212 export *
213 }
214 }
215
Richard Smith31cfef02014-05-21 00:33:49 +0000216 module algorithm {
217 header "algorithm"
218 export initializer_list
219 export *
220 }
Eric Fiselier006458b2016-12-05 23:33:19 +0000221 module any {
222 header "any"
223 export *
224 }
Richard Smith31cfef02014-05-21 00:33:49 +0000225 module array {
226 header "array"
227 export initializer_list
228 export *
229 }
230 module atomic {
231 header "atomic"
232 export *
Richard Smith31cfef02014-05-21 00:33:49 +0000233 }
Marshall Clowbf32ec92018-08-17 16:07:48 +0000234 module bit {
235 header "bit"
236 export *
237 }
Richard Smith31cfef02014-05-21 00:33:49 +0000238 module bitset {
239 header "bitset"
240 export string
241 export iosfwd
242 export *
243 }
244 // No submodule for cassert. It fundamentally needs repeated, textual inclusion.
Zhihao Yuan7bf19052018-08-01 02:38:30 +0000245 module charconv {
246 header "charconv"
247 export *
248 }
Richard Smith31cfef02014-05-21 00:33:49 +0000249 module chrono {
250 header "chrono"
251 export *
252 }
Richard Smith31cfef02014-05-21 00:33:49 +0000253 module codecvt {
254 header "codecvt"
255 export *
256 }
Eric Fiseliere0074fc2018-04-06 21:37:23 +0000257 module compare {
258 header "compare"
259 export *
260 }
Richard Smith31cfef02014-05-21 00:33:49 +0000261 module complex {
262 header "complex"
263 export *
264 }
265 module condition_variable {
266 header "condition_variable"
267 export *
268 }
Richard Smith31cfef02014-05-21 00:33:49 +0000269 module deque {
270 header "deque"
271 export initializer_list
272 export *
273 }
274 module exception {
275 header "exception"
276 export *
277 }
Eric Fiselier02cea5e2018-07-27 03:07:09 +0000278 module filesystem {
279 header "filesystem"
280 export *
281 }
Richard Smith31cfef02014-05-21 00:33:49 +0000282 module forward_list {
283 header "forward_list"
284 export initializer_list
285 export *
286 }
287 module fstream {
288 header "fstream"
289 export *
290 }
291 module functional {
292 header "functional"
293 export *
294 }
295 module future {
296 header "future"
297 export *
298 }
299 module initializer_list {
300 header "initializer_list"
301 export *
302 }
303 module iomanip {
304 header "iomanip"
305 export *
306 }
307 module ios {
308 header "ios"
309 export iosfwd
310 export *
311 }
312 module iosfwd {
313 header "iosfwd"
314 export *
315 }
316 module iostream {
317 header "iostream"
318 export ios
319 export streambuf
320 export istream
321 export ostream
322 export *
323 }
324 module istream {
325 header "istream"
326 // FIXME: should re-export ios, streambuf?
327 export *
328 }
329 module iterator {
330 header "iterator"
331 export *
332 }
333 module limits {
334 header "limits"
335 export *
336 }
337 module list {
338 header "list"
339 export initializer_list
340 export *
341 }
342 module locale {
343 header "locale"
344 export *
345 }
346 module map {
347 header "map"
348 export initializer_list
349 export *
350 }
351 module memory {
352 header "memory"
353 export *
354 }
355 module mutex {
356 header "mutex"
357 export *
358 }
359 module new {
360 header "new"
361 export *
362 }
363 module numeric {
364 header "numeric"
365 export *
366 }
Eric Fiselier006458b2016-12-05 23:33:19 +0000367 module optional {
368 header "optional"
369 export *
370 }
Richard Smith31cfef02014-05-21 00:33:49 +0000371 module ostream {
372 header "ostream"
373 // FIXME: should re-export ios, streambuf?
374 export *
375 }
376 module queue {
377 header "queue"
378 export initializer_list
379 export *
380 }
381 module random {
382 header "random"
383 export initializer_list
384 export *
385 }
386 module ratio {
387 header "ratio"
388 export *
389 }
390 module regex {
391 header "regex"
392 export initializer_list
393 export *
394 }
395 module scoped_allocator {
396 header "scoped_allocator"
397 export *
398 }
399 module set {
400 header "set"
401 export initializer_list
402 export *
403 }
404 module sstream {
405 header "sstream"
406 // FIXME: should re-export istream, ostream, ios, streambuf, string?
407 export *
408 }
409 module stack {
410 header "stack"
411 export initializer_list
412 export *
413 }
414 module stdexcept {
415 header "stdexcept"
416 export *
417 }
418 module streambuf {
419 header "streambuf"
420 export *
421 }
422 module string {
423 header "string"
424 export initializer_list
Eric Fiselier2d357f72016-12-05 23:53:23 +0000425 export string_view
426 export __string
427 export *
428 }
429 module string_view {
430 header "string_view"
431 export initializer_list
432 export __string
Richard Smith31cfef02014-05-21 00:33:49 +0000433 export *
434 }
435 module strstream {
436 header "strstream"
Eric Fiselierbdc20862016-12-05 23:16:07 +0000437 export *
Richard Smith31cfef02014-05-21 00:33:49 +0000438 }
439 module system_error {
440 header "system_error"
441 export *
442 }
443 module thread {
444 header "thread"
445 export *
446 }
447 module tuple {
448 header "tuple"
449 export *
450 }
451 module type_traits {
452 header "type_traits"
453 export *
454 }
455 module typeindex {
456 header "typeindex"
457 export *
458 }
459 module typeinfo {
460 header "typeinfo"
461 export *
462 }
463 module unordered_map {
464 header "unordered_map"
465 export initializer_list
466 export *
467 }
468 module unordered_set {
469 header "unordered_set"
470 export initializer_list
471 export *
472 }
473 module utility {
474 header "utility"
475 export initializer_list
476 export *
477 }
478 module valarray {
479 header "valarray"
480 export initializer_list
481 export *
482 }
Eric Fiselier006458b2016-12-05 23:33:19 +0000483 module variant {
484 header "variant"
485 export *
486 }
Richard Smith31cfef02014-05-21 00:33:49 +0000487 module vector {
488 header "vector"
489 export initializer_list
490 export *
491 }
Eric Fiseliera604a7d2018-04-04 04:21:54 +0000492 module version {
493 header "version"
494 export *
495 }
Richard Smith31cfef02014-05-21 00:33:49 +0000496
497 // FIXME: These should be private.
498 module __bit_reference { header "__bit_reference" export * }
Richard Smith31cfef02014-05-21 00:33:49 +0000499 module __debug { header "__debug" export * }
Zhihao Yuan1f3533c2018-07-03 03:25:10 +0000500 module __errc { header "__errc" export * }
Richard Smith31cfef02014-05-21 00:33:49 +0000501 module __functional_base { header "__functional_base" export * }
502 module __hash_table { header "__hash_table" export * }
503 module __locale { header "__locale" export * }
504 module __mutex_base { header "__mutex_base" export * }
505 module __split_buffer { header "__split_buffer" export * }
506 module __sso_allocator { header "__sso_allocator" export * }
507 module __std_stream { header "__std_stream" export * }
Eric Fiselier2d357f72016-12-05 23:53:23 +0000508 module __string { header "__string" export * }
Richard Smith31cfef02014-05-21 00:33:49 +0000509 module __tree { header "__tree" export * }
510 module __tuple { header "__tuple" export * }
Eric Fiselierf4433a32017-05-31 22:07:49 +0000511 module __undef_macros { header "__undef_macros" export * }
Erik Pilkingtonc37a3d82018-08-01 01:33:38 +0000512 module __node_handle { header "__node_handle" export * }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000513
514 module experimental {
Eric Fiselier92ae1af2016-12-06 01:34:24 +0000515 requires cplusplus11
516
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000517 module algorithm {
518 header "experimental/algorithm"
519 export *
520 }
Eric Fiselierf0426152017-05-25 23:39:29 +0000521 module coroutine {
Eric Fiseliere4a3dab2017-05-29 23:17:28 +0000522 requires coroutines
Eric Fiselierf0426152017-05-25 23:39:29 +0000523 header "experimental/coroutine"
524 export *
525 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000526 module deque {
527 header "experimental/deque"
528 export *
529 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000530 module filesystem {
531 header "experimental/filesystem"
532 export *
533 }
534 module forward_list {
535 header "experimental/forward_list"
536 export *
537 }
538 module functional {
539 header "experimental/functional"
540 export *
541 }
542 module iterator {
543 header "experimental/iterator"
544 export *
545 }
546 module list {
547 header "experimental/list"
548 export *
549 }
550 module map {
551 header "experimental/map"
552 export *
553 }
554 module memory_resource {
555 header "experimental/memory_resource"
556 export *
557 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000558 module propagate_const {
559 header "experimental/propagate_const"
560 export *
561 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000562 module regex {
563 header "experimental/regex"
564 export *
565 }
Tim Shen158e51b2018-04-23 21:54:06 +0000566 module simd {
567 header "experimental/simd"
568 export *
569 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000570 module set {
571 header "experimental/set"
572 export *
573 }
Marshall Clowd2ad87e2018-07-24 03:01:02 +0000574 module span {
575 header "span"
576 export *
577 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000578 module string {
579 header "experimental/string"
580 export *
581 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000582 module type_traits {
583 header "experimental/type_traits"
584 export *
585 }
586 module unordered_map {
587 header "experimental/unordered_map"
588 export *
589 }
590 module unordered_set {
591 header "experimental/unordered_set"
592 export *
593 }
594 module utility {
595 header "experimental/utility"
596 export *
597 }
598 module vector {
599 header "experimental/vector"
600 export *
601 }
602 // FIXME these should be private
603 module __memory {
604 header "experimental/__memory"
605 export *
606 }
607 } // end experimental
Richard Smith31cfef02014-05-21 00:33:49 +0000608}