blob: 698cc193de538a5142e7f9bb2b70f25dea1d914f [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 }
Olivier Giroux161e6e82020-02-18 09:58:34 -0500234 module barrier {
235 header "barrier"
236 export *
237 }
Marshall Clowbf32ec92018-08-17 16:07:48 +0000238 module bit {
239 header "bit"
240 export *
241 }
Richard Smith31cfef02014-05-21 00:33:49 +0000242 module bitset {
243 header "bitset"
244 export string
245 export iosfwd
246 export *
247 }
248 // No submodule for cassert. It fundamentally needs repeated, textual inclusion.
Zhihao Yuan7bf19052018-08-01 02:38:30 +0000249 module charconv {
250 header "charconv"
251 export *
252 }
Richard Smith31cfef02014-05-21 00:33:49 +0000253 module chrono {
254 header "chrono"
255 export *
256 }
Richard Smith31cfef02014-05-21 00:33:49 +0000257 module codecvt {
258 header "codecvt"
259 export *
260 }
Eric Fiseliere0074fc2018-04-06 21:37:23 +0000261 module compare {
262 header "compare"
263 export *
264 }
Richard Smith31cfef02014-05-21 00:33:49 +0000265 module complex {
266 header "complex"
267 export *
268 }
269 module condition_variable {
270 header "condition_variable"
271 export *
272 }
Richard Smith31cfef02014-05-21 00:33:49 +0000273 module deque {
274 header "deque"
275 export initializer_list
276 export *
277 }
278 module exception {
279 header "exception"
280 export *
281 }
Louis Dionne59d0b3c2019-08-05 18:29:14 +0000282 module execution {
283 header "execution"
284 export *
285 }
Eric Fiselier02cea5e2018-07-27 03:07:09 +0000286 module filesystem {
287 header "filesystem"
288 export *
289 }
Richard Smith31cfef02014-05-21 00:33:49 +0000290 module forward_list {
291 header "forward_list"
292 export initializer_list
293 export *
294 }
295 module fstream {
296 header "fstream"
297 export *
298 }
299 module functional {
300 header "functional"
301 export *
302 }
303 module future {
304 header "future"
305 export *
306 }
307 module initializer_list {
308 header "initializer_list"
309 export *
310 }
311 module iomanip {
312 header "iomanip"
313 export *
314 }
315 module ios {
316 header "ios"
317 export iosfwd
318 export *
319 }
320 module iosfwd {
321 header "iosfwd"
322 export *
323 }
324 module iostream {
325 header "iostream"
326 export ios
327 export streambuf
328 export istream
329 export ostream
330 export *
331 }
332 module istream {
333 header "istream"
334 // FIXME: should re-export ios, streambuf?
335 export *
336 }
337 module iterator {
338 header "iterator"
339 export *
340 }
Olivier Giroux161e6e82020-02-18 09:58:34 -0500341 module latch {
342 header "latch"
343 export *
344 }
Richard Smith31cfef02014-05-21 00:33:49 +0000345 module limits {
346 header "limits"
347 export *
348 }
349 module list {
350 header "list"
351 export initializer_list
352 export *
353 }
354 module locale {
355 header "locale"
356 export *
357 }
358 module map {
359 header "map"
360 export initializer_list
361 export *
362 }
363 module memory {
364 header "memory"
365 export *
366 }
367 module mutex {
368 header "mutex"
369 export *
370 }
371 module new {
372 header "new"
373 export *
374 }
375 module numeric {
376 header "numeric"
377 export *
378 }
Eric Fiselier006458b2016-12-05 23:33:19 +0000379 module optional {
380 header "optional"
381 export *
382 }
Richard Smith31cfef02014-05-21 00:33:49 +0000383 module ostream {
384 header "ostream"
385 // FIXME: should re-export ios, streambuf?
386 export *
387 }
388 module queue {
389 header "queue"
390 export initializer_list
391 export *
392 }
393 module random {
394 header "random"
395 export initializer_list
396 export *
397 }
398 module ratio {
399 header "ratio"
400 export *
401 }
402 module regex {
403 header "regex"
404 export initializer_list
405 export *
406 }
407 module scoped_allocator {
408 header "scoped_allocator"
409 export *
410 }
Olivier Giroux161e6e82020-02-18 09:58:34 -0500411 module semaphore {
412 header "semaphore"
413 export *
414 }
Richard Smith31cfef02014-05-21 00:33:49 +0000415 module set {
416 header "set"
417 export initializer_list
418 export *
419 }
420 module sstream {
421 header "sstream"
422 // FIXME: should re-export istream, ostream, ios, streambuf, string?
423 export *
424 }
425 module stack {
426 header "stack"
427 export initializer_list
428 export *
429 }
430 module stdexcept {
431 header "stdexcept"
432 export *
433 }
434 module streambuf {
435 header "streambuf"
436 export *
437 }
438 module string {
439 header "string"
440 export initializer_list
Eric Fiselier2d357f72016-12-05 23:53:23 +0000441 export string_view
442 export __string
443 export *
444 }
445 module string_view {
446 header "string_view"
447 export initializer_list
448 export __string
Richard Smith31cfef02014-05-21 00:33:49 +0000449 export *
450 }
451 module strstream {
452 header "strstream"
Eric Fiselierbdc20862016-12-05 23:16:07 +0000453 export *
Richard Smith31cfef02014-05-21 00:33:49 +0000454 }
455 module system_error {
456 header "system_error"
457 export *
458 }
459 module thread {
460 header "thread"
461 export *
462 }
463 module tuple {
464 header "tuple"
465 export *
466 }
467 module type_traits {
468 header "type_traits"
469 export *
470 }
471 module typeindex {
472 header "typeindex"
473 export *
474 }
475 module typeinfo {
476 header "typeinfo"
477 export *
478 }
479 module unordered_map {
480 header "unordered_map"
481 export initializer_list
482 export *
483 }
484 module unordered_set {
485 header "unordered_set"
486 export initializer_list
487 export *
488 }
489 module utility {
490 header "utility"
491 export initializer_list
492 export *
493 }
494 module valarray {
495 header "valarray"
496 export initializer_list
497 export *
498 }
Eric Fiselier006458b2016-12-05 23:33:19 +0000499 module variant {
500 header "variant"
501 export *
502 }
Richard Smith31cfef02014-05-21 00:33:49 +0000503 module vector {
504 header "vector"
505 export initializer_list
506 export *
507 }
Eric Fiseliera604a7d2018-04-04 04:21:54 +0000508 module version {
509 header "version"
510 export *
511 }
Richard Smith31cfef02014-05-21 00:33:49 +0000512
513 // FIXME: These should be private.
514 module __bit_reference { header "__bit_reference" export * }
Richard Smith31cfef02014-05-21 00:33:49 +0000515 module __debug { header "__debug" export * }
Zhihao Yuan1f3533c2018-07-03 03:25:10 +0000516 module __errc { header "__errc" export * }
Richard Smith31cfef02014-05-21 00:33:49 +0000517 module __functional_base { header "__functional_base" export * }
518 module __hash_table { header "__hash_table" export * }
519 module __locale { header "__locale" export * }
520 module __mutex_base { header "__mutex_base" export * }
521 module __split_buffer { header "__split_buffer" export * }
522 module __sso_allocator { header "__sso_allocator" export * }
523 module __std_stream { header "__std_stream" export * }
Eric Fiselier2d357f72016-12-05 23:53:23 +0000524 module __string { header "__string" export * }
Richard Smith31cfef02014-05-21 00:33:49 +0000525 module __tree { header "__tree" export * }
526 module __tuple { header "__tuple" export * }
Eric Fiselierf4433a32017-05-31 22:07:49 +0000527 module __undef_macros { header "__undef_macros" export * }
Erik Pilkingtonc37a3d82018-08-01 01:33:38 +0000528 module __node_handle { header "__node_handle" export * }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000529
530 module experimental {
Eric Fiselier92ae1af2016-12-06 01:34:24 +0000531 requires cplusplus11
532
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000533 module algorithm {
534 header "experimental/algorithm"
535 export *
536 }
Eric Fiselierf0426152017-05-25 23:39:29 +0000537 module coroutine {
Eric Fiseliere4a3dab2017-05-29 23:17:28 +0000538 requires coroutines
Eric Fiselierf0426152017-05-25 23:39:29 +0000539 header "experimental/coroutine"
540 export *
541 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000542 module deque {
543 header "experimental/deque"
544 export *
545 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000546 module filesystem {
547 header "experimental/filesystem"
548 export *
549 }
550 module forward_list {
551 header "experimental/forward_list"
552 export *
553 }
554 module functional {
555 header "experimental/functional"
556 export *
557 }
558 module iterator {
559 header "experimental/iterator"
560 export *
561 }
562 module list {
563 header "experimental/list"
564 export *
565 }
566 module map {
567 header "experimental/map"
568 export *
569 }
570 module memory_resource {
571 header "experimental/memory_resource"
572 export *
573 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000574 module propagate_const {
575 header "experimental/propagate_const"
576 export *
577 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000578 module regex {
579 header "experimental/regex"
580 export *
581 }
Tim Shen158e51b2018-04-23 21:54:06 +0000582 module simd {
583 header "experimental/simd"
584 export *
585 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000586 module set {
587 header "experimental/set"
588 export *
589 }
Marshall Clowd2ad87e2018-07-24 03:01:02 +0000590 module span {
591 header "span"
592 export *
593 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000594 module string {
595 header "experimental/string"
596 export *
597 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000598 module type_traits {
599 header "experimental/type_traits"
600 export *
601 }
602 module unordered_map {
603 header "experimental/unordered_map"
604 export *
605 }
606 module unordered_set {
607 header "experimental/unordered_set"
608 export *
609 }
610 module utility {
611 header "experimental/utility"
612 export *
613 }
614 module vector {
615 header "experimental/vector"
616 export *
617 }
618 // FIXME these should be private
619 module __memory {
620 header "experimental/__memory"
621 export *
622 }
623 } // end experimental
Richard Smith31cfef02014-05-21 00:33:49 +0000624}