blob: 6d88f52113cb70d5c27c21db00bb6751ad6a2791 [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 }
Marshall Clowbf32ec92018-08-17 16:07:48 +0000231 module bit {
232 header "bit"
233 export *
234 }
Richard Smith31cfef02014-05-21 00:33:49 +0000235 module bitset {
236 header "bitset"
237 export string
238 export iosfwd
239 export *
240 }
241 // No submodule for cassert. It fundamentally needs repeated, textual inclusion.
Zhihao Yuan7bf19052018-08-01 02:38:30 +0000242 module charconv {
243 header "charconv"
244 export *
245 }
Richard Smith31cfef02014-05-21 00:33:49 +0000246 module chrono {
247 header "chrono"
248 export *
249 }
Richard Smith31cfef02014-05-21 00:33:49 +0000250 module codecvt {
251 header "codecvt"
252 export *
253 }
Eric Fiseliere0074fc2018-04-06 21:37:23 +0000254 module compare {
255 header "compare"
256 export *
257 }
Richard Smith31cfef02014-05-21 00:33:49 +0000258 module complex {
259 header "complex"
260 export *
261 }
262 module condition_variable {
263 header "condition_variable"
264 export *
265 }
Richard Smith31cfef02014-05-21 00:33:49 +0000266 module deque {
267 header "deque"
268 export initializer_list
269 export *
270 }
271 module exception {
272 header "exception"
273 export *
274 }
Eric Fiselier02cea5e2018-07-27 03:07:09 +0000275 module filesystem {
276 header "filesystem"
277 export *
278 }
Richard Smith31cfef02014-05-21 00:33:49 +0000279 module forward_list {
280 header "forward_list"
281 export initializer_list
282 export *
283 }
284 module fstream {
285 header "fstream"
286 export *
287 }
288 module functional {
289 header "functional"
290 export *
291 }
292 module future {
293 header "future"
294 export *
295 }
296 module initializer_list {
297 header "initializer_list"
298 export *
299 }
300 module iomanip {
301 header "iomanip"
302 export *
303 }
304 module ios {
305 header "ios"
306 export iosfwd
307 export *
308 }
309 module iosfwd {
310 header "iosfwd"
311 export *
312 }
313 module iostream {
314 header "iostream"
315 export ios
316 export streambuf
317 export istream
318 export ostream
319 export *
320 }
321 module istream {
322 header "istream"
323 // FIXME: should re-export ios, streambuf?
324 export *
325 }
326 module iterator {
327 header "iterator"
328 export *
329 }
330 module limits {
331 header "limits"
332 export *
333 }
334 module list {
335 header "list"
336 export initializer_list
337 export *
338 }
339 module locale {
340 header "locale"
341 export *
342 }
343 module map {
344 header "map"
345 export initializer_list
346 export *
347 }
348 module memory {
349 header "memory"
350 export *
351 }
352 module mutex {
353 header "mutex"
354 export *
355 }
356 module new {
357 header "new"
358 export *
359 }
360 module numeric {
361 header "numeric"
362 export *
363 }
Eric Fiselier006458b2016-12-05 23:33:19 +0000364 module optional {
365 header "optional"
366 export *
367 }
Richard Smith31cfef02014-05-21 00:33:49 +0000368 module ostream {
369 header "ostream"
370 // FIXME: should re-export ios, streambuf?
371 export *
372 }
373 module queue {
374 header "queue"
375 export initializer_list
376 export *
377 }
378 module random {
379 header "random"
380 export initializer_list
381 export *
382 }
383 module ratio {
384 header "ratio"
385 export *
386 }
387 module regex {
388 header "regex"
389 export initializer_list
390 export *
391 }
392 module scoped_allocator {
393 header "scoped_allocator"
394 export *
395 }
396 module set {
397 header "set"
398 export initializer_list
399 export *
400 }
401 module sstream {
402 header "sstream"
403 // FIXME: should re-export istream, ostream, ios, streambuf, string?
404 export *
405 }
406 module stack {
407 header "stack"
408 export initializer_list
409 export *
410 }
411 module stdexcept {
412 header "stdexcept"
413 export *
414 }
415 module streambuf {
416 header "streambuf"
417 export *
418 }
419 module string {
420 header "string"
421 export initializer_list
Eric Fiselier2d357f72016-12-05 23:53:23 +0000422 export string_view
423 export __string
424 export *
425 }
426 module string_view {
427 header "string_view"
428 export initializer_list
429 export __string
Richard Smith31cfef02014-05-21 00:33:49 +0000430 export *
431 }
432 module strstream {
433 header "strstream"
Eric Fiselierbdc20862016-12-05 23:16:07 +0000434 export *
Richard Smith31cfef02014-05-21 00:33:49 +0000435 }
436 module system_error {
437 header "system_error"
438 export *
439 }
440 module thread {
441 header "thread"
442 export *
443 }
444 module tuple {
445 header "tuple"
446 export *
447 }
448 module type_traits {
449 header "type_traits"
450 export *
451 }
452 module typeindex {
453 header "typeindex"
454 export *
455 }
456 module typeinfo {
457 header "typeinfo"
458 export *
459 }
460 module unordered_map {
461 header "unordered_map"
462 export initializer_list
463 export *
464 }
465 module unordered_set {
466 header "unordered_set"
467 export initializer_list
468 export *
469 }
470 module utility {
471 header "utility"
472 export initializer_list
473 export *
474 }
475 module valarray {
476 header "valarray"
477 export initializer_list
478 export *
479 }
Eric Fiselier006458b2016-12-05 23:33:19 +0000480 module variant {
481 header "variant"
482 export *
483 }
Richard Smith31cfef02014-05-21 00:33:49 +0000484 module vector {
485 header "vector"
486 export initializer_list
487 export *
488 }
Eric Fiseliera604a7d2018-04-04 04:21:54 +0000489 module version {
490 header "version"
491 export *
492 }
Richard Smith31cfef02014-05-21 00:33:49 +0000493
494 // FIXME: These should be private.
495 module __bit_reference { header "__bit_reference" export * }
Richard Smith31cfef02014-05-21 00:33:49 +0000496 module __debug { header "__debug" export * }
Zhihao Yuan1f3533c2018-07-03 03:25:10 +0000497 module __errc { header "__errc" export * }
Richard Smith31cfef02014-05-21 00:33:49 +0000498 module __functional_base { header "__functional_base" export * }
499 module __hash_table { header "__hash_table" export * }
500 module __locale { header "__locale" export * }
501 module __mutex_base { header "__mutex_base" export * }
502 module __split_buffer { header "__split_buffer" export * }
503 module __sso_allocator { header "__sso_allocator" export * }
504 module __std_stream { header "__std_stream" export * }
Eric Fiselier2d357f72016-12-05 23:53:23 +0000505 module __string { header "__string" export * }
Richard Smith31cfef02014-05-21 00:33:49 +0000506 module __tree { header "__tree" export * }
507 module __tuple { header "__tuple" export * }
Eric Fiselierf4433a32017-05-31 22:07:49 +0000508 module __undef_macros { header "__undef_macros" export * }
Erik Pilkingtonc37a3d82018-08-01 01:33:38 +0000509 module __node_handle { header "__node_handle" export * }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000510
511 module experimental {
Eric Fiselier92ae1af2016-12-06 01:34:24 +0000512 requires cplusplus11
513
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000514 module algorithm {
515 header "experimental/algorithm"
516 export *
517 }
Eric Fiselierf0426152017-05-25 23:39:29 +0000518 module coroutine {
Eric Fiseliere4a3dab2017-05-29 23:17:28 +0000519 requires coroutines
Eric Fiselierf0426152017-05-25 23:39:29 +0000520 header "experimental/coroutine"
521 export *
522 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000523 module deque {
524 header "experimental/deque"
525 export *
526 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000527 module filesystem {
528 header "experimental/filesystem"
529 export *
530 }
531 module forward_list {
532 header "experimental/forward_list"
533 export *
534 }
535 module functional {
536 header "experimental/functional"
537 export *
538 }
539 module iterator {
540 header "experimental/iterator"
541 export *
542 }
543 module list {
544 header "experimental/list"
545 export *
546 }
547 module map {
548 header "experimental/map"
549 export *
550 }
551 module memory_resource {
552 header "experimental/memory_resource"
553 export *
554 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000555 module propagate_const {
556 header "experimental/propagate_const"
557 export *
558 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000559 module regex {
560 header "experimental/regex"
561 export *
562 }
Tim Shen158e51b2018-04-23 21:54:06 +0000563 module simd {
564 header "experimental/simd"
565 export *
566 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000567 module set {
568 header "experimental/set"
569 export *
570 }
Marshall Clowd2ad87e2018-07-24 03:01:02 +0000571 module span {
572 header "span"
573 export *
574 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000575 module string {
576 header "experimental/string"
577 export *
578 }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000579 module type_traits {
580 header "experimental/type_traits"
581 export *
582 }
583 module unordered_map {
584 header "experimental/unordered_map"
585 export *
586 }
587 module unordered_set {
588 header "experimental/unordered_set"
589 export *
590 }
591 module utility {
592 header "experimental/utility"
593 export *
594 }
595 module vector {
596 header "experimental/vector"
597 export *
598 }
599 // FIXME these should be private
600 module __memory {
601 header "experimental/__memory"
602 export *
603 }
604 } // end experimental
Richard Smith31cfef02014-05-21 00:33:49 +0000605}