This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/20547] undefined reference to "static const" fields of classes


------- Additional Comments From Hu dot YuehWei at gmail dot com  2005-03-19 14:01 -------
#include <vector>

struct T
{
  static char const a = 3;
};

void
fff(char a)
{
}

std::vector<char> b;

int
main()
{
  fff(T::a); /* this line of codes is fine. */

  b.push_back(T::a); /* however, this line of codes is an error. */

  return 0;
}


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20547


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]