1// 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 8module std [system] { 9 export std_config 10 // 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++. 14 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 module fenv_h { 28 header "fenv.h" 29 export * 30 } 31 // <float.h> provided by compiler or C library. 32 module inttypes_h { 33 header "inttypes.h" 34 export stdint_h 35 export * 36 } 37 // <iso646.h> provided by compiler. 38 // <limits.h> provided by compiler or C library. 39 module locale_h { 40 header "locale.h" 41 export * 42 } 43 module math_h { 44 header "math.h" 45 export * 46 } 47 module setjmp_h { 48 header "setjmp.h" 49 export * 50 } 51 // FIXME: <stdalign.h> is missing. 52 // <signal.h> provided by C library. 53 // <stdarg.h> provided by compiler. 54 // <stdbool.h> provided by compiler. 55 module stddef_h { 56 // <stddef.h>'s __need_* macros require textual inclusion. 57 textual header "stddef.h" 58 } 59 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 } 66 module stdio_h { 67 // <stdio.h>'s __need_* macros require textual inclusion. 68 textual header "stdio.h" 69 export * 70 export Darwin.C.stdio 71 } 72 module stdlib_h { 73 // <stdlib.h>'s __need_* macros require textual inclusion. 74 textual header "stdlib.h" 75 export * 76 } 77 module string_h { 78 header "string.h" 79 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" 86 export * 87 } 88 module wctype_h { 89 header "wctype.h" 90 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" 125 export * 126 } 127 module cfenv { 128 header "cfenv" 129 export * 130 } 131 module cfloat { 132 header "cfloat" 133 export * 134 } 135 module cinttypes { 136 header "cinttypes" 137 export cstdint 138 export * 139 } 140 module ciso646 { 141 header "ciso646" 142 export * 143 } 144 module climits { 145 header "climits" 146 export * 147 } 148 module clocale { 149 header "clocale" 150 export * 151 } 152 module cmath { 153 header "cmath" 154 export * 155 } 156 module csetjmp { 157 header "csetjmp" 158 export * 159 } 160 module csignal { 161 header "csignal" 162 export * 163 } 164 // FIXME: <cstdalign> is missing. 165 module cstdarg { 166 header "cstdarg" 167 export * 168 } 169 module cstdbool { 170 header "cstdbool" 171 export * 172 } 173 module cstddef { 174 header "cstddef" 175 export * 176 } 177 module cstdint { 178 header "cstdint" 179 export depr.stdint_h 180 export * 181 } 182 module cstdio { 183 header "cstdio" 184 export * 185 } 186 module cstdlib { 187 header "cstdlib" 188 export * 189 } 190 module cstring { 191 header "cstring" 192 export * 193 } 194 module ctgmath { 195 header "ctgmath" 196 export ccomplex 197 export cmath 198 export * 199 } 200 module ctime { 201 header "ctime" 202 export * 203 } 204 // FIXME: <cuchar> is missing. 205 module cwchar { 206 header "cwchar" 207 export depr.stdio_h 208 export * 209 } 210 module cwctype { 211 header "cwctype" 212 export * 213 } 214 } 215 216 module algorithm { 217 header "algorithm" 218 export initializer_list 219 export * 220 } 221 module any { 222 header "any" 223 export * 224 } 225 module array { 226 header "array" 227 export initializer_list 228 export * 229 } 230 module atomic { 231 header "atomic" 232 export * 233 } 234 module bit { 235 header "bit" 236 export * 237 } 238 module bitset { 239 header "bitset" 240 export string 241 export iosfwd 242 export * 243 } 244 // No submodule for cassert. It fundamentally needs repeated, textual inclusion. 245 module charconv { 246 header "charconv" 247 export * 248 } 249 module chrono { 250 header "chrono" 251 export * 252 } 253 module codecvt { 254 header "codecvt" 255 export * 256 } 257 module compare { 258 header "compare" 259 export * 260 } 261 module complex { 262 header "complex" 263 export * 264 } 265 module condition_variable { 266 header "condition_variable" 267 export * 268 } 269 module deque { 270 header "deque" 271 export initializer_list 272 export * 273 } 274 module exception { 275 header "exception" 276 export * 277 } 278 module execution { 279 header "execution" 280 export * 281 } 282 module filesystem { 283 header "filesystem" 284 export * 285 } 286 module forward_list { 287 header "forward_list" 288 export initializer_list 289 export * 290 } 291 module fstream { 292 header "fstream" 293 export * 294 } 295 module functional { 296 header "functional" 297 export * 298 } 299 module future { 300 header "future" 301 export * 302 } 303 module initializer_list { 304 header "initializer_list" 305 export * 306 } 307 module iomanip { 308 header "iomanip" 309 export * 310 } 311 module ios { 312 header "ios" 313 export iosfwd 314 export * 315 } 316 module iosfwd { 317 header "iosfwd" 318 export * 319 } 320 module iostream { 321 header "iostream" 322 export ios 323 export streambuf 324 export istream 325 export ostream 326 export * 327 } 328 module istream { 329 header "istream" 330 // FIXME: should re-export ios, streambuf? 331 export * 332 } 333 module iterator { 334 header "iterator" 335 export * 336 } 337 module limits { 338 header "limits" 339 export * 340 } 341 module list { 342 header "list" 343 export initializer_list 344 export * 345 } 346 module locale { 347 header "locale" 348 export * 349 } 350 module map { 351 header "map" 352 export initializer_list 353 export * 354 } 355 module memory { 356 header "memory" 357 export * 358 } 359 module mutex { 360 header "mutex" 361 export * 362 } 363 module new { 364 header "new" 365 export * 366 } 367 module numeric { 368 header "numeric" 369 export * 370 } 371 module optional { 372 header "optional" 373 export * 374 } 375 module ostream { 376 header "ostream" 377 // FIXME: should re-export ios, streambuf? 378 export * 379 } 380 module queue { 381 header "queue" 382 export initializer_list 383 export * 384 } 385 module random { 386 header "random" 387 export initializer_list 388 export * 389 } 390 module ratio { 391 header "ratio" 392 export * 393 } 394 module regex { 395 header "regex" 396 export initializer_list 397 export * 398 } 399 module scoped_allocator { 400 header "scoped_allocator" 401 export * 402 } 403 module set { 404 header "set" 405 export initializer_list 406 export * 407 } 408 module sstream { 409 header "sstream" 410 // FIXME: should re-export istream, ostream, ios, streambuf, string? 411 export * 412 } 413 module stack { 414 header "stack" 415 export initializer_list 416 export * 417 } 418 module stdexcept { 419 header "stdexcept" 420 export * 421 } 422 module streambuf { 423 header "streambuf" 424 export * 425 } 426 module string { 427 header "string" 428 export initializer_list 429 export string_view 430 export __string 431 export * 432 } 433 module string_view { 434 header "string_view" 435 export initializer_list 436 export __string 437 export * 438 } 439 module strstream { 440 header "strstream" 441 export * 442 } 443 module system_error { 444 header "system_error" 445 export * 446 } 447 module thread { 448 header "thread" 449 export * 450 } 451 module tuple { 452 header "tuple" 453 export * 454 } 455 module type_traits { 456 header "type_traits" 457 export * 458 } 459 module typeindex { 460 header "typeindex" 461 export * 462 } 463 module typeinfo { 464 header "typeinfo" 465 export * 466 } 467 module unordered_map { 468 header "unordered_map" 469 export initializer_list 470 export * 471 } 472 module unordered_set { 473 header "unordered_set" 474 export initializer_list 475 export * 476 } 477 module utility { 478 header "utility" 479 export initializer_list 480 export * 481 } 482 module valarray { 483 header "valarray" 484 export initializer_list 485 export * 486 } 487 module variant { 488 header "variant" 489 export * 490 } 491 module vector { 492 header "vector" 493 export initializer_list 494 export * 495 } 496 module version { 497 header "version" 498 export * 499 } 500 501 // FIXME: These should be private. 502 module __bit_reference { header "__bit_reference" export * } 503 module __debug { header "__debug" export * } 504 module __errc { header "__errc" export * } 505 module __functional_base { header "__functional_base" export * } 506 module __hash_table { header "__hash_table" export * } 507 module __locale { header "__locale" export * } 508 module __mutex_base { header "__mutex_base" export * } 509 module __split_buffer { header "__split_buffer" export * } 510 module __sso_allocator { header "__sso_allocator" export * } 511 module __std_stream { header "__std_stream" export * } 512 module __string { header "__string" export * } 513 module __tree { header "__tree" export * } 514 module __tuple { header "__tuple" export * } 515 module __undef_macros { header "__undef_macros" export * } 516 module __node_handle { header "__node_handle" export * } 517 518 module experimental { 519 requires cplusplus11 520 521 module algorithm { 522 header "experimental/algorithm" 523 export * 524 } 525 module coroutine { 526 requires coroutines 527 header "experimental/coroutine" 528 export * 529 } 530 module deque { 531 header "experimental/deque" 532 export * 533 } 534 module filesystem { 535 header "experimental/filesystem" 536 export * 537 } 538 module forward_list { 539 header "experimental/forward_list" 540 export * 541 } 542 module functional { 543 header "experimental/functional" 544 export * 545 } 546 module iterator { 547 header "experimental/iterator" 548 export * 549 } 550 module list { 551 header "experimental/list" 552 export * 553 } 554 module map { 555 header "experimental/map" 556 export * 557 } 558 module memory_resource { 559 header "experimental/memory_resource" 560 export * 561 } 562 module propagate_const { 563 header "experimental/propagate_const" 564 export * 565 } 566 module regex { 567 header "experimental/regex" 568 export * 569 } 570 module simd { 571 header "experimental/simd" 572 export * 573 } 574 module set { 575 header "experimental/set" 576 export * 577 } 578 module span { 579 header "span" 580 export * 581 } 582 module string { 583 header "experimental/string" 584 export * 585 } 586 module type_traits { 587 header "experimental/type_traits" 588 export * 589 } 590 module unordered_map { 591 header "experimental/unordered_map" 592 export * 593 } 594 module unordered_set { 595 header "experimental/unordered_set" 596 export * 597 } 598 module utility { 599 header "experimental/utility" 600 export * 601 } 602 module vector { 603 header "experimental/vector" 604 export * 605 } 606 // FIXME these should be private 607 module __memory { 608 header "experimental/__memory" 609 export * 610 } 611 } // end experimental 612} 613