Skip to content

Commit

Permalink
Enable C++14 and add a quick check
Browse files Browse the repository at this point in the history
  • Loading branch information
KjellMorgenstern committed Oct 24, 2019
1 parent 3537f5a commit 29b8f5d
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
2 changes: 2 additions & 0 deletions phoenix.pro
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ lessThan(QT_MINOR_VERSION, 9) {
}

CONFIG += debug_and_release
CONFIG += c++14

unix:!macx {
CONFIG += link_pkgconfig
Expand Down Expand Up @@ -196,6 +197,7 @@ include(pri/sketch.pri)
include(pri/translations.pri)
include(pri/program.pri)
include(pri/qtsysteminfo.pri)
include(test/version.pri)

contains(DEFINES, QUAZIP_INSTALLED) {
!build_pass:message("using installed QuaZIP library")
Expand Down
18 changes: 18 additions & 0 deletions test/version.pri
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# /*******************************************************************
# Part of the Fritzing project - http://fritzing.org
# Copyright (c) 2007-2019 Fritzing
# Fritzing 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 3 of the License, or
# (at your option) any later version.
# Fritzing is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with Fritzing. If not, see <http://www.gnu.org/licenses/>.
# ********************************************************************/


SOURCES += \
test/version/cppversion.cpp
19 changes: 19 additions & 0 deletions test/version/cppversion.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include <iostream>

/*
A quick compile test to verify that certain C++ features are supported
*/

template<typename T>
constexpr T pi = T(3.1415926535897932385);

void testCppVersion() {
int i = 1;
int& r = i;
auto ar = r; // int, nicht: int&
decltype(r) dr = r; // int& C++11/14
decltype(auto) dra = r; // int& C++14


std::cout << 0b0001'0000'0001;
}

0 comments on commit 29b8f5d

Please sign in to comment.