Richard Smith | 31cfef0 | 2014-05-21 00:33:49 +0000 | [diff] [blame] | 1 | module 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 Lopes | 7fd29e0 | 2016-10-21 03:14:27 +0000 | [diff] [blame] | 6 | |
| 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 Lopes | 7fd29e0 | 2016-10-21 03:14:27 +0000 | [diff] [blame] | 24 | export * |
| 25 | } |
| 26 | // <iso646.h> provided by compiler. |
| 27 | // <limits.h> provided by compiler or C library. |
Eric Fiselier | c621333 | 2016-11-19 01:14:15 +0000 | [diff] [blame] | 28 | module locale_h { |
| 29 | header "locale.h" |
Eric Fiselier | c621333 | 2016-11-19 01:14:15 +0000 | [diff] [blame] | 30 | export * |
| 31 | } |
Bruno Cardoso Lopes | 7fd29e0 | 2016-10-21 03:14:27 +0000 | [diff] [blame] | 32 | module math_h { |
| 33 | header "math.h" |
Bruno Cardoso Lopes | 7fd29e0 | 2016-10-21 03:14:27 +0000 | [diff] [blame] | 34 | export * |
| 35 | } |
| 36 | module setjmp_h { |
| 37 | header "setjmp.h" |
Bruno Cardoso Lopes | 7fd29e0 | 2016-10-21 03:14:27 +0000 | [diff] [blame] | 38 | export * |
| 39 | } |
| 40 | // FIXME: <stdalign.h> is missing. |
| 41 | // <signal.h> provided by C library. |
| 42 | // <stdarg.h> provided by compiler. |
| 43 | // <stdbool.h> provided by compiler. |
| 44 | module stddef_h { |
| 45 | // <stddef.h>'s __need_* macros require textual inclusion. |
| 46 | textual header "stddef.h" |
| 47 | } |
Eric Fiselier | cbda4fb | 2016-11-22 20:05:19 +0000 | [diff] [blame] | 48 | 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 Lopes | 7fd29e0 | 2016-10-21 03:14:27 +0000 | [diff] [blame] | 55 | module stdio_h { |
| 56 | // <stdio.h>'s __need_* macros require textual inclusion. |
| 57 | textual header "stdio.h" |
Bruno Cardoso Lopes | 7fd29e0 | 2016-10-21 03:14:27 +0000 | [diff] [blame] | 58 | export * |
| 59 | } |
| 60 | module stdlib_h { |
| 61 | // <stdlib.h>'s __need_* macros require textual inclusion. |
| 62 | textual header "stdlib.h" |
Bruno Cardoso Lopes | 7fd29e0 | 2016-10-21 03:14:27 +0000 | [diff] [blame] | 63 | export * |
| 64 | } |
| 65 | module string_h { |
| 66 | header "string.h" |
Bruno Cardoso Lopes | 7fd29e0 | 2016-10-21 03:14:27 +0000 | [diff] [blame] | 67 | export * |
| 68 | } |
| 69 | // FIXME: <uchar.h> is missing. |
| 70 | // <time.h> provided by C library. |
| 71 | module wchar_h { |
| 72 | // <wchar.h>'s __need_* macros require textual inclusion. |
| 73 | textual header "wchar.h" |
Bruno Cardoso Lopes | 7fd29e0 | 2016-10-21 03:14:27 +0000 | [diff] [blame] | 74 | export * |
| 75 | } |
| 76 | module wctype_h { |
| 77 | header "wctype.h" |
Bruno Cardoso Lopes | 7fd29e0 | 2016-10-21 03:14:27 +0000 | [diff] [blame] | 78 | export * |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | // <complex.h> and <tgmath.h> are not C headers in any real sense, do not |
| 83 | // allow their use in extern "C" contexts. |
| 84 | module complex_h { |
| 85 | header "complex.h" |
| 86 | export ccomplex |
| 87 | export * |
| 88 | } |
| 89 | module tgmath_h { |
| 90 | header "tgmath.h" |
| 91 | export ccomplex |
| 92 | export cmath |
| 93 | export * |
| 94 | } |
| 95 | |
| 96 | // C compatibility headers. |
| 97 | module compat { |
| 98 | module cassert { |
| 99 | // <cassert>'s use of NDEBUG requires textual inclusion. |
| 100 | textual header "cassert" |
| 101 | } |
| 102 | module ccomplex { |
| 103 | header "ccomplex" |
| 104 | export complex |
| 105 | export * |
| 106 | } |
| 107 | module cctype { |
| 108 | header "cctype" |
| 109 | export * |
| 110 | } |
| 111 | module cerrno { |
| 112 | header "cerrno" |
Bruno Cardoso Lopes | 7fd29e0 | 2016-10-21 03:14:27 +0000 | [diff] [blame] | 113 | export * |
| 114 | } |
| 115 | module cfenv { |
| 116 | header "cfenv" |
Bruno Cardoso Lopes | 7fd29e0 | 2016-10-21 03:14:27 +0000 | [diff] [blame] | 117 | export * |
| 118 | } |
| 119 | module cfloat { |
| 120 | header "cfloat" |
Bruno Cardoso Lopes | 7fd29e0 | 2016-10-21 03:14:27 +0000 | [diff] [blame] | 121 | export * |
| 122 | } |
| 123 | module cinttypes { |
| 124 | header "cinttypes" |
| 125 | export cstdint |
Bruno Cardoso Lopes | 7fd29e0 | 2016-10-21 03:14:27 +0000 | [diff] [blame] | 126 | export * |
| 127 | } |
| 128 | module ciso646 { |
| 129 | header "ciso646" |
| 130 | export * |
| 131 | } |
| 132 | module climits { |
| 133 | header "climits" |
Bruno Cardoso Lopes | 7fd29e0 | 2016-10-21 03:14:27 +0000 | [diff] [blame] | 134 | export * |
| 135 | } |
| 136 | module clocale { |
| 137 | header "clocale" |
Bruno Cardoso Lopes | 7fd29e0 | 2016-10-21 03:14:27 +0000 | [diff] [blame] | 138 | export * |
| 139 | } |
| 140 | module cmath { |
| 141 | header "cmath" |
Bruno Cardoso Lopes | 7fd29e0 | 2016-10-21 03:14:27 +0000 | [diff] [blame] | 142 | export * |
| 143 | } |
| 144 | module csetjmp { |
| 145 | header "csetjmp" |
Bruno Cardoso Lopes | 7fd29e0 | 2016-10-21 03:14:27 +0000 | [diff] [blame] | 146 | export * |
| 147 | } |
| 148 | module csignal { |
| 149 | header "csignal" |
Bruno Cardoso Lopes | 7fd29e0 | 2016-10-21 03:14:27 +0000 | [diff] [blame] | 150 | export * |
| 151 | } |
| 152 | // FIXME: <cstdalign> is missing. |
| 153 | module cstdarg { |
| 154 | header "cstdarg" |
Bruno Cardoso Lopes | 7fd29e0 | 2016-10-21 03:14:27 +0000 | [diff] [blame] | 155 | export * |
| 156 | } |
| 157 | module cstdbool { |
| 158 | header "cstdbool" |
Bruno Cardoso Lopes | 7fd29e0 | 2016-10-21 03:14:27 +0000 | [diff] [blame] | 159 | export * |
| 160 | } |
| 161 | module cstddef { |
| 162 | header "cstddef" |
Bruno Cardoso Lopes | 7fd29e0 | 2016-10-21 03:14:27 +0000 | [diff] [blame] | 163 | export * |
| 164 | } |
| 165 | module cstdint { |
| 166 | header "cstdint" |
Eric Fiselier | cbda4fb | 2016-11-22 20:05:19 +0000 | [diff] [blame] | 167 | export depr.stdint_h |
Bruno Cardoso Lopes | 7fd29e0 | 2016-10-21 03:14:27 +0000 | [diff] [blame] | 168 | export * |
| 169 | } |
| 170 | module cstdio { |
| 171 | header "cstdio" |
Bruno Cardoso Lopes | 7fd29e0 | 2016-10-21 03:14:27 +0000 | [diff] [blame] | 172 | export * |
| 173 | } |
| 174 | module cstdlib { |
| 175 | header "cstdlib" |
Bruno Cardoso Lopes | 7fd29e0 | 2016-10-21 03:14:27 +0000 | [diff] [blame] | 176 | export * |
| 177 | } |
| 178 | module cstring { |
| 179 | header "cstring" |
Bruno Cardoso Lopes | 7fd29e0 | 2016-10-21 03:14:27 +0000 | [diff] [blame] | 180 | export * |
| 181 | } |
| 182 | module ctgmath { |
| 183 | header "ctgmath" |
| 184 | export ccomplex |
| 185 | export cmath |
| 186 | export * |
| 187 | } |
| 188 | module ctime { |
| 189 | header "ctime" |
Bruno Cardoso Lopes | 7fd29e0 | 2016-10-21 03:14:27 +0000 | [diff] [blame] | 190 | export * |
| 191 | } |
| 192 | // FIXME: <cuchar> is missing. |
| 193 | module cwchar { |
| 194 | header "cwchar" |
Bruno Cardoso Lopes | 7fd29e0 | 2016-10-21 03:14:27 +0000 | [diff] [blame] | 195 | export * |
| 196 | } |
| 197 | module cwctype { |
| 198 | header "cwctype" |
Bruno Cardoso Lopes | 7fd29e0 | 2016-10-21 03:14:27 +0000 | [diff] [blame] | 199 | export * |
| 200 | } |
| 201 | } |
| 202 | |
Richard Smith | 31cfef0 | 2014-05-21 00:33:49 +0000 | [diff] [blame] | 203 | module algorithm { |
| 204 | header "algorithm" |
| 205 | export initializer_list |
| 206 | export * |
| 207 | } |
Eric Fiselier | 006458b | 2016-12-05 23:33:19 +0000 | [diff] [blame] | 208 | module any { |
| 209 | header "any" |
| 210 | export * |
| 211 | } |
Richard Smith | 31cfef0 | 2014-05-21 00:33:49 +0000 | [diff] [blame] | 212 | module array { |
| 213 | header "array" |
| 214 | export initializer_list |
| 215 | export * |
| 216 | } |
| 217 | module atomic { |
| 218 | header "atomic" |
| 219 | export * |
Richard Smith | 31cfef0 | 2014-05-21 00:33:49 +0000 | [diff] [blame] | 220 | } |
| 221 | module bitset { |
| 222 | header "bitset" |
| 223 | export string |
| 224 | export iosfwd |
| 225 | export * |
| 226 | } |
| 227 | // No submodule for cassert. It fundamentally needs repeated, textual inclusion. |
Richard Smith | 31cfef0 | 2014-05-21 00:33:49 +0000 | [diff] [blame] | 228 | module chrono { |
| 229 | header "chrono" |
| 230 | export * |
| 231 | } |
Richard Smith | 31cfef0 | 2014-05-21 00:33:49 +0000 | [diff] [blame] | 232 | module codecvt { |
| 233 | header "codecvt" |
| 234 | export * |
| 235 | } |
| 236 | module complex { |
| 237 | header "complex" |
| 238 | export * |
| 239 | } |
| 240 | module condition_variable { |
| 241 | header "condition_variable" |
| 242 | export * |
| 243 | } |
Richard Smith | 31cfef0 | 2014-05-21 00:33:49 +0000 | [diff] [blame] | 244 | module deque { |
| 245 | header "deque" |
| 246 | export initializer_list |
| 247 | export * |
| 248 | } |
| 249 | module exception { |
| 250 | header "exception" |
| 251 | export * |
| 252 | } |
| 253 | module forward_list { |
| 254 | header "forward_list" |
| 255 | export initializer_list |
| 256 | export * |
| 257 | } |
| 258 | module fstream { |
| 259 | header "fstream" |
| 260 | export * |
| 261 | } |
| 262 | module functional { |
| 263 | header "functional" |
| 264 | export * |
| 265 | } |
| 266 | module future { |
| 267 | header "future" |
| 268 | export * |
| 269 | } |
| 270 | module initializer_list { |
| 271 | header "initializer_list" |
| 272 | export * |
| 273 | } |
| 274 | module iomanip { |
| 275 | header "iomanip" |
| 276 | export * |
| 277 | } |
| 278 | module ios { |
| 279 | header "ios" |
| 280 | export iosfwd |
| 281 | export * |
| 282 | } |
| 283 | module iosfwd { |
| 284 | header "iosfwd" |
| 285 | export * |
| 286 | } |
| 287 | module iostream { |
| 288 | header "iostream" |
| 289 | export ios |
| 290 | export streambuf |
| 291 | export istream |
| 292 | export ostream |
| 293 | export * |
| 294 | } |
| 295 | module istream { |
| 296 | header "istream" |
| 297 | // FIXME: should re-export ios, streambuf? |
| 298 | export * |
| 299 | } |
| 300 | module iterator { |
| 301 | header "iterator" |
| 302 | export * |
| 303 | } |
| 304 | module limits { |
| 305 | header "limits" |
| 306 | export * |
| 307 | } |
| 308 | module list { |
| 309 | header "list" |
| 310 | export initializer_list |
| 311 | export * |
| 312 | } |
| 313 | module locale { |
| 314 | header "locale" |
| 315 | export * |
| 316 | } |
| 317 | module map { |
| 318 | header "map" |
| 319 | export initializer_list |
| 320 | export * |
| 321 | } |
| 322 | module memory { |
| 323 | header "memory" |
| 324 | export * |
| 325 | } |
| 326 | module mutex { |
| 327 | header "mutex" |
| 328 | export * |
| 329 | } |
| 330 | module new { |
| 331 | header "new" |
| 332 | export * |
| 333 | } |
| 334 | module numeric { |
| 335 | header "numeric" |
| 336 | export * |
| 337 | } |
Eric Fiselier | 006458b | 2016-12-05 23:33:19 +0000 | [diff] [blame] | 338 | module optional { |
| 339 | header "optional" |
| 340 | export * |
| 341 | } |
Richard Smith | 31cfef0 | 2014-05-21 00:33:49 +0000 | [diff] [blame] | 342 | module ostream { |
| 343 | header "ostream" |
| 344 | // FIXME: should re-export ios, streambuf? |
| 345 | export * |
| 346 | } |
| 347 | module queue { |
| 348 | header "queue" |
| 349 | export initializer_list |
| 350 | export * |
| 351 | } |
| 352 | module random { |
| 353 | header "random" |
| 354 | export initializer_list |
| 355 | export * |
| 356 | } |
| 357 | module ratio { |
| 358 | header "ratio" |
| 359 | export * |
| 360 | } |
| 361 | module regex { |
| 362 | header "regex" |
| 363 | export initializer_list |
| 364 | export * |
| 365 | } |
| 366 | module scoped_allocator { |
| 367 | header "scoped_allocator" |
| 368 | export * |
| 369 | } |
| 370 | module set { |
| 371 | header "set" |
| 372 | export initializer_list |
| 373 | export * |
| 374 | } |
| 375 | module sstream { |
| 376 | header "sstream" |
| 377 | // FIXME: should re-export istream, ostream, ios, streambuf, string? |
| 378 | export * |
| 379 | } |
| 380 | module stack { |
| 381 | header "stack" |
| 382 | export initializer_list |
| 383 | export * |
| 384 | } |
| 385 | module stdexcept { |
| 386 | header "stdexcept" |
| 387 | export * |
| 388 | } |
| 389 | module streambuf { |
| 390 | header "streambuf" |
| 391 | export * |
| 392 | } |
| 393 | module string { |
| 394 | header "string" |
| 395 | export initializer_list |
Eric Fiselier | 2d357f7 | 2016-12-05 23:53:23 +0000 | [diff] [blame] | 396 | export string_view |
| 397 | export __string |
| 398 | export * |
| 399 | } |
| 400 | module string_view { |
| 401 | header "string_view" |
| 402 | export initializer_list |
| 403 | export __string |
Richard Smith | 31cfef0 | 2014-05-21 00:33:49 +0000 | [diff] [blame] | 404 | export * |
| 405 | } |
| 406 | module strstream { |
| 407 | header "strstream" |
Eric Fiselier | bdc2086 | 2016-12-05 23:16:07 +0000 | [diff] [blame] | 408 | export * |
Richard Smith | 31cfef0 | 2014-05-21 00:33:49 +0000 | [diff] [blame] | 409 | } |
| 410 | module system_error { |
| 411 | header "system_error" |
| 412 | export * |
| 413 | } |
| 414 | module thread { |
| 415 | header "thread" |
| 416 | export * |
| 417 | } |
| 418 | module tuple { |
| 419 | header "tuple" |
| 420 | export * |
| 421 | } |
| 422 | module type_traits { |
| 423 | header "type_traits" |
| 424 | export * |
| 425 | } |
| 426 | module typeindex { |
| 427 | header "typeindex" |
| 428 | export * |
| 429 | } |
| 430 | module typeinfo { |
| 431 | header "typeinfo" |
| 432 | export * |
| 433 | } |
| 434 | module unordered_map { |
| 435 | header "unordered_map" |
| 436 | export initializer_list |
| 437 | export * |
| 438 | } |
| 439 | module unordered_set { |
| 440 | header "unordered_set" |
| 441 | export initializer_list |
| 442 | export * |
| 443 | } |
| 444 | module utility { |
| 445 | header "utility" |
| 446 | export initializer_list |
| 447 | export * |
| 448 | } |
| 449 | module valarray { |
| 450 | header "valarray" |
| 451 | export initializer_list |
| 452 | export * |
| 453 | } |
Eric Fiselier | 006458b | 2016-12-05 23:33:19 +0000 | [diff] [blame] | 454 | module variant { |
| 455 | header "variant" |
| 456 | export * |
| 457 | } |
Richard Smith | 31cfef0 | 2014-05-21 00:33:49 +0000 | [diff] [blame] | 458 | module vector { |
| 459 | header "vector" |
| 460 | export initializer_list |
| 461 | export * |
| 462 | } |
| 463 | |
Richard Smith | 2d1b637 | 2015-10-13 22:13:33 +0000 | [diff] [blame] | 464 | // FIXME: We don't have modules for the <foo.h> headers, because they might |
| 465 | // be included from the C library's headers, and that would create a #include |
| 466 | // cycle. For the same reason, we don't have a module for __config. |
| 467 | //module __config { header "__config" export * } |
| 468 | |
Richard Smith | 31cfef0 | 2014-05-21 00:33:49 +0000 | [diff] [blame] | 469 | // FIXME: These should be private. |
| 470 | module __bit_reference { header "__bit_reference" export * } |
Richard Smith | 31cfef0 | 2014-05-21 00:33:49 +0000 | [diff] [blame] | 471 | module __debug { header "__debug" export * } |
| 472 | module __functional_base { header "__functional_base" export * } |
| 473 | module __hash_table { header "__hash_table" export * } |
| 474 | module __locale { header "__locale" export * } |
| 475 | module __mutex_base { header "__mutex_base" export * } |
| 476 | module __split_buffer { header "__split_buffer" export * } |
| 477 | module __sso_allocator { header "__sso_allocator" export * } |
| 478 | module __std_stream { header "__std_stream" export * } |
Eric Fiselier | 2d357f7 | 2016-12-05 23:53:23 +0000 | [diff] [blame] | 479 | module __string { header "__string" export * } |
Richard Smith | 31cfef0 | 2014-05-21 00:33:49 +0000 | [diff] [blame] | 480 | module __tree { header "__tree" export * } |
| 481 | module __tuple { header "__tuple" export * } |
| 482 | module __undef_min_max { header "__undef_min_max" export * } |
Saleem Abdulrasool | dcf27a6 | 2015-02-13 22:15:32 +0000 | [diff] [blame] | 483 | module __undef___deallocate { header "__undef___deallocate" export * } |
Eric Fiselier | b5b9e82 | 2016-12-05 23:55:34 +0000 | [diff] [blame] | 484 | |
| 485 | module experimental { |
| 486 | module algorithm { |
| 487 | header "experimental/algorithm" |
| 488 | export * |
| 489 | } |
| 490 | module any { |
| 491 | header "experimental/any" |
| 492 | export * |
| 493 | } |
| 494 | module chrono { |
| 495 | header "experimental/chrono" |
| 496 | export * |
| 497 | } |
| 498 | module deque { |
| 499 | header "experimental/deque" |
| 500 | export * |
| 501 | } |
| 502 | module dynarray { |
| 503 | header "experimental/dynarray" |
| 504 | export * |
| 505 | } |
| 506 | module filesystem { |
| 507 | header "experimental/filesystem" |
| 508 | export * |
| 509 | } |
| 510 | module forward_list { |
| 511 | header "experimental/forward_list" |
| 512 | export * |
| 513 | } |
| 514 | module functional { |
| 515 | header "experimental/functional" |
| 516 | export * |
| 517 | } |
| 518 | module iterator { |
| 519 | header "experimental/iterator" |
| 520 | export * |
| 521 | } |
| 522 | module list { |
| 523 | header "experimental/list" |
| 524 | export * |
| 525 | } |
| 526 | module map { |
| 527 | header "experimental/map" |
| 528 | export * |
| 529 | } |
| 530 | module memory_resource { |
| 531 | header "experimental/memory_resource" |
| 532 | export * |
| 533 | } |
| 534 | module numeric { |
| 535 | header "experimental/numeric" |
| 536 | export * |
| 537 | } |
| 538 | module optional { |
| 539 | header "experimental/optional" |
| 540 | export * |
| 541 | } |
| 542 | module propagate_const { |
| 543 | header "experimental/propagate_const" |
| 544 | export * |
| 545 | } |
| 546 | module ratio { |
| 547 | header "experimental/ratio" |
| 548 | export * |
| 549 | } |
| 550 | module regex { |
| 551 | header "experimental/regex" |
| 552 | export * |
| 553 | } |
| 554 | module set { |
| 555 | header "experimental/set" |
| 556 | export * |
| 557 | } |
| 558 | module string { |
| 559 | header "experimental/string" |
| 560 | export * |
| 561 | } |
| 562 | module string_view { |
| 563 | header "experimental/string_view" |
| 564 | export * |
| 565 | } |
| 566 | module system_error { |
| 567 | header "experimental/system_error" |
| 568 | export * |
| 569 | } |
| 570 | module tuple { |
| 571 | header "experimental/tuple" |
| 572 | export * |
| 573 | } |
| 574 | module type_traits { |
| 575 | header "experimental/type_traits" |
| 576 | export * |
| 577 | } |
| 578 | module unordered_map { |
| 579 | header "experimental/unordered_map" |
| 580 | export * |
| 581 | } |
| 582 | module unordered_set { |
| 583 | header "experimental/unordered_set" |
| 584 | export * |
| 585 | } |
| 586 | module utility { |
| 587 | header "experimental/utility" |
| 588 | export * |
| 589 | } |
| 590 | module vector { |
| 591 | header "experimental/vector" |
| 592 | export * |
| 593 | } |
| 594 | // FIXME these should be private |
| 595 | module __memory { |
| 596 | header "experimental/__memory" |
| 597 | export * |
| 598 | } |
| 599 | } // end experimental |
Richard Smith | 31cfef0 | 2014-05-21 00:33:49 +0000 | [diff] [blame] | 600 | } |