function-to-pointer conversion에 대해
conversion의 설계 개념
C++의 conversion를 정의할 때, 직교하는 3 요소, value category
, cv-qualification
, data representation
를 설계 개념으로 사용한다. conversion를 설계할 때, 요소 중 하나만을 변형하고, 다른 요소를 변형하지 않는다. 어떤 이유로, 예를 들어 하위 호환성을 위해, 설계 개념을 위반할 때는 스펙 문서는 관련된 특수 조항을 별도로 명시한다.
function-to-pointer conversion
value category
요소를 변형하기 위해 설계한 conversion이다. value category
요소만 변경하기 때문에, exact match rank
로 분류된다. 또한 일반적으로 cv-qualification
이나 data representation
를 변경하지 않는다.
function-to-pointer conversion
는 function 타입 T의 lvalue category
를 T의 pointer prvalue category
로 변환한다. 함수 이름 자체는 xvalue category
나 prvalue category
를 가질 수 없고 lvalue category
만 갖는다.
non-static member function
를 나타내는 value 자체가 존재하지 않다. 하지만 member function pointer
value는 존재한다. non-static member function
에 non-static member function
를 적용할 수 없다.
결국, function 타입 T에 대한 glvalue-to-prvalue conversion
이 바로, function-to-pointer conversion
이다.