std::experi...ion::column(3)
πΈ NAME πΈ
Okay bestie, welcome to the page for std::experi...ion::column(3) from the C++ Standard Libary manual. The NAME line is std::experimental::source_location::column - std::experimental::source_location::column, and yes she is self-titled, iconic, and fully unbothered. ππ
π Synopsis π
constexpr std::uint_least32_t column() const noexcept; (library
fundamentals TS v2)
That's the whole signature, no cap. constexpr, std::uint_least32_t, const noexcept, and the library fundamentals TS v2 era all right there. β¨
π«Ά Parameters π«Ά
- (none) β literally zero parameters, not a single one to pass. π
β¨ Return value β¨
An implementation-defined value representing some offset from the start of the line represented by this object (i.e., the column number). π
π Example π
// Run this code
#include <experimental/source_location>
#include <iostream>
template<typename T = std::experimental::source_location>
inline void pos(const T& location = T::current())
{
std::cout
<< "("
<< location.line()
<< ':'
<< location.column()
<< ") ";
}
int main()
{
pos(); std::cout << "Proxima\n";
pos(); std::cout << "Centauri\n";
}
π¦ Possible output π¦
(17:5) Proxima
(18:5) Centauri
π See also π
lineβ return the line number represented by this object (public member function)file_nameβ return the file name represented by this object (public member function)function_nameβ return the name of the function represented by this object, if any (public member function)- C++ documentation for Filename and line information
That's the whole vibe, bestie. Source/version + date, for the record: http://cppreference.com, 2024.06.10. πππ¦
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms