Namensräume
Varianten
Aktionen

Header der Standardbibliothek <source_location>

Aus cppreference.com
< cpp‎ | header
 
 
Headerdateien der Standardbibliothek
Language Support
<tr class="t-nv"><td colspan="5">
</td></tr>
<cfloat>
<cstdint>
<new>
<typeinfo>
<tr class="t-nv"><td colspan="5">
</td></tr>
<source_location>
<exception>
<initializer_list>    
<compare>
<tr class="t-nv"><td colspan="5">
</td></tr>
<coroutine>
<csignal>
<csetjmp>
<cstdarg>
Concepts
<concepts>
Diagnostics
General utilities
Strings
<tr class="t-nv"><td colspan="5">
</td></tr>
<charconv>
<format>
<tr class="t-nv"><td colspan="5">
</td></tr>
<cctype>
<cwctype>
<tr class="t-nv"><td colspan="5">
</td></tr>
<cwchar>
<cuchar>
Localization
Containers
Iterators
<iterator>
Ranges
<ranges>
Algorithms
Numerics
Input/Output
<tr class="t-nv"><td colspan="5">
</td></tr>
<istream>
<ostream>
<iostream>
<tr class="t-nv"><td colspan="5">
</td></tr>
<cstdio>
<cinttypes>
<strstream>
Regular expressions
<regex>
Filesystem support
<filesystem>
Thread support
<tr class="t-nv"><td colspan="5">
</td></tr>
<stop_token>
<semaphore>
<tr class="t-nv"><td colspan="5">
</td></tr>
<latch>
<barrier>
C compatibility
 

Dieser Header ist Teil der Hilfsbibliothek utility.

Klassen

Eine Klasse, die Informationen über den Quellkode, wie Dateiname, Zeilennummern und Funktionsnamen, bietet
(Klasse) [edit]

[Bearbeiten] Inhaltsübersicht

namespace std {
  struct source_location;
}

[Bearbeiten] Klasse std::source_location

namespace std {
  struct source_location {
    // source location construction
    static consteval source_location current() noexcept;
    constexpr source_location() noexcept;
 
    // source location field access
    constexpr uint_least32_t line() const noexcept;
    constexpr uint_least32_t column() const noexcept;
    constexpr const char* file_name() const noexcept;
    constexpr const char* function_name() const noexcept;
 
  private:
    uint_least32_t line_;               // exposition only
    uint_least32_t column_;             // exposition only
    const char* file_name_;             // exposition only
    const char* function_name_;         // exposition only
  };
}