Changes Meaning Of

ChangesMeaningOf is an error message from GnuCpp which arose when changes after version 4.1.2 broke code which had previously worked. This is best illustrated with an example. I came across this while working with BoostFusion. -- JohnFletcher


Example code

 namespace Z {
   template <typename T> struct A { };
 }

using Z::A;

template <typename U> struct B { #ifdef FAILS typedef A<U> A; // Fails to compile with gcc 4.3.0 20070323 //generic_test.cpp:13: error: declaration of 'typedef struct Z::A<U> B<U>::A' //generic_test.cpp:4: error: changes meaning of 'A' from 'struct Z::A<U>' // Does not fail with gcc 4.1.2 #else typedef Z::A<U> A; #endif };


The solution to the problem is to use the qualified name Z::A<U> in the typedef.


CategoryCpp CategoryCppTemplates


EditText of this page (last edited August 19, 2014) or FindPage with title or text search