On 29.01.2011 13:24, Kornel wrote: > Am Samstag, 29. Januar 2011 schrieb Tommaso Cucinotta: >> insets/InsetTabular.cpp: In member function ‘int >> lyx::Tabular::TeXTopHLine(lyx::otexstream&, size_t, std::string) const’: >> insets/InsetTabular.cpp:2068: error: ambiguous overload for ‘operator<<’ >> in >> ‘lyx::operator<<(((lyx::otexstream&)((lyx::otexstream*)lyx::operator<<(((ly >> x::otexstream&)((lyx::otexstream*)lyx::operator<<(((lyx::otexstream&)((lyx: >> :otexstream*)os)), ((const char*)"\\expandafter")))), (((bool)((const > > This cured it for me, but I fear it is not the proper c++ patch. > > Kornel
Yes, the cast isn't nice. Does attached patch also fix the problem? If yes, I think you could commit it. Peter
Index: src/support/docstream.cpp =================================================================== --- src/support/docstream.cpp (revision 37360) +++ src/support/docstream.cpp (working copy) @@ -537,8 +537,18 @@ return ots; } + +otexstream & operator<<(otexstream & ots, size_t i) +{ + ots.os() << i; + ots.canBreakLine(true); + ots.protectSpace(false); + return ots; } + +} + #if ! defined(USE_WCHAR_T) && defined(__GNUC__) // We get undefined references to these virtual methods. This looks like // a bug in gcc. The implementation here does not do anything useful, since Index: src/support/docstream.h =================================================================== --- src/support/docstream.h (revision 37360) +++ src/support/docstream.h (working copy) @@ -152,6 +152,8 @@ otexstream & operator<<(otexstream &, int); /// otexstream & operator<<(otexstream &, unsigned int); +/// +otexstream & operator<<(otexstream &, size_t); /// Helper struct for changing stream encoding struct SetEnc {