------- Comment #4 from redi at gcc dot gnu dot org 2010-07-26 16:37 ------- (In reply to comment #3) > > If you only want it to be used as an integral constant, don't use it in a > context that requires a variable (e.g. reference binding)
e.g. funky((int)myclass::BUFF_SIZE); This means the reference binds to a temporary, not to your class variable, and therefore the compiler only needs the value of BUFF_SIZE, not it's definition. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45082