blob: 13fa4993f07f66fc897d2e91be23c3e5be717408 [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 Fiselier5163fa12016-12-06 09:48:32 +000043 // <stdbool.h> provided by compiler.
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000044 module stddef_h {
45 // <stddef.h>'s __need_* macros require textual inclusion.
46 textual header "stddef.h"
47 }
Eric Fiseliercbda4fb2016-11-22 20:05:19 +000048 module stdint_h {
49 header "stdint.h"
50 export *
51 // FIXME: This module only exists on OS X and for some reason the
52 // wildcard above doesn't export it.
53 export Darwin.C.stdint
54 }
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000055 module stdio_h {
56 // <stdio.h>'s __need_* macros require textual inclusion.
57 textual header "stdio.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000058 export *
Eric Fiselier3b733092016-12-06 07:40:46 +000059 export Darwin.C.stdio
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000060 }
61 module stdlib_h {
62 // <stdlib.h>'s __need_* macros require textual inclusion.
63 textual header "stdlib.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000064 export *
65 }
66 module string_h {
67 header "string.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000068 export *
69 }
70 // FIXME: <uchar.h> is missing.
71 // <time.h> provided by C library.
72 module wchar_h {
73 // <wchar.h>'s __need_* macros require textual inclusion.
74 textual header "wchar.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000075 export *
76 }
77 module wctype_h {
78 header "wctype.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000079 export *
80 }
81 }
82
83 // <complex.h> and <tgmath.h> are not C headers in any real sense, do not
84 // allow their use in extern "C" contexts.
85 module complex_h {
86 header "complex.h"
87 export ccomplex
88 export *
89 }
90 module tgmath_h {
91 header "tgmath.h"
92 export ccomplex
93 export cmath
94 export *
95 }
96
97 // C compatibility headers.
98 module compat {
99 module cassert {
100 // <cassert>'s use of NDEBUG requires textual inclusion.
101 textual header "cassert"
102 }
103 module ccomplex {
104 header "ccomplex"
105 export complex
106 export *
107 }
108 module cctype {
109 header "cctype"
110 export *
111 }
112 module cerrno {
113 header "cerrno"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000114 export *
115 }
116 module cfenv {
117 header "cfenv"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000118 export *
119 }
120 module cfloat {
121 header "cfloat"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000122 export *
123 }
124 module cinttypes {
125 header "cinttypes"
126 export cstdint
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000127 export *
128 }
129 module ciso646 {
130 header "ciso646"
131 export *
132 }
133 module climits {
134 header "climits"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000135 export *
136 }
137 module clocale {
138 header "clocale"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000139 export *
140 }
141 module cmath {
142 header "cmath"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000143 export *
144 }
145 module csetjmp {
146 header "csetjmp"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000147 export *
148 }
149 module csignal {
150 header "csignal"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000151 export *
152 }
153 // FIXME: <cstdalign> is missing.
154 module cstdarg {
155 header "cstdarg"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000156 export *
157 }
158 module cstdbool {
159 header "cstdbool"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000160 export *
161 }
162 module cstddef {
163 header "cstddef"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000164 export *
165 }
166 module cstdint {
167 header "cstdint"
Eric Fiseliercbda4fb2016-11-22 20:05:19 +0000168 export depr.stdint_h
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000169 export *
170 }
171 module cstdio {
172 header "cstdio"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000173 export *
174 }
175 module cstdlib {
176 header "cstdlib"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000177 export *
178 }
179 module cstring {
180 header "cstring"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000181 export *
182 }
183 module ctgmath {
184 header "ctgmath"
185 export ccomplex
186 export cmath
187 export *
188 }
189 module ctime {
190 header "ctime"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000191 export *
192 }
193 // FIXME: <cuchar> is missing.
194 module cwchar {
195 header "cwchar"
Eric Fiselier3b733092016-12-06 07:40:46 +0000196 export depr.stdio_h
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000197 export *
198 }
199 module cwctype {
200 header "cwctype"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000201 export *
202 }
203 }
204
Richard Smith31cfef02014-05-21 00:33:49 +0000205 module algorithm {
206 header "algorithm"
207 export initializer_list
208 export *
209 }
Eric Fiselier006458b2016-12-05 23:33:19 +0000210 module any {
211 header "any"
212 export *
213 }
Richard Smith31cfef02014-05-21 00:33:49 +0000214 module array {
215 header "array"
216 export initializer_list
217 export *
218 }
219 module atomic {
220 header "atomic"
221 export *
Richard Smith31cfef02014-05-21 00:33:49 +0000222 }
223 module bitset {
224 header "bitset"
225 export string
226 export iosfwd
227 export *
228 }
229 // No submodule for cassert. It fundamentally needs repeated, textual inclusion.
Richard Smith31cfef02014-05-21 00:33:49 +0000230 module chrono {
231 header "chrono"
232 export *
233 }
Richard Smith31cfef02014-05-21 00:33:49 +0000234 module codecvt {
235 header "codecvt"
236 export *
237 }
238 module complex {
239 header "complex"
240 export *
241 }
242 module condition_variable {
243 header "condition_variable"
244 export *
245 }
Richard Smith31cfef02014-05-21 00:33:49 +0000246 module deque {
247 header "deque"
248 export initializer_list
249 export *
250 }
251 module exception {
252 header "exception"
253 export *
254 }
255 module forward_list {
256 header "forward_list"
257 export initializer_list
258 export *
259 }
260 module fstream {
261 header "fstream"
262 export *
263 }
264 module functional {
265 header "functional"
266 export *
267 }
268 module future {
269 header "future"
270 export *
271 }
272 module initializer_list {
273 header "initializer_list"
274 export *
275 }
276 module iomanip {
277 header "iomanip"
278 export *
279 }
280 module ios {
281 header "ios"
282 export iosfwd
283 export *
284 }
285 module iosfwd {
286 header "iosfwd"
287 export *
288 }
289 module iostream {
290 header "iostream"
291 export ios
292 export streambuf
293 export istream
294 export ostream
295 export *
296 }
297 module istream {
298 header "istream"
299 // FIXME: should re-export ios, streambuf?
300 export *
301 }
302 module iterator {
303 header "iterator"
304 export *
305 }
306 module limits {
307 header "limits"
308 export *
309 }
310 module list {
311 header "list"
312 export initializer_list
313 export *
314 }
315 module locale {
316 header "locale"
317 export *
318 }
319 module map {
320 header "map"
321 export initializer_list
322 export *
323 }
324 module memory {
325 header "memory"
326 export *
327 }
328 module mutex {
329 header "mutex"
330 export *
331 }
332 module new {
333 header "new"
334 export *
335 }
336 module numeric {
337 header "numeric"
338 export *
339 }
Eric Fiselier006458b2016-12-05 23:33:19 +0000340 module optional {
341 header "optional"
342 export *
343 }
Richard Smith31cfef02014-05-21 00:33:49 +0000344 module ostream {
345 header "ostream"
346 // FIXME: should re-export ios, streambuf?
347 export *
348 }
349 module queue {
350 header "queue"
351 export initializer_list
352 export *
353 }
354 module random {
355 header "random"
356 export initializer_list
357 export *
358 }
359 module ratio {
360 header "ratio"
361 export *
362 }
363 module regex {
364 header "regex"
365 export initializer_list
366 export *
367 }
368 module scoped_allocator {
369 header "scoped_allocator"
370 export *
371 }
372 module set {
373 header "set"
374 export initializer_list
375 export *
376 }
377 module sstream {
378 header "sstream"
379 // FIXME: should re-export istream, ostream, ios, streambuf, string?
380 export *
381 }
382 module stack {
383 header "stack"
384 export initializer_list
385 export *
386 }
387 module stdexcept {
388 header "stdexcept"
389 export *
390 }
391 module streambuf {
392 header "streambuf"
393 export *
394 }
395 module string {
396 header "string"
397 export initializer_list
Eric Fiselier2d357f72016-12-05 23:53:23 +0000398 export string_view
399 export __string
400 export *
401 }
402 module string_view {
403 header "string_view"
404 export initializer_list
405 export __string
Richard Smith31cfef02014-05-21 00:33:49 +0000406 export *
407 }
408 module strstream {
409 header "strstream"
Eric Fiselierbdc20862016-12-05 23:16:07 +0000410 export *
Richard Smith31cfef02014-05-21 00:33:49 +0000411 }
412 module system_error {
413 header "system_error"
414 export *
415 }
416 module thread {
417 header "thread"
418 export *
419 }
420 module tuple {
421 header "tuple"
422 export *
423 }
424 module type_traits {
425 header "type_traits"
426 export *
427 }
428 module typeindex {
429 header "typeindex"
430 export *
431 }
432 module typeinfo {
433 header "typeinfo"
434 export *
435 }
436 module unordered_map {
437 header "unordered_map"
438 export initializer_list
439 export *
440 }
441 module unordered_set {
442 header "unordered_set"
443 export initializer_list
444 export *
445 }
446 module utility {
447 header "utility"
448 export initializer_list
449 export *
450 }
451 module valarray {
452 header "valarray"
453 export initializer_list
454 export *
455 }
Eric Fiselier006458b2016-12-05 23:33:19 +0000456 module variant {
457 header "variant"
458 export *
459 }
Richard Smith31cfef02014-05-21 00:33:49 +0000460 module vector {
461 header "vector"
462 export initializer_list
463 export *
464 }
465
Richard Smith2d1b6372015-10-13 22:13:33 +0000466 // FIXME: We don't have modules for the <foo.h> headers, because they might
467 // be included from the C library's headers, and that would create a #include
468 // cycle. For the same reason, we don't have a module for __config.
469 //module __config { header "__config" export * }
470
Richard Smith31cfef02014-05-21 00:33:49 +0000471 // FIXME: These should be private.
472 module __bit_reference { header "__bit_reference" export * }
Richard Smith31cfef02014-05-21 00:33:49 +0000473 module __debug { header "__debug" export * }
474 module __functional_base { header "__functional_base" export * }
475 module __hash_table { header "__hash_table" export * }
476 module __locale { header "__locale" export * }
477 module __mutex_base { header "__mutex_base" export * }
478 module __split_buffer { header "__split_buffer" export * }
479 module __sso_allocator { header "__sso_allocator" export * }
480 module __std_stream { header "__std_stream" export * }
Eric Fiselier2d357f72016-12-05 23:53:23 +0000481 module __string { header "__string" export * }
Richard Smith31cfef02014-05-21 00:33:49 +0000482 module __tree { header "__tree" export * }
483 module __tuple { header "__tuple" export * }
484 module __undef_min_max { header "__undef_min_max" export * }
Saleem Abdulrasooldcf27a62015-02-13 22:15:32 +0000485 module __undef___deallocate { header "__undef___deallocate" export * }
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000486
487 module experimental {
Eric Fiselier92ae1af2016-12-06 01:34:24 +0000488 requires cplusplus11
489
Eric Fiselierb5b9e822016-12-05 23:55:34 +0000490 module algorithm {
491 header "experimental/algorithm"
492 export *
493 }
494 module any {
495 header "experimental/any"
496 export *
497 }
498 module chrono {
499 header "experimental/chrono"
500 export *
501 }
502 module deque {
503 header "experimental/deque"
504 export *
505 }
506 module dynarray {
507 header "experimental/dynarray"
508 export *
509 }
510 module filesystem {
511 header "experimental/filesystem"
512 export *
513 }
514 module forward_list {
515 header "experimental/forward_list"
516 export *
517 }
518 module functional {
519 header "experimental/functional"
520 export *
521 }
522 module iterator {
523 header "experimental/iterator"
524 export *
525 }
526 module list {
527 header "experimental/list"
528 export *
529 }
530 module map {
531 header "experimental/map"
532 export *
533 }
534 module memory_resource {
535 header "experimental/memory_resource"
536 export *
537 }
538 module numeric {
539 header "experimental/numeric"
540 export *
541 }
542 module optional {
543 header "experimental/optional"
544 export *
545 }
546 module propagate_const {
547 header "experimental/propagate_const"
548 export *
549 }
550 module ratio {
551 header "experimental/ratio"
552 export *
553 }
554 module regex {
555 header "experimental/regex"
556 export *
557 }
558 module set {
559 header "experimental/set"
560 export *
561 }
562 module string {
563 header "experimental/string"
564 export *
565 }
566 module string_view {
567 header "experimental/string_view"
568 export *
569 }
570 module system_error {
571 header "experimental/system_error"
572 export *
573 }
574 module tuple {
575 header "experimental/tuple"
576 export *
577 }
578 module type_traits {
579 header "experimental/type_traits"
580 export *
581 }
582 module unordered_map {
583 header "experimental/unordered_map"
584 export *
585 }
586 module unordered_set {
587 header "experimental/unordered_set"
588 export *
589 }
590 module utility {
591 header "experimental/utility"
592 export *
593 }
594 module vector {
595 header "experimental/vector"
596 export *
597 }
598 // FIXME these should be private
599 module __memory {
600 header "experimental/__memory"
601 export *
602 }
603 } // end experimental
Richard Smith31cfef02014-05-21 00:33:49 +0000604}