Boost logo

Boost :

From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2005-08-12 04:41:23


basic_cstring_test currently fails to compile on the latest pre-release
version of HP's cxx compiler.

The following sample illustrates the problem:

template <typename T>
static void foo(T * t) { }

template <typename T>
void func() { foo((T *) 0); } // (*)

int main() {
   func<int>();
   return 0;
}

The call to foo at (*) doesn't find the declaration for foo because
dependent name lookup for functions referred by an unqualified id only
finds functions with external linkage. (See 14.6.4.2)

A possible fix is to remove the static from the declaration of foo. Applied
to basic_cstring_test, this would mean to remove the static from the
declaration of test_string().

Markus


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk