|
Boost : |
From: Terje Slettebø (tslettebo_at_[hidden])
Date: 2003-01-09 03:53:47
>From: "Terje Slettebø" <tslettebo_at_[hidden]>
Hm. Given that BCB 6.0 gives an error on another part of the test program
(the call f(str,str) is reported as ambiguous), and I need to check for that
compiler, as well, maybe one could have a more general configuration macro,
like BOOST_FUNCTION_TEMPLATE_PARTIAL_ORDERING_BUG. (Intel C++ and BCB 6.0
has partial ordering in general, but don't handle more complex cases, such
as the example below.) This would avoid a proliferation of compiler-specific
macros.
> #include <string>
>
> template<class Result,class T>
> void f(Result,T) {}
>
> template<class Result,class CharType,class CharTraits,class Allocator>
> void f(Result,std::basic_string<CharType,CharTraits,Allocator>) {}
>
> template<class CharType,class CharTraits,class Allocator,class Source>
> void f(std::basic_string<CharType,CharTraits,Allocator>,Source) {}
>
> void f(std::string,std::string) {} // Error here
>
> int main()
> {
> int i;
> std::string str;
>
> f(i,i);
> f(str,i);
> f(i,str);
> f(str,str);
> }
Regards,
Terje
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk