y‰SŽÒнŒ}zC/C++Ž ..
[2ch|¥Menu]
498:ƒfƒtƒHƒ‹ƒg‚Ì–¼–³‚µ‚³‚ñ
10/04/23 23:52:02
>>493
Ž©•ª‚Å‘‚¢‚Ä‚¨‚¢‚ĂȂ©‚È‚©‚Ђǂ¢
template<class T> T cast(typename identity<T>::type v){ return v; }‚Æ
typedef boost::mpl::eval_if<is_const<T>, identity<const int>, identity<int> >::type iint;
‚¾‚È

‘OŽÒ‚ÍT‚ÌŒ^‚Ì„˜_‚ª‚Å‚«‚È‚­‚È‚é(=–¾Ž¦“I‚ÉŒ^‚ðŽw’肵‚Ăقµ‚¢ŠÖ”‚ÉŽg‚¦‚é)
template<class T>void f(T v);
char c;
f(cast<int>(c));
“I‚È


ŽŸƒy[ƒW
ÅVƒŒƒX•\ަ
ƒXƒŒƒbƒh‚ÌŒŸõ
—ÞŽ—ƒXƒŒˆê——
˜b‘è‚̃jƒ…[ƒX
‚¨‚Ü‚©‚¹ƒŠƒXƒg
¥ƒIƒvƒVƒ‡ƒ“‚ð•\ަ
‰É‚‚Ԃµ2ch

4160“ú‘O‚ÉXV/255 KB
’S“–:undef