
24 Oct
2007
24 Oct
'07
12:37 p.m.
Markus Schöpflin wrote:
Hello,
as part of its interface intrusive_ptr requires the user to supply two functions:
void intrusive_ptr_add_ref(T * p); void intrusive_ptr_release(T * p);
These are called from within the implementation of the intrusive_ptr class. When compiling intrusive_ptr_test, cxx complains that intrusive_ptr uses undeclared functions, because the test includes the header file for intrusive_ptr before declaring those two functions.
Are you sure that the compiler is correct? A dependent unqualified call is resolved at instantiation time.