After a cvs update I am having probles compiling cregex.cpp on an Intel Linux platform with the KC compiler. The problem seems to be an ambiguity in a call to destroy(..). While this is probably a bug in the KCC compiler, I would appreciate a workaround (e.g. changing the name of the destroy() function in regex) that would make this library compile with KCC?
Matthias
Here is the error message:
"/usr/local/apli/KAI/KCC.flex-4.0f-3/KCC_BASE/include/memory", line 168: error:
more than one instance of overloaded function "destroy" matches the
argument list:
function template "boost::re_detail::destroy(T *)"
function template "__kai::destroy(T *)"
argument types are: (boost::sub_match<const char *> *)
destroy(&*first);
^
detected during:
instantiation of "void __kai::destroy(ForwardIterator,
ForwardIterator) [with
ForwardIterator=boost::sub_match<const char *> *]" at
line 236
instantiation of "ForwardIterator
std::uninitialized_copy(InputIterator, InputIterator,
ForwardIterator) [with
InputIterator=boost::sub_match<const char *> *,
ForwardIterator=boost::sub_match<const char *> *]" at
line 285 of
"/usr/local/apli/KAI/KCC.flex-4.0f-3/KCC_BASE/include/vec
tor"
instantiation of "std::vector<T, Allocator>::vector(const
std::vector<T, Allocator> &) [with
T=boost::sub_match<const char *>,
Allocator=std::allocator<boost::sub_match<const char
*>>]"
and here the offending part in <memory>:
// Modena uses these template function throught the library to help clarify things.
// I've placed them in namespace __kai to make it clear that they are not for general use.
namespace __kai {
template <class T1, class T2>
inline void construct(T1* p, const T2& value) { new (p) T1(value); }
template <class T> inline void destroy(T* pointer) { pointer->~T(); }
template <class ForwardIterator> inline void destroy(ForwardIterator first, ForwardIterator last) { for(; first != last; ++first) destroy(&*first); } } // namespace __kai
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost