Jan Schaumann wrote:
audio/id3lib 10 tech-pkg%NetBSD.org@localhost
field.cpp, line 934: > _binary.erase();
cc-1282 CC: ERROR File = /usr/include/CC/string, Line = 785
More than one instance of overloaded function "min" matches the argument list.
Function symbol function template "dami::min(const T &, const T &)"
is ambiguous by inheritance.
Function symbol function template
"std::min(const _Tp &, const _Tp &)" is ambiguous by
inheritance.
The argument types are: (std::basic_string<char,
std::char_traits<char>,
std::allocator<char>>::size_type, unsigned long).
erase(_M_start + __pos, _M_start + __pos + min(__n, size() - __pos));
^
detected during instantiation of "std::basic_string<char,
std::char_traits<char>, std::allocator<char>>
&std::basic_string<char, std::char_traits<char>,
std::allocator<char>>::erase(std::basic_string<char,
std::char_traits<char>, std::allocator<char>>::size_type,
std::basic_string<char, std::char_traits<char>,
std::allocator<char>>::size_type)" at line 943 of
"field.cpp"
What about this patch?The erase<> function uses some (unqualified) min<>. Is there a way how to specify precedence of one of the namespaces? Like this:
using namespace std {
_binary.erase();
};
Roland
$NetBSD$
On IRIX/mipseb there was a conflict between std::min<> and dami::min<>.
--- src/field.cpp.orig Sun Mar 2 01:23:00 2003
+++ src/field.cpp Thu Jul 14 07:07:06 2005
@@ -33,8 +33,6 @@
#include "readers.h"
#include <assert.h>
-using namespace dami;
-
// This is used for unimplemented frames so that their data is preserved when
// parsing and rendering
static ID3_FieldDef ID3FD_Unimplemented[] =
@@ -1178,7 +1176,7 @@ bool ID3_FieldImpl::SetEncoding(ID3_Text
(ID3TE_NONE < enc && enc < ID3TE_NUMENCODINGS);
if (changed)
{
- _text = convert(_text, _enc, enc);
+ _text = dami::convert(_text, _enc, enc);
_enc = enc;
_changed = true;
}