Add range-v3 library

This commit is contained in:
Sebastian Messmer 2019-10-15 05:20:43 -07:00
parent ef4bc7aba2
commit 67cfa06ca9
624 changed files with 100952 additions and 0 deletions

View File

@ -1,3 +1,4 @@
add_subdirectory(googletest)
add_subdirectory(spdlog)
add_subdirectory(cryptopp)
add_subdirectory(range-v3)

1
vendor/README vendored
View File

@ -4,3 +4,4 @@ spdlog: https://github.com/gabime/spdlog/tree/v1.4.2/include/spdlog
cryptopp: https://github.com/weidai11/cryptopp/tree/CRYPTOPP_8_2_0
- changed: added CMakeLists.txt and cryptopp-config.cmake from https://github.com/noloader/cryptopp-cmake/tree/CRYPTOPP_8_2_0
- changed: commented out line including winapifamily.h in CMakeLists.txt
range-v3: https://github.com/ericniebler/range-v3/tree/0.9.1

8
vendor/range-v3/CMakeLists.txt vendored Normal file
View File

@ -0,0 +1,8 @@
project (range-v3)
set(SOURCES
dummy.cpp
)
add_library(${PROJECT_NAME} STATIC EXCLUDE_FROM_ALL ${SOURCES})
target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/range-v3/include)

0
vendor/range-v3/dummy.cpp vendored Normal file
View File

0
vendor/range-v3/range-v3/.buckconfig vendored Normal file
View File

92
vendor/range-v3/range-v3/.clang-format vendored Normal file
View File

@ -0,0 +1,92 @@
{
AccessModifierOffset: -4,
AlignAfterOpenBracket: Align,
AlignEscapedNewlinesLeft: true,
AlignTrailingComments: true,
AllowAllParametersOfDeclarationOnNextLine: false,
AllowShortBlocksOnASingleLine: true,
AllowShortCaseLabelsOnASingleLine: false,
AllowShortFunctionsOnASingleLine: None,
AllowShortIfStatementsOnASingleLine: false,
AllowShortLoopsOnASingleLine: false,
AlwaysBreakBeforeMultilineStrings: true,
AlwaysBreakAfterReturnType: None,
AlwaysBreakTemplateDeclarations: true,
BinPackArguments: false,
BinPackParameters: true,
BraceWrapping: {
AfterCaseLabel: true,
AfterClass: true,
AfterControlStatement: true,
AfterEnum: true,
AfterFunction: true,
AfterNamespace: true,
AfterStruct: true,
AfterUnion: true,
AfterExternBlock: true,
BeforeCatch: true,
BeforeElse: true,
IndentBraces: false,
SplitEmptyFunction: false,
SplitEmptyRecord: false,
SplitEmptyNamespace: true,
},
BreakBeforeBinaryOperators: false,
BreakBeforeBraces: Custom,
BreakBeforeTernaryOperators: true,
BreakConstructorInitializers: BeforeComma,
BreakInheritanceList: BeforeComma,
ColumnLimit: 90,
ConstructorInitializerAllOnOneLineOrOnePerLine: false,
ConstructorInitializerIndentWidth: 2,
ContinuationIndentWidth: 4,
Cpp11BracedListStyle: true,
DerivePointerAlignment: false,
ExperimentalAutoDetectBinPacking: false,
ForEachMacros: ['RANGES_FOR',],
IncludeBlocks: Regroup,
IncludeCategories: [
{ Regex: '^<range/v3/range_fwd.hpp',
Priority: 5},
{ Regex: '^<range/v3',
Priority: 6},
{ Regex: '^<concepts/',
Priority: 4},
{ Regex: '^<meta/',
Priority: 3},
{ Regex: '^<std/.*>$',
Priority: 2},
{ Regex: '^<.*>$',
Priority: 1},
],
IndentCaseLabels: false,
IndentFunctionDeclarationAfterType: false,
IndentWidth: 4,
KeepEmptyLinesAtTheStartOfBlocks: true,
Language: Cpp,
MaxEmptyLinesToKeep: 1,
MacroBlockBegin: "^(RANGES|META)_BEGIN_(NAMESPACE_(STD|VERSION|CONTAINER)|NIEBLOID)$",
MacroBlockEnd: "^(RANGES|META)_END_(NAMESPACE_(STD|VERSION|CONTAINER)|NIEBLOID)$",
NamespaceIndentation: All,
PenaltyBreakBeforeFirstCallParameter: 10,
PenaltyReturnTypeOnItsOwnLine: 1000,
PointerAlignment: Middle,
SpaceAfterControlStatementKeyword: false,
SpaceAfterTemplateKeyword: false,
SpaceBeforeAssignmentOperators: true,
SpaceBeforeParens: Never,
SpaceInEmptyParentheses: false,
SpacesBeforeTrailingComments: 1,
SpacesInAngles: false,
SpacesInCStyleCastParentheses: false,
SpacesInParentheses: false,
Standard: Cpp11,
StatementMacros: [
'RANGES_INLINE_VARIABLE',
'RANGES_DEFINE_CPO',
'CPP_member',
'CPP_broken_friend_member',
],
TabWidth: 4,
UseTab: Never,
}

237
vendor/range-v3/range-v3/.gitignore vendored Normal file
View File

@ -0,0 +1,237 @@
## Copyright (c) 2013 GitHub, Inc.
##
## Permission is hereby granted, free of charge, to any person obtaining a
## copy of this software and associated documentation files (the "Software"),
## to deal in the Software without restriction, including without limitation
## the rights to use, copy, modify, merge, publish, distribute, sublicense,
## and/or sell copies of the Software, and to permit persons to whom the
## Software is furnished to do so, subject to the following conditions:
##
## The above copyright notice and this permission notice shall be included in
## all copies or substantial portions of the Software.
##
## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
## AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
## FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
## DEALINGS IN THE SOFTWARE.
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Executables
*.exe
*.out
*.app
# Clion files
.idea
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.sln.docstates
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
x64/
build*/
bld/
[Bb]in/
[Oo]bj/
bazel-*
cmake-build-*/
# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
!packages/*/build/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
#NUNIT
*.VisualState.xml
TestResult.xml
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile
# Visual Studio profiler
*.psess
*.vsp
*.vspx
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding addin-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
*.ncrunch*
_NCrunch_*
.*crunch*.local.xml
# MightyMoose
*.mm.*
AutoTest.Net/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.Publish.xml
*.azurePubxml
# NuGet Packages Directory
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
#packages/
## TODO: If the tool you use requires repositories.config, also uncomment the next line
#!packages/repositories.config
# Windows Azure Build Output
csx/
*.build.csdef
# Windows Store app package directory
AppPackages/
# Buck build artefacts
.buckd/
buck-out/
# Others
sql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.[Pp]ublish.xml
*.pfx
*.publishsettings
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
App_Data/*.mdf
App_Data/*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# =========================
# Windows detritus
# =========================
# Windows image file caches
Thumbs.db
ehthumbs.db
# Folder config file
Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Visual Studio stuff
*.VC.db
*.VC.opendb
.vscode/
.vs/
\#*#
.#*

303
vendor/range-v3/range-v3/.travis.yml vendored Normal file
View File

@ -0,0 +1,303 @@
# Copyright Louis Dionne 2013-2016
# Copyright Gonzalo BG 2014-2017
# Copyright Julian Becker 2015
# Copyright Manu Sánchez 2015
# Copyright Casey Carter 2015-2017
# Copyright Eric Niebler 2015-2016
# Copyright Paul Fultz II 2015-2016
# Copyright Jakub Szuppe 2016.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt)
# Adapted from various sources, including:
# - Louis Dionne's Hana: https://github.com/ldionne/hana
# - Paul Fultz II's FIT: https://github.com/pfultz2/Fit
language: cpp
dist: xenial
script: cmake
git:
depth: 1
env:
global:
- DEPS_DIR=${TRAVIS_BUILD_DIR}/deps
- CMAKE_VERSION="3.12.0"
cache:
directories:
- ${DEPS_DIR}/cmake-${CMAKE_VERSION}
matrix:
include:
- env: BUILD_TYPE=Release CPP=1z SYSTEM_LIBCXX=On
os: osx
compiler: clang
# The ASAN build in install_libcxx.sh doesn't work for versions < 4
# clang 3.6 C++17/14 Release libc++
- env: CLANG_VERSION=3.6 BUILD_TYPE=Release CPP=14 LIBCXX=On HEADERS=On
os: linux
addons: &clang36
apt:
packages:
- clang-3.6
- libstdc++-5-dev
- valgrind
sources:
- ubuntu-toolchain-r-test
# clang 3.7 C++17/14 Release libc++
- env: CLANG_VERSION=3.7 BUILD_TYPE=Release CPP=14 LIBCXX=On HEADERS=On
os: linux
addons: &clang37
apt:
packages:
- clang-3.7
- libstdc++-5-dev
- valgrind
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-xenial-3.7
- sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-3.7 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
# clang 3.8 C++17/14 Release libc++
- env: CLANG_VERSION=3.8 BUILD_TYPE=Release CPP=1z LIBCXX=On
os: linux
addons: &clang38
apt:
packages:
- util-linux
- clang-3.8
- libstdc++-5-dev
- valgrind
sources:
- ubuntu-toolchain-r-test
- env: CLANG_VERSION=3.8 BUILD_TYPE=Release CPP=14 LIBCXX=On HEADERS=On
os: linux
addons: *clang38
# clang 3.9 C++17/14 Release libc++
- env: CLANG_VERSION=3.9 BUILD_TYPE=Release CPP=1z LIBCXX=On
os: linux
addons: &clang39
apt:
packages:
- util-linux
- clang-3.9
- libstdc++-6-dev
- valgrind
sources:
- ubuntu-toolchain-r-test
- env: CLANG_VERSION=3.9 BUILD_TYPE=Release CPP=14 LIBCXX=On HEADERS=On
os: linux
addons: *clang39
# clang 5 C++17/14/1z Debug/Release-ASAN libc++, 17 Debug libstdc++
- env: CLANG_VERSION=5.0 BUILD_TYPE=Debug CPP=1z LIBCXX=On
os: linux
addons: &clang5
apt:
packages:
- clang-5.0
- libstdc++-6-dev
- valgrind
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-xenial-5.0
- sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-5.0 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
- env: CLANG_VERSION=5.0 BUILD_TYPE=Release CPP=1z ASAN=On LIBCXX=On HEADERS=On
os: linux
addons: *clang5
- env: CLANG_VERSION=5.0 BUILD_TYPE=Debug CPP=14 LIBCXX=On
os: linux
addons: *clang5
- env: CLANG_VERSION=5.0 BUILD_TYPE=Release CPP=14 ASAN=On LIBCXX=On
os: linux
addons: *clang5
- env: CLANG_VERSION=5.0 BUILD_TYPE=Release CPP=1z
os: linux
addons: *clang5
# Module build is on the floor
# - env: CLANG_VERSION=5.0 BUILD_TYPE=Release CPP=1z MSAN=On LIBCXX=On CLANG_MODULES=On
# os: linux
# addons: *clang5
# gcc-5 C++17/C++14 Release
- env: GCC_VERSION=5 BUILD_TYPE=Release CPP=1z
os: linux
addons: &gcc5
apt:
packages:
- g++-5
- valgrind
sources:
- ubuntu-toolchain-r-test
- env: GCC_VERSION=5 BUILD_TYPE=Release CPP=14 HEADERS=On
os: linux
addons: *gcc5
# gcc-6 C++17/14/1z Debug/Release
- env: GCC_VERSION=6 BUILD_TYPE=Debug CPP=1z
os: linux
addons: &gcc6
apt:
packages:
- g++-6
- valgrind
sources:
- ubuntu-toolchain-r-test
- env: GCC_VERSION=6 BUILD_TYPE=Release CPP=1z
os: linux
addons: *gcc6
- env: GCC_VERSION=6 BUILD_TYPE=Debug CPP=14 HEADERS=On
os: linux
addons: *gcc6
- env: GCC_VERSION=6 BUILD_TYPE=Release CPP=14
os: linux
addons: *gcc6
# gcc-7 C++17/14/1z Debug/Release
- env: GCC_VERSION=7 BUILD_TYPE=Debug CPP=1z
os: linux
addons: &gcc7
apt:
packages:
- g++-7
- valgrind
sources:
- ubuntu-toolchain-r-test
- env: GCC_VERSION=7 BUILD_TYPE=Release CPP=1z
os: linux
addons: *gcc7
- env: GCC_VERSION=7 BUILD_TYPE=Debug CPP=14 HEADERS=On
os: linux
addons: *gcc7
- env: GCC_VERSION=7 BUILD_TYPE=Release CPP=14
os: linux
addons: *gcc7
- env: GCC_VERSION=7 BUILD_TYPE=Release CPP=1z CONCEPTS=On
os: linux
addons: *gcc7
# gcc-8 C++17/14/1z Debug/Release
- env: GCC_VERSION=8 BUILD_TYPE=Debug CPP=1z
os: linux
addons: &gcc8
apt:
packages:
- g++-8
- valgrind
sources:
- ubuntu-toolchain-r-test
- env: GCC_VERSION=8 BUILD_TYPE=Release CPP=1z
os: linux
addons: *gcc8
- env: GCC_VERSION=8 BUILD_TYPE=Debug CPP=14 HEADERS=On
os: linux
addons: *gcc8
- env: GCC_VERSION=8 BUILD_TYPE=Release CPP=14
os: linux
addons: *gcc8
- env: GCC_VERSION=8 BUILD_TYPE=Release CPP=1z CONCEPTS=On
os: linux
addons: *gcc8
# Install dependencies
before_install:
- set -e
- |
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
brew update
brew install gnu-sed
brew install gnu-which
brew upgrade cmake
export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
elif [ "$BUILD_TYPE" == "Release" -a "$ASAN" != "On" -a "$MSAN" != "On" ]; then
USE_VALGRIND=On
fi
- |
if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
if [ -f ${DEPS_DIR}/cmake-${CMAKE_VERSION}/cached ]; then
echo "Using cached cmake version ${CMAKE_VERSION}."
else
CMAKE_URL="https://cmake.org/files/v3.12/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz"
mkdir -p ${DEPS_DIR}/cmake-${CMAKE_VERSION}
travis_retry wget --no-check-certificate --quiet -O - "${CMAKE_URL}" | tar --strip-components=1 -xz -C ${DEPS_DIR}/cmake-${CMAKE_VERSION}
touch ${DEPS_DIR}/cmake-${CMAKE_VERSION}/cached
fi
export PATH="${DEPS_DIR}/cmake-${CMAKE_VERSION}/bin:${PATH}"
fi
- if [ -n "$GCC_VERSION" ]; then export CXX="g++-${GCC_VERSION}" CC="gcc-${GCC_VERSION}"; fi
- if [ -n "$CLANG_VERSION" ]; then export CXX="clang++-${CLANG_VERSION}" CC="clang-${CLANG_VERSION}"; fi
- which $CXX && $CXX --version
- which $CC
- if [ "$USE_VALGRIND" == "On" ]; then which valgrind; fi
- if [ "$ASAN" == "On" ]; then export SANITIZER="Address;Undefined"; fi
- if [ "$MSAN" == "On" ]; then export SANITIZER="MemoryWithOrigins"; fi
- if [ -n "$CLANG_VERSION" ]; then PATH="${PATH}" CXX="$CXX" CC="$CC" ./install_libcxx.sh; fi
install:
# Workaround for valgrind bug: https://bugs.kde.org/show_bug.cgi?id=326469.
# It is fixed in valgrind 3.10 so this won't be necessary if someone
# replaces the current valgrind (3.7) with valgrind-3.10
- |
if [ "$USE_VALGRIND" == "On" ]; then
sed -i 's/march=native/msse4.2/' cmake/ranges_flags.cmake
# We need to explicitly initialize std::random_device on libstdc++ to avoid using RDRAND
# since valgrind doesn't understand the instruction.
CXX_FLAGS="${CXX_FLAGS} -DRANGES_WORKAROUND_VALGRIND_RDRAND"
fi
- if [ "$GCC_VERSION" == "5" ]; then CXX_FLAGS="${CXX_FLAGS} -DRANGES_CXX_CONSTEXPR=RANGES_CXX_CONSTEXPR11"; fi
- |
if [ "$LIBCXX" == "On" ]; then
CXX_FLAGS="${CXX_FLAGS} -stdlib=libc++ -nostdinc++ -cxx-isystem ${TRAVIS_BUILD_DIR}/llvm/include/c++/v1/ -Wno-unused-command-line-argument"
CXX_LINKER_FLAGS="${CXX_LINKER_FLAGS} -L ${TRAVIS_BUILD_DIR}/llvm/lib -Wl,-rpath,${TRAVIS_BUILD_DIR}/llvm/lib -lc++abi"
if [ -n "$CLANG_VERSION" ]; then
if [ "$ASAN" == "On" ]; then
CXX_FLAGS="${CXX_FLAGS} -fsanitize=address"
elif [ "$MSAN" == "On" ]; then
CXX_FLAGS="${CXX_FLAGS} -fsanitize=memory"
fi
fi
fi
- mkdir -p build
# This cd works, but causes the shell to exit on OSX with set -e. I don't even.
- set +e; cd build; set -e; pwd
- 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
- cat CMakeFiles/CMakeError.log || true
- cat CMakeFiles/CMakeOutput.log || true
- 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
- make -j2 VERBOSE=1
script:
- if [ "$USE_VALGRIND" == "On" ]; then CTEST_FLAGS="-D ExperimentalMemCheck"; fi
- ctest -j2 -VV ${CTEST_FLAGS}
notifications:
email: false

42
vendor/range-v3/range-v3/BUCK vendored Normal file
View File

@ -0,0 +1,42 @@
prebuilt_cxx_library(
name = 'concepts',
header_namespace = 'concepts',
header_only = True,
exported_headers = subdir_glob([
('include/concepts', '**/*.hpp'),
]),
licenses = [
'LICENSE.txt',
],
)
prebuilt_cxx_library(
name = 'meta',
header_namespace = 'meta',
header_only = True,
exported_headers = subdir_glob([
('include/meta', '**/*.hpp'),
]),
licenses = [
'LICENSE.txt',
],
)
prebuilt_cxx_library(
name = 'range-v3',
header_namespace = 'range/v3',
header_only = True,
exported_headers = subdir_glob([
('include/range/v3', '**/*.hpp'),
]),
licenses = [
'LICENSE.txt',
],
visibility = [
'PUBLIC'
],
deps = [
':concepts',
':meta',
],
)

42
vendor/range-v3/range-v3/BUILD.bazel vendored Normal file
View File

@ -0,0 +1,42 @@
cc_library(
name = 'concepts',
hdrs = glob([
'include/concepts/**/*.hpp',
]),
includes = [
"include",
],
)
cc_library(
name = 'meta',
hdrs = glob([
'include/meta/**/*.hpp',
]),
includes = [
"include",
],
)
cc_library(
name = 'std',
hdrs = glob([
'include/std/**/*.hpp',
]),
includes = [
"include",
],
)
cc_library(
name = 'range-v3',
hdrs = glob([
'include/range/v3/**/*.hpp',
]),
visibility = ["//visibility:public"],
deps = [
':concepts',
':meta',
':std',
],
)

171
vendor/range-v3/range-v3/CMakeLists.txt vendored Normal file
View File

@ -0,0 +1,171 @@
# Copyright Eric Niebler 2014
# Copyright Gonzalo Brito Gadeschi 2014, 2017
# Copyright Louis Dionne 2015
# Copyright Casey Carter 2016
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
cmake_minimum_required(VERSION 3.6)
get_directory_property(is_subproject PARENT_DIRECTORY)
if(NOT is_subproject)
set(is_standalone YES)
else()
set(is_standalone NO)
endif()
project(Range-v3 CXX)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # Export compilation data-base
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
add_library(meta INTERFACE)
target_include_directories(meta INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/>)
target_include_directories(meta SYSTEM INTERFACE $<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>)
target_compile_options(meta INTERFACE $<$<CXX_COMPILER_ID:MSVC>:/permissive->)
add_library(concepts INTERFACE)
target_include_directories(concepts INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/>)
target_include_directories(concepts SYSTEM INTERFACE $<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>)
target_compile_options(concepts INTERFACE $<$<CXX_COMPILER_ID:MSVC>:/permissive- /experimental:preprocessor /wd5105>)
target_link_libraries(concepts INTERFACE meta)
add_library(range-v3 INTERFACE)
target_include_directories(range-v3 INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/>)
target_include_directories(range-v3 SYSTEM INTERFACE $<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>)
target_compile_options(range-v3 INTERFACE $<$<CXX_COMPILER_ID:MSVC>:/permissive->)
target_link_libraries(range-v3 INTERFACE concepts meta)
function(rv3_add_test TESTNAME EXENAME FIRSTSOURCE)
add_executable(${EXENAME} ${FIRSTSOURCE} ${ARGN})
target_link_libraries(${EXENAME} range-v3)
add_test(${TESTNAME} ${EXENAME})
endfunction(rv3_add_test)
include(ranges_options)
include(ranges_env)
include(ranges_flags)
if(RANGE_V3_DOCS)
add_subdirectory(doc)
endif()
if(RANGE_V3_TESTS)
include(CTest)
add_subdirectory(test)
endif()
if(RANGE_V3_EXAMPLES)
add_subdirectory(example)
endif()
if(RANGE_V3_PERF)
add_subdirectory(perf)
endif()
# Add header files as sources to fix MSVS 2017 not finding source during debugging
file(GLOB_RECURSE RANGE_V3_PUBLIC_HEADERS_ABSOLUTE
"${CMAKE_CURRENT_SOURCE_DIR}/include/*.hpp")
add_custom_target(headers SOURCES ${RANGE_V3_PUBLIC_HEADERS_ABSOLUTE})
set_target_properties(headers PROPERTIES FOLDER "header")
# Test all headers
if(RANGE_V3_HEADER_CHECKS)
include(TestHeaders)
file(GLOB_RECURSE RANGE_V3_PUBLIC_HEADERS
RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/include"
"${CMAKE_CURRENT_SOURCE_DIR}/include/*.hpp")
# This header is not meant to be included directly:
list(REMOVE_ITEM RANGE_V3_PUBLIC_HEADERS std/detail/associated_types.hpp)
# Deprecated headers
if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
foreach(header ${RANGE_V3_PUBLIC_HEADERS})
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/include/${header}" is_deprecated
LIMIT_COUNT 1
REGEX ".*RANGES_DEPRECATED_HEADER.*")
if(is_deprecated)
list(APPEND RANGE_V3_DEPRECATED_PUBLIC_HEADERS "${header}")
endif()
endforeach()
endif()
add_header_test(test.range.v3.headers
EXCLUDE ${RANGE_V3_DEPRECATED_PUBLIC_HEADERS}
HEADERS ${RANGE_V3_PUBLIC_HEADERS})
target_link_libraries(test.range.v3.headers PRIVATE range-v3)
endif()
# Grab the range-v3 version numbers:
include(${CMAKE_CURRENT_SOURCE_DIR}/Version.cmake)
set(RANGE_V3_VERSION ${RANGE_V3_MAJOR}.${RANGE_V3_MINOR}.${RANGE_V3_PATCHLEVEL})
# Try to build a new version.hpp
configure_file(version.hpp.in include/range/v3/version.hpp @ONLY)
file(STRINGS ${CMAKE_CURRENT_BINARY_DIR}/include/range/v3/version.hpp RANGE_V3_OLD_VERSION_HPP)
file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/include/range/v3/version.hpp RANGE_V3_NEW_VERSION_HPP)
# If the new version.hpp is materially different from the one in the source
# directory, update it, commit, and tag.
if(NOT RANGE_V3_NEW_VERSION_HPP STREQUAL RANGE_V3_OLD_VERSION_HPP)
# Check that README.md and Version.cmake are the only changed file:
execute_process(
COMMAND ${GIT_EXECUTABLE} -C "${CMAKE_CURRENT_SOURCE_DIR}" status --porcelain -uno
OUTPUT_VARIABLE RANGE_V3_GIT_STATUS
OUTPUT_STRIP_TRAILING_WHITESPACE
)
string(REPLACE "\n" ";" RANGE_V3_GIT_STATUS ${RANGE_V3_GIT_STATUS})
if (NOT "x${RANGE_V3_GIT_STATUS}" STREQUAL "x M Version.cmake; M doc/release_notes.md")
message(FATAL_ERROR "Cannot update version.hpp: range-v3 source directory has a dirty status")
endif()
file(
COPY ${CMAKE_CURRENT_BINARY_DIR}/include/range/v3/version.hpp
DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/include/range/v3
)
execute_process(
COMMAND ${GIT_EXECUTABLE} -C "${CMAKE_CURRENT_SOURCE_DIR}" add -u
)
execute_process(
COMMAND ${GIT_EXECUTABLE} -C "${CMAKE_CURRENT_SOURCE_DIR}" commit -m "${RANGE_V3_VERSION}"
)
execute_process(
COMMAND ${GIT_EXECUTABLE} -C "${CMAKE_CURRENT_SOURCE_DIR}" tag -f -a "${RANGE_V3_VERSION}" -m "${RANGE_V3_VERSION}"
)
find_program(CONAN_EXECUTABLE NAMES conan conan.exe)
if (NOT "x${CONAN_EXECUTABLE}" STREQUAL "xCONAN_EXECUTABLE-NOTFOUND")
message(STATUS "Exporting conanfile for new version")
execute_process(
COMMAND ${CONAN_EXECUTABLE} create . range-v3/${RANGE_V3_VERSION}@ericniebler/stable
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
)
endif()
message(STATUS "Version updated to ${RANGE_V3_VERSION}. Don't forget to:")
message(STATUS " git push origin <feature-branch>")
message(STATUS "and (after that is merged to master) then:")
message(STATUS " conan create ${CMAKE_CURRENT_SOURCE_DIR} range-v3/${RANGE_V3_VERSION}@ericniebler/stable")
message(STATUS " conan upload --all range-v3/${RANGE_V3_VERSION}@ericniebler/stable")
endif()
include(CMakePackageConfigHelpers)
# write_basic_package_version_file(...) gained ARCH_INDEPENDENT in CMake 3.14.
# For CMake 3.6, this workaround makes the version file ARCH_INDEPENDENT
# by making CMAKE_SIZEOF_VOID_P empty.
set(OLD_CMAKE_SIZEOF_VOID_P ${CMAKE_SIZEOF_VOID_P})
set(CMAKE_SIZEOF_VOID_P "")
write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/range-v3-config-version.cmake
VERSION ${RANGE_V3_VERSION}
COMPATIBILITY ExactVersion
)
set(CMAKE_SIZEOF_VOID_P ${OLD_CMAKE_SIZEOF_VOID_P})
install(TARGETS concepts meta range-v3 EXPORT range-v3-targets DESTINATION lib)
install(EXPORT range-v3-targets FILE range-v3-config.cmake DESTINATION lib/cmake/range-v3)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/range-v3-config-version.cmake
DESTINATION lib/cmake/range-v3)
install(DIRECTORY include/ DESTINATION include FILES_MATCHING PATTERN "*")
export(EXPORT range-v3-targets FILE range-v3-config.cmake)

48
vendor/range-v3/range-v3/CREDITS.md vendored Normal file
View File

@ -0,0 +1,48 @@
Acknowledgements
----------------
In range-v3, I have integrated many ideas that come from other people. I would be remiss to not mention them. Many others helped either directly or indirectly in a variety of ways. In no particular order...
| Contributor | Contribution |
|-----------------------------|------|
| Jeremy Siek | Container algorithms (in Boost pre-history), Boost.Iterators |
| Thorston Ottoson | Boost.Range v1 |
| Neil Groves | Boost.Range v2 |
| David Abrahams, Thomas Witt | Boost.Iterators, Sentinels |
| Sean Parent | ASL, Projections, View / Range distinction, much Generic Program wisdom besides |
| Dietmar Kühl | Array Traits, Property Map |
| Andrew Sutton | C++ Concepts "Lite", Origin Libraries, Palo Alto Report |
| Doug Gregor | C++0x Concepts |
| Casey Carter | Co-author and Editor, Ranges TS; major code contributions |
| Gonzalo Brito Gadeschi | Many ideas, bug reports, and code contributions |
| Alexander Stepanov | STL, Generic Programming, Iterators, Elements of Programming, etc. |
| Bjarne Stroustrup | A tireless effort to add proper support for Generic Programming to C++, early support for my Ranges proposal |
| Herb Sutter | Early support for my Ranges proposal |
| The Standard C++ Foundation | A generous grant supporting my Ranges work |
An Abreviated History
--------------------
**Range v1**
I came to Boost in the early 2000's. By that time, Boost already had a Range library (Thorston Ottoson's). At this time, Boost.Range was little more that the `begin` and `end` free functions, and range-based overloads of the STL algorithms that dispatched to the iterator-based overloads in namespace `std`.
Boost also already had the Iterators library by David Abrahams and Jeremy Siek. This library had iterator adaptors like `filter_iterator` and `transform_iterator`.
**Range v2**
It seemed natural to me that the Range library and the adaptors from the Iterators library should be combined. I wrote the `filter` and `transform` range adaptors, commandeered the pipe operator (`|`) from bash for chaining, and put a rough library together called Range_ex in the Boost File Vault (which would later become the Boost Sandbox). I saw problems with my design and never finished it.
A few years later, Neil Groves picked up some of the ideas in my Range\_ex, polished them a great deal, published his own Range\_ex library, and submitted it to Boost. It became Boost.Range v2. At the time of writing (March, 2017), it is the version still shipping with Boost.
**Range v3**
In 2013, I published a blog post called ["Out Parameters, Move Semantics, and Stateful Algorithms"](http://ericniebler.com/2013/10/13/out-parameters-vs-move-semantics/) that turned my mind to ranges once again. Following that, it became clear to me that the Boost.Range library, designed for C++98, needed a facelift for the post-C++11 world. I began what I believed at the time would be a quick hack to bring Boost.Range into the modern world. I called it "Range v3", thinking it would become the third major version of the Boost.Range library. Subsequent posts detailed the evolution of my thinking as range-v3 took shape.
**Standardization**
Around this time, some big thinkers in the C++ community were working to resurrect the effort to add Concepts to C++. They published a paper ([N3351](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3351.pdf)) that would become known as the **"Palo Alto Report"** which detailed the necessary and sufficient language and library support for a concept-checked version of the Standard Template Library. The authors of the paper included Alexander Stepanov, Bjarne Stroustrup, Sean Parent, Andrew Sutton, and more. Andrew Sutton began working in earnest to realize the core language changes, an effort that became known as "Concepts Lite". (It is now the Concepts TS.)
I decided early on that Concepts Lite, or something like it, would become part of Standard C++. Recognizing that C++ would need a concept-ified Standard Library to go with the language feature, I began evolving range-v3 in that direction, eventually submitting ["Ranges for the Standard Library, Revision 1"](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4128.html) to the C++ Standardization Committee, together with Andrew Sutton and Sean Parent. The Committee approved the direction in late 2014, and so it goes...
Today (2017-03), we are very close to a final Ranges TS and are on target to integrate into Standard C++ in 2020, with *much* more to come. Stay tuned.

151
vendor/range-v3/range-v3/LICENSE.txt vendored Normal file
View File

@ -0,0 +1,151 @@
========================================================
Boost Software License - Version 1.0 - August 17th, 2003
========================================================
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
==============================================================================
libc++ License
==============================================================================
The libc++ library is dual licensed under both the University of Illinois
"BSD-Like" license and the MIT license. As a user of this code you may choose
to use it under either license. As a contributor, you agree to allow your code
to be used under both.
Full text of the relevant licenses is included below.
==============================================================================
University of Illinois/NCSA
Open Source License
Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT
http://llvm.org/svn/llvm-project/libcxx/trunk/CREDITS.TXT
All rights reserved.
Developed by:
LLVM Team
University of Illinois at Urbana-Champaign
http://llvm.org
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal with
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimers.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimers in the
documentation and/or other materials provided with the distribution.
* Neither the names of the LLVM Team, University of Illinois at
Urbana-Champaign, nor the names of its contributors may be used to
endorse or promote products derived from this Software without specific
prior written permission.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
SOFTWARE.
==============================================================================
Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT
http://llvm.org/svn/llvm-project/libcxx/trunk/CREDITS.TXT
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
==============================================================================
Stepanov and McJones, "Elements of Programming" license
==============================================================================
// Copyright (c) 2009 Alexander Stepanov and Paul McJones
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without
// fee, provided that the above copyright notice appear in all copies
// and that both that copyright notice and this permission notice
// appear in supporting documentation. The authors make no
// representations about the suitability of this software for any
// purpose. It is provided "as is" without express or implied
// warranty.
//
// Algorithms from
// Elements of Programming
// by Alexander Stepanov and Paul McJones
// Addison-Wesley Professional, 2009
==============================================================================
SGI C++ Standard Template Library license
==============================================================================
// Copyright (c) 1994
// Hewlett-Packard Company
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
// provided that the above copyright notice appear in all copies and
// that both that copyright notice and this permission notice appear
// in supporting documentation. Hewlett-Packard Company makes no
// representations about the suitability of this software for any
// purpose. It is provided "as is" without express or implied warranty.
//
// Copyright (c) 1996
// Silicon Graphics Computer Systems, Inc.
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
// provided that the above copyright notice appear in all copies and
// that both that copyright notice and this permission notice appear
// in supporting documentation. Silicon Graphics makes no
// representations about the suitability of this software for any
// purpose. It is provided "as is" without express or implied warranty.
//

77
vendor/range-v3/range-v3/README.md vendored Normal file
View File

@ -0,0 +1,77 @@
range-v3
========
Range library for C++14/17/20. This code was the basis of [a formal proposal](https://ericniebler.github.io/std/wg21/D4128.html) to add range support to the C++ standard library. That proposal evolved through a Technical Specification, and finally into [P0896R4 "The One Ranges Proposal"](https://wg21.link/p0896r4) which was merged into the C++20 working drafts in November 2018.
About:
------
Ranges are an extension of the Standard Template Library that makes its iterators and algorithms more powerful by making them _composable_. Unlike other range-like solutions which seek to do away with iterators, in range-v3 ranges are an abstration layer _on top_ of iterators.
Range-v3 is built on three pillars: Views, Actions, and Algorithms. The algorithms are the same as those with which you are already familiar in the STL, except that in range-v3 all the algorithms have overloads that take ranges in addition to the overloads that take iterators. Views are composable adaptations of ranges where the adaptation happens lazily as the view is iterated. And an action is an eager application of an algorithm to a container that mutates the container in-place and returns it for further processing.
Views and actions use the pipe syntax (e.g., `rng | adapt1 | adapt2 | ...`) so your code is terse and readable from left to right.
Documentation:
--------------
Check out the (woefully incomplete) documentation [here](https://ericniebler.github.io/range-v3/).
Other resources (mind the dates, the library probably has changed since then):
- Usage:
- Talk: [CppCon 2015: Eric Niebler "Ranges for the Standard Library"](https://www.youtube.com/watch?v=mFUXNMfaciE), 2015.
- [A slice of Python in C++](http://ericniebler.com/2014/12/07/a-slice-of-python-in-c/), 07.12.2014.
- Actions (back then called [Container Algorithms](http://ericniebler.com/2014/11/23/container-algorithms/)), 23.11.2014.
- [Range comprehensions](http://ericniebler.com/2014/04/27/range-comprehensions/), 27.04.2014.
- [Input iterators vs input ranges](http://ericniebler.com/2013/11/07/input-iterators-vs-input-ranges/), 07.11.2013.
- Design / Implementation:
- Rationale behind range-v3: [N4128: Ranges for the standard library Revision 1](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4128.html), 2014.
- Ranges TS: [N4560: C++ Extensions for Ranges](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4560.pdf), 2015.
- Implementation of customization points in range-v3:
- [N4381: Suggested Design for Customization Points](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4381.html), 2015.
- [P0386: Inline variables](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0386r0.pdf), 2016.
- [Customization Point Design in C++11 and Beyond](http://ericniebler.com/2014/10/21/customization-point-design-in-c11-and-beyond/), 2014.
- Proxy iterators in range-v3:
- [D0022: Proxy Iterators for the Ranges Extensions](https://ericniebler.github.io/std/wg21/D0022.html).
- [To Be or Not to Be (an Iterator)](http://ericniebler.com/2015/01/28/to-be-or-not-to-be-an-iterator/), 2015.
- [Iterators++: Part1](http://ericniebler.com/2015/02/03/iterators-plus-plus-part-1/), 2015.
- [Iterators++: Part2](http://ericniebler.com/2015/02/13/iterators-plus-plus-part-2/), 2015.
- [Iterators++: Part3](http://ericniebler.com/2015/03/03/iterators-plus-plus-part-3/), 2015.
- Metaprogramming utilities:
- See the [meta documentation](https://ericniebler.github.io/meta/index.html), the library has changed significantly since the [2014 blog post](http://ericniebler.com/2014/11/13/tiny-metaprogramming-library/).
- Concept emulation layer: [Concept checking in C++11](http://ericniebler.com/2013/11/23/concept-checking-in-c11/), 2013.
- [C++Now 2014: Eric Niebler "C++11 Library Design"](https://www.youtube.com/watch?v=zgOF4NrQllo), 2014.
License:
--------
Most of the source code in this project are mine, and those are under the Boost Software License. Parts are taken from Alex Stepanov's Elements of Programming, Howard Hinnant's libc++, and from the SGI STL. Please see the attached LICENSE file and the CREDITS file for the licensing and acknowledgments.
Supported Compilers
-------------------
The code is known to work on the following compilers:
- clang 3.6.2 (or later)
- GCC 5.0.2 (or later) (C++14 "extended constexpr" support is poor before 6.1.)
- Clang/LLVM 6 (or later) on Windows (older versions may work - we haven't tested.)
- Visual Studio 2019 Preview 4 (or later) on Windows, with some caveats due to range-v3's strict conformance requirements:
- range-v3 needs `/std:c++17 /permissive-`
- range-v3 needs a fully conforming preprocessor, so `/experimental:preprocessor` is necessary. Note that the conforming preprocessor diagnoses `C5105` "macro expansion producing 'defined' has undefined behavior" in some of the Windows SDK headers, so you'll probably want to suppress that warning with `/wd5105`.
[ Note: We've "retired" support for Clang/C2 with the VS2015 toolset (i.e., the `v140_clang_c2` toolset) which Microsoft no longer supports for C++ use. We no longer have CI runs, but haven't gone out of our way to break anything, so it will likely continue to work. ]
**Development Status:** This code is fairly stable, well-tested, and suitable for casual use, although currently lacking documentation. _In general_, no promise is made about support or long-term stability. This code *will* evolve without regard to backwards compatibility.
A notable exception is anything found within the `ranges::cpp20` namespace. Those components will change rarely or (preferably) never at all.
**Build status**
- on Travis-CI: [![Travis Build Status](https://travis-ci.org/ericniebler/range-v3.svg?branch=master)](https://travis-ci.org/ericniebler/range-v3)
- on AppVeyor: [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/fwl9ymc2t6ukn9qj/branch/master?svg=true)](https://ci.appveyor.com/project/ericniebler/range-v3)
Say Thanks!
-----------
I do this work because I love it and because I love C++ and want it to be as excellent as I know it can be. If you like my work and are looking for a way to say thank you, you can leave a supportive comment on [my blog](http://ericniebler.com). Or you could leave me some kudos on my Open Hub range-v3 contribution page. Just click the **Give Kudos** button [here](https://www.openhub.net/p/range-v3/contributors/3053743222308608).

26
vendor/range-v3/range-v3/TODO.md vendored Normal file
View File

@ -0,0 +1,26 @@
* Add contiguous iterator utilities. How about `is_contiguous_iterator` and `as_contiguous_range`:
```
CPP_template(typename I, typename S)(
requires RandomAccessIterator<I> &&
SizedSentinel<S, I> &&
is_contiguous_iterator<I>())
subrange<std::add_pointer_t<iter_reference_t<I>>>
as_contiguous_range(I begin, S end)
{
if(begin == end)
return {nullptr, nullptr};
else
return {addressof(*begin), addressof(*begin) + (end - begin)};
}
```
* Longer-term goals:
- Make `inplace_merge` work with forward iterators
- Make the sorting algorithms work with forward iterators
* Maybe iterators are not necessarily countable. Is there a relation between
the ability to be able to subtract two iterators to find the distance, and
with the existence of a DistanceType associated type? Think of:
- counted iterators (subtractable regardless of traversal category)
- repeat_view iterators (*not* subtractable but could be random access otherwise)
- infinite ranges (only countable with an infinite precision integer which we lack)

View File

@ -0,0 +1,5 @@
# To update the range-v3 version, from a *CLEAN* working directory, update the version numbers below.
# This makefile will generate a new version.hpp, *AMEND THE MOST RECENT COMMIT*, and git-tag the commit.
set(RANGE_V3_MAJOR 0)
set(RANGE_V3_MINOR 9)
set(RANGE_V3_PATCHLEVEL 1)

0
vendor/range-v3/range-v3/WORKSPACE vendored Normal file
View File

59
vendor/range-v3/range-v3/appveyor.yml vendored Normal file
View File

@ -0,0 +1,59 @@
shallow_clone: true
image: Visual Studio 2019
platform:
- x64_x86
- x64
configuration:
- Debug
- Release
environment:
matrix:
- CXX: clang-cl
CPP: latest
- CXX: cl
CPP: 17
- CXX: cl
CPP: latest
cache:
- C:\ninja-1.8.2
install:
- ps: |
if (![IO.File]::Exists("C:\ninja-1.8.2\ninja.exe")) {
Start-FileDownload 'https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip'
7z x -y ninja-win.zip -oC:\ninja-1.8.2
}
$env:PATH="C:\ninja-1.8.2;$env:PATH"
- for /f "tokens=1* delims=" %%i in ('"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath') do call "%%i\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%
- cmake --version
- ninja --version
- clang-cl --version
- cl /Bv || exit 0
build_script:
- mkdir build && cd build
- ps: |
$env:CC=$env:CXX
$env:HEADER_CHECK=0
if ($env:PLATFORM -eq "x64") {
if ($env:CONFIGURATION -eq "Debug") {
$env:HEADER_CHECK=1
}
} elseif ($env:CXX -eq "clang-cl") {
$env:CXXFLAGS='-m32'
$env:CFLAGS='-m32'
}
- cmake .. -G Ninja -Wdev -DRANGE_V3_HEADER_CHECKS=%HEADER_CHECK% -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DRANGES_CXX_STD=%CPP%
- ninja
test_script:
- ctest -j2 --output-on-failure
deploy: off

View File

@ -0,0 +1,79 @@
{
"configurations": [
{
"name": "Mac",
"includePath": [
"/Users/eniebler/llvm-install/include/c++/v1",
"/usr/local/include",
"/Users/eniebler/llvm-install/lib/clang/6.0.0/include",
"/usr/include",
"${workspaceRoot}/include",
"/usr/local/opt/boost@1.67/incluse"
],
"defines": [],
"intelliSenseMode": "clang-x64",
"browse": {
"path": [
"/Users/eniebler/llvm-install/include/c++/v1",
"/usr/local/include",
"/Users/eniebler/llvm-install/lib/clang/6.0.0/include",
"/usr/include",
"${workspaceRoot}/include",
"/usr/local/opt/boost@1.67/incluse"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
},
"macFrameworkPath": [
"/System/Library/Frameworks",
"/Library/Frameworks"
],
"compilerPath": "/Users/eniebler/llvm-install/bin/clang++",
"cStandard": "c11",
"cppStandard": "c++11",
"configurationProvider": "vector-of-bool.cmake-tools"
},
{
"name": "Linux",
"includePath": [
"/usr/include",
"/usr/local/include",
"${workspaceRoot}/include"
],
"defines": [],
"intelliSenseMode": "clang-x64",
"browse": {
"path": [
"/usr/include",
"/usr/local/include",
"${workspaceRoot}/include"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
},
"cStandard": "c11",
"cppStandard": "c++11"
},
{
"name": "Win32",
"includePath": [
"${workspaceRoot}/include"
],
"defines": [
"_DEBUG",
"UNICODE"
],
"intelliSenseMode": "msvc-x64",
"browse": {
"path": [
"${workspaceRoot}/include"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
},
"cStandard": "c11",
"cppStandard": "c++11"
}
],
"version": 4
}

View File

@ -0,0 +1,128 @@
# Copyright Louis Dionne 2013-2017
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
#
#
# This CMake module provides a function generating a unit test to make sure
# that every public header can be included on its own.
#
# When a C++ library or application has many header files, it can happen that
# a header does not include all the other headers it depends on. When this is
# the case, it can happen that including that header file on its own will
# break the compilation. This CMake module generates a dummy executable
# comprised of many .cpp files, each of which includes a header file that
# is part of the public API. In other words, the executable is comprised
# of .cpp files of the form:
#
# #include <the/public/header.hpp>
#
# and then exactly one `main` function. If this succeeds to compile, it means
# that the header can be included on its own, which is what clients expect.
# Otherwise, you have a problem. Since writing these dumb unit tests by hand
# is tedious and repetitive, you can use this CMake module to automate this
# task.
# add_header_test(<target> [EXCLUDE_FROM_ALL] [EXCLUDE excludes...] HEADERS headers...)
#
# Generates header-inclusion unit tests for all the specified headers.
#
# This function creates a target which builds a dummy executable including
# each specified header file individually. If this target builds successfully,
# it means that all the specified header files can be included individually.
#
# Parameters
# ----------
# <target>:
# The name of the target to generate.
#
# HEADERS headers:
# A list of header files to generate the inclusion tests for. All headers
# in this list must be represented as relative paths from the root of the
# include directory added to the compiler's header search path. In other
# words, it should be possible to include all headers in this list as
#
# #include <${header}>
#
# For example, for a library with the following structure:
#
# project/
# doc/
# test/
# ...
# include/
# boost/
# hana.hpp
# hana/
# transform.hpp
# tuple.hpp
# pair.hpp
# ...
#
# When building the unit tests for that library, we'll add `-I project/include'
# to the compiler's arguments. The list of public headers should therefore contain
#
# boost/hana.hpp
# boost/hana/tran