Fixed a linking error with g++ <= 3.2.
This commit is contained in:
parent
bebdcb6e27
commit
f80d92ee3a
@ -25,6 +25,8 @@ namespace vmime
|
|||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
#if !defined(__GNUC__) || ((__GNUC__ >= 3) && (__GNUC_MINOR__ >= 3))
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
void typeAdapter <string>::parse(const string& buffer, const string::size_type position,
|
void typeAdapter <string>::parse(const string& buffer, const string::size_type position,
|
||||||
const string::size_type end, string::size_type* newPosition)
|
const string::size_type end, string::size_type* newPosition)
|
||||||
@ -35,5 +37,7 @@ void typeAdapter <string>::parse(const string& buffer, const string::size_type p
|
|||||||
*newPosition = end;
|
*newPosition = end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // !defined(__GNUC__) || ((__GNUC__ >= 3) && (__GNUC_MINOR__ >= 3))
|
||||||
|
|
||||||
|
|
||||||
} // vmime
|
} // vmime
|
||||||
|
@ -121,9 +121,30 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
template <>
|
#if defined(__GNUC__) && (__GNUC__ >= 3) && (__GNUC_MINOR__ <= 2)
|
||||||
void typeAdapter <string>::parse(const string& buffer, const string::size_type position,
|
|
||||||
const string::size_type end, string::size_type* newPosition);
|
// Because of a bug with g++ <= 3.2, we have to put the implementation
|
||||||
|
// of the function inline.
|
||||||
|
|
||||||
|
template <>
|
||||||
|
inline void typeAdapter <string>::parse
|
||||||
|
(const string& buffer, const string::size_type position,
|
||||||
|
const string::size_type end, string::size_type* newPosition)
|
||||||
|
{
|
||||||
|
m_value = string(buffer.begin() + position, buffer.begin() + end);
|
||||||
|
|
||||||
|
if (newPosition)
|
||||||
|
*newPosition = end;
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
template <>
|
||||||
|
void typeAdapter <string>::parse
|
||||||
|
(const string& buffer, const string::size_type position,
|
||||||
|
const string::size_type end, string::size_type* newPosition);
|
||||||
|
|
||||||
|
#endif // defined(__GNUC__) && (__GNUC__ >= 3) && (__GNUC_MINOR__ <= 2)
|
||||||
|
|
||||||
|
|
||||||
} // vmime
|
} // vmime
|
||||||
|
Loading…
Reference in New Issue
Block a user