[patch] Removal of strfwd.h (was: When to use strfwd.h)
Pavel Sanda
sanda at lyx.org
Thu Oct 3 21:33:18 UTC 2024
On Thu, Oct 03, 2024 at 11:05:03PM +0200, Enrico Forestieri wrote:
> On Thu, Oct 03, 2024 at 10:04:04PM +0200, Enrico Forestieri wrote:
> >
> > On Thu, Oct 03, 2024 at 03:57:56PM +0200, Pavel Sanda wrote:
> > > On Thu, Oct 03, 2024 at 01:35:55AM +0200, Enrico Forestieri wrote:
> > > > And, after adding "#include <string>" to src/support/trivstring.h as
> > > > suggested, it fails in this new way:
> > >
> > > Adding "#include <ostream>" makes cygwin happy?
> >
> > It helps. Compilation proceeds until the following failure:
>
> However, applying the attached patch it compiles and works fine.
> See https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg219747.html for
> the reason the patch is right.
I was going to ask whether adding #include "support/trivstring.h" into Format.h would work.
With removal of strfwd I moved
+#ifdef STD_STRING_USES_COW
+template<typename Char> class trivial_string;
+typedef trivial_string<char> trivstring;
+typedef trivial_string<char_type> trivdocstring;
+#else
+typedef std::string trivstring;
+typedef docstring trivdocstring;
+#endif
into docstring.h.
But I don't like it there as all trivstring stuff should imho go into trivstring.h.
Before I was afraid what will break, but as I broke cygwin anyway, maybe it's time
to get rid of this from docstring?
Pavel
More information about the lyx-devel
mailing list