Boost logo

Boost :

From: Eric Friedman (ebf_at_[hidden])
Date: 2002-07-17 00:42:47

I have found that using declarations cannot be used in class templates
on certain compilers as in the following example:

// [code]
 struct test_base {
        static void f() { }

 template <typename T, typename base>
 struct test_using : base {
         using base::f;
         static T f(const T& t) { return t; }

 int main() {
  test_using<int, test_using<double, test_base> > test;
// [/code]

So far, I have discovered that Visual C++ 7 (and undoubtedly 6.5 as
well) and GCC 2.9.5 are not able to compile this (correct) code.

I therefore propose that a new config macro be added to the appropriate
compiler config headers. As a suggestion,
descriptive name.

Comments? Who is the person who would be able to make the changes to the
config headers (if the time comes)? And what other compilers suffer from
the same bug?

Eric Friedman

Boost list run by bdawes at, gregod at, cpdaniel at, john at