struct PlayerMesList { typedef int type; static const int ESCAPE = -1; static const int MOVE = 0; static const int WARP = 1; static const int FIRE = 2; }; typedef MessagePort< PlayerMesList, Point > PlayerMesPort;
質問です。上のようなクラスがあったとき、私の予想では int a = PlayerMesPort::mes::WARP; はコンパイル時に int a = 1; に置き換わると思うんですが、何故かG++-3.3.2でリンク時に undefined reference to 'PlayerMesList::WARP' と出てリンク出来ません。何故でしょうか…。
// BOOST_STATIC_CONSTANT workaround --------------------------------------- // // On compilers which don't allow in-class initialization of static integral // constant members, we must use enums as a workaround if we want the constants // to be available at compile-time. This macro gives us a convenient way to // declare such constants.
I like onion fried with oil I like onion when it is good. I like onion fried with oil I like onion when it is good. I like onion fried with oil I like onion when it is good. I like onion fried with oil I like onion when it is good. With the step comrades, the step comrades, the step, the step, the step! With the step comrades, the step comrades, the step, the step, the step! With the step comrades, the step comrades, the step, the step, the step! With the step comrades, the step comrades, the step, the step, the step! One will bore the side to them One will bore the Rantanplan side to them draws lira Rantanplan One will bore the side to them Which we will laugh