Namespaces
Variants
Actions

Standard library header <source_location> (C++20)

From cppreference.com
< cpp‎ | header
 
C++
 
Standard library headers
 

This header is part of the utility library.

Classes

a class representing information about the source code, such as file names, line numbers, and function names
(class) [edit]

[edit] Synopsis

namespace std {
  struct source_location;
}

[edit] Class 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
  };
}

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant