Hi,
this
#include <string>
class test {
typedef std::string::si ze_type size_type;
static const size_type x = std::string::np os;
};
doesn't compile using either VC9 ("expected constant expression")
or Comeau Online ("constant value is not known"). If I replace
'std::string::n pos' by '-1' it compiles.
Why isn't 'std::string;:: npos' a "known constant expression"? What
am I missing?
TIA;
Schobi
this
#include <string>
class test {
typedef std::string::si ze_type size_type;
static const size_type x = std::string::np os;
};
doesn't compile using either VC9 ("expected constant expression")
or Comeau Online ("constant value is not known"). If I replace
'std::string::n pos' by '-1' it compiles.
Why isn't 'std::string;:: npos' a "known constant expression"? What
am I missing?
TIA;
Schobi
Comment