std::experimental::source_location:: column
From cppreference.net
<
cpp
|
experimental
|
source location
|
constexpr
std::
uint_least32_t
column
(
)
const
noexcept
;
|
(라이브러리 fundamentals TS v2) | |
이 객체가 나타내는 줄의 시작점으로부터의 일부 오프셋을 나타내는 구현 정의 값을 반환합니다(즉, 열 번호).
목차 |
매개변수
(없음)
반환값
이 객체가 나타내는 줄의 시작점으로부터의 일부 오프셋을 나타내는 구현 정의 값(즉, 열 번호).
예제
이 코드 실행
#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"; }
가능한 출력:
(17:5) Proxima (18:5) Centauri
참고 항목
|
이 객체가 나타내는 줄 번호를 반환합니다
(public member function) |
|
|
이 객체가 나타내는 파일 이름을 반환합니다
(public member function) |
|
|
이 객체가 나타내는 함수의 이름을 반환합니다 (있는 경우)
(public member function) |
|
|
C++ documentation
for
파일 이름 및 줄 정보
|
|