Skip to content

Commit c65a048

Browse files
committed
Merge subtree range-v3/master.
git-subtree-dir: range-v3 git-subtree-mainline: 4fe1f67 git-subtree-split: 7b55e91
2 parents 4fe1f67 + 7b55e91 commit c65a048

File tree

559 files changed

+55634
-43136
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

559 files changed

+55634
-43136
lines changed
Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
{
22
AccessModifierOffset: -4,
3+
AlignAfterOpenBracket: Align,
34
AlignEscapedNewlinesLeft: true,
4-
AlignTrailingComments: false,
5+
AlignTrailingComments: true,
56
AllowAllParametersOfDeclarationOnNextLine: false,
67
AllowShortBlocksOnASingleLine: true,
7-
AllowShortFunctionsOnASingleLine: Empty,
8+
AllowShortCaseLabelsOnASingleLine: false,
9+
AllowShortFunctionsOnASingleLine: None,
810
AllowShortIfStatementsOnASingleLine: false,
911
AllowShortLoopsOnASingleLine: false,
1012
AlwaysBreakBeforeMultilineStrings: true,
1113
AlwaysBreakAfterReturnType: None,
1214
AlwaysBreakTemplateDeclarations: true,
13-
BasedOnStyle: Mozilla,
15+
BinPackArguments: false,
1416
BinPackParameters: true,
1517
BraceWrapping: {
18+
AfterCaseLabel: true,
1619
AfterClass: true,
1720
AfterControlStatement: true,
1821
AfterEnum: true,
@@ -31,25 +34,45 @@
3134
BreakBeforeBinaryOperators: false,
3235
BreakBeforeBraces: Custom,
3336
BreakBeforeTernaryOperators: true,
34-
BreakConstructorInitializersBeforeComma: false,
35-
ColumnLimit: 80,
37+
BreakConstructorInitializers: BeforeComma,
38+
BreakInheritanceList: BeforeComma,
39+
ColumnLimit: 90,
3640
ConstructorInitializerAllOnOneLineOrOnePerLine: false,
3741
ConstructorInitializerIndentWidth: 2,
3842
ContinuationIndentWidth: 4,
3943
Cpp11BracedListStyle: true,
40-
DerivePointerBinding: true,
44+
DerivePointerAlignment: false,
4145
ExperimentalAutoDetectBinPacking: false,
42-
IndentCaseLabels: true,
46+
ForEachMacros: ['RANGES_FOR',],
47+
IncludeBlocks: Regroup,
48+
IncludeCategories: [
49+
{ Regex: '^<range/v3/range_fwd.hpp',
50+
Priority: 5},
51+
{ Regex: '^<range/v3',
52+
Priority: 6},
53+
{ Regex: '^<concepts/',
54+
Priority: 4},
55+
{ Regex: '^<meta/',
56+
Priority: 3},
57+
{ Regex: '^<std/.*>$',
58+
Priority: 2},
59+
{ Regex: '^<.*>$',
60+
Priority: 1},
61+
],
62+
IndentCaseLabels: false,
4363
IndentFunctionDeclarationAfterType: false,
4464
IndentWidth: 4,
4565
KeepEmptyLinesAtTheStartOfBlocks: true,
4666
Language: Cpp,
4767
MaxEmptyLinesToKeep: 1,
68+
MacroBlockBegin: "^(RANGES|META)_BEGIN_(NAMESPACE_(STD|VERSION|CONTAINER)|NIEBLOID)$",
69+
MacroBlockEnd: "^(RANGES|META)_END_(NAMESPACE_(STD|VERSION|CONTAINER)|NIEBLOID)$",
4870
NamespaceIndentation: All,
4971
PenaltyBreakBeforeFirstCallParameter: 10,
50-
PenaltyReturnTypeOnItsOwnLine: 1000000,
51-
PointerBindsToType: true,
72+
PenaltyReturnTypeOnItsOwnLine: 1000,
73+
PointerAlignment: Middle,
5274
SpaceAfterControlStatementKeyword: false,
75+
SpaceAfterTemplateKeyword: false,
5376
SpaceBeforeAssignmentOperators: true,
5477
SpaceBeforeParens: Never,
5578
SpaceInEmptyParentheses: false,
@@ -58,6 +81,12 @@
5881
SpacesInCStyleCastParentheses: false,
5982
SpacesInParentheses: false,
6083
Standard: Cpp11,
84+
StatementMacros: [
85+
'RANGES_INLINE_VARIABLE',
86+
'RANGES_DEFINE_CPO',
87+
'CPP_member',
88+
'CPP_broken_friend_member',
89+
],
6190
TabWidth: 4,
6291
UseTab: Never,
6392
}

range-v3/.travis.yml

Lines changed: 84 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# - Louis Dionne's Hana: https://github.com/ldionne/hana
1515
# - Paul Fultz II's FIT: https://github.com/pfultz2/Fit
1616
language: cpp
17-
sudo: true
17+
dist: xenial
1818
script: cmake
1919

2020
git:
@@ -23,22 +23,22 @@ git:
2323
env:
2424
global:
2525
- DEPS_DIR=${TRAVIS_BUILD_DIR}/deps
26-
- CMAKE_VERSION="3.6.3"
26+
- CMAKE_VERSION="3.12.0"
2727

2828
cache:
2929
directories:
3030
- ${DEPS_DIR}/cmake-${CMAKE_VERSION}
3131

3232
matrix:
3333
include:
34-
- env: BUILD_TYPE=Release CPP=11 SYSTEM_LIBCXX=On
34+
- env: BUILD_TYPE=Release CPP=1z SYSTEM_LIBCXX=On
3535
os: osx
3636
compiler: clang
3737

3838
# The ASAN build in install_libcxx.sh doesn't work for versions < 4
3939

40-
# clang 3.6 C++11/14 Release libc++
41-
- env: CLANG_VERSION=3.6 BUILD_TYPE=Release CPP=11 LIBCXX=On
40+
# clang 3.6 C++17/14 Release libc++
41+
- env: CLANG_VERSION=3.6 BUILD_TYPE=Release CPP=14 LIBCXX=On HEADERS=On
4242
os: linux
4343
addons: &clang36
4444
apt:
@@ -49,32 +49,23 @@ matrix:
4949
sources:
5050
- ubuntu-toolchain-r-test
5151

52-
- env: CLANG_VERSION=3.6 BUILD_TYPE=Release CPP=14 LIBCXX=On HEADERS=On
53-
os: linux
54-
addons: *clang36
55-
56-
# clang 3.7 C++11/14 Release libc++
57-
- env: CLANG_VERSION=3.7 BUILD_TYPE=Release CPP=11 LIBCXX=On
52+
# clang 3.7 C++17/14 Release libc++
53+
- env: CLANG_VERSION=3.7 BUILD_TYPE=Release CPP=14 LIBCXX=On HEADERS=On
5854
os: linux
5955
addons: &clang37
6056
apt:
6157
packages:
62-
- util-linux
6358
- clang-3.7
6459
- libstdc++-5-dev
6560
- valgrind
6661
sources:
6762
- ubuntu-toolchain-r-test
68-
- llvm-toolchain-trusty-3.7
69-
- sourceline: 'deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.7 main'
63+
- llvm-toolchain-xenial-3.7
64+
- sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-3.7 main'
7065
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
7166

72-
- env: CLANG_VERSION=3.7 BUILD_TYPE=Release CPP=14 LIBCXX=On HEADERS=On
73-
os: linux
74-
addons: *clang37
75-
76-
# clang 3.8 C++11/14 Release libc++
77-
- env: CLANG_VERSION=3.8 BUILD_TYPE=Release CPP=11 LIBCXX=On
67+
# clang 3.8 C++17/14 Release libc++
68+
- env: CLANG_VERSION=3.8 BUILD_TYPE=Release CPP=1z LIBCXX=On
7869
os: linux
7970
addons: &clang38
8071
apt:
@@ -90,8 +81,8 @@ matrix:
9081
os: linux
9182
addons: *clang38
9283

93-
# clang 3.9 C++11/14 Release libc++
94-
- env: CLANG_VERSION=3.9 BUILD_TYPE=Release CPP=11 LIBCXX=On
84+
# clang 3.9 C++17/14 Release libc++
85+
- env: CLANG_VERSION=3.9 BUILD_TYPE=Release CPP=1z LIBCXX=On
9586
os: linux
9687
addons: &clang39
9788
apt:
@@ -107,23 +98,22 @@ matrix:
10798
os: linux
10899
addons: *clang39
109100

110-
# clang 5 C++11/14/1z Debug/Release-ASAN libc++, 11 Debug libstdc++
111-
- env: CLANG_VERSION=5.0 BUILD_TYPE=Debug CPP=11 LIBCXX=On
101+
# clang 5 C++17/14/1z Debug/Release-ASAN libc++, 17 Debug libstdc++
102+
- env: CLANG_VERSION=5.0 BUILD_TYPE=Debug CPP=1z LIBCXX=On
112103
os: linux
113104
addons: &clang5
114105
apt:
115106
packages:
116-
- util-linux
117107
- clang-5.0
118108
- libstdc++-6-dev
119109
- valgrind
120110
sources:
121111
- ubuntu-toolchain-r-test
122-
- llvm-toolchain-trusty-5.0
123-
- sourceline: 'deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-5.0 main'
112+
- llvm-toolchain-xenial-5.0
113+
- sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-5.0 main'
124114
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
125115

126-
- env: CLANG_VERSION=5.0 BUILD_TYPE=Release CPP=11 ASAN=On LIBCXX=On
116+
- env: CLANG_VERSION=5.0 BUILD_TYPE=Release CPP=1z ASAN=On LIBCXX=On HEADERS=On
127117
os: linux
128118
addons: *clang5
129119

@@ -135,15 +125,7 @@ matrix:
135125
os: linux
136126
addons: *clang5
137127

138-
- env: CLANG_VERSION=5.0 BUILD_TYPE=Debug CPP=1z LIBCXX=On HEADERS=On
139-
os: linux
140-
addons: *clang5
141-
142-
- env: CLANG_VERSION=5.0 BUILD_TYPE=Release CPP=1z ASAN=On LIBCXX=On
143-
os: linux
144-
addons: *clang5
145-
146-
- env: CLANG_VERSION=5.0 BUILD_TYPE=Release CPP=11
128+
- env: CLANG_VERSION=5.0 BUILD_TYPE=Release CPP=1z
147129
os: linux
148130
addons: *clang5
149131

@@ -152,23 +134,8 @@ matrix:
152134
# os: linux
153135
# addons: *clang5
154136

155-
# gcc-4.9 C++11/C++14 Release
156-
- env: GCC_VERSION=4.9 BUILD_TYPE=Release CPP=11
157-
os: linux
158-
addons: &gcc49
159-
apt:
160-
packages:
161-
- g++-4.9
162-
- valgrind
163-
sources:
164-
- ubuntu-toolchain-r-test
165-
166-
- env: GCC_VERSION=4.9 BUILD_TYPE=Release CPP=14 HEADERS=On
167-
os: linux
168-
addons: *gcc49
169-
170-
# gcc-5 C++11/C++14 Release
171-
- env: GCC_VERSION=5 BUILD_TYPE=Release CPP=11
137+
# gcc-5 C++17/C++14 Release
138+
- env: GCC_VERSION=5 BUILD_TYPE=Release CPP=1z
172139
os: linux
173140
addons: &gcc5
174141
apt:
@@ -182,8 +149,8 @@ matrix:
182149
os: linux
183150
addons: *gcc5
184151

185-
# gcc-6 C++11/14/1z Debug/Release
186-
- env: GCC_VERSION=6 BUILD_TYPE=Debug CPP=11
152+
# gcc-6 C++17/14/1z Debug/Release
153+
- env: GCC_VERSION=6 BUILD_TYPE=Debug CPP=1z
187154
os: linux
188155
addons: &gcc6
189156
apt:
@@ -193,25 +160,71 @@ matrix:
193160
sources:
194161
- ubuntu-toolchain-r-test
195162

196-
- env: GCC_VERSION=6 BUILD_TYPE=Release CPP=11
163+
- env: GCC_VERSION=6 BUILD_TYPE=Release CPP=1z
197164
os: linux
198165
addons: *gcc6
199166

200-
- env: GCC_VERSION=6 BUILD_TYPE=Debug CPP=14
167+
- env: GCC_VERSION=6 BUILD_TYPE=Debug CPP=14 HEADERS=On
201168
os: linux
202169
addons: *gcc6
203170

204171
- env: GCC_VERSION=6 BUILD_TYPE=Release CPP=14
205172
os: linux
206173
addons: *gcc6
207174

208-
- env: GCC_VERSION=6 BUILD_TYPE=Debug CPP=1z HEADERS=On
175+
# gcc-7 C++17/14/1z Debug/Release
176+
- env: GCC_VERSION=7 BUILD_TYPE=Debug CPP=1z
209177
os: linux
210-
addons: *gcc6
178+
addons: &gcc7
179+
apt:
180+
packages:
181+
- g++-7
182+
- valgrind
183+
sources:
184+
- ubuntu-toolchain-r-test
211185

212-
- env: GCC_VERSION=6 BUILD_TYPE=Release CPP=1z
186+
- env: GCC_VERSION=7 BUILD_TYPE=Release CPP=1z
213187
os: linux
214-
addons: *gcc6
188+
addons: *gcc7
189+
190+
- env: GCC_VERSION=7 BUILD_TYPE=Debug CPP=14 HEADERS=On
191+
os: linux
192+
addons: *gcc7
193+
194+
- env: GCC_VERSION=7 BUILD_TYPE=Release CPP=14
195+
os: linux
196+
addons: *gcc7
197+
198+
- env: GCC_VERSION=7 BUILD_TYPE=Release CPP=1z CONCEPTS=On
199+
os: linux
200+
addons: *gcc7
201+
202+
# gcc-8 C++17/14/1z Debug/Release
203+
- env: GCC_VERSION=8 BUILD_TYPE=Debug CPP=1z
204+
os: linux
205+
addons: &gcc8
206+
apt:
207+
packages:
208+
- g++-8
209+
- valgrind
210+
sources:
211+
- ubuntu-toolchain-r-test
212+
213+
- env: GCC_VERSION=8 BUILD_TYPE=Release CPP=1z
214+
os: linux
215+
addons: *gcc8
216+
217+
- env: GCC_VERSION=8 BUILD_TYPE=Debug CPP=14 HEADERS=On
218+
os: linux
219+
addons: *gcc8
220+
221+
- env: GCC_VERSION=8 BUILD_TYPE=Release CPP=14
222+
os: linux
223+
addons: *gcc8
224+
225+
- env: GCC_VERSION=8 BUILD_TYPE=Release CPP=1z CONCEPTS=On
226+
os: linux
227+
addons: *gcc8
215228

216229
# Install dependencies
217230
before_install:
@@ -231,7 +244,7 @@ before_install:
231244
if [ -f ${DEPS_DIR}/cmake-${CMAKE_VERSION}/cached ]; then
232245
echo "Using cached cmake version ${CMAKE_VERSION}."
233246
else
234-
CMAKE_URL="https://cmake.org/files/v3.6/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz"
247+
CMAKE_URL="https://cmake.org/files/v3.12/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz"
235248
mkdir -p ${DEPS_DIR}/cmake-${CMAKE_VERSION}
236249
travis_retry wget --no-check-certificate --quiet -O - "${CMAKE_URL}" | tar --strip-components=1 -xz -C ${DEPS_DIR}/cmake-${CMAKE_VERSION}
237250
touch ${DEPS_DIR}/cmake-${CMAKE_VERSION}/cached
@@ -251,8 +264,13 @@ install:
251264
# Workaround for valgrind bug: https://bugs.kde.org/show_bug.cgi?id=326469.
252265
# It is fixed in valgrind 3.10 so this won't be necessary if someone
253266
# replaces the current valgrind (3.7) with valgrind-3.10
254-
- if [ "$USE_VALGRIND" == "On" ]; then sed -i 's/march=native/msse4.2/' cmake/ranges_flags.cmake; fi
255-
267+
- |
268+
if [ "$USE_VALGRIND" == "On" ]; then
269+
sed -i 's/march=native/msse4.2/' cmake/ranges_flags.cmake
270+
# We need to explicitly initialize std::random_device on libstdc++ to avoid using RDRAND
271+
# since valgrind doesn't understand the instruction.
272+
CXX_FLAGS="${CXX_FLAGS} -DRANGES_WORKAROUND_VALGRIND_RDRAND"
273+
fi
256274
- if [ "$GCC_VERSION" == "5" ]; then CXX_FLAGS="${CXX_FLAGS} -DRANGES_CXX_CONSTEXPR=RANGES_CXX_CONSTEXPR11"; fi
257275
- |
258276
if [ "$LIBCXX" == "On" ]; then
@@ -270,7 +288,7 @@ install:
270288
- mkdir -p build
271289
# This cd works, but causes the shell to exit on OSX with set -e. I don't even.
272290
- set +e; cd build; set -e; pwd
273-
- cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" -DCMAKE_EXE_LINKER_FLAGS="${CXX_LINKER_FLAGS}" -DRANGES_CXX_STD=$CPP -DRANGE_V3_HEADER_CHECKS=$HEADERS -DRANGES_VERBOSE_BUILD=On -DRANGES_ASAN=$ASAN -DRANGES_MSAN=$MSAN -Wdev
291+
- cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" -DCMAKE_EXE_LINKER_FLAGS="${CXX_LINKER_FLAGS}" -DRANGES_CXX_STD=$CPP -DRANGE_V3_HEADER_CHECKS=$HEADERS -DRANGES_PREFER_REAL_CONCEPTS=$CONCEPTS -DRANGES_VERBOSE_BUILD=On -DRANGES_ASAN=$ASAN -DRANGES_MSAN=$MSAN -DRANGES_DEEP_STL_INTEGRATION=On -Wdev
274292
- cat CMakeFiles/CMakeError.log || true
275293
- cat CMakeFiles/CMakeOutput.log || true
276294
- if [ "$CLANG_MODULES" == "On" -a "$LIBCXX" == "On" ]; then cmake .. -DRANGES_MODULES=On -DRANGES_LIBCXX_MODULE="${TRAVIS_BUILD_DIR}/llvm/include/c++/v1/module.modulemap"; fi

0 commit comments

Comments
 (0)