Home > Backend Development > C++ > Which Headers in the C Standard Library Guarantee Specific Functionalities or Inclusions?

Which Headers in the C Standard Library Guarantee Specific Functionalities or Inclusions?

Patricia Arquette
Release: 2024-11-02 18:56:02
Original
459 people have browsed it

Which Headers in the C   Standard Library Guarantee Specific Functionalities or Inclusions?

Headers in C Standard Library with Guaranteed Inclusions

In the C standard library, headers may include each other in various ways that are not explicitly specified. While programmers should generally avoid relying on header inclusions, there are a few exceptions where specific headers are guaranteed to be included or provide functionality that would otherwise require including an additional header.

Headers Guaranteed to Include Others

  • is included by:

  • includes:

  • includes:

  • includes:

Functions Available through Indirect Header Inclusions

  • Free function templates:

    • std::begin
    • std::end
    • C 14 c-, r-, and cr- versions
    • C 17 std::size, std::empty, std::data

These functions are nominally located in , but they are also available when any of the following headers are included:

- `<array>`
- `<deque>`
- `<forward_list>`
- `<list>`
- `<map>`
- `<regex>`
- `<set>`
- `<string>`
- `<unordered_map>`
- `<unordered_set>`
- `<vector>`
Copy after login
  • When is included:

    • *begin, *end
    • Generic std::swap

The above is the detailed content of Which Headers in the C Standard Library Guarantee Specific Functionalities or Inclusions?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template