■42316 / ) |
Re[1]: const の使い方について |
□投稿者/ 774RR (411回)-(2009/10/13(Tue) 07:11:45)
|
gcc だとコンパイルエラーになったよん hoge.cpp:13: error: invalid initialization of non-const reference of type 'int&' from a temporary of type 'int' VS2008 EE だとエラーにならないっすね
ある意味 VS2008 のバグと思っていいんぢゃないかな。 なぜエラーにならないのかも推測がつくけど。
|
|