Skip to content

Commit 73d6581

Browse files
author
Hana Dusíková
committed
clang 6 and xcode is back
1 parent 5c38177 commit 73d6581

File tree

3 files changed

+46
-4
lines changed

3 files changed

+46
-4
lines changed

.travis.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ matrix:
1616
- os: linux
1717
compiler: clang
1818
env:
19-
- COMPILER=clang++-7
19+
- COMPILER=clang++-6.0
2020
addons:
2121
apt:
22-
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-7']
23-
packages: ['g++-8', 'clang-7']
22+
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-6.0']
23+
packages: ['g++-8', 'clang-6.0']
2424

2525
- os: linux
2626
language: python
@@ -36,6 +36,9 @@ matrix:
3636
script:
3737
- python .conan/build.py
3838

39+
- os: osx
40+
osx_image: xcode10
41+
3942
before_install:
4043
- |
4144
if [[ (-x $(which brew)) ]]; then

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ More documentation on [pcre.org](https://www.pcre.org/current/doc/html/pcre2synt
4343

4444
## Supported compilers
4545

46-
* clang 7.0+ (template UDL, C++17 syntax)
46+
* clang 6.0+ (template UDL, C++17 syntax)
47+
* xcode clang 10.0+ (template UDL, C++17 syntax)
4748
* gcc 7.4+ (template UDL, C++17 syntax)
4849
* gcc 9.0+ (C++17 & C++20 cNTTP syntax)
4950
* MSVC 15.8.8+ (C++17 syntax only)

test.cpp

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#include "include/ctre.hpp"
2+
#include "include/ctre/first.hpp"
3+
#include <iostream>
4+
5+
template <typename T> struct identify;
6+
7+
int main() {
8+
ctre::point_set<4> set;
9+
set.insert(1,10);
10+
set.insert(5,20);
11+
12+
std::cout << set.check(2,3) << "\n";
13+
14+
constexpr auto lhs = ctre::calculate_first(ctre::plus<ctre::char_range<'a','z'>>{});
15+
constexpr auto rhs = ctre::calculate_first(ctre::back_reference<1>{});
16+
//identify<decltype(lhs)> i_lhs;
17+
//identify<decltype(rhs)> i_rhs;
18+
19+
static_assert(ctre::collides(lhs, rhs));
20+
21+
22+
//auto out = ctre::first(ctll::list<>{}, ctll::list<ctre::select<ctre::string<'a','l','o','h','a'>, ctre::string<'h','a','n','a'>, ctre::character<'a'>> >{});
23+
//identify<decltype(out)> i;
24+
}
25+
26+
//bool match2(std::string_view subject) {
27+
// return ctre::match<LR"(^([-dlsDLS][-rwxstlRWXSTL]{9}[+]?)\s+(\d+)?\s+(\S+)?\s+(.*?)?\s+(\d+)\s+(\d{1,2}).\s([^\s,.]{3,4}).?,?\s((\d{4,4})|(\d{1,2}):(\d{2,2}))\s)">(subject);
28+
//}
29+
//
30+
//bool match(std::string_view subject){
31+
// return ctre::match<LR"(^(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\d+)\s+(\d+)\s*$)">(subject);
32+
//}
33+
34+
static constexpr auto pattern = ctll::fixed_string(LR"(^([-dlsDLS][-rwxstlRWXSTL]{9}[+]?)\s*(\d+)?\s+(\S+)?\s+(.*?)?\s+(\d+|\d+.\d+\S)\s+([A-Za-z][a-z][a-z])\s+(\d{1,2})\s+((\d{4,4})|(\d{1,2}):.)\s)");
35+
36+
bool match3(std::string_view subject) {
37+
return ctre::search<pattern>(subject);
38+
}

0 commit comments

Comments
 (0)