mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Remove support for gcc 4.6
This was kept so long because of Ubuntu 12.04 LTS, but having a not-really-c++11 compiler is not nice.
This commit is contained in:
parent
9bf3e7b045
commit
22f599250e
5
INSTALL
5
INSTALL
@ -47,9 +47,8 @@ You will also probably need GNU m4 (perhaps installed as gm4).
|
|||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
|
|
||||||
First of all, you will need a recent C++ compiler, where recent means
|
First of all, you will need a C++11 standard conforming compiler, like gcc (at
|
||||||
that the compilers are close to C++11 standard conforming like gcc (at
|
least 4.7) or clang.
|
||||||
least 4.6) or clang.
|
|
||||||
|
|
||||||
LyX makes great use of the C++ Standard Template Library (STL).
|
LyX makes great use of the C++ Standard Template Library (STL).
|
||||||
This means that gcc users will have to install the relevant libstdc++
|
This means that gcc users will have to install the relevant libstdc++
|
||||||
|
@ -170,7 +170,7 @@ selects C++11 mode; gives an error when C++11 mode is not found.
|
|||||||
AC_DEFUN([LYX_CXX_CXX11_FLAGS],
|
AC_DEFUN([LYX_CXX_CXX11_FLAGS],
|
||||||
[AC_CACHE_CHECK([for at least C++11 mode], [lyx_cv_cxx11_flags],
|
[AC_CACHE_CHECK([for at least C++11 mode], [lyx_cv_cxx11_flags],
|
||||||
[lyx_cv_cxx11_flags=none
|
[lyx_cv_cxx11_flags=none
|
||||||
for flag in -std=c++14 -std=c++11 "" -std=c++0x -std=gnu++14 -std=gnu++11 -std=gnu++0x ; do
|
for flag in -std=c++14 -std=c++11 "" -std=gnu++14 -std=gnu++11 ; do
|
||||||
save_CPPFLAGS=$CPPFLAGS
|
save_CPPFLAGS=$CPPFLAGS
|
||||||
CPPFLAGS="$AM_CPPFLAGS $CPPFLAGS"
|
CPPFLAGS="$AM_CPPFLAGS $CPPFLAGS"
|
||||||
save_CXXFLAGS=$CXXFLAGS
|
save_CXXFLAGS=$CXXFLAGS
|
||||||
@ -413,8 +413,7 @@ if test x$GXX = xyes; then
|
|||||||
AM_CPPFLAGS="$AM_CPPFLAGS -Wall -Wextra"
|
AM_CPPFLAGS="$AM_CPPFLAGS -Wall -Wextra"
|
||||||
fi
|
fi
|
||||||
case $gxx_version in
|
case $gxx_version in
|
||||||
2.*|3.*) AC_ERROR([gcc >= 4.6 is required]);;
|
2.*|3.*|4.@<:@0-6@:>@) AC_ERROR([gcc >= 4.7 is required]);;
|
||||||
4.0*|4.1*|4.2*|4.3*|4.4*|4.5*) AC_ERROR([gcc >= 4.6 is required]);;
|
|
||||||
esac
|
esac
|
||||||
if test x$enable_stdlib_debug = xyes ; then
|
if test x$enable_stdlib_debug = xyes ; then
|
||||||
dnl FIXME: for clang/libc++, one should define _LIBCPP_DEBUG2=0
|
dnl FIXME: for clang/libc++, one should define _LIBCPP_DEBUG2=0
|
||||||
|
10
src/TexRow.h
10
src/TexRow.h
@ -119,7 +119,6 @@ public:
|
|||||||
///
|
///
|
||||||
TexRow();
|
TexRow();
|
||||||
|
|
||||||
#if !(defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 6))
|
|
||||||
/// Copy can be expensive and is not usually useful for TexRow.
|
/// Copy can be expensive and is not usually useful for TexRow.
|
||||||
/// Force explicit copy, prefer move instead. This also prevents
|
/// Force explicit copy, prefer move instead. This also prevents
|
||||||
/// move()s from being converted into copy silently.
|
/// move()s from being converted into copy silently.
|
||||||
@ -127,10 +126,6 @@ public:
|
|||||||
TexRow(TexRow && other) = default;
|
TexRow(TexRow && other) = default;
|
||||||
TexRow & operator=(TexRow const & other) = default;
|
TexRow & operator=(TexRow const & other) = default;
|
||||||
TexRow & operator=(TexRow && other) = default;
|
TexRow & operator=(TexRow && other) = default;
|
||||||
# else
|
|
||||||
//for gcc 4.6, nothing to do: it's enough to disable implicit copy during
|
|
||||||
// dev with more recent versions of gcc.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/// Clears structure.
|
/// Clears structure.
|
||||||
void reset();
|
void reset();
|
||||||
@ -241,7 +236,6 @@ struct TexString {
|
|||||||
docstring str;
|
docstring str;
|
||||||
///
|
///
|
||||||
TexRow texrow;
|
TexRow texrow;
|
||||||
#if !(defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 6))
|
|
||||||
/// Copy can be expensive and is not usually useful for TexString.
|
/// Copy can be expensive and is not usually useful for TexString.
|
||||||
/// Force explicit copy, prefer move instead. This also prevents
|
/// Force explicit copy, prefer move instead. This also prevents
|
||||||
/// move()s from being converted into copy silently.
|
/// move()s from being converted into copy silently.
|
||||||
@ -249,10 +243,6 @@ struct TexString {
|
|||||||
TexString(TexString && other) = default;
|
TexString(TexString && other) = default;
|
||||||
TexString & operator=(TexString const & other) = default;
|
TexString & operator=(TexString const & other) = default;
|
||||||
TexString & operator=(TexString && other) = default;
|
TexString & operator=(TexString && other) = default;
|
||||||
# else
|
|
||||||
//for gcc 4.6, nothing to do: it's enough to disable implicit copy during
|
|
||||||
// dev with more recent versions of gcc.
|
|
||||||
#endif
|
|
||||||
/// Empty TexString
|
/// Empty TexString
|
||||||
TexString() = default;
|
TexString() = default;
|
||||||
/// Texstring containing str and TexRow with enough lines which are empty
|
/// Texstring containing str and TexRow with enough lines which are empty
|
||||||
|
@ -33,15 +33,11 @@ namespace lyx {
|
|||||||
*/
|
*/
|
||||||
template <class Key, class Val>
|
template <class Key, class Val>
|
||||||
class Cache : private QCache<Key, Val> {
|
class Cache : private QCache<Key, Val> {
|
||||||
#if !(defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 6))
|
|
||||||
static_assert(std::is_copy_constructible<Val>::value,
|
static_assert(std::is_copy_constructible<Val>::value,
|
||||||
"lyx::Cache only stores copyable objects!");
|
"lyx::Cache only stores copyable objects!");
|
||||||
static_assert(std::is_default_constructible<Val>::value,
|
static_assert(std::is_default_constructible<Val>::value,
|
||||||
"lyx::Cache only stores default-constructible objects!");
|
"lyx::Cache only stores default-constructible objects!");
|
||||||
using Q = QCache<Key, Val>;
|
using Q = QCache<Key, Val>;
|
||||||
#else
|
|
||||||
typedef QCache<Key, Val> Q;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
|
@ -24,9 +24,7 @@ struct Revertible {
|
|||||||
virtual void keep() {}
|
virtual void keep() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
//for gcc 4.6
|
using Changer = unique_ptr<Revertible>;
|
||||||
//using Changer = unique_ptr<Revertible>;
|
|
||||||
typedef unique_ptr<Revertible> Changer;
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace lyx
|
} // namespace lyx
|
||||||
|
@ -46,18 +46,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//for gcc 4.6
|
|
||||||
#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 6)
|
|
||||||
template <typename X>
|
|
||||||
struct RefChanger : unique_ptr<RevertibleRef<X>>
|
|
||||||
{
|
|
||||||
RefChanger(unique_ptr<RevertibleRef<X>> p)
|
|
||||||
: unique_ptr<RevertibleRef<X>>(move(p))
|
|
||||||
{}
|
|
||||||
};
|
|
||||||
#else
|
|
||||||
template <typename X> using RefChanger = unique_ptr<RevertibleRef<X>>;
|
template <typename X> using RefChanger = unique_ptr<RevertibleRef<X>>;
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/// Saves the value of \param ref in a movable object
|
/// Saves the value of \param ref in a movable object
|
||||||
|
@ -66,13 +66,6 @@ IconvProcessor::IconvProcessor(string tocode, string fromcode)
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// for gcc 4.6
|
|
||||||
IconvProcessor::IconvProcessor(IconvProcessor && other)
|
|
||||||
: tocode_(move(other.tocode_)), fromcode_(move(other.fromcode_)),
|
|
||||||
h_(move(other.h_))
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
bool IconvProcessor::init()
|
bool IconvProcessor::init()
|
||||||
{
|
{
|
||||||
if (h_)
|
if (h_)
|
||||||
|
@ -62,8 +62,8 @@ public:
|
|||||||
char * out_buffer, size_t max_out_size);
|
char * out_buffer, size_t max_out_size);
|
||||||
/// target encoding
|
/// target encoding
|
||||||
std::string to() const { return tocode_; }
|
std::string to() const { return tocode_; }
|
||||||
// required by g++ 4.6
|
// required by g++ 4.7
|
||||||
IconvProcessor(IconvProcessor && other);
|
IconvProcessor(IconvProcessor &&) = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Get the global IconvProcessor instance of the current thread for
|
/// Get the global IconvProcessor instance of the current thread for
|
||||||
|
Loading…
Reference in New Issue
Block a user