Will break cygwin due to trivstring header.
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg223056.html
#define HAVE_MODE_T
#endif
-#if defined(_MSC_VER) && (_MSC_VER >= 1600)
-#include "support/strfwd.h" // always first, to prevent compiler's interpretation/instantiations of some typedef
-#endif
-
-
#endif
#ifndef BOX_H
#define BOX_H
-#include "support/strfwd.h"
+#include <ostream>
namespace lyx {
#include "OutputEnums.h"
#include "support/unique_ptr.h"
-#include "support/strfwd.h"
+#include "support/docstring.h"
#include "support/types.h"
#include <map>
#include <list>
#include <set>
-#include <string>
#include <vector>
#include "Encoding.h"
-#include "support/strfwd.h"
-
namespace lyx {
class Buffer;
#ifndef BUFFER_LIST_H
#define BUFFER_LIST_H
-#include "support/strfwd.h"
-
+#include <string>
#include <vector>
#include "TexRow.h"
#include "update_flags.h"
-#include "support/strfwd.h"
#include "support/types.h"
namespace lyx {
#ifndef CHANGES_H
#define CHANGES_H
-#include "support/strfwd.h"
#include "support/types.h"
#include "support/lyxtime.h"
#define CITATION_H
#include "support/docstring.h"
-#include <string>
#include <vector>
namespace lyx {
#ifndef CMDDEF_H
#define CMDDEF_H
-#include "support/strfwd.h"
-
#include <map>
#include <set>
+#include <string>
namespace lyx {
#include "ColorCode.h"
-#include "support/strfwd.h"
+#include <string>
namespace lyx {
#ifndef COLORSET_H
#define COLORSET_H
+#include "support/docstring.h"
#include "Color.h"
#include <map>
-#include <string>
namespace lyx {
#define CONVERTER_H
#include "Graph.h"
-#include "support/trivstring.h"
+#include "support/docstring.h"
#include <memory>
#include <vector>
#include <set>
-#include <string>
namespace lyx {
#ifndef CONVERTERCACHE_H
#define CONVERTERCACHE_H
-#include "support/strfwd.h"
+#include <string>
namespace lyx {
#define CURSORSLICE_H
#include "support/types.h"
-#include "support/strfwd.h"
#include "insets/Inset.h"
#include "Author.h"
#include "DocumentClassPtr.h"
-#include "support/strfwd.h"
#include "support/types.h"
#include "frontends/Clipboard.h"
#include "TexRow.h"
-#include "support/strfwd.h"
-
#include <vector>
#ifndef FLOATING_H
#define FLOATING_H
-#include "support/strfwd.h"
-
-#include <string>
-
+#include "support/docstring.h"
namespace lyx {
#include "FontInfo.h"
-#include "support/strfwd.h"
-
namespace lyx {
#include "support/lstrings.h"
#include <algorithm>
-#include <ostream>
#include <sstream>
using namespace std;
#include "FontEnums.h"
#include "support/Changer.h"
-#include "support/strfwd.h"
+#include "support/docstring.h"
namespace lyx {
#ifndef FORMAT_H
#define FORMAT_H
-#include "support/strfwd.h"
-#include "support/trivstring.h"
+#include "support/docstring.h"
#include <vector>
-#include <string>
namespace lyx {
#include "FuncRequest.h"
#include "KeySequence.h"
-#include "support/strfwd.h"
-
#include <memory>
#include <vector>
#include "OutputParams.h"
-#include "support/strfwd.h"
#include "support/FileName.h"
#include "support/signals.h"
#include <map>
#include <set>
-#include <string>
namespace lyx {
#include "TextClass.h"
-#include "support/strfwd.h"
-
#include <string>
#include <vector>
#ifndef LYX_H
#define LYX_H
-#include "support/strfwd.h"
-
+#include <string>
#include <vector>
namespace lyx {
#include "update_flags.h"
#include "support/Length.h"
-#include "support/strfwd.h"
#include "support/userinfo.h"
#include <map>
#include "support/docstring.h"
#include "support/unique_ptr.h"
-#include <string>
-
namespace lyx {
#include "ColorCode.h"
#include "FontInfo.h"
-#include "support/strfwd.h"
#include "support/Changer.h"
#include "insets/Inset.h"
#include "support/lstrings.h"
#include <sstream>
-#include <string>
#include <algorithm>
using namespace std;
#include "LayoutEnums.h"
#include "SpellChecker.h"
-#include "support/strfwd.h"
#include "support/types.h"
#include "insets/InsetCode.h"
#include "Spacing.h"
#include "support/types.h"
-#include "support/strfwd.h"
#include "support/Length.h"
#ifndef PERSONAL_WORD_LIST_H
#define PERSONAL_WORD_LIST_H
-#include "support/strfwd.h"
#include "support/docstring_list.h"
#include "support/FileName.h"
#ifndef SPACING_H
#define SPACING_H
-#include "support/strfwd.h"
-
#include <string>
namespace lyx {
#ifndef SPELL_BASE_H
#define SPELL_BASE_H
-#include "support/strfwd.h"
+#include "support/docstring.h"
#include <vector>
#ifndef STATISTICS_H
#define STATISTICS_H
-#include "support/strfwd.h"
+#include "support/docstring.h"
#include "support/types.h"
namespace lyx {
#include <list>
#include <map>
#include <set>
-#include <string>
#include <vector>
#ifdef ERROR
#ifndef THESAURUS_H
#define THESAURUS_H
-#include "support/strfwd.h"
+#include "support/docstring.h"
#include <map>
#include <vector>
#include "Toc.h"
#include "TocBuilder.h"
-#include "support/strfwd.h"
#include "support/unique_ptr.h"
#include "Toc.h"
-#include "support/strfwd.h"
+#include "support/docstring.h"
#include <stack>
#include "FuncCode.h"
#include "update_flags.h"
-#include "support/strfwd.h"
+#include "support/docstring.h"
#include <functional>
#ifndef BASE_CLIPBOARD_H
#define BASE_CLIPBOARD_H
-#include "support/strfwd.h"
-
namespace lyx {
class Cursor;
#ifndef DELEGATES_H
#define DELEGATES_H
-#include "support/strfwd.h"
+#include "support/docstring.h"
namespace lyx {
#ifndef FONTLOADER_H
#define FONTLOADER_H
-#include "support/strfwd.h"
+#include "support/docstring.h"
namespace lyx {
#include "support/mute_warning.h"
-#include "support/strfwd.h"
+#include "support/docstring.h"
#include <vector>
#ifndef PAINTER_H
#define PAINTER_H
-#include "support/strfwd.h"
+#include "support/docstring.h"
#include "support/types.h"
namespace lyx {
#ifndef SELECTION_H
#define SELECTION_H
-#include "support/strfwd.h"
+#include "support/docstring.h"
namespace lyx {
namespace frontend {
#ifndef LYX_ALERT_H
#define LYX_ALERT_H
-#include "support/strfwd.h"
+#include "support/docstring.h"
namespace lyx {
#ifndef LYX_CATEGORIZEDCOMBO_H
#define LYX_CATEGORIZEDCOMBO_H
-#include "support/strfwd.h"
-
#include <QComboBox>
#include "insets/InsetCode.h"
-#include "support/strfwd.h"
-
#include <QString>
class QSettings;
#include "ui_FindAndReplaceUi.h"
#include "support/docstring.h"
-#include <string>
namespace lyx {
#include <algorithm>
#include <regex>
-#include <string>
#include <vector>
using namespace std;
#include <QScrollBar>
#include <map>
-#include <string>
using namespace std;
#ifndef GUIDELIMITERDIALOG_H
#define GUIDELIMITERDIALOG_H
+#include "support/docstring.h"
+
#include "GuiDialog.h"
#include "ui_DelimiterUi.h"
#ifndef GUISYMBOLSDIALOG_H
#define GUISYMBOLSDIALOG_H
+#include "support/docstring.h"
+
#include "DialogView.h"
#include "ui_SymbolsUi.h"
#include <map>
-#include <string>
#include <vector>
namespace lyx {
#include <QToolBar>
#include <QToolButton>
-#include "support/strfwd.h"
-
class QSettings;
namespace lyx {
#include "frontends/Delegates.h"
-#include "support/strfwd.h"
-
#include <QMainWindow>
#include <QLabel>
#include <QMenu>
#ifndef INSET_PARAMS_DIALOG_H
#define INSET_PARAMS_DIALOG_H
+#include "support/docstring.h"
+
#include "DialogView.h"
#include "ui_InsetParamsUi.h"
#include "FuncCode.h"
-#include "support/strfwd.h"
+#include "support/docstring.h"
#include <QWidget>
#ifndef LYX_LAYOUT_BOX_H
#define LYX_LAYOUT_BOX_H
-#include "support/strfwd.h"
+#include "support/docstring.h"
#include <QComboBox>
#ifndef GRAPHICSTYPES_H
#define GRAPHICSTYPES_H
-#include "support/strfwd.h"
-
-
namespace lyx {
namespace graphics {
#ifndef PREVIEWIMAGE_H
#define PREVIEWIMAGE_H
-#include "support/strfwd.h"
+#include "support/docstring.h"
namespace lyx {
#include "RowFlags.h"
#include "support/docstring.h"
-#include "support/strfwd.h"
#include "support/types.h"
#include <climits>
#include "support/docstring.h"
-#include <string>
#include <vector>
#include <map>
#include "support/docstring.h"
#include <set>
-#include <string>
namespace lyx {
#ifndef LYXFIND_H
#define LYXFIND_H
-#include "support/strfwd.h"
-
// FIXME
#include "support/docstring.h"
#include "support/lstrings.h"
#include <algorithm>
-#include <ostream>
using namespace lyx::support;
#define MATH_MATRIXINSET_H
#include "InsetMathGrid.h"
-#include "support/strfwd.h"
namespace lyx {
#ifndef MATHAUTOCORRECT_H
#define MATHAUTOCORRECT_H
-#include "support/strfwd.h"
+#include "support/docstring.h"
namespace lyx {
#include "support/docstring.h"
#include "support/lassert.h"
-#include <ostream>
-
using namespace std;
namespace lyx {
#ifndef MATH_CLASS_H
#define MATH_CLASS_H
-#include "support/strfwd.h"
+#include "support/docstring.h"
namespace lyx {
#include "Dimension.h"
#include "OutputEnums.h"
-#include "support/strfwd.h"
-
#include <cstddef>
#include <vector>
#ifndef MATH_EXTERN_H
#define MATH_EXTERN_H
-#include "support/strfwd.h"
+#include "support/docstring.h"
namespace lyx {
#include "MathParser.h"
-#include "support/strfwd.h"
-
#include <map>
namespace lyx {
#include <algorithm>
#include <cstring>
-#include <ostream>
#include <FontInfo.h>
using namespace std;
#include "texstream.h"
#include "support/Changer.h"
-#include "support/strfwd.h"
namespace lyx {
#define MATH_SUPPORT_H
#include "MathParser_flags.h"
-#include "support/strfwd.h"
+#include "support/docstring.h"
namespace lyx {
#include "ParagraphList.h"
#include "support/docstream.h"
-#include "support/strfwd.h"
#include "xml.h"
namespace lyx {
#ifndef OUTPUT_PLAINTEXT_H
#define OUTPUT_PLAINTEXT_H
-#include "support/strfwd.h"
+#include "support/docstring.h"
#include "support/types.h"
#include <climits>
#include "LayoutEnums.h"
-#include "support/strfwd.h"
#include "xml.h"
#ifndef CONSOLEAPPLICATION_H
#define CONSOLEAPPLICATION_H
-#include "support/strfwd.h"
+#include <string>
namespace lyx {
#define FILENAME_H
#include "support/os.h"
-#include "support/strfwd.h"
#include <ctime>
#include <set>
#define FORKEDCALLS_H
#include "support/signals.h"
-#include "support/strfwd.h"
+#include "support/docstring.h"
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#ifndef LENGTH_H
#define LENGTH_H
-#include "support/strfwd.h"
+#include "support/docstring.h"
namespace lyx {
#ifndef LEXER_H
#define LEXER_H
-#include "support/strfwd.h"
-#include <string>
+#include "support/docstring.h"
namespace lyx {
signals.h \
socktools.cpp \
socktools.h \
- strfwd.h \
Systemcall.cpp \
Systemcall.h \
SystemcallPrivate.h \
#include "support/docstring.h"
#include <map>
-#include <string>
namespace lyx {
#ifndef LYX_SUPPORT_PROGRESSINTERFACE_H
#define LYX_SUPPORT_PROGRESSINTERFACE_H
-#include "support/strfwd.h"
+#include "support/docstring.h"
class QString;
#ifndef SYSTEMCALL_H
#define SYSTEMCALL_H
-#include "strfwd.h"
-
namespace lyx {
namespace support {
#include "support/convert.h"
#include "support/docstring.h"
-#include <string>
#include <sstream>
//needed for Mac OSX 10.5.2 Leopard
#include <cstdlib>
#ifndef CONVERT_H
#define CONVERT_H
-#include "support/strfwd.h"
+#include "support/docstring.h"
namespace lyx {
#ifndef COUNTER_REPS_H
#define COUNTER_REPS_H
-#include "support/strfwd.h"
+#include "support/docstring.h"
namespace lyx {
#ifndef LYXDEBUG_H
#define LYXDEBUG_H
-#include "support/strfwd.h"
+#include "support/docstring.h"
// Forward definitions do not work with libc++
// but ios_base has already been defined in strfwd
#ifndef LYX_DOCSTRING_H
#define LYX_DOCSTRING_H
-#include "support/strfwd.h"
+#ifdef USE_WCHAR_T
+
+// Prefer this if possible because GNU libstdc++ has usable
+// std::ctype<wchar_t> locale facets but not
+// std::ctype<boost::uint32_t>. gcc older than 3.4 is also missing
+// usable std::char_traits<boost::uint32_t>.
+namespace lyx { typedef wchar_t char_type; }
+
+#else
+
+#include <cstdint>
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1600)
+namespace lyx { typedef uint32_t char_type; }
+#include "support/numpunct_lyx_char_type.h" // implementation for our char_type needed
+#else
+namespace lyx { typedef std::uint32_t char_type; }
+#endif
+
+#endif
#include <string>
namespace lyx {
+/**
+ * String type for storing the main text in UCS4 encoding.
+ * Use std::string only in cases 7-bit ASCII is to be manipulated
+ * within the variable.
+ */
+typedef std::basic_string<char_type, std::char_traits<char_type>,
+ std::allocator<char_type> > docstring;
+
+/// Base class for UCS4 input streams
+typedef std::basic_istream<char_type, std::char_traits<char_type> > idocstream;
+
+/// Base class for UCS4 output streams
+typedef std::basic_ostream<char_type, std::char_traits<char_type> > odocstream;
+
+/// UCS4 output stringstream
+typedef std::basic_ostringstream<char_type, std::char_traits<char_type>, std::allocator<char_type> > odocstringstream;
+
+#if ! defined(USE_WCHAR_T)
+extern odocstream & operator<<(odocstream &, char);
+#endif
+
+// defined in lstrings.cpp
+docstring const & empty_docstring();
+std::string const & empty_string();
+// defined in docstring.cpp
+bool operator==(docstring const &, char const *);
+
+#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
+
+} // namespace lyx
+
+namespace lyx {
+
/// Creates a docstring from a C string of ASCII characters
docstring const from_ascii(char const *);
#include "support/docstring.h"
#include <utility>
-#include <string>
#include <set>
namespace lyx {
#ifndef GETTEXT_H
#define GETTEXT_H
-#include "support/strfwd.h"
+#include "support/docstring.h"
namespace lyx {
#ifdef __cplusplus
-#include "support/strfwd.h"
+#include "support/docstring.h"
namespace lyx {
#define LYXTIME_H
#include <time.h>
-#include <string>
-#include "support/strfwd.h"
+#include "support/docstring.h"
namespace lyx {
#ifndef OS_H
#define OS_H
-#include "support/strfwd.h"
+#include "support/docstring.h"
#include <cstddef>
#ifndef QSTRING_HELPERS_H
#define QSTRING_HELPERS_H
-#include "support/strfwd.h"
+#include "support/docstring.h"
class QString;
+++ /dev/null
-// -*- C++ -*-
-
-// Heavily inspired by /usr/include/c++/4.1/bits
-//
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-#ifndef STRFWD_H
-#define STRFWD_H
-
-#ifdef USE_WCHAR_T
-
-// Prefer this if possible because GNU libstdc++ has usable
-// std::ctype<wchar_t> locale facets but not
-// std::ctype<boost::uint32_t>. gcc older than 3.4 is also missing
-// usable std::char_traits<boost::uint32_t>.
-namespace lyx { typedef wchar_t char_type; }
-
-#else
-
-#include <cstdint>
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1600)
-namespace lyx { typedef uint32_t char_type; }
-#include "support/numpunct_lyx_char_type.h" // implementation for our char_type needed
-#else
-namespace lyx { typedef std::uint32_t char_type; }
-#endif
-
-#endif
-
-// Forward definitions do not work with libc++
-// For gcc5 with the new std::string ABI forward declarations would work in
-// principle, but I am not sure whether we want non-standard
-// "namespace __cxx11" in our sources.
-#if defined(USE_LLVM_LIBCPP) || defined(USE_GLIBCXX_CXX11_ABI)
-#include <string>
-#else
-
-namespace std {
-
-template<typename Alloc> class allocator;
-
-template<typename Char> struct char_traits;
-template<> struct char_traits<char>;
-#ifdef USE_WCHAR_T
-template<> struct char_traits<wchar_t>;
-#endif
-
-template<typename Char, typename Traits, typename Alloc> class basic_string;
-typedef basic_string<char, char_traits<char>, allocator<char> > string;
-
-template<class Char, class Traits> class basic_istream;
-template<class Char, class Traits> class basic_ostream;
-template<class Char, class Traits, class Allocator> class basic_ostringstream;
-
-typedef basic_istream<char, char_traits<char> > istream;
-typedef basic_ostream<char, char_traits<char> > ostream;
-typedef basic_ostringstream<char, char_traits<char>, allocator<char> > ostringstream;
-
-} // namespace std
-
-#endif
-
-
-
-
-
-namespace lyx {
-
-/**
- * String type for storing the main text in UCS4 encoding.
- * Use std::string only in cases 7-bit ASCII is to be manipulated
- * within the variable.
- */
-typedef std::basic_string<char_type, std::char_traits<char_type>,
- std::allocator<char_type> > docstring;
-
-/// Base class for UCS4 input streams
-typedef std::basic_istream<char_type, std::char_traits<char_type> > idocstream;
-
-/// Base class for UCS4 output streams
-typedef std::basic_ostream<char_type, std::char_traits<char_type> > odocstream;
-
-/// UCS4 output stringstream
-typedef std::basic_ostringstream<char_type, std::char_traits<char_type>, std::allocator<char_type> > odocstringstream;
-
-#if ! defined(USE_WCHAR_T)
-extern odocstream & operator<<(odocstream &, char);
-#endif
-
-// defined in lstrings.cpp
-docstring const & empty_docstring();
-std::string const & empty_string();
-// defined in docstring.cpp
-bool operator==(docstring const &, char const *);
-
-#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
-
-} // namespace lyx
-
-#endif
#ifndef TEXTUTILS_H
#define TEXTUTILS_H
-#include "support/strfwd.h"
-
-
namespace lyx {
/// return true if the char is a line separator
#ifdef STD_STRING_USES_COW
#include <algorithm>
-#include <ostream>
#include <stdexcept>
using namespace std;
#ifndef LYX_TRIVSTRING_H
#define LYX_TRIVSTRING_H
-#include "support/strfwd.h"
-
#ifdef STD_STRING_USES_COW
#include <cstdlib>
#ifndef LYX_SUPPORT_UNICODE_H
#define LYX_SUPPORT_UNICODE_H
-#include "support/strfwd.h"
+#include "support/docstring.h"
#include "support/unique_ptr.h"
#include <cstddef>
-#include <string>
#include <vector>
#ifndef USERINFO_H
#define USERINFO_H
-#include "support/strfwd.h"
+#include <string>
namespace lyx {