-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
richelbilderbeek
committed
Feb 27, 2017
1 parent
a48cd96
commit 5e03c09
Showing
5 changed files
with
25 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,17 @@ | ||
sudo: true | ||
language: cpp | ||
compiler: gcc | ||
|
||
before_install: | ||
# C++17 | ||
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test | ||
- sudo apt-get update -qq | ||
install: sudo apt-get install -qq g++-5 | ||
script: ./build.sh | ||
|
||
install: | ||
# C++18 | ||
- sudo apt-get install -qq g++-6 | ||
|
||
script: | ||
- qmake | ||
- make | ||
- ./travis_qmake_gcc_cpp17 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,6 @@ | ||
auto concept LessThanComparable<typename T> { | ||
bool operator<(T, T); | ||
} | ||
|
||
template<typename T> requires LessThanComparable<T> | ||
const T& min(const T &x, const T &y) { | ||
return (y < x) ? y : x; | ||
} | ||
#include <tuple> | ||
|
||
int main() { | ||
if (min(42,314) != 42) { return 1; } | ||
int main() | ||
{ | ||
static_assert("C++17"); //C++17 has a default message | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
TEMPLATE = app | ||
CONFIG += console | ||
CONFIG -= app_bundle qt | ||
SOURCES += main.cpp | ||
# C++17 | ||
CONFIG += c++17 | ||
QMAKE_CXX = g++-6 | ||
QMAKE_LINK = g++-6 | ||
QMAKE_CC = gcc-6 | ||
QMAKE_CXXFLAGS += -std=c++17 | ||
|
||
# High warning level | ||
QMAKE_CXXFLAGS += -Wall -Wextra -Weffc++ -Werror | ||
|
||
QMAKE_CXX = g++-5 | ||
QMAKE_LINK = g++-5 | ||
QMAKE_CC = gcc-5 | ||
QMAKE_CXXFLAGS += -std=c++17 | ||
# Files | ||
SOURCES += main.cpp |