|
Boost : |
From: Gennadiy Rozental (gennadiy_at_[hidden])
Date: 2002-08-21 03:32:00
> Error E2285 c:\boost\site\libs/tuple/test\io_test.cpp 97: Could not find a
> match for 'test_toolbox::detail::test_and_continue_impl(istream,const
> test_toolbox::detail::wrapstrstream,char *,int)' in function
> test_main(int,char * *)
I keep forgetting that overloading in test_tools implementation is
essential. So any solution that change the original predicate won't work
since it loosing type information and accordingly proper overloading.
I investigated it in more depth. Here what I've got:
__________________
struct B {};
//void foo( void* ) {}
void foo( bool ) {}
void foo( B ) {}
struct A {
struct Tester {};
operator Tester*() const { return (Tester*)0; }
};
void poo() {
foo( A() );
}
__________________
This example fails to compile with Borland 5.5.1. It produces familiar
"Could not find a match ..." error. If I comment B-based overloading on
fifth line - is starting to work. Why it did not work and how B-based
overloading is related?
Another solution that I found is to add void* overloading. If I uncomment
third line example starting to compile successfully. I could do this for
Boost.Test. but would it be enough in all cases?
Gennadiy.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk