Menu

#1 Template arguments qualification

open
nobody
None
5
2004-07-03
2004-07-03
No

Not sure whether it's a bug, or a result of fuzzy
parsing (but using the -e option doesn't help).

When static x is brought outside in cpp file, num
remains unqualified:

#hdr
#include <bitset>
#end

struct A
{
static const int num = 2;

static std::bitset<num> x;
};

Same goes to internal templates and secializations -
below, both some_t and X remain unqualified in the
generated files:

struct A
{
enum some_t {
X
};

template <some_t T>
struct B
{
void f() { }
};

template <>
struct B<X>
{
void f() { }
};
};

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.