blob: a52c014fe2f3d1f2bf86943fff527b66346f901c [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 {
Christopher Di Bella8bbdde42021-06-02 19:46:20 +0000263 requires cplusplus20
Eric Fiseliere0074fc2018-04-06 21:37:23 +0000264 header "compare"
265 export *
266 }
Richard Smith31cfef02014-05-21 00:33:49 +0000267 module complex {
268 header "complex"
269 export *
270 }
Eric Fiselierd59a0322020-04-08 18:00:13 -0400271 module concepts {
Christopher Di Bella8bbdde42021-06-02 19:46:20 +0000272 requires cplusplus20
Eric Fiselierd59a0322020-04-08 18:00:13 -0400273 header "concepts"
274 export *
275 }
Richard Smith31cfef02014-05-21 00:33:49 +0000276 module condition_variable {
277 header "condition_variable"
278 export *
279 }
Richard Smith31cfef02014-05-21 00:33:49 +0000280 module deque {
281 header "deque"
282 export initializer_list
283 export *
284 }
285 module exception {
286 header "exception"
287 export *
288 }
Louis Dionne59d0b3c2019-08-05 18:29:14 +0000289 module execution {
290 header "execution"
291 export *
292 }
Eric Fiselier02cea5e2018-07-27 03:07:09 +0000293 module filesystem {
294 header "filesystem"
295 export *
296 }
Mark de Weverdf5fd832020-11-26 19:12:18 +0100297 module format {
Christopher Di Bella8bbdde42021-06-02 19:46:20 +0000298 requires cplusplus20
Mark de Weverdf5fd832020-11-26 19:12:18 +0100299 header "format"
300 export *
Christopher Di Bella8bbdde42021-06-02 19:46:20 +0000301
302 module __format {
303 module format_error { header "__format/format_error.h" }
304 module format_parse_context { header "__format/format_parse_context.h" }
305 }
Mark de Weverdf5fd832020-11-26 19:12:18 +0100306 }
Richard Smith31cfef02014-05-21 00:33:49 +0000307 module forward_list {
308 header "forward_list"
309 export initializer_list
310 export *
311 }
312 module fstream {
313 header "fstream"
314 export *
315 }
316 module functional {
317 header "functional"
318 export *
319 }
320 module future {
321 header "future"
322 export *
323 }
324 module initializer_list {
325 header "initializer_list"
326 export *
327 }
328 module iomanip {
329 header "iomanip"
330 export *
331 }
332 module ios {
333 header "ios"
334 export iosfwd
335 export *
336 }
337 module iosfwd {
338 header "iosfwd"
339 export *
340 }
341 module iostream {
342 header "iostream"
343 export ios
344 export streambuf
345 export istream
346 export ostream
347 export *
348 }
349 module istream {
350 header "istream"
351 // FIXME: should re-export ios, streambuf?
352 export *
353 }
354 module iterator {
355 header "iterator"
356 export *
Christopher Di Bella8bbdde42021-06-02 19:46:20 +0000357
358 module __iterator {
359 module advance { header "__iterator/advance.h" }
360 module concepts { header "__iterator/concepts.h" }
361 module default_sentinel { header "__iterator/default_sentinel.h" }
362 module incrementable_traits { header "__iterator/incrementable_traits.h" }
363 module indirect_concepts { header "__iterator/indirect_concepts.h" }
364 module iter_move { header "__iterator/iter_move.h" }
365 module iterator_traits { header "__iterator/iterator_traits.h" }
366 module next { header "__iterator/next.h" }
367 module prev { header "__iterator/prev.h" }
368 module projected { header "__iterator/projected.h" }
369 module readable_traits { header "__iterator/readable_traits.h" }
370 }
Richard Smith31cfef02014-05-21 00:33:49 +0000371 }
Olivier Giroux161e6e82020-02-18 09:58:34 -0500372 module latch {
Raphael Isemann95e3ba22020-02-24 20:20:54 +0100373 requires cplusplus14
Olivier Giroux161e6e82020-02-18 09:58:34 -0500374 header "latch"
375 export *
376 }
Richard Smith31cfef02014-05-21 00:33:49 +0000377 module limits {
378 header "limits"
379 export *
380 }
381 module list {
382 header "list"
383 export initializer_list
384 export *
385 }
386 module locale {
387 header "locale"
388 export *
389 }
390 module map {
391 header "map"
392 export initializer_list
393 export *
394 }
395 module memory {
396 header "memory"
397 export *
Christopher Di Bella8bbdde42021-06-02 19:46:20 +0000398
399 module __memory {
400 module addressof { header "__memory/addressof.h" }
401 module allocation_guard { header "__memory/allocation_guard.h" }
402 module allocator_traits { header "__memory/allocator_traits.h" }
403 module allocator { header "__memory/allocator.h" }
404 module auto_ptr { header "__memory/auto_ptr.h" }
405 module compressed_pair { header "__memory/compressed_pair.h" }
406 module construct_at { header "__memory/construct_at.h" }
407 module pointer_safety { header "__memory/pointer_safety.h" }
408 module pointer_traits { header "__memory/pointer_traits.h" }
409 module raw_storage_iterator { header "__memory/raw_storage_iterator.h" }
410 module shared_ptr { header "__memory/shared_ptr.h" }
411 module temporary_buffer { header "__memory/temporary_buffer.h" }
412 module uninitialized_algorithms { header "__memory/uninitialized_algorithms.h" }
413 module unique_ptr { header "__memory/unique_ptr.h" }
414 }
Richard Smith31cfef02014-05-21 00:33:49 +0000415 }
416 module mutex {
417 header "mutex"
418 export *
419 }
420 module new {
421 header "new"
422 export *
423 }
Raul Tambreafcedea2020-06-19 12:43:33 +0530424 module numbers {
425 header "numbers"
426 export *
427 }
Richard Smith31cfef02014-05-21 00:33:49 +0000428 module numeric {
429 header "numeric"
430 export *
431 }
Eric Fiselier006458b2016-12-05 23:33:19 +0000432 module optional {
433 header "optional"
434 export *
435 }
Richard Smith31cfef02014-05-21 00:33:49 +0000436 module ostream {
437 header "ostream"
438 // FIXME: should re-export ios, streambuf?
439 export *
440 }
441 module queue {
442 header "queue"
443 export initializer_list
444 export *
445 }
446 module random {
447 header "random"
448 export initializer_list
449 export *
450 }
Mark de Weveraf59b2d2020-11-24 18:08:02 +0100451 module ranges {
Christopher Di Bella8bbdde42021-06-02 19:46:20 +0000452 requires cplusplus20
Mark de Weveraf59b2d2020-11-24 18:08:02 +0100453 header "ranges"
Christopher Di Bella66ce1292021-04-11 05:08:32 +0000454 export compare
455 export initializer_list
456 export iterator
Mark de Weveraf59b2d2020-11-24 18:08:02 +0100457 export *
Christopher Di Bella8bbdde42021-06-02 19:46:20 +0000458
459 module __ranges {
460 module access { header "__ranges/access.h" }
461 module concepts { header "__ranges/concepts.h" }
462 module data { header "__ranges/data.h" }
463 module empty { header "__ranges/empty.h" }
464 module enabled_borrowed_range { header "__ranges/enabled_borrowed_range.h" }
465 module size { header "__ranges/size.h" }
466 module view_interface { header "__ranges/view_interface.h" }
467 module view { header "__ranges/view.h" }
468 }
Mark de Weveraf59b2d2020-11-24 18:08:02 +0100469 }
Richard Smith31cfef02014-05-21 00:33:49 +0000470 module ratio {
471 header "ratio"
472 export *
473 }
474 module regex {
475 header "regex"
476 export initializer_list
477 export *
478 }
479 module scoped_allocator {
480 header "scoped_allocator"
481 export *
482 }
Olivier Giroux161e6e82020-02-18 09:58:34 -0500483 module semaphore {
Raphael Isemann95e3ba22020-02-24 20:20:54 +0100484 requires cplusplus14
Olivier Giroux161e6e82020-02-18 09:58:34 -0500485 header "semaphore"
486 export *
487 }
Richard Smith31cfef02014-05-21 00:33:49 +0000488 module set {
489 header "set"
490 export initializer_list
491 export *
492 }
493 module sstream {
494 header "sstream"
495 // FIXME: should re-export istream, ostream, ios, streambuf, string?
496 export *
497 }
498 module stack {
499 header "stack"
500 export initializer_list
501 export *
502 }
503 module stdexcept {
504 header "stdexcept"
505 export *
506 }
507 module streambuf {
508 header "streambuf"
509 export *
510 }
511 module string {
512 header "string"
513 export initializer_list
Eric Fiselier2d357f72016-12-05 23:53:23 +0000514 export string_view
515 export __string
516 export *
517 }
518 module string_view {
519 header "string_view"
520 export initializer_list
521 export __string
Richard Smith31cfef02014-05-21 00:33:49 +0000522 export *
523 }
524 module strstream {
525 header "strstream"
Eric Fiselierbdc20862016-12-05 23:16:07 +0000526 export *
Richard Smith31cfef02014-05-21 00:33:49 +0000527 }
528 module system_error {
529 header "system_error"
530 export *
531 }
532 module thread {
533 header "thread"
534 export *
535 }
536 module tuple {
537 header "tuple"
538 export *
539 }
540 module type_traits {
541 header "type_traits"
542 export *
543 }
544 module typeindex {
545 header "typeindex"
546 export *
547 }
548 module typeinfo {
549 header "typeinfo"
550 export *
551 }
552 module unordered_map {
553 header "unordered_map"
554 export initializer_list
555 export *
556 }
557 module unordered_set {
558 header "unordered_set"
559 export initializer_list
560 export *
561 }
562 module utility {
563 header "utility"
564 export initializer_list
565 export *
Christopher Di Bella8bbdde42021-06-02 19:46:20 +0000566
567 module __utility {
568 module to_underlying {
569 header "__utility/to_underlying.h"
570 }
571 }
Richard Smith31cfef02014-05-21 00:33:49 +0000572 }
573 module valarray {
574 header "valarray"
575 export initializer_list
576 export *
577 }
Eric Fiselier006458b2016-12-05 23:33:19 +0000578 module variant {
579 header "variant"
580 export *
581 }
Richard Smith31cfef02014-05-21 00:33:49 +0000582 module vector {
583 header "vector"
584 export initializer_list
585 export *
586 }
Eric Fiseliera604a7d2018-04-04 04:21:54 +0000587 module version {
588 header "version"
589 export *
590 }
Richard Smith31cfef02014-05-21 00:33:49 +0000591
592 // FIXME: These should be private.
Christopher Di Bella8bbdde42021-06-02 19:46:20 +0000593 module __availability { header "__availability" export * }
594 module __bit_reference { header "__bit_reference" export * }
595 module __bits { header "__bits" export * }
596 module __config { header "__config" export * }
597 module __debug { header "__debug" export * }
598 module __errc { header "__errc" export * }
599 module __function_like { header "__function_like.h" export * }
600 module __functional_base { header "__functional_base" export * }
601 // TODO: modularise __functional_(base_)?03
602 module __hash_table { header "__hash_table" export * }
603 // libcpp_version not modularised since it's just a version number
604 module __locale { header "__locale" export * }
605 module __mutex_base { header "__mutex_base" export * }
606 module __node_handle { header "__node_handle" export * }
607 module __nullptr { header "__nullptr" export * }
608 module __split_buffer { header "__split_buffer" export * }
609 module __std_stream { header "__std_stream" export * }
610 module __string { header "__string" export * }
611 module __threading_support { header "__threading_support" export * }
612 module __tree { header "__tree" export * }
613 module __tuple { header "__tuple" export * }
614 module __undef_macros { header "__undef_macros" export * }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000615
616 module experimental {
Eric Fiselier92ae1af2016-12-06 01:34:24 +0000617 requires cplusplus11
618
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000619 module algorithm {
620 header "experimental/algorithm"
621 export *
622 }
Eric Fiselierf0426152017-05-25 23:39:29 +0000623 module coroutine {
Eric Fiseliere4a3dab2017-05-29 23:17:28 +0000624 requires coroutines
Eric Fiselierf0426152017-05-25 23:39:29 +0000625 header "experimental/coroutine"
626 export *
627 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000628 module deque {
629 header "experimental/deque"
630 export *
631 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000632 module filesystem {
633 header "experimental/filesystem"
634 export *
635 }
636 module forward_list {
637 header "experimental/forward_list"
638 export *
639 }
640 module functional {
641 header "experimental/functional"
642 export *
643 }
644 module iterator {
645 header "experimental/iterator"
646 export *
647 }
648 module list {
649 header "experimental/list"
650 export *
651 }
652 module map {
653 header "experimental/map"
654 export *
655 }
656 module memory_resource {
657 header "experimental/memory_resource"
658 export *
659 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000660 module propagate_const {
661 header "experimental/propagate_const"
662 export *
663 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000664 module regex {
665 header "experimental/regex"
666 export *
667 }
Tim Shen158e51b2018-04-23 21:54:06 +0000668 module simd {
669 header "experimental/simd"
670 export *
671 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000672 module set {
673 header "experimental/set"
674 export *
675 }
Marshall Clowd2ad87e2018-07-24 03:01:02 +0000676 module span {
677 header "span"
678 export *
679 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000680 module string {
681 header "experimental/string"
682 export *
683 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000684 module type_traits {
685 header "experimental/type_traits"
686 export *
687 }
688 module unordered_map {
689 header "experimental/unordered_map"
690 export *
691 }
692 module unordered_set {
693 header "experimental/unordered_set"
694 export *
695 }
696 module utility {
697 header "experimental/utility"
698 export *
699 }
700 module vector {
701 header "experimental/vector"
702 export *
703 }
704 // FIXME these should be private
705 module __memory {
706 header "experimental/__memory"
707 export *
708 }
709 } // end experimental
Richard Smith31cfef02014-05-21 00:33:49 +0000710}