blob: 0485c2a7cd97dac5fb0e05ef68e7602fd81719c1 [file] [log] [blame]
Richard Smith31cfef02014-05-21 00:33:49 +00001module std [system] {
2 // FIXME: The standard does not require that each of these submodules
3 // re-exports its imported modules. We should provide an alternative form of
4 // export that issues a warning if a name from the submodule is used, and
5 // use that to provide a 'strict mode' for libc++.
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +00006
7 // Deprecated C-compatibility headers. These can all be included from within
8 // an 'extern "C"' context.
9 module depr [extern_c] {
10 // <assert.h> provided by C library.
11 module ctype_h {
12 header "ctype.h"
13 export *
14 }
15 module errno_h {
16 header "errno.h"
17 export *
18 }
19 // <fenv.h> provided by C library.
20 // <float.h> provided by compiler or C library.
21 module inttypes_h {
22 header "inttypes.h"
23 export stdint_h
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000024 export *
25 }
26 // <iso646.h> provided by compiler.
27 // <limits.h> provided by compiler or C library.
Eric Fiselierc6213332016-11-19 01:14:15 +000028 module locale_h {
29 header "locale.h"
Eric Fiselierc6213332016-11-19 01:14:15 +000030 export *
31 }
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000032 module math_h {
33 header "math.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000034 export *
35 }
36 module setjmp_h {
37 header "setjmp.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000038 export *
39 }
40 // FIXME: <stdalign.h> is missing.
41 // <signal.h> provided by C library.
42 // <stdarg.h> provided by compiler.
Eric Fiselier8167e292016-12-06 09:41:50 +000043 module stdbool_h {
44 header "stdbool.h"
45 export *
46 }
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000047 module stddef_h {
48 // <stddef.h>'s __need_* macros require textual inclusion.
49 textual header "stddef.h"
50 }
Eric Fiseliercbda4fb2016-11-22 20:05:19 +000051 module stdint_h {
52 header "stdint.h"
53 export *
54 // FIXME: This module only exists on OS X and for some reason the
55 // wildcard above doesn't export it.
56 export Darwin.C.stdint
57 }
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000058 module stdio_h {
59 // <stdio.h>'s __need_* macros require textual inclusion.
60 textual header "stdio.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000061 export *
Eric Fiselier3b733092016-12-06 07:40:46 +000062 export Darwin.C.stdio
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000063 }
64 module stdlib_h {
65 // <stdlib.h>'s __need_* macros require textual inclusion.
66 textual header "stdlib.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000067 export *
68 }
69 module string_h {
70 header "string.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000071 export *
72 }
73 // FIXME: <uchar.h> is missing.
74 // <time.h> provided by C library.
75 module wchar_h {
76 // <wchar.h>'s __need_* macros require textual inclusion.
77 textual header "wchar.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000078 export *
79 }
80 module wctype_h {
81 header "wctype.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000082 export *
83 }
84 }
85
86 // <complex.h> and <tgmath.h> are not C headers in any real sense, do not
87 // allow their use in extern "C" contexts.
88 module complex_h {
89 header "complex.h"
90 export ccomplex
91 export *
92 }
93 module tgmath_h {
94 header "tgmath.h"
95 export ccomplex
96 export cmath
97 export *
98 }
99
100 // C compatibility headers.
101 module compat {
102 module cassert {
103 // <cassert>'s use of NDEBUG requires textual inclusion.
104 textual header "cassert"
105 }
106 module ccomplex {
107 header "ccomplex"
108 export complex
109 export *
110 }
111 module cctype {
112 header "cctype"
113 export *
114 }
115 module cerrno {
116 header "cerrno"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000117 export *
118 }
119 module cfenv {
120 header "cfenv"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000121 export *
122 }
123 module cfloat {
124 header "cfloat"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000125 export *
126 }
127 module cinttypes {
128 header "cinttypes"
129 export cstdint
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000130 export *
131 }
132 module ciso646 {
133 header "ciso646"
134 export *
135 }
136 module climits {
137 header "climits"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000138 export *
139 }
140 module clocale {
141 header "clocale"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000142 export *
143 }
144 module cmath {
145 header "cmath"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000146 export *
147 }
148 module csetjmp {
149 header "csetjmp"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000150 export *
151 }
152 module csignal {
153 header "csignal"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000154 export *
155 }
156 // FIXME: <cstdalign> is missing.
157 module cstdarg {
158 header "cstdarg"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000159 export *
160 }
161 module cstdbool {
162 header "cstdbool"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000163 export *
164 }
165 module cstddef {
166 header "cstddef"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000167 export *
168 }
169 module cstdint {
170 header "cstdint"
Eric Fiseliercbda4fb2016-11-22 20:05:19 +0000171 export depr.stdint_h
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000172 export *
173 }
174 module cstdio {
175 header "cstdio"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000176 export *
177 }
178 module cstdlib {
179 header "cstdlib"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000180 export *
181 }
182 module cstring {
183 header "cstring"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000184 export *
185 }
186 module ctgmath {
187 header "ctgmath"
188 export ccomplex
189 export cmath
190 export *
191 }
192 module ctime {
193 header "ctime"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000194 export *
195 }
196 // FIXME: <cuchar> is missing.
197 module cwchar {
198 header "cwchar"
Eric Fiselier3b733092016-12-06 07:40:46 +0000199 export depr.stdio_h
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000200 export *
201 }
202 module cwctype {
203 header "cwctype"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000204 export *
205 }
206 }
207
Richard Smith31cfef02014-05-21 00:33:49 +0000208 module algorithm {
209 header "algorithm"
210 export initializer_list
211 export *
212 }
Eric Fiselier006458b2016-12-05 23:33:19 +0000213 module any {
214 header "any"
215 export *
216 }
Richard Smith31cfef02014-05-21 00:33:49 +0000217 module array {
218 header "array"
219 export initializer_list
220 export *
221 }
222 module atomic {
223 header "atomic"
224 export *
Richard Smith31cfef02014-05-21 00:33:49 +0000225 }
226 module bitset {
227 header "bitset"
228 export string
229 export iosfwd
230 export *
231 }
232 // No submodule for cassert. It fundamentally needs repeated, textual inclusion.
Richard Smith31cfef02014-05-21 00:33:49 +0000233 module chrono {
234 header "chrono"
235 export *
236 }
Richard Smith31cfef02014-05-21 00:33:49 +0000237 module codecvt {
238 header "codecvt"
239 export *
240 }
241 module complex {
242 header "complex"
243 export *
244 }
245 module condition_variable {
246 header "condition_variable"
247 export *
248 }
Richard Smith31cfef02014-05-21 00:33:49 +0000249 module deque {
250 header "deque"
251 export initializer_list
252 export *
253 }
254 module exception {
255 header "exception"
256 export *
257 }
258 module forward_list {
259 header "forward_list"
260 export initializer_list
261 export *
262 }
263 module fstream {
264 header "fstream"
265 export *
266 }
267 module functional {
268 header "functional"
269 export *
270 }
271 module future {
272 header "future"
273 export *
274 }
275 module initializer_list {
276 header "initializer_list"
277 export *
278 }
279 module iomanip {
280 header "iomanip"
281 export *
282 }
283 module ios {
284 header "ios"
285 export iosfwd
286 export *
287 }
288 module iosfwd {
289 header "iosfwd"
290 export *
291 }
292 module iostream {
293 header "iostream"
294 export ios
295 export streambuf
296 export istream
297 export ostream
298 export *
299 }
300 module istream {
301 header "istream"
302 // FIXME: should re-export ios, streambuf?
303 export *
304 }
305 module iterator {
306 header "iterator"
307 export *
308 }
309 module limits {
310 header "limits"
311 export *
312 }
313 module list {
314 header "list"
315 export initializer_list
316 export *
317 }
318 module locale {
319 header "locale"
320 export *
321 }
322 module map {
323 header "map"
324 export initializer_list
325 export *
326 }
327 module memory {
328 header "memory"
329 export *
330 }
331 module mutex {
332 header "mutex"
333 export *
334 }
335 module new {
336 header "new"
337 export *
338 }
339 module numeric {
340 header "numeric"
341 export *
342 }
Eric Fiselier006458b2016-12-05 23:33:19 +0000343 module optional {
344 header "optional"
345 export *
346 }
Richard Smith31cfef02014-05-21 00:33:49 +0000347 module ostream {
348 header "ostream"
349 // FIXME: should re-export ios, streambuf?
350 export *
351 }
352 module queue {
353 header "queue"
354 export initializer_list
355 export *
356 }
357 module random {
358 header "random"
359 export initializer_list
360 export *
361 }
362 module ratio {
363 header "ratio"
364 export *
365 }
366 module regex {
367 header "regex"
368 export initializer_list
369 export *
370 }
371 module scoped_allocator {
372 header "scoped_allocator"
373 export *
374 }
375 module set {
376 header "set"
377 export initializer_list
378 export *
379 }
380 module sstream {
381 header "sstream"
382 // FIXME: should re-export istream, ostream, ios, streambuf, string?
383 export *
384 }
385 module stack {
386 header "stack"
387 export initializer_list
388 export *
389 }
390 module stdexcept {
391 header "stdexcept"
392 export *
393 }
394 module streambuf {
395 header "streambuf"
396 export *
397 }
398 module string {
399 header "string"
400 export initializer_list
Eric Fiselier2d357f72016-12-05 23:53:23 +0000401 export string_view
402 export __string
403 export *
404 }
405 module string_view {
406 header "string_view"
407 export initializer_list
408 export __string
Richard Smith31cfef02014-05-21 00:33:49 +0000409 export *
410 }
411 module strstream {
412 header "strstream"
Eric Fiselierbdc20862016-12-05 23:16:07 +0000413 export *
Richard Smith31cfef02014-05-21 00:33:49 +0000414 }
415 module system_error {
416 header "system_error"
417 export *
418 }
419 module thread {
420 header "thread"
421 export *
422 }
423 module tuple {
424 header "tuple"
425 export *
426 }
427 module type_traits {
428 header "type_traits"
429 export *
430 }
431 module typeindex {
432 header "typeindex"
433 export *
434 }
435 module typeinfo {
436 header "typeinfo"
437 export *
438 }
439 module unordered_map {
440 header "unordered_map"
441 export initializer_list
442 export *
443 }
444 module unordered_set {
445 header "unordered_set"
446 export initializer_list
447 export *
448 }
449 module utility {
450 header "utility"
451 export initializer_list
452 export *
453 }
454 module valarray {
455 header "valarray"
456 export initializer_list
457 export *
458 }
Eric Fiselier006458b2016-12-05 23:33:19 +0000459 module variant {
460 header "variant"
461 export *
462 }
Richard Smith31cfef02014-05-21 00:33:49 +0000463 module vector {
464 header "vector"
465 export initializer_list
466 export *
467 }
468
Richard Smith2d1b6372015-10-13 22:13:33 +0000469 // FIXME: We don't have modules for the <foo.h> headers, because they might
470 // be included from the C library's headers, and that would create a #include
471 // cycle. For the same reason, we don't have a module for __config.
472 //module __config { header "__config" export * }
473
Richard Smith31cfef02014-05-21 00:33:49 +0000474 // FIXME: These should be private.
475 module __bit_reference { header "__bit_reference" export * }
Richard Smith31cfef02014-05-21 00:33:49 +0000476 module __debug { header "__debug" export * }
477 module __functional_base { header "__functional_base" export * }
478 module __hash_table { header "__hash_table" export * }
479 module __locale { header "__locale" export * }
480 module __mutex_base { header "__mutex_base" export * }
481 module __split_buffer { header "__split_buffer" export * }
482 module __sso_allocator { header "__sso_allocator" export * }
483 module __std_stream { header "__std_stream" export * }
Eric Fiselier2d357f72016-12-05 23:53:23 +0000484 module __string { header "__string" export * }
Richard Smith31cfef02014-05-21 00:33:49 +0000485 module __tree { header "__tree" export * }
486 module __tuple { header "__tuple" export * }
487 module __undef_min_max { header "__undef_min_max" export * }
Saleem Abdulrasooldcf27a62015-02-13 22:15:32 +0000488 module __undef___deallocate { header "__undef___deallocate" export * }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000489
490 module experimental {
Eric Fiselier92ae1af2016-12-06 01:34:24 +0000491 requires cplusplus11
492
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000493 module algorithm {
494 header "experimental/algorithm"
495 export *
496 }
497 module any {
498 header "experimental/any"
499 export *
500 }
501 module chrono {
502 header "experimental/chrono"
503 export *
504 }
505 module deque {
506 header "experimental/deque"
507 export *
508 }
509 module dynarray {
510 header "experimental/dynarray"
511 export *
512 }
513 module filesystem {
514 header "experimental/filesystem"
515 export *
516 }
517 module forward_list {
518 header "experimental/forward_list"
519 export *
520 }
521 module functional {
522 header "experimental/functional"
523 export *
524 }
525 module iterator {
526 header "experimental/iterator"
527 export *
528 }
529 module list {
530 header "experimental/list"
531 export *
532 }
533 module map {
534 header "experimental/map"
535 export *
536 }
537 module memory_resource {
538 header "experimental/memory_resource"
539 export *
540 }
541 module numeric {
542 header "experimental/numeric"
543 export *
544 }
545 module optional {
546 header "experimental/optional"
547 export *
548 }
549 module propagate_const {
550 header "experimental/propagate_const"
551 export *
552 }
553 module ratio {
554 header "experimental/ratio"
555 export *
556 }
557 module regex {
558 header "experimental/regex"
559 export *
560 }
561 module set {
562 header "experimental/set"
563 export *
564 }
565 module string {
566 header "experimental/string"
567 export *
568 }
569 module string_view {
570 header "experimental/string_view"
571 export *
572 }
573 module system_error {
574 header "experimental/system_error"
575 export *
576 }
577 module tuple {
578 header "experimental/tuple"
579 export *
580 }
581 module type_traits {
582 header "experimental/type_traits"
583 export *
584 }
585 module unordered_map {
586 header "experimental/unordered_map"
587 export *
588 }
589 module unordered_set {
590 header "experimental/unordered_set"
591 export *
592 }
593 module utility {
594 header "experimental/utility"
595 export *
596 }
597 module vector {
598 header "experimental/vector"
599 export *
600 }
601 // FIXME these should be private
602 module __memory {
603 header "experimental/__memory"
604 export *
605 }
606 } // end experimental
Richard Smith31cfef02014-05-21 00:33:49 +0000607}