2
부울 varaint에 저장 될 값을 명시 적으로 유형 변환 할 수 있습니까 ??부스트 변형에서 동일한 데이터 유형 사용
예 : 여기
typedef int abc;
typedef int asd;
typedef boost::variant<abc, char, asd, float> link_try1;
int main()
{
link_try1 qw;
qw = static_cast<asd>(1234);
printf("value of which is:%d", qw.which());
return 0;
}
나는() 함수는 3 retrun하고 싶지만 항상 retruns 0 직접 (클래스 변형 민간 변수)를 which_의 값을 변경하는 방법이 있나요 또는 사용되는 데이터 유형을 명시 적으로 지정?
감사 Ankith
+1 나를 가르치려면 BOOST_STRONG_TYPEDEF에 대해 – sehe