std::experimental::source_location::current
| Technical Specification | ||||
| Filesystem library (filesystem TS) | ||||
| Library fundamentals (library fundamentals TS) | ||||
| Library fundamentals 2 (library fundamentals TS v2) | ||||
| Library fundamentals 3 (library fundamentals TS v3) | ||||
| Extensions for parallelism (parallelism TS) | ||||
| Extensions for parallelism 2 (parallelism TS v2) | ||||
| Extensions for concurrency (concurrency TS) | ||||
| Extensions for concurrency 2 (concurrency TS v2) | ||||
| Concepts (concepts TS) | ||||
| Ranges (ranges TS) | ||||
| Reflection (reflection TS) | ||||
| Mathematical special functions (special functions TR) | ||||
| Experimental Non-TS | ||||
| Pattern Matching | ||||
| Linear Algebra | ||||
| std::execution | ||||
| Contracts | ||||
| 2D Graphics |
| Creation | ||||
source_location::current | ||||
| Field Access | ||||
| static constexpr source_location current() noexcept; |
(library fundamentals TS v2) | |
Constructs a new source_location object.
Contents |
[edit] Return value
If current() is invoked directly (via a function call that names current()), it returns a source_location object with implementation-defined values representing the location of the call. The values should be affected by the #line preprocessor directive in the same manner as the predefined macros __LINE__ and __FILE__.
If current() is invoked in any other manner, the return value is unspecified.
[edit] Remarks
If current() is used in an initializer for a non-static data member, the return value corresponds to the location of the constructor or aggregate initialization that initializes the data member.
[edit] Notes
When current() is used in a default argument, the return value will correspond to the location of the call to current() at the call site.
[edit] Parameters
(none)
[edit] See also
constructs a new source_location with implementation-defined values (public member function) [edit] |