lvalue, rvalue
std::priority_queue<Node, std::vector<Node>, std::greater<Node>> openSet;...auto [f, current] = openSet.top(); // f, current는 lvalue? rvalue?f와 current는 rvalue가 아니라 lvalue임
- 동작 원리
- `std::priority_queue::top()`은 `const T& (const 참조)`를 반환합니다.
- 구조적 바인딩에서
auto(참조 없이)를 사용하면, 반환된 객체의 복사본이 만들어집니다. - f와 current는 그 복사본의 멤버를 가리키는 lvalue입니다.
// auto [f, current] = openSet.top(); 은 아래와 같다auto __temp = openSet.top(); // pair 복사 발생int& f = __temp.first; // 복사본의 멤버에 대한 참조TileKey& current = __temp.second;- 만약
auto&로 받으면
auto& [f, current] = openSet.top(); // const 참조 → 복사 x. 수정 못함그래픽스 프로그래밍
uv좌표(모델링)

좌표계
게임수학은 좌표계를 바꾸는 수학 점들은 가만히 있고 좌표계를 늘렸다 줄였다