Skip to content

Commit

Permalink
Works locally
Browse files Browse the repository at this point in the history
  • Loading branch information
richelbilderbeek committed Feb 27, 2017
1 parent a48cd96 commit 5e03c09
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 28 deletions.
13 changes: 11 additions & 2 deletions .travis.yml
@@ -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
3 changes: 0 additions & 3 deletions build.sh

This file was deleted.

5 changes: 0 additions & 5 deletions clean.sh

This file was deleted.

14 changes: 4 additions & 10 deletions main.cpp
@@ -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
}
18 changes: 10 additions & 8 deletions travis_qmake_gcc_cpp17.pro
@@ -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

0 comments on commit 5e03c09

Please sign in to comment.