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