Compile LMMS using C++17

This replaces `set(CMAKE_CXX_STANDARD 14)` by `set(CMAKE_CXX_STANDARD 17)`
wherever it is required.

Additionally:

* raise `CMAKE_MINIMUM_REQUIRED(VERSION ...)` to `3.8` (the minimum
  that supports C++17)
* `stdshims.h` is now unused and thus removed
This commit is contained in:
Johannes Lorenz
2021-08-22 18:06:20 +02:00
committed by Johannes Lorenz
parent fd18305fba
commit 8a9a2fae62
9 changed files with 11 additions and 44 deletions

View File

@@ -9,8 +9,8 @@ SET(LMMS_UIS "")
SET(CMAKE_AUTOMOC ON)
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
# Enable C++14
SET(CMAKE_CXX_STANDARD 14)
# Enable C++17
SET(CMAKE_CXX_STANDARD 17)
IF(LMMS_BUILD_APPLE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")

View File

@@ -28,7 +28,6 @@
#include <QDomElement>
#include "AutomatableModel.h"
#include "stdshims.h"

View File

@@ -73,13 +73,12 @@
#include "ControlLayout.h"
#include "stdshims.h"
#include <QWidget>
#include <QLayoutItem>
#include <QLineEdit>
#include <QRect>
#include <QString>
#include <utility>
constexpr const int ControlLayout::m_minWidth;
@@ -215,7 +214,7 @@ QSize ControlLayout::minimumSize() const
// get maximum height and width for all children.
// as Qt will later call heightForWidth, only the width here really matters
QSize size;
for (const QLayoutItem *item : as_const(m_itemMap))
for (const QLayoutItem *item : std::as_const(m_itemMap))
{
size = size.expandedTo(item->minimumSize());
}

View File

@@ -47,7 +47,6 @@
#include "MainWindow.h"
#include "ProjectJournal.h"
#include "Song.h"
#include "stdshims.h"
#include "StringPairDrag.h"
#include "TextFloat.h"