blob: c970082b5600539ca37d4dd9042db51e055e1e8d [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 {
Raphael Isemann95e3ba22020-02-24 20:20:54 +0100235 requires cplusplus14
Olivier Giroux161e6e82020-02-18 09:58:34 -0500236 header "barrier"
237 export *
238 }
Marshall Clowbf32ec92018-08-17 16:07:48 +0000239 module bit {
240 header "bit"
241 export *
242 }
Richard Smith31cfef02014-05-21 00:33:49 +0000243 module bitset {
244 header "bitset"
245 export string
246 export iosfwd
247 export *
248 }
249 // No submodule for cassert. It fundamentally needs repeated, textual inclusion.
Zhihao Yuan7bf19052018-08-01 02:38:30 +0000250 module charconv {
251 header "charconv"
252 export *
253 }
Richard Smith31cfef02014-05-21 00:33:49 +0000254 module chrono {
255 header "chrono"
256 export *
257 }
Richard Smith31cfef02014-05-21 00:33:49 +0000258 module codecvt {
259 header "codecvt"
260 export *
261 }
Eric Fiseliere0074fc2018-04-06 21:37:23 +0000262 module compare {
263 header "compare"
264 export *
265 }
Richard Smith31cfef02014-05-21 00:33:49 +0000266 module complex {
267 header "complex"
268 export *
269 }
Eric Fiselierd59a0322020-04-08 18:00:13 -0400270 module concepts {
271 header "concepts"
272 export *
273 }
Richard Smith31cfef02014-05-21 00:33:49 +0000274 module condition_variable {
275 header "condition_variable"
276 export *
277 }
Richard Smith31cfef02014-05-21 00:33:49 +0000278 module deque {
279 header "deque"
280 export initializer_list
281 export *
282 }
283 module exception {
284 header "exception"
285 export *
286 }
Louis Dionne59d0b3c2019-08-05 18:29:14 +0000287 module execution {
288 header "execution"
289 export *
290 }
Eric Fiselier02cea5e2018-07-27 03:07:09 +0000291 module filesystem {
292 header "filesystem"
293 export *
294 }
Mark de Weverdf5fd832020-11-26 19:12:18 +0100295 module format {
296 header "format"
297 export *
298 }
Richard Smith31cfef02014-05-21 00:33:49 +0000299 module forward_list {
300 header "forward_list"
301 export initializer_list
302 export *
303 }
304 module fstream {
305 header "fstream"
306 export *
307 }
308 module functional {
309 header "functional"
310 export *
311 }
312 module future {
313 header "future"
314 export *
315 }
316 module initializer_list {
317 header "initializer_list"
318 export *
319 }
320 module iomanip {
321 header "iomanip"
322 export *
323 }
324 module ios {
325 header "ios"
326 export iosfwd
327 export *
328 }
329 module iosfwd {
330 header "iosfwd"
331 export *
332 }
333 module iostream {
334 header "iostream"
335 export ios
336 export streambuf
337 export istream
338 export ostream
339 export *
340 }
341 module istream {
342 header "istream"
343 // FIXME: should re-export ios, streambuf?
344 export *
345 }
346 module iterator {
347 header "iterator"
348 export *
349 }
Olivier Giroux161e6e82020-02-18 09:58:34 -0500350 module latch {
Raphael Isemann95e3ba22020-02-24 20:20:54 +0100351 requires cplusplus14
Olivier Giroux161e6e82020-02-18 09:58:34 -0500352 header "latch"
353 export *
354 }
Richard Smith31cfef02014-05-21 00:33:49 +0000355 module limits {
356 header "limits"
357 export *
358 }
359 module list {
360 header "list"
361 export initializer_list
362 export *
363 }
364 module locale {
365 header "locale"
366 export *
367 }
368 module map {
369 header "map"
370 export initializer_list
371 export *
372 }
373 module memory {
374 header "memory"
375 export *
376 }
377 module mutex {
378 header "mutex"
379 export *
380 }
381 module new {
382 header "new"
383 export *
384 }
Raul Tambreafcedea2020-06-19 12:43:33 +0530385 module numbers {
386 header "numbers"
387 export *
388 }
Richard Smith31cfef02014-05-21 00:33:49 +0000389 module numeric {
390 header "numeric"
391 export *
392 }
Eric Fiselier006458b2016-12-05 23:33:19 +0000393 module optional {
394 header "optional"
395 export *
396 }
Richard Smith31cfef02014-05-21 00:33:49 +0000397 module ostream {
398 header "ostream"
399 // FIXME: should re-export ios, streambuf?
400 export *
401 }
402 module queue {
403 header "queue"
404 export initializer_list
405 export *
406 }
407 module random {
408 header "random"
409 export initializer_list
410 export *
411 }
Mark de Weveraf59b2d2020-11-24 18:08:02 +0100412 module ranges {
413 header "ranges"
414 export *
415 }
Richard Smith31cfef02014-05-21 00:33:49 +0000416 module ratio {
417 header "ratio"
418 export *
419 }
420 module regex {
421 header "regex"
422 export initializer_list
423 export *
424 }
425 module scoped_allocator {
426 header "scoped_allocator"
427 export *
428 }
Olivier Giroux161e6e82020-02-18 09:58:34 -0500429 module semaphore {
Raphael Isemann95e3ba22020-02-24 20:20:54 +0100430 requires cplusplus14
Olivier Giroux161e6e82020-02-18 09:58:34 -0500431 header "semaphore"
432 export *
433 }
Richard Smith31cfef02014-05-21 00:33:49 +0000434 module set {
435 header "set"
436 export initializer_list
437 export *
438 }
439 module sstream {
440 header "sstream"
441 // FIXME: should re-export istream, ostream, ios, streambuf, string?
442 export *
443 }
444 module stack {
445 header "stack"
446 export initializer_list
447 export *
448 }
449 module stdexcept {
450 header "stdexcept"
451 export *
452 }
453 module streambuf {
454 header "streambuf"
455 export *
456 }
457 module string {
458 header "string"
459 export initializer_list
Eric Fiselier2d357f72016-12-05 23:53:23 +0000460 export string_view
461 export __string
462 export *
463 }
464 module string_view {
465 header "string_view"
466 export initializer_list
467 export __string
Richard Smith31cfef02014-05-21 00:33:49 +0000468 export *
469 }
470 module strstream {
471 header "strstream"
Eric Fiselierbdc20862016-12-05 23:16:07 +0000472 export *
Richard Smith31cfef02014-05-21 00:33:49 +0000473 }
474 module system_error {
475 header "system_error"
476 export *
477 }
478 module thread {
479 header "thread"
480 export *
481 }
482 module tuple {
483 header "tuple"
484 export *
485 }
486 module type_traits {
487 header "type_traits"
488 export *
489 }
490 module typeindex {
491 header "typeindex"
492 export *
493 }
494 module typeinfo {
495 header "typeinfo"
496 export *
497 }
498 module unordered_map {
499 header "unordered_map"
500 export initializer_list
501 export *
502 }
503 module unordered_set {
504 header "unordered_set"
505 export initializer_list
506 export *
507 }
508 module utility {
509 header "utility"
510 export initializer_list
511 export *
512 }
513 module valarray {
514 header "valarray"
515 export initializer_list
516 export *
517 }
Eric Fiselier006458b2016-12-05 23:33:19 +0000518 module variant {
519 header "variant"
520 export *
521 }
Richard Smith31cfef02014-05-21 00:33:49 +0000522 module vector {
523 header "vector"
524 export initializer_list
525 export *
526 }
Eric Fiseliera604a7d2018-04-04 04:21:54 +0000527 module version {
528 header "version"
529 export *
530 }
Richard Smith31cfef02014-05-21 00:33:49 +0000531
532 // FIXME: These should be private.
Thorsten Schütt90821092021-01-18 13:21:00 +0100533 module __bits { header "__bits" export * }
Richard Smith31cfef02014-05-21 00:33:49 +0000534 module __bit_reference { header "__bit_reference" export * }
Richard Smith31cfef02014-05-21 00:33:49 +0000535 module __debug { header "__debug" export * }
Zhihao Yuan1f3533c2018-07-03 03:25:10 +0000536 module __errc { header "__errc" export * }
Richard Smith31cfef02014-05-21 00:33:49 +0000537 module __functional_base { header "__functional_base" export * }
538 module __hash_table { header "__hash_table" export * }
539 module __locale { header "__locale" export * }
540 module __mutex_base { header "__mutex_base" export * }
541 module __split_buffer { header "__split_buffer" export * }
542 module __sso_allocator { header "__sso_allocator" export * }
543 module __std_stream { header "__std_stream" export * }
Eric Fiselier2d357f72016-12-05 23:53:23 +0000544 module __string { header "__string" export * }
Richard Smith31cfef02014-05-21 00:33:49 +0000545 module __tree { header "__tree" export * }
546 module __tuple { header "__tuple" export * }
Eric Fiselierf4433a32017-05-31 22:07:49 +0000547 module __undef_macros { header "__undef_macros" export * }
Erik Pilkingtonc37a3d82018-08-01 01:33:38 +0000548 module __node_handle { header "__node_handle" export * }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000549
550 module experimental {
Eric Fiselier92ae1af2016-12-06 01:34:24 +0000551 requires cplusplus11
552
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000553 module algorithm {
554 header "experimental/algorithm"
555 export *
556 }
Eric Fiselierf0426152017-05-25 23:39:29 +0000557 module coroutine {
Eric Fiseliere4a3dab2017-05-29 23:17:28 +0000558 requires coroutines
Eric Fiselierf0426152017-05-25 23:39:29 +0000559 header "experimental/coroutine"
560 export *
561 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000562 module deque {
563 header "experimental/deque"
564 export *
565 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000566 module filesystem {
567 header "experimental/filesystem"
568 export *
569 }
570 module forward_list {
571 header "experimental/forward_list"
572 export *
573 }
574 module functional {
575 header "experimental/functional"
576 export *
577 }
578 module iterator {
579 header "experimental/iterator"
580 export *
581 }
582 module list {
583 header "experimental/list"
584 export *
585 }
586 module map {
587 header "experimental/map"
588 export *
589 }
590 module memory_resource {
591 header "experimental/memory_resource"
592 export *
593 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000594 module propagate_const {
595 header "experimental/propagate_const"
596 export *
597 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000598 module regex {
599 header "experimental/regex"
600 export *
601 }
Tim Shen158e51b2018-04-23 21:54:06 +0000602 module simd {
603 header "experimental/simd"
604 export *
605 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000606 module set {
607 header "experimental/set"
608 export *
609 }
Marshall Clowd2ad87e2018-07-24 03:01:02 +0000610 module span {
611 header "span"
612 export *
613 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000614 module string {
615 header "experimental/string"
616 export *
617 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000618 module type_traits {
619 header "experimental/type_traits"
620 export *
621 }
622 module unordered_map {
623 header "experimental/unordered_map"
624 export *
625 }
626 module unordered_set {
627 header "experimental/unordered_set"
628 export *
629 }
630 module utility {
631 header "experimental/utility"
632 export *
633 }
634 module vector {
635 header "experimental/vector"
636 export *
637 }
638 // FIXME these should be private
639 module __memory {
640 header "experimental/__memory"
641 export *
642 }
643 } // end experimental
Richard Smith31cfef02014-05-21 00:33:49 +0000644}