------- Additional Comments From Hu dot YuehWei at gmail dot com  2005-03-19 
14:15 -------
I understand what you mean.
But why the following codes works:

#include <iostream>
#include <vector>

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

std::vector<char> ddd;

int
main()
{
  ddd.push_back(static_cast<char>(T::a)); // <========= here

  std::cerr << ddd.front() << std::endl;

  return 0;
}

and if I pass an constant to a function which takes its address,
then why the folloing codes doesn't produce errors?

void
fff(char const &a)
{
}

int
main()
{
  fff(4);

  return 0;
}


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |


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

Reply via email to