diff --git a/.github/workflows/firmware.yaml b/.github/workflows/firmware.yaml index f3df4a6..3512b08 100644 --- a/.github/workflows/firmware.yaml +++ b/.github/workflows/firmware.yaml @@ -29,7 +29,7 @@ jobs: - name: Setup cmake uses: jwlawson/actions-setup-cmake@v1.9 with: - cmake-version: '3.20.x' + cmake-version: '3.30.x' - name: Checkout uses: actions/checkout@v2 @@ -37,8 +37,8 @@ jobs: submodules: recursive - name: Configure - run: cmake -S firmware -B firmware/build -G "Unix Makefiles" -D CMAKE_TOOLCHAIN_FILE="$(pwd)/lib/libDaisy/cmake/toolchains/stm32h750xx.cmake" -D TOOLCHAIN_PREFIX=$(which arm-none-eabi-gcc | sed -e "s/bin\/arm-none-eabi-gcc//") - + run: cmake -S firmware -B firmware/build -G "Unix Makefiles" -D CMAKE_TOOLCHAIN_FILE="$(pwd)/lib/libDaisy/cmake/toolchains/stm32h750xx.cmake" -D CMAKE_BUILD_TYPE=RelWithDebInfo -D TOOLCHAIN_PREFIX=$(which arm-none-eabi-gcc | sed -e "s/bin\/arm-none-eabi-gcc//") + - name: Build run: cmake --build firmware/build @@ -53,7 +53,7 @@ jobs: with: name: TapeLooper.bin path: firmware/build/TapeLooper.bin - + ############################################################################### # builds the automated tests with clang; runs tests and exports results firmware-tests: @@ -69,12 +69,12 @@ jobs: run: | cd firmware/tests make release - + - name: Run Tests run: | cd firmware/tests/build/bin ./TapeLooper_gtest --gtest_output=xml:gtestresults.xml - + - name: Publish Test Results uses: EnricoMi/publish-unit-test-result-action@v1 if: always() diff --git a/.github/workflows/formatting.yaml b/.github/workflows/formatting.yaml index d362b03..e44efad 100644 --- a/.github/workflows/formatting.yaml +++ b/.github/workflows/formatting.yaml @@ -24,8 +24,8 @@ jobs: fail-fast: false matrix: path: - - 'firmware/src' - - 'firmware/tests' + - 'firmware/src' + - 'firmware/tests' - 'dsp/src' - 'dsp/tests' - 'plugin/src' @@ -33,7 +33,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Run clang-format style check for C/C++ programs. - uses: jidicula/clang-format-action@v3.4.0 + uses: jidicula/clang-format-action@v4.13.0 with: - clang-format-version: '11' + clang-format-version: '18' check-path: ${{ matrix.path }} \ No newline at end of file diff --git a/.github/workflows/plugin.yaml b/.github/workflows/plugin.yaml index 2c97cf0..d5ae327 100644 --- a/.github/workflows/plugin.yaml +++ b/.github/workflows/plugin.yaml @@ -18,13 +18,13 @@ jobs: ############################################################################### # builds the plugin on windows testBuildWindows: - runs-on: windows-latest + runs-on: windows-2019 steps: - name: Setup cmake uses: jwlawson/actions-setup-cmake@v1.8 with: - cmake-version: '3.19.x' + cmake-version: '3.30.x' - name: Checkout uses: actions/checkout@v2 @@ -34,12 +34,15 @@ jobs: - name: Configure run: | cmake.exe -G "Visual Studio 16 2019" -A x64 -B plugin/build -S plugin + - name: Build run: | cmake --build plugin/build --config Release + - name: Run Tests run: | plugin/build/Release/TapeLooperPlugin_Gtest.exe --gtest_output=xml:TestResults\gtestResults_windows.xml + - name: Upload Test Results uses: actions/upload-artifact@v2 with: @@ -64,12 +67,16 @@ jobs: - name: Setup cmake uses: jwlawson/actions-setup-cmake@v1.8 with: - cmake-version: '3.19.x' + cmake-version: '3.30.x' - uses: maxim-lobanov/setup-xcode@v1 with: xcode-version: latest-stable + - name: Select Xcode + run: | + sudo xcode-select --reset + - name: Checkout uses: actions/checkout@v2 with: @@ -78,12 +85,15 @@ jobs: - name: Configure run: | cmake -G "Xcode" -B plugin/build -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -S plugin + - name: Build run: | cmake --build plugin/build --config Release + - name: Run Tests run: | plugin/build/Release/TapeLooperPlugin_Gtest --gtest_output=xml:TestResults/gtestResults_macos.xml + - name: Upload Test Results uses: actions/upload-artifact@v2 with: @@ -108,7 +118,7 @@ jobs: - name: Setup cmake uses: jwlawson/actions-setup-cmake@v1.8 with: - cmake-version: '3.19.x' + cmake-version: '3.30.x' - name: Setup dependencies run: | @@ -122,12 +132,15 @@ jobs: - name: Configure run: | cmake -G "Unix Makefiles" -B plugin/build -S plugin + - name: Build run: | cmake --build plugin/build --config Release + - name: Run Tests run: | plugin/build/TapeLooperPlugin_Gtest --gtest_output=xml:TestResults/gtestResults_ubuntu.xml + - name: Upload Test Results uses: actions/upload-artifact@v2 with: @@ -154,7 +167,7 @@ jobs: steps: - name: Download Artifacts - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: TestResults path: TestResults diff --git a/.gitmodules b/.gitmodules index fafcac2..936f667 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "plugin/lib/JUCE"] path = plugin/lib/JUCE url = https://github.com/juce-framework/JUCE.git +[submodule "dsp/lib/gcem"] + path = dsp/lib/gcem + url = https://github.com/kthohr/gcem diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..86dc851 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,5 @@ +repos: +- repo: https://github.com/pre-commit/mirrors-clang-format + rev: v18.1.8 + hooks: + - id: clang-format diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 54a91f8..c25bbef 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -9,7 +9,7 @@ "${workspaceRoot}/lib/googletest/", "${workspaceRoot}/lib/googletest/googletest/include/", "${workspaceRoot}/lib/googletest/googlemock/include/", - "${workspaceRoot}/dsp/lib/sprout", + "${workspaceRoot}/dsp/lib/gcem/include", "${workspaceRoot}/lib/libDaisy/core", "${workspaceRoot}/lib/libDaisy/src", "${workspaceRoot}/lib/libDaisy/src/sys", @@ -46,7 +46,7 @@ "${workspaceRoot}/lib/googletest/", "${workspaceRoot}/lib/googletest/googletest/include/", "${workspaceRoot}/lib/googletest/googlemock/include/", - "${workspaceRoot}/dsp/lib/sprout", + "${workspaceRoot}/dsp/lib/gcem/include", "${workspaceRoot}/lib/libDaisy/core", "${workspaceRoot}/lib/libDaisy/src", "${workspaceRoot}/lib/libDaisy/src/sys", diff --git a/.vscode/launch.json b/.vscode/launch.json index c63d8e7..b1df9b1 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -111,10 +111,10 @@ "name": "Plugin Tests", "type": "cppdbg", "request": "launch", - "program": "${workspaceFolder}/plugin/build/Debug/TapeLooperPlugin_Gtest", + "program": "${workspaceFolder}/plugin/build/TapeLooperPlugin_Gtest", "args": [], "stopAtEntry": false, - "cwd": "${workspaceFolder}/plugin/build/Debug", + "cwd": "${workspaceFolder}/plugin/build", "environment": [], "externalConsole": false, "logging": { @@ -147,11 +147,11 @@ "osx": { "type": "lldb", "MIMode": "lldb", - "program": "${workspaceFolder}/plugin/build/TapeLooperPlugin_artefacts/Debug/Standalone/Tape Looper Plugin.app/Contents/MacOS/Tape Looper Plugin", + "program": "${workspaceFolder}/plugin/build/TapeLooperPlugin_artefacts/Standalone/Tape Looper Plugin.app/Contents/MacOS/Tape Looper Plugin", }, "windows": { "MIMode": "gdb", - "program": "${workspaceFolder}/plugin/build/TapeLooperPlugin_artefacts/Debug/Standalone/Tape Looper Plugin.exe", + "program": "${workspaceFolder}/plugin/build/TapeLooperPlugin_artefacts/Standalone/Tape Looper Plugin.exe", } } ] diff --git a/dsp/CMakeLists.txt b/dsp/CMakeLists.txt index beeaa2a..4495700 100644 --- a/dsp/CMakeLists.txt +++ b/dsp/CMakeLists.txt @@ -14,17 +14,21 @@ set(HEADER_FILES src/util/Memory.h ) -add_subdirectory(lib/sprout) +add_subdirectory(lib/gcem) add_library(${TARGET} src/dsp/DspHelpers.cpp ) target_include_directories(${TARGET} INTERFACE src/ - ${CMAKE_CURRENT_SOURCE_DIR}/lib/sprout/ -) + ${CMAKE_CURRENT_SOURCE_DIR}/lib/gcem/include/ +) target_include_directories(${TARGET} PRIVATE src/ - ${CMAKE_CURRENT_SOURCE_DIR}/lib/sprout/ -) + ${CMAKE_CURRENT_SOURCE_DIR}/lib/gcem/include +) +target_compile_definitions(${TARGET} +PUBLIC + _USE_MATH_DEFINES +) set_property(TARGET tapeLooperDsp PROPERTY CXX_STANDARD 17) \ No newline at end of file diff --git a/dsp/lib/gcem b/dsp/lib/gcem new file mode 160000 index 0000000..012ae73 --- /dev/null +++ b/dsp/lib/gcem @@ -0,0 +1 @@ +Subproject commit 012ae73c6d0a2cb09ffe86475f5c6fba3926e200 diff --git a/dsp/lib/sprout/CMakeLists.txt b/dsp/lib/sprout/CMakeLists.txt deleted file mode 100644 index 1d8826f..0000000 --- a/dsp/lib/sprout/CMakeLists.txt +++ /dev/null @@ -1,48 +0,0 @@ -cmake_minimum_required(VERSION 3.19) -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/CMakeFiles/modules/") - -project(sprout) -ENABLE_TESTING() - -include(CheckIncludeFiles) -include (FindPkgConfig) -include(CheckCXXSourceCompiles) - -# build type -if( NOT DEFINED CMAKE_BUILD_TYPE ) - set(CMAKE_BUILD_TYPE Debug) -endif( NOT DEFINED CMAKE_BUILD_TYPE ) - -option( BUILD_TESTS "If true Sprout's tests will be built" FALSE) - - -set(CMAKE_CXX_FLAGS_DEBUG "-W -Wall -Wextra -Wno-unused-parameter -Werror -std=c++0x -O0 -g") -set(CMAKE_C_FLAGS_DEBUG "-W -Wall -Wextra -Wno-unused-parameter -Werror -O0 -g") -set(CMAKE_CXX_FLAGS_RELEASE "-W -Wall -Wextra -Wno-unused-parameter -Werror -std=c++0x -O2") -set(CMAKE_C_FLAGS_RELEASE "-W -Wall -Wextra -Wno-unused-parameter -Werror -O2") - -#if you don't want the full compiler output, remove the following line -if( NOT DEFINED CMAKE_VERBOSE_MAKEFILE ) - set(CMAKE_VERBOSE_MAKEFILE OFF) -endif( NOT DEFINED CMAKE_VERBOSE_MAKEFILE ) - - -#if( NOT DEFINED Boost_USE_MULTITHREADED ) -# set(Boost_USE_MULTITHREADED ON) -#endif( NOT DEFINED Boost_USE_MULTITHREADED ) - -#find_package( Boost 1.49.0 REQUIRED ) -#if( NOT Boost_FOUND ) -# message( SEND_ERROR "Required package Boost was not detected." ) -#endif (NOT Boost_FOUND) - -#pkg_check_modules(OpenCV opencv) - -INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} ${Boost_INCLUDE_DIRS} ) -#link_directories( ${Boost_LIBRARY_DIRS} ) -#subdirs( sprout tools cmake ) -subdirs( sprout cmake ) -if( ${BUILD_TESTS} ) - subdirs(libs) -endif( ${BUILD_TESTS} ) - diff --git a/dsp/lib/sprout/LICENSE_1_0.txt b/dsp/lib/sprout/LICENSE_1_0.txt deleted file mode 100644 index 36b7cd9..0000000 --- a/dsp/lib/sprout/LICENSE_1_0.txt +++ /dev/null @@ -1,23 +0,0 @@ -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. diff --git a/dsp/lib/sprout/README.rst b/dsp/lib/sprout/README.rst deleted file mode 100644 index c1da785..0000000 --- a/dsp/lib/sprout/README.rst +++ /dev/null @@ -1,55 +0,0 @@ -############################################################################### -Sprout C++ Libraries -############################################################################### - -******************************************************************************* -Welcome to the Sprout C++ Libraries -******************************************************************************* - -| C++11/14 constexpr based Containers, Algorithms, Random numbers, Parsing, Ray tracing, Synthesizer, and others. - -******************************************************************************* -Library Documentation -******************************************************************************* - -| The starting point for the documentation of individual libraries is the `Libraries page `_, which gives a brief description of each library and links to its documentation. - -******************************************************************************* -Project page -******************************************************************************* - -* `Project page `_ -* `Repository (Github) `_ -* `Wiki (japanese) `_ - -******************************************************************************* -Install -******************************************************************************* - -| Through the path to the directory. ``/path/to/sprout`` -| This library can be used in the header only. - -******************************************************************************* -Supported Compilers -******************************************************************************* - -Linux: - -* GCC, C++11/14/17 mode: 4.7.0~4.7.4, 4.8.0~4.8.5, 4.9.0~4.9.4, 5.1.0~5.5.0, 6.1.0~6.5.0, 7.1.0~7.4.0 8.1.0~8.2.0 -* Clang, C++11/14/17 mode: 3.2, 3.3, 3.4~3.4.2, 3.5.0~3.5.1, 3.6.0~3.6.2, 3.7.0~3.7.1, 3.8.0~3.8.1, 3.9.0~3.9.1, 4.0.0~4.0.1, 5.0.0~5.0.2, 6.0.0~6.0.1, 7.0.0 - -******************************************************************************* -Author -******************************************************************************* - -| Bolero MURAKAMI `(Mail) `_ -| `Website `_ | `Twitter `_ | `Facebook `_ | `Blog `_ | `Github `_ | `SlideShare `_ - -******************************************************************************* -Copyrights -******************************************************************************* - -| Copyright (C) 2011-2019 Bolero MURAKAMI. -| Distributed under the Boost Software License, Version 1.0. -| (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - diff --git a/dsp/lib/sprout/cmake/CMakeLists.txt b/dsp/lib/sprout/cmake/CMakeLists.txt deleted file mode 100644 index eb116b1..0000000 --- a/dsp/lib/sprout/cmake/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -INSTALL( DIRECTORY ./ - DESTINATION share/cmake/Modules/ - FILES_MATCHING PATTERN "*.cmake" ) diff --git a/dsp/lib/sprout/cmake/FindSprout.cmake b/dsp/lib/sprout/cmake/FindSprout.cmake deleted file mode 100644 index ce2ef8d..0000000 --- a/dsp/lib/sprout/cmake/FindSprout.cmake +++ /dev/null @@ -1,52 +0,0 @@ -# - Find Sprout C++ library -# Once done this will define -# -# SPROUT_INCLUDE_DIRS - where to find sprout/darkroom.hpp -# SPROUT_FOUND - True if Sprout found. -# -# -#============================================================================= -# Copyright 2013 Naomasa Matsubayashi -# -# Distributed under the Boost Software License, Version 1.0. (See accompanying -# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= - -set(_SPROUT_SEARCHES) - -# Search SPROUT_ROOT first if it is set. -if(SPROUT_ROOT) - set(_SPROUT_SEARCH_ROOT PATHS ${SPROUT_ROOT} NO_DEFAULT_PATH) - list(APPEND _SPROUT_SEARCHES _SPROUT_SEARCH_ROOT) -endif() - -# Normal search. -set(_SPROUT_SEARCH_NORMAL - PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Zlib;InstallPath]" - "$ENV{PROGRAMFILES}/zlib" - "/usr" - "/usr/local" - "/opt/sprout" - ) -list(APPEND _SPROUT_SEARCHES _SPROUT_SEARCH_NORMAL) - -# Try each search configuration. -foreach(search ${_SPROUT_SEARCHES}) - find_path(SPROUT_INCLUDE_DIR NAMES sprout/darkroom.hpp ${${search}} PATH_SUFFIXES include) -endforeach() - -mark_as_advanced(SPROUT_INCLUDE_DIR) - -# handle the QUIETLY and REQUIRED arguments and set SPROUT_FOUND to TRUE if -# all listed variables are TRUE -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS( SPROUT REQUIRED_VARS SPROUT_INCLUDE_DIR ) - -if(SPROUT_FOUND) - set(SPROUT_INCLUDE_DIRS ${SPROUT_INCLUDE_DIR}) -endif() - diff --git a/dsp/lib/sprout/example/brainfuck/bottles.bf b/dsp/lib/sprout/example/brainfuck/bottles.bf deleted file mode 100644 index 1194fc6..0000000 --- a/dsp/lib/sprout/example/brainfuck/bottles.bf +++ /dev/null @@ -1,45 +0,0 @@ -// 99 Bottles of Beer -">+++++++++[<+++++++++++>-]<[>[-]>[-]<<[>+>+<<-]>>[<<+>>-]>>>" -"[-]<<<+++++++++<[>>>+<<[>+>[-]<<-]>[<+>-]>[<<++++++++++>>>+<" -"-]<<-<-]+++++++++>[<->-]>>+>[<[-]<<+>>>-]>[-]+<<[>+>-<<-]<<<" -"[>>+>+<<<-]>>>[<<<+>>>-]>[<+>-]<<-[>[-]<[-]]>>+<[>[-]<-]<+++" -"+++++[<++++++<++++++>>-]>>>[>+>+<<-]>>[<<+>>-]<[<<<<<.>>>>>-" -"]<<<<<<.>>[-]>[-]++++[<++++++++>-]<.>++++[<++++++++>-]<++.>+" -"++++[<+++++++++>-]<.><+++++..--------.-------.>>[>>+>+<<<-]>" -">>[<<<+>>>-]<[<<<<++++++++++++++.>>>>-]<<<<[-]>++++[<+++++++" -"+>-]<.>+++++++++[<+++++++++>-]<--.---------.>+++++++[<------" -"---->-]<.>++++++[<+++++++++++>-]<.+++..+++++++++++++.>++++++" -"++[<---------->-]<--.>+++++++++[<+++++++++>-]<--.-.>++++++++" -"[<---------->-]<++.>++++++++[<++++++++++>-]<++++.-----------" -"-.---.>+++++++[<---------->-]<+.>++++++++[<+++++++++++>-]<-." -">++[<----------->-]<.+++++++++++..>+++++++++[<---------->-]<" -"-----.---.>>>[>+>+<<-]>>[<<+>>-]<[<<<<<.>>>>>-]<<<<<<.>>>+++" -"+[<++++++>-]<--.>++++[<++++++++>-]<++.>+++++[<+++++++++>-]<." -"><+++++..--------.-------.>>[>>+>+<<<-]>>>[<<<+>>>-]<[<<<<++" -"++++++++++++.>>>>-]<<<<[-]>++++[<++++++++>-]<.>+++++++++[<++" -"+++++++>-]<--.---------.>+++++++[<---------->-]<.>++++++[<++" -"+++++++++>-]<.+++..+++++++++++++.>++++++++++[<---------->-]<" -"-.---.>+++++++[<++++++++++>-]<++++.+++++++++++++.++++++++++." -"------.>+++++++[<---------->-]<+.>++++++++[<++++++++++>-]<-." -"-.---------.>+++++++[<---------->-]<+.>+++++++[<++++++++++>-" -"]<--.+++++++++++.++++++++.---------.>++++++++[<---------->-]" -"<++.>+++++[<+++++++++++++>-]<.+++++++++++++.----------.>++++" -"+++[<---------->-]<++.>++++++++[<++++++++++>-]<.>+++[<----->" -"-]<.>+++[<++++++>-]<..>+++++++++[<--------->-]<--.>+++++++[<" -"++++++++++>-]<+++.+++++++++++.>++++++++[<----------->-]<++++" -".>+++++[<+++++++++++++>-]<.>+++[<++++++>-]<-.---.++++++.----" -"---.----------.>++++++++[<----------->-]<+.---.[-]<<<->[-]>[" -"-]<<[>+>+<<-]>>[<<+>>-]>>>[-]<<<+++++++++<[>>>+<<[>+>[-]<<-]" -">[<+>-]>[<<++++++++++>>>+<-]<<-<-]+++++++++>[<->-]>>+>[<[-]<" -"<+>>>-]>[-]+<<[>+>-<<-]<<<[>>+>+<<<-]>>>[<<<+>>>-]<>>[<+>-]<" -"<-[>[-]<[-]]>>+<[>[-]<-]<++++++++[<++++++<++++++>>-]>>>[>+>+" -"<<-]>>[<<+>>-]<[<<<<<.>>>>>-]<<<<<<.>>[-]>[-]++++[<++++++++>" -"-]<.>++++[<++++++++>-]<++.>+++++[<+++++++++>-]<.><+++++..---" -"-----.-------.>>[>>+>+<<<-]>>>[<<<+>>>-]<[<<<<++++++++++++++" -".>>>>-]<<<<[-]>++++[<++++++++>-]<.>+++++++++[<+++++++++>-]<-" -"-.---------.>+++++++[<---------->-]<.>++++++[<+++++++++++>-]" -"<.+++..+++++++++++++.>++++++++[<---------->-]<--.>+++++++++[" -"<+++++++++>-]<--.-.>++++++++[<---------->-]<++.>++++++++[<++" -"++++++++>-]<++++.------------.---.>+++++++[<---------->-]<+." -">++++++++[<+++++++++++>-]<-.>++[<----------->-]<.+++++++++++" -"..>+++++++++[<---------->-]<-----.---.+++.---.[-]<<<]" diff --git a/dsp/lib/sprout/example/brainfuck/echo.bf b/dsp/lib/sprout/example/brainfuck/echo.bf deleted file mode 100644 index 2a2ebc0..0000000 --- a/dsp/lib/sprout/example/brainfuck/echo.bf +++ /dev/null @@ -1,2 +0,0 @@ -// echo -"+[>,.<]" diff --git a/dsp/lib/sprout/example/brainfuck/fizzBuzz.bf b/dsp/lib/sprout/example/brainfuck/fizzBuzz.bf deleted file mode 100644 index 9cd27d3..0000000 --- a/dsp/lib/sprout/example/brainfuck/fizzBuzz.bf +++ /dev/null @@ -1,6 +0,0 @@ -// FizzBuzz -"++++++++++++[->++++++>+++++++++>+++++>++++++++++>++++++++++>+++>>>>>>++++++++<<<<<<<<<<<<]>-->--->++" -"++++>--->++>---->>>>+++>+++++>++++[>>>+[-<<[->>+>+<<<]>>>[-<<<+>>>]+<[[-]>-<<[->+>+<<]>>[-<<+>>]+<[[" -"-]>-<<<+>->]>[-<<<--------->+++++++++>>>>>+<<<]<]>[-<+++++++[<<+++++++>>-]<++++++++>>]>>>]<<<<<<[<<<" -"<]>-[-<<+>+>]<[->+<]+<[[-]>-<]>[->+++<<<<<<<<<.>.>>>..>>+>>]>>-[-<<<+>+>>]<<[->>+<<]+<[[-]>-<]>[->>+" -"++++<<<<<<<<.>.>..>>+>>]<+<[[-]>-<]>[->>>>>[>>>>]<<<<[.<<<<]<]<<.>>>>>>-]" diff --git a/dsp/lib/sprout/example/brainfuck/hello.bf b/dsp/lib/sprout/example/brainfuck/hello.bf deleted file mode 100644 index 20390a0..0000000 --- a/dsp/lib/sprout/example/brainfuck/hello.bf +++ /dev/null @@ -1,3 +0,0 @@ -// Hello, world! -"+++++++++[>++++++++>+++++++++++>+++++<<<-]>.>++.+++++++..+++.>-." -"------------.<++++++++.--------.+++.------.--------.>+." diff --git a/dsp/lib/sprout/example/brainfuck/quine.bf b/dsp/lib/sprout/example/brainfuck/quine.bf deleted file mode 100644 index cca0e97..0000000 --- a/dsp/lib/sprout/example/brainfuck/quine.bf +++ /dev/null @@ -1,11 +0,0 @@ -// Quine -"-" -">++>+++>+>+>+++>>>>>>>>>>>>>>>>>>>>>>+>+>++>+++>++>>+++" -">+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+>+>>+++>>>>+++>>>+++" -">+>>>>>>>++>+++>+++>+>>+++>+++>+>+++>+>+++>+>++>+++>>>+" -">+>+>+>++>+++>+>+>>+++>>>>>>>+>+>>>+>+>++>+++>+++>+>>+++" -">+++>+>+++>+>++>+++>++>>+>+>++>+++>+>+>>+++>>>+++>+>>>++" -">+++>+++>+>>+++>>>+++>+>+++>+>>+++>>+++>>" -"+[[>>+[>]+>+[<]<-]>>[>]<+<+++[<]<<+]" -">>>[>]+++>+" -"[+[<++++++++++++++++>-]<++++++++++.<]" diff --git a/dsp/lib/sprout/example/brainfuck/self.bf b/dsp/lib/sprout/example/brainfuck/self.bf deleted file mode 100644 index e2dc908..0000000 --- a/dsp/lib/sprout/example/brainfuck/self.bf +++ /dev/null @@ -1,2 +0,0 @@ -// Self-describing -"+++++[>+++++++++<-],[[>--.++>+<<-]>+.->[<.>-]<<,]" diff --git a/dsp/lib/sprout/example/brainfuck/x86_compile.cpp b/dsp/lib/sprout/example/brainfuck/x86_compile.cpp deleted file mode 100644 index 4d7a6b3..0000000 --- a/dsp/lib/sprout/example/brainfuck/x86_compile.cpp +++ /dev/null @@ -1,578 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -// -// PE structs -// Copy and Paste from -// -typedef unsigned long DWORD; -typedef int BOOL; -typedef unsigned char BYTE; -typedef unsigned short WORD; - - -// -// File header format. -// - -typedef struct _IMAGE_FILE_HEADER { - WORD Machine; - WORD NumberOfSections; - DWORD TimeDateStamp; - DWORD PointerToSymbolTable; - DWORD NumberOfSymbols; - WORD SizeOfOptionalHeader; - WORD Characteristics; -} IMAGE_FILE_HEADER, *PIMAGE_FILE_HEADER; - - -// -// Directory format. -// - -typedef struct _IMAGE_DATA_DIRECTORY { - DWORD VirtualAddress; - DWORD Size; -} IMAGE_DATA_DIRECTORY, *PIMAGE_DATA_DIRECTORY; - -#define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16 - -// -// Optional header format. -// - -typedef struct _IMAGE_OPTIONAL_HEADER { - // - // Standard fields. - // - - WORD Magic; - BYTE MajorLinkerVersion; - BYTE MinorLinkerVersion; - DWORD SizeOfCode; - DWORD SizeOfInitializedData; - DWORD SizeOfUninitializedData; - DWORD AddressOfEntryPoint; - DWORD BaseOfCode; - DWORD BaseOfData; - - // - // NT additional fields. - // - - DWORD ImageBase; - DWORD SectionAlignment; - DWORD FileAlignment; - WORD MajorOperatingSystemVersion; - WORD MinorOperatingSystemVersion; - WORD MajorImageVersion; - WORD MinorImageVersion; - WORD MajorSubsystemVersion; - WORD MinorSubsystemVersion; - DWORD Win32VersionValue; - DWORD SizeOfImage; - DWORD SizeOfHeaders; - DWORD CheckSum; - WORD Subsystem; - WORD DllCharacteristics; - DWORD SizeOfStackReserve; - DWORD SizeOfStackCommit; - DWORD SizeOfHeapReserve; - DWORD SizeOfHeapCommit; - DWORD LoaderFlags; - DWORD NumberOfRvaAndSizes; - IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; -} IMAGE_OPTIONAL_HEADER32, *PIMAGE_OPTIONAL_HEADER32; - - -// -// Section header format. -// - -#define IMAGE_SIZEOF_SHORT_NAME 8 - -typedef struct _IMAGE_SECTION_HEADER { - BYTE Name[IMAGE_SIZEOF_SHORT_NAME]; -// union { -// DWORD PhysicalAddress; -// DWORD VirtualSize; -// } Misc; - struct { - DWORD VirtualSize; - } Misc; - DWORD VirtualAddress; - DWORD SizeOfRawData; - DWORD PointerToRawData; - DWORD PointerToRelocations; - DWORD PointerToLinenumbers; - WORD NumberOfRelocations; - WORD NumberOfLinenumbers; - DWORD Characteristics; -} IMAGE_SECTION_HEADER, *PIMAGE_SECTION_HEADER; - - -// -// binary size for output -// -#ifndef BRAINFUCK_BINARY_SIZE -# define BRAINFUCK_BINARY_SIZE (16 * 1024) -#endif - -// -// loop limit -// -#ifndef BRAINFUCK_LOOP_LIMIT -# define BRAINFUCK_LOOP_LIMIT 256 -#endif - -// -// source file name -// -#ifndef BRAINFUCK_SOURCE_FILE -# define BRAINFUCK_SOURCE_FILE a.bf -#endif - - -// -// constants -// -SPROUT_STATIC_CONSTEXPR std::size_t bin_size = BRAINFUCK_BINARY_SIZE; - -SPROUT_STATIC_CONSTEXPR std::size_t loop_limit = BRAINFUCK_LOOP_LIMIT; - -SPROUT_STATIC_CONSTEXPR auto source = sprout::to_string( -# include SPROUT_PP_STRINGIZE(BRAINFUCK_SOURCE_FILE) - ); - -SPROUT_STATIC_CONSTEXPR std::int32_t addr_putchar = 0x00405044; -SPROUT_STATIC_CONSTEXPR std::int32_t addr_getchar = addr_putchar + 4; -SPROUT_STATIC_CONSTEXPR std::int32_t addr_buf = 0x00406000; - - -// -// output functions -// -template -SPROUT_CXX14_CONSTEXPR std::size_t -write_bytes(OutputIterator& out, T const& val) { - typedef sprout::little_endian_traits traits; - for (std::size_t i = 0; i != traits::size(); ++i) { - *out++ = sprout::little_endian_traits::get_byte(val, i); - } - return traits::size(); -} -template -SPROUT_CXX14_CONSTEXPR std::size_t -write_bytes(OutputIterator& out, T const(& vals)[N]) { - typedef sprout::little_endian_traits traits; - for (std::size_t i = 0; i != N; ++i) { - ::write_bytes(out, vals[i]); - } - return traits::size() * N; -} -template -SPROUT_CXX14_CONSTEXPR std::size_t -write_bytes(OutputIterator& out, Head const& head, Tail const&... tail) { - return ::write_bytes(out, head) + ::write_bytes(out, tail...); -} - -template -SPROUT_CXX14_CONSTEXPR std::size_t -write_pe_header(OutputIterator& out, std::size_t n = 0) { - SPROUT_CONSTEXPR unsigned char stub[] = { - // 00-3b: DOS Header - 'M', 'Z', 0x50, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x0f, 0x00, 0xff, 0xff, 0x00, 0x00, - 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - // 3c-3f: Pointer to PE Header (=80) - 0x80, 0x00, 0x00, 0x00, - // 40-7f: DOS Stub - 0xba, 0x10, 0x00, 0x0e, 0x1f, 0xb4, 0x09, 0xcd, 0x21, 0xb8, 0x01, 0x4c, 0xcd, 0x21, 0x90, 0x90, - 'T', 'h', 'i', 's', ' ', 'p', 'r', 'o', 'g', 'r', 'a', 'm', ' ', 'c', 'a', 'n', - 'n', 'o', 't', ' ', 'b', 'e', ' ', 'r', 'u', 'n', ' ', 'i', 'n', ' ', 'D', 'O', - 'S', ' ', 'm', 'o', 'd', 'e', '.', '\r', '\n', '$', 0, 0, 0, 0, 0, 0, - // 80-83: PE Signature - 'P', 'E', 0, 0 - }; - n += ::write_bytes( - out, - stub - ); - - SPROUT_CONSTEXPR ::IMAGE_FILE_HEADER coff = { - 0x014c, // Machine - 3, // NumberOfSections - 0, // TimeDateStamp - 0, // PointerToSymbolTable - 0, // NumberOfSymbols - sizeof(::IMAGE_OPTIONAL_HEADER32), // SizeOfOptionalHeader - 0x030f // Characteristics - }; - n += ::write_bytes( - out, - coff.Machine, - coff.NumberOfSections, - coff.TimeDateStamp, - coff.PointerToSymbolTable, - coff.NumberOfSymbols, - coff.SizeOfOptionalHeader, - coff.Characteristics - ); - - SPROUT_CONSTEXPR ::IMAGE_OPTIONAL_HEADER32 opt = { - 0x010b, // Magic - 6, 0, // MajorLinkerVersion, MinorLinkerVersion - ::bin_size, // SizeOfCode - 0, // SizeOfInitializedData - 65536, // SizeOfUninitializedData - 0x1000, // AddressOfEntryPoint - 0x1000, // BaseOfCode - 0x6000, // BaseOfData - 0x00400000, // ImageBase - 0x1000, // SectionAlignment - 0x0200, // FileAlignment - 4, 0, // MajorOperatingSystemVersion, MinorOperatingSystemVersion - 0, 0, // MajorImageVersion, MinorImageVersion - 4, 0, // MajorSubsystemVersion, MinorSubsystemVersion - 0, // Win32VersionValue - 0x16000, // SizeOfImage - 0x200, // SizeOfHeaders - 0, // CheckSum - 3, // Subsystem - 0, // DllCharacteristics - 1024 * 1024, // SizeOfStackReserve - 8 * 1024, // SizeOfStackCommit - 1024 * 1024, // SizeOfHeapReserve - 4 * 1024, // SizeOfHeapCommit - 0, // LoaderFlags - 16, // NumberOfRvaAndSizes - { - {}, - { - 0x5000, // VirtualAddress (import table) - 100 // Size - }, - {} - } - }; - n += ::write_bytes( - out, - opt.Magic, - opt.MajorLinkerVersion, opt.MinorLinkerVersion, - opt.SizeOfCode, - opt.SizeOfInitializedData, - opt.SizeOfUninitializedData, - opt.AddressOfEntryPoint, - opt.BaseOfCode, - opt.BaseOfData, - opt.ImageBase, - opt.SectionAlignment, - opt.FileAlignment, - opt.MajorOperatingSystemVersion, opt.MinorOperatingSystemVersion, - opt.MajorImageVersion, opt.MinorImageVersion, - opt.MajorSubsystemVersion, opt.MinorSubsystemVersion, - opt.Win32VersionValue, - opt.SizeOfImage, - opt.SizeOfHeaders, - opt.CheckSum, - opt.Subsystem, - opt.DllCharacteristics, - opt.SizeOfStackReserve, - opt.SizeOfStackCommit, - opt.SizeOfHeapReserve, - opt.SizeOfHeapCommit, - opt.LoaderFlags, - opt.NumberOfRvaAndSizes, - opt.DataDirectory[0].VirtualAddress, opt.DataDirectory[0].Size, - opt.DataDirectory[1].VirtualAddress, opt.DataDirectory[1].Size - ); - for (std::size_t i = 2; i != IMAGE_NUMBEROF_DIRECTORY_ENTRIES; ++i) { - n += ::write_bytes( - out, - opt.DataDirectory[i].VirtualAddress, opt.DataDirectory[i].Size - ); - } - - SPROUT_CONSTEXPR ::IMAGE_SECTION_HEADER sects[3] = { - { - ".text", // Name - {::bin_size}, // Misc.VirtualSize - 0x1000, // VirtualAddress - ::bin_size, // SizeOfRawData - 0x400, // PointerToRawData - 0, // PointerToRelocations - 0, // PointerToLinenumbers - 0, // NumberOfRelocations - 0, // NumberOfLinenumbers - 0x60500060 // Characteristics - }, - { - ".idata", // Name - {100}, // Misc.VirtualSize - 0x5000, // VirtualAddress - 512, // SizeOfRawData - 0x200, // PointerToRawData - 0, // PointerToRelocations - 0, // PointerToLinenumbers - 0, // NumberOfRelocations - 0, // NumberOfLinenumbers - 0xc0300040 // Characteristics - }, - { - ".bss", // Name - {65536}, // Misc.VirtualSize - 0x6000, // VirtualAddress - 0, // SizeOfRawData - 0, // PointerToRawData - 0, // PointerToRelocations - 0, // PointerToLinenumbers - 0, // NumberOfRelocations - 0, // NumberOfLinenumbers - 0xc0400080 // Characteristics - } - }; - for (std::size_t i = 0; i != 3; ++i) { - n += ::write_bytes( - out, - sects[i].Name, - sects[i].Misc.VirtualSize, - sects[i].VirtualAddress, - sects[i].SizeOfRawData, - sects[i].PointerToRawData, - sects[i].PointerToRelocations, - sects[i].PointerToLinenumbers, - sects[i].NumberOfRelocations, - sects[i].NumberOfLinenumbers, - sects[i].Characteristics - ); - } - - for (; n != 0x200; ) { - n += ::write_bytes( - out, - (unsigned char)0 - ); - } - return n; -} - -template -SPROUT_CXX14_CONSTEXPR std::size_t -write_idata(OutputIterator& out, std::size_t n = 0) { - SPROUT_CONSTEXPR int idt[] = { - // IDT 1 - 0x5028, 0, 0, 0x5034, 0x5044, - // IDT (end) - 0, 0, 0, 0, 0 - }; - n += ::write_bytes( - out, - idt - ); - - SPROUT_CONSTEXPR int ilt_iat[] = { - 0x5050, 0x505a, 0 - }; - - // ILT - n += ::write_bytes( - out, - ilt_iat - ); - n += ::write_bytes( - out, - "msvcrt.dll\0\0\0\0\0" - ); - - // IAT - n += ::write_bytes( - out, - ilt_iat - ); - n += ::write_bytes( - out, - (std::int16_t)0, - "putchar", - (std::int16_t)0, - "getchar" - ); - - for (; n != 0x400; ) { - n += ::write_bytes( - out, - (unsigned char)0 - ); - } - return n; -} - -// -// compile -// -template -SPROUT_CXX14_CONSTEXPR std::size_t -compile(InputIterator first, InputIterator last, RandomAccessIterator& out_first) { - sprout::array loops {{}}; // loop stack - auto loop_first = sprout::begin(loops); - auto loop_last = sprout::end(loops); - auto loop = loop_first; - - int idx = 0; - auto out = out_first; - - idx += ::write_bytes( - out, - (unsigned char)0x31, (unsigned char)0xc9, // xor ecx, ecx - (unsigned char)0x57, // push edi - (unsigned char)0xbf, ::addr_buf // mov edi, addr_buf - ); - - for (; first != last; ++first) { - switch (*first) { - case '>': - idx += ::write_bytes( - out, - (unsigned char)0x66, (unsigned char)0x41 // inc cx - ); - break; - case '<': - idx += ::write_bytes( - out, - (unsigned char)0x66, (unsigned char)0x49 // dec cx - ); - break; - case '+': - idx += ::write_bytes( - out, - (unsigned char)0xfe, (unsigned char)0x04, (unsigned char)0x0f // inc byte [edi+ecx] - ); - break; - case '-': - idx += ::write_bytes( - out, - (unsigned char)0xfe, (unsigned char)0x0c, (unsigned char)0x0f // dec byte [edi+ecx] - ); - break; - case '.': - idx += ::write_bytes( - out, - (unsigned char)0x51, // push ecx - (unsigned char)0x0f, (unsigned char)0xb6, (unsigned char)0x04, (unsigned char)0x0f, // movzx eax,byte [edi+ecx] - (unsigned char)0x50, // push eax - (unsigned char)0xa1, ::addr_putchar, // mov eax, [addr_putchar] - (unsigned char)0xff, (unsigned char)0xd0, // call eax - (unsigned char)0x58, // pop eax - (unsigned char)0x59 // pop ecx - ); - break; - case ',': - idx += ::write_bytes( - out, - (unsigned char)0x51, // push ecx - (unsigned char)0xa1, ::addr_getchar, // mov eax, [addr_getchar] - (unsigned char)0xff, (unsigned char)0xd0, // call eax - (unsigned char)0x59, // pop ecx - (unsigned char)0x88, (unsigned char)0x04, (unsigned char)0x0f // mov [edi+ecx],al - ); - break; - case '[': - SPROUT_ASSERT_MSG(loop != loop_last, "loop overflow"); - *loop++ = idx; // push index to stack - idx += ::write_bytes( - out, - (unsigned char)0x80, (unsigned char)0x3c, (unsigned char)0x0f, (unsigned char)0x00, // cmp byte [edi+ecx],0 - (unsigned char)0x0f, (unsigned char)0x84, // jz (immediately after corresponding ']') - (unsigned char)0xde, (unsigned char)0xad, (unsigned char)0xbe, (unsigned char)0xef // (set address later) - ); - break; - case ']': - { - SPROUT_ASSERT_MSG(loop != loop_first, "missing '['"); - int idx_loop = *--loop; - idx += ::write_bytes( - out, - (unsigned char)0xe9, (std::int32_t)(idx_loop - (idx + 5)) // jmp idx_loop - ); - auto out_loop = out_first + (idx_loop + 6); - ::write_bytes( - out_loop, - (std::int32_t)(idx - (idx_loop + 10)) // (address) - ); - break; - } - } - SPROUT_ASSERT_MSG(idx <= (int)::bin_size - 32, "buffer overflow"); - } - - SPROUT_ASSERT_MSG(loop == loop_first, "missing ']'"); - - // end - idx += ::write_bytes( - out, - (unsigned char)0x5f, // pop edi - (unsigned char)0x31, (unsigned char)0xc0, // xor eax, eax - (unsigned char)0xc3 // ret - ); - - return idx; -} - -// -// build -// -template -SPROUT_CXX14_CONSTEXPR std::size_t -build(InputIterator first, InputIterator last, RandomAccessIterator& out) { - std::size_t n = 0; - n += ::write_pe_header(out, n); // header - n += ::write_idata(out, n); // .idata section - n += ::compile(first, last, out); // compile - return n; -} - - -SPROUT_CXX14_CONSTEXPR sprout::sub_array > -build_brainfuck() { - sprout::array bin{{}}; - auto out = sprout::begin(bin); - auto n = ::build<::loop_limit>(sprout::begin(::source), sprout::end(::source), out); - return sprout::sub_copy(bin, 0, n); -} - -int main(int argc, char* argv[]) { - SPROUT_CXX14_CONSTEXPR auto bin = ::build_brainfuck(); - - char const* filename = argc >= 2 ? argv[1] - : "a.exe" - ; - std::ofstream ofs(filename); - if (!ofs) { - std::cout - << "could not open file" << std::endl - ; - return -1; - } - sprout::range::copy(bin, std::ostreambuf_iterator(ofs)); -} diff --git a/dsp/lib/sprout/example/csv/main.cpp b/dsp/lib/sprout/example/csv/main.cpp deleted file mode 100644 index 61dc14d..0000000 --- a/dsp/lib/sprout/example/csv/main.cpp +++ /dev/null @@ -1,145 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -template -struct csv_parser_settings { -public: - typedef Char value_type; -private: - value_type delim_; - value_type quote_; - value_type escape_; -public: - constexpr csv_parser_settings(value_type delim = Char(','), value_type quote = Char('\"')) - : delim_(delim), quote_(quote), escape_(quote) - {} - constexpr csv_parser_settings(value_type delim, value_type quote, value_type escape) - : delim_(delim), quote_(quote), escape_(escape) - {} - constexpr value_type delimiter() const { - return delim_; - } - constexpr value_type quote() const { - return quote_; - } - constexpr value_type escape() const { - return escape_; - } -}; - -template -constexpr sprout::array_sub_t, L> -parse_csv(String const& src, csv_parser_settings settings = csv_parser_settings()) { - typedef typename String::value_type value_type; - sprout::array_sub_t, L> result = {}; - result.window(0, 1); - result.back().window(0, 0); - bool same_escape = settings.quote() == settings.escape(); - auto delimiters = sprout::make_string(settings.delimiter(), value_type('\r'), value_type('\n')); - auto first = sprout::begin(src), last = sprout::end(src); - while (first != last) { - if (*first == settings.quote()) { - // quoted element - ++first; - auto end_quote = sprout::find(first, last, settings.quote()); - while (true) { - if (end_quote == last) { - throw std::runtime_error("end quote not found"); - } - auto next = sprout::next(end_quote); - if (!same_escape && first != end_quote) { - auto prev = sprout::prev(end_quote); - if (*prev == settings.escape()) { - // escaped quote - end_quote = sprout::find(next, last, settings.quote()); - continue; - } - } - if (next != last) { - if (*next == settings.quote()) { - // escaped quote - ++next; - end_quote = sprout::find(next, last, settings.quote()); - continue; - } - if (!sprout::any_of_equal(delimiters.begin(), delimiters.end(), *next)) { - throw std::runtime_error("invalid quote"); - } - if (*next == value_type('\r') && sprout::next(next) != last && *sprout::next(next) == value_type('\n')) { - ++next; - } - } - result.back().push_back( - ResultString(sprout::addressof(*first), sprout::distance(first, end_quote)) - ); - first = next; - break; - } - } else { - // no quoted element - auto next = sprout::find_first_of(first, last, delimiters.begin(), delimiters.end()); - if (next != last) { - if (*next == value_type('\r') && sprout::next(next) != last && *sprout::next(next) == value_type('\n')) { - ++next; - } - } - result.back().push_back( - ResultString(sprout::addressof(*first), sprout::distance(first, next)) - ); - first = next; - } - if (first != last) { - if ((*first == value_type('\r') || *first == value_type('\n')) && sprout::next(first) != last) { - result.offset(0, 1); - result.back().window(0, 0); - } - ++first; - } - } - return result; -} - -#include -#include - -int main() { - using namespace sprout::udl; - constexpr auto settings = csv_parser_settings(',', '\"', '\\'); - constexpr auto src = R"( -(no quoted),a,b,c -(quoted),"d","e","f" -(escaped),"""g""","\"h\"","""i""" -(comma),"j,k","l,m","n,o" -(new line),"p -q","r -s","t -u" -)"_sv; - constexpr auto result = parse_csv<16, 16>(src, settings); - for (auto const& field : result) { - for (auto const& elem : field) { - std::cout - << elem << std::endl - << "----" << std::endl - ; - } - std::cout - << "----------------------------------------" << std::endl - ; - } -} diff --git a/dsp/lib/sprout/example/darkroom/two_spheres-1024x1024.png b/dsp/lib/sprout/example/darkroom/two_spheres-1024x1024.png deleted file mode 100644 index 8be9214..0000000 Binary files a/dsp/lib/sprout/example/darkroom/two_spheres-1024x1024.png and /dev/null differ diff --git a/dsp/lib/sprout/example/darkroom/two_spheres-2048x2048.png b/dsp/lib/sprout/example/darkroom/two_spheres-2048x2048.png deleted file mode 100644 index a38d87e..0000000 Binary files a/dsp/lib/sprout/example/darkroom/two_spheres-2048x2048.png and /dev/null differ diff --git a/dsp/lib/sprout/example/darkroom/two_spheres-8192x8192.png b/dsp/lib/sprout/example/darkroom/two_spheres-8192x8192.png deleted file mode 100644 index 19634c5..0000000 Binary files a/dsp/lib/sprout/example/darkroom/two_spheres-8192x8192.png and /dev/null differ diff --git a/dsp/lib/sprout/example/darkroom/two_spheres.hpp b/dsp/lib/sprout/example/darkroom/two_spheres.hpp deleted file mode 100644 index eeb8ad0..0000000 --- a/dsp/lib/sprout/example/darkroom/two_spheres.hpp +++ /dev/null @@ -1,90 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef EXAMPLE_DARKROOM_TWO_SPHERES_HPP -#define EXAMPLE_DARKROOM_TWO_SPHERES_HPP - -#include -#include - -namespace darkcult { - using namespace sprout::darkroom; - // - // object - // - SPROUT_STATIC_CONSTEXPR auto object = objects::make_object_list( - objects::make_aa_plane( - objects::aa_plane_direction::y, - -2.0, - materials::make_plaid_material_image( - colors::rgb_f(1.0, 0.0, 0.0), colors::rgb_f(1.0, 1.0, 0.0), - 0.0, 0.0 - ) - ), - objects::make_sphere( - coords::vector3d(-1.0, 0.5, 7.5), - 2.5, - materials::make_uniform_material_image( - colors::rgb_f(0.0, 0.0, 1.0), 0.2 - ) - ), - objects::make_sphere( - coords::vector3d(1.0, -1.0, 4.0), - 1.0, - materials::make_uniform_material_image( - colors::rgb_f(0.0, 1.0, 0.0), 0.2 - ) - ) - ); - // - // light - // - SPROUT_STATIC_CONSTEXPR auto light = lights::make_light_list( - lights::make_point_light( - coords::vector3d(-3.0, 5.0, 0.0), - colors::rgb_f(7.0, 7.0, 7.0) - ), - lights::make_parallel_light( - coords::vector3d(0.0, 1.0, 0.0), - colors::rgb_f(0.1, 0.1, 0.1) - ), - lights::make_parallel_light( - coords::vector3d(1.0, 0.5, 0.0), - colors::rgb_f(0.1, 0.1, 0.1) - ), - lights::make_parallel_light( - coords::vector3d(-1.0, 0.5, 0.0), - colors::rgb_f(0.1, 0.1, 0.1) - ), - lights::make_parallel_light( - coords::vector3d(0.0, 0.5, 1.0), - colors::rgb_f(0.1, 0.1, 0.1) - ), - lights::make_parallel_light( - coords::vector3d(0.0, 0.5, -1.0), - colors::rgb_f(0.1, 0.1, 0.1) - ) - ); - // - // camera - // - SPROUT_STATIC_CONSTEXPR auto camera = cameras::make_simple_camera( - sprout::math::root_three() / 2 - ); - // - // renderer - // - SPROUT_STATIC_CONSTEXPR auto renderer = renderers::make_whitted_style( - renderers::make_uniform_color(colors::rgb_f(0.0, 0.0, 0.0)) - ); - // - // raytracer - // - SPROUT_STATIC_CONSTEXPR auto raytracer = tracers::make_raytracer(); -} // namespace darkcult - -#endif // #ifndef EXAMPLE_DARKROOM_TWO_SPHERES_HPP diff --git a/dsp/lib/sprout/example/fizzbuzz/main.cpp b/dsp/lib/sprout/example/fizzbuzz/main.cpp deleted file mode 100644 index 7b29943..0000000 --- a/dsp/lib/sprout/example/fizzbuzz/main.cpp +++ /dev/null @@ -1,81 +0,0 @@ -// -// Sprout C++ Library -// -// Copyright (c) 2012 -// bolero-MURAKAMI : http://d.hatena.ne.jp/boleros/ -// osyo-manga : http://d.hatena.ne.jp/osyo-manga/ -// -// Readme: -// https://github.com/bolero-MURAKAMI/Sprout/blob/master/README -// -// License: -// Boost Software License - Version 1.0 -// -// -#include - -struct fizzbuzz{ - typedef sprout::string<12> result_type; - - constexpr result_type - operator()(int n) const { - return n % 15 == 0 ? "FizzBuzz" - : n % 3 == 0 ? "Fizz" - : n % 5 == 0 ? "Buzz" - : sprout::to_string(n); - } -}; - -// -// Test -// -static_assert(fizzbuzz()( 1) == "1", ""); -static_assert(fizzbuzz()( 2) == "2", ""); -static_assert(fizzbuzz()( 3) == "Fizz", ""); -static_assert(fizzbuzz()( 5) == "Buzz", ""); -static_assert(fizzbuzz()(15) == "FizzBuzz", ""); - - - -#include -#include -#include -#include - -int -main(){ - typedef fizzbuzz::result_type string; - - // - // Sequence [1..15] - // - constexpr auto source = sprout::iota >(1); - - // - // Transform to FizzBuzz - // - constexpr auto result = sprout::transform >( - sprout::begin(source), - sprout::end(source), - fizzbuzz() - ); - - // - // Check result - // - constexpr auto fizzbuzz_result = sprout::make_array( - "1", "2", "Fizz", "4", "Buzz", - "Fizz", "7", "8", "Fizz", "Buzz", - "11", "Fizz", "13", "14", "FizzBuzz" - ); - // Equal result sequence - static_assert(result == fizzbuzz_result, ""); - - // - // Output - // - for (auto&& str : result) { - std::cout << str << ", "; - } - std::cout << std::endl; -} diff --git a/dsp/lib/sprout/example/hanoi/main.cpp b/dsp/lib/sprout/example/hanoi/main.cpp deleted file mode 100644 index 6447821..0000000 --- a/dsp/lib/sprout/example/hanoi/main.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ - -#include -#include -#include -#include -#include -#include -#include - -// -// hanoi -// -template< - std::size_t N, typename Id, - typename sprout::enabler_if<(N == 0)>::type = sprout::enabler -> -SPROUT_CONSTEXPR sprout::array, 0> -hanoi(Id, Id, Id) { - return sprout::array, 0>{{}}; -} -template< - std::size_t N, typename Id, - typename sprout::enabler_if<(N != 0)>::type = sprout::enabler -> -SPROUT_CONSTEXPR sprout::array, sprout::static_pow2m1::value> -hanoi(Id a, Id b, Id c) { - typedef sprout::tuple type; - return sprout::append_back( - sprout::push_back(hanoi(a, c, b), type(a, b, N)), - hanoi(c, b, a) - ); -} - -#include - -int main() { - constexpr auto answer = hanoi<8>('a', 'b', 'c'); - for (auto const& e : answer) { - std::cout << "disk " << sprout::get<2>(e) << ": " << sprout::get<0>(e) << " -> " << sprout::get<1>(e) << std::endl; - } -} diff --git a/dsp/lib/sprout/example/inv_fizzbuzz/main.cpp b/dsp/lib/sprout/example/inv_fizzbuzz/main.cpp deleted file mode 100644 index db48eaa..0000000 --- a/dsp/lib/sprout/example/inv_fizzbuzz/main.cpp +++ /dev/null @@ -1,96 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ - -#include -#include -#include -#include -#include -#include -#include - -static constexpr auto token_table = sprout::make_array >( - "Fizz", "Buzz", "Fizz", "Fizz", "Buzz", "Fizz", "FizzBuzz", - "Fizz", "Buzz", "Fizz", "Fizz", "Buzz", "Fizz" - ); -static constexpr auto index_table = sprout::make_array( - 3, 5, 6, 9, 10, 12, 15, - 18, 20, 21, 24, 25, 27 - ); - -template -constexpr sprout::pair -inv_fizzbuzz_impl(ForwardRange const& rng, Difference found) { - return found == sprout::size(token_table) ? sprout::pair{0, 0} - : sprout::pair{ - index_table[found], - sprout::size(rng) / 7 * 15 + index_table[found + sprout::size(rng) % 7 - 1] - } - ; -} -template -constexpr sprout::pair -inv_fizzbuzz(ForwardRange const& rng) { - return sprout::size(rng) <= 7 - || (sprout::size(sprout::range::find_end(rng, rng | sprout::adaptors::taken(7))) == 7 + sprout::size(rng) % 7 - && sprout::range::equal( - rng | sprout::adaptors::taken(sprout::size(rng) % 7), - rng | sprout::adaptors::dropped(sprout::size(rng) - sprout::size(rng) % 7) - ) - ) - ? inv_fizzbuzz_impl( - rng, - sprout::size(sprout::range::search(token_table, rng | sprout::adaptors::taken(7))) - ) - : sprout::pair{0, 0} - ; -} - -#include - -template -void print(ForwardRange const& input, Pair const& answer) { - std::cout << "input : "; - for (auto const& e : input) { - std::cout << e << ' '; - } - std::cout << std::endl; - std::cout << "answer: (" << answer.first << ',' << answer.second << ')' << std::endl; -} - -int main() { - { - constexpr auto input = sprout::make_array >( - "Fizz", "FizzBuzz", "Fizz", "Buzz" - ); - constexpr auto answer = inv_fizzbuzz(input); - - static_assert(answer.first == 12 && answer.second == 20, "answer is (12,20)"); - print(input, answer); - } - { - constexpr auto input = sprout::make_array >( - "FizzBuzz", "Fizz", "Buzz", "Fizz", "Fizz", "Buzz", "Fizz", - "FizzBuzz", "Fizz", "Buzz", "Fizz", "Fizz", "Buzz", "Fizz", - "FizzBuzz", "Fizz", "Buzz" - ); - constexpr auto answer = inv_fizzbuzz(input); - - static_assert(answer.first == 15 && answer.second == 50, "answer is (15,50)"); - print(input, answer); - } - { - constexpr auto input = sprout::make_array >( - "Fizz", "FizzBuzz", "Buzz" - ); - constexpr auto answer = inv_fizzbuzz(input); - - static_assert(answer.first == 0 && answer.second == 0, "answer is (0,0)"); - print(input, answer); - } -} diff --git a/dsp/lib/sprout/example/lifegame/main.cpp b/dsp/lib/sprout/example/lifegame/main.cpp deleted file mode 100644 index 12f018c..0000000 --- a/dsp/lib/sprout/example/lifegame/main.cpp +++ /dev/null @@ -1,222 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ - -#include -#include -#include -#include -#include -#include -#include - -// -// next_cell -// -template -inline SPROUT_CONSTEXPR Value -next_cell(Value const& val, Size n) { - return val ? n == 2 || n == 3 : n == 3; -} -template -inline SPROUT_CONSTEXPR typename sprout::container_traits::value_type>::value_type -next_cell(Container const& cont, Difference1 i, Difference2 j) { - return i == 0 - // +---- - // | o x - // | x x - ? j == 0 - ? ::next_cell( - cont[i][j], - 0 - + cont[i][j + 1] - + cont[i + 1][j] + cont[i + 1][j + 1] - ) - // ----+ - // x o | - // x x | - : j == static_cast(sprout::size(cont[i]) - 1) - ? ::next_cell( - cont[i][j], - 0 - + cont[i][j - 1] - + cont[i + 1][j - 1] + cont[i + 1][j] - ) - // ----- - // x o x - // x x x - : ::next_cell( - cont[i][j], - 0 - + cont[i][j - 1] + cont[i][j + 1] - + cont[i + 1][j - 1] + cont[i + 1][j] + cont[i + 1][j + 1] - ) - : i == static_cast(sprout::size(cont) - 1) - // | x x - // | o x - // +---- - ? j == 0 - ? ::next_cell( - cont[i][j], - 0 - + cont[i - 1][j] + cont[i - 1][j + 1] - + cont[i][j + 1] - ) - // x x | - // x o | - // ----+ - : j == static_cast(sprout::size(cont[i]) - 1) - ? ::next_cell( - cont[i][j], - 0 - + cont[i - 1][j - 1] + cont[i - 1][j] - + cont[i][j - 1] - ) - // x x x - // x o x - // ----- - : ::next_cell( - cont[i][j], - 0 - + cont[i - 1][j - 1] + cont[i - 1][j] + cont[i - 1][j + 1] - + cont[i][j - 1] + cont[i][j + 1] - ) - // | x x - // | o x - // | x x - : j == 0 - ? ::next_cell( - cont[i][j], - 0 - + cont[i - 1][j] + cont[i - 1][j + 1] - + cont[i][j + 1] - + cont[i + 1][j] + cont[i + 1][j + 1]) - // x x | - // x o | - // x x | - : j == static_cast(sprout::size(cont[i]) - 1) - ? ::next_cell( - cont[i][j], - 0 - + cont[i - 1][j - 1] + cont[i - 1][j] - + cont[i][j - 1] - + cont[i + 1][j - 1] + cont[i + 1][j] - ) - // x x x - // x o x - // x x x - : ::next_cell( - cont[i][j], - 0 - + cont[i - 1][j - 1] + cont[i - 1][j] + cont[i - 1][j + 1] - + cont[i][j - 1] + cont[i][j + 1] - + cont[i + 1][j - 1] + cont[i + 1][j] + cont[i + 1][j + 1] - ) - ; -} - -namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::value_type - next_cells_2(Container const& cont, sprout::index_t i, sprout::index_tuple) { - return sprout::remake::value_type>( - cont[i], sprout::size(cont[i]), - ::next_cell(cont, i, Js)... - ); - } - template - inline SPROUT_CONSTEXPR Container - next_cells_1(Container const& cont, sprout::index_tuple) { - return sprout::remake( - cont, sprout::size(cont), - detail::next_cells_2(cont, Is, sprout::container_indexes::value_type>::make())... - ); - } -} // namespace detail -// -// next_cells -// -template -inline SPROUT_CONSTEXPR Container -next_cells(Container const& cont) { - return detail::next_cells_1(cont, sprout::container_indexes::make()); -} - -namespace detail { - struct gen_next_cells { - public: - template - SPROUT_CONSTEXPR sprout::pair - operator()(Container const& cont) const { - return sprout::pair(cont, ::next_cells(cont)); - } - }; -} // namespace detail -// -// next_cells -// -template -inline SPROUT_CONSTEXPR sprout::array -next_cells(Container const& cont) { - return sprout::fixed::unfold >(detail::gen_next_cells(), cont); -} - -#include -#include - -#define BOARD_WIDTH 16 -#define BOARD_HEIGHT 16 -#define BOARD_COUNT 16 - -template -void SPROUT_NON_CONSTEXPR print_board(Container const& board) { - testspr::print_hl(); - for (auto&& line : board) { - for (auto&& cell : line) { - testspr::print(cell ? "" : "", ' '); - } - testspr::print_ln(); - } -} - -int main() { - typedef sprout::array, BOARD_HEIGHT> board_type; - - // cell initial placement -#define _ 0 -#define X 1 - SPROUT_STATIC_CONSTEXPR board_type board0 - {{ - {{_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _}}, - {{_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _}}, - {{_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _}}, - {{_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _}}, - {{_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _}}, - {{_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _}}, - {{_, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _}}, - {{_, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _}}, - {{_, _, _, _, X, X, _, _, X, X, X, _, _, _, _, _}}, - {{_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _}}, - {{_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _}}, - {{_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _}}, - {{_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _}}, - {{_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _}}, - {{_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _}}, - {{_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _}} - }}; -#undef _ -#undef X - - // execute life game - SPROUT_STATIC_CONSTEXPR auto boards = ::next_cells(board0); - - // print - for (auto&& board : boards) { - ::print_board(board); - } -} - diff --git a/dsp/lib/sprout/example/perceptron/g3.cpp b/dsp/lib/sprout/example/perceptron/g3.cpp deleted file mode 100644 index 2c57415..0000000 --- a/dsp/lib/sprout/example/perceptron/g3.cpp +++ /dev/null @@ -1,204 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// -// perceptron -// -template -class perceptron { -public: - typedef FloatType value_type; -private: - struct worker { - public: - // in - sprout::array xi1; - sprout::array xi2; - sprout::array xi3; - // out - sprout::array o1; - sprout::array o2; - sprout::array o3; - }; -private: - // error - sprout::array d2; - sprout::array d3; - // weight - sprout::array w1; - sprout::array w2; -private: - // forward propagation - template - SPROUT_CXX14_CONSTEXPR void - forward_propagation(ForwardIterator in_first, ForwardIterator in_last, worker& work) const { - // forward propagation with input layer - sprout::copy(in_first, in_last, sprout::begin(work.xi1)); - work.xi1[In] = 1; - sprout::copy(sprout::begin(work.xi1), sprout::end(work.xi1), sprout::begin(work.o1)); - - // forward propagation with hidden layer - for (std::size_t i = 0; i != Hid; ++i) { - work.xi2[i] = 0; - for (std::size_t j = 0; j != In + 1; ++j) { - work.xi2[i] += w1[j * Hid + i] * work.o1[j]; - } - work.o2[i] = sprout::math::sigmoid(work.xi2[i]); - } - work.o2[Hid] = 1; - - // forward propagation with output layer - for (std::size_t i = 0; i != Hid; ++i) { - work.xi3[i] = 0; - for (std::size_t j = 0; j != In + 1; ++j) { - work.xi3[i] += w2[j * Out + i] * work.o2[j]; - } - work.o3[i] = work.xi3[i]; - } - } -public: - template - explicit SPROUT_CXX14_CONSTEXPR perceptron(RandomNumberGenerator& rng) - : d2{{}}, d3{{}} - , w1(sprout::random::generate_array<(In + 1) * Hid>(rng, sprout::random::uniform_01())) - , w2(sprout::random::generate_array<(Hid + 1) * Out>(rng, sprout::random::uniform_01())) - {} - - // training of neural network - // [in_first, in_last) : training data (N*In elements) - // [t_first, t_last) : training data (N elements) - template - SPROUT_CXX14_CONSTEXPR void - train( - ForwardIterator1 in_first, ForwardIterator1 in_last, - ForwardIterator2 t_first, ForwardIterator2 t_last, - std::size_t repeat = 1000, value_type eta = value_type(0.1) - ) - { - SPROUT_ASSERT(sprout::distance(in_first, in_last) % In == 0); - SPROUT_ASSERT(sprout::distance(in_first, in_last) / In == sprout::distance(t_first, t_last)); - - worker work{}; - for (std::size_t times = 0; times != repeat; ++times) { - ForwardIterator1 in_it = in_first; - ForwardIterator2 t_it = t_first; - for (; in_it != in_last; sprout::advance(in_it, In), ++t_it) { - // forward propagation - forward_propagation(in_it, sprout::next(in_it, In), work); - - // error calculation of output layer - for (std::size_t i = 0; i != Out; ++i) { - d3[i] = *t_it == i ? work.o3[i] - 1 - : work.o3[i] - ; - } - - // weight update of output layer - for (std::size_t i = 0; i != Hid + 1; ++i) { - for (std::size_t j = 0; j != Out; ++j) { - w2[i * Out + j] -= eta * d3[j] * work.o2[i]; - } - } - - // error calculation of hidden layer - for (std::size_t i = 0; i != Hid + 1; ++i) { - d2[i] = 0; - for (std::size_t j = 0; j != Out; ++j) { - d2[i] += w2[i * Out + j] * d3[j]; - } - d2[i] *= sprout::math::d_sigmoid(work.xi2[i]); - } - - // weight update of hidden layer - for (std::size_t i = 0; i != In + 1; ++i) { - for (std::size_t j = 0; j != Hid; ++j) { - w1[i * Hid + j] -= eta * d2[j] * work.o1[i]; - } - } - } - } - } - - // returns to predict the most likely class for a given data - template - SPROUT_CXX14_CONSTEXPR std::size_t - predict(ForwardIterator in_first, ForwardIterator in_last) const { - SPROUT_ASSERT(sprout::distance(in_first, in_last) == In); - - worker work{}; - - // prediction by forward propagation - forward_propagation(in_first, in_last, work); - - // determining a class which output is maximum - return sprout::distance( - sprout::begin(work.o3), - sprout::max_element(sprout::begin(work.o3), sprout::end(work.o3)) - ); - } -}; - -#include -#include -#include -#include -#include -#include - -// training data -SPROUT_CONSTEXPR auto train_data = sprout::make_array( -# include "g3_train.csv" - ); -// teaching data -SPROUT_CONSTEXPR auto teach_data = sprout::make_array( -# include "g3_teach.csv" - ); - -SPROUT_STATIC_ASSERT(train_data.size() % 2 == 0); -SPROUT_STATIC_ASSERT(train_data.size() / 2 == teach_data.size()); - -// generate a trained perceptron -template -SPROUT_CXX14_CONSTEXPR ::perceptron -make_trained_perceptron() { - // random number generator - sprout::random::default_random_engine rng(SPROUT_UNIQUE_SEED); - - // perceptron - ::perceptron per(rng); - - // training - per.train( - train_data.begin(), train_data.end(), - teach_data.begin(), teach_data.end(), - 500, 0.1 - ); - - return per; -} - -int main() { - // generate a Perceptron (input 2, hidden 3, output 3) - SPROUT_CXX14_CONSTEXPR auto per = ::make_trained_perceptron(); - - // print results - for (auto it = train_data.begin(), last = train_data.end(); it != last; it += 2) { - std::cout << per.predict(it, it + 2) << std::endl; - } -} diff --git a/dsp/lib/sprout/example/perceptron/g3_teach.csv b/dsp/lib/sprout/example/perceptron/g3_teach.csv deleted file mode 100644 index 5f91873..0000000 --- a/dsp/lib/sprout/example/perceptron/g3_teach.csv +++ /dev/null @@ -1,150 +0,0 @@ -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2 \ No newline at end of file diff --git a/dsp/lib/sprout/example/perceptron/g3_train.csv b/dsp/lib/sprout/example/perceptron/g3_train.csv deleted file mode 100644 index c06eb7f..0000000 --- a/dsp/lib/sprout/example/perceptron/g3_train.csv +++ /dev/null @@ -1,150 +0,0 @@ -2.838248351,-0.057127115, -2.84962986,0.30984388, -3.069875981,0.069165603, -3.033612564,0.237406102, -3.162983688,0.334387888, -3.163831849,0.487806933, -2.997986085,0.061074061, -2.799347441,0.521430032, -3.137156052,0.266393153, -2.870857355,0.267030982, -3.43934308,0.170662698, -3.035552198,0.251317543, -2.886143741,0.125075012, -3.221207099,0.030493356, -3.050238248,0.007279557, -2.733967037,0.235668448, -3.153513285,-0.010778431, -3.311231402,0.343325475, -3.298245949,0.065857414, -2.848633328,-0.004875479, -3.070831457,0.211490982, -3.082296334,0.31440897, -2.926651655,-0.240105616, -2.978054772,0.031004937, -2.35804167,0.239646483, -2.645048857,0.159202643, -2.932230736,0.104463435, -3.097376157,0.150507296, -2.803701193,0.042427284, -2.953016638,0.28536828, -3.238065532,0.346081055, -3.055363223,0.445131721, -2.995237434,0.507696093, -2.804479208,0.245421171, -3.012620496,0.384000638, -2.693411745,0.312330244, -3.102647408,0.343171956, -2.896095389,0.036131501, -2.718440992,-0.01150165, -3.170644375,-0.048096883, -3.011452172,0.034237664, -2.872141309,0.07956016, -2.865096742,0.008559658, -3.279540305,0.302372444, -2.860098477,0.218127155, -3.269317565,-0.005452377, -2.761144719,0.673127168, -2.902469266,0.361832898, -3.11297363,0.50154383, -3.025469568,0.399359182, -1.840419314,1.905105063, -1.813240148,1.813839986, -2.123039813,2.132571185, -1.946192802,1.773046885, -1.969172236,1.805946832, -2.258526017,2.000929535, -1.864577066,2.144995459, -1.911976195,1.980181472, -1.990154583,1.919792502, -1.769958598,2.105082362, -2.137578551,1.944983188, -2.00439482,2.072477229, -1.927718762,1.694463892, -2.207399026,1.851368634, -2.495855335,1.78918729, -2.381107166,2.040305134, -2.05695779,2.458901875, -1.782594688,2.133780789, -1.731552089,2.188212826, -2.157206504,2.249346956, -1.771550549,2.388096625, -1.596862739,2.285617904, -2.116253295,2.043142148, -2.051844958,2.033143301, -1.931137989,2.426396361, -1.987232105,2.141510946, -2.265269874,2.150853439, -2.02603174,2.015376408, -1.95851869,2.243280964, -1.982323697,1.705817048, -1.860646929,2.221006838, -1.850979072,2.557549512, -2.245893751,1.851633418, -2.225460386,1.968984437, -1.817314806,2.306871098, -2.28503916,2.17214804, -1.974994597,1.313041694, -2.031987688,2.022965729, -1.953448998,2.261221941, -2.167787963,1.950768156, -2.325040244,1.533073263, -2.058211845,2.0741863, -2.047485215,2.098219462, -2.228436076,1.920446541, -2.328240588,2.151820146, -2.183441475,2.292478916, -2.190968871,1.760135247, -1.716478165,2.078620922, -1.878852022,2.15075819, -2.085908678,1.96855502, -3.798041143,2.925502959, -3.835899929,3.004531872, -4.226026357,3.327911034, -3.63906142,2.764149093, -3.976732793,2.765971538, -3.735533807,3.211145512, -3.922743188,2.908463331, -3.959548749,2.92371863, -4.220358369,3.028638464, -4.101855229,2.860451817, -3.818023487,2.821524824, -3.944688596,3.251039443, -4.139128323,3.071444196, -4.235165326,3.005161748, -4.248626372,3.156115907, -4.286060111,2.952368701, -3.974827507,2.924985851, -4.140698521,3.042471222, -4.31503215,2.912715016, -4.41718743,3.064667839, -3.894120786,2.925224863, -3.953199682,3.348500249, -4.003736459,3.208318835, -3.872457887,2.698607706, -3.889675701,2.977512411, -3.974258739,3.099134752, -3.794940485,3.033699013, -4.020409067,2.784229901, -3.851699136,2.972769818, -4.036060943,3.066876325, -3.590866735,3.062219821, -4.000802489,3.041278742, -4.254308353,2.947953876, -4.126845488,2.932815351, -3.807568611,3.145490402, -3.986677755,3.378673859, -3.684653059,2.911221769, -4.259008498,3.374089548, -3.964802614,3.072807287, -4.182124157,2.950380575, -3.948426268,3.099264552, -4.053742816,3.195652528, -4.340603893,3.098341999, -3.67327559,2.94969907, -4.043519751,3.311304107, -3.97872525,3.166533465, -4.19023214,2.962725503, -3.717902917,2.75762358, -3.947763326,3.160248033, -4.191797555,3.162533112 \ No newline at end of file diff --git a/dsp/lib/sprout/example/zundoko/main.cpp b/dsp/lib/sprout/example/zundoko/main.cpp deleted file mode 100644 index 2d546bd..0000000 --- a/dsp/lib/sprout/example/zundoko/main.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static constexpr std::size_t default_limit = 96; - -static constexpr std::size_t len = std::extent::type>::value - 1; -typedef sprout::string string_type; - -template -struct zundoko_result - : public sprout::algorithm::results::join > -{}; -template -using zundoko_result_t = typename zundoko_result::type; - -inline constexpr string_type -zundoko(bool c) { - return !c - ? sprout::to_string("Y") - : sprout::to_string("hR") - ; -} - -template< - std::size_t N, typename Rnd, typename... Args, - typename sprout::enabler_if::type = sprout::enabler -> -inline constexpr typename zundoko_result::type -kiyoshi(Rnd const&, bool, bool, bool, bool, Args...) { - return throw std::runtime_error("exceeded"), sprout::any_convertible(); -} -template< - std::size_t N, typename Rnd, typename... Args, - typename sprout::enabler_if<(sizeof...(Args) + 6 <= N)>::type = sprout::enabler -> -inline constexpr typename zundoko_result::type -kiyoshi(Rnd const& rnd, bool e0, bool e1, bool e2, bool e3, Args... args) { - return !sprout::generated_value(rnd) || e0 || e1 || e2 || e3 - ? kiyoshi(sprout::next_generator(rnd)(), sprout::generated_value(rnd), e0, e1, e2, e3, args...) - : sprout::algorithm::join( - sprout::array{{ - sprout::to_string("LEEVI"), - zundoko(sprout::generated_value(rnd)), - zundoko(e0), zundoko(e1), zundoko(e2), zundoko(e3), - zundoko(args)... - }} - | sprout::adaptors::reversed - ) - ; -} -template< - std::size_t N, typename Rnd, typename... Args, - typename sprout::enabler_if<(sizeof...(Args) + 1 <= 4)>::type = sprout::enabler -> -inline constexpr typename zundoko_result::type -kiyoshi(Rnd const& rnd, Args... args) { - return kiyoshi(sprout::next_generator(rnd)(), sprout::generated_value(rnd), args...); -} - -template< - std::size_t N = default_limit, typename URNG, - typename sprout::enabler_if::value>::type = sprout::enabler -> -inline constexpr typename zundoko_result::type -zundoko_kiyoshi(URNG const& urng) { - return kiyoshi(sprout::bernoulli_distribution<>()(urng)); -} -template -inline constexpr typename zundoko_result::type -zundoko_kiyoshi(std::size_t seed) { - return zundoko_kiyoshi(sprout::default_random_engine(seed)); -} -template -inline constexpr typename zundoko_result::type -zundoko_kiyoshi() { - return zundoko_kiyoshi(SPROUT_UNIQUE_SEED); -} - -#include - -int main() { - constexpr auto result = zundoko_kiyoshi(); - std::cout << result; -} diff --git a/dsp/lib/sprout/libs/CMakeLists.txt b/dsp/lib/sprout/libs/CMakeLists.txt deleted file mode 100644 index d388d2e..0000000 --- a/dsp/lib/sprout/libs/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ -subdirs( algorithm array bitset cstring net optional random string tuple utility variant weed ) -#subdirs( algorithm array bitset cstring optional random ) diff --git a/dsp/lib/sprout/libs/algorithm/CMakeLists.txt b/dsp/lib/sprout/libs/algorithm/CMakeLists.txt deleted file mode 100644 index a32dcf2..0000000 --- a/dsp/lib/sprout/libs/algorithm/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -subdirs( test ) diff --git a/dsp/lib/sprout/libs/algorithm/test/CMakeLists.txt b/dsp/lib/sprout/libs/algorithm/test/CMakeLists.txt deleted file mode 100644 index 24c83b4..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/CMakeLists.txt +++ /dev/null @@ -1,330 +0,0 @@ -add_executable( libs_algorithm_test_adjacent_find adjacent_find.cpp ) -set_target_properties( libs_algorithm_test_adjacent_find PROPERTIES OUTPUT_NAME "adjacent_find" ) -add_test( libs_algorithm_test_adjacent_find adjacent_find ) -add_executable( libs_algorithm_test_algorithm algorithm.cpp ) -set_target_properties( libs_algorithm_test_algorithm PROPERTIES OUTPUT_NAME "algorithm" ) -add_test( libs_algorithm_test_algorithm algorithm ) -add_executable( libs_algorithm_test_all_of all_of.cpp ) -set_target_properties( libs_algorithm_test_all_of PROPERTIES OUTPUT_NAME "all_of" ) -add_test( libs_algorithm_test_all_of all_of ) -add_executable( libs_algorithm_test_all_of_equal all_of_equal.cpp ) -set_target_properties( libs_algorithm_test_all_of_equal PROPERTIES OUTPUT_NAME "all_of_equal" ) -add_test( libs_algorithm_test_all_of_equal all_of_equal ) -add_executable( libs_algorithm_test_any_of any_of.cpp ) -set_target_properties( libs_algorithm_test_any_of PROPERTIES OUTPUT_NAME "any_of" ) -add_test( libs_algorithm_test_any_of any_of ) -add_executable( libs_algorithm_test_any_of_equal any_of_equal.cpp ) -set_target_properties( libs_algorithm_test_any_of_equal PROPERTIES OUTPUT_NAME "any_of_equal" ) -add_test( libs_algorithm_test_any_of_equal any_of_equal ) -add_executable( libs_algorithm_test_binary_search binary_search.cpp ) -set_target_properties( libs_algorithm_test_binary_search PROPERTIES OUTPUT_NAME "binary_search" ) -add_test( libs_algorithm_test_binary_search binary_search ) -add_executable( libs_algorithm_test_bogo_sort bogo_sort.cpp ) -set_target_properties( libs_algorithm_test_bogo_sort PROPERTIES OUTPUT_NAME "bogo_sort" ) -add_test( libs_algorithm_test_bogo_sort bogo_sort ) -add_executable( libs_algorithm_test_bogo_sort_result bogo_sort_result.cpp ) -set_target_properties( libs_algorithm_test_bogo_sort_result PROPERTIES OUTPUT_NAME "bogo_sort_result" ) -add_test( libs_algorithm_test_bogo_sort_result bogo_sort_result ) -add_executable( libs_algorithm_test_bozo_sort bozo_sort.cpp ) -set_target_properties( libs_algorithm_test_bozo_sort PROPERTIES OUTPUT_NAME "bozo_sort" ) -add_test( libs_algorithm_test_bozo_sort bozo_sort ) -add_executable( libs_algorithm_test_bozo_sort_result bozo_sort_result.cpp ) -set_target_properties( libs_algorithm_test_bozo_sort_result PROPERTIES OUTPUT_NAME "bozo_sort_result" ) -add_test( libs_algorithm_test_bozo_sort_result bozo_sort_result ) -add_executable( libs_algorithm_test_clamp clamp.cpp ) -set_target_properties( libs_algorithm_test_clamp PROPERTIES OUTPUT_NAME "clamp" ) -add_test( libs_algorithm_test_clamp clamp ) -add_executable( libs_algorithm_test_clamp_range clamp_range.cpp ) -set_target_properties( libs_algorithm_test_clamp_range PROPERTIES OUTPUT_NAME "clamp_range" ) -add_test( libs_algorithm_test_clamp_range clamp_range ) -add_executable( libs_algorithm_test_clamp_range_copy clamp_range_copy.cpp ) -set_target_properties( libs_algorithm_test_clamp_range_copy PROPERTIES OUTPUT_NAME "clamp_range_copy" ) -add_test( libs_algorithm_test_clamp_range_copy clamp_range_copy ) -add_executable( libs_algorithm_test_copy copy.cpp ) -set_target_properties( libs_algorithm_test_copy PROPERTIES OUTPUT_NAME "copy" ) -add_test( libs_algorithm_test_copy copy ) -add_executable( libs_algorithm_test_copy_backward copy_backward.cpp ) -set_target_properties( libs_algorithm_test_copy_backward PROPERTIES OUTPUT_NAME "copy_backward" ) -add_test( libs_algorithm_test_copy_backward copy_backward ) -add_executable( libs_algorithm_test_copy_if copy_if.cpp ) -set_target_properties( libs_algorithm_test_copy_if PROPERTIES OUTPUT_NAME "copy_if" ) -add_test( libs_algorithm_test_copy_if copy_if ) -add_executable( libs_algorithm_test_copy_n copy_n.cpp ) -set_target_properties( libs_algorithm_test_copy_n PROPERTIES OUTPUT_NAME "copy_n" ) -add_test( libs_algorithm_test_copy_n copy_n ) -add_executable( libs_algorithm_test_copy_until copy_until.cpp ) -set_target_properties( libs_algorithm_test_copy_until PROPERTIES OUTPUT_NAME "copy_until" ) -add_test( libs_algorithm_test_copy_until copy_until ) -add_executable( libs_algorithm_test_copy_while copy_while.cpp ) -set_target_properties( libs_algorithm_test_copy_while PROPERTIES OUTPUT_NAME "copy_while" ) -add_test( libs_algorithm_test_copy_while copy_while ) -add_executable( libs_algorithm_test_count count.cpp ) -set_target_properties( libs_algorithm_test_count PROPERTIES OUTPUT_NAME "count" ) -add_test( libs_algorithm_test_count count ) -add_executable( libs_algorithm_test_count_if count_if.cpp ) -set_target_properties( libs_algorithm_test_count_if PROPERTIES OUTPUT_NAME "count_if" ) -add_test( libs_algorithm_test_count_if count_if ) -add_executable( libs_algorithm_test_equal equal.cpp ) -set_target_properties( libs_algorithm_test_equal PROPERTIES OUTPUT_NAME "equal" ) -add_test( libs_algorithm_test_equal equal ) -add_executable( libs_algorithm_test_equal_range equal_range.cpp ) -set_target_properties( libs_algorithm_test_equal_range PROPERTIES OUTPUT_NAME "equal_range" ) -add_test( libs_algorithm_test_equal_range equal_range ) -#add_executable( libs_algorithm_test_fill fill.cpp ) -#set_target_properties( libs_algorithm_test_fill PROPERTIES OUTPUT_NAME "fill" ) -#add_test( libs_algorithm_test_fill fill ) -add_executable( libs_algorithm_test_fill_n fill_n.cpp ) -set_target_properties( libs_algorithm_test_fill_n PROPERTIES OUTPUT_NAME "fill_n" ) -add_test( libs_algorithm_test_fill_n fill_n ) -add_executable( libs_algorithm_test_find find.cpp ) -set_target_properties( libs_algorithm_test_find PROPERTIES OUTPUT_NAME "find" ) -add_test( libs_algorithm_test_find find ) -add_executable( libs_algorithm_test_find_end find_end.cpp ) -set_target_properties( libs_algorithm_test_find_end PROPERTIES OUTPUT_NAME "find_end" ) -add_test( libs_algorithm_test_find_end find_end ) -add_executable( libs_algorithm_test_find_first_of find_first_of.cpp ) -set_target_properties( libs_algorithm_test_find_first_of PROPERTIES OUTPUT_NAME "find_first_of" ) -add_test( libs_algorithm_test_find_first_of find_first_of ) -add_executable( libs_algorithm_test_find_if find_if.cpp ) -set_target_properties( libs_algorithm_test_find_if PROPERTIES OUTPUT_NAME "find_if" ) -add_test( libs_algorithm_test_find_if find_if ) -add_executable( libs_algorithm_test_find_if_not find_if_not.cpp ) -set_target_properties( libs_algorithm_test_find_if_not PROPERTIES OUTPUT_NAME "find_if_not" ) -add_test( libs_algorithm_test_find_if_not find_if_not ) -add_executable( libs_algorithm_test_generate generate.cpp ) -set_target_properties( libs_algorithm_test_generate PROPERTIES OUTPUT_NAME "generate" ) -add_test( libs_algorithm_test_generate generate ) -add_executable( libs_algorithm_test_generate_n generate_n.cpp ) -set_target_properties( libs_algorithm_test_generate_n PROPERTIES OUTPUT_NAME "generate_n" ) -add_test( libs_algorithm_test_generate_n generate_n ) -add_executable( libs_algorithm_test_includes includes.cpp ) -set_target_properties( libs_algorithm_test_includes PROPERTIES OUTPUT_NAME "includes" ) -add_test( libs_algorithm_test_includes includes ) -add_executable( libs_algorithm_test_inplace_merge inplace_merge.cpp ) -set_target_properties( libs_algorithm_test_inplace_merge PROPERTIES OUTPUT_NAME "inplace_merge" ) -add_test( libs_algorithm_test_inplace_merge inplace_merge ) -add_executable( libs_algorithm_test_is_decreasing is_decreasing.cpp ) -set_target_properties( libs_algorithm_test_is_decreasing PROPERTIES OUTPUT_NAME "is_decreasing" ) -add_test( libs_algorithm_test_is_decreasing is_decreasing ) -add_executable( libs_algorithm_test_is_heap is_heap.cpp ) -set_target_properties( libs_algorithm_test_is_heap PROPERTIES OUTPUT_NAME "is_heap" ) -add_test( libs_algorithm_test_is_heap is_heap ) -add_executable( libs_algorithm_test_is_heap_until is_heap_until.cpp ) -set_target_properties( libs_algorithm_test_is_heap_until PROPERTIES OUTPUT_NAME "is_heap_until" ) -add_test( libs_algorithm_test_is_heap_until is_heap_until ) -add_executable( libs_algorithm_test_is_increasing is_increasing.cpp ) -set_target_properties( libs_algorithm_test_is_increasing PROPERTIES OUTPUT_NAME "is_increasing" ) -add_test( libs_algorithm_test_is_increasing is_increasing ) -add_executable( libs_algorithm_test_is_partitioned is_partitioned.cpp ) -set_target_properties( libs_algorithm_test_is_partitioned PROPERTIES OUTPUT_NAME "is_partitioned" ) -add_test( libs_algorithm_test_is_partitioned is_partitioned ) -add_executable( libs_algorithm_test_is_permutation is_permutation.cpp ) -set_target_properties( libs_algorithm_test_is_permutation PROPERTIES OUTPUT_NAME "is_permutation" ) -add_test( libs_algorithm_test_is_permutation is_permutation ) -add_executable( libs_algorithm_test_is_sorted is_sorted.cpp ) -set_target_properties( libs_algorithm_test_is_sorted PROPERTIES OUTPUT_NAME "is_sorted" ) -add_test( libs_algorithm_test_is_sorted is_sorted ) -add_executable( libs_algorithm_test_is_sorted_until is_sorted_until.cpp ) -set_target_properties( libs_algorithm_test_is_sorted_until PROPERTIES OUTPUT_NAME "is_sorted_until" ) -add_test( libs_algorithm_test_is_sorted_until is_sorted_until ) -add_executable( libs_algorithm_test_is_strictly_decreasing is_strictly_decreasing.cpp ) -set_target_properties( libs_algorithm_test_is_strictly_decreasing PROPERTIES OUTPUT_NAME "is_strictly_decreasing" ) -add_test( libs_algorithm_test_is_strictly_decreasing is_strictly_decreasing ) -add_executable( libs_algorithm_test_is_strictly_increasing is_strictly_increasing.cpp ) -set_target_properties( libs_algorithm_test_is_strictly_increasing PROPERTIES OUTPUT_NAME "is_strictly_increasing" ) -add_test( libs_algorithm_test_is_strictly_increasing is_strictly_increasing ) -add_executable( libs_algorithm_test_lexicographical_compare lexicographical_compare.cpp ) -set_target_properties( libs_algorithm_test_lexicographical_compare PROPERTIES OUTPUT_NAME "lexicographical_compare" ) -add_test( libs_algorithm_test_lexicographical_compare lexicographical_compare ) -add_executable( libs_algorithm_test_lower_bound lower_bound.cpp ) -set_target_properties( libs_algorithm_test_lower_bound PROPERTIES OUTPUT_NAME "lower_bound" ) -add_test( libs_algorithm_test_lower_bound lower_bound ) -add_executable( libs_algorithm_test_make_heap make_heap.cpp ) -set_target_properties( libs_algorithm_test_make_heap PROPERTIES OUTPUT_NAME "make_heap" ) -add_test( libs_algorithm_test_make_heap make_heap ) -add_executable( libs_algorithm_test_make_partial_heap make_partial_heap.cpp ) -set_target_properties( libs_algorithm_test_make_partial_heap PROPERTIES OUTPUT_NAME "make_partial_heap" ) -add_test( libs_algorithm_test_make_partial_heap make_partial_heap ) -add_executable( libs_algorithm_test_max max.cpp ) -set_target_properties( libs_algorithm_test_max PROPERTIES OUTPUT_NAME "max" ) -add_test( libs_algorithm_test_max max ) -add_executable( libs_algorithm_test_max_element max_element.cpp ) -set_target_properties( libs_algorithm_test_max_element PROPERTIES OUTPUT_NAME "max_element" ) -add_test( libs_algorithm_test_max_element max_element ) -add_executable( libs_algorithm_test_merge merge.cpp ) -set_target_properties( libs_algorithm_test_merge PROPERTIES OUTPUT_NAME "merge" ) -add_test( libs_algorithm_test_merge merge ) -add_executable( libs_algorithm_test_min min.cpp ) -set_target_properties( libs_algorithm_test_min PROPERTIES OUTPUT_NAME "min" ) -add_test( libs_algorithm_test_min min ) -add_executable( libs_algorithm_test_min_element min_element.cpp ) -set_target_properties( libs_algorithm_test_min_element PROPERTIES OUTPUT_NAME "min_element" ) -add_test( libs_algorithm_test_min_element min_element ) -add_executable( libs_algorithm_test_minmax minmax.cpp ) -set_target_properties( libs_algorithm_test_minmax PROPERTIES OUTPUT_NAME "minmax" ) -add_test( libs_algorithm_test_minmax minmax ) -add_executable( libs_algorithm_test_minmax_element minmax_element.cpp ) -set_target_properties( libs_algorithm_test_minmax_element PROPERTIES OUTPUT_NAME "minmax_element" ) -add_test( libs_algorithm_test_minmax_element minmax_element ) -add_executable( libs_algorithm_test_mismatch mismatch.cpp ) -set_target_properties( libs_algorithm_test_mismatch PROPERTIES OUTPUT_NAME "mismatch" ) -add_test( libs_algorithm_test_mismatch mismatch ) -add_executable( libs_algorithm_test_modifying modifying.cpp ) -set_target_properties( libs_algorithm_test_modifying PROPERTIES OUTPUT_NAME "modifying" ) -add_test( libs_algorithm_test_modifying modifying ) -add_executable( libs_algorithm_test_next_permutation next_permutation.cpp ) -set_target_properties( libs_algorithm_test_next_permutation PROPERTIES OUTPUT_NAME "next_permutation" ) -add_test( libs_algorithm_test_next_permutation next_permutation ) -add_executable( libs_algorithm_test_non_modifying non_modifying.cpp ) -set_target_properties( libs_algorithm_test_non_modifying PROPERTIES OUTPUT_NAME "non_modifying" ) -add_test( libs_algorithm_test_non_modifying non_modifying ) -add_executable( libs_algorithm_test_none_of none_of.cpp ) -set_target_properties( libs_algorithm_test_none_of PROPERTIES OUTPUT_NAME "none_of" ) -add_test( libs_algorithm_test_none_of none_of ) -add_executable( libs_algorithm_test_none_of_equal none_of_equal.cpp ) -set_target_properties( libs_algorithm_test_none_of_equal PROPERTIES OUTPUT_NAME "none_of_equal" ) -add_test( libs_algorithm_test_none_of_equal none_of_equal ) -add_executable( libs_algorithm_test_nth_element nth_element.cpp ) -set_target_properties( libs_algorithm_test_nth_element PROPERTIES OUTPUT_NAME "nth_element" ) -add_test( libs_algorithm_test_nth_element nth_element ) -add_executable( libs_algorithm_test_one_of one_of.cpp ) -set_target_properties( libs_algorithm_test_one_of PROPERTIES OUTPUT_NAME "one_of" ) -add_test( libs_algorithm_test_one_of one_of ) -add_executable( libs_algorithm_test_one_of_equal one_of_equal.cpp ) -set_target_properties( libs_algorithm_test_one_of_equal PROPERTIES OUTPUT_NAME "one_of_equal" ) -add_test( libs_algorithm_test_one_of_equal one_of_equal ) -add_executable( libs_algorithm_test_partial_sort partial_sort.cpp ) -set_target_properties( libs_algorithm_test_partial_sort PROPERTIES OUTPUT_NAME "partial_sort" ) -add_test( libs_algorithm_test_partial_sort partial_sort ) -add_executable( libs_algorithm_test_partition partition.cpp ) -set_target_properties( libs_algorithm_test_partition PROPERTIES OUTPUT_NAME "partition" ) -add_test( libs_algorithm_test_partition partition ) -add_executable( libs_algorithm_test_partition_copy partition_copy.cpp ) -set_target_properties( libs_algorithm_test_partition_copy PROPERTIES OUTPUT_NAME "partition_copy" ) -add_test( libs_algorithm_test_partition_copy partition_copy ) -add_executable( libs_algorithm_test_partition_point partition_point.cpp ) -set_target_properties( libs_algorithm_test_partition_point PROPERTIES OUTPUT_NAME "partition_point" ) -add_test( libs_algorithm_test_partition_point partition_point ) -add_executable( libs_algorithm_test_pop_heap pop_heap.cpp ) -set_target_properties( libs_algorithm_test_pop_heap PROPERTIES OUTPUT_NAME "pop_heap" ) -add_test( libs_algorithm_test_pop_heap pop_heap ) -add_executable( libs_algorithm_test_prev_permutation prev_permutation.cpp ) -set_target_properties( libs_algorithm_test_prev_permutation PROPERTIES OUTPUT_NAME "prev_permutation" ) -add_test( libs_algorithm_test_prev_permutation prev_permutation ) -add_executable( libs_algorithm_test_push_heap push_heap.cpp ) -set_target_properties( libs_algorithm_test_push_heap PROPERTIES OUTPUT_NAME "push_heap" ) -add_test( libs_algorithm_test_push_heap push_heap ) -add_executable( libs_algorithm_test_random_swap random_swap.cpp ) -set_target_properties( libs_algorithm_test_random_swap PROPERTIES OUTPUT_NAME "random_swap" ) -add_test( libs_algorithm_test_random_swap random_swap ) -add_executable( libs_algorithm_test_random_swap_result random_swap_result.cpp ) -set_target_properties( libs_algorithm_test_random_swap_result PROPERTIES OUTPUT_NAME "random_swap_result" ) -add_test( libs_algorithm_test_random_swap_result random_swap_result ) -add_executable( libs_algorithm_test_recurrence recurrence.cpp ) -set_target_properties( libs_algorithm_test_recurrence PROPERTIES OUTPUT_NAME "recurrence" ) -add_test( libs_algorithm_test_recurrence recurrence ) -add_executable( libs_algorithm_test_recurrence_n recurrence_n.cpp ) -set_target_properties( libs_algorithm_test_recurrence_n PROPERTIES OUTPUT_NAME "recurrence_n" ) -add_test( libs_algorithm_test_recurrence_n recurrence_n ) -add_executable( libs_algorithm_test_remove remove.cpp ) -set_target_properties( libs_algorithm_test_remove PROPERTIES OUTPUT_NAME "remove" ) -add_test( libs_algorithm_test_remove remove ) -add_executable( libs_algorithm_test_remove_copy remove_copy.cpp ) -set_target_properties( libs_algorithm_test_remove_copy PROPERTIES OUTPUT_NAME "remove_copy" ) -add_test( libs_algorithm_test_remove_copy remove_copy ) -add_executable( libs_algorithm_test_remove_copy_if remove_copy_if.cpp ) -set_target_properties( libs_algorithm_test_remove_copy_if PROPERTIES OUTPUT_NAME "remove_copy_if" ) -add_test( libs_algorithm_test_remove_copy_if remove_copy_if ) -add_executable( libs_algorithm_test_remove_if remove_if.cpp ) -set_target_properties( libs_algorithm_test_remove_if PROPERTIES OUTPUT_NAME "remove_if" ) -add_test( libs_algorithm_test_remove_if remove_if ) -add_executable( libs_algorithm_test_replace replace.cpp ) -set_target_properties( libs_algorithm_test_replace PROPERTIES OUTPUT_NAME "replace" ) -add_test( libs_algorithm_test_replace replace ) -add_executable( libs_algorithm_test_replace_copy replace_copy.cpp ) -set_target_properties( libs_algorithm_test_replace_copy PROPERTIES OUTPUT_NAME "replace_copy" ) -add_test( libs_algorithm_test_replace_copy replace_copy ) -add_executable( libs_algorithm_test_replace_copy_if replace_copy_if.cpp ) -set_target_properties( libs_algorithm_test_replace_copy_if PROPERTIES OUTPUT_NAME "replace_copy_if" ) -add_test( libs_algorithm_test_replace_copy_if replace_copy_if ) -add_executable( libs_algorithm_test_replace_if replace_if.cpp ) -set_target_properties( libs_algorithm_test_replace_if PROPERTIES OUTPUT_NAME "replace_if" ) -add_test( libs_algorithm_test_replace_if replace_if ) -add_executable( libs_algorithm_test_reverse reverse.cpp ) -set_target_properties( libs_algorithm_test_reverse PROPERTIES OUTPUT_NAME "reverse" ) -add_test( libs_algorithm_test_reverse reverse ) -add_executable( libs_algorithm_test_reverse_copy reverse_copy.cpp ) -set_target_properties( libs_algorithm_test_reverse_copy PROPERTIES OUTPUT_NAME "reverse_copy" ) -add_test( libs_algorithm_test_reverse_copy reverse_copy ) -add_executable( libs_algorithm_test_rotate rotate.cpp ) -set_target_properties( libs_algorithm_test_rotate PROPERTIES OUTPUT_NAME "rotate" ) -add_test( libs_algorithm_test_rotate rotate ) -add_executable( libs_algorithm_test_rotate_copy rotate_copy.cpp ) -set_target_properties( libs_algorithm_test_rotate_copy PROPERTIES OUTPUT_NAME "rotate_copy" ) -add_test( libs_algorithm_test_rotate_copy rotate_copy ) -add_executable( libs_algorithm_test_search search.cpp ) -set_target_properties( libs_algorithm_test_search PROPERTIES OUTPUT_NAME "search" ) -add_test( libs_algorithm_test_search search ) -add_executable( libs_algorithm_test_search_n search_n.cpp ) -set_target_properties( libs_algorithm_test_search_n PROPERTIES OUTPUT_NAME "search_n" ) -add_test( libs_algorithm_test_search_n search_n ) -add_executable( libs_algorithm_test_set_difference set_difference.cpp ) -set_target_properties( libs_algorithm_test_set_difference PROPERTIES OUTPUT_NAME "set_difference" ) -add_test( libs_algorithm_test_set_difference set_difference ) -add_executable( libs_algorithm_test_set_intersection set_intersection.cpp ) -set_target_properties( libs_algorithm_test_set_intersection PROPERTIES OUTPUT_NAME "set_intersection" ) -add_test( libs_algorithm_test_set_intersection set_intersection ) -add_executable( libs_algorithm_test_set_symmetric_difference set_symmetric_difference.cpp ) -set_target_properties( libs_algorithm_test_set_symmetric_difference PROPERTIES OUTPUT_NAME "set_symmetric_difference" ) -add_test( libs_algorithm_test_set_symmetric_difference set_symmetric_difference ) -add_executable( libs_algorithm_test_set_union set_union.cpp ) -set_target_properties( libs_algorithm_test_set_union PROPERTIES OUTPUT_NAME "set_union" ) -add_test( libs_algorithm_test_set_union set_union ) -add_executable( libs_algorithm_test_shuffle shuffle.cpp ) -set_target_properties( libs_algorithm_test_shuffle PROPERTIES OUTPUT_NAME "shuffle" ) -add_test( libs_algorithm_test_shuffle shuffle ) -add_executable( libs_algorithm_test_shuffle_result shuffle_result.cpp ) -set_target_properties( libs_algorithm_test_shuffle_result PROPERTIES OUTPUT_NAME "shuffle_result" ) -add_test( libs_algorithm_test_shuffle_result shuffle_result ) -add_executable( libs_algorithm_test_sort sort.cpp ) -set_target_properties( libs_algorithm_test_sort PROPERTIES OUTPUT_NAME "sort" ) -add_test( libs_algorithm_test_sort sort ) -add_executable( libs_algorithm_test_sort_heap sort_heap.cpp ) -set_target_properties( libs_algorithm_test_sort_heap PROPERTIES OUTPUT_NAME "sort_heap" ) -add_test( libs_algorithm_test_sort_heap sort_heap ) -add_executable( libs_algorithm_test_stable_partition stable_partition.cpp ) -set_target_properties( libs_algorithm_test_stable_partition PROPERTIES OUTPUT_NAME "stable_partition" ) -add_test( libs_algorithm_test_stable_partition stable_partition ) -add_executable( libs_algorithm_test_stable_partition_copy stable_partition_copy.cpp ) -set_target_properties( libs_algorithm_test_stable_partition_copy PROPERTIES OUTPUT_NAME "stable_partition_copy" ) -add_test( libs_algorithm_test_stable_partition_copy stable_partition_copy ) -add_executable( libs_algorithm_test_stable_sort stable_sort.cpp ) -set_target_properties( libs_algorithm_test_stable_sort PROPERTIES OUTPUT_NAME "stable_sort" ) -add_test( libs_algorithm_test_stable_sort stable_sort ) -add_executable( libs_algorithm_test_swap_element swap_element.cpp ) -set_target_properties( libs_algorithm_test_swap_element PROPERTIES OUTPUT_NAME "swap_element" ) -add_test( libs_algorithm_test_swap_element swap_element ) -add_executable( libs_algorithm_test_swap_element_copy swap_element_copy.cpp ) -set_target_properties( libs_algorithm_test_swap_element_copy PROPERTIES OUTPUT_NAME "swap_element_copy" ) -add_test( libs_algorithm_test_swap_element_copy swap_element_copy ) -add_executable( libs_algorithm_test_transform transform.cpp ) -set_target_properties( libs_algorithm_test_transform PROPERTIES OUTPUT_NAME "transform" ) -add_test( libs_algorithm_test_transform transform ) -add_executable( libs_algorithm_test_tristate_lexicographical_compare tristate_lexicographical_compare.cpp ) -set_target_properties( libs_algorithm_test_tristate_lexicographical_compare PROPERTIES OUTPUT_NAME "tristate_lexicographical_compare" ) -add_test( libs_algorithm_test_tristate_lexicographical_compare tristate_lexicographical_compare ) -add_executable( libs_algorithm_test_unfold unfold.cpp ) -set_target_properties( libs_algorithm_test_unfold PROPERTIES OUTPUT_NAME "unfold" ) -add_test( libs_algorithm_test_unfold unfold ) -add_executable( libs_algorithm_test_unfold_n unfold_n.cpp ) -set_target_properties( libs_algorithm_test_unfold_n PROPERTIES OUTPUT_NAME "unfold_n" ) -add_test( libs_algorithm_test_unfold_n unfold_n ) -add_executable( libs_algorithm_test_unique unique.cpp ) -set_target_properties( libs_algorithm_test_unique PROPERTIES OUTPUT_NAME "unique" ) -add_test( libs_algorithm_test_unique unique ) -add_executable( libs_algorithm_test_unique_copy unique_copy.cpp ) -set_target_properties( libs_algorithm_test_unique_copy PROPERTIES OUTPUT_NAME "unique_copy" ) -add_test( libs_algorithm_test_unique_copy unique_copy ) -add_executable( libs_algorithm_test_upper_bound upper_bound.cpp ) -set_target_properties( libs_algorithm_test_upper_bound PROPERTIES OUTPUT_NAME "upper_bound" ) -add_test( libs_algorithm_test_upper_bound upper_bound ) diff --git a/dsp/lib/sprout/libs/algorithm/test/adjacent_find.cpp b/dsp/lib/sprout/libs/algorithm/test/adjacent_find.cpp deleted file mode 100644 index f9f87cb..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/adjacent_find.cpp +++ /dev/null @@ -1,126 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_ADJACENT_FIND_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_ADJACENT_FIND_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_adjacent_find_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 5, 6, 6, 7, 8, 9, 10}}; - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::adjacent_find( - sprout::begin(arr1), - sprout::end(arr1) - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 4); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::adjacent_find( - sprout::begin(arr1), - sprout::begin(arr1) + 5 - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::adjacent_find( - sprout::begin(arr1), - sprout::end(arr1), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 4); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::adjacent_find( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::adjacent_find( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 4); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::adjacent_find( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::adjacent_find( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)), - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 4); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::adjacent_find( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5), - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::adjacent_find( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 4); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::adjacent_find( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::adjacent_find( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 4); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::adjacent_find( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_adjacent_find_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_ADJACENT_FIND_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/algorithm.cpp b/dsp/lib/sprout/libs/algorithm/test/algorithm.cpp deleted file mode 100644 index b1badbb..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/algorithm.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_ALGORITHM_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_ALGORITHM_CPP - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_CPP_INCLUDE_DISABLE_SPROUT_LIBS_ALGORITHM_TEST_ALGORITHM_CPP -# define TESTSPR_CPP_INCLUDE -#endif - -#include "./non_modifying.cpp" -#include "./modifying.cpp" - -#ifdef TESTSPR_CPP_INCLUDE_DISABLE_SPROUT_LIBS_ALGORITHM_TEST_ALGORITHM_CPP -# undef TESTSPR_CPP_INCLUDE -#endif - -namespace testspr { - static void algorithm_test() { - testspr::algorithm_non_modifying_test(); - testspr::algorithm_modifying_test(); - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_ALGORITHM_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/all_of.cpp b/dsp/lib/sprout/libs/algorithm/test/all_of.cpp deleted file mode 100644 index a2f00ff..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/all_of.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_ALL_OF_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_ALL_OF_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_all_of_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::all_of( - sprout::begin(arr1), - sprout::end(arr1), - testspr::less_than(11) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::all_of( - sprout::begin(arr1), - sprout::end(arr1), - testspr::less_than(6) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::all_of( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - testspr::less_than(11) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::all_of( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - testspr::less_than(6) - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::all_of( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::less_than(11) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::all_of( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::less_than(6) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::all_of( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::less_than(11) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::all_of( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::less_than(6) - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::all_of( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::less_than(11) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::all_of( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::less_than(6) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::all_of( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::less_than(11) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::all_of( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::less_than(6) - ); - TESTSPR_BOTH_ASSERT(result); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_all_of_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_ALL_OF_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/all_of_equal.cpp b/dsp/lib/sprout/libs/algorithm/test/all_of_equal.cpp deleted file mode 100644 index 26c6cee..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/all_of_equal.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_ALL_OF_EQUAL_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_ALL_OF_EQUAL_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_all_of_equal_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 1, 1, 1, 1, 10, 10, 10, 10, 10}}; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::all_of_equal( - sprout::begin(arr1), - sprout::end(arr1), - 1 - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::all_of_equal( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - 1 - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::all_of_equal( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - 1 - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::all_of_equal( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - 1 - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::all_of_equal( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - 1 - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::all_of_equal( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - 1 - ); - TESTSPR_BOTH_ASSERT(result); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_all_of_equal_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_ALL_OF_EQUAL_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/any_of.cpp b/dsp/lib/sprout/libs/algorithm/test/any_of.cpp deleted file mode 100644 index 52dc8ed..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/any_of.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_ANY_OF_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_ANY_OF_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_any_of_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::any_of( - sprout::begin(arr1), - sprout::end(arr1), - testspr::greater_than(5) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::any_of( - sprout::begin(arr1), - sprout::end(arr1), - testspr::greater_than(10) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::any_of( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - testspr::greater_than(5) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::any_of( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - testspr::greater_than(10) - ); - TESTSPR_BOTH_ASSERT(!result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::any_of( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::greater_than(5) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::any_of( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::greater_than(10) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::any_of( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::greater_than(5) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::any_of( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::greater_than(10) - ); - TESTSPR_BOTH_ASSERT(!result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::any_of( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::greater_than(5) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::any_of( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::greater_than(10) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::any_of( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::greater_than(5) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::any_of( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::greater_than(10) - ); - TESTSPR_BOTH_ASSERT(!result); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_any_of_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_ANY_OF_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/any_of_equal.cpp b/dsp/lib/sprout/libs/algorithm/test/any_of_equal.cpp deleted file mode 100644 index b1780d3..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/any_of_equal.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_ANY_OF_EQUAL_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_ANY_OF_EQUAL_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_any_of_equal_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::any_of_equal( - sprout::begin(arr1), - sprout::end(arr1), - 10 - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::any_of_equal( - sprout::begin(arr1), - sprout::end(arr1), - 11 - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::any_of_equal( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - 10 - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::any_of_equal( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - 11 - ); - TESTSPR_BOTH_ASSERT(!result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::any_of_equal( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - 10 - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::any_of_equal( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - 11 - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::any_of_equal( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - 10 - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::any_of_equal( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - 11 - ); - TESTSPR_BOTH_ASSERT(!result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::any_of_equal( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - 10 - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::any_of_equal( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - 11 - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::any_of_equal( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - 10 - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::any_of_equal( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - 11 - ); - TESTSPR_BOTH_ASSERT(!result); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_any_of_equal_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_ANY_OF_EQUAL_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/binary_search.cpp b/dsp/lib/sprout/libs/algorithm/test/binary_search.cpp deleted file mode 100644 index ab51e09..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/binary_search.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_BINARY_SEARCH_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_BINARY_SEARCH_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_binary_search_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 7, 7, 10}}; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::binary_search( - sprout::begin(arr1), - sprout::end(arr1), - 7 - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::binary_search( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - 7, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(!result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::binary_search( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)), - 7 - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::binary_search( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5), - 7, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(!result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::binary_search( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - 7 - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::binary_search( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - 7, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(!result); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_binary_search_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_BINARY_SEARCH_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/bogo_sort.cpp b/dsp/lib/sprout/libs/algorithm/test/bogo_sort.cpp deleted file mode 100644 index 67ee790..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/bogo_sort.cpp +++ /dev/null @@ -1,262 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_BOGO_SORT_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_BOGO_SORT_CPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_bogo_sort_test() { - using namespace sprout; -#if SPROUT_CLANG_OR_LATER(3, 4, 0) - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{5, 1, 4, 2, 3}}; - - // sort - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::bogo_sort( - arr1, - sprout::random::default_random_engine(SPROUT_UNIQUE_SEED) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 3, 4, 5}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::bogo_sort( - arr1, - sprout::random::default_random_engine(SPROUT_UNIQUE_SEED) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 3, 4, 5}} - )); - } - // sort - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::bogo_sort( - sprout::sub(arr1, 1, 4), - sprout::random::default_random_engine(SPROUT_UNIQUE_SEED) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sorted), - array{{5, 1, 2, 4, 3}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::bogo_sort( - sprout::sub(arr1, 1, 4), - sprout::random::default_random_engine(SPROUT_UNIQUE_SEED) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sorted), - array{{5, 1, 2, 4, 3}} - )); - } - } - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{5, 1, 4, 2, 3}}; - - // sort - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::bogo_sort( - arr1, - sprout::random::default_random_engine(SPROUT_UNIQUE_SEED), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 3, 4, 5}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::bogo_sort( - arr1, - sprout::random::default_random_engine(SPROUT_UNIQUE_SEED), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 3, 4, 5}} - )); - } - // sort - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::bogo_sort( - sprout::sub(arr1, 1, 4), - sprout::random::default_random_engine(SPROUT_UNIQUE_SEED), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sorted), - array{{5, 1, 2, 4, 3}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::bogo_sort( - sprout::sub(arr1, 1, 4), - sprout::random::default_random_engine(SPROUT_UNIQUE_SEED), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sorted), - array{{5, 1, 2, 4, 3}} - )); - } - } -#else - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 4, 2, 3}}; - - // sort - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::bogo_sort( - arr1, - sprout::random::default_random_engine(SPROUT_UNIQUE_SEED) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 3, 4}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::bogo_sort( - arr1, - sprout::random::default_random_engine(SPROUT_UNIQUE_SEED) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 3, 4}} - )); - } - // sort - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::bogo_sort( - sprout::sub(arr1, 1, 3), - sprout::random::default_random_engine(SPROUT_UNIQUE_SEED) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{2, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sorted), - array{{1, 2, 4, 3}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::bogo_sort( - sprout::sub(arr1, 1, 3), - sprout::random::default_random_engine(SPROUT_UNIQUE_SEED) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{2, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sorted), - array{{1, 2, 4, 3}} - )); - } - } - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 4, 2, 3}}; - - // sort - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::bogo_sort( - arr1, - sprout::random::default_random_engine(SPROUT_UNIQUE_SEED), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 3, 4}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::bogo_sort( - arr1, - sprout::random::default_random_engine(SPROUT_UNIQUE_SEED), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 3, 4}} - )); - } - // sort - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::bogo_sort( - sprout::sub(arr1, 1, 3), - sprout::random::default_random_engine(SPROUT_UNIQUE_SEED), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{2, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sorted), - array{{1, 2, 4, 3}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::bogo_sort( - sprout::sub(arr1, 1, 3), - sprout::random::default_random_engine(SPROUT_UNIQUE_SEED), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{2, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sorted), - array{{1, 2, 4, 3}} - )); - } - } -#endif - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_bogo_sort_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_BOGO_SORT_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/bogo_sort_result.cpp b/dsp/lib/sprout/libs/algorithm/test/bogo_sort_result.cpp deleted file mode 100644 index e23e9b3..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/bogo_sort_result.cpp +++ /dev/null @@ -1,346 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_BOGO_SORT_RESULT_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_BOGO_SORT_RESULT_CPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_bogo_sort_result_test() { - using namespace sprout; -#if SPROUT_CLANG_OR_LATER(3, 4, 0) - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{5, 1, 4, 2, 3}}; - SPROUT_STATIC_CONSTEXPR auto g = sprout::random::default_random_engine(SPROUT_UNIQUE_SEED); - - // sort - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::bogo_sort_result( - arr1, - g - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get<0>(sorted), - array{{1, 2, 3, 4, 5}} - )); - SPROUT_STATIC_CONSTEXPR auto sorted2 = sprout::bogo_sort_result( - sprout::get<0>(sorted), - sprout::get<1>(sorted) - ); - TESTSPR_BOTH_ASSERT(sprout::get<1>(sorted) == sprout::get<1>(sorted2)); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::bogo_sort_result( - arr1, - g - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get<0>(sorted), - array{{1, 2, 3, 4, 5}} - )); - SPROUT_STATIC_CONSTEXPR auto sorted2 = sprout::bogo_sort_result( - sprout::get<0>(sorted), - sprout::get<1>(sorted) - ); - TESTSPR_BOTH_ASSERT(sprout::get<1>(sorted) == sprout::get<1>(sorted2)); - } - // sort - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::bogo_sort_result( - sprout::sub(arr1, 1, 4), - g - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get<0>(sorted), - array{{1, 2, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sprout::get<0>(sorted)), - array{{5, 1, 2, 4, 3}} - )); - SPROUT_STATIC_CONSTEXPR auto sorted2 = sprout::bogo_sort_result( - sprout::get<0>(sorted), - sprout::get<1>(sorted) - ); - TESTSPR_BOTH_ASSERT(sprout::get<1>(sorted) == sprout::get<1>(sorted2)); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::bogo_sort_result( - sprout::sub(arr1, 1, 4), - g - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get<0>(sorted), - array{{1, 2, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sprout::get<0>(sorted)), - array{{5, 1, 2, 4, 3}} - )); - SPROUT_STATIC_CONSTEXPR auto sorted2 = sprout::bogo_sort_result( - sprout::get<0>(sorted), - sprout::get<1>(sorted) - ); - TESTSPR_BOTH_ASSERT(sprout::get<1>(sorted) == sprout::get<1>(sorted2)); - } - } - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{5, 1, 4, 2, 3}}; - SPROUT_STATIC_CONSTEXPR auto g = sprout::random::default_random_engine(SPROUT_UNIQUE_SEED); - - // sort - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::bogo_sort_result( - arr1, - g, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get<0>(sorted), - array{{1, 2, 3, 4, 5}} - )); - SPROUT_STATIC_CONSTEXPR auto sorted2 = sprout::bogo_sort_result( - sprout::get<0>(sorted), - sprout::get<1>(sorted) - ); - TESTSPR_BOTH_ASSERT(sprout::get<1>(sorted) == sprout::get<1>(sorted2)); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::bogo_sort_result( - arr1, - g, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get<0>(sorted), - array{{1, 2, 3, 4, 5}} - )); - SPROUT_STATIC_CONSTEXPR auto sorted2 = sprout::bogo_sort_result( - sprout::get<0>(sorted), - sprout::get<1>(sorted) - ); - TESTSPR_BOTH_ASSERT(sprout::get<1>(sorted) == sprout::get<1>(sorted2)); - } - // sort - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::bogo_sort_result( - sprout::sub(arr1, 1, 4), - g, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get<0>(sorted), - array{{1, 2, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sprout::get<0>(sorted)), - array{{5, 1, 2, 4, 3}} - )); - SPROUT_STATIC_CONSTEXPR auto sorted2 = sprout::bogo_sort_result( - sprout::get<0>(sorted), - sprout::get<1>(sorted) - ); - TESTSPR_BOTH_ASSERT(sprout::get<1>(sorted) == sprout::get<1>(sorted2)); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::bogo_sort_result( - sprout::sub(arr1, 1, 4), - g, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get<0>(sorted), - array{{1, 2, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sprout::get<0>(sorted)), - array{{5, 1, 2, 4, 3}} - )); - SPROUT_STATIC_CONSTEXPR auto sorted2 = sprout::bogo_sort_result( - sprout::get<0>(sorted), - sprout::get<1>(sorted) - ); - TESTSPR_BOTH_ASSERT(sprout::get<1>(sorted) == sprout::get<1>(sorted2)); - } - } -#else - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 4, 2, 3}}; - SPROUT_STATIC_CONSTEXPR auto g = sprout::random::default_random_engine(SPROUT_UNIQUE_SEED); - - // sort - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::bogo_sort_result( - arr1, - g - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get<0>(sorted), - array{{1, 2, 3, 4}} - )); - SPROUT_STATIC_CONSTEXPR auto sorted2 = sprout::bogo_sort_result( - sprout::get<0>(sorted), - sprout::get<1>(sorted) - ); - TESTSPR_BOTH_ASSERT(sprout::get<1>(sorted) == sprout::get<1>(sorted2)); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::bogo_sort_result( - arr1, - g - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get<0>(sorted), - array{{1, 2, 3, 4}} - )); - SPROUT_STATIC_CONSTEXPR auto sorted2 = sprout::bogo_sort_result( - sprout::get<0>(sorted), - sprout::get<1>(sorted) - ); - TESTSPR_BOTH_ASSERT(sprout::get<1>(sorted) == sprout::get<1>(sorted2)); - } - // sort - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::bogo_sort_result( - sprout::sub(arr1, 1, 3), - g - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get<0>(sorted), - array{{2, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sprout::get<0>(sorted)), - array{{1, 2, 4, 3}} - )); - SPROUT_STATIC_CONSTEXPR auto sorted2 = sprout::bogo_sort_result( - sprout::get<0>(sorted), - sprout::get<1>(sorted) - ); - TESTSPR_BOTH_ASSERT(sprout::get<1>(sorted) == sprout::get<1>(sorted2)); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::bogo_sort_result( - sprout::sub(arr1, 1, 3), - g - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get<0>(sorted), - array{{2, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sprout::get<0>(sorted)), - array{{1, 2, 4, 3}} - )); - SPROUT_STATIC_CONSTEXPR auto sorted2 = sprout::bogo_sort_result( - sprout::get<0>(sorted), - sprout::get<1>(sorted) - ); - TESTSPR_BOTH_ASSERT(sprout::get<1>(sorted) == sprout::get<1>(sorted2)); - } - } - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 4, 2, 3}}; - SPROUT_STATIC_CONSTEXPR auto g = sprout::random::default_random_engine(SPROUT_UNIQUE_SEED); - - // sort - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::bogo_sort_result( - arr1, - g, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get<0>(sorted), - array{{1, 2, 3, 4}} - )); - SPROUT_STATIC_CONSTEXPR auto sorted2 = sprout::bogo_sort_result( - sprout::get<0>(sorted), - sprout::get<1>(sorted) - ); - TESTSPR_BOTH_ASSERT(sprout::get<1>(sorted) == sprout::get<1>(sorted2)); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::bogo_sort_result( - arr1, - g, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get<0>(sorted), - array{{1, 2, 3, 4}} - )); - SPROUT_STATIC_CONSTEXPR auto sorted2 = sprout::bogo_sort_result( - sprout::get<0>(sorted), - sprout::get<1>(sorted) - ); - TESTSPR_BOTH_ASSERT(sprout::get<1>(sorted) == sprout::get<1>(sorted2)); - } - // sort - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::bogo_sort_result( - sprout::sub(arr1, 1, 3), - g, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get<0>(sorted), - array{{2, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sprout::get<0>(sorted)), - array{{1, 2, 4, 3}} - )); - SPROUT_STATIC_CONSTEXPR auto sorted2 = sprout::bogo_sort_result( - sprout::get<0>(sorted), - sprout::get<1>(sorted) - ); - TESTSPR_BOTH_ASSERT(sprout::get<1>(sorted) == sprout::get<1>(sorted2)); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::bogo_sort_result( - sprout::sub(arr1, 1, 3), - g, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get<0>(sorted), - array{{2, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sprout::get<0>(sorted)), - array{{1, 2, 4, 3}} - )); - SPROUT_STATIC_CONSTEXPR auto sorted2 = sprout::bogo_sort_result( - sprout::get<0>(sorted), - sprout::get<1>(sorted) - ); - TESTSPR_BOTH_ASSERT(sprout::get<1>(sorted) == sprout::get<1>(sorted2)); - } - } -#endif - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_bogo_sort_result_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_BOGO_SORT_RESULT_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/bozo_sort.cpp b/dsp/lib/sprout/libs/algorithm/test/bozo_sort.cpp deleted file mode 100644 index 53dbbcd..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/bozo_sort.cpp +++ /dev/null @@ -1,144 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_BOZO_SORT_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_BOZO_SORT_CPP - -#include -#include -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_bozo_sort_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{5, 1, 4, 2, 3}}; - - // sort - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::bozo_sort( - arr1, - sprout::random::default_random_engine(SPROUT_UNIQUE_SEED) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 3, 4, 5}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::bozo_sort( - arr1, - sprout::random::default_random_engine(SPROUT_UNIQUE_SEED) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 3, 4, 5}} - )); - } - // sort - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::bozo_sort( - sprout::sub(arr1, 1, 4), - sprout::random::default_random_engine(SPROUT_UNIQUE_SEED) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sorted), - array{{5, 1, 2, 4, 3}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::bozo_sort( - sprout::sub(arr1, 1, 4), - sprout::random::default_random_engine(SPROUT_UNIQUE_SEED) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sorted), - array{{5, 1, 2, 4, 3}} - )); - } - } - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{5, 1, 4, 2, 3}}; - - // sort - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::bozo_sort( - arr1, - sprout::random::default_random_engine(SPROUT_UNIQUE_SEED), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 3, 4, 5}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::bozo_sort( - arr1, - sprout::random::default_random_engine(SPROUT_UNIQUE_SEED), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 3, 4, 5}} - )); - } - // sort - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::bozo_sort( - sprout::sub(arr1, 1, 4), - sprout::random::default_random_engine(SPROUT_UNIQUE_SEED), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sorted), - array{{5, 1, 2, 4, 3}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::bozo_sort( - sprout::sub(arr1, 1, 4), - sprout::random::default_random_engine(SPROUT_UNIQUE_SEED), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sorted), - array{{5, 1, 2, 4, 3}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_bozo_sort_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_BOZO_SORT_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/bozo_sort_result.cpp b/dsp/lib/sprout/libs/algorithm/test/bozo_sort_result.cpp deleted file mode 100644 index b12ac1f..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/bozo_sort_result.cpp +++ /dev/null @@ -1,186 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_BOZO_SORT_RESULT_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_BOZO_SORT_RESULT_CPP - -#include -#include -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_bozo_sort_result_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{5, 1, 4, 2, 3}}; - SPROUT_STATIC_CONSTEXPR auto g = sprout::random::default_random_engine(SPROUT_UNIQUE_SEED); - - // sort - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::bozo_sort_result( - arr1, - g - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get<0>(sorted), - array{{1, 2, 3, 4, 5}} - )); - SPROUT_STATIC_CONSTEXPR auto sorted2 = sprout::bozo_sort_result( - sprout::get<0>(sorted), - sprout::get<1>(sorted) - ); - TESTSPR_BOTH_ASSERT(sprout::get<1>(sorted) == sprout::get<1>(sorted2)); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::bozo_sort_result( - arr1, - g - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get<0>(sorted), - array{{1, 2, 3, 4, 5}} - )); - SPROUT_STATIC_CONSTEXPR auto sorted2 = sprout::bozo_sort_result( - sprout::get<0>(sorted), - sprout::get<1>(sorted) - ); - TESTSPR_BOTH_ASSERT(sprout::get<1>(sorted) == sprout::get<1>(sorted2)); - } - // sort - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::bozo_sort_result( - sprout::sub(arr1, 1, 4), - g - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get<0>(sorted), - array{{1, 2, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sprout::get<0>(sorted)), - array{{5, 1, 2, 4, 3}} - )); - SPROUT_STATIC_CONSTEXPR auto sorted2 = sprout::bozo_sort_result( - sprout::get<0>(sorted), - sprout::get<1>(sorted) - ); - TESTSPR_BOTH_ASSERT(sprout::get<1>(sorted) == sprout::get<1>(sorted2)); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::bozo_sort_result( - sprout::sub(arr1, 1, 4), - g - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get<0>(sorted), - array{{1, 2, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sprout::get<0>(sorted)), - array{{5, 1, 2, 4, 3}} - )); - SPROUT_STATIC_CONSTEXPR auto sorted2 = sprout::bozo_sort_result( - sprout::get<0>(sorted), - sprout::get<1>(sorted) - ); - TESTSPR_BOTH_ASSERT(sprout::get<1>(sorted) == sprout::get<1>(sorted2)); - } - } - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{5, 1, 4, 2, 3}}; - SPROUT_STATIC_CONSTEXPR auto g = sprout::random::default_random_engine(SPROUT_UNIQUE_SEED); - - // sort - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::bozo_sort_result( - arr1, - g, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get<0>(sorted), - array{{1, 2, 3, 4, 5}} - )); - SPROUT_STATIC_CONSTEXPR auto sorted2 = sprout::bozo_sort_result( - sprout::get<0>(sorted), - sprout::get<1>(sorted) - ); - TESTSPR_BOTH_ASSERT(sprout::get<1>(sorted) == sprout::get<1>(sorted2)); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::bozo_sort_result( - arr1, - g, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get<0>(sorted), - array{{1, 2, 3, 4, 5}} - )); - SPROUT_STATIC_CONSTEXPR auto sorted2 = sprout::bozo_sort_result( - sprout::get<0>(sorted), - sprout::get<1>(sorted) - ); - TESTSPR_BOTH_ASSERT(sprout::get<1>(sorted) == sprout::get<1>(sorted2)); - } - // sort - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::bozo_sort_result( - sprout::sub(arr1, 1, 4), - g, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get<0>(sorted), - array{{1, 2, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sprout::get<0>(sorted)), - array{{5, 1, 2, 4, 3}} - )); - SPROUT_STATIC_CONSTEXPR auto sorted2 = sprout::bozo_sort_result( - sprout::get<0>(sorted), - sprout::get<1>(sorted) - ); - TESTSPR_BOTH_ASSERT(sprout::get<1>(sorted) == sprout::get<1>(sorted2)); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::bozo_sort_result( - sprout::sub(arr1, 1, 4), - g, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get<0>(sorted), - array{{1, 2, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sprout::get<0>(sorted)), - array{{5, 1, 2, 4, 3}} - )); - SPROUT_STATIC_CONSTEXPR auto sorted2 = sprout::bozo_sort_result( - sprout::get<0>(sorted), - sprout::get<1>(sorted) - ); - TESTSPR_BOTH_ASSERT(sprout::get<1>(sorted) == sprout::get<1>(sorted2)); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_bozo_sort_result_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_BOZO_SORT_RESULT_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/clamp.cpp b/dsp/lib/sprout/libs/algorithm/test/clamp.cpp deleted file mode 100644 index bbfbbc5..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/clamp.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_CLAMP_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_CLAMP_CPP - -#include -#include -#include - -namespace testspr { - static void algorithm_clamp_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{4, 7}}; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::clamp( - 0, - arr1[0], - arr1[1] - ); - TESTSPR_BOTH_ASSERT(result == arr1[0]); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::clamp( - 10, - arr1[0], - arr1[1] - ); - TESTSPR_BOTH_ASSERT(result == arr1[1]); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::clamp( - 5, - arr1[0], - arr1[1] - ); - TESTSPR_BOTH_ASSERT(result == 5); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_clamp_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_CLAMP_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/clamp_range.cpp b/dsp/lib/sprout/libs/algorithm/test/clamp_range.cpp deleted file mode 100644 index 7ea75fa..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/clamp_range.cpp +++ /dev/null @@ -1,150 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_CLAMP_RANGE_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_CLAMP_RANGE_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_clamp_range_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - - // clamp (4 <= x <= 7) - { - SPROUT_STATIC_CONSTEXPR auto clamped = sprout::clamp_range( - arr1, - 4, - 7 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - clamped, - array{{4, 4, 4, 4, 5, 6, 7, 7, 7, 7}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto clamped = sprout::fit::clamp_range( - arr1, - 4, - 7 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - clamped, - array{{4, 4, 4, 4, 5, 6, 7, 7, 7, 7}} - )); - } - // clamp (4 <= x <= 7) - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto clamped = sprout::clamp_range( - sprout::sub(arr1, 2, 8), - 4, - 7 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - clamped, - array{{4, 4, 5, 6, 7, 7}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(clamped), - array{{1, 2, 4, 4, 5, 6, 7, 7, 9, 10}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto clamped = sprout::fit::clamp_range( - sprout::sub(arr1, 2, 8), - 4, - 7 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - clamped, - array{{4, 4, 5, 6, 7, 7}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(clamped), - array{{1, 2, 4, 4, 5, 6, 7, 7, 9, 10}} - )); - } - } - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - - // clamp (4 <= x <= 7) - { - SPROUT_STATIC_CONSTEXPR auto clamped = sprout::clamp_range( - arr1, - 4, - 7, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - clamped, - array{{4, 4, 4, 4, 5, 6, 7, 7, 7, 7}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto clamped = sprout::fit::clamp_range( - arr1, - 4, - 7, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - clamped, - array{{4, 4, 4, 4, 5, 6, 7, 7, 7, 7}} - )); - } - // clamp (4 <= x <= 7) - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto clamped = sprout::clamp_range( - sprout::sub(arr1, 2, 8), - 4, - 7, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - clamped, - array{{4, 4, 5, 6, 7, 7}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(clamped), - array{{1, 2, 4, 4, 5, 6, 7, 7, 9, 10}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto clamped = sprout::fit::clamp_range( - sprout::sub(arr1, 2, 8), - 4, - 7, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - clamped, - array{{4, 4, 5, 6, 7, 7}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(clamped), - array{{1, 2, 4, 4, 5, 6, 7, 7, 9, 10}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_clamp_range_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_CLAMP_RANGE_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/clamp_range_copy.cpp b/dsp/lib/sprout/libs/algorithm/test/clamp_range_copy.cpp deleted file mode 100644 index a9656f2..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/clamp_range_copy.cpp +++ /dev/null @@ -1,228 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_CLAMP_RANGE_COPY_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_CLAMP_RANGE_COPY_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_clamp_range_copy_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{}}; - - // clamp in range [2 .. 8) (4 <= x <= 7) - { - SPROUT_STATIC_CONSTEXPR auto clamped = sprout::clamp_range_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr2, - 4, - 7 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - clamped, - array{{4, 4, 5, 6, 7, 7, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto clamped = sprout::fit::clamp_range_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr2, - 4, - 7 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - clamped, - array{{4, 4, 5, 6, 7, 7}} - )); - } - // clamp in range [2 .. 8) (4 <= x <= 7) - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto clamped = sprout::clamp_range_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr3, - 4, - 7 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - clamped, - array{{4, 4, 5, 6}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto clamped = sprout::fit::clamp_range_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr3, - 4, - 7 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - clamped, - array{{4, 4, 5, 6}} - )); - } - // clamp in range [2 .. 8) (4 <= x <= 7) - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto clamped = sprout::clamp_range_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::sub(arr2, 2, 8), - 4, - 7 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - clamped, - array{{4, 4, 5, 6, 7, 7}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(clamped), - array{{0, 0, 4, 4, 5, 6, 7, 7, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto clamped = sprout::fit::clamp_range_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::sub(arr2, 2, 8), - 4, - 7 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - clamped, - array{{4, 4, 5, 6, 7, 7}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(clamped), - array{{0, 0, 4, 4, 5, 6, 7, 7, 0, 0}} - )); - } - } - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{}}; - - // clamp in range [2 .. 8) (4 <= x <= 7) - { - SPROUT_STATIC_CONSTEXPR auto clamped = sprout::clamp_range_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr2, - 4, - 7, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - clamped, - array{{4, 4, 5, 6, 7, 7, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto clamped = sprout::fit::clamp_range_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr2, - 4, - 7, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - clamped, - array{{4, 4, 5, 6, 7, 7}} - )); - } - // clamp in range [2 .. 8) (4 <= x <= 7) - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto clamped = sprout::clamp_range_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr3, - 4, - 7, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - clamped, - array{{4, 4, 5, 6}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto clamped = sprout::fit::clamp_range_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr3, - 4, - 7, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - clamped, - array{{4, 4, 5, 6}} - )); - } - // clamp in range [2 .. 8) (4 <= x <= 7) - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto clamped = sprout::clamp_range_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::sub(arr2, 2, 8), - 4, - 7, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - clamped, - array{{4, 4, 5, 6, 7, 7}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(clamped), - array{{0, 0, 4, 4, 5, 6, 7, 7, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto clamped = sprout::fit::clamp_range_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::sub(arr2, 2, 8), - 4, - 7, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - clamped, - array{{4, 4, 5, 6, 7, 7}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(clamped), - array{{0, 0, 4, 4, 5, 6, 7, 7, 0, 0}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_clamp_range_copy_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_CLAMP_RANGE_COPY_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/copy.cpp b/dsp/lib/sprout/libs/algorithm/test/copy.cpp deleted file mode 100644 index 0a49e6d..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/copy.cpp +++ /dev/null @@ -1,356 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_COPY_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_COPY_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_copy_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{}}; - - // copy in range [2 .. 8) - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr2 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{3, 4, 5, 6, 7, 8, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::fit::copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr2 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{3, 4, 5, 6, 7, 8}} - )); - } - // copy in range [2 .. 8) - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr3 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{3, 4, 5, 6}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::fit::copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr3 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{3, 4, 5, 6}} - )); - } - // copy in range [2 .. 8) - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::sub(arr2, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{3, 4, 5, 6, 7, 8}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(copied), - array{{0, 0, 3, 4, 5, 6, 7, 8, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::fit::copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::sub(arr2, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{3, 4, 5, 6, 7, 8}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(copied), - array{{0, 0, 3, 4, 5, 6, 7, 8, 0, 0}} - )); - } - - // copy in range [2 .. 8) - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::copy( - testspr::reduce_input(sprout::begin(arr1) + 2), - testspr::reduce_input(sprout::begin(arr1) + 8), - arr2 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{3, 4, 5, 6, 7, 8, 0, 0, 0, 0}} - )); - } - // !!! BUG: sprout::fit::copy implementation requires ForwardIterator -// { -// SPROUT_STATIC_CONSTEXPR auto copied = sprout::fit::copy( -// testspr::reduce_input(sprout::begin(arr1) + 2), -// testspr::reduce_input(sprout::begin(arr1) + 8), -// arr2 -// ); -// TESTSPR_BOTH_ASSERT(testspr::equal( -// copied, -// array{{3, 4, 5, 6, 7, 8}} -// )); -// } - // copy in range [2 .. 8) - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::copy( - testspr::reduce_input(sprout::begin(arr1) + 2), - testspr::reduce_input(sprout::begin(arr1) + 8), - arr3 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{3, 4, 5, 6}} - )); - } - // !!! BUG: sprout::fit::copy implementation requires ForwardIterator -// { -// SPROUT_STATIC_CONSTEXPR auto copied = sprout::fit::copy( -// testspr::reduce_input(sprout::begin(arr1) + 2), -// testspr::reduce_input(sprout::begin(arr1) + 8), -// arr3 -// ); -// TESTSPR_BOTH_ASSERT(testspr::equal( -// copied, -// array{{3, 4, 5, 6}} -// )); -// } - // copy in range [2 .. 8) - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::copy( - testspr::reduce_input(sprout::begin(arr1) + 2), - testspr::reduce_input(sprout::begin(arr1) + 8), - sprout::sub(arr2, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{3, 4, 5, 6, 7, 8}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(copied), - array{{0, 0, 3, 4, 5, 6, 7, 8, 0, 0}} - )); - } - // !!! BUG: sprout::fit::copy implementation requires ForwardIterator -// { -// SPROUT_STATIC_CONSTEXPR auto copied = sprout::fit::copy( -// testspr::reduce_input(sprout::begin(arr1) + 2), -// testspr::reduce_input(sprout::begin(arr1) + 8), -// sprout::sub(arr2, 2, 8) -// ); -// TESTSPR_BOTH_ASSERT(testspr::equal( -// copied, -// array{{3, 4, 5, 6, 7, 8}} -// )); -// TESTSPR_BOTH_ASSERT(testspr::equal( -// sprout::get_internal(copied), -// array{{0, 0, 3, 4, 5, 6, 7, 8, 0, 0}} -// )); -// } - - // copy in range [2 .. 8) - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::copy( - testspr::reduce_forward(sprout::begin(arr1) + 2), - testspr::reduce_forward(sprout::begin(arr1) + 8), - arr2 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{3, 4, 5, 6, 7, 8, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::fit::copy( - testspr::reduce_forward(sprout::begin(arr1) + 2), - testspr::reduce_forward(sprout::begin(arr1) + 8), - arr2 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{3, 4, 5, 6, 7, 8}} - )); - } - // copy in range [2 .. 8) - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::copy( - testspr::reduce_forward(sprout::begin(arr1) + 2), - testspr::reduce_forward(sprout::begin(arr1) + 8), - arr3 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{3, 4, 5, 6}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::fit::copy( - testspr::reduce_forward(sprout::begin(arr1) + 2), - testspr::reduce_forward(sprout::begin(arr1) + 8), - arr3 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{3, 4, 5, 6}} - )); - } - // copy in range [2 .. 8) - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::copy( - testspr::reduce_forward(sprout::begin(arr1) + 2), - testspr::reduce_forward(sprout::begin(arr1) + 8), - sprout::sub(arr2, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{3, 4, 5, 6, 7, 8}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(copied), - array{{0, 0, 3, 4, 5, 6, 7, 8, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::fit::copy( - testspr::reduce_forward(sprout::begin(arr1) + 2), - testspr::reduce_forward(sprout::begin(arr1) + 8), - sprout::sub(arr2, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{3, 4, 5, 6, 7, 8}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(copied), - array{{0, 0, 3, 4, 5, 6, 7, 8, 0, 0}} - )); - } - - // copy in range [2 .. 8) - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::copy( - testspr::reduce_random_access(sprout::begin(arr1) + 2), - testspr::reduce_random_access(sprout::begin(arr1) + 8), - arr2 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{3, 4, 5, 6, 7, 8, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::fit::copy( - testspr::reduce_random_access(sprout::begin(arr1) + 2), - testspr::reduce_random_access(sprout::begin(arr1) + 8), - arr2 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{3, 4, 5, 6, 7, 8}} - )); - } - // copy in range [2 .. 8) - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::copy( - testspr::reduce_random_access(sprout::begin(arr1) + 2), - testspr::reduce_random_access(sprout::begin(arr1) + 8), - arr3 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{3, 4, 5, 6}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::fit::copy( - testspr::reduce_random_access(sprout::begin(arr1) + 2), - testspr::reduce_random_access(sprout::begin(arr1) + 8), - arr3 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{3, 4, 5, 6}} - )); - } - // copy in range [2 .. 8) - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::copy( - testspr::reduce_random_access(sprout::begin(arr1) + 2), - testspr::reduce_random_access(sprout::begin(arr1) + 8), - sprout::sub(arr2, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{3, 4, 5, 6, 7, 8}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(copied), - array{{0, 0, 3, 4, 5, 6, 7, 8, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::fit::copy( - testspr::reduce_random_access(sprout::begin(arr1) + 2), - testspr::reduce_random_access(sprout::begin(arr1) + 8), - sprout::sub(arr2, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{3, 4, 5, 6, 7, 8}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(copied), - array{{0, 0, 3, 4, 5, 6, 7, 8, 0, 0}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_copy_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_COPY_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/copy_backward.cpp b/dsp/lib/sprout/libs/algorithm/test/copy_backward.cpp deleted file mode 100644 index be77409..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/copy_backward.cpp +++ /dev/null @@ -1,113 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_COPY_BACKWARD_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_COPY_BACKWARD_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_copy_backward_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{}}; - - // copy in range [2 .. 8) - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::copy_backward( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr2 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{0, 0, 0, 0, 3, 4, 5, 6, 7, 8}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::fit::copy_backward( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr2 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{3, 4, 5, 6, 7, 8}} - )); - } - // copy in range [2 .. 8) - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::copy_backward( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr3 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{5, 6, 7, 8}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::fit::copy_backward( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr3 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{5, 6, 7, 8}} - )); - } - // copy in range [2 .. 8) - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::copy_backward( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::sub(arr2, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{3, 4, 5, 6, 7, 8}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(copied), - array{{0, 0, 3, 4, 5, 6, 7, 8, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::fit::copy_backward( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::sub(arr2, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{3, 4, 5, 6, 7, 8}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(copied), - array{{0, 0, 3, 4, 5, 6, 7, 8, 0, 0}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_copy_backward_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_COPY_BACKWARD_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/copy_if.cpp b/dsp/lib/sprout/libs/algorithm/test/copy_if.cpp deleted file mode 100644 index 4bafb1f..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/copy_if.cpp +++ /dev/null @@ -1,119 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_COPY_IF_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_COPY_IF_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_copy_if_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{}}; - - // copy odd - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::copy_if( - sprout::begin(arr1), - sprout::end(arr1), - arr2, - testspr::is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{1, 3, 5, 7, 9, 0, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::fit::copy_if( - sprout::begin(arr1), - sprout::end(arr1), - arr2, - testspr::is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{1, 3, 5, 7, 9}} - )); - } - // copy odd - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::copy_if( - sprout::begin(arr1), - sprout::end(arr1), - arr3, - testspr::is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{1, 3, 5, 7}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::fit::copy_if( - sprout::begin(arr1), - sprout::end(arr1), - arr3, - testspr::is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{1, 3, 5, 7}} - )); - } - // copy odd - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::copy_if( - sprout::begin(arr1), - sprout::end(arr1), - sprout::sub(arr2, 2, 8), - testspr::is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{1, 3, 5, 7, 9, 0}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(copied), - array{{0, 0, 1, 3, 5, 7, 9, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::fit::copy_if( - sprout::begin(arr1), - sprout::end(arr1), - sprout::sub(arr2, 2, 8), - testspr::is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{1, 3, 5, 7, 9}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(copied), - array{{0, 0, 1, 3, 5, 7, 9, 0, 0, 0}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_copy_if_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_COPY_IF_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/copy_n.cpp b/dsp/lib/sprout/libs/algorithm/test/copy_n.cpp deleted file mode 100644 index 4dbcbe5..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/copy_n.cpp +++ /dev/null @@ -1,113 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_COPY_N_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_COPY_N_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_copy_n_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{}}; - - // copy 6 elements - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::copy_n( - sprout::begin(arr1) + 2, - 6, - arr2 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{3, 4, 5, 6, 7, 8, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::fit::copy_n( - sprout::begin(arr1) + 2, - 6, - arr2 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{3, 4, 5, 6, 7, 8}} - )); - } - - // copy 6 elements - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::copy_n( - sprout::begin(arr1) + 2, - 6, - arr3 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{3, 4, 5, 6}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::fit::copy_n( - sprout::begin(arr1) + 2, - 6, - arr3 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{3, 4, 5, 6}} - )); - } - // copy 6 elements - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::copy_n( - sprout::begin(arr1) + 2, - 6, - sprout::sub(arr2, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{3, 4, 5, 6, 7, 8}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(copied), - array{{0, 0, 3, 4, 5, 6, 7, 8, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::fit::copy_n( - sprout::begin(arr1) + 2, - 6, - sprout::sub(arr2, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{3, 4, 5, 6, 7, 8}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(copied), - array{{0, 0, 3, 4, 5, 6, 7, 8, 0, 0}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_copy_n_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_COPY_N_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/copy_until.cpp b/dsp/lib/sprout/libs/algorithm/test/copy_until.cpp deleted file mode 100644 index 405e99a..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/copy_until.cpp +++ /dev/null @@ -1,119 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_COPY_UNTIL_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_COPY_UNTIL_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_copy_until_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{}}; - - // copy less than 6 - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::copy_until( - sprout::begin(arr1), - sprout::end(arr1), - arr2, - testspr::greater_than(5) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{1, 2, 3, 4, 5, 0, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::fit::copy_until( - sprout::begin(arr1), - sprout::end(arr1), - arr2, - testspr::greater_than(5) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{1, 2, 3, 4, 5}} - )); - } - // copy less than 8 - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::copy_until( - sprout::begin(arr1), - sprout::end(arr1), - arr3, - testspr::greater_than(5) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{1, 2, 3, 4}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::fit::copy_until( - sprout::begin(arr1), - sprout::end(arr1), - arr3, - testspr::greater_than(5) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{1, 2, 3, 4}} - )); - } - // copy less than 8 - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::copy_until( - sprout::begin(arr1), - sprout::end(arr1), - sprout::sub(arr2, 2, 8), - testspr::greater_than(5) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{1, 2, 3, 4, 5, 0}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(copied), - array{{0, 0, 1, 2, 3, 4, 5, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::fit::copy_until( - sprout::begin(arr1), - sprout::end(arr1), - sprout::sub(arr2, 2, 8), - testspr::greater_than(5) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{1, 2, 3, 4, 5}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(copied), - array{{0, 0, 1, 2, 3, 4, 5, 0, 0, 0}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_copy_until_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_COPY_UNTIL_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/copy_while.cpp b/dsp/lib/sprout/libs/algorithm/test/copy_while.cpp deleted file mode 100644 index 53bc032..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/copy_while.cpp +++ /dev/null @@ -1,119 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_COPY_WHILE_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_COPY_WHILE_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_copy_while_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{}}; - - // copy less than 6 - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::copy_while( - sprout::begin(arr1), - sprout::end(arr1), - arr2, - testspr::less_than(6) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{1, 2, 3, 4, 5, 0, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::fit::copy_while( - sprout::begin(arr1), - sprout::end(arr1), - arr2, - testspr::less_than(6) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{1, 2, 3, 4, 5}} - )); - } - // copy less than 8 - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::copy_while( - sprout::begin(arr1), - sprout::end(arr1), - arr3, - testspr::less_than(6) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{1, 2, 3, 4}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::fit::copy_while( - sprout::begin(arr1), - sprout::end(arr1), - arr3, - testspr::less_than(6) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{1, 2, 3, 4}} - )); - } - // copy less than 8 - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::copy_while( - sprout::begin(arr1), - sprout::end(arr1), - sprout::sub(arr2, 2, 8), - testspr::less_than(6) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{1, 2, 3, 4, 5, 0}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(copied), - array{{0, 0, 1, 2, 3, 4, 5, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto copied = sprout::fit::copy_while( - sprout::begin(arr1), - sprout::end(arr1), - sprout::sub(arr2, 2, 8), - testspr::less_than(6) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - copied, - array{{1, 2, 3, 4, 5}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(copied), - array{{0, 0, 1, 2, 3, 4, 5, 0, 0, 0}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_copy_while_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_COPY_WHILE_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/count.cpp b/dsp/lib/sprout/libs/algorithm/test/count.cpp deleted file mode 100644 index 525c579..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/count.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_COUNT_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_COUNT_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_count_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 5, 5, 5, 5, 8, 9, 10}}; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::count( - sprout::begin(arr1), - sprout::end(arr1), - 5 - ); - TESTSPR_BOTH_ASSERT(result == 4); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::count( - sprout::begin(arr1), - sprout::end(arr1), - 11 - ); - TESTSPR_BOTH_ASSERT(result == 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::count( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - 5 - ); - TESTSPR_BOTH_ASSERT(result == 2); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::count( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - 11 - ); - TESTSPR_BOTH_ASSERT(result == 0); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::count( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - 5 - ); - TESTSPR_BOTH_ASSERT(result == 4); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::count( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - 11 - ); - TESTSPR_BOTH_ASSERT(result == 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::count( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - 5 - ); - TESTSPR_BOTH_ASSERT(result == 2); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::count( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - 11 - ); - TESTSPR_BOTH_ASSERT(result == 0); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::count( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - 5 - ); - TESTSPR_BOTH_ASSERT(result == 4); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::count( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - 11 - ); - TESTSPR_BOTH_ASSERT(result == 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::count( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - 5 - ); - TESTSPR_BOTH_ASSERT(result == 2); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::count( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - 11 - ); - TESTSPR_BOTH_ASSERT(result == 0); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_count_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_COUNT_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/count_if.cpp b/dsp/lib/sprout/libs/algorithm/test/count_if.cpp deleted file mode 100644 index 68ffb5d..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/count_if.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_COUNT_IF_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_COUNT_IF_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_count_if_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::count_if( - sprout::begin(arr1), - sprout::end(arr1), - testspr::is_odd() - ); - TESTSPR_BOTH_ASSERT(result == 5); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::count_if( - sprout::begin(arr1), - sprout::end(arr1), - testspr::less_than(8) - ); - TESTSPR_BOTH_ASSERT(result == 7); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::count_if( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - testspr::is_odd() - ); - TESTSPR_BOTH_ASSERT(result == 3); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::count_if( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::less_than(8) - ); - TESTSPR_BOTH_ASSERT(result == 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::count_if( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::is_odd() - ); - TESTSPR_BOTH_ASSERT(result == 5); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::count_if( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::less_than(8) - ); - TESTSPR_BOTH_ASSERT(result == 7); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::count_if( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::is_odd() - ); - TESTSPR_BOTH_ASSERT(result == 3); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::count_if( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::less_than(8) - ); - TESTSPR_BOTH_ASSERT(result == 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::count_if( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::is_odd() - ); - TESTSPR_BOTH_ASSERT(result == 5); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::count_if( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::less_than(8) - ); - TESTSPR_BOTH_ASSERT(result == 7); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::count_if( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::is_odd() - ); - TESTSPR_BOTH_ASSERT(result == 3); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::count_if( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::less_than(8) - ); - TESTSPR_BOTH_ASSERT(result == 5); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_count_if_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_COUNT_IF_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/equal.cpp b/dsp/lib/sprout/libs/algorithm/test/equal.cpp deleted file mode 100644 index 7508cd5..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/equal.cpp +++ /dev/null @@ -1,475 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_EQUAL_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_EQUAL_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_equal_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{1, 2, 3, 4, 5, 6, 7, 10, 9, 8}}; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr2) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr3) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr2) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr3) - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr2), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr3), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr2), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr3), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr2)) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr3)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::reduce_input(sprout::begin(arr2)) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::reduce_input(sprout::begin(arr3)) - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr2)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr3)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::reduce_input(sprout::begin(arr2)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::reduce_input(sprout::begin(arr3)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr2)) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr3)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr2)) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr3)) - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr2), - sprout::end(arr2) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr3), - sprout::end(arr3) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr2), - sprout::begin(arr2) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr3), - sprout::begin(arr3) + 5 - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr2), - sprout::end(arr2), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr3), - sprout::end(arr3), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr2), - sprout::begin(arr2), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr3), - sprout::begin(arr3) + 5, - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr2)), - testspr::reduce_input(sprout::end(arr2)) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr3)), - testspr::reduce_input(sprout::end(arr3)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::reduce_input(sprout::begin(arr2)), - testspr::reduce_input(sprout::begin(arr2)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::reduce_input(sprout::begin(arr3)), - testspr::reduce_input(sprout::begin(arr3) + 5) - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr2)), - testspr::reduce_input(sprout::end(arr2)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr3)), - testspr::reduce_input(sprout::end(arr3)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::reduce_input(sprout::begin(arr2)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::reduce_input(sprout::begin(arr3)), - testspr::reduce_input(sprout::begin(arr3) + 5), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::end(arr3)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::begin(arr2)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::begin(arr3) + 5) - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::end(arr3)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::begin(arr3) + 5), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(result); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_equal_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_EQUAL_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/equal_range.cpp b/dsp/lib/sprout/libs/algorithm/test/equal_range.cpp deleted file mode 100644 index 4f4306c..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/equal_range.cpp +++ /dev/null @@ -1,97 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_EQUAL_RANGE_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_EQUAL_RANGE_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_equal_range_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 7, 7, 10}}; - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::equal_range( - sprout::begin(arr1), - sprout::end(arr1), - 7 - ); - TESTSPR_BOTH_ASSERT(found.first == sprout::begin(arr1) + 6); - TESTSPR_BOTH_ASSERT(found.second == sprout::begin(arr1) + 9); - TESTSPR_BOTH_ASSERT(sprout::distance(found.first, found.second) == 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::equal_range( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - 7, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(found.first == sprout::begin(arr1) + 5); - TESTSPR_BOTH_ASSERT(found.second == sprout::begin(arr1) + 5); - TESTSPR_BOTH_ASSERT(sprout::distance(found.first, found.second) == 0); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::equal_range( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)), - 7 - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1) + 6); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr1) + 9); - TESTSPR_BOTH_ASSERT(sprout::distance(found.first.base(), found.second.base()) == 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::equal_range( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5), - 7, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1) + 5); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr1) + 5); - TESTSPR_BOTH_ASSERT(sprout::distance(found.first.base(), found.second.base()) == 0); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::equal_range( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - 7 - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1) + 6); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr1) + 9); - TESTSPR_BOTH_ASSERT(sprout::distance(found.first.base(), found.second.base()) == 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::equal_range( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - 7, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1) + 5); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr1) + 5); - TESTSPR_BOTH_ASSERT(sprout::distance(found.first.base(), found.second.base()) == 0); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_equal_range_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_EQUAL_RANGE_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/fill.cpp b/dsp/lib/sprout/libs/algorithm/test/fill.cpp deleted file mode 100644 index 92bf891..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/fill.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_FILL_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_FILL_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_fill_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - - // fill (-1) - { - SPROUT_STATIC_CONSTEXPR auto filled = sprout::fill( - arr1, - -1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - filled, - array{{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto filled = sprout::fit::fill( - arr1, - -1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - filled, - array{{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1}} - )); - } - // fill (-1) - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto filled = sprout::fill( - sprout::sub(arr1, 2, 8), - -1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - filled, - array{{-1, -1, -1, -1, -1, -1}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(filled), - array{{1, 2, -1, -1, -1, -1, -1, -1, 9, 10}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto filled = sprout::fit::fill( - sprout::sub(arr1, 2, 8), - -1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - filled, - array{{-1, -1, -1, -1, -1, -1}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(filled), - array{{1, 2, -1, -1, -1, -1, -1, -1, 9, 10}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_fill_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_FILL_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/fill_n.cpp b/dsp/lib/sprout/libs/algorithm/test/fill_n.cpp deleted file mode 100644 index 3c7b418..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/fill_n.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_FILL_N_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_FILL_N_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_fill_n_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - - // fill (-1) - { - SPROUT_STATIC_CONSTEXPR auto filled = sprout::fill_n( - arr1, - 4, - -1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - filled, - array{{-1, -1, -1, -1, 5, 6, 7, 8, 9, 10}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto filled = sprout::fit::fill_n( - arr1, - 4, - -1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - filled, - array{{-1, -1, -1, -1}} - )); - } - // fill (-1) - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto filled = sprout::fill_n( - sprout::sub(arr1, 2, 8), - 4, - -1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - filled, - array{{-1, -1, -1, -1, 7, 8}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(filled), - array{{1, 2, -1, -1, -1, -1, 7, 8, 9, 10}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto filled = sprout::fit::fill_n( - sprout::sub(arr1, 2, 8), - 4, - -1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - filled, - array{{-1, -1, -1, -1}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(filled), - array{{1, 2, -1, -1, -1, -1, 7, 8, 9, 10}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_fill_n_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_FILL_N_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/find.cpp b/dsp/lib/sprout/libs/algorithm/test/find.cpp deleted file mode 100644 index 481283e..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/find.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_FIND_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_FIND_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_find_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find( - sprout::begin(arr1), - sprout::end(arr1), - 8 - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 7); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find( - sprout::begin(arr1), - sprout::end(arr1), - 11 - ); - TESTSPR_BOTH_ASSERT(found == sprout::end(arr1)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - 8 - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - 11 - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - 8 - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 7); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - 11 - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::end(arr1)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - 8 - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - 11 - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - 8 - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 7); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - 11 - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::end(arr1)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - 8 - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - 11 - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_find_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_FIND_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/find_end.cpp b/dsp/lib/sprout/libs/algorithm/test/find_end.cpp deleted file mode 100644 index 9196e0b..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/find_end.cpp +++ /dev/null @@ -1,229 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_FIND_END_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_FIND_END_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_find_end_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 3, 4, 5}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{3, 4, 5}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{6, 5, 4}}; - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_end( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr2), - sprout::end(arr2) - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 7); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_end( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr3), - sprout::end(arr3) - ); - TESTSPR_BOTH_ASSERT(found == sprout::end(arr1)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_end( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr2), - sprout::end(arr2) - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 2); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_end( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr3), - sprout::end(arr3) - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_end( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr2), - sprout::end(arr2), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 7); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_end( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr3), - sprout::end(arr3), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found == sprout::end(arr1)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_end( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr2), - sprout::end(arr2), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 2); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_end( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr3), - sprout::end(arr3), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_end( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)), - testspr::reduce_forward(sprout::begin(arr2)), - testspr::reduce_forward(sprout::end(arr2)) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 7); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_end( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)), - testspr::reduce_forward(sprout::begin(arr3)), - testspr::reduce_forward(sprout::end(arr3)) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::end(arr1)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_end( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5), - testspr::reduce_forward(sprout::begin(arr2)), - testspr::reduce_forward(sprout::end(arr2)) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 2); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_end( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5), - testspr::reduce_forward(sprout::begin(arr3)), - testspr::reduce_forward(sprout::end(arr3)) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_end( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)), - testspr::reduce_forward(sprout::begin(arr2)), - testspr::reduce_forward(sprout::end(arr2)), - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 7); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_end( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)), - testspr::reduce_forward(sprout::begin(arr3)), - testspr::reduce_forward(sprout::end(arr3)), - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::end(arr1)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_end( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5), - testspr::reduce_forward(sprout::begin(arr2)), - testspr::reduce_forward(sprout::end(arr2)), - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 2); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_end( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5), - testspr::reduce_forward(sprout::begin(arr3)), - testspr::reduce_forward(sprout::end(arr3)), - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_end( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)), - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 7); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_end( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::end(arr3)), - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::end(arr1)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_end( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)), - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 2); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_end( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::end(arr3)), - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_find_end_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_FIND_END_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/find_first_of.cpp b/dsp/lib/sprout/libs/algorithm/test/find_first_of.cpp deleted file mode 100644 index 9a0b0cb..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/find_first_of.cpp +++ /dev/null @@ -1,266 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_FIND_FIRST_OF_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_FIND_FIRST_OF_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_find_first_of_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{4, 5, 6}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{11, 12, 13}}; - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_first_of( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr2), - sprout::end(arr2) - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_first_of( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr3), - sprout::end(arr3) - ); - TESTSPR_BOTH_ASSERT(found == sprout::end(arr1)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_first_of( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr2), - sprout::end(arr2) - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_first_of( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr3), - sprout::end(arr3) - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_first_of( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr2), - sprout::end(arr2), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_first_of( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr3), - sprout::end(arr3), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found == sprout::end(arr1)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_first_of( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr2), - sprout::end(arr2), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_first_of( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr3), - sprout::end(arr3), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_first_of( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_forward(sprout::begin(arr2)), - testspr::reduce_forward(sprout::end(arr2)) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_first_of( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_forward(sprout::begin(arr3)), - testspr::reduce_forward(sprout::end(arr3)) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::end(arr1)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_first_of( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::reduce_forward(sprout::begin(arr2)), - testspr::reduce_forward(sprout::end(arr2)) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_first_of( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::reduce_forward(sprout::begin(arr3)), - testspr::reduce_forward(sprout::end(arr3)) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_first_of( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_forward(sprout::begin(arr2)), - testspr::reduce_forward(sprout::end(arr2)), - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_first_of( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_forward(sprout::begin(arr3)), - testspr::reduce_forward(sprout::end(arr3)), - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::end(arr1)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_first_of( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::reduce_forward(sprout::begin(arr2)), - testspr::reduce_forward(sprout::end(arr2)), - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_first_of( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::reduce_forward(sprout::begin(arr3)), - testspr::reduce_forward(sprout::end(arr3)), - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_first_of( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_first_of( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::end(arr3)) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::end(arr1)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_first_of( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_first_of( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::end(arr3)) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_first_of( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)), - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_first_of( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::end(arr3)), - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::end(arr1)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_first_of( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)), - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_first_of( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::end(arr3)), - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_find_first_of_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_FIND_FIRST_OF_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/find_if.cpp b/dsp/lib/sprout/libs/algorithm/test/find_if.cpp deleted file mode 100644 index bab3fe7..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/find_if.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_FIND_IF_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_FIND_IF_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_find_if_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_if( - sprout::begin(arr1), - sprout::end(arr1), - testspr::greater_than(7) - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 7); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_if( - sprout::begin(arr1), - sprout::end(arr1), - testspr::greater_than(10) - ); - TESTSPR_BOTH_ASSERT(found == sprout::end(arr1)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_if( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - testspr::greater_than(7) - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_if( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - testspr::greater_than(10) - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_if( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::greater_than(7) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 7); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_if( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::greater_than(10) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::end(arr1)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_if( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::greater_than(7) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_if( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::greater_than(10) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_if( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::greater_than(7) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 7); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_if( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::greater_than(10) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::end(arr1)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_if( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::greater_than(7) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_if( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::greater_than(10) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_find_if_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_FIND_IF_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/find_if_not.cpp b/dsp/lib/sprout/libs/algorithm/test/find_if_not.cpp deleted file mode 100644 index 15ad63d..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/find_if_not.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_FIND_IF_NOT_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_FIND_IF_NOT_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_find_if_not_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_if_not( - sprout::begin(arr1), - sprout::end(arr1), - testspr::less_than(8) - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 7); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_if_not( - sprout::begin(arr1), - sprout::end(arr1), - testspr::less_than(11) - ); - TESTSPR_BOTH_ASSERT(found == sprout::end(arr1)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_if_not( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - testspr::less_than(8) - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_if_not( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - testspr::less_than(11) - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_if_not( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::less_than(8) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 7); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_if_not( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::less_than(11) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::end(arr1)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_if_not( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::less_than(8) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_if_not( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::less_than(11) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_if_not( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::less_than(8) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 7); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_if_not( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::less_than(11) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::end(arr1)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_if_not( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::less_than(8) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::find_if_not( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::less_than(11) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_find_if_not_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_FIND_IF_NOT_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/generate.cpp b/dsp/lib/sprout/libs/algorithm/test/generate.cpp deleted file mode 100644 index f5317f7..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/generate.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_GENERATE_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_GENERATE_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_generate_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{}}; - - // generate - { - SPROUT_STATIC_CONSTEXPR auto generated = sprout::generate( - arr1, - testspr::gen_iota(1) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - generated, - array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto generated = sprout::fit::generate( - arr1, - testspr::gen_iota(1) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - generated, - array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}} - )); - } - // generate - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto generated = sprout::generate( - sprout::sub(arr1, 2, 8), - testspr::gen_iota(1) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - generated, - array{{1, 2, 3, 4, 5, 6}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(generated), - array{{0, 0, 1, 2, 3, 4, 5, 6, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto generated = sprout::fit::generate( - sprout::sub(arr1, 2, 8), - testspr::gen_iota(1) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - generated, - array{{1, 2, 3, 4, 5, 6}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(generated), - array{{0, 0, 1, 2, 3, 4, 5, 6, 0, 0}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_generate_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_GENERATE_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/generate_n.cpp b/dsp/lib/sprout/libs/algorithm/test/generate_n.cpp deleted file mode 100644 index 56378f6..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/generate_n.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_GENERATE_N_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_GENERATE_N_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_generate_n_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{}}; - - // generate - { - SPROUT_STATIC_CONSTEXPR auto generated = sprout::generate_n( - arr1, - 4, - testspr::gen_iota(1) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - generated, - array{{1, 2, 3, 4, 0, 0, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto generated = sprout::fit::generate_n( - arr1, - 4, - testspr::gen_iota(1) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - generated, - array{{1, 2, 3, 4}} - )); - } - // generate - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto generated = sprout::generate_n( - sprout::sub(arr1, 2, 8), - 4, - testspr::gen_iota(1) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - generated, - array{{1, 2, 3, 4, 0, 0}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(generated), - array{{0, 0, 1, 2, 3, 4, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto generated = sprout::fit::generate_n( - sprout::sub(arr1, 2, 8), - 4, - testspr::gen_iota(1) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - generated, - array{{1, 2, 3, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(generated), - array{{0, 0, 1, 2, 3, 4, 0, 0, 0, 0}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_generate_n_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_GENERATE_N_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/includes.cpp b/dsp/lib/sprout/libs/algorithm/test/includes.cpp deleted file mode 100644 index dbd3d44..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/includes.cpp +++ /dev/null @@ -1,266 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_INCLUDES_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_INCLUDES_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_includes_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{4, 5, 6}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{1, 2, 12}}; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::includes( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr2), - sprout::end(arr2) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::includes( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr3), - sprout::end(arr3) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::includes( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr2), - sprout::end(arr2) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::includes( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr3), - sprout::end(arr3) - ); - TESTSPR_BOTH_ASSERT(!result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::includes( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr2), - sprout::end(arr2), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::includes( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr3), - sprout::end(arr3), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::includes( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr2), - sprout::end(arr2), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::includes( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr3), - sprout::end(arr3), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(!result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::includes( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr2)), - testspr::reduce_input(sprout::end(arr2)) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::includes( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr3)), - testspr::reduce_input(sprout::end(arr3)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::includes( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::reduce_input(sprout::begin(arr2)), - testspr::reduce_input(sprout::end(arr2)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::includes( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::reduce_input(sprout::begin(arr3)), - testspr::reduce_input(sprout::end(arr3)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::includes( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr2)), - testspr::reduce_input(sprout::end(arr2)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::includes( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr3)), - testspr::reduce_input(sprout::end(arr3)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::includes( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::reduce_input(sprout::begin(arr2)), - testspr::reduce_input(sprout::end(arr2)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::includes( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::reduce_input(sprout::begin(arr3)), - testspr::reduce_input(sprout::end(arr3)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(!result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::includes( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::includes( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::end(arr3)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::includes( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::includes( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::end(arr3)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::includes( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::includes( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::end(arr3)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::includes( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::includes( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::end(arr3)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(!result); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_includes_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_INCLUDES_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/inplace_merge.cpp b/dsp/lib/sprout/libs/algorithm/test/inplace_merge.cpp deleted file mode 100644 index a484845..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/inplace_merge.cpp +++ /dev/null @@ -1,142 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_INPLACE_MERGE_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_INPLACE_MERGE_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_inplace_merge_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 3, 5, 7, 9, 2, 4, 6, 8, 10}}; - - // merge - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::inplace_merge( - arr1, - sprout::begin(arr1) + 5 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::inplace_merge( - arr1, - sprout::begin(arr1) + 5 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}} - )); - } - // merge - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::inplace_merge( - sprout::sub(arr1, 2, 8), - sprout::begin(arr1) + 5 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{2, 4, 5, 6, 7, 9}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(merged), - array{{1, 3, 2, 4, 5, 6, 7, 9, 8, 10}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::inplace_merge( - sprout::sub(arr1, 2, 8), - sprout::begin(arr1) + 5 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{2, 4, 5, 6, 7, 9}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(merged), - array{{1, 3, 2, 4, 5, 6, 7, 9, 8, 10}} - )); - } - } - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 3, 5, 7, 9, 2, 4, 6, 8, 10}}; - - // merge - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::inplace_merge( - arr1, - sprout::begin(arr1) + 5, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::inplace_merge( - arr1, - sprout::begin(arr1) + 5, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}} - )); - } - // merge - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::inplace_merge( - sprout::sub(arr1, 2, 8), - sprout::begin(arr1) + 5, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{2, 4, 5, 6, 7, 9}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(merged), - array{{1, 3, 2, 4, 5, 6, 7, 9, 8, 10}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::inplace_merge( - sprout::sub(arr1, 2, 8), - sprout::begin(arr1) + 5, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{2, 4, 5, 6, 7, 9}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(merged), - array{{1, 3, 2, 4, 5, 6, 7, 9, 8, 10}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_inplace_merge_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_INPLACE_MERGE_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/is_decreasing.cpp b/dsp/lib/sprout/libs/algorithm/test/is_decreasing.cpp deleted file mode 100644 index 3efb956..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/is_decreasing.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_IS_DECREASING_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_IS_DECREASING_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_is_decreasing_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{10, 8, 6, 4, 2, 9, 7, 5, 3, 1}}; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_decreasing( - sprout::begin(arr1), - sprout::end(arr1) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_decreasing( - sprout::begin(arr1), - sprout::begin(arr1) + 5 - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_decreasing( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_decreasing( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5) - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_decreasing( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_decreasing( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5) - ); - TESTSPR_BOTH_ASSERT(result); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_is_decreasing_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_IS_DECREASING_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/is_heap.cpp b/dsp/lib/sprout/libs/algorithm/test/is_heap.cpp deleted file mode 100644 index f2049b0..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/is_heap.cpp +++ /dev/null @@ -1,153 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_IS_HEAP_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_IS_HEAP_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_is_heap_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{10, 9, 8, 6, 7, 2, 5, 3, 4, 1}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{10, 9, 8, 6, 7, 2, 5, 13, 14, 11}}; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_heap( - sprout::begin(arr1), - sprout::end(arr1) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_heap( - sprout::begin(arr2), - sprout::end(arr2) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_heap( - sprout::begin(arr1), - sprout::begin(arr1) + 5 - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_heap( - sprout::begin(arr2), - sprout::begin(arr2) + 5 - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_heap( - sprout::begin(arr1), - sprout::end(arr1), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_heap( - sprout::begin(arr2), - sprout::end(arr2), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_heap( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_heap( - sprout::begin(arr2), - sprout::begin(arr2) + 5, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_heap( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_heap( - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_heap( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_heap( - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::begin(arr2) + 5) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_heap( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_heap( - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_heap( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_heap( - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::begin(arr2) + 5), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_is_heap_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_IS_HEAP_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/is_heap_until.cpp b/dsp/lib/sprout/libs/algorithm/test/is_heap_until.cpp deleted file mode 100644 index be8989b..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/is_heap_until.cpp +++ /dev/null @@ -1,153 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_IS_HEAP_UNTIL_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_IS_HEAP_UNTIL_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_is_heap_until_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{10, 9, 8, 6, 7, 2, 5, 3, 4, 1}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{10, 9, 8, 6, 7, 2, 5, 13, 14, 11}}; - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::is_heap_until( - sprout::begin(arr1), - sprout::end(arr1) - ); - TESTSPR_BOTH_ASSERT(found == sprout::end(arr1)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::is_heap_until( - sprout::begin(arr2), - sprout::end(arr2) - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 7); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::is_heap_until( - sprout::begin(arr1), - sprout::begin(arr1) + 5 - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::is_heap_until( - sprout::begin(arr2), - sprout::begin(arr2) + 5 - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr2) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::is_heap_until( - sprout::begin(arr1), - sprout::end(arr1), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(found == sprout::end(arr1)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::is_heap_until( - sprout::begin(arr2), - sprout::end(arr2), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr2) + 7); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::is_heap_until( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::is_heap_until( - sprout::begin(arr2), - sprout::begin(arr2) + 5, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr2) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::is_heap_until( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::end(arr1)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::is_heap_until( - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 7); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::is_heap_until( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::is_heap_until( - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::begin(arr2) + 5) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr2) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::is_heap_until( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::less() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::end(arr1)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::is_heap_until( - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)), - testspr::less() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr2) + 7); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::is_heap_until( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::less() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::is_heap_until( - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::begin(arr2) + 5), - testspr::less() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr2) + 5); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_is_heap_until_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_IS_HEAP_UNTIL_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/is_increasing.cpp b/dsp/lib/sprout/libs/algorithm/test/is_increasing.cpp deleted file mode 100644 index 3c3ff10..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/is_increasing.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_IS_INCREASING_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_IS_INCREASING_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_is_increasing_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 3, 5, 7, 9, 2, 4, 6, 8, 10}}; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_increasing( - sprout::begin(arr1), - sprout::end(arr1) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_increasing( - sprout::begin(arr1), - sprout::begin(arr1) + 5 - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_increasing( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_increasing( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5) - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_increasing( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_increasing( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5) - ); - TESTSPR_BOTH_ASSERT(result); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_is_increasing_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_IS_INCREASING_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/is_partitioned.cpp b/dsp/lib/sprout/libs/algorithm/test/is_partitioned.cpp deleted file mode 100644 index e90b49c..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/is_partitioned.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_IS_PERTITIONED_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_IS_PERTITIONED_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_is_partitioned_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 3, 5, 7, 9, 2, 4, 6, 8, 10}}; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_partitioned( - sprout::begin(arr1), - sprout::end(arr1), - testspr::is_odd() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_partitioned( - sprout::begin(arr1), - sprout::end(arr1), - testspr::less_than(6) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_partitioned( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - testspr::is_odd() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_partitioned( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - testspr::less_than(6) - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_partitioned( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::is_odd() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_partitioned( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::less_than(6) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_partitioned( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::is_odd() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_partitioned( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::less_than(6) - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_partitioned( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::is_odd() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_partitioned( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::less_than(6) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_partitioned( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::is_odd() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_partitioned( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::less_than(6) - ); - TESTSPR_BOTH_ASSERT(result); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_is_partitioned_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_IS_PERTITIONED_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/is_permutation.cpp b/dsp/lib/sprout/libs/algorithm/test/is_permutation.cpp deleted file mode 100644 index 1fe2509..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/is_permutation.cpp +++ /dev/null @@ -1,476 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_IS_PERMUTATION_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_IS_PERMUTATION_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_is_permutation_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{10, 9, 8, 1, 2, 3, 4, 5, 6, 7}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{5, 4, 3, 2, 1, 11, 10, 9, 8, 7}}; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr2) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr3) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr2) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr3) - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr2), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr3), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr2), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr3), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)), - testspr::reduce_forward(sprout::begin(arr2)) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)), - testspr::reduce_forward(sprout::begin(arr3)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5), - testspr::reduce_forward(sprout::begin(arr2)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5), - testspr::reduce_forward(sprout::begin(arr3)) - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)), - testspr::reduce_forward(sprout::begin(arr2)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)), - testspr::reduce_forward(sprout::begin(arr3)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5), - testspr::reduce_forward(sprout::begin(arr2)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5), - testspr::reduce_forward(sprout::begin(arr3)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr2)) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr3)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr2)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr3)) - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr2), - sprout::end(arr2) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr3), - sprout::end(arr3) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr2), - sprout::end(arr2) + 5 - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr3), - sprout::begin(arr3) + 5 - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr2), - sprout::end(arr2), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr3), - sprout::end(arr3), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr2), - sprout::begin(arr2) + 5, - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr3), - sprout::begin(arr3) + 5, - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)), - testspr::reduce_forward(sprout::begin(arr2)), - testspr::reduce_forward(sprout::end(arr2)) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)), - testspr::reduce_forward(sprout::begin(arr3)), - testspr::reduce_forward(sprout::end(arr3)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5), - testspr::reduce_forward(sprout::begin(arr2)), - testspr::reduce_forward(sprout::begin(arr2) + 5) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5), - testspr::reduce_forward(sprout::begin(arr3)), - testspr::reduce_forward(sprout::begin(arr3) + 5) - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)), - testspr::reduce_forward(sprout::begin(arr2)), - testspr::reduce_forward(sprout::end(arr2)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)), - testspr::reduce_forward(sprout::begin(arr3)), - testspr::reduce_forward(sprout::end(arr3)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5), - testspr::reduce_forward(sprout::begin(arr2)), - testspr::reduce_forward(sprout::begin(arr2) + 5), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5), - testspr::reduce_forward(sprout::begin(arr3)), - testspr::reduce_forward(sprout::begin(arr3) + 5), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::end(arr3)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::begin(arr2) + 5) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::begin(arr3) + 5) - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::end(arr3)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::begin(arr2) + 5), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::begin(arr3) + 5), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(result); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_is_permutation_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_IS_PERMUTATION_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/is_sorted.cpp b/dsp/lib/sprout/libs/algorithm/test/is_sorted.cpp deleted file mode 100644 index 5b6b545..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/is_sorted.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_IS_SORTED_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_IS_SORTED_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_is_sorted_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 3, 5, 7, 9, 2, 4, 6, 8, 10}}; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_sorted( - sprout::begin(arr1), - sprout::end(arr1) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_sorted( - sprout::begin(arr1), - sprout::begin(arr1) + 5 - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_sorted( - sprout::begin(arr1), - sprout::end(arr1), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_sorted( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_sorted( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_sorted( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_sorted( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_sorted( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_sorted( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_sorted( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_sorted( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_sorted( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_is_sorted_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_IS_SORTED_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/is_sorted_until.cpp b/dsp/lib/sprout/libs/algorithm/test/is_sorted_until.cpp deleted file mode 100644 index 1112975..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/is_sorted_until.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_IS_SORTED_UNTIL_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_IS_SORTED_UNTIL_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_is_sorted_until_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 3, 5, 7, 9, 2, 4, 6, 8, 10}}; - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::is_sorted_until( - sprout::begin(arr1), - sprout::end(arr1) - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::is_sorted_until( - sprout::begin(arr1), - sprout::begin(arr1) + 5 - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::is_sorted_until( - sprout::begin(arr1), - sprout::end(arr1), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::is_sorted_until( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::is_sorted_until( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::is_sorted_until( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::is_sorted_until( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)), - testspr::less() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::is_sorted_until( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5), - testspr::less() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::is_sorted_until( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::is_sorted_until( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::is_sorted_until( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::less() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::is_sorted_until( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::less() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_is_sorted_until_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_IS_SORTED_UNTIL_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/is_strictly_decreasing.cpp b/dsp/lib/sprout/libs/algorithm/test/is_strictly_decreasing.cpp deleted file mode 100644 index 4de186c..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/is_strictly_decreasing.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_IS_STRICTLY_DECREASING_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_IS_STRICTLY_DECREASING_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_is_strictly_decreasing_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{10, 8, 6, 4, 2, 9, 7, 5, 3, 1}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{10, 10, 6, 4, 2, 9, 7, 5, 1, 1}}; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_decreasing( - sprout::begin(arr1), - sprout::end(arr1) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_decreasing( - sprout::begin(arr2), - sprout::end(arr2) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_decreasing( - sprout::begin(arr1), - sprout::begin(arr1) + 5 - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_decreasing( - sprout::begin(arr2), - sprout::begin(arr2) + 5 - ); - TESTSPR_BOTH_ASSERT(!result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_decreasing( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_decreasing( - testspr::reduce_forward(sprout::begin(arr2)), - testspr::reduce_forward(sprout::end(arr2)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_decreasing( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_decreasing( - testspr::reduce_forward(sprout::begin(arr2)), - testspr::reduce_forward(sprout::begin(arr2) + 5) - ); - TESTSPR_BOTH_ASSERT(!result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_decreasing( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_decreasing( - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_decreasing( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_decreasing( - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::begin(arr2) + 5) - ); - TESTSPR_BOTH_ASSERT(!result); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_is_strictly_decreasing_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_IS_STRICTLY_DECREASING_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/is_strictly_increasing.cpp b/dsp/lib/sprout/libs/algorithm/test/is_strictly_increasing.cpp deleted file mode 100644 index 148e5df..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/is_strictly_increasing.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_IS_STRICTLY_INCREASING_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_IS_STRICTLY_INCREASING_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_is_strictly_increasing_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 3, 5, 7, 9, 2, 4, 6, 8, 10}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{1, 1, 5, 7, 9, 2, 4, 6, 10, 10}}; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_increasing( - sprout::begin(arr1), - sprout::end(arr1) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_increasing( - sprout::begin(arr2), - sprout::end(arr2) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_increasing( - sprout::begin(arr1), - sprout::begin(arr1) + 5 - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_increasing( - sprout::begin(arr2), - sprout::begin(arr2) + 5 - ); - TESTSPR_BOTH_ASSERT(!result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_increasing( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_increasing( - testspr::reduce_forward(sprout::begin(arr2)), - testspr::reduce_forward(sprout::end(arr2)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_increasing( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_increasing( - testspr::reduce_forward(sprout::begin(arr2)), - testspr::reduce_forward(sprout::begin(arr2) + 5) - ); - TESTSPR_BOTH_ASSERT(!result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_increasing( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_increasing( - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_increasing( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_increasing( - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::begin(arr2) + 5) - ); - TESTSPR_BOTH_ASSERT(!result); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_is_strictly_increasing_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_IS_STRICTLY_INCREASING_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/lexicographical_compare.cpp b/dsp/lib/sprout/libs/algorithm/test/lexicographical_compare.cpp deleted file mode 100644 index 93f7801..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/lexicographical_compare.cpp +++ /dev/null @@ -1,435 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_LEXICOGRAPHICAL_COMPARE_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_LEXICOGRAPHICAL_COMPARE_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_lexicographical_compare_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{1, 2, 3, 4, 5, 6, 7, 1, 2, 3}}; - SPROUT_STATIC_CONSTEXPR auto arr4 = array{{1, 2, 3, 4, 5, 6, 7, 11, 12, 13}}; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr2), - sprout::end(arr2) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr3), - sprout::end(arr3) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr4), - sprout::end(arr4) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr2), - sprout::end(arr2) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr3), - sprout::end(arr3) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr4), - sprout::end(arr4) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr2), - sprout::begin(arr2) + 5 - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr2), - sprout::end(arr2), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr3), - sprout::end(arr3), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr4), - sprout::end(arr4), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr2), - sprout::end(arr2), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr3), - sprout::end(arr3), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr4), - sprout::end(arr4), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr2), - sprout::begin(arr2) + 5, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(!result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr2)), - testspr::reduce_input(sprout::end(arr2)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr3)), - testspr::reduce_input(sprout::end(arr3)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr4)), - testspr::reduce_input(sprout::end(arr4)) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::reduce_input(sprout::begin(arr2)), - testspr::reduce_input(sprout::end(arr2)) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::reduce_input(sprout::begin(arr3)), - testspr::reduce_input(sprout::end(arr3)) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::reduce_input(sprout::begin(arr4)), - testspr::reduce_input(sprout::end(arr4)) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr2)), - testspr::reduce_input(sprout::begin(arr2) + 5) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr2)), - testspr::reduce_input(sprout::end(arr2)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr3)), - testspr::reduce_input(sprout::end(arr3)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr4)), - testspr::reduce_input(sprout::end(arr4)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::reduce_input(sprout::begin(arr2)), - testspr::reduce_input(sprout::end(arr2)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::reduce_input(sprout::begin(arr3)), - testspr::reduce_input(sprout::end(arr3)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::reduce_input(sprout::begin(arr4)), - testspr::reduce_input(sprout::end(arr4)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr2)), - testspr::reduce_input(sprout::begin(arr2) + 5), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(!result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::end(arr3)) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr4)), - testspr::reduce_random_access(sprout::end(arr4)) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::end(arr3)) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr4)), - testspr::reduce_random_access(sprout::end(arr4)) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::begin(arr2) + 5) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::end(arr3)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr4)), - testspr::reduce_random_access(sprout::end(arr4)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::end(arr3)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr4)), - testspr::reduce_random_access(sprout::end(arr4)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::begin(arr2) + 5), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(!result); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_lexicographical_compare_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_LEXICOGRAPHICAL_COMPARE_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/lower_bound.cpp b/dsp/lib/sprout/libs/algorithm/test/lower_bound.cpp deleted file mode 100644 index ef0873c..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/lower_bound.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_LOWER_BOUND_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_LOWER_BOUND_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_lower_bound_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 7, 7, 10}}; - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::lower_bound( - sprout::begin(arr1), - sprout::end(arr1), - 7 - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 6); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::lower_bound( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - 7, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::lower_bound( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)), - 7 - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 6); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::lower_bound( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5), - 7, - testspr::less() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::lower_bound( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - 7 - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 6); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::lower_bound( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - 7, - testspr::less() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_lower_bound_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_LOWER_BOUND_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/make_heap.cpp b/dsp/lib/sprout/libs/algorithm/test/make_heap.cpp deleted file mode 100644 index f11d160..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/make_heap.cpp +++ /dev/null @@ -1,134 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_MAKE_HEAP_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_MAKE_HEAP_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_make_heap_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{10, 7, 8, 6, 9, 2, 5, 3, 4, 1}}; - - // make heap - { - SPROUT_STATIC_CONSTEXPR auto heap = sprout::make_heap( - arr1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - heap, - array{{10, 9, 8, 6, 7, 2, 5, 3, 4, 1}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto heap = sprout::fit::make_heap( - arr1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - heap, - array{{10, 9, 8, 6, 7, 2, 5, 3, 4, 1}} - )); - } - // make heap - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto heap = sprout::make_heap( - sprout::sub(arr1, 2, 10) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - heap, - array{{9, 6, 8, 2, 5, 3, 4, 1}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(heap), - array{{10, 7, 9, 6, 8, 2, 5, 3, 4, 1}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto heap = sprout::fit::make_heap( - sprout::sub(arr1, 2, 10) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - heap, - array{{9, 6, 8, 2, 5, 3, 4, 1}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(heap), - array{{10, 7, 9, 6, 8, 2, 5, 3, 4, 1}} - )); - } - } - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{10, 7, 8, 6, 9, 2, 5, 3, 4, 1}}; - - // make heap - { - SPROUT_STATIC_CONSTEXPR auto heap = sprout::make_heap( - arr1, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - heap, - array{{10, 9, 8, 6, 7, 2, 5, 3, 4, 1}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto heap = sprout::fit::make_heap( - arr1, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - heap, - array{{10, 9, 8, 6, 7, 2, 5, 3, 4, 1}} - )); - } - // make heap - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto heap = sprout::make_heap( - sprout::sub(arr1, 2, 10), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - heap, - array{{9, 6, 8, 2, 5, 3, 4, 1}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(heap), - array{{10, 7, 9, 6, 8, 2, 5, 3, 4, 1}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto heap = sprout::fit::make_heap( - sprout::sub(arr1, 2, 10), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - heap, - array{{9, 6, 8, 2, 5, 3, 4, 1}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(heap), - array{{10, 7, 9, 6, 8, 2, 5, 3, 4, 1}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_make_heap_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_MAKE_HEAP_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/make_partial_heap.cpp b/dsp/lib/sprout/libs/algorithm/test/make_partial_heap.cpp deleted file mode 100644 index 4cc551b..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/make_partial_heap.cpp +++ /dev/null @@ -1,142 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_MAKE_PARTIAL_HEAP_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_MAKE_PARTIAL_HEAP_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_make_partial_heap_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{10, 7, 8, 6, 9, 2, 5, 3, 4, 1}}; - - // make heap - { - SPROUT_STATIC_CONSTEXPR auto heap = sprout::make_partial_heap( - arr1, - sprout::begin(arr1) + 5 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - heap, - array{{5, 4, 1, 3, 2, 10, 9, 8, 7, 6}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto heap = sprout::fit::make_partial_heap( - arr1, - sprout::begin(arr1) + 5 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - heap, - array{{5, 4, 1, 3, 2}} - )); - } - // make heap - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto heap = sprout::make_partial_heap( - sprout::sub(arr1, 2, 10), - sprout::begin(arr1) + 5 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - heap, - array{{3, 1, 2, 9, 8, 6, 5, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(heap), - array{{10, 7, 3, 1, 2, 9, 8, 6, 5, 4}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto heap = sprout::fit::make_partial_heap( - sprout::sub(arr1, 2, 10), - sprout::begin(arr1) + 5 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - heap, - array{{3, 1, 2}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(heap), - array{{10, 7, 3, 1, 2, 9, 8, 6, 5, 4}} - )); - } - } - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{10, 7, 8, 6, 9, 2, 5, 3, 4, 1}}; - - // make heap - { - SPROUT_STATIC_CONSTEXPR auto heap = sprout::make_partial_heap( - arr1, - sprout::begin(arr1) + 5, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - heap, - array{{5, 4, 1, 3, 2, 10, 9, 8, 7, 6}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto heap = sprout::fit::make_partial_heap( - arr1, - sprout::begin(arr1) + 5, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - heap, - array{{5, 4, 1, 3, 2}} - )); - } - // make heap - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto heap = sprout::make_partial_heap( - sprout::sub(arr1, 2, 10), - sprout::begin(arr1) + 5, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - heap, - array{{3, 1, 2, 9, 8, 6, 5, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(heap), - array{{10, 7, 3, 1, 2, 9, 8, 6, 5, 4}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto heap = sprout::fit::make_partial_heap( - sprout::sub(arr1, 2, 10), - sprout::begin(arr1) + 5, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - heap, - array{{3, 1, 2}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(heap), - array{{10, 7, 3, 1, 2, 9, 8, 6, 5, 4}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_make_partial_heap_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_MAKE_PARTIAL_HEAP_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/max.cpp b/dsp/lib/sprout/libs/algorithm/test/max.cpp deleted file mode 100644 index b367adb..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/max.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_MAX_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_MAX_CPP - -#include -#include -#include - -namespace testspr { - static void algorithm_max_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{-1, 1}}; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::max( - arr1[0], - arr1[1] - ); - TESTSPR_BOTH_ASSERT(result == arr1[1]); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::max( - arr1[1], - arr1[0] - ); - TESTSPR_BOTH_ASSERT(result == arr1[1]); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::max( - arr1[0], - arr1[1], - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result == arr1[1]); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::max( - arr1[1], - arr1[0], - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result == arr1[1]); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_max_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_MAX_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/max_element.cpp b/dsp/lib/sprout/libs/algorithm/test/max_element.cpp deleted file mode 100644 index 53a170c..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/max_element.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_MAX_ELEMENT_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_MAX_ELEMENT_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_max_element_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{6, 5, 7, 4, 8, 3, 9, 2, 10, 1}}; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::max_element( - sprout::begin(arr1), - sprout::end(arr1) - ); - TESTSPR_BOTH_ASSERT(result == sprout::begin(arr1) + 8); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::max_element( - sprout::begin(arr1), - sprout::begin(arr1) + 5 - ); - TESTSPR_BOTH_ASSERT(result == sprout::begin(arr1) + 4); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::max_element( - sprout::begin(arr1), - sprout::end(arr1), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result == sprout::begin(arr1) + 8); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::max_element( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result == sprout::begin(arr1) + 4); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::max_element( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)) - ).base(); - TESTSPR_BOTH_ASSERT(result == sprout::begin(arr1) + 8); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::max_element( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5) - ).base(); - TESTSPR_BOTH_ASSERT(result == sprout::begin(arr1) + 4); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::max_element( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)), - testspr::less() - ).base(); - TESTSPR_BOTH_ASSERT(result == sprout::begin(arr1) + 8); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::max_element( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5), - testspr::less() - ).base(); - TESTSPR_BOTH_ASSERT(result == sprout::begin(arr1) + 4); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::max_element( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)) - ).base(); - TESTSPR_BOTH_ASSERT(result == sprout::begin(arr1) + 8); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::max_element( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5) - ).base(); - TESTSPR_BOTH_ASSERT(result == sprout::begin(arr1) + 4); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::max_element( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::less() - ).base(); - TESTSPR_BOTH_ASSERT(result == sprout::begin(arr1) + 8); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::max_element( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::less() - ).base(); - TESTSPR_BOTH_ASSERT(result == sprout::begin(arr1) + 4); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_max_element_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_MAX_ELEMENT_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/merge.cpp b/dsp/lib/sprout/libs/algorithm/test/merge.cpp deleted file mode 100644 index e7880cb..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/merge.cpp +++ /dev/null @@ -1,230 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_MERGE_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_MERGE_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_merge_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{3, 5, 7, 9}}; - SPROUT_STATIC_CONSTEXPR auto arr1_2 = array{{2, 4, 6, 8}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{}}; - - // merge - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::merge( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr2 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{2, 3, 4, 5, 6, 7, 8, 9, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::merge( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr2 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{2, 3, 4, 5, 6, 7, 8, 9}} - )); - } - // merge - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::merge( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr3 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{2, 3, 4, 5}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::merge( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr3 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{2, 3, 4, 5}} - )); - } - // merge - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::merge( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - sprout::sub(arr2, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{2, 3, 4, 5, 6, 7}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(merged), - array{{0, 0, 2, 3, 4, 5, 6, 7, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::merge( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - sprout::sub(arr2, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{2, 3, 4, 5, 6, 7}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(merged), - array{{0, 0, 2, 3, 4, 5, 6, 7, 0, 0}} - )); - } - } - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{3, 5, 7, 9}}; - SPROUT_STATIC_CONSTEXPR auto arr1_2 = array{{2, 4, 6, 8}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{}}; - - // merge - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::merge( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr2, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{2, 3, 4, 5, 6, 7, 8, 9, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::merge( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr2, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{2, 3, 4, 5, 6, 7, 8, 9}} - )); - } - // merge - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::merge( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr3, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{2, 3, 4, 5}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::merge( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr3, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{2, 3, 4, 5}} - )); - } - // merge - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::merge( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - sprout::sub(arr2, 2, 8), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{2, 3, 4, 5, 6, 7}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(merged), - array{{0, 0, 2, 3, 4, 5, 6, 7, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::merge( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - sprout::sub(arr2, 2, 8), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{2, 3, 4, 5, 6, 7}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(merged), - array{{0, 0, 2, 3, 4, 5, 6, 7, 0, 0}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_merge_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_MERGE_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/min.cpp b/dsp/lib/sprout/libs/algorithm/test/min.cpp deleted file mode 100644 index 5718da1..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/min.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_MIN_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_MIN_CPP - -#include -#include -#include - -namespace testspr { - static void algorithm_min_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{-1, 1}}; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::min( - arr1[0], - arr1[1] - ); - TESTSPR_BOTH_ASSERT(result == arr1[0]); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::min( - arr1[1], - arr1[0] - ); - TESTSPR_BOTH_ASSERT(result == arr1[0]); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::min( - arr1[0], - arr1[1], - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result == arr1[0]); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::min( - arr1[1], - arr1[0], - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result == arr1[0]); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_min_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_MIN_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/min_element.cpp b/dsp/lib/sprout/libs/algorithm/test/min_element.cpp deleted file mode 100644 index f712d02..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/min_element.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_MIN_ELEMENT_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_MIN_ELEMENT_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_min_element_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{6, 5, 7, 4, 8, 3, 9, 2, 10, 1}}; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::min_element( - sprout::begin(arr1), - sprout::end(arr1) - ); - TESTSPR_BOTH_ASSERT(result == sprout::begin(arr1) + 9); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::min_element( - sprout::begin(arr1), - sprout::begin(arr1) + 5 - ); - TESTSPR_BOTH_ASSERT(result == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::min_element( - sprout::begin(arr1), - sprout::end(arr1), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result == sprout::begin(arr1) + 9); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::min_element( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result == sprout::begin(arr1) + 3); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::min_element( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)) - ).base(); - TESTSPR_BOTH_ASSERT(result == sprout::begin(arr1) + 9); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::min_element( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5) - ).base(); - TESTSPR_BOTH_ASSERT(result == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::min_element( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)), - testspr::less() - ).base(); - TESTSPR_BOTH_ASSERT(result == sprout::begin(arr1) + 9); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::min_element( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5), - testspr::less() - ).base(); - TESTSPR_BOTH_ASSERT(result == sprout::begin(arr1) + 3); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::min_element( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)) - ).base(); - TESTSPR_BOTH_ASSERT(result == sprout::begin(arr1) + 9); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::min_element( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5) - ).base(); - TESTSPR_BOTH_ASSERT(result == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::min_element( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::less() - ).base(); - TESTSPR_BOTH_ASSERT(result == sprout::begin(arr1) + 9); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::min_element( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::less() - ).base(); - TESTSPR_BOTH_ASSERT(result == sprout::begin(arr1) + 3); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_min_element_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_MIN_ELEMENT_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/minmax.cpp b/dsp/lib/sprout/libs/algorithm/test/minmax.cpp deleted file mode 100644 index 5643a3b..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/minmax.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_MINMAX_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_MINMAX_CPP - -#include -#include -#include - -namespace testspr { - static void algorithm_minmax_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{-1, 1}}; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::minmax( - arr1[0], - arr1[1] - ); - TESTSPR_BOTH_ASSERT(result.first == arr1[0]); - TESTSPR_BOTH_ASSERT(result.second == arr1[1]); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::minmax( - arr1[1], - arr1[0] - ); - TESTSPR_BOTH_ASSERT(result.first == arr1[0]); - TESTSPR_BOTH_ASSERT(result.second == arr1[1]); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::minmax( - arr1[0], - arr1[1], - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result.first == arr1[0]); - TESTSPR_BOTH_ASSERT(result.second == arr1[1]); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::minmax( - arr1[1], - arr1[0], - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result.first == arr1[0]); - TESTSPR_BOTH_ASSERT(result.second == arr1[1]); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_minmax_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_MINMAX_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/minmax_element.cpp b/dsp/lib/sprout/libs/algorithm/test/minmax_element.cpp deleted file mode 100644 index c61909c..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/minmax_element.cpp +++ /dev/null @@ -1,135 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_MINMAX_ELEMENT_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_MINMAX_ELEMENT_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_minmax_element_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{6, 5, 7, 4, 8, 3, 9, 2, 10, 1}}; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::minmax_element( - sprout::begin(arr1), - sprout::end(arr1) - ); - TESTSPR_BOTH_ASSERT(result.first == sprout::begin(arr1) + 9); - TESTSPR_BOTH_ASSERT(result.second == sprout::begin(arr1) + 8); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::minmax_element( - sprout::begin(arr1), - sprout::begin(arr1) + 5 - ); - TESTSPR_BOTH_ASSERT(result.first == sprout::begin(arr1) + 3); - TESTSPR_BOTH_ASSERT(result.second == sprout::begin(arr1) + 4); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::minmax_element( - sprout::begin(arr1), - sprout::end(arr1), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result.first == sprout::begin(arr1) + 9); - TESTSPR_BOTH_ASSERT(result.second == sprout::begin(arr1) + 8); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::minmax_element( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result.first == sprout::begin(arr1) + 3); - TESTSPR_BOTH_ASSERT(result.second == sprout::begin(arr1) + 4); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::minmax_element( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)) - ); - TESTSPR_BOTH_ASSERT(result.first.base() == sprout::begin(arr1) + 9); - TESTSPR_BOTH_ASSERT(result.second.base() == sprout::begin(arr1) + 8); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::minmax_element( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5) - ); - TESTSPR_BOTH_ASSERT(result.first.base() == sprout::begin(arr1) + 3); - TESTSPR_BOTH_ASSERT(result.second.base() == sprout::begin(arr1) + 4); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::minmax_element( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result.first.base() == sprout::begin(arr1) + 9); - TESTSPR_BOTH_ASSERT(result.second.base() == sprout::begin(arr1) + 8); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::minmax_element( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result.first.base() == sprout::begin(arr1) + 3); - TESTSPR_BOTH_ASSERT(result.second.base() == sprout::begin(arr1) + 4); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::minmax_element( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)) - ); - TESTSPR_BOTH_ASSERT(result.first.base() == sprout::begin(arr1) + 9); - TESTSPR_BOTH_ASSERT(result.second.base() == sprout::begin(arr1) + 8); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::minmax_element( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5) - ); - TESTSPR_BOTH_ASSERT(result.first.base() == sprout::begin(arr1) + 3); - TESTSPR_BOTH_ASSERT(result.second.base() == sprout::begin(arr1) + 4); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::minmax_element( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result.first.base() == sprout::begin(arr1) + 9); - TESTSPR_BOTH_ASSERT(result.second.base() == sprout::begin(arr1) + 8); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::minmax_element( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result.first.base() == sprout::begin(arr1) + 3); - TESTSPR_BOTH_ASSERT(result.second.base() == sprout::begin(arr1) + 4); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_minmax_element_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_MINMAX_ELEMENT_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/mismatch.cpp b/dsp/lib/sprout/libs/algorithm/test/mismatch.cpp deleted file mode 100644 index d7490ec..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/mismatch.cpp +++ /dev/null @@ -1,524 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_MISMATCH_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_MISMATCH_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_mismatch_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{1, 2, 3, 4, 5, 6, 7, 10, 9, 8}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{10, 9, 8, 1, 2, 3, 4, 5, 6, 7}}; - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr2) - ); - TESTSPR_BOTH_ASSERT(found.first == sprout::begin(arr1) + 7); - TESTSPR_BOTH_ASSERT(found.second == sprout::begin(arr2) + 7); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr3) - ); - TESTSPR_BOTH_ASSERT(found.first == sprout::begin(arr1)); - TESTSPR_BOTH_ASSERT(found.second == sprout::begin(arr2)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr2) - ); - TESTSPR_BOTH_ASSERT(found.first == sprout::begin(arr1) + 5); - TESTSPR_BOTH_ASSERT(found.second == sprout::begin(arr2) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr3) - ); - TESTSPR_BOTH_ASSERT(found.first == sprout::begin(arr1)); - TESTSPR_BOTH_ASSERT(found.second == sprout::begin(arr2)); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr2), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found.first == sprout::begin(arr1) + 7); - TESTSPR_BOTH_ASSERT(found.second == sprout::begin(arr2) + 7); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr3), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found.first == sprout::begin(arr1)); - TESTSPR_BOTH_ASSERT(found.second == sprout::begin(arr2)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr2), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found.first == sprout::begin(arr1) + 5); - TESTSPR_BOTH_ASSERT(found.second == sprout::begin(arr2) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr3), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found.first == sprout::begin(arr1)); - TESTSPR_BOTH_ASSERT(found.second == sprout::begin(arr2)); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr2)) - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1) + 7); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2) + 7); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr3)) - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1)); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::reduce_input(sprout::begin(arr2)) - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1) + 5); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::reduce_input(sprout::begin(arr3)) - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1)); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2)); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr2)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1) + 7); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2) + 7); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr3)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1)); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::reduce_input(sprout::begin(arr2)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1) + 5); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::reduce_input(sprout::begin(arr3)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1)); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2)); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr2)) - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1) + 7); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2) + 7); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr3)) - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1)); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr2)) - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1) + 5); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr3)) - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1)); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2)); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1) + 7); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2) + 7); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1)); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1) + 5); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1)); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2)); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr2), - sprout::end(arr2) - ); - TESTSPR_BOTH_ASSERT(found.first == sprout::begin(arr1) + 7); - TESTSPR_BOTH_ASSERT(found.second == sprout::begin(arr2) + 7); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr3), - sprout::end(arr2) - ); - TESTSPR_BOTH_ASSERT(found.first == sprout::begin(arr1)); - TESTSPR_BOTH_ASSERT(found.second == sprout::begin(arr2)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr2), - sprout::begin(arr2) + 5 - ); - TESTSPR_BOTH_ASSERT(found.first == sprout::begin(arr1) + 5); - TESTSPR_BOTH_ASSERT(found.second == sprout::begin(arr2) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr3), - sprout::begin(arr2) + 5 - ); - TESTSPR_BOTH_ASSERT(found.first == sprout::begin(arr1)); - TESTSPR_BOTH_ASSERT(found.second == sprout::begin(arr2)); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr2), - sprout::end(arr2), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found.first == sprout::begin(arr1) + 7); - TESTSPR_BOTH_ASSERT(found.second == sprout::begin(arr2) + 7); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr3), - sprout::end(arr2), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found.first == sprout::begin(arr1)); - TESTSPR_BOTH_ASSERT(found.second == sprout::begin(arr2)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr2), - sprout::begin(arr2) + 5, - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found.first == sprout::begin(arr1) + 5); - TESTSPR_BOTH_ASSERT(found.second == sprout::begin(arr2) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr3), - sprout::begin(arr2) + 5, - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found.first == sprout::begin(arr1)); - TESTSPR_BOTH_ASSERT(found.second == sprout::begin(arr2)); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr2)), - testspr::reduce_input(sprout::end(arr2)) - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1) + 7); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2) + 7); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr3)), - testspr::reduce_input(sprout::end(arr2)) - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1)); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr2)), - testspr::reduce_input(sprout::begin(arr2) + 5) - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1) + 5); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr3)), - testspr::reduce_input(sprout::begin(arr2) + 5) - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1)); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2)); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr2)), - testspr::reduce_input(sprout::end(arr2)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1) + 7); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2) + 7); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr3)), - testspr::reduce_input(sprout::end(arr2)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1)); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr2)), - testspr::reduce_input(sprout::begin(arr2) + 5), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1) + 5); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr3)), - testspr::reduce_input(sprout::begin(arr2) + 5), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1)); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2)); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)) - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1) + 7); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2) + 7); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::end(arr2)) - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1)); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::begin(arr2) + 5) - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1) + 5); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::begin(arr2) + 5) - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1)); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2)); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1) + 7); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2) + 7); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::end(arr2)), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1)); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::begin(arr2) + 5), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1) + 5); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::begin(arr2) + 5), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1)); - TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2)); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_mismatch_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_MISMATCH_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/modifying.cpp b/dsp/lib/sprout/libs/algorithm/test/modifying.cpp deleted file mode 100644 index d08c2c1..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/modifying.cpp +++ /dev/null @@ -1,159 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_MODIFYIING_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_MODIFYIING_CPP - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_CPP_INCLUDE_DISABLE_SPROUT_LIBS_ALGORITHM_TEST_MODIFYIING_CPP -# define TESTSPR_CPP_INCLUDE -#endif - -#include "./copy.cpp" -#include "./copy_n.cpp" -#include "./copy_if.cpp" -#include "./copy_backward.cpp" -#include "./transform.cpp" -#include "./replace.cpp" -#include "./replace_if.cpp" -#include "./replace_copy.cpp" -#include "./replace_copy_if.cpp" -#include "./fill.cpp" -#include "./fill_n.cpp" -#include "./generate.cpp" -#include "./generate_n.cpp" -#include "./unfold.cpp" -#include "./unfold_n.cpp" -#include "./recurrence.cpp" -#include "./recurrence_n.cpp" -#include "./remove.cpp" -#include "./remove_if.cpp" -#include "./remove_copy.cpp" -#include "./remove_copy_if.cpp" -#include "./unique.cpp" -#include "./unique_copy.cpp" -#include "./reverse.cpp" -#include "./reverse_copy.cpp" -#include "./rotate.cpp" -#include "./rotate_copy.cpp" -#include "./shuffle.cpp" -#include "./shuffle_result.cpp" -#include "./partition.cpp" -#include "./partition_copy.cpp" -#include "./stable_partition.cpp" -#include "./stable_partition_copy.cpp" -#include "./sort.cpp" -#include "./stable_sort.cpp" -#include "./partial_sort.cpp" -#include "./nth_element.cpp" -#include "./merge.cpp" -#include "./inplace_merge.cpp" -#include "./set_union.cpp" -#include "./set_intersection.cpp" -#include "./set_difference.cpp" -#include "./set_symmetric_difference.cpp" -#include "./push_heap.cpp" -#include "./pop_heap.cpp" -#include "./make_heap.cpp" -#include "./make_partial_heap.cpp" -#include "./sort_heap.cpp" -#include "./next_permutation.cpp" -#include "./prev_permutation.cpp" -#include "./copy_while.cpp" -#include "./copy_until.cpp" -#include "./clamp_range_copy.cpp" -#include "./clamp_range.cpp" -#include "./swap_element.cpp" -#include "./swap_element_copy.cpp" -#include "./random_swap.cpp" -#include "./random_swap_result.cpp" -#ifndef TESTSPR_CONFIG_DISABLE_MONKEY_SORT_TEST -# include "./bogo_sort.cpp" -# include "./bogo_sort_result.cpp" -# include "./bozo_sort.cpp" -# include "./bozo_sort_result.cpp" -#endif - -#ifdef TESTSPR_CPP_INCLUDE_DISABLE_SPROUT_LIBS_ALGORITHM_TEST_MODIFYIING_CPP -# undef TESTSPR_CPP_INCLUDE -#endif - -namespace testspr { - static void algorithm_modifying_test() { - testspr::algorithm_copy_test(); - testspr::algorithm_copy_n_test(); - testspr::algorithm_copy_if_test(); - testspr::algorithm_copy_backward_test(); - testspr::algorithm_transform_test(); - testspr::algorithm_replace_test(); - testspr::algorithm_replace_if_test(); - testspr::algorithm_replace_copy_test(); - testspr::algorithm_replace_copy_if_test(); - testspr::algorithm_generate_test(); - testspr::algorithm_generate_n_test(); - testspr::algorithm_fill_test(); - testspr::algorithm_fill_n_test(); - testspr::algorithm_unfold_test(); - testspr::algorithm_unfold_n_test(); - testspr::algorithm_recurrence_test(); - testspr::algorithm_recurrence_n_test(); - testspr::algorithm_remove_test(); - testspr::algorithm_remove_if_test(); - testspr::algorithm_remove_copy_test(); - testspr::algorithm_remove_copy_if_test(); - testspr::algorithm_unique_test(); - testspr::algorithm_unique_copy_test(); - testspr::algorithm_reverse_test(); - testspr::algorithm_reverse_copy_test(); - testspr::algorithm_rotate_test(); - testspr::algorithm_rotate_copy_test(); - testspr::algorithm_shuffle_test(); - testspr::algorithm_shuffle_result_test(); - testspr::algorithm_partition_test(); - testspr::algorithm_partition_copy_test(); - testspr::algorithm_stable_partition_test(); - testspr::algorithm_stable_partition_copy_test(); - testspr::algorithm_sort_test(); - testspr::algorithm_stable_sort_test(); - testspr::algorithm_partial_sort_test(); - testspr::algorithm_nth_element_test(); - testspr::algorithm_merge_test(); - testspr::algorithm_inplace_merge_test(); - testspr::algorithm_set_union_test(); - testspr::algorithm_set_intersection_test(); - testspr::algorithm_set_difference_test(); - testspr::algorithm_set_symmetric_difference_test(); - testspr::algorithm_push_heap_test(); - testspr::algorithm_pop_heap_test(); - testspr::algorithm_make_heap_test(); - testspr::algorithm_make_partial_heap_test(); - testspr::algorithm_sort_heap_test(); - testspr::algorithm_next_permutation_test(); - testspr::algorithm_prev_permutation_test(); - testspr::algorithm_copy_while_test(); - testspr::algorithm_copy_until_test(); - testspr::algorithm_clamp_range_copy_test(); - testspr::algorithm_clamp_range_test(); - testspr::algorithm_swap_element_test(); - testspr::algorithm_swap_element_copy_test(); - testspr::algorithm_random_swap_test(); - testspr::algorithm_random_swap_result_test(); -#ifndef TESTSPR_CONFIG_DISABLE_MONKEY_SORT_TEST - testspr::algorithm_bogo_sort_test(); - testspr::algorithm_bogo_sort_result_test(); - testspr::algorithm_bozo_sort_test(); - testspr::algorithm_bozo_sort_result_test(); -#endif - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_modifying_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_MODIFYIING_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/next_permutation.cpp b/dsp/lib/sprout/libs/algorithm/test/next_permutation.cpp deleted file mode 100644 index 8e02d40..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/next_permutation.cpp +++ /dev/null @@ -1,142 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_NEXT_PERMUTATION_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_NEXT_PERMUTATION_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_next_permutation_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5}}; - - // next permutation - { - SPROUT_STATIC_CONSTEXPR auto permutation = sprout::next_permutation( - arr1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - permutation.first, - array{{1, 2, 3, 5, 4}} - )); - TESTSPR_BOTH_ASSERT(permutation.second); - } - { - SPROUT_STATIC_CONSTEXPR auto permutation = sprout::fit::next_permutation( - arr1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - permutation.first, - array{{1, 2, 3, 5, 4}} - )); - TESTSPR_BOTH_ASSERT(permutation.second); - } - // next permutation - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto permutation = sprout::next_permutation( - sprout::sub(arr1, 1, 4) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - permutation.first, - array{{2, 4, 3}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(permutation.first), - array{{1, 2, 4, 3, 5}} - )); - TESTSPR_BOTH_ASSERT(permutation.second); - } - { - SPROUT_STATIC_CONSTEXPR auto permutation = sprout::fit::next_permutation( - sprout::sub(arr1, 1, 4) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - permutation.first, - array{{2, 4, 3}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(permutation.first), - array{{1, 2, 4, 3, 5}} - )); - TESTSPR_BOTH_ASSERT(permutation.second); - } - } - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5}}; - - // next permutation - { - SPROUT_STATIC_CONSTEXPR auto permutation = sprout::next_permutation( - arr1, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - permutation.first, - array{{1, 2, 3, 5, 4}} - )); - TESTSPR_BOTH_ASSERT(permutation.second); - } - { - SPROUT_STATIC_CONSTEXPR auto permutation = sprout::fit::next_permutation( - arr1, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - permutation.first, - array{{1, 2, 3, 5, 4}} - )); - TESTSPR_BOTH_ASSERT(permutation.second); - } - // next permutation - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto permutation = sprout::next_permutation( - sprout::sub(arr1, 1, 4), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - permutation.first, - array{{2, 4, 3}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(permutation.first), - array{{1, 2, 4, 3, 5}} - )); - TESTSPR_BOTH_ASSERT(permutation.second); - } - { - SPROUT_STATIC_CONSTEXPR auto permutation = sprout::fit::next_permutation( - sprout::sub(arr1, 1, 4), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - permutation.first, - array{{2, 4, 3}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(permutation.first), - array{{1, 2, 4, 3, 5}} - )); - TESTSPR_BOTH_ASSERT(permutation.second); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_next_permutation_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_NEXT_PERMUTATION_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/non_modifying.cpp b/dsp/lib/sprout/libs/algorithm/test/non_modifying.cpp deleted file mode 100644 index 973f701..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/non_modifying.cpp +++ /dev/null @@ -1,121 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_NON_MODIFYIING_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_NON_MODIFYIING_CPP - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_CPP_INCLUDE_DISABLE_SPROUT_LIBS_ALGORITHM_TEST_NON_MODIFYIING_CPP -# define TESTSPR_CPP_INCLUDE -#endif - -#include "./all_of.cpp" -#include "./all_of_equal.cpp" -#include "./any_of.cpp" -#include "./any_of_equal.cpp" -#include "./none_of.cpp" -#include "./none_of_equal.cpp" -#include "./one_of.cpp" -#include "./one_of_equal.cpp" -#include "./find.cpp" -#include "./find_if.cpp" -#include "./find_if_not.cpp" -#include "./find_end.cpp" -#include "./find_first_of.cpp" -#include "./adjacent_find.cpp" -#include "./count.cpp" -#include "./count_if.cpp" -#include "./mismatch.cpp" -#include "./equal.cpp" -#include "./is_permutation.cpp" -#include "./search.cpp" -#include "./search_n.cpp" -#include "./is_partitioned.cpp" -#include "./partition_point.cpp" -#include "./is_sorted.cpp" -#include "./is_sorted_until.cpp" -#include "./is_increasing.cpp" -#include "./is_decreasing.cpp" -#include "./is_strictly_increasing.cpp" -#include "./is_strictly_decreasing.cpp" -#include "./lower_bound.cpp" -#include "./upper_bound.cpp" -#include "./equal_range.cpp" -#include "./binary_search.cpp" -#include "./includes.cpp" -#include "./is_heap.cpp" -#include "./is_heap_until.cpp" -#include "./min.cpp" -#include "./max.cpp" -#include "./minmax.cpp" -#include "./min_element.cpp" -#include "./max_element.cpp" -#include "./minmax_element.cpp" -#include "./lexicographical_compare.cpp" -#include "./tristate_lexicographical_compare.cpp" -#include "./clamp.cpp" - -#ifdef TESTSPR_CPP_INCLUDE_DISABLE_SPROUT_LIBS_ALGORITHM_TEST_NON_MODIFYIING_CPP -# undef TESTSPR_CPP_INCLUDE -#endif - -namespace testspr { - static void algorithm_non_modifying_test() { - testspr::algorithm_all_of_test(); - testspr::algorithm_any_of_test(); - testspr::algorithm_none_of_test(); - testspr::algorithm_one_of_test(); - testspr::algorithm_find_test(); - testspr::algorithm_find_if_test(); - testspr::algorithm_find_if_not_test(); - testspr::algorithm_find_end_test(); - testspr::algorithm_find_first_of_test(); - testspr::algorithm_adjacent_find_test(); - testspr::algorithm_count_test(); - testspr::algorithm_count_if_test(); - testspr::algorithm_mismatch_test(); - testspr::algorithm_equal_test(); - testspr::algorithm_is_permutation_test(); - testspr::algorithm_search_test(); - testspr::algorithm_search_n_test(); - testspr::algorithm_is_partitioned_test(); - testspr::algorithm_partition_point_test(); - testspr::algorithm_is_sorted_test(); - testspr::algorithm_is_sorted_until_test(); - testspr::algorithm_lower_bound_test(); - testspr::algorithm_upper_bound_test(); - testspr::algorithm_equal_range_test(); - testspr::algorithm_binary_search_test(); - testspr::algorithm_includes_test(); - testspr::algorithm_is_heap_test(); - testspr::algorithm_is_heap_until_test(); - testspr::algorithm_min_test(); - testspr::algorithm_max_test(); - testspr::algorithm_minmax_test(); - testspr::algorithm_min_element_test(); - testspr::algorithm_max_element_test(); - testspr::algorithm_minmax_element_test(); - testspr::algorithm_lexicographical_compare_test(); - testspr::algorithm_all_of_equal_test(); - testspr::algorithm_any_of_equal_test(); - testspr::algorithm_none_of_equal_test(); - testspr::algorithm_one_of_equal_test(); - testspr::algorithm_tristate_lexicographical_compare_test(); - testspr::algorithm_is_increasing_test(); - testspr::algorithm_is_decreasing_test(); - testspr::algorithm_is_strictly_increasing_test(); - testspr::algorithm_is_strictly_decreasing_test(); - testspr::algorithm_clamp_test(); - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_non_modifying_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_NON_MODIFYIING_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/none_of.cpp b/dsp/lib/sprout/libs/algorithm/test/none_of.cpp deleted file mode 100644 index 986a7c5..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/none_of.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_NONE_OF_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_NONE_OF_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_none_of_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::none_of( - sprout::begin(arr1), - sprout::end(arr1), - testspr::greater_than(5) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::none_of( - sprout::begin(arr1), - sprout::end(arr1), - testspr::greater_than(10) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::none_of( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - testspr::greater_than(5) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::none_of( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - testspr::greater_than(10) - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::none_of( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::greater_than(5) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::none_of( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::greater_than(10) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::none_of( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::greater_than(5) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::none_of( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::greater_than(10) - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::none_of( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::greater_than(5) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::none_of( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::greater_than(10) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::none_of( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::greater_than(5) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::none_of( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::greater_than(10) - ); - TESTSPR_BOTH_ASSERT(result); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_none_of_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_NONE_OF_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/none_of_equal.cpp b/dsp/lib/sprout/libs/algorithm/test/none_of_equal.cpp deleted file mode 100644 index d3630b2..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/none_of_equal.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_NONE_OF_EQUAL_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_NONE_OF_EQUAL_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_none_of_equal_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::none_of_equal( - sprout::begin(arr1), - sprout::end(arr1), - 10 - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::none_of_equal( - sprout::begin(arr1), - sprout::end(arr1), - 11 - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::none_of_equal( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - 10 - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::none_of_equal( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - 11 - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::none_of_equal( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - 10 - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::none_of_equal( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - 11 - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::none_of_equal( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - 10 - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::none_of_equal( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - 11 - ); - TESTSPR_BOTH_ASSERT(result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::none_of_equal( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - 10 - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::none_of_equal( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - 11 - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::none_of_equal( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - 10 - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::none_of_equal( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - 11 - ); - TESTSPR_BOTH_ASSERT(result); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_none_of_equal_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_NONE_OF_EQUAL_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/nth_element.cpp b/dsp/lib/sprout/libs/algorithm/test/nth_element.cpp deleted file mode 100644 index fe4f2ae..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/nth_element.cpp +++ /dev/null @@ -1,142 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_NTH_ELEMENT_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_NTH_ELEMENT_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_nth_element_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{10, 7, 8, 6, 9, 2, 5, 3, 4, 1}}; - - // sort - { - SPROUT_STATIC_CONSTEXPR auto nth = sprout::nth_element( - arr1, - sprout::begin(arr1) + 4 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - nth, - array{{2, 4, 1, 3, 5, 10, 9, 8, 7, 6}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto nth = sprout::fit::nth_element( - arr1, - sprout::begin(arr1) + 4 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - nth, - array{{2, 4, 1, 3, 5}} - )); - } - // sort - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto nth = sprout::nth_element( - sprout::sub(arr1, 2, 8), - sprout::begin(arr1) + 4 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - nth, - array{{2, 3, 5, 9, 8, 6}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(nth), - array{{10, 7, 2, 3, 5, 9, 8, 6, 4, 1}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto nth = sprout::fit::nth_element( - sprout::sub(arr1, 2, 8), - sprout::begin(arr1) + 4 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - nth, - array{{2, 3, 5}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(nth), - array{{10, 7, 2, 3, 5, 9, 8, 6, 4, 1}} - )); - } - } - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{10, 7, 8, 6, 9, 2, 5, 3, 4, 1}}; - - // sort - { - SPROUT_STATIC_CONSTEXPR auto nth = sprout::nth_element( - arr1, - sprout::begin(arr1) + 4, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - nth, - array{{2, 4, 1, 3, 5, 10, 9, 8, 7, 6}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto nth = sprout::fit::nth_element( - arr1, - sprout::begin(arr1) + 4, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - nth, - array{{2, 4, 1, 3, 5}} - )); - } - // sort - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto nth = sprout::nth_element( - sprout::sub(arr1, 2, 8), - sprout::begin(arr1) + 4, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - nth, - array{{2, 3, 5, 9, 8, 6}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(nth), - array{{10, 7, 2, 3, 5, 9, 8, 6, 4, 1}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto nth = sprout::fit::nth_element( - sprout::sub(arr1, 2, 8), - sprout::begin(arr1) + 4, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - nth, - array{{2, 3, 5}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(nth), - array{{10, 7, 2, 3, 5, 9, 8, 6, 4, 1}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_nth_element_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_NTH_ELEMENT_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/one_of.cpp b/dsp/lib/sprout/libs/algorithm/test/one_of.cpp deleted file mode 100644 index f20929f..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/one_of.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_ONE_OF_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_ONE_OF_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_one_of_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::one_of( - sprout::begin(arr1), - sprout::end(arr1), - testspr::greater_than(4) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::one_of( - sprout::begin(arr1), - sprout::end(arr1), - testspr::greater_than(9) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::one_of( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - testspr::greater_than(4) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::one_of( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - testspr::greater_than(9) - ); - TESTSPR_BOTH_ASSERT(!result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::one_of( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::greater_than(4) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::one_of( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::greater_than(9) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::one_of( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::greater_than(4) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::one_of( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::greater_than(9) - ); - TESTSPR_BOTH_ASSERT(!result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::one_of( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::greater_than(4) - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::one_of( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::greater_than(9) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::one_of( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::greater_than(4) - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::one_of( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::greater_than(9) - ); - TESTSPR_BOTH_ASSERT(!result); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_one_of_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_ONE_OF_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/one_of_equal.cpp b/dsp/lib/sprout/libs/algorithm/test/one_of_equal.cpp deleted file mode 100644 index 9598822..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/one_of_equal.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_ONE_OF_EQUAL_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_ONE_OF_EQUAL_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_one_of_equal_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 5, 5, 5, 5, 10}}; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::one_of_equal( - sprout::begin(arr1), - sprout::end(arr1), - 5 - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::one_of_equal( - sprout::begin(arr1), - sprout::end(arr1), - 10 - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::one_of_equal( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - 5 - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::one_of_equal( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - 10 - ); - TESTSPR_BOTH_ASSERT(!result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::one_of_equal( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - 5 - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::one_of_equal( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - 10 - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::one_of_equal( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - 5 - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::one_of_equal( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - 10 - ); - TESTSPR_BOTH_ASSERT(!result); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::one_of_equal( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - 5 - ); - TESTSPR_BOTH_ASSERT(!result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::one_of_equal( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - 10 - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::one_of_equal( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - 5 - ); - TESTSPR_BOTH_ASSERT(result); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::one_of_equal( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - 10 - ); - TESTSPR_BOTH_ASSERT(!result); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_one_of_equal_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_ONE_OF_EQUAL_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/partial_sort.cpp b/dsp/lib/sprout/libs/algorithm/test/partial_sort.cpp deleted file mode 100644 index 865f8b3..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/partial_sort.cpp +++ /dev/null @@ -1,142 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_PARTIAL_SORT_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_PARTIAL_SORT_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_partial_sort_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{5, 1, 9, 4, 8, 2, 7, 3, 10, 6}}; - - // sort - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::partial_sort( - arr1, - sprout::begin(arr1) + 5 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 3, 4, 5, 9, 8, 7, 10, 6}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::partial_sort( - arr1, - sprout::begin(arr1) + 5 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 3, 4, 5}} - )); - } - // sort - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::partial_sort( - sprout::sub(arr1, 2, 8), - sprout::begin(arr1) + 5 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{2, 3, 4, 9, 8, 7}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sorted), - array{{5, 1, 2, 3, 4, 9, 8, 7, 10, 6}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::partial_sort( - sprout::sub(arr1, 2, 8), - sprout::begin(arr1) + 5 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{2, 3, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sorted), - array{{5, 1, 2, 3, 4, 9, 8, 7, 10, 6}} - )); - } - } - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{5, 1, 9, 4, 8, 2, 7, 3, 10, 6}}; - - // sort - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::partial_sort( - arr1, - sprout::begin(arr1) + 5, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 3, 4, 5, 9, 8, 7, 10, 6}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::partial_sort( - arr1, - sprout::begin(arr1) + 5, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 3, 4, 5}} - )); - } - // sort - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::partial_sort( - sprout::sub(arr1, 2, 8), - sprout::begin(arr1) + 5, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{2, 3, 4, 9, 8, 7}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sorted), - array{{5, 1, 2, 3, 4, 9, 8, 7, 10, 6}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::partial_sort( - sprout::sub(arr1, 2, 8), - sprout::begin(arr1) + 5, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{2, 3, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sorted), - array{{5, 1, 2, 3, 4, 9, 8, 7, 10, 6}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_partial_sort_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_PARTIAL_SORT_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/partition.cpp b/dsp/lib/sprout/libs/algorithm/test/partition.cpp deleted file mode 100644 index b952e3b..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/partition.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_PARTITION_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_PARTITION_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_partition_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - - // partition (odd) - { - SPROUT_STATIC_CONSTEXPR auto partitioned = sprout::partition( - arr1, - testspr::is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - partitioned, - array{{9, 7, 5, 3, 1, 2, 4, 6, 8, 10}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto partitioned = sprout::fit::partition( - arr1, - testspr::is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - partitioned, - array{{9, 7, 5, 3, 1}} - )); - } - // partition (odd) - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto partitioned = sprout::partition( - sprout::sub(arr1, 2, 8), - testspr::is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - partitioned, - array{{7, 5, 3, 4, 6, 8}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(partitioned), - array{{1, 2, 7, 5, 3, 4, 6, 8, 9, 10}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto partitioned = sprout::fit::partition( - sprout::sub(arr1, 2, 8), - testspr::is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - partitioned, - array{{7, 5, 3}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(partitioned), - array{{1, 2, 7, 5, 3, 4, 6, 8, 9, 10}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_partition_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_PARTITION_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/partition_copy.cpp b/dsp/lib/sprout/libs/algorithm/test/partition_copy.cpp deleted file mode 100644 index 9852a8f..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/partition_copy.cpp +++ /dev/null @@ -1,119 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_PARTITION_COPY_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_PARTITION_COPY_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_partition_copy_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{}}; - - // partition in range [2 .. 8) (odd) - { - SPROUT_STATIC_CONSTEXPR auto partitioned = sprout::partition_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr2, - is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - partitioned, - array{{7, 5, 3, 4, 6, 8, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto partitioned = sprout::fit::partition_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr2, - is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - partitioned, - array{{7, 5, 3}} - )); - } - // partition in range [2 .. 8) (odd) - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto partitioned = sprout::partition_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr3, - is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - partitioned, - array{{5, 3, 4, 6}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto partitioned = sprout::fit::partition_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr3, - is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - partitioned, - array{{5, 3}} - )); - } - // partition in range [2 .. 8) (odd) - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto partitioned = sprout::partition_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::sub(arr2, 2, 8), - is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - partitioned, - array{{7, 5, 3, 4, 6, 8}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(partitioned), - array{{0, 0, 7, 5, 3, 4, 6, 8, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto partitioned = sprout::fit::partition_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::sub(arr2, 2, 8), - is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - partitioned, - array{{7, 5, 3}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(partitioned), - array{{0, 0, 7, 5, 3, 4, 6, 8, 0, 0}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_partition_copy_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_PARTITION_COPY_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/partition_point.cpp b/dsp/lib/sprout/libs/algorithm/test/partition_point.cpp deleted file mode 100644 index 9128485..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/partition_point.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_PERTITION_POINT_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_PERTITION_POINT_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_partition_point_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 3, 5, 7, 9, 2, 4, 6, 8, 10}}; - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::partition_point( - sprout::begin(arr1), - sprout::end(arr1), - testspr::is_odd() - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::partition_point( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - testspr::is_odd() - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::partition_point( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)), - testspr::is_odd() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::partition_point( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5), - testspr::is_odd() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::partition_point( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::is_odd() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::partition_point( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::is_odd() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_partition_point_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_PERTITION_POINT_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/pop_heap.cpp b/dsp/lib/sprout/libs/algorithm/test/pop_heap.cpp deleted file mode 100644 index d50c2c6..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/pop_heap.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_POP_HEAP_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_POP_HEAP_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_pop_heap_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{10, 8, 9, 6, 7, 5, 3, 1, 2, 4}}; - - // pop heap - { - SPROUT_STATIC_CONSTEXPR auto heap = sprout::pop_heap( - arr1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - heap, - array{{9, 8, 5, 6, 7, 4, 3, 1, 2, 10}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto heap = sprout::fit::pop_heap( - arr1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - heap, - array{{9, 8, 5, 6, 7, 4, 3, 1, 2}} - )); - } - // pop heap - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto heap = sprout::pop_heap( - sprout::sub(arr1, 2, 10) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - heap, - array{{7, 6, 4, 5, 3, 1, 2, 9}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(heap), - array{{10, 8, 7, 6, 4, 5, 3, 1, 2, 9}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto heap = sprout::fit::pop_heap( - sprout::sub(arr1, 2, 10) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - heap, - array{{7, 6, 4, 5, 3, 1, 2}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(heap), - array{{10, 8, 7, 6, 4, 5, 3, 1, 2, 9}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_pop_heap_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_POP_HEAP_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/prev_permutation.cpp b/dsp/lib/sprout/libs/algorithm/test/prev_permutation.cpp deleted file mode 100644 index 4706e8b..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/prev_permutation.cpp +++ /dev/null @@ -1,142 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_PREV_PERMUTATION_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_PREV_PERMUTATION_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_prev_permutation_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{5, 4, 3, 2, 1}}; - - // prev permutation - { - SPROUT_STATIC_CONSTEXPR auto permutation = sprout::prev_permutation( - arr1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - permutation.first, - array{{5, 4, 3, 1, 2}} - )); - TESTSPR_BOTH_ASSERT(permutation.second); - } - { - SPROUT_STATIC_CONSTEXPR auto permutation = sprout::fit::prev_permutation( - arr1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - permutation.first, - array{{5, 4, 3, 1, 2}} - )); - TESTSPR_BOTH_ASSERT(permutation.second); - } - // prev permutation - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto permutation = sprout::prev_permutation( - sprout::sub(arr1, 1, 4) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - permutation.first, - array{{4, 2, 3}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(permutation.first), - array{{5, 4, 2, 3, 1}} - )); - TESTSPR_BOTH_ASSERT(permutation.second); - } - { - SPROUT_STATIC_CONSTEXPR auto permutation = sprout::fit::prev_permutation( - sprout::sub(arr1, 1, 4) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - permutation.first, - array{{4, 2, 3}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(permutation.first), - array{{5, 4, 2, 3, 1}} - )); - TESTSPR_BOTH_ASSERT(permutation.second); - } - } - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{5, 4, 3, 2, 1}}; - - // prev permutation - { - SPROUT_STATIC_CONSTEXPR auto permutation = sprout::prev_permutation( - arr1, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - permutation.first, - array{{5, 4, 3, 1, 2}} - )); - TESTSPR_BOTH_ASSERT(permutation.second); - } - { - SPROUT_STATIC_CONSTEXPR auto permutation = sprout::fit::prev_permutation( - arr1, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - permutation.first, - array{{5, 4, 3, 1, 2}} - )); - TESTSPR_BOTH_ASSERT(permutation.second); - } - // prev permutation - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto permutation = sprout::prev_permutation( - sprout::sub(arr1, 1, 4), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - permutation.first, - array{{4, 2, 3}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(permutation.first), - array{{5, 4, 2, 3, 1}} - )); - TESTSPR_BOTH_ASSERT(permutation.second); - } - { - SPROUT_STATIC_CONSTEXPR auto permutation = sprout::fit::prev_permutation( - sprout::sub(arr1, 1, 4), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - permutation.first, - array{{4, 2, 3}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(permutation.first), - array{{5, 4, 2, 3, 1}} - )); - TESTSPR_BOTH_ASSERT(permutation.second); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_prev_permutation_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_PREV_PERMUTATION_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/push_heap.cpp b/dsp/lib/sprout/libs/algorithm/test/push_heap.cpp deleted file mode 100644 index 565fe54..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/push_heap.cpp +++ /dev/null @@ -1,134 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_PUSH_HEAP_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_PUSH_HEAP_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_push_heap_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{10, 8, 9, 6, 4, 5, 3, 1, 2, 7}}; - - // push heap - { - SPROUT_STATIC_CONSTEXPR auto heap = sprout::push_heap( - arr1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - heap, - array{{10, 8, 9, 6, 7, 5, 3, 1, 2, 4}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto heap = sprout::fit::push_heap( - arr1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - heap, - array{{10, 8, 9, 6, 7, 5, 3, 1, 2, 4}} - )); - } - // push heap - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto heap = sprout::push_heap( - sprout::sub(arr1, 2, 10) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - heap, - array{{9, 7, 4, 6, 3, 1, 2, 5}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(heap), - array{{10, 8, 9, 7, 4, 6, 3, 1, 2, 5}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto heap = sprout::fit::push_heap( - sprout::sub(arr1, 2, 10) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - heap, - array{{9, 7, 4, 6, 3, 1, 2, 5}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(heap), - array{{10, 8, 9, 7, 4, 6, 3, 1, 2, 5}} - )); - } - } - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{10, 8, 9, 6, 4, 5, 3, 1, 2, 7}}; - - // push heap - { - SPROUT_STATIC_CONSTEXPR auto heap = sprout::push_heap( - arr1, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - heap, - array{{10, 8, 9, 6, 7, 5, 3, 1, 2, 4}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto heap = sprout::fit::push_heap( - arr1, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - heap, - array{{10, 8, 9, 6, 7, 5, 3, 1, 2, 4}} - )); - } - // push heap - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto heap = sprout::push_heap( - sprout::sub(arr1, 2, 10), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - heap, - array{{9, 7, 4, 6, 3, 1, 2, 5}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(heap), - array{{10, 8, 9, 7, 4, 6, 3, 1, 2, 5}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto heap = sprout::fit::push_heap( - sprout::sub(arr1, 2, 10), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - heap, - array{{9, 7, 4, 6, 3, 1, 2, 5}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(heap), - array{{10, 8, 9, 7, 4, 6, 3, 1, 2, 5}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_push_heap_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_PUSH_HEAP_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/random_swap.cpp b/dsp/lib/sprout/libs/algorithm/test/random_swap.cpp deleted file mode 100644 index af051cb..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/random_swap.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_RANDOM_SWAP_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_RANDOM_SWAP_CPP - -#include -#include -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_random_swap_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - - // random swap - { - SPROUT_STATIC_CONSTEXPR auto random_swapped = sprout::random_swap( - arr1, - sprout::random::default_random_engine(SPROUT_UNIQUE_SEED) - ); - TESTSPR_BOTH_ASSERT(testspr::is_permutation( - random_swapped, - arr1 - )); - } - { - SPROUT_STATIC_CONSTEXPR auto random_swapped = sprout::fit::random_swap( - arr1, - sprout::random::default_random_engine(SPROUT_UNIQUE_SEED) - ); - TESTSPR_BOTH_ASSERT(testspr::is_permutation( - random_swapped, - arr1 - )); - } - // random swap - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto random_swapped = sprout::random_swap( - sprout::sub(arr1, 2, 8), - sprout::random::default_random_engine(SPROUT_UNIQUE_SEED) - ); - TESTSPR_BOTH_ASSERT(testspr::is_permutation( - random_swapped, - sprout::sub(arr1, 2, 8) - )); - TESTSPR_BOTH_ASSERT(testspr::is_permutation( - sprout::get_internal(random_swapped), - arr1 - )); - } - { - SPROUT_STATIC_CONSTEXPR auto random_swapped = sprout::fit::random_swap( - sprout::sub(arr1, 2, 8), - sprout::random::default_random_engine(SPROUT_UNIQUE_SEED) - ); - TESTSPR_BOTH_ASSERT(testspr::is_permutation( - random_swapped, - sprout::sub(arr1, 2, 8) - )); - TESTSPR_BOTH_ASSERT(testspr::is_permutation( - sprout::get_internal(random_swapped), - arr1 - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_random_swap_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_RANDOM_SWAP_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/random_swap_result.cpp b/dsp/lib/sprout/libs/algorithm/test/random_swap_result.cpp deleted file mode 100644 index 2f365f5..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/random_swap_result.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_RANDOM_SWAP_RESULT_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_RANDOM_SWAP_RESULT_CPP - -#include -#include -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_random_swap_result_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - SPROUT_STATIC_CONSTEXPR auto g = sprout::random::default_random_engine(SPROUT_UNIQUE_SEED); - - // random swap - { - SPROUT_STATIC_CONSTEXPR auto random_swapped = sprout::random_swap_result( - arr1, - g - ); - TESTSPR_BOTH_ASSERT(testspr::is_permutation( - sprout::get<0>(random_swapped), - arr1 - )); - SPROUT_STATIC_CONSTEXPR auto random_swapped2 = sprout::random_swap_result( - sprout::get<0>(random_swapped), - g - ); - TESTSPR_BOTH_ASSERT(sprout::get<1>(random_swapped) == sprout::get<1>(random_swapped2)); - } - { - SPROUT_STATIC_CONSTEXPR auto random_swapped = sprout::fit::random_swap_result( - arr1, - g - ); - TESTSPR_BOTH_ASSERT(testspr::is_permutation( - sprout::get<0>(random_swapped), - arr1 - )); - SPROUT_STATIC_CONSTEXPR auto random_swapped2 = sprout::random_swap_result( - sprout::get<0>(random_swapped), - g - ); - TESTSPR_BOTH_ASSERT(sprout::get<1>(random_swapped) == sprout::get<1>(random_swapped2)); - } - // random swap - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto random_swapped = sprout::random_swap_result( - sprout::sub(arr1, 2, 8), - g - ); - TESTSPR_BOTH_ASSERT(testspr::is_permutation( - sprout::get<0>(random_swapped), - sprout::sub(arr1, 2, 8) - )); - TESTSPR_BOTH_ASSERT(testspr::is_permutation( - sprout::get_internal(sprout::get<0>(random_swapped)), - arr1 - )); - SPROUT_STATIC_CONSTEXPR auto random_swapped2 = sprout::random_swap_result( - sprout::get<0>(random_swapped), - g - ); - TESTSPR_BOTH_ASSERT(sprout::get<1>(random_swapped) == sprout::get<1>(random_swapped2)); - } - { - SPROUT_STATIC_CONSTEXPR auto random_swapped = sprout::fit::random_swap_result( - sprout::sub(arr1, 2, 8), - g - ); - TESTSPR_BOTH_ASSERT(testspr::is_permutation( - sprout::get<0>(random_swapped), - sprout::sub(arr1, 2, 8) - )); - TESTSPR_BOTH_ASSERT(testspr::is_permutation( - sprout::get_internal(sprout::get<0>(random_swapped)), - arr1 - )); - SPROUT_STATIC_CONSTEXPR auto random_swapped2 = sprout::random_swap_result( - sprout::get<0>(random_swapped), - g - ); - TESTSPR_BOTH_ASSERT(sprout::get<1>(random_swapped) == sprout::get<1>(random_swapped2)); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_random_swap_result_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_RANDOM_SWAP_RESULT_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/recurrence.cpp b/dsp/lib/sprout/libs/algorithm/test/recurrence.cpp deleted file mode 100644 index 468fcb4..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/recurrence.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_RECURRENCE_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_RECURRENCE_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_recurrence_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - - // generate - { - SPROUT_STATIC_CONSTEXPR auto recurrenced = sprout::recurrence( - arr1, - testspr::x2(), - 2 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - recurrenced, - array{{2, 4, 8, 16, 32, 64, 128, 256, 512, 1024}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto recurrenced = sprout::fit::recurrence( - arr1, - testspr::x2(), - 2 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - recurrenced, - array{{2, 4, 8, 16, 32, 64, 128, 256, 512, 1024}} - )); - } - // generate - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto recurrenced = sprout::recurrence( - sprout::sub(arr1, 2, 8), - testspr::x2(), - 2 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - recurrenced, - array{{2, 4, 8, 16, 32, 64}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(recurrenced), - array{{1, 2, 2, 4, 8, 16, 32, 64, 9, 10}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto recurrenced = sprout::fit::recurrence( - sprout::sub(arr1, 2, 8), - testspr::x2(), - 2 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - recurrenced, - array{{2, 4, 8, 16, 32, 64}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(recurrenced), - array{{1, 2, 2, 4, 8, 16, 32, 64, 9, 10}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_recurrence_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_RECURRENCE_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/recurrence_n.cpp b/dsp/lib/sprout/libs/algorithm/test/recurrence_n.cpp deleted file mode 100644 index d7c785f..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/recurrence_n.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_RECURRENCE_N_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_RECURRENCE_N_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_recurrence_n_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - - // generate - { - SPROUT_STATIC_CONSTEXPR auto recurrenced = sprout::recurrence_n( - arr1, - 4, - testspr::x2(), - 1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - recurrenced, - array{{1, 2, 4, 8, 5, 6, 7, 8, 9, 10}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto recurrenced = sprout::fit::recurrence_n( - arr1, - 4, - testspr::x2(), - 1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - recurrenced, - array{{1, 2, 4, 8}} - )); - } - // generate - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto recurrenced = sprout::recurrence_n( - sprout::sub(arr1, 2, 8), - 4, - testspr::x2(), - 1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - recurrenced, - array{{1, 2, 4, 8, 7, 8}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(recurrenced), - array{{1, 2, 1, 2, 4, 8, 7, 8, 9, 10}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto recurrenced = sprout::fit::recurrence_n( - sprout::sub(arr1, 2, 8), - 4, - testspr::x2(), - 1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - recurrenced, - array{{1, 2, 4, 8}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(recurrenced), - array{{1, 2, 1, 2, 4, 8, 7, 8, 9, 10}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_recurrence_n_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_RECURRENCE_N_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/remove.cpp b/dsp/lib/sprout/libs/algorithm/test/remove.cpp deleted file mode 100644 index b446cdf..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/remove.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_REMOVE_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_REMOVE_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_remove_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 0, 3, 0, 5, 0, 7, 0, 9, 0}}; - - // remove (0) - { - SPROUT_STATIC_CONSTEXPR auto removed = sprout::remove( - arr1, - 0 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - removed, - array{{1, 3, 5, 7, 9, 0, 7, 0, 9, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto removed = sprout::fit::remove( - arr1, - 0 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - removed, - array{{1, 3, 5, 7, 9}} - )); - } - // remove (0) - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto removed = sprout::remove( - sprout::sub(arr1, 2, 8), - 0 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - removed, - array{{3, 5, 7, 0, 7, 0}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(removed), - array{{1, 0, 3, 5, 7, 0, 7, 0, 9, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto removed = sprout::fit::remove( - sprout::sub(arr1, 2, 8), - 0 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - removed, - array{{3, 5, 7}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(removed), - array{{1, 0, 3, 5, 7, 0, 7, 0, 9, 0}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_remove_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_REMOVE_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/remove_copy.cpp b/dsp/lib/sprout/libs/algorithm/test/remove_copy.cpp deleted file mode 100644 index 9b8ba8d..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/remove_copy.cpp +++ /dev/null @@ -1,119 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_REMOVE_COPY_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_REMOVE_COPY_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_remove_copy_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 0, 3, 0, 5, 0, 7, 0, 9, 0}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{}}; - - // remove in range [2 .. 8) (0) - { - SPROUT_STATIC_CONSTEXPR auto removed = sprout::remove_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr2, - 0 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - removed, - array{{3, 5, 7, 0, 0, 0, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto removed = sprout::fit::remove_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr2, - 0 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - removed, - array{{3, 5, 7}} - )); - } - // remove in range [2 .. 8) (0) - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto removed = sprout::remove_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr3, - 0 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - removed, - array{{3, 5}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto removed = sprout::fit::remove_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr3, - 0 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - removed, - array{{3, 5}} - )); - } - // remove in range [2 .. 8) (0) - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto removed = sprout::remove_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::sub(arr2, 2, 8), - 0 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - removed, - array{{3, 5, 7, 0, 0, 0}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(removed), - array{{0, 0, 3, 5, 7, 0, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto removed = sprout::fit::remove_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::sub(arr2, 2, 8), - 0 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - removed, - array{{3, 5, 7}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(removed), - array{{0, 0, 3, 5, 7, 0, 0, 0, 0, 0}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_remove_copy_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_REMOVE_COPY_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/remove_copy_if.cpp b/dsp/lib/sprout/libs/algorithm/test/remove_copy_if.cpp deleted file mode 100644 index 0d98656..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/remove_copy_if.cpp +++ /dev/null @@ -1,119 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_REMOVE_COPY_IF_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_REMOVE_COPY_IF_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_remove_copy_if_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 0, 3, 0, 5, 0, 7, 0, 9, 0}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{}}; - - // remove in range [2 .. 8) (odd) - { - SPROUT_STATIC_CONSTEXPR auto removed = sprout::remove_copy_if( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr2, - is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - removed, - array{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto removed = sprout::fit::remove_copy_if( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr2, - is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - removed, - array{{0, 0, 0}} - )); - } - // remove in range [2 .. 8) (odd) - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto removed = sprout::remove_copy_if( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr3, - is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - removed, - array{{0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto removed = sprout::fit::remove_copy_if( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr3, - is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - removed, - array{{0, 0}} - )); - } - // remove in range [2 .. 8) (odd) - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto removed = sprout::remove_copy_if( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::sub(arr2, 2, 8), - is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - removed, - array{{0, 0, 0, 0, 0, 0}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(removed), - array{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto removed = sprout::fit::remove_copy_if( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::sub(arr2, 2, 8), - is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - removed, - array{{0, 0, 0}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(removed), - array{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_remove_copy_if_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_REMOVE_COPY_IF_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/remove_if.cpp b/dsp/lib/sprout/libs/algorithm/test/remove_if.cpp deleted file mode 100644 index eeaad0d..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/remove_if.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_REMOVE_IF_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_REMOVE_IF_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_remove_if_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 0, 3, 0, 5, 0, 7, 0, 9, 0}}; - - // remove (odd) - { - SPROUT_STATIC_CONSTEXPR auto removed = sprout::remove_if( - arr1, - testspr::is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - removed, - array{{0, 0, 0, 0, 0, 0, 7, 0, 9, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto removed = sprout::fit::remove_if( - arr1, - testspr::is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - removed, - array{{0, 0, 0, 0, 0}} - )); - } - // remove (odd) - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto removed = sprout::remove_if( - sprout::sub(arr1, 2, 8), - testspr::is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - removed, - array{{0, 0, 0, 0, 7, 0}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(removed), - array{{1, 0, 0, 0, 0, 0, 7, 0, 9, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto removed = sprout::fit::remove_if( - sprout::sub(arr1, 2, 8), - testspr::is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - removed, - array{{0, 0, 0}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(removed), - array{{1, 0, 0, 0, 0, 0, 7, 0, 9, 0}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_remove_if_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_REMOVE_IF_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/replace.cpp b/dsp/lib/sprout/libs/algorithm/test/replace.cpp deleted file mode 100644 index c9cfcf1..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/replace.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_REPLACE_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_REPLACE_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_replace_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 0, 3, 0, 5, 0, 7, 0, 9, 0}}; - - // replace (0 -> -1) - { - SPROUT_STATIC_CONSTEXPR auto replaced = sprout::replace( - arr1, - 0, - -1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - replaced, - array{{1, -1, 3, -1, 5, -1, 7, -1, 9, -1}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto replaced = sprout::fit::replace( - arr1, - 0, - -1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - replaced, - array{{1, -1, 3, -1, 5, -1, 7, -1, 9, -1}} - )); - } - // replace (0 -> -1) - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto replaced = sprout::replace( - sprout::sub(arr1, 2, 8), - 0, - -1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - replaced, - array{{3, -1, 5, -1, 7, -1}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(replaced), - array{{1, 0, 3, -1, 5, -1, 7, -1, 9, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto replaced = sprout::fit::replace( - sprout::sub(arr1, 2, 8), - 0, - -1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - replaced, - array{{3, -1, 5, -1, 7, -1}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(replaced), - array{{1, 0, 3, -1, 5, -1, 7, -1, 9, 0}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_replace_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_REPLACE_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/replace_copy.cpp b/dsp/lib/sprout/libs/algorithm/test/replace_copy.cpp deleted file mode 100644 index 5c31ab7..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/replace_copy.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_REPLACE_COPY_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_REPLACE_COPY_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_replace_copy_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 0, 3, 0, 5, 0, 7, 0, 9, 0}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{}}; - - // replace in range [2 .. 8) (0 -> -1) - { - SPROUT_STATIC_CONSTEXPR auto replaced = sprout::replace_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr2, - 0, - -1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - replaced, - array{{3, -1, 5, -1, 7, -1, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto replaced = sprout::fit::replace_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr2, - 0, - -1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - replaced, - array{{3, -1, 5, -1, 7, -1}} - )); - } - // replace in range [2 .. 8) (0 -> -1) - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto replaced = sprout::replace_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr3, - 0, - -1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - replaced, - array{{3, -1, 5, -1}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto replaced = sprout::fit::replace_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr3, - 0, - -1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - replaced, - array{{3, -1, 5, -1}} - )); - } - // replace in range [2 .. 8) (0 -> -1) - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto replaced = sprout::replace_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::sub(arr2, 2, 8), - 0, - -1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - replaced, - array{{3, -1, 5, -1, 7, -1}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(replaced), - array{{0, 0, 3, -1, 5, -1, 7, -1, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto replaced = sprout::fit::replace_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::sub(arr2, 2, 8), - 0, - -1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - replaced, - array{{3, -1, 5, -1, 7, -1}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(replaced), - array{{0, 0, 3, -1, 5, -1, 7, -1, 0, 0}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_replace_copy_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_REPLACE_COPY_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/replace_copy_if.cpp b/dsp/lib/sprout/libs/algorithm/test/replace_copy_if.cpp deleted file mode 100644 index 9ad06b9..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/replace_copy_if.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_REPLACE_COPY_IF_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_REPLACE_COPY_IF_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_replace_copy_if_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 0, 3, 0, 5, 0, 7, 0, 9, 0}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{}}; - - // replace in range [2 .. 8) (odd -> -1) - { - SPROUT_STATIC_CONSTEXPR auto replaced = sprout::replace_copy_if( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr2, - is_odd(), - -1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - replaced, - array{{-1, 0, -1, 0, -1, 0, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto replaced = sprout::fit::replace_copy_if( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr2, - is_odd(), - -1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - replaced, - array{{-1, 0, -1, 0, -1, 0}} - )); - } - // replace in range [2 .. 8) (odd -> -1) - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto replaced = sprout::replace_copy_if( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr3, - is_odd(), - -1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - replaced, - array{{-1, 0, -1, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto replaced = sprout::fit::replace_copy_if( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr3, - is_odd(), - -1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - replaced, - array{{-1, 0, -1, 0}} - )); - } - // replace in range [2 .. 8) (odd -> -1) - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto replaced = sprout::replace_copy_if( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::sub(arr2, 2, 8), - is_odd(), - -1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - replaced, - array{{-1, 0, -1, 0, -1, 0}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(replaced), - array{{0, 0, -1, 0, -1, 0, -1, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto replaced = sprout::fit::replace_copy_if( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::sub(arr2, 2, 8), - is_odd(), - -1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - replaced, - array{{-1, 0, -1, 0, -1, 0}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(replaced), - array{{0, 0, -1, 0, -1, 0, -1, 0, 0, 0}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_replace_copy_if_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_REPLACE_COPY_IF_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/replace_if.cpp b/dsp/lib/sprout/libs/algorithm/test/replace_if.cpp deleted file mode 100644 index c3c15fc..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/replace_if.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_REPLACE_IF_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_REPLACE_IF_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_replace_if_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 0, 3, 0, 5, 0, 7, 0, 9, 0}}; - - // replace (odd -> -1) - { - SPROUT_STATIC_CONSTEXPR auto replaced = sprout::replace_if( - arr1, - is_odd(), - -1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - replaced, - array{{-1, 0, -1, 0, -1, 0, -1, 0, -1, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto replaced = sprout::fit::replace_if( - arr1, - is_odd(), - -1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - replaced, - array{{-1, 0, -1, 0, -1, 0, -1, 0, -1, 0}} - )); - } - // replace (odd -> -1) - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto replaced = sprout::replace_if( - sprout::sub(arr1, 2, 8), - is_odd(), - -1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - replaced, - array{{-1, 0, -1, 0, -1, 0}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(replaced), - array{{1, 0, -1, 0, -1, 0, -1, 0, 9, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto replaced = sprout::fit::replace_if( - sprout::sub(arr1, 2, 8), - is_odd(), - -1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - replaced, - array{{-1, 0, -1, 0, -1, 0}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(replaced), - array{{1, 0, -1, 0, -1, 0, -1, 0, 9, 0}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_replace_if_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_REPLACE_IF_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/reverse.cpp b/dsp/lib/sprout/libs/algorithm/test/reverse.cpp deleted file mode 100644 index 6a402c1..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/reverse.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_REBERSE_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_REBERSE_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_reverse_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - - // reverse - { - SPROUT_STATIC_CONSTEXPR auto reversed = sprout::reverse( - arr1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - reversed, - array{{10, 9, 8, 7, 6, 5, 4, 3, 2, 1}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto reversed = sprout::fit::reverse( - arr1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - reversed, - array{{10, 9, 8, 7, 6, 5, 4, 3, 2, 1}} - )); - } - // reverse - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto reversed = sprout::reverse( - sprout::sub(arr1, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - reversed, - array{{8, 7, 6, 5, 4, 3}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(reversed), - array{{1, 2, 8, 7, 6, 5, 4, 3, 9, 10}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto reversed = sprout::fit::reverse( - sprout::sub(arr1, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - reversed, - array{{8, 7, 6, 5, 4, 3}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(reversed), - array{{1, 2, 8, 7, 6, 5, 4, 3, 9, 10}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_reverse_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_REBERSE_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/reverse_copy.cpp b/dsp/lib/sprout/libs/algorithm/test/reverse_copy.cpp deleted file mode 100644 index 29e37cd..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/reverse_copy.cpp +++ /dev/null @@ -1,113 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_REBERSE_COPY_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_REBERSE_COPY_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_reverse_copy_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{}}; - - // reverse in range [2 .. 8) - { - SPROUT_STATIC_CONSTEXPR auto reversed = sprout::reverse_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr2 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - reversed, - array{{8, 7, 6, 5, 4, 3, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto reversed = sprout::fit::reverse_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr2 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - reversed, - array{{8, 7, 6, 5, 4, 3}} - )); - } - // reverse in range [2 .. 8) - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto reversed = sprout::reverse_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr3 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - reversed, - array{{8, 7, 6, 5}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto reversed = sprout::fit::reverse_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr3 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - reversed, - array{{8, 7, 6, 5}} - )); - } - // reverse in range [2 .. 8) - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto reversed = sprout::reverse_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::sub(arr2, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - reversed, - array{{8, 7, 6, 5, 4, 3}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(reversed), - array{{0, 0, 8, 7, 6, 5, 4, 3, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto reversed = sprout::fit::reverse_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::sub(arr2, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - reversed, - array{{8, 7, 6, 5, 4, 3}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(reversed), - array{{0, 0, 8, 7, 6, 5, 4, 3, 0, 0}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_reverse_copy_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_REBERSE_COPY_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/rotate.cpp b/dsp/lib/sprout/libs/algorithm/test/rotate.cpp deleted file mode 100644 index 5ecf41a..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/rotate.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_ROTATE_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_ROTATE_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_rotate_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - - // rotate - { - SPROUT_STATIC_CONSTEXPR auto rotated = sprout::rotate( - arr1, - sprout::begin(arr1) + 4 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - rotated, - array{{5, 6, 7, 8, 9, 10, 1, 2, 3, 4}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto rotated = sprout::fit::rotate( - arr1, - sprout::begin(arr1) + 4 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - rotated, - array{{5, 6, 7, 8, 9, 10, 1, 2, 3, 4}} - )); - } - // rotate - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto rotated = sprout::rotate( - sprout::sub(arr1, 2, 8), - sprout::begin(arr1) + 4 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - rotated, - array{{5, 6, 7, 8, 3, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(rotated), - array{{1, 2, 5, 6, 7, 8, 3, 4, 9, 10}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto rotated = sprout::fit::rotate( - sprout::sub(arr1, 2, 8), - sprout::begin(arr1) + 4 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - rotated, - array{{5, 6, 7, 8, 3, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(rotated), - array{{1, 2, 5, 6, 7, 8, 3, 4, 9, 10}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_rotate_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_ROTATE_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/rotate_copy.cpp b/dsp/lib/sprout/libs/algorithm/test/rotate_copy.cpp deleted file mode 100644 index 5921313..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/rotate_copy.cpp +++ /dev/null @@ -1,205 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_ROTATE_COPY_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_ROTATE_COPY_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_rotate_copy_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{}}; - - // rotate in range [2 .. 8) - { - SPROUT_STATIC_CONSTEXPR auto rotated = sprout::rotate_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 4, - sprout::begin(arr1) + 8, - arr2 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - rotated, - array{{5, 6, 7, 8, 3, 4, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto rotated = sprout::fit::rotate_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 4, - sprout::begin(arr1) + 8, - arr2 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - rotated, - array{{5, 6, 7, 8, 3, 4}} - )); - } - // rotate in range [2 .. 8) - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto rotated = sprout::rotate_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 4, - sprout::begin(arr1) + 7, - arr3 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - rotated, - array{{5, 6, 7, 3}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto rotated = sprout::fit::rotate_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 4, - sprout::begin(arr1) + 7, - arr3 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - rotated, - array{{5, 6, 7, 3}} - )); - } - // rotate in range [2 .. 8) - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto rotated = sprout::rotate_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 4, - sprout::begin(arr1) + 8, - sprout::sub(arr2, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - rotated, - array{{5, 6, 7, 8, 3, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(rotated), - array{{0, 0, 5, 6, 7, 8, 3, 4, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto rotated = sprout::fit::rotate_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 4, - sprout::begin(arr1) + 8, - sprout::sub(arr2, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - rotated, - array{{5, 6, 7, 8, 3, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(rotated), - array{{0, 0, 5, 6, 7, 8, 3, 4, 0, 0}} - )); - } - - // rotate in range [2 .. 8) - { - SPROUT_STATIC_CONSTEXPR auto rotated = sprout::rotate_copy( - testspr::reduce_forward(sprout::begin(arr1) + 2), - testspr::reduce_forward(sprout::begin(arr1) + 4), - testspr::reduce_forward(sprout::begin(arr1) + 8), - arr2 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - rotated, - array{{5, 6, 7, 8, 3, 4, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto rotated = sprout::fit::rotate_copy( - testspr::reduce_forward(sprout::begin(arr1) + 2), - testspr::reduce_forward(sprout::begin(arr1) + 4), - testspr::reduce_forward(sprout::begin(arr1) + 8), - arr2 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - rotated, - array{{5, 6, 7, 8, 3, 4}} - )); - } - // rotate in range [2 .. 8) - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto rotated = sprout::rotate_copy( - testspr::reduce_forward(sprout::begin(arr1) + 2), - testspr::reduce_forward(sprout::begin(arr1) + 4), - testspr::reduce_forward(sprout::begin(arr1) + 7), - arr3 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - rotated, - array{{5, 6, 7, 3}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto rotated = sprout::fit::rotate_copy( - testspr::reduce_forward(sprout::begin(arr1) + 2), - testspr::reduce_forward(sprout::begin(arr1) + 4), - testspr::reduce_forward(sprout::begin(arr1) + 7), - arr3 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - rotated, - array{{5, 6, 7, 3}} - )); - } - // rotate in range [2 .. 8) - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto rotated = sprout::rotate_copy( - testspr::reduce_forward(sprout::begin(arr1) + 2), - testspr::reduce_forward(sprout::begin(arr1) + 4), - testspr::reduce_forward(sprout::begin(arr1) + 8), - sprout::sub(arr2, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - rotated, - array{{5, 6, 7, 8, 3, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(rotated), - array{{0, 0, 5, 6, 7, 8, 3, 4, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto rotated = sprout::fit::rotate_copy( - testspr::reduce_forward(sprout::begin(arr1) + 2), - testspr::reduce_forward(sprout::begin(arr1) + 4), - testspr::reduce_forward(sprout::begin(arr1) + 8), - sprout::sub(arr2, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - rotated, - array{{5, 6, 7, 8, 3, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(rotated), - array{{0, 0, 5, 6, 7, 8, 3, 4, 0, 0}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_rotate_copy_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_ROTATE_COPY_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/search.cpp b/dsp/lib/sprout/libs/algorithm/test/search.cpp deleted file mode 100644 index 87b8c01..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/search.cpp +++ /dev/null @@ -1,266 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_SEARCH_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_SEARCH_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_search_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{4, 5, 6}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{6, 5, 4}}; - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr2), - sprout::end(arr2) - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr3), - sprout::end(arr3) - ); - TESTSPR_BOTH_ASSERT(found == sprout::end(arr1)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr2), - sprout::end(arr2) - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr3), - sprout::end(arr3) - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr2), - sprout::end(arr2), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr3), - sprout::end(arr3), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found == sprout::end(arr1)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr2), - sprout::end(arr2), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr3), - sprout::end(arr3), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)), - testspr::reduce_forward(sprout::begin(arr2)), - testspr::reduce_forward(sprout::end(arr2)) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)), - testspr::reduce_forward(sprout::begin(arr3)), - testspr::reduce_forward(sprout::end(arr3)) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::end(arr1)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5), - testspr::reduce_forward(sprout::begin(arr2)), - testspr::reduce_forward(sprout::end(arr2)) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5), - testspr::reduce_forward(sprout::begin(arr3)), - testspr::reduce_forward(sprout::end(arr3)) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)), - testspr::reduce_forward(sprout::begin(arr2)), - testspr::reduce_forward(sprout::end(arr2)), - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)), - testspr::reduce_forward(sprout::begin(arr3)), - testspr::reduce_forward(sprout::end(arr3)), - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::end(arr1)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5), - testspr::reduce_forward(sprout::begin(arr2)), - testspr::reduce_forward(sprout::end(arr2)), - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5), - testspr::reduce_forward(sprout::begin(arr3)), - testspr::reduce_forward(sprout::end(arr3)), - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::end(arr3)) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::end(arr1)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::end(arr3)) - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)), - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::end(arr3)), - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::end(arr1)); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)), - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::end(arr3)), - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_search_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_SEARCH_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/search_n.cpp b/dsp/lib/sprout/libs/algorithm/test/search_n.cpp deleted file mode 100644 index e9bbdbb..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/search_n.cpp +++ /dev/null @@ -1,264 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_SEARCH_N_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_SEARCH_N_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_search_n_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 5, 5, 5, 5, 8, 9, 10}}; - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search_n( - sprout::begin(arr1), - sprout::end(arr1), - 2, - 5 - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search_n( - sprout::begin(arr1), - sprout::end(arr1), - 4, - 5 - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search_n( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - 2, - 5 - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search_n( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - 4, - 5 - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search_n( - sprout::begin(arr1), - sprout::end(arr1), - 2, - 5, - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search_n( - sprout::begin(arr1), - sprout::end(arr1), - 4, - 5, - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search_n( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - 2, - 5, - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search_n( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - 4, - 5, - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search_n( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)), - 2, - 5 - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search_n( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)), - 4, - 5 - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search_n( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5), - 2, - 5 - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search_n( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5), - 4, - 5 - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search_n( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)), - 2, - 5, - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search_n( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)), - 4, - 5, - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search_n( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5), - 2, - 5, - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search_n( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5), - 4, - 5, - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search_n( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - 2, - 5 - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search_n( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - 4, - 5 - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search_n( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - 2, - 5 - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search_n( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - 4, - 5 - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search_n( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - 2, - 5, - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search_n( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - 4, - 5, - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search_n( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - 2, - 5, - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::search_n( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - 4, - 5, - testspr::equal_to() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_search_n_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_SEARCH_N_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/set_difference.cpp b/dsp/lib/sprout/libs/algorithm/test/set_difference.cpp deleted file mode 100644 index 49d3dbc..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/set_difference.cpp +++ /dev/null @@ -1,230 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_SET_DIFFERENCE_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_SET_DIFFERENCE_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_set_difference_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{5, 10, 15, 20, 25}}; - SPROUT_STATIC_CONSTEXPR auto arr1_2 = array{{10, 20, 30, 40, 50}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{}}; - - // difference - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::set_difference( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr2 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 15, 25, 0, 0, 0, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::set_difference( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr2 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 15, 25}} - )); - } - // difference - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::set_difference( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr3 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 15}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::set_difference( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr3 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 15}} - )); - } - // difference - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::set_difference( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - sprout::sub(arr2, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 15, 25, 0, 0, 0}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(merged), - array{{0, 0, 5, 15, 25, 0, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::set_difference( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - sprout::sub(arr2, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 15, 25}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(merged), - array{{0, 0, 5, 15, 25, 0, 0, 0, 0, 0}} - )); - } - } - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{5, 10, 15, 20, 25}}; - SPROUT_STATIC_CONSTEXPR auto arr1_2 = array{{10, 20, 30, 40, 50}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{}}; - - // difference - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::set_difference( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr2, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 15, 25, 0, 0, 0, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::set_difference( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr2, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 15, 25}} - )); - } - // difference - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::set_difference( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr3, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 15}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::set_difference( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr3, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 15}} - )); - } - // difference - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::set_difference( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - sprout::sub(arr2, 2, 8), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 15, 25, 0, 0, 0}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(merged), - array{{0, 0, 5, 15, 25, 0, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::set_difference( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - sprout::sub(arr2, 2, 8), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 15, 25}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(merged), - array{{0, 0, 5, 15, 25, 0, 0, 0, 0, 0}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_set_difference_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_SET_DIFFERENCE_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/set_intersection.cpp b/dsp/lib/sprout/libs/algorithm/test/set_intersection.cpp deleted file mode 100644 index 3eb8496..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/set_intersection.cpp +++ /dev/null @@ -1,230 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_SET_INTERSECTION_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_SET_INTERSECTION_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_set_intersection_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{20, 25, 30, 35, 40}}; - SPROUT_STATIC_CONSTEXPR auto arr1_2 = array{{10, 20, 30, 40, 50}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{}}; - - // intersection - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::set_intersection( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr2 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{20, 30, 40, 0, 0, 0, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::set_intersection( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr2 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{20, 30, 40}} - )); - } - // intersection - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::set_intersection( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr3 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{20, 30}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::set_intersection( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr3 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{20, 30}} - )); - } - // intersection - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::set_intersection( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - sprout::sub(arr2, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{20, 30, 40, 0, 0, 0}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(merged), - array{{0, 0, 20, 30, 40, 0, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::set_intersection( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - sprout::sub(arr2, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{20, 30, 40}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(merged), - array{{0, 0, 20, 30, 40, 0, 0, 0, 0, 0}} - )); - } - } - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{20, 25, 30, 35, 40}}; - SPROUT_STATIC_CONSTEXPR auto arr1_2 = array{{10, 20, 30, 40, 50}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{}}; - - // intersection - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::set_intersection( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr2, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{20, 30, 40, 0, 0, 0, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::set_intersection( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr2, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{20, 30, 40}} - )); - } - // intersection - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::set_intersection( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr3, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{20, 30}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::set_intersection( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr3, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{20, 30}} - )); - } - // intersection - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::set_intersection( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - sprout::sub(arr2, 2, 8), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{20, 30, 40, 0, 0, 0}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(merged), - array{{0, 0, 20, 30, 40, 0, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::set_intersection( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - sprout::sub(arr2, 2, 8), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{20, 30, 40}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(merged), - array{{0, 0, 20, 30, 40, 0, 0, 0, 0, 0}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_set_intersection_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_SET_INTERSECTION_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/set_symmetric_difference.cpp b/dsp/lib/sprout/libs/algorithm/test/set_symmetric_difference.cpp deleted file mode 100644 index 5594532..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/set_symmetric_difference.cpp +++ /dev/null @@ -1,230 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_SET_SYMMETRIC_DIFFERENCE_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_SET_SYMMETRIC_DIFFERENCE_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_set_symmetric_difference_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{5, 10, 15, 20, 25}}; - SPROUT_STATIC_CONSTEXPR auto arr1_2 = array{{10, 20, 30, 40, 50}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{}}; - - // symmetric difference - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::set_symmetric_difference( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr2 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 15, 25, 30, 40, 50, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::set_symmetric_difference( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr2 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 15, 25, 30, 40, 50}} - )); - } - // symmetric difference - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::set_symmetric_difference( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr3 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 15, 25, 30}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::set_symmetric_difference( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr3 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 15, 25, 30}} - )); - } - // symmetric difference - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::set_symmetric_difference( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - sprout::sub(arr2, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 15, 25, 30, 40, 50}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(merged), - array{{0, 0, 5, 15, 25, 30, 40, 50, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::set_symmetric_difference( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - sprout::sub(arr2, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 15, 25, 30, 40, 50}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(merged), - array{{0, 0, 5, 15, 25, 30, 40, 50, 0, 0}} - )); - } - } - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{5, 10, 15, 20, 25}}; - SPROUT_STATIC_CONSTEXPR auto arr1_2 = array{{10, 20, 30, 40, 50}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{}}; - - // symmetric difference - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::set_symmetric_difference( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr2, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 15, 25, 30, 40, 50, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::set_symmetric_difference( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr2, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 15, 25, 30, 40, 50}} - )); - } - // symmetric difference - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::set_symmetric_difference( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr3, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 15, 25, 30}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::set_symmetric_difference( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr3, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 15, 25, 30}} - )); - } - // symmetric difference - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::set_symmetric_difference( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - sprout::sub(arr2, 2, 8), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 15, 25, 30, 40, 50}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(merged), - array{{0, 0, 5, 15, 25, 30, 40, 50, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::set_symmetric_difference( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - sprout::sub(arr2, 2, 8), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 15, 25, 30, 40, 50}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(merged), - array{{0, 0, 5, 15, 25, 30, 40, 50, 0, 0}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_set_symmetric_difference_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_SET_SYMMETRIC_DIFFERENCE_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/set_union.cpp b/dsp/lib/sprout/libs/algorithm/test/set_union.cpp deleted file mode 100644 index f174efc..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/set_union.cpp +++ /dev/null @@ -1,230 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_SET_UNION_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_SET_UNION_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_set_union_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{5, 10, 15, 20, 25}}; - SPROUT_STATIC_CONSTEXPR auto arr1_2 = array{{10, 20, 30, 40, 50}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{}}; - - // union - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::set_union( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr2 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 10, 15, 20, 25, 30, 40, 50, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::set_union( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr2 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 10, 15, 20, 25, 30, 40, 50}} - )); - } - // union - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::set_union( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr3 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 10, 15, 20}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::set_union( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr3 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 10, 15, 20}} - )); - } - // union - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::set_union( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - sprout::sub(arr2, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 10, 15, 20, 25, 30}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(merged), - array{{0, 0, 5, 10, 15, 20, 25, 30, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::set_union( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - sprout::sub(arr2, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 10, 15, 20, 25, 30}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(merged), - array{{0, 0, 5, 10, 15, 20, 25, 30, 0, 0}} - )); - } - } - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{5, 10, 15, 20, 25}}; - SPROUT_STATIC_CONSTEXPR auto arr1_2 = array{{10, 20, 30, 40, 50}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{}}; - - // union - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::set_union( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr2, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 10, 15, 20, 25, 30, 40, 50, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::set_union( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr2, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 10, 15, 20, 25, 30, 40, 50}} - )); - } - // union - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::set_union( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr3, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 10, 15, 20}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::set_union( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - arr3, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 10, 15, 20}} - )); - } - // union - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::set_union( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - sprout::sub(arr2, 2, 8), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 10, 15, 20, 25, 30}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(merged), - array{{0, 0, 5, 10, 15, 20, 25, 30, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto merged = sprout::fit::set_union( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr1_2), - sprout::end(arr1_2), - sprout::sub(arr2, 2, 8), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - merged, - array{{5, 10, 15, 20, 25, 30}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(merged), - array{{0, 0, 5, 10, 15, 20, 25, 30, 0, 0}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_set_union_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_SET_UNION_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/shuffle.cpp b/dsp/lib/sprout/libs/algorithm/test/shuffle.cpp deleted file mode 100644 index deb4187..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/shuffle.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_SHUFFLE_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_SHUFFLE_CPP - -#include -#include -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_shuffle_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - - // shuffle - { - SPROUT_STATIC_CONSTEXPR auto shuffled = sprout::shuffle( - arr1, - sprout::random::default_random_engine(SPROUT_UNIQUE_SEED) - ); - TESTSPR_BOTH_ASSERT(testspr::is_permutation( - shuffled, - arr1 - )); - } - { - SPROUT_STATIC_CONSTEXPR auto shuffled = sprout::fit::shuffle( - arr1, - sprout::random::default_random_engine(SPROUT_UNIQUE_SEED) - ); - TESTSPR_BOTH_ASSERT(testspr::is_permutation( - shuffled, - arr1 - )); - } - // shuffle - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto shuffled = sprout::shuffle( - sprout::sub(arr1, 2, 8), - sprout::random::default_random_engine(SPROUT_UNIQUE_SEED) - ); - TESTSPR_BOTH_ASSERT(testspr::is_permutation( - shuffled, - sprout::sub(arr1, 2, 8) - )); - TESTSPR_BOTH_ASSERT(testspr::is_permutation( - sprout::get_internal(shuffled), - arr1 - )); - } - { - SPROUT_STATIC_CONSTEXPR auto shuffled = sprout::fit::shuffle( - sprout::sub(arr1, 2, 8), - sprout::random::default_random_engine(SPROUT_UNIQUE_SEED) - ); - TESTSPR_BOTH_ASSERT(testspr::is_permutation( - shuffled, - sprout::sub(arr1, 2, 8) - )); - TESTSPR_BOTH_ASSERT(testspr::is_permutation( - sprout::get_internal(shuffled), - arr1 - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_shuffle_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_SHUFFLE_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/shuffle_result.cpp b/dsp/lib/sprout/libs/algorithm/test/shuffle_result.cpp deleted file mode 100644 index 5e1f1e6..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/shuffle_result.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_SHUFFLE_RESULT_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_SHUFFLE_RESULT_CPP - -#include -#include -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_shuffle_result_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - SPROUT_STATIC_CONSTEXPR auto g = sprout::random::default_random_engine(SPROUT_UNIQUE_SEED); - - // shuffle - { - SPROUT_STATIC_CONSTEXPR auto shuffled = sprout::shuffle_result( - arr1, - g - ); - TESTSPR_BOTH_ASSERT(testspr::is_permutation( - sprout::get<0>(shuffled), - arr1 - )); - SPROUT_STATIC_CONSTEXPR auto shuffled2 = sprout::shuffle_result( - sprout::get<0>(shuffled), - g - ); - TESTSPR_BOTH_ASSERT(sprout::get<1>(shuffled) == sprout::get<1>(shuffled2)); - } - { - SPROUT_STATIC_CONSTEXPR auto shuffled = sprout::fit::shuffle_result( - arr1, - g - ); - TESTSPR_BOTH_ASSERT(testspr::is_permutation( - sprout::get<0>(shuffled), - arr1 - )); - SPROUT_STATIC_CONSTEXPR auto shuffled2 = sprout::shuffle_result( - sprout::get<0>(shuffled), - g - ); - TESTSPR_BOTH_ASSERT(sprout::get<1>(shuffled) == sprout::get<1>(shuffled2)); - } - // shuffle - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto shuffled = sprout::shuffle_result( - sprout::sub(arr1, 2, 8), - g - ); - TESTSPR_BOTH_ASSERT(testspr::is_permutation( - sprout::get<0>(shuffled), - sprout::sub(arr1, 2, 8) - )); - TESTSPR_BOTH_ASSERT(testspr::is_permutation( - sprout::get_internal(sprout::get<0>(shuffled)), - arr1 - )); - SPROUT_STATIC_CONSTEXPR auto shuffled2 = sprout::shuffle_result( - sprout::get<0>(shuffled), - g - ); - TESTSPR_BOTH_ASSERT(sprout::get<1>(shuffled) == sprout::get<1>(shuffled2)); - } - { - SPROUT_STATIC_CONSTEXPR auto shuffled = sprout::fit::shuffle_result( - sprout::sub(arr1, 2, 8), - g - ); - TESTSPR_BOTH_ASSERT(testspr::is_permutation( - sprout::get<0>(shuffled), - sprout::sub(arr1, 2, 8) - )); - TESTSPR_BOTH_ASSERT(testspr::is_permutation( - sprout::get_internal(sprout::get<0>(shuffled)), - arr1 - )); - SPROUT_STATIC_CONSTEXPR auto shuffled2 = sprout::shuffle_result( - sprout::get<0>(shuffled), - g - ); - TESTSPR_BOTH_ASSERT(sprout::get<1>(shuffled) == sprout::get<1>(shuffled2)); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_shuffle_result_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_SHUFFLE_RESULT_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/sort.cpp b/dsp/lib/sprout/libs/algorithm/test/sort.cpp deleted file mode 100644 index fe75f36..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/sort.cpp +++ /dev/null @@ -1,134 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_SORT_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_SORT_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_sort_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{5, 1, 9, 4, 8, 2, 7, 3, 10, 6}}; - - // sort - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::sort( - arr1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::sort( - arr1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}} - )); - } - // sort - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::sort( - sprout::sub(arr1, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{2, 3, 4, 7, 8, 9}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sorted), - array{{5, 1, 2, 3, 4, 7, 8, 9, 10, 6}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::sort( - sprout::sub(arr1, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{2, 3, 4, 7, 8, 9}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sorted), - array{{5, 1, 2, 3, 4, 7, 8, 9, 10, 6}} - )); - } - } - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{5, 1, 9, 4, 8, 2, 7, 3, 10, 6}}; - - // sort - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::sort( - arr1, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::sort( - arr1, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}} - )); - } - // sort - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::sort( - sprout::sub(arr1, 2, 8), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{2, 3, 4, 7, 8, 9}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sorted), - array{{5, 1, 2, 3, 4, 7, 8, 9, 10, 6}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::sort( - sprout::sub(arr1, 2, 8), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{2, 3, 4, 7, 8, 9}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sorted), - array{{5, 1, 2, 3, 4, 7, 8, 9, 10, 6}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_sort_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_SORT_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/sort_heap.cpp b/dsp/lib/sprout/libs/algorithm/test/sort_heap.cpp deleted file mode 100644 index 1ba6c01..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/sort_heap.cpp +++ /dev/null @@ -1,134 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_SORT_HEAP_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_SORT_HEAP_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_sort_heap_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{10, 9, 8, 6, 7, 2, 5, 3, 4, 1}}; - - // sort - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::sort_heap( - arr1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::sort_heap( - arr1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}} - )); - } - // sort - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::sort_heap( - sprout::sub(arr1, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{2, 3, 5, 6, 7, 8}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sorted), - array{{10, 9, 2, 3, 5, 6, 7, 8, 4, 1}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::sort_heap( - sprout::sub(arr1, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{2, 3, 5, 6, 7, 8}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sorted), - array{{10, 9, 2, 3, 5, 6, 7, 8, 4, 1}} - )); - } - } - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{10, 9, 8, 6, 7, 2, 5, 3, 4, 1}}; - - // sort - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::sort_heap( - arr1, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::sort_heap( - arr1, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}} - )); - } - // sort - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::sort_heap( - sprout::sub(arr1, 2, 8), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{2, 3, 5, 6, 7, 8}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sorted), - array{{10, 9, 2, 3, 5, 6, 7, 8, 4, 1}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::sort_heap( - sprout::sub(arr1, 2, 8), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{2, 3, 5, 6, 7, 8}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sorted), - array{{10, 9, 2, 3, 5, 6, 7, 8, 4, 1}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_sort_heap_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_SORT_HEAP_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/stable_partition.cpp b/dsp/lib/sprout/libs/algorithm/test/stable_partition.cpp deleted file mode 100644 index 56d3ef0..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/stable_partition.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_STABLE_PARTITION_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_STABLE_PARTITION_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_stable_partition_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - - // partition (odd) - { - SPROUT_STATIC_CONSTEXPR auto partitioned = sprout::stable_partition( - arr1, - testspr::is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - partitioned, - array{{1, 3, 5, 7, 9, 2, 4, 6, 8, 10}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto partitioned = sprout::fit::stable_partition( - arr1, - testspr::is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - partitioned, - array{{1, 3, 5, 7, 9}} - )); - } - // partition (odd) - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto partitioned = sprout::stable_partition( - sprout::sub(arr1, 2, 8), - testspr::is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - partitioned, - array{{3, 5, 7, 4, 6, 8}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(partitioned), - array{{1, 2, 3, 5, 7, 4, 6, 8, 9, 10}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto partitioned = sprout::fit::stable_partition( - sprout::sub(arr1, 2, 8), - testspr::is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - partitioned, - array{{3, 5, 7}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(partitioned), - array{{1, 2, 3, 5, 7, 4, 6, 8, 9, 10}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_stable_partition_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_STABLE_PARTITION_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/stable_partition_copy.cpp b/dsp/lib/sprout/libs/algorithm/test/stable_partition_copy.cpp deleted file mode 100644 index fa136b9..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/stable_partition_copy.cpp +++ /dev/null @@ -1,119 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_STABLE_PARTITION_COPY_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_STABLE_PARTITION_COPY_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_stable_partition_copy_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{}}; - - // partition in range [2 .. 8) (odd) - { - SPROUT_STATIC_CONSTEXPR auto partitioned = sprout::stable_partition_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr2, - is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - partitioned, - array{{3, 5, 7, 4, 6, 8, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto partitioned = sprout::fit::stable_partition_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr2, - is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - partitioned, - array{{3, 5, 7}} - )); - } - // partition in range [2 .. 8) (odd) - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto partitioned = sprout::stable_partition_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr3, - is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - partitioned, - array{{3, 5, 7, 4}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto partitioned = sprout::fit::stable_partition_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr3, - is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - partitioned, - array{{3, 5, 7}} - )); - } - // partition in range [2 .. 8) (odd) - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto partitioned = sprout::stable_partition_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::sub(arr2, 2, 8), - is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - partitioned, - array{{3, 5, 7, 4, 6, 8}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(partitioned), - array{{0, 0, 3, 5, 7, 4, 6, 8, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto partitioned = sprout::fit::stable_partition_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::sub(arr2, 2, 8), - is_odd() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - partitioned, - array{{3, 5, 7}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(partitioned), - array{{0, 0, 3, 5, 7, 4, 6, 8, 0, 0}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_stable_partition_copy_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_STABLE_PARTITION_COPY_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/stable_sort.cpp b/dsp/lib/sprout/libs/algorithm/test/stable_sort.cpp deleted file mode 100644 index ec2aa56..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/stable_sort.cpp +++ /dev/null @@ -1,134 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_STABLE_SORT_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_STABLE_SORT_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_stable_sort_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{5, 1, 9, 4, 8, 2, 7, 3, 10, 6}}; - - // sort - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::stable_sort( - arr1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::stable_sort( - arr1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}} - )); - } - // sort - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::stable_sort( - sprout::sub(arr1, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{2, 3, 4, 7, 8, 9}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sorted), - array{{5, 1, 2, 3, 4, 7, 8, 9, 10, 6}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::stable_sort( - sprout::sub(arr1, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{2, 3, 4, 7, 8, 9}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sorted), - array{{5, 1, 2, 3, 4, 7, 8, 9, 10, 6}} - )); - } - } - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{5, 1, 9, 4, 8, 2, 7, 3, 10, 6}}; - - // sort - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::stable_sort( - arr1, - testspr::mod_less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{5, 10, 1, 6, 2, 7, 8, 3, 9, 4}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::stable_sort( - arr1, - testspr::mod_less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{5, 10, 1, 6, 2, 7, 8, 3, 9, 4}} - )); - } - // sort - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::stable_sort( - sprout::sub(arr1, 2, 8), - testspr::mod_less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{2, 7, 8, 3, 9, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sorted), - array{{5, 1, 2, 7, 8, 3, 9, 4, 10, 6}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto sorted = sprout::fit::stable_sort( - sprout::sub(arr1, 2, 8), - testspr::mod_less() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - sorted, - array{{2, 7, 8, 3, 9, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(sorted), - array{{5, 1, 2, 7, 8, 3, 9, 4, 10, 6}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_stable_sort_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_STABLE_SORT_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/swap_element.cpp b/dsp/lib/sprout/libs/algorithm/test/swap_element.cpp deleted file mode 100644 index 21c0744..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/swap_element.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_SWAP_ELEMENT_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_SWAP_ELEMENT_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_swap_element_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - - // swap - { - SPROUT_STATIC_CONSTEXPR auto swapped = sprout::swap_element( - arr1, - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 7 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - swapped, - array{{1, 2, 8, 4, 5, 6, 7, 3, 9, 10}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto swapped = sprout::fit::swap_element( - arr1, - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 7 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - swapped, - array{{1, 2, 8, 4, 5, 6, 7, 3, 9, 10}} - )); - } - // swap - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto swapped = sprout::swap_element( - sprout::sub(arr1, 2, 8), - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 7 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - swapped, - array{{8, 4, 5, 6, 7, 3}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(swapped), - array{{1, 2, 8, 4, 5, 6, 7, 3, 9, 10}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto swapped = sprout::fit::swap_element( - sprout::sub(arr1, 2, 8), - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 7 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - swapped, - array{{8, 4, 5, 6, 7, 3}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(swapped), - array{{1, 2, 8, 4, 5, 6, 7, 3, 9, 10}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_swap_element_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_SWAP_ELEMENT_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/swap_element_copy.cpp b/dsp/lib/sprout/libs/algorithm/test/swap_element_copy.cpp deleted file mode 100644 index 3c5e465..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/swap_element_copy.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_SWAP_ELEMENT_COPY_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_SWAP_ELEMENT_COPY_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_swap_element_copy_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{}}; - - // swap in range [2 .. 8) - { - SPROUT_STATIC_CONSTEXPR auto swapped = sprout::swap_element_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr2, - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 7 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - swapped, - array{{8, 4, 5, 6, 7, 3, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto swapped = sprout::fit::swap_element_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr2, - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 7 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - swapped, - array{{8, 4, 5, 6, 7, 3}} - )); - } - // swap in range [2 .. 8) - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto swapped = sprout::swap_element_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr3, - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 7 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - swapped, - array{{8, 4, 5, 6}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto swapped = sprout::fit::swap_element_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr3, - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 7 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - swapped, - array{{8, 4, 5, 6}} - )); - } - // swap in range [2 .. 8) - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto swapped = sprout::swap_element_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::sub(arr2, 2, 8), - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 7 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - swapped, - array{{8, 4, 5, 6, 7, 3}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(swapped), - array{{0, 0, 8, 4, 5, 6, 7, 3, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto swapped = sprout::fit::swap_element_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::sub(arr2, 2, 8), - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 7 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - swapped, - array{{8, 4, 5, 6, 7, 3}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(swapped), - array{{0, 0, 8, 4, 5, 6, 7, 3, 0, 0}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_swap_element_copy_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_SWAP_ELEMENT_COPY_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/transform.cpp b/dsp/lib/sprout/libs/algorithm/test/transform.cpp deleted file mode 100644 index 61f807f..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/transform.cpp +++ /dev/null @@ -1,217 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_TRANSFORM_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_TRANSFORM_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_transform_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{}}; - - // transform in range [2 .. 8) (a * 2) - { - SPROUT_STATIC_CONSTEXPR auto transformed = sprout::transform( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr2, - testspr::x2() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - transformed, - array{{6, 8, 10, 12, 14, 16, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto transformed = sprout::fit::transform( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr2, - testspr::x2() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - transformed, - array{{6, 8, 10, 12, 14, 16}} - )); - } - // transform in range [2 .. 8) (a * 2) - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto transformed = sprout::transform( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr3, - testspr::x2() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - transformed, - array{{6, 8, 10, 12}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto transformed = sprout::fit::transform( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr3, - testspr::x2() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - transformed, - array{{6, 8, 10, 12}} - )); - } - // transform in range [2 .. 8) (a * 2) - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto transformed = sprout::transform( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::sub(arr2, 2, 8), - testspr::x2() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - transformed, - array{{6, 8, 10, 12, 14, 16}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(transformed), - array{{0, 0, 6, 8, 10, 12, 14, 16, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto transformed = sprout::fit::transform( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::sub(arr2, 2, 8), - testspr::x2() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - transformed, - array{{6, 8, 10, 12, 14, 16}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(transformed), - array{{0, 0, 6, 8, 10, 12, 14, 16, 0, 0}} - )); - } - } - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - SPROUT_STATIC_CONSTEXPR auto arr1_2 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{}}; - - // transform in range [2 .. 8) (a + b) - { - SPROUT_STATIC_CONSTEXPR auto transformed = sprout::transform( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::begin(arr1_2) + 2, - arr2, - testspr::plus() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - transformed, - array{{6, 8, 10, 12, 14, 16, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto transformed = sprout::fit::transform( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::begin(arr1_2) + 2, - arr2, - testspr::plus() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - transformed, - array{{6, 8, 10, 12, 14, 16}} - )); - } - // transform in range [2 .. 8) (a + b) - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto transformed = sprout::transform( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::begin(arr1_2) + 2, - arr3, - testspr::plus() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - transformed, - array{{6, 8, 10, 12}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto transformed = sprout::fit::transform( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::begin(arr1_2) + 2, - arr3, - testspr::plus() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - transformed, - array{{6, 8, 10, 12}} - )); - } - // transform in range [2 .. 8) (a + b) - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto transformed = sprout::transform( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::begin(arr1_2) + 2, - sprout::sub(arr2, 2, 8), - testspr::plus() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - transformed, - array{{6, 8, 10, 12, 14, 16}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(transformed), - array{{0, 0, 6, 8, 10, 12, 14, 16, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto transformed = sprout::fit::transform( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::begin(arr1_2) + 2, - sprout::sub(arr2, 2, 8), - testspr::plus() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - transformed, - array{{6, 8, 10, 12, 14, 16}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(transformed), - array{{0, 0, 6, 8, 10, 12, 14, 16, 0, 0}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_transform_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_TRANSFORM_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/tristate_lexicographical_compare.cpp b/dsp/lib/sprout/libs/algorithm/test/tristate_lexicographical_compare.cpp deleted file mode 100644 index 7ca3509..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/tristate_lexicographical_compare.cpp +++ /dev/null @@ -1,435 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_TRISTATE_LEXICOGRAPHICAL_COMPARE_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_TRISTATE_LEXICOGRAPHICAL_COMPARE_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_tristate_lexicographical_compare_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{1, 2, 3, 4, 5, 6, 7, 1, 2, 3}}; - SPROUT_STATIC_CONSTEXPR auto arr4 = array{{1, 2, 3, 4, 5, 6, 7, 11, 12, 13}}; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr2), - sprout::end(arr2) - ); - TESTSPR_BOTH_ASSERT(result == 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr3), - sprout::end(arr3) - ); - TESTSPR_BOTH_ASSERT(result > 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr4), - sprout::end(arr4) - ); - TESTSPR_BOTH_ASSERT(result < 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr2), - sprout::end(arr2) - ); - TESTSPR_BOTH_ASSERT(result < 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr3), - sprout::end(arr3) - ); - TESTSPR_BOTH_ASSERT(result < 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr4), - sprout::end(arr4) - ); - TESTSPR_BOTH_ASSERT(result < 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr2), - sprout::begin(arr2) + 5 - ); - TESTSPR_BOTH_ASSERT(result > 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr2), - sprout::end(arr2), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result == 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr3), - sprout::end(arr3), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result > 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr4), - sprout::end(arr4), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result < 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr2), - sprout::end(arr2), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result < 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr3), - sprout::end(arr3), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result < 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - sprout::begin(arr4), - sprout::end(arr4), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result < 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - sprout::begin(arr1), - sprout::end(arr1), - sprout::begin(arr2), - sprout::begin(arr2) + 5, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result > 0); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr2)), - testspr::reduce_input(sprout::end(arr2)) - ); - TESTSPR_BOTH_ASSERT(result == 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr3)), - testspr::reduce_input(sprout::end(arr3)) - ); - TESTSPR_BOTH_ASSERT(result > 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr4)), - testspr::reduce_input(sprout::end(arr4)) - ); - TESTSPR_BOTH_ASSERT(result < 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::reduce_input(sprout::begin(arr2)), - testspr::reduce_input(sprout::end(arr2)) - ); - TESTSPR_BOTH_ASSERT(result < 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::reduce_input(sprout::begin(arr3)), - testspr::reduce_input(sprout::end(arr3)) - ); - TESTSPR_BOTH_ASSERT(result < 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::reduce_input(sprout::begin(arr4)), - testspr::reduce_input(sprout::end(arr4)) - ); - TESTSPR_BOTH_ASSERT(result < 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr2)), - testspr::reduce_input(sprout::begin(arr2) + 5) - ); - TESTSPR_BOTH_ASSERT(result > 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr2)), - testspr::reduce_input(sprout::end(arr2)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result == 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr3)), - testspr::reduce_input(sprout::end(arr3)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result > 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr4)), - testspr::reduce_input(sprout::end(arr4)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result < 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::reduce_input(sprout::begin(arr2)), - testspr::reduce_input(sprout::end(arr2)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result < 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::reduce_input(sprout::begin(arr3)), - testspr::reduce_input(sprout::end(arr3)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result < 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::begin(arr1) + 5), - testspr::reduce_input(sprout::begin(arr4)), - testspr::reduce_input(sprout::end(arr4)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result < 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - testspr::reduce_input(sprout::begin(arr1)), - testspr::reduce_input(sprout::end(arr1)), - testspr::reduce_input(sprout::begin(arr2)), - testspr::reduce_input(sprout::begin(arr2) + 5), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result > 0); - } - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)) - ); - TESTSPR_BOTH_ASSERT(result == 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::end(arr3)) - ); - TESTSPR_BOTH_ASSERT(result > 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr4)), - testspr::reduce_random_access(sprout::end(arr4)) - ); - TESTSPR_BOTH_ASSERT(result < 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)) - ); - TESTSPR_BOTH_ASSERT(result < 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::end(arr3)) - ); - TESTSPR_BOTH_ASSERT(result < 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr4)), - testspr::reduce_random_access(sprout::end(arr4)) - ); - TESTSPR_BOTH_ASSERT(result < 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::begin(arr2) + 5) - ); - TESTSPR_BOTH_ASSERT(result > 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result == 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::end(arr3)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result > 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr4)), - testspr::reduce_random_access(sprout::end(arr4)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result < 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::end(arr2)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result < 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr3)), - testspr::reduce_random_access(sprout::end(arr3)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result < 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - testspr::reduce_random_access(sprout::begin(arr4)), - testspr::reduce_random_access(sprout::end(arr4)), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result < 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - testspr::reduce_random_access(sprout::begin(arr2)), - testspr::reduce_random_access(sprout::begin(arr2) + 5), - testspr::less() - ); - TESTSPR_BOTH_ASSERT(result > 0); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_tristate_lexicographical_compare_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_TRISTATE_LEXICOGRAPHICAL_COMPARE_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/unfold.cpp b/dsp/lib/sprout/libs/algorithm/test/unfold.cpp deleted file mode 100644 index 3845ba3..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/unfold.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_UNFOLD_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_UNFOLD_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_unfold_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{}}; - - // generate - { - SPROUT_STATIC_CONSTEXPR auto unfolded = sprout::unfold( - arr1, - testspr::unf_iota(), - 1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - unfolded, - array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto unfolded = sprout::fit::unfold( - arr1, - testspr::unf_iota(), - 1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - unfolded, - array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}} - )); - } - // generate - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto unfolded = sprout::unfold( - sprout::sub(arr1, 2, 8), - testspr::unf_iota(), - 1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - unfolded, - array{{1, 2, 3, 4, 5, 6}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(unfolded), - array{{0, 0, 1, 2, 3, 4, 5, 6, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto unfolded = sprout::fit::unfold( - sprout::sub(arr1, 2, 8), - testspr::unf_iota(), - 1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - unfolded, - array{{1, 2, 3, 4, 5, 6}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(unfolded), - array{{0, 0, 1, 2, 3, 4, 5, 6, 0, 0}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_unfold_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_UNFOLD_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/unfold_n.cpp b/dsp/lib/sprout/libs/algorithm/test/unfold_n.cpp deleted file mode 100644 index 7982187..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/unfold_n.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_UNFOLD_N_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_UNFOLD_N_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_unfold_n_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{}}; - - // generate - { - SPROUT_STATIC_CONSTEXPR auto unfolded = sprout::unfold_n( - arr1, - 4, - testspr::unf_iota(), - 1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - unfolded, - array{{1, 2, 3, 4, 0, 0, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto unfolded = sprout::fit::unfold_n( - arr1, - 4, - testspr::unf_iota(), - 1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - unfolded, - array{{1, 2, 3, 4}} - )); - } - // generate - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto unfolded = sprout::unfold_n( - sprout::sub(arr1, 2, 8), - 4, - testspr::unf_iota(), - 1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - unfolded, - array{{1, 2, 3, 4, 0, 0}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(unfolded), - array{{0, 0, 1, 2, 3, 4, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto unfolded = sprout::fit::unfold_n( - sprout::sub(arr1, 2, 8), - 4, - testspr::unf_iota(), - 1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - unfolded, - array{{1, 2, 3, 4}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(unfolded), - array{{0, 0, 1, 2, 3, 4, 0, 0, 0, 0}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_unfold_n_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_UNFOLD_N_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/unique.cpp b/dsp/lib/sprout/libs/algorithm/test/unique.cpp deleted file mode 100644 index 5683c90..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/unique.cpp +++ /dev/null @@ -1,134 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_UNIQUE_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_UNIQUE_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_unique_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 1, 3, 3, 5, 5, 7, 7, 9, 9}}; - - // "...Unique". - { - SPROUT_STATIC_CONSTEXPR auto uniqued = sprout::unique( - arr1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - uniqued, - array{{1, 3, 5, 7, 9, 5, 7, 7, 9, 9}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto uniqued = sprout::fit::unique( - arr1 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - uniqued, - array{{1, 3, 5, 7, 9}} - )); - } - // "...Unique". - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto uniqued = sprout::unique( - sprout::sub(arr1, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - uniqued, - array{{3, 5, 7, 5, 7, 7}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(uniqued), - array{{1, 1, 3, 5, 7, 5, 7, 7, 9, 9}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto uniqued = sprout::fit::unique( - sprout::sub(arr1, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - uniqued, - array{{3, 5, 7}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(uniqued), - array{{1, 1, 3, 5, 7, 5, 7, 7, 9, 9}} - )); - } - } - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 1, 3, 3, 5, 5, 7, 7, 9, 9}}; - - // "...Unique". - { - SPROUT_STATIC_CONSTEXPR auto uniqued = sprout::unique( - arr1, - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - uniqued, - array{{1, 3, 5, 7, 9, 5, 7, 7, 9, 9}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto uniqued = sprout::fit::unique( - arr1, - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - uniqued, - array{{1, 3, 5, 7, 9}} - )); - } - // "...Unique". - // from sub range - { - SPROUT_STATIC_CONSTEXPR auto uniqued = sprout::unique( - sprout::sub(arr1, 2, 8), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - uniqued, - array{{3, 5, 7, 5, 7, 7}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(uniqued), - array{{1, 1, 3, 5, 7, 5, 7, 7, 9, 9}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto uniqued = sprout::fit::unique( - sprout::sub(arr1, 2, 8), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - uniqued, - array{{3, 5, 7}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(uniqued), - array{{1, 1, 3, 5, 7, 5, 7, 7, 9, 9}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_unique_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_UNIQUE_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/unique_copy.cpp b/dsp/lib/sprout/libs/algorithm/test/unique_copy.cpp deleted file mode 100644 index 2c9d251..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/unique_copy.cpp +++ /dev/null @@ -1,204 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_UNIQUE_COPY_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_UNIQUE_COPY_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void algorithm_unique_copy_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 1, 3, 3, 5, 5, 7, 7, 9, 9}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{}}; - - // "...Unique". in range [2 .. 8) - { - SPROUT_STATIC_CONSTEXPR auto uniqued = sprout::unique_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr2 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - uniqued, - array{{3, 5, 7, 0, 0, 0, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto uniqued = sprout::fit::unique_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr2 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - uniqued, - array{{3, 5, 7}} - )); - } - // "...Unique". in range [2 .. 8) - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto uniqued = sprout::unique_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr3 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - uniqued, - array{{3, 5}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto uniqued = sprout::fit::unique_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr3 - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - uniqued, - array{{3, 5}} - )); - } - // "...Unique". in range [2 .. 8) - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto uniqued = sprout::unique_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::sub(arr2, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - uniqued, - array{{3, 5, 7, 0, 0, 0}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(uniqued), - array{{0, 0, 3, 5, 7, 0, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto uniqued = sprout::fit::unique_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::sub(arr2, 2, 8) - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - uniqued, - array{{3, 5, 7}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(uniqued), - array{{0, 0, 3, 5, 7, 0, 0, 0, 0, 0}} - )); - } - } - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 1, 3, 3, 5, 5, 7, 7, 9, 9}}; - SPROUT_STATIC_CONSTEXPR auto arr2 = array{{}}; - SPROUT_STATIC_CONSTEXPR auto arr3 = array{{}}; - - // "...Unique". in range [2 .. 8) - { - SPROUT_STATIC_CONSTEXPR auto uniqued = sprout::unique_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr2, - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - uniqued, - array{{3, 5, 7, 0, 0, 0, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto uniqued = sprout::fit::unique_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr2, - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - uniqued, - array{{3, 5, 7}} - )); - } - // "...Unique". in range [2 .. 8) - // overrun from output range - { - SPROUT_STATIC_CONSTEXPR auto uniqued = sprout::unique_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr3, - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - uniqued, - array{{3, 5}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto uniqued = sprout::fit::unique_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - arr3, - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - uniqued, - array{{3, 5}} - )); - } - // "...Unique". in range [2 .. 8) - // to sub range - { - SPROUT_STATIC_CONSTEXPR auto uniqued = sprout::unique_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::sub(arr2, 2, 8), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - uniqued, - array{{3, 5, 7, 0, 0, 0}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(uniqued), - array{{0, 0, 3, 5, 7, 0, 0, 0, 0, 0}} - )); - } - { - SPROUT_STATIC_CONSTEXPR auto uniqued = sprout::fit::unique_copy( - sprout::begin(arr1) + 2, - sprout::begin(arr1) + 8, - sprout::sub(arr2, 2, 8), - testspr::equal_to() - ); - TESTSPR_BOTH_ASSERT(testspr::equal( - uniqued, - array{{3, 5, 7}} - )); - TESTSPR_BOTH_ASSERT(testspr::equal( - sprout::get_internal(uniqued), - array{{0, 0, 3, 5, 7, 0, 0, 0, 0, 0}} - )); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_unique_copy_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_UNIQUE_COPY_CPP diff --git a/dsp/lib/sprout/libs/algorithm/test/upper_bound.cpp b/dsp/lib/sprout/libs/algorithm/test/upper_bound.cpp deleted file mode 100644 index 0a65289..0000000 --- a/dsp/lib/sprout/libs/algorithm/test/upper_bound.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ALGORITHM_TEST_UPPER_BOUND_CPP -#define SPROUT_LIBS_ALGORITHM_TEST_UPPER_BOUND_CPP - -#include -#include -#include -#include - -namespace testspr { - static void algorithm_upper_bound_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto arr1 = array{{1, 2, 3, 4, 5, 6, 7, 7, 7, 10}}; - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::upper_bound( - sprout::begin(arr1), - sprout::end(arr1), - 7 - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 9); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::upper_bound( - sprout::begin(arr1), - sprout::begin(arr1) + 5, - 7, - testspr::less() - ); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::upper_bound( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::end(arr1)), - 7 - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 9); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::upper_bound( - testspr::reduce_forward(sprout::begin(arr1)), - testspr::reduce_forward(sprout::begin(arr1) + 5), - 7, - testspr::less() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::upper_bound( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::end(arr1)), - 7 - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 9); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::upper_bound( - testspr::reduce_random_access(sprout::begin(arr1)), - testspr::reduce_random_access(sprout::begin(arr1) + 5), - 7, - testspr::less() - ).base(); - TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::algorithm_upper_bound_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ALGORITHM_TEST_UPPER_BOUND_CPP diff --git a/dsp/lib/sprout/libs/array/CMakeLists.txt b/dsp/lib/sprout/libs/array/CMakeLists.txt deleted file mode 100644 index a32dcf2..0000000 --- a/dsp/lib/sprout/libs/array/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -subdirs( test ) diff --git a/dsp/lib/sprout/libs/array/test/CMakeLists.txt b/dsp/lib/sprout/libs/array/test/CMakeLists.txt deleted file mode 100644 index 8cd3748..0000000 --- a/dsp/lib/sprout/libs/array/test/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -add_executable( libs_array_test_array array.cpp ) -set_target_properties( libs_array_test_array PROPERTIES OUTPUT_NAME "array" ) -add_test( libs_array_test_array array ) diff --git a/dsp/lib/sprout/libs/array/test/array.cpp b/dsp/lib/sprout/libs/array/test/array.cpp deleted file mode 100644 index a0a06a4..0000000 --- a/dsp/lib/sprout/libs/array/test/array.cpp +++ /dev/null @@ -1,186 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_ARRAY_TEST_ARRAY_CPP -#define SPROUT_LIBS_ARRAY_TEST_ARRAY_CPP - -#include -#include -#include - -namespace testspr { - static void array_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR int carr[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; - SPROUT_STATIC_CONSTEXPR auto arr1 = sprout::to_array(carr); - SPROUT_STATIC_CONSTEXPR auto arr2 = sprout::make_array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - SPROUT_STATIC_CONSTEXPR auto arr3 = sprout::make_array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - - TESTSPR_BOTH_ASSERT(testspr::equal(carr, arr1)); - TESTSPR_BOTH_ASSERT(testspr::equal(carr, arr2)); - TESTSPR_BOTH_ASSERT(testspr::equal(carr, arr3)); - - // begin - TESTSPR_BOTH_ASSERT(carr[0] == *arr1.begin()); - TESTSPR_BOTH_ASSERT(carr[0] == *arr2.begin()); - - // cbegin - TESTSPR_BOTH_ASSERT(carr[0] == *arr1.cbegin()); - TESTSPR_BOTH_ASSERT(carr[0] == *arr2.cbegin()); - - // end - TESTSPR_BOTH_ASSERT(carr[9] == *(arr1.end() - 1)); - TESTSPR_BOTH_ASSERT(carr[9] == *(arr2.end() - 1)); - - // cend - TESTSPR_BOTH_ASSERT(carr[9] == *(arr1.cend() - 1)); - TESTSPR_BOTH_ASSERT(carr[9] == *(arr2.cend() - 1)); - - // rbegin - TESTSPR_BOTH_ASSERT(carr[9] == *arr1.rbegin()); - TESTSPR_BOTH_ASSERT(carr[9] == *arr2.rbegin()); - - // crbegin - TESTSPR_BOTH_ASSERT(carr[9] == *arr1.crbegin()); - TESTSPR_BOTH_ASSERT(carr[9] == *arr2.crbegin()); - - // rend - TESTSPR_BOTH_ASSERT(carr[0] == *(arr1.rend() - 1)); - TESTSPR_BOTH_ASSERT(carr[0] == *(arr2.rend() - 1)); - - // crend - TESTSPR_BOTH_ASSERT(carr[0] == *(arr1.crend() - 1)); - TESTSPR_BOTH_ASSERT(carr[0] == *(arr2.crend() - 1)); - - // size - TESTSPR_BOTH_ASSERT(arr1.size() == 10); - TESTSPR_BOTH_ASSERT(arr2.size() == 10); - - // empty - TESTSPR_BOTH_ASSERT(!arr1.empty()); - TESTSPR_BOTH_ASSERT(!arr2.empty()); - TESTSPR_BOTH_ASSERT((array{{}}.empty())); - - // max_size - TESTSPR_BOTH_ASSERT(arr1.max_size() == 10); - TESTSPR_BOTH_ASSERT(arr2.max_size() == 10); - - // operator[] - TESTSPR_BOTH_ASSERT(carr[0] == arr1[0]); - TESTSPR_BOTH_ASSERT(carr[0] == arr2[0]); - - // at - TESTSPR_BOTH_ASSERT(carr[0] == arr1.at(0)); - TESTSPR_BOTH_ASSERT(carr[0] == arr2.at(0)); - - // front - TESTSPR_BOTH_ASSERT(carr[0] == arr1.front()); - TESTSPR_BOTH_ASSERT(carr[0] == arr2.front()); - - // back - TESTSPR_BOTH_ASSERT(carr[9] == arr1.back()); - TESTSPR_BOTH_ASSERT(carr[9] == arr2.back()); - - // data - TESTSPR_BOTH_ASSERT(carr[0] == *arr1.data()); - TESTSPR_BOTH_ASSERT(carr[0] == *arr2.data()); - { - auto arr = arr1; - TESTSPR_ASSERT(carr[0] == *arr.data()); - } - - // c_array - TESTSPR_BOTH_ASSERT(carr[0] == *arr1.c_array()); - TESTSPR_BOTH_ASSERT(carr[0] == *arr2.c_array()); - { - auto arr = arr1; - TESTSPR_ASSERT(carr[0] == *arr.c_array()); - } - - // assign - TESTSPR_BOTH_ASSERT(testspr::equal(arr1.assign(-1), sprout::array{{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1}})); - { - auto arr = arr1; - arr.assign(-1); - TESTSPR_ASSERT(testspr::equal(arr, sprout::array{{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1}})); - } - - // fill - TESTSPR_BOTH_ASSERT(testspr::equal(arr1.fill(-1), sprout::array{{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1}})); - { - auto arr = arr1; - arr.fill(-1); - TESTSPR_ASSERT(testspr::equal(arr, sprout::array{{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1}})); - } - - // swap - { - auto arr1 = sprout::array{{1, 2}}; - auto arr2 = sprout::array{{-1, -2}}; - arr1.swap(arr2); - TESTSPR_ASSERT(arr1[0] == -1); - } - - // operator= - { - auto arr1 = sprout::array{{1, 2}}; - arr1 = sprout::array{{-1, -2}}; - TESTSPR_ASSERT(arr1[0] == -1); - } - - // operator== - TESTSPR_BOTH_ASSERT(arr1 == arr2); - - // operator!= - TESTSPR_BOTH_ASSERT(!(arr1 != arr2)); - - // operator< - TESTSPR_BOTH_ASSERT(!(arr1 < arr2)); - - // operator> - TESTSPR_BOTH_ASSERT(!(arr1 > arr2)); - - // operator<= - TESTSPR_BOTH_ASSERT(arr1 <= arr2); - - // operator>= - TESTSPR_BOTH_ASSERT(arr1 >= arr2); - - // get - TESTSPR_BOTH_ASSERT(sprout::tuples::get<0>(arr1) == 1); - TESTSPR_BOTH_ASSERT(sprout::tuples::get<1>(arr1) == 2); - { - auto arr4 = arr1; - TESTSPR_ASSERT(sprout::tuples::get<0>(arr4) == 1); - TESTSPR_ASSERT(sprout::tuples::get<1>(arr4) == 2); - } - - // tuple_size - TESTSPR_BOTH_ASSERT(sprout::tuples::tuple_size::value == 10); - - // tuple_element - TESTSPR_BOTH_ASSERT((std::is_same::type, int const>::value)); - TESTSPR_BOTH_ASSERT((std::is_same::type, int const>::value)); - - // is_array - TESTSPR_BOTH_ASSERT(sprout::is_array_class::value); - TESTSPR_BOTH_ASSERT(!sprout::is_array_class::value); - - // sprout::to_hash, sprout::hash - TESTSPR_BOTH_ASSERT(sprout::to_hash(arr1) == sprout::hash()(arr1)); - TESTSPR_BOTH_ASSERT(sprout::to_hash(arr1) != sprout::to_hash(sprout::array{{}})); - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::array_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_ARRAY_TEST_ARRAY_CPP diff --git a/dsp/lib/sprout/libs/bitset/CMakeLists.txt b/dsp/lib/sprout/libs/bitset/CMakeLists.txt deleted file mode 100644 index a32dcf2..0000000 --- a/dsp/lib/sprout/libs/bitset/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -subdirs( test ) diff --git a/dsp/lib/sprout/libs/bitset/test/CMakeLists.txt b/dsp/lib/sprout/libs/bitset/test/CMakeLists.txt deleted file mode 100644 index 1610305..0000000 --- a/dsp/lib/sprout/libs/bitset/test/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -add_executable( libs_bitset_test_bitset bitset.cpp ) -set_target_properties( libs_bitset_test_bitset PROPERTIES OUTPUT_NAME "bitset" ) -add_test( libs_bitset_test_bitset bitset ) diff --git a/dsp/lib/sprout/libs/bitset/test/bitset.cpp b/dsp/lib/sprout/libs/bitset/test/bitset.cpp deleted file mode 100644 index 85a8017..0000000 --- a/dsp/lib/sprout/libs/bitset/test/bitset.cpp +++ /dev/null @@ -1,231 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_BITSET_TEST_BITSET_CPP -#define SPROUT_LIBS_BITSET_TEST_BITSET_CPP - -#include -#include -#include -#include - -namespace testspr { - static void bitset_test() { - using namespace sprout; - { - typedef sprout::bitset<40> bitset_t; - SPROUT_STATIC_CONSTEXPR auto bits1 = bitset_t(0xDEADBEEF); - - // 20.5.2 bitset operations: - - // operator= - { - auto bits = bitset_t(0xDEADBACE); - bits = bits1; - TESTSPR_ASSERT(bits == bits1); - } - { - auto bits2 = bits1; - auto bits = bitset_t(0xDEADBACE); - bits = sprout::move(bits2); - TESTSPR_ASSERT(bits == bits1); - } - - // operator&= - { - auto bits = bits1; - bits &= bitset_t(0xDEADFACE); - TESTSPR_ASSERT(bits == bitset_t(0xDEADBACE)); - } - - // operator|= - { - auto bits = bits1; - bits |= bitset_t(0xDEADFACE); - TESTSPR_ASSERT(bits == bitset_t(0xDEADFEEF)); - } - - // operator^= - { - auto bits = bits1; - bits ^= bitset_t(0xDEADFACE); - TESTSPR_ASSERT(bits == bitset_t(0x4421)); - } - - // operator<<= - { - auto bits = bits1; - bits <<= 10; - TESTSPR_ASSERT(bits == bitset_t(0x7AB6FBBC00ull)); - } - - // operator>>= - { - auto bits = bits1; - bits >>= 10; - TESTSPR_ASSERT(bits == bitset_t(0x37AB6Full)); - } - - // set - TESTSPR_BOTH_ASSERT(bits1.set() == bitset_t(0xFFFFFFFFFFull)); - TESTSPR_BOTH_ASSERT(bits1.set(0, false) == bitset_t(0xDEADBEEE)); - TESTSPR_BOTH_ASSERT(bits1.set(4, true) == bitset_t(0xDEADBEFF)); - { - auto bits = bits1; - bits.set(); - TESTSPR_ASSERT(bits == bitset_t(0xFFFFFFFFFFull)); - } - { - auto bits = bits1; - bits.set(0, false); - TESTSPR_ASSERT(bits == bitset_t(0xDEADBEEE)); - } - { - auto bits = bits1; - bits.set(4, true); - TESTSPR_ASSERT(bits == bitset_t(0xDEADBEFF)); - } - - // reset - TESTSPR_BOTH_ASSERT(bits1.reset() == bitset_t(0x0)); - TESTSPR_BOTH_ASSERT(bits1.reset(0) == bitset_t(0xDEADBEEE)); - { - auto bits = bits1; - bits.reset(); - TESTSPR_ASSERT(bits == bitset_t(0x0)); - } - { - auto bits = bits1; - bits.reset(0); - TESTSPR_ASSERT(bits == bitset_t(0xDEADBEEE)); - } - - // operator~ - TESTSPR_BOTH_ASSERT(~bits1 == bitset_t(0xFF21524110ull)); - TESTSPR_BOTH_ASSERT(~~bits1 == bitset_t(0xDEADBEEF)); - - // flip - TESTSPR_BOTH_ASSERT(bits1.flip() == bitset_t(0xFF21524110ull)); - TESTSPR_BOTH_ASSERT(bits1.flip(0) == bitset_t(0xDEADBEEE)); - TESTSPR_BOTH_ASSERT(bits1.flip(4) == bitset_t(0xDEADBEFF)); - { - auto bits = bits1; - bits.flip(); - TESTSPR_ASSERT(bits == bitset_t(0xFF21524110ull)); - } - { - auto bits = bits1; - bits.flip(0); - TESTSPR_ASSERT(bits == bitset_t(0xDEADBEEE)); - } - { - auto bits = bits1; - bits.flip(4); - TESTSPR_ASSERT(bits == bitset_t(0xDEADBEFF)); - } - - // element access: - - // operator[] - TESTSPR_BOTH_ASSERT(bits1[0] == 1); - TESTSPR_BOTH_ASSERT(bits1[4] == 0); - { - auto bits = bits1; - TESTSPR_ASSERT(bits[0] == 1); - TESTSPR_ASSERT(bits[4] == 0); - bits[0] = ~bits[0]; - bits[4] = ~bits[4]; - TESTSPR_ASSERT(bits[0] == 0); - TESTSPR_ASSERT(bits[4] == 1); - } - - // to_ulong - TESTSPR_BOTH_ASSERT(bits1.to_ulong() == 0xDEADBEEF); - - // to_ullong - TESTSPR_BOTH_ASSERT(bits1.to_ullong() == 0xDEADBEEF); - - // to_string - TESTSPR_ASSERT(bits1.to_string() == "0000000011011110101011011011111011101111"); - - // count - TESTSPR_BOTH_ASSERT(bits1.count() == 24); - - // size - TESTSPR_BOTH_ASSERT(bits1.size() == 40); - - // operator== - TESTSPR_BOTH_ASSERT(bits1 == bitset_t(0xDEADBEEF)); - TESTSPR_BOTH_ASSERT(!(bits1 == bitset_t(0xDEADFACE))); - - // operator!= - TESTSPR_BOTH_ASSERT(!(bits1 != bitset_t(0xDEADBEEF))); - TESTSPR_BOTH_ASSERT(bits1 != bitset_t(0xDEADFACE)); - - // test - TESTSPR_BOTH_ASSERT(bits1.test(0) == 1); - TESTSPR_BOTH_ASSERT(bits1.test(4) == 0); - - // all - TESTSPR_BOTH_ASSERT(!bits1.all()); - TESTSPR_BOTH_ASSERT(bitset_t(0xFFFFFFFFFFull).all()); - - // any - TESTSPR_BOTH_ASSERT(bits1.any()); - TESTSPR_BOTH_ASSERT(!bitset_t(0x0).any()); - - // none - TESTSPR_BOTH_ASSERT(!bits1.none()); - TESTSPR_BOTH_ASSERT(bitset_t(0x0).none()); - - // operator<< - TESTSPR_BOTH_ASSERT((bits1 << 10) == bitset_t(0x7AB6FBBC00ull)); - - // operator>> - TESTSPR_BOTH_ASSERT((bits1 >> 10) == bitset_t(0x37AB6Full)); - - // 20.5.4 bitset operators: - - // operator& - TESTSPR_BOTH_ASSERT((bits1 & bitset_t(0xDEADFACE)) == bitset_t(0xDEADBACE)); - - // operator| - TESTSPR_BOTH_ASSERT((bits1 | bitset_t(0xDEADFACE)) == bitset_t(0xDEADFEEF)); - - // operator^ - TESTSPR_BOTH_ASSERT((bits1 ^ bitset_t(0xDEADFACE)) == bitset_t(0x4421)); - - // operator<< - { - std::ostringstream os; - os << bits1; - TESTSPR_ASSERT(os.str() == "0000000011011110101011011011111011101111"); - } - - // operator>> - { - std::istringstream is("0000000011011110101011011011111011101111"); - auto bits = bitset_t(); - is >> bits; - TESTSPR_ASSERT(bits == bitset_t(0xDEADBEEF)); - } - - // 20.5.3 hash support - - // sprout::to_hash, sprout::hash - TESTSPR_BOTH_ASSERT(sprout::to_hash(bits1) == sprout::hash()(bits1)); - TESTSPR_BOTH_ASSERT(sprout::to_hash(bits1) != sprout::to_hash(bitset_t())); - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::bitset_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_BITSET_TEST_BITSET_CPP diff --git a/dsp/lib/sprout/libs/cstring/CMakeLists.txt b/dsp/lib/sprout/libs/cstring/CMakeLists.txt deleted file mode 100644 index a32dcf2..0000000 --- a/dsp/lib/sprout/libs/cstring/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -subdirs( test ) diff --git a/dsp/lib/sprout/libs/cstring/test/CMakeLists.txt b/dsp/lib/sprout/libs/cstring/test/CMakeLists.txt deleted file mode 100644 index 143bca7..0000000 --- a/dsp/lib/sprout/libs/cstring/test/CMakeLists.txt +++ /dev/null @@ -1,39 +0,0 @@ -add_executable( libs_cstring_test_cstring cstring.cpp ) -set_target_properties( libs_cstring_test_cstring PROPERTIES OUTPUT_NAME "cstring" ) -add_test( libs_cstring_test_cstring cstring ) -add_executable( libs_cstring_test_memchr memchr.cpp ) -set_target_properties( libs_cstring_test_memchr PROPERTIES OUTPUT_NAME "memchr" ) -add_test( libs_cstring_test_memchr memchr ) -add_executable( libs_cstring_test_memcmp memcmp.cpp ) -set_target_properties( libs_cstring_test_memcmp PROPERTIES OUTPUT_NAME "memcmp" ) -add_test( libs_cstring_test_memcmp memcmp ) -add_executable( libs_cstring_test_strchr strchr.cpp ) -set_target_properties( libs_cstring_test_strchr PROPERTIES OUTPUT_NAME "strchr" ) -add_test( libs_cstring_test_strchr strchr ) -add_executable( libs_cstring_test_strcmp strcmp.cpp ) -set_target_properties( libs_cstring_test_strcmp PROPERTIES OUTPUT_NAME "strcmp" ) -add_test( libs_cstring_test_strcmp strcmp ) -add_executable( libs_cstring_test_strcoll strcoll.cpp ) -set_target_properties( libs_cstring_test_strcoll PROPERTIES OUTPUT_NAME "strcoll" ) -add_test( libs_cstring_test_strcoll strcoll ) -add_executable( libs_cstring_test_strcspn strcspn.cpp ) -set_target_properties( libs_cstring_test_strcspn PROPERTIES OUTPUT_NAME "strcspn" ) -add_test( libs_cstring_test_strcspn strcspn ) -add_executable( libs_cstring_test_strlen strlen.cpp ) -set_target_properties( libs_cstring_test_strlen PROPERTIES OUTPUT_NAME "strlen" ) -add_test( libs_cstring_test_strlen strlen ) -add_executable( libs_cstring_test_strncmp strncmp.cpp ) -set_target_properties( libs_cstring_test_strncmp PROPERTIES OUTPUT_NAME "strncmp" ) -add_test( libs_cstring_test_strncmp strncmp ) -add_executable( libs_cstring_test_strpbrk strpbrk.cpp ) -set_target_properties( libs_cstring_test_strpbrk PROPERTIES OUTPUT_NAME "strpbrk" ) -add_test( libs_cstring_test_strpbrk strpbrk ) -add_executable( libs_cstring_test_strrchr strrchr.cpp ) -set_target_properties( libs_cstring_test_strrchr PROPERTIES OUTPUT_NAME "strrchr" ) -add_test( libs_cstring_test_strrchr strrchr ) -add_executable( libs_cstring_test_strspn strspn.cpp ) -set_target_properties( libs_cstring_test_strspn PROPERTIES OUTPUT_NAME "strspn" ) -add_test( libs_cstring_test_strspn strspn ) -add_executable( libs_cstring_test_strstr strstr.cpp ) -set_target_properties( libs_cstring_test_strstr PROPERTIES OUTPUT_NAME "strstr" ) -add_test( libs_cstring_test_strstr strstr ) diff --git a/dsp/lib/sprout/libs/cstring/test/cstring.cpp b/dsp/lib/sprout/libs/cstring/test/cstring.cpp deleted file mode 100644 index bf0ef48..0000000 --- a/dsp/lib/sprout/libs/cstring/test/cstring.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_CSTRING_TEST_CSTRING_CPP -#define SPROUT_LIBS_CSTRING_TEST_CSTRING_CPP - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_CPP_INCLUDE_DISABLE_SPROUT_LIBS_CSTRING_TEST_CSTRING_CPP -# define TESTSPR_CPP_INCLUDE -#endif - -#include "./memcmp.cpp" -#include "./strcmp.cpp" -#include "./strcoll.cpp" -#include "./strncmp.cpp" -#include "./memchr.cpp" -#include "./strchr.cpp" -#include "./strcspn.cpp" -#include "./strpbrk.cpp" -#include "./strrchr.cpp" -#include "./strspn.cpp" -#include "./strstr.cpp" -#include "./strlen.cpp" - -#ifdef TESTSPR_CPP_INCLUDE_DISABLE_SPROUT_LIBS_CSTRING_TEST_CSTRING_CPP -# undef TESTSPR_CPP_INCLUDE -#endif - -namespace testspr { - static void cstring_test() { - testspr::cstring_memcmp_test(); - testspr::cstring_strcmp_test(); - testspr::cstring_strcoll_test(); - testspr::cstring_strncmp_test(); - testspr::cstring_memchr_test(); - testspr::cstring_strchr_test(); - testspr::cstring_strcspn_test(); - testspr::cstring_strpbrk_test(); - testspr::cstring_strrchr_test(); - testspr::cstring_strspn_test(); - testspr::cstring_strstr_test(); - testspr::cstring_strlen_test(); - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::cstring_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_CSTRING_TEST_CSTRING_CPP diff --git a/dsp/lib/sprout/libs/cstring/test/memchr.cpp b/dsp/lib/sprout/libs/cstring/test/memchr.cpp deleted file mode 100644 index c9e4f1c..0000000 --- a/dsp/lib/sprout/libs/cstring/test/memchr.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_CSTRING_TEST_MEMCHR_CPP -#define SPROUT_LIBS_CSTRING_TEST_MEMCHR_CPP - -#include -#include - -namespace testspr { - static void cstring_memchr_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR unsigned char buf[] = "abcdef\0ghij"; - SPROUT_STATIC_CONSTEXPR unsigned char b = 'h'; - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::memchr(buf, b, 12); - TESTSPR_BOTH_ASSERT(buf + 8 == found); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::cstring_memchr_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_CSTRING_TEST_MEMCHR_CPP diff --git a/dsp/lib/sprout/libs/cstring/test/memcmp.cpp b/dsp/lib/sprout/libs/cstring/test/memcmp.cpp deleted file mode 100644 index fa786b5..0000000 --- a/dsp/lib/sprout/libs/cstring/test/memcmp.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_CSTRING_TEST_MEMCMP_CPP -#define SPROUT_LIBS_CSTRING_TEST_MEMCMP_CPP - -#include -#include - -namespace testspr { - static void cstring_memcmp_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR unsigned char buf[] = "\0abc\0de"; - SPROUT_STATIC_CONSTEXPR unsigned char buf2[] = "\0abc\0de"; - SPROUT_STATIC_CONSTEXPR unsigned char buf3[] = "\0abcdef"; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::memcmp(buf, buf2, 7); - TESTSPR_BOTH_ASSERT(result == 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::memcmp(buf, buf3, 7); - TESTSPR_BOTH_ASSERT(result < 0); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::cstring_memcmp_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_CSTRING_TEST_MEMCMP_CPP diff --git a/dsp/lib/sprout/libs/cstring/test/strchr.cpp b/dsp/lib/sprout/libs/cstring/test/strchr.cpp deleted file mode 100644 index db195d8..0000000 --- a/dsp/lib/sprout/libs/cstring/test/strchr.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_CSTRING_TEST_STRCHR_CPP -#define SPROUT_LIBS_CSTRING_TEST_STRCHR_CPP - -#include -#include -#include - -namespace testspr { - static void cstring_strchr_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR char str[] = "abcdefghijklmnabcdefghijklmn"; - SPROUT_STATIC_CONSTEXPR char c = 'd'; - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::strchr(str, c); - TESTSPR_BOTH_ASSERT(sprout::distance(str, found) == 3); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::cstring_strchr_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_CSTRING_TEST_STRCHR_CPP diff --git a/dsp/lib/sprout/libs/cstring/test/strcmp.cpp b/dsp/lib/sprout/libs/cstring/test/strcmp.cpp deleted file mode 100644 index 86ec491..0000000 --- a/dsp/lib/sprout/libs/cstring/test/strcmp.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_CSTRING_TEST_STRCMP_CPP -#define SPROUT_LIBS_CSTRING_TEST_STRCMP_CPP - -#include -#include - -namespace testspr { - static void cstring_strcmp_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR char str[] = "ABC"; - SPROUT_STATIC_CONSTEXPR char str1[] = "ABC"; - SPROUT_STATIC_CONSTEXPR char str2[] = "ABD"; - SPROUT_STATIC_CONSTEXPR char str3[] = "B"; - SPROUT_STATIC_CONSTEXPR char str4[] = "AAAA"; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::strcmp(str, str1); - TESTSPR_BOTH_ASSERT(result == 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::strcmp(str, str2); - TESTSPR_BOTH_ASSERT(result < 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::strcmp(str, str3); - TESTSPR_BOTH_ASSERT(result < 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::strcmp(str, str4); - TESTSPR_BOTH_ASSERT(result > 0); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::cstring_strcmp_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_CSTRING_TEST_STRCMP_CPP diff --git a/dsp/lib/sprout/libs/cstring/test/strcoll.cpp b/dsp/lib/sprout/libs/cstring/test/strcoll.cpp deleted file mode 100644 index e4ce984..0000000 --- a/dsp/lib/sprout/libs/cstring/test/strcoll.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_CSTRING_TEST_STRCOLL_CPP -#define SPROUT_LIBS_CSTRING_TEST_STRCOLL_CPP - -#include -#include - -namespace testspr { - static void cstring_strcoll_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR char str[] = "ABC"; - SPROUT_STATIC_CONSTEXPR char str1[] = "ABC"; - SPROUT_STATIC_CONSTEXPR char str2[] = "ABD"; - SPROUT_STATIC_CONSTEXPR char str3[] = "B"; - SPROUT_STATIC_CONSTEXPR char str4[] = "AAAA"; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::strcoll(str, str1); - TESTSPR_BOTH_ASSERT(result == 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::strcoll(str, str2); - TESTSPR_BOTH_ASSERT(result < 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::strcoll(str, str3); - TESTSPR_BOTH_ASSERT(result < 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::strcoll(str, str4); - TESTSPR_BOTH_ASSERT(result > 0); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::cstring_strcoll_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_CSTRING_TEST_STRCOLL_CPP diff --git a/dsp/lib/sprout/libs/cstring/test/strcspn.cpp b/dsp/lib/sprout/libs/cstring/test/strcspn.cpp deleted file mode 100644 index f95e5a5..0000000 --- a/dsp/lib/sprout/libs/cstring/test/strcspn.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_CSTRING_TEST_STRCSPN_CPP -#define SPROUT_LIBS_CSTRING_TEST_STRCSPN_CPP - -#include -#include - -namespace testspr { - static void cstring_strcspn_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR char str[] = "abcdefgabcdefghij"; - SPROUT_STATIC_CONSTEXPR char str1[] = "hj"; - SPROUT_STATIC_CONSTEXPR char str2[] = "ghj"; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::strcspn(str, str1); - TESTSPR_BOTH_ASSERT(result == 14); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::strcspn(str, str2); - TESTSPR_BOTH_ASSERT(result == 6); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::cstring_strcspn_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_CSTRING_TEST_STRCSPN_CPP diff --git a/dsp/lib/sprout/libs/cstring/test/strlen.cpp b/dsp/lib/sprout/libs/cstring/test/strlen.cpp deleted file mode 100644 index 1e84299..0000000 --- a/dsp/lib/sprout/libs/cstring/test/strlen.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_CSTRING_TEST_STRLEN_CPP -#define SPROUT_LIBS_CSTRING_TEST_STRLEN_CPP - -#include -#include - -namespace testspr { - static void cstring_strlen_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR char str1[] = "today"; - SPROUT_STATIC_CONSTEXPR char str2[] = "hello world"; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::strlen(str1); - TESTSPR_BOTH_ASSERT(result == 5); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::strlen(str2); - TESTSPR_BOTH_ASSERT(result == 11); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::cstring_strlen_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_CSTRING_TEST_STRLEN_CPP diff --git a/dsp/lib/sprout/libs/cstring/test/strncmp.cpp b/dsp/lib/sprout/libs/cstring/test/strncmp.cpp deleted file mode 100644 index f3fc99f..0000000 --- a/dsp/lib/sprout/libs/cstring/test/strncmp.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_CSTRING_TEST_STRNCMP_CPP -#define SPROUT_LIBS_CSTRING_TEST_STRNCMP_CPP - -#include -#include - -namespace testspr { - static void cstring_strncmp_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR char str[] = "ABC"; - SPROUT_STATIC_CONSTEXPR char str1[] = "ABD"; - SPROUT_STATIC_CONSTEXPR char str2[] = "ABC"; - SPROUT_STATIC_CONSTEXPR char str3[] = "AAA"; - SPROUT_STATIC_CONSTEXPR char str4[] = "ABCD"; - SPROUT_STATIC_CONSTEXPR char str5[] = "AB"; - SPROUT_STATIC_CONSTEXPR char str6[] = "B"; - SPROUT_STATIC_CONSTEXPR char str7[] = "A"; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::strncmp(str, str1, 2); - TESTSPR_BOTH_ASSERT(result == 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::strncmp(str, str2, 2); - TESTSPR_BOTH_ASSERT(result == 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::strncmp(str, str3, 2); - TESTSPR_BOTH_ASSERT(result > 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::strncmp(str, str4, 2); - TESTSPR_BOTH_ASSERT(result == 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::strncmp(str, str5, 2); - TESTSPR_BOTH_ASSERT(result == 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::strncmp(str, str6, 2); - TESTSPR_BOTH_ASSERT(result < 0); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::strncmp(str, str7, 2); - TESTSPR_BOTH_ASSERT(result > 0); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::cstring_strncmp_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_CSTRING_TEST_STRNCMP_CPP diff --git a/dsp/lib/sprout/libs/cstring/test/strpbrk.cpp b/dsp/lib/sprout/libs/cstring/test/strpbrk.cpp deleted file mode 100644 index 6ae3435..0000000 --- a/dsp/lib/sprout/libs/cstring/test/strpbrk.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_CSTRING_TEST_STRPBRK_CPP -#define SPROUT_LIBS_CSTRING_TEST_STRPBRK_CPP - -#include -#include -#include - -namespace testspr { - static void cstring_strpbrk_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR char str[] = "abcdefgabcdefghij"; - SPROUT_STATIC_CONSTEXPR char str1[] = "ghsp"; - SPROUT_STATIC_CONSTEXPR char str2[] = "sp"; - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::strpbrk(str, str1); - TESTSPR_BOTH_ASSERT(sprout::distance(str, found) == 6); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::strpbrk(str, str2); - TESTSPR_BOTH_ASSERT(!found); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::cstring_strpbrk_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_CSTRING_TEST_STRPBRK_CPP diff --git a/dsp/lib/sprout/libs/cstring/test/strrchr.cpp b/dsp/lib/sprout/libs/cstring/test/strrchr.cpp deleted file mode 100644 index 79afc73..0000000 --- a/dsp/lib/sprout/libs/cstring/test/strrchr.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_CSTRING_TEST_STRRCHR_CPP -#define SPROUT_LIBS_CSTRING_TEST_STRRCHR_CPP - -#include -#include -#include - -namespace testspr { - static void cstring_strrchr_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR char str[] = "abcdefghijklmnabcdefghijklmn"; - SPROUT_STATIC_CONSTEXPR char c = 'd'; - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::strrchr(str, c); - TESTSPR_BOTH_ASSERT(sprout::distance(str, found) == 17); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::cstring_strrchr_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_CSTRING_TEST_STRRCHR_CPP diff --git a/dsp/lib/sprout/libs/cstring/test/strspn.cpp b/dsp/lib/sprout/libs/cstring/test/strspn.cpp deleted file mode 100644 index 2bef1fd..0000000 --- a/dsp/lib/sprout/libs/cstring/test/strspn.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_CSTRING_TEST_STRSPN_CPP -#define SPROUT_LIBS_CSTRING_TEST_STRSPN_CPP - -#include -#include - -namespace testspr { - static void cstring_strspn_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR char str[] = "abcdefgabcdefghij"; - SPROUT_STATIC_CONSTEXPR char str1[] = "abcfg"; - SPROUT_STATIC_CONSTEXPR char str2[] = "gfedcba"; - - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::strspn(str, str1); - TESTSPR_BOTH_ASSERT(result == 3); - } - { - SPROUT_STATIC_CONSTEXPR auto result = sprout::strspn(str, str2); - TESTSPR_BOTH_ASSERT(result == 14); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::cstring_strspn_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_CSTRING_TEST_STRSPN_CPP diff --git a/dsp/lib/sprout/libs/cstring/test/strstr.cpp b/dsp/lib/sprout/libs/cstring/test/strstr.cpp deleted file mode 100644 index 19532ac..0000000 --- a/dsp/lib/sprout/libs/cstring/test/strstr.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_CSTRING_TEST_STRSTR_CPP -#define SPROUT_LIBS_CSTRING_TEST_STRSTR_CPP - -#include -#include -#include - -namespace testspr { - static void cstring_strstr_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR char str[] = "abcdefghijklmn"; - SPROUT_STATIC_CONSTEXPR char str1[] = "defgh"; - SPROUT_STATIC_CONSTEXPR char str2[] = "xyz"; - SPROUT_STATIC_CONSTEXPR char str3[] = "abcdefghijklmnopqr"; - SPROUT_STATIC_CONSTEXPR char str4[] = ""; - - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::strstr(str, str1); - TESTSPR_BOTH_ASSERT(sprout::distance(str, found) == 3); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::strstr(str, str2); - TESTSPR_BOTH_ASSERT(!found); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::strstr(str, str3); - TESTSPR_BOTH_ASSERT(!found); - } - { - SPROUT_STATIC_CONSTEXPR auto found = sprout::strstr(str, str4); - TESTSPR_BOTH_ASSERT(sprout::distance(str, found) == 0); - } - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::cstring_strstr_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_CSTRING_TEST_STRSTR_CPP diff --git a/dsp/lib/sprout/libs/net/CMakeLists.txt b/dsp/lib/sprout/libs/net/CMakeLists.txt deleted file mode 100644 index a32dcf2..0000000 --- a/dsp/lib/sprout/libs/net/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -subdirs( test ) diff --git a/dsp/lib/sprout/libs/net/test/CMakeLists.txt b/dsp/lib/sprout/libs/net/test/CMakeLists.txt deleted file mode 100644 index e072a13..0000000 --- a/dsp/lib/sprout/libs/net/test/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -add_executable( libs_net_test_endian endian.cpp ) -set_target_properties( libs_net_test_endian PROPERTIES OUTPUT_NAME "endian" ) -add_test( libs_net_test_endian endian ) diff --git a/dsp/lib/sprout/libs/net/test/endian.cpp b/dsp/lib/sprout/libs/net/test/endian.cpp deleted file mode 100644 index 786246b..0000000 --- a/dsp/lib/sprout/libs/net/test/endian.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Copyright (c) 2015 Chris KAY - https://github.com/cjkay-cpp-utils/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_NET_TEST_ENDIAN_CPP -#define SPROUT_LIBS_NET_TEST_ENDIAN_CPP - -#include -#include -#include - -namespace testspr { - static void endian_test() { - using namespace sprout; - - { // 16 - TESTSPR_ASSERT(sprout::net::detail::reverse(std::uint16_t(0x0A1B)) == std::uint16_t(0x1B0A)); - TESTSPR_ASSERT(sprout::net::detail::reverse(std::uint16_t(0x1B0A)) == std::uint16_t(0x0A1B)); - TESTSPR_ASSERT(sprout::net::detail::reverse_words(std::uint16_t(0x0A1B)) == std::uint16_t(0x1B0A)); - TESTSPR_ASSERT(sprout::net::detail::reverse_words(std::uint16_t(0x1B0A)) == std::uint16_t(0x0A1B)); - } - - { // 32 - TESTSPR_ASSERT(sprout::net::detail::reverse(std::uint32_t(0x0A1B2C3D)) == std::uint32_t(0x3D2C1B0A)); - TESTSPR_ASSERT(sprout::net::detail::reverse(std::uint32_t(0x3D2C1B0A)) == std::uint32_t(0x0A1B2C3D)); - TESTSPR_ASSERT(sprout::net::detail::reverse_words(std::uint32_t(0x0A1B2C3D)) == std::uint32_t(0x1B0A3D2C)); - TESTSPR_ASSERT(sprout::net::detail::reverse_words(std::uint32_t(0x1B0A3D2C)) == std::uint32_t(0x0A1B2C3D)); - } - - { // 64 - TESTSPR_ASSERT(sprout::net::detail::reverse(std::uint64_t(0x0A1B2C3D4E5F6A7B)) == std::uint64_t(0x7B6A5F4E3D2C1B0A)); - TESTSPR_ASSERT(sprout::net::detail::reverse(std::uint64_t(0x7B6A5F4E3D2C1B0A)) == std::uint64_t(0x0A1B2C3D4E5F6A7B)); - TESTSPR_ASSERT(sprout::net::detail::reverse_words(std::uint64_t(0x0A1B2C3D4E5F6A7B)) == std::uint64_t(0x1B0A3D2C5F4E7B6A)); - TESTSPR_ASSERT(sprout::net::detail::reverse_words(std::uint64_t(0x1B0A3D2C5F4E7B6A)) == std::uint64_t(0x0A1B2C3D4E5F6A7B)); - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::endian_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_NET_TEST_ENDIAN_CPP \ No newline at end of file diff --git a/dsp/lib/sprout/libs/optional/CMakeLists.txt b/dsp/lib/sprout/libs/optional/CMakeLists.txt deleted file mode 100644 index a32dcf2..0000000 --- a/dsp/lib/sprout/libs/optional/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -subdirs( test ) diff --git a/dsp/lib/sprout/libs/optional/test/CMakeLists.txt b/dsp/lib/sprout/libs/optional/test/CMakeLists.txt deleted file mode 100644 index c886cb0..0000000 --- a/dsp/lib/sprout/libs/optional/test/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -add_executable( libs_optional_test_optional optional.cpp ) -set_target_properties( libs_optional_test_optional PROPERTIES OUTPUT_NAME "optional" ) -add_test( libs_optional_test_optional optional ) diff --git a/dsp/lib/sprout/libs/optional/test/optional.cpp b/dsp/lib/sprout/libs/optional/test/optional.cpp deleted file mode 100644 index 7385d38..0000000 --- a/dsp/lib/sprout/libs/optional/test/optional.cpp +++ /dev/null @@ -1,470 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_OPTIONAL_TEST_OPTIONAL_CPP -#define SPROUT_LIBS_OPTIONAL_TEST_OPTIONAL_CPP - -#include -#include -#include - -namespace testspr { - static void optional_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto opt1 = sprout::optional(1234); - SPROUT_STATIC_CONSTEXPR auto opt2 = sprout::optional(); - - // constructor - { - SPROUT_STATIC_CONSTEXPR auto opt3 = sprout::optional(); - TESTSPR_BOTH_ASSERT(!opt3); - } - { - SPROUT_STATIC_CONSTEXPR auto opt3 = sprout::optional(sprout::nullopt); - TESTSPR_BOTH_ASSERT(!opt3); - } - { - SPROUT_STATIC_CONSTEXPR auto opt3 = sprout::optional(opt1); - TESTSPR_BOTH_ASSERT(!!opt3); - TESTSPR_BOTH_ASSERT(opt3.get() == 1234); - } - { - SPROUT_STATIC_CONSTEXPR auto opt3 = sprout::optional(sprout::optional(1234)); - TESTSPR_BOTH_ASSERT(!!opt3); - TESTSPR_BOTH_ASSERT(opt3.get() == 1234); - } - { - SPROUT_STATIC_CONSTEXPR auto v = 1234; - SPROUT_STATIC_CONSTEXPR auto opt3 = sprout::optional(v); - TESTSPR_BOTH_ASSERT(!!opt3); - TESTSPR_BOTH_ASSERT(opt3.get() == 1234); - } - { - SPROUT_STATIC_CONSTEXPR auto opt3 = sprout::optional(1234); - TESTSPR_BOTH_ASSERT(!!opt3); - TESTSPR_BOTH_ASSERT(opt3.get() == 1234); - } - { - SPROUT_STATIC_CONSTEXPR auto opt3 = sprout::optional(sprout::in_place, 1234); - TESTSPR_BOTH_ASSERT(!!opt3); - TESTSPR_BOTH_ASSERT(opt3.get() == 1234); - } - { - SPROUT_STATIC_CONSTEXPR auto v = 1234; - SPROUT_STATIC_CONSTEXPR auto opt3 = sprout::optional(false, v); - TESTSPR_BOTH_ASSERT(!opt3); - } - { - SPROUT_STATIC_CONSTEXPR auto opt3 = sprout::optional(false, 1234); - TESTSPR_BOTH_ASSERT(!opt3); - } - { - SPROUT_STATIC_CONSTEXPR auto v = 1234; - SPROUT_STATIC_CONSTEXPR auto opt3 = sprout::optional(true, v); - TESTSPR_BOTH_ASSERT(!!opt3); - TESTSPR_BOTH_ASSERT(opt3.get() == 1234); - } - { - SPROUT_STATIC_CONSTEXPR auto opt3 = sprout::optional(true, 1234); - TESTSPR_BOTH_ASSERT(!!opt3); - TESTSPR_BOTH_ASSERT(opt3.get() == 1234); - } - { - SPROUT_STATIC_CONSTEXPR auto v = sprout::optional(1234); - SPROUT_STATIC_CONSTEXPR auto opt3 = sprout::optional(v); - TESTSPR_BOTH_ASSERT(!!opt3); - TESTSPR_BOTH_ASSERT(opt3.get() == 1234); - } - { - SPROUT_STATIC_CONSTEXPR auto opt3 = sprout::optional(sprout::optional(1234)); - TESTSPR_BOTH_ASSERT(!!opt3); - TESTSPR_BOTH_ASSERT(opt3.get() == 1234); - } - - // operator= - { - auto opt3 = sprout::optional(1234); - opt3 = sprout::nullopt; - TESTSPR_ASSERT(!opt3); - } - { - auto opt3 = sprout::optional(); - opt3 = opt1; - TESTSPR_ASSERT(!!opt3); - TESTSPR_ASSERT(opt3.get() == 1234); - } - { - auto opt3 = sprout::optional(); - opt3 = sprout::optional(1234); - TESTSPR_ASSERT(!!opt3); - TESTSPR_ASSERT(opt3.get() == 1234); - } - { - auto opt3 = sprout::optional(); - auto v = 1234; - opt3 = v; - TESTSPR_ASSERT(!!opt3); - TESTSPR_ASSERT(opt3.get() == 1234); - } - { - auto opt3 = sprout::optional(); - opt3 = 1234; - TESTSPR_ASSERT(!!opt3); - TESTSPR_ASSERT(opt3.get() == 1234); - } - { - auto opt3 = sprout::optional(); - auto v = sprout::optional(1234); - opt3 = v; - TESTSPR_ASSERT(!!opt3); - TESTSPR_ASSERT(opt3.get() == 1234); - } - { - auto opt3 = sprout::optional(); - opt3 = sprout::optional(1234); - TESTSPR_ASSERT(!!opt3); - TESTSPR_ASSERT(opt3.get() == 1234); - } - - // emplace - { - auto opt3 = sprout::optional(); - opt3.emplace(1234); - TESTSPR_ASSERT(!!opt3); - TESTSPR_ASSERT(opt3.get() == 1234); - } - - // assign - { - auto opt3 = sprout::optional(1234); - opt3.assign(sprout::nullopt); - TESTSPR_ASSERT(!opt3); - } - { - auto opt3 = sprout::optional(); - opt3.assign(opt1); - TESTSPR_ASSERT(!!opt3); - TESTSPR_ASSERT(opt3.get() == 1234); - } - { - auto opt3 = sprout::optional(); - opt3.assign(sprout::optional(1234)); - TESTSPR_ASSERT(!!opt3); - TESTSPR_ASSERT(opt3.get() == 1234); - } - { - auto opt3 = sprout::optional(); - auto v = 1234; - opt3.assign(v); - TESTSPR_ASSERT(!!opt3); - TESTSPR_ASSERT(opt3.get() == 1234); - } - { - auto opt3 = sprout::optional(); - opt3.assign(1234); - TESTSPR_ASSERT(!!opt3); - TESTSPR_ASSERT(opt3.get() == 1234); - } - { - auto opt3 = sprout::optional(); - auto v = sprout::optional(1234); - opt3.assign(v); - TESTSPR_ASSERT(!!opt3); - TESTSPR_ASSERT(opt3.get() == 1234); - } - { - auto opt3 = sprout::optional(); - opt3.assign(sprout::optional(1234)); - TESTSPR_ASSERT(!!opt3); - TESTSPR_ASSERT(opt3.get() == 1234); - } - - // reset - { - auto opt3 = sprout::optional(1234); - opt3.reset(); - TESTSPR_ASSERT(!opt3); - } - { - auto opt3 = sprout::optional(1234); - opt3.reset(sprout::nullopt); - TESTSPR_ASSERT(!opt3); - } - { - auto opt3 = sprout::optional(); - auto v = 1234; - opt3.reset(v); - TESTSPR_ASSERT(!!opt3); - TESTSPR_ASSERT(opt3.get() == 1234); - } - { - auto opt3 = sprout::optional(); - opt3.reset(1234); - TESTSPR_ASSERT(!!opt3); - TESTSPR_ASSERT(opt3.get() == 1234); - } - - // swap - { - auto opt3 = sprout::optional(1234); - auto opt4 = sprout::optional(); - opt3.swap(opt4); - TESTSPR_ASSERT(!opt3); - TESTSPR_ASSERT(!!opt4); - TESTSPR_ASSERT(opt4.get() == 1234); - } - { - auto opt3 = sprout::optional(1234); - auto opt4 = sprout::optional(); - swap(opt3, opt4); - TESTSPR_ASSERT(!opt3); - TESTSPR_ASSERT(!!opt4); - TESTSPR_ASSERT(opt4.get() == 1234); - } - - // operator-> - { - SPROUT_STATIC_CONSTEXPR auto opt3 = sprout::make_optional(testspr::is_odd()); - TESTSPR_BOTH_ASSERT(opt3->operator()(123)); - } - { - auto opt3 = sprout::make_optional(testspr::is_odd()); - TESTSPR_ASSERT(opt3->operator()(123)); - } - - // get_pointer - TESTSPR_BOTH_ASSERT(*opt1.get_pointer() == 1234); - { - auto opt3 = sprout::optional(1234); - TESTSPR_ASSERT(*opt3.get_pointer() == 1234); - - opt3.get() = 12345; - TESTSPR_ASSERT(*opt3.get_pointer() == 12345); - } - - // get_ptr - TESTSPR_BOTH_ASSERT(*opt1.get_ptr() == 1234); - { - auto opt3 = sprout::optional(1234); - TESTSPR_ASSERT(*opt3.get_ptr() == 1234); - - opt3.get() = 12345; - TESTSPR_ASSERT(*opt3.get_ptr() == 12345); - } - - // operator* - TESTSPR_BOTH_ASSERT(*opt1 == 1234); - { - auto opt3 = sprout::optional(1234); - TESTSPR_ASSERT(*opt3 == 1234); - - *opt3 = 12345; - TESTSPR_ASSERT(*opt3 == 12345); - } - - // value - TESTSPR_BOTH_ASSERT(opt1.value() == 1234); - { - auto opt3 = sprout::optional(1234); - TESTSPR_ASSERT(opt3.value() == 1234); - - opt3.value() = 12345; - TESTSPR_ASSERT(opt3.value() == 12345); - } - - // get - TESTSPR_BOTH_ASSERT(opt1.get() == 1234); - { - auto opt3 = sprout::optional(1234); - TESTSPR_ASSERT(opt3.get() == 1234); - - opt3.get() = 12345; - TESTSPR_ASSERT(opt3.get() == 12345); - } - - // value_or - TESTSPR_BOTH_ASSERT(opt1.value_or(12345) == 1234); - TESTSPR_BOTH_ASSERT(opt2.value_or(12345) == 12345); - { - auto opt3 = sprout::optional(1234); - int v = 12345; - TESTSPR_ASSERT(opt3.value_or(v) == 1234); - } - { - auto opt3 = sprout::optional(); - int v = 12345; - TESTSPR_ASSERT(opt3.value_or(v) == 12345); - } - - // get_value_or - TESTSPR_BOTH_ASSERT(opt1.get_value_or(12345) == 1234); - TESTSPR_BOTH_ASSERT(opt2.get_value_or(12345) == 12345); - { - auto opt3 = sprout::optional(1234); - int v = 12345; - TESTSPR_ASSERT(opt3.get_value_or(v) == 1234); - } - { - auto opt3 = sprout::optional(); - int v = 12345; - TESTSPR_ASSERT(opt3.get_value_or(v) == 12345); - } - - // operator bool - TESTSPR_BOTH_ASSERT(static_cast(opt1)); - TESTSPR_BOTH_ASSERT(!static_cast(opt2)); - - // operator! - TESTSPR_BOTH_ASSERT(!!opt1); - TESTSPR_BOTH_ASSERT(!opt2); - - // is_initialized - TESTSPR_BOTH_ASSERT(opt1.is_initialized()); - TESTSPR_BOTH_ASSERT(!opt2.is_initialized()); - - // make_optional - { - SPROUT_STATIC_CONSTEXPR auto opt3 = sprout::make_optional(1234); - TESTSPR_BOTH_ASSERT(!!opt3); - TESTSPR_BOTH_ASSERT(opt3.get() == 1234); - } - { - SPROUT_STATIC_CONSTEXPR auto opt3 = sprout::make_optional(false, 1234); - TESTSPR_BOTH_ASSERT(!opt3); - - SPROUT_STATIC_CONSTEXPR auto opt4 = sprout::make_optional(true, 1234); - TESTSPR_BOTH_ASSERT(!!opt4); - TESTSPR_BOTH_ASSERT(opt4.get() == 1234); - } - - // operator== - TESTSPR_BOTH_ASSERT(!(opt1 == opt2)); - TESTSPR_BOTH_ASSERT(opt1 == sprout::optional(1234)); - - // operator!= - TESTSPR_BOTH_ASSERT(opt1 != opt2); - TESTSPR_BOTH_ASSERT(!(opt1 != sprout::optional(1234))); - - // operator< - TESTSPR_BOTH_ASSERT(!(opt1 < opt2)); - TESTSPR_BOTH_ASSERT(!(opt1 < sprout::optional())); - TESTSPR_BOTH_ASSERT(!(opt1 < sprout::optional(123))); - TESTSPR_BOTH_ASSERT(!(opt1 < sprout::optional(1234))); - TESTSPR_BOTH_ASSERT(opt1 < sprout::optional(12345)); - TESTSPR_BOTH_ASSERT(!(opt2 < sprout::optional())); - TESTSPR_BOTH_ASSERT(opt2 < sprout::optional(123)); - TESTSPR_BOTH_ASSERT(opt2 < sprout::optional(1234)); - TESTSPR_BOTH_ASSERT(opt2 < sprout::optional(12345)); - - // operator> - TESTSPR_BOTH_ASSERT(opt1 > opt2); - TESTSPR_BOTH_ASSERT(opt1 > sprout::optional()); - TESTSPR_BOTH_ASSERT(opt1 > sprout::optional(123)); - TESTSPR_BOTH_ASSERT(!(opt1 > sprout::optional(1234))); - TESTSPR_BOTH_ASSERT(!(opt1 > sprout::optional(12345))); - TESTSPR_BOTH_ASSERT(!(opt2 > sprout::optional())); - TESTSPR_BOTH_ASSERT(!(opt2 > sprout::optional(123))); - TESTSPR_BOTH_ASSERT(!(opt2 > sprout::optional(1234))); - TESTSPR_BOTH_ASSERT(!(opt2 > sprout::optional(12345))); - - // operator<= - TESTSPR_BOTH_ASSERT(!(opt1 <= opt2)); - TESTSPR_BOTH_ASSERT(!(opt1 <= sprout::optional())); - TESTSPR_BOTH_ASSERT(!(opt1 <= sprout::optional(123))); - TESTSPR_BOTH_ASSERT(opt1 <= sprout::optional(1234)); - TESTSPR_BOTH_ASSERT(opt1 <= sprout::optional(12345)); - TESTSPR_BOTH_ASSERT(opt2 <= sprout::optional()); - TESTSPR_BOTH_ASSERT(opt2 <= sprout::optional(123)); - TESTSPR_BOTH_ASSERT(opt2 <= sprout::optional(1234)); - TESTSPR_BOTH_ASSERT(opt2 <= sprout::optional(12345)); - - // operator>= - TESTSPR_BOTH_ASSERT(opt1 >= opt2); - TESTSPR_BOTH_ASSERT(opt1 >= sprout::optional()); - TESTSPR_BOTH_ASSERT(opt1 >= sprout::optional(123)); - TESTSPR_BOTH_ASSERT(opt1 >= sprout::optional(1234)); - TESTSPR_BOTH_ASSERT(!(opt1 >= sprout::optional(12345))); - TESTSPR_BOTH_ASSERT(opt2 >= sprout::optional()); - TESTSPR_BOTH_ASSERT(!(opt2 >= sprout::optional(123))); - TESTSPR_BOTH_ASSERT(!(opt2 >= sprout::optional(1234))); - TESTSPR_BOTH_ASSERT(!(opt2 >= sprout::optional(12345))); - - // operator<< - { - std::ostringstream os; - os << opt1; - TESTSPR_ASSERT(os.str() == " 1234"); - } - { - std::ostringstream os; - os << opt2; - TESTSPR_ASSERT(os.str() == "--"); - } - - // operator>> - { - std::istringstream is(" 1234"); - auto opt3 = sprout::optional(); - is >> opt3; - TESTSPR_ASSERT(!!opt3); - TESTSPR_ASSERT(opt3.get() == 1234); - } - { - std::istringstream is("--"); - auto opt3 = sprout::optional(1234); - is >> opt3; - TESTSPR_ASSERT(!opt3); - } - - // get - TESTSPR_BOTH_ASSERT(sprout::get(opt1) == 1234); - { - auto opt3 = sprout::optional(1234); - TESTSPR_ASSERT(sprout::get(opt3) == 1234); - - opt3.get() = 12345; - TESTSPR_ASSERT(sprout::get(opt3) == 12345); - } - - // get_pointer - TESTSPR_BOTH_ASSERT(*sprout::get_pointer(opt1) == 1234); - { - auto opt3 = sprout::optional(1234); - TESTSPR_ASSERT(*sprout::get_pointer(opt3) == 1234); - - opt3.get() = 12345; - TESTSPR_ASSERT(*sprout::get_pointer(opt3) == 12345); - } - - // get_value_or - TESTSPR_BOTH_ASSERT(sprout::get_value_or(opt1, 12345) == 1234); - TESTSPR_BOTH_ASSERT(sprout::get_value_or(opt2, 12345) == 12345); - { - auto opt3 = sprout::optional(1234); - int v = 12345; - TESTSPR_ASSERT(sprout::get_value_or(opt3, v) == 1234); - } - { - auto opt3 = sprout::optional(); - int v = 12345; - TESTSPR_ASSERT(sprout::get_value_or(opt3, v) == 12345); - } - - // sprout::to_hash, sprout::hash - TESTSPR_BOTH_ASSERT(sprout::to_hash(opt1) == sprout::hash()(opt1)); - TESTSPR_BOTH_ASSERT(sprout::to_hash(opt1) != sprout::to_hash(opt2)); - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::optional_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_OPTIONAL_TEST_OPTIONAL_CPP diff --git a/dsp/lib/sprout/libs/random/CMakeLists.txt b/dsp/lib/sprout/libs/random/CMakeLists.txt deleted file mode 100644 index 1fb854d..0000000 --- a/dsp/lib/sprout/libs/random/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -subdirs( test example ) diff --git a/dsp/lib/sprout/libs/random/example/CMakeLists.txt b/dsp/lib/sprout/libs/random/example/CMakeLists.txt deleted file mode 100644 index 524f7a3..0000000 --- a/dsp/lib/sprout/libs/random/example/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -add_executable( libs_random_example_array array.cpp ) -set_target_properties( libs_random_example_array PROPERTIES OUTPUT_NAME "array" ) -#add_executable( libs_random_example_distribution distribution.cpp ) -#set_target_properties( libs_random_example_distribution PROPERTIES OUTPUT_NAME "distribution" ) -#add_executable( libs_random_example_random random.cpp ) -#set_target_properties( libs_random_example_random PROPERTIES OUTPUT_NAME "random" ) -#add_executable( libs_random_example_seed seed.cpp ) -#set_target_properties( libs_random_example_seed PROPERTIES OUTPUT_NAME "seed" ) diff --git a/dsp/lib/sprout/libs/random/example/array.cpp b/dsp/lib/sprout/libs/random/example/array.cpp deleted file mode 100644 index f82264a..0000000 --- a/dsp/lib/sprout/libs/random/example/array.cpp +++ /dev/null @@ -1,34 +0,0 @@ -// -// Sprout C++ Library -// -// Copyright (c) 2013 -// bolero-MURAKAMI : http://d.hatena.ne.jp/boleros/ -// osyo-manga : http://d.hatena.ne.jp/osyo-manga/ -// -// Readme: -// https://github.com/bolero-MURAKAMI/Sprout/blob/master/README -// -// License: -// Boost Software License - Version 1.0 -// -// -#include -#include -#include - -int -main(){ - static constexpr sprout::default_random_engine engine; - static constexpr sprout::uniform_smallint dist(1, 6); - - static constexpr auto result = sprout::generate - /* Result type */> - (sprout::random::ccombine(engine, dist) /*Random generator*/) - ; - - static_assert( - result == sprout::make_array(1, 1, 5, 2, 4, 2, 6, 2, 5, 1), - ""); - - return 0; -} diff --git a/dsp/lib/sprout/libs/random/example/distribution.cpp b/dsp/lib/sprout/libs/random/example/distribution.cpp deleted file mode 100644 index b78b098..0000000 --- a/dsp/lib/sprout/libs/random/example/distribution.cpp +++ /dev/null @@ -1,60 +0,0 @@ -// -// Sprout C++ Library -// -// Copyright (c) 2013 -// bolero-MURAKAMI : http://d.hatena.ne.jp/boleros/ -// osyo-manga : http://d.hatena.ne.jp/osyo-manga/ -// -// Readme: -// https://github.com/bolero-MURAKAMI/Sprout/blob/master/README -// -// License: -// Boost Software License - Version 1.0 -// -// -#include -#include - -int -main(){ - // - // Random engine - // - static constexpr sprout::default_random_engine engine; - - // - // Distribution - // - // 1 ~ 6 - { - static constexpr sprout::uniform_int_distribution<> dist(1, 6); - static_assert(dist(engine) == 1, ""); - static_assert(dist(engine)() == 1, ""); - static_assert(dist(engine)()() == 5, ""); - static_assert(dist(engine)()()() == 3, ""); - } - - // 0.0 ~ 1.0 - { - static constexpr sprout::uniform_real_distribution dist(0.0, 1.0); -// static_assert(dist(engine) == 0.7.8259e-006, ""); -// static_assert(dist(engine) == 0.131538, ""); -// static_assert(dist(engine) == 0.755605, ""); -// static_assert(dist(engine) == 0.45865, ""); - std::cout << dist(engine) << std::endl; - std::cout << dist(engine)() << std::endl; - std::cout << dist(engine)()() << std::endl; - std::cout << dist(engine)()()() << std::endl; - } - - // Returns true with probability 50% - { - static constexpr sprout::bernoulli_distribution<> dist(0.5); - static_assert(dist(engine) == 1, ""); - static_assert(dist(engine)() == 1, ""); - static_assert(dist(engine)()() == 0, ""); - static_assert(dist(engine)()()() == 1, ""); - } - - return 0; -} diff --git a/dsp/lib/sprout/libs/random/example/random.cpp b/dsp/lib/sprout/libs/random/example/random.cpp deleted file mode 100644 index 1709cb7..0000000 --- a/dsp/lib/sprout/libs/random/example/random.cpp +++ /dev/null @@ -1,53 +0,0 @@ -// -// Sprout C++ Library -// -// Copyright (c) 2013 -// bolero-MURAKAMI : http://d.hatena.ne.jp/boleros/ -// osyo-manga : http://d.hatena.ne.jp/osyo-manga/ -// -// Readme: -// https://github.com/bolero-MURAKAMI/Sprout/blob/master/README -// -// License: -// Boost Software License - Version 1.0 -// -// -#include - -// -// Compile Time Random -// -int -main(){ - // - // Random engine - // - static constexpr sprout::hellekalek1995 engine; - static_assert(engine() == 2110608584, ""); - static_assert(engine()() == 239248507, ""); - - // - // Distribution - // - static constexpr sprout::uniform_int_distribution dist(100, 999); - - // - // Get random value - // - // return int value - static constexpr int n = *dist(engine); - // or - // operator int -// static constexpr int n = dist(engine); - static_assert(n == 984, ""); - - // - // Next random value - // - static_assert(dist(engine)() == 200, ""); - static_assert(dist(engine)()() == 566, ""); - static_assert(dist(engine)()()() == 255, ""); - static_assert(dist(engine)()()()() == 175, ""); - - return 0; -} diff --git a/dsp/lib/sprout/libs/random/example/seed.cpp b/dsp/lib/sprout/libs/random/example/seed.cpp deleted file mode 100644 index 41535b7..0000000 --- a/dsp/lib/sprout/libs/random/example/seed.cpp +++ /dev/null @@ -1,57 +0,0 @@ -// -// Sprout C++ Library -// -// Copyright (c) 2013 -// bolero-MURAKAMI : http://d.hatena.ne.jp/boleros/ -// osyo-manga : http://d.hatena.ne.jp/osyo-manga/ -// -// Readme: -// https://github.com/bolero-MURAKAMI/Sprout/blob/master/README -// -// License: -// Boost Software License - Version 1.0 -// -// -#include -#include -// #include - -int -main(){ - static constexpr sprout::uniform_int_distribution dist(100, 999); - - { - static constexpr auto seed = 2013; - static constexpr sprout::default_random_engine engine(seed); - - static_assert(engine() == 33832491, ""); - static_assert(dist(engine) == 114, ""); - } - - { - static constexpr auto seed = 8379842; - static constexpr sprout::default_random_engine engine(seed); - - static_assert(engine() == 1253567439, ""); - static_assert(dist(engine) == 625, ""); - } - - // - // Compile time unique seed - // - { - static constexpr auto seed = SPROUT_UNIQUE_SEED; - std::cout << seed << std::endl; - - static constexpr sprout::default_random_engine engine(seed); - std::cout << engine() << std::endl; - std::cout << dist(engine) << std::endl; - - // compile time output -// typedef boost::mpl::print>::type unique_seed_type; -// typedef boost::mpl::print>::type engine_type; -// typedef boost::mpl::print>::type dist_type; - } - - return 0; -} diff --git a/dsp/lib/sprout/libs/random/test/CMakeLists.txt b/dsp/lib/sprout/libs/random/test/CMakeLists.txt deleted file mode 100644 index 70f4837..0000000 --- a/dsp/lib/sprout/libs/random/test/CMakeLists.txt +++ /dev/null @@ -1,45 +0,0 @@ -add_executable( libs_random_test_additive_combine additive_combine.cpp ) -set_target_properties( libs_random_test_additive_combine PROPERTIES OUTPUT_NAME "additive_combine" ) -add_test( libs_random_test_additive_combine additive_combine ) -add_executable( libs_random_test_bernoulli_distribution bernoulli_distribution.cpp ) -set_target_properties( libs_random_test_bernoulli_distribution PROPERTIES OUTPUT_NAME "bernoulli_distribution" ) -add_test( libs_random_test_bernoulli_distribution bernoulli_distribution ) -add_executable( libs_random_test_binomial_distribution binomial_distribution.cpp ) -set_target_properties( libs_random_test_binomial_distribution PROPERTIES OUTPUT_NAME "binomial_distribution" ) -add_test( libs_random_test_binomial_distribution binomial_distribution ) -add_executable( libs_random_test_geometric_distribution geometric_distribution.cpp ) -set_target_properties( libs_random_test_geometric_distribution PROPERTIES OUTPUT_NAME "geometric_distribution" ) -add_test( libs_random_test_geometric_distribution geometric_distribution ) -add_executable( libs_random_test_inversive_congruential inversive_congruential.cpp ) -set_target_properties( libs_random_test_inversive_congruential PROPERTIES OUTPUT_NAME "inversive_congruential" ) -add_test( libs_random_test_inversive_congruential inversive_congruential ) -add_executable( libs_random_test_linear_congruential linear_congruential.cpp ) -set_target_properties( libs_random_test_linear_congruential PROPERTIES OUTPUT_NAME "linear_congruential" ) -add_test( libs_random_test_linear_congruential linear_congruential ) -#add_executable( libs_random_test_mersenne_twister mersenne_twister.cpp ) -#set_target_properties( libs_random_test_mersenne_twister PROPERTIES OUTPUT_NAME "mersenne_twister" ) -#add_test( libs_random_test_mersenne_twister mersenne_twister ) -add_executable( libs_random_test_normal_distribution normal_distribution.cpp ) -set_target_properties( libs_random_test_normal_distribution PROPERTIES OUTPUT_NAME "normal_distribution" ) -add_test( libs_random_test_normal_distribution normal_distribution ) -add_executable( libs_random_test_random random.cpp ) -set_target_properties( libs_random_test_random PROPERTIES OUTPUT_NAME "random" ) -add_test( libs_random_test_random random ) -add_executable( libs_random_test_shuffle_order shuffle_order.cpp ) -set_target_properties( libs_random_test_shuffle_order PROPERTIES OUTPUT_NAME "shuffle_order" ) -add_test( libs_random_test_shuffle_order shuffle_order ) -add_executable( libs_random_test_taus88 taus88.cpp ) -set_target_properties( libs_random_test_taus88 PROPERTIES OUTPUT_NAME "taus88" ) -add_test( libs_random_test_taus88 taus88 ) -add_executable( libs_random_test_uniform_01 uniform_01.cpp ) -set_target_properties( libs_random_test_uniform_01 PROPERTIES OUTPUT_NAME "uniform_01" ) -add_test( libs_random_test_uniform_01 uniform_01 ) -add_executable( libs_random_test_uniform_int_distribution uniform_int_distribution.cpp ) -set_target_properties( libs_random_test_uniform_int_distribution PROPERTIES OUTPUT_NAME "uniform_int_distribution" ) -add_test( libs_random_test_uniform_int_distribution uniform_int_distribution ) -add_executable( libs_random_test_uniform_real_distribution uniform_real_distribution.cpp ) -set_target_properties( libs_random_test_uniform_real_distribution PROPERTIES OUTPUT_NAME "uniform_real_distribution" ) -add_test( libs_random_test_uniform_real_distribution uniform_real_distribution ) -add_executable( libs_random_test_uniform_smallint uniform_smallint.cpp ) -set_target_properties( libs_random_test_uniform_smallint PROPERTIES OUTPUT_NAME "uniform_smallint" ) -add_test( libs_random_test_uniform_smallint uniform_smallint ) diff --git a/dsp/lib/sprout/libs/random/test/additive_combine.cpp b/dsp/lib/sprout/libs/random/test/additive_combine.cpp deleted file mode 100644 index 63a2034..0000000 --- a/dsp/lib/sprout/libs/random/test/additive_combine.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_RANDOM_TEST_ADDITIVE_COMBINE_CPP -#define SPROUT_LIBS_RANDOM_TEST_ADDITIVE_COMBINE_CPP - -#include -#include "./engine_generic.hpp" -#include - -namespace testspr { - void random_additive_combine_test() { - using namespace sprout; - - testspr::random_engine_test_generic(); - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::random_additive_combine_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_RANDOM_TEST_ADDITIVE_COMBINE_CPP diff --git a/dsp/lib/sprout/libs/random/test/bernoulli_distribution.cpp b/dsp/lib/sprout/libs/random/test/bernoulli_distribution.cpp deleted file mode 100644 index 1711836..0000000 --- a/dsp/lib/sprout/libs/random/test/bernoulli_distribution.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_RANDOM_TEST_BERNOULLI_DISTRIBUTION_CPP -#define SPROUT_LIBS_RANDOM_TEST_BERNOULLI_DISTRIBUTION_CPP - -#include -#include "./distribution_generic.hpp" -#include - -namespace testspr { - void random_bernoulli_distribution_test() { - using namespace sprout; - - testspr::random_distribution_test_generic >(); - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::random_bernoulli_distribution_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_RANDOM_TEST_BERNOULLI_DISTRIBUTION_CPP diff --git a/dsp/lib/sprout/libs/random/test/binomial_distribution.cpp b/dsp/lib/sprout/libs/random/test/binomial_distribution.cpp deleted file mode 100644 index d4f5b64..0000000 --- a/dsp/lib/sprout/libs/random/test/binomial_distribution.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_RANDOM_TEST_BINOMIAL_DISTRIBUTION_CPP -#define SPROUT_LIBS_RANDOM_TEST_BINOMIAL_DISTRIBUTION_CPP - -#include -#include "./distribution_generic.hpp" -#include - -namespace testspr { - void random_binomial_distribution_test() { - using namespace sprout; - - testspr::random_distribution_test_generic >(); - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::random_binomial_distribution_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_RANDOM_TEST_BINOMIAL_DISTRIBUTION_CPP diff --git a/dsp/lib/sprout/libs/random/test/distribution_generic.hpp b/dsp/lib/sprout/libs/random/test/distribution_generic.hpp deleted file mode 100644 index 57b909c..0000000 --- a/dsp/lib/sprout/libs/random/test/distribution_generic.hpp +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef SPROUT_LIBS_RANDOM_TEST_DISTRIBUTION_GENERIC_HPP -#define SPROUT_LIBS_RANDOM_TEST_DISTRIBUTION_GENERIC_HPP - -#include -#include -#include -#include -#include - -namespace testspr { - template - void random_distribution_test_generic() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto parm = typename Distribution::param_type(); - - SPROUT_STATIC_CONSTEXPR auto dist1 = Distribution(parm); - SPROUT_STATIC_CONSTEXPR auto dist2 = Distribution(parm); - - // min - // max - TESTSPR_BOTH_ASSERT(dist1.min() <= dist1.max()); - - // param - TESTSPR_BOTH_ASSERT(parm == dist1.param()); - { - auto dist_temp = Distribution(); - dist_temp.param(parm); - TESTSPR_ASSERT(dist_temp == dist1); - } - - // operator== - // operator!= - TESTSPR_BOTH_ASSERT(dist1 == dist2); - TESTSPR_BOTH_ASSERT(!(dist1 != dist2)); - - { - std::string s; - - // operator<< - { - std::ostringstream os; - os << dist1; - TESTSPR_ASSERT(!!os); - s = os.str(); - } - - auto dist_temp = Distribution(); - - // operator>> - { - std::istringstream is(s); - is >> dist_temp; - TESTSPR_ASSERT(!!is); - } - - TESTSPR_ASSERT(dist_temp == dist1); - } - - // operator() - { - SPROUT_STATIC_CONSTEXPR auto eng = Engine(SPROUT_UNIQUE_SEED); - { - SPROUT_STATIC_CONSTEXPR auto rnd = dist1(eng); - - // result - TESTSPR_BOTH_ASSERT(dist1.min() <= rnd.result()); - TESTSPR_BOTH_ASSERT(rnd.result() <= dist1.max()); - - // engine - TESTSPR_BOTH_ASSERT(rnd.engine().min() <= rnd.engine().max()); - - // distribution - TESTSPR_BOTH_ASSERT(rnd.distribution().min() <= rnd.distribution().max()); - } - } - } - } -} // namespace testspr - -#endif // #ifndef SPROUT_LIBS_RANDOM_TEST_DISTRIBUTION_GENERIC_HPP diff --git a/dsp/lib/sprout/libs/random/test/engine_generic.hpp b/dsp/lib/sprout/libs/random/test/engine_generic.hpp deleted file mode 100644 index 4cfd439..0000000 --- a/dsp/lib/sprout/libs/random/test/engine_generic.hpp +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef SPROUT_LIBS_RANDOM_TEST_ENGINE_GENERIC_HPP -#define SPROUT_LIBS_RANDOM_TEST_ENGINE_GENERIC_HPP - -#include -#include -#include -#include - -namespace testspr { - template - void random_engine_test_generic() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto eng1 = Engine(SPROUT_UNIQUE_SEED); - SPROUT_STATIC_CONSTEXPR auto eng2 = Engine(SPROUT_UNIQUE_SEED); - - // min - // max - TESTSPR_BOTH_ASSERT(eng1.min() <= eng1.max()); - - // operator== - // operator!= - TESTSPR_BOTH_ASSERT(eng1 == eng1); - TESTSPR_BOTH_ASSERT(!(eng1 == eng2)); - TESTSPR_BOTH_ASSERT(eng1 != eng2); - TESTSPR_BOTH_ASSERT(!(eng1 != eng1)); - - { - std::string s; - - // operator<< - { - std::ostringstream os; - os << eng1; - TESTSPR_ASSERT(!!os); - s = os.str(); - } - - auto eng_temp = Engine(); - - // operator>> - { - std::istringstream is(s); - is >> eng_temp; - TESTSPR_ASSERT(!!is); - } - - //TESTSPR_ASSERT(eng_temp == eng1); - } - - // operator() - { - SPROUT_STATIC_CONSTEXPR auto rnd = eng1(); - - // result - TESTSPR_BOTH_ASSERT(eng1.min() <= rnd.result()); - TESTSPR_BOTH_ASSERT(rnd.result() <= eng1.max()); - - // engine - TESTSPR_BOTH_ASSERT(rnd.engine().min() <= rnd.engine().max()); - } - } - } -} // namespace testspr - -#endif // #ifndef SPROUT_LIBS_RANDOM_TEST_ENGINE_GENERIC_HPP diff --git a/dsp/lib/sprout/libs/random/test/geometric_distribution.cpp b/dsp/lib/sprout/libs/random/test/geometric_distribution.cpp deleted file mode 100644 index b613843..0000000 --- a/dsp/lib/sprout/libs/random/test/geometric_distribution.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_RANDOM_TEST_GEOMETRIC_DISTRIBUTION_CPP -#define SPROUT_LIBS_RANDOM_TEST_GEOMETRIC_DISTRIBUTION_CPP - -#include -#include "./distribution_generic.hpp" -#include - -namespace testspr { - void random_geometric_distribution_test() { - using namespace sprout; - - testspr::random_distribution_test_generic >(); - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::random_geometric_distribution_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_RANDOM_TEST_GEOMETRIC_DISTRIBUTION_CPP diff --git a/dsp/lib/sprout/libs/random/test/inversive_congruential.cpp b/dsp/lib/sprout/libs/random/test/inversive_congruential.cpp deleted file mode 100644 index fe6c170..0000000 --- a/dsp/lib/sprout/libs/random/test/inversive_congruential.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_RANDOM_TEST_INVERSIVE_CONGRUENTIAL_CPP -#define SPROUT_LIBS_RANDOM_TEST_INVERSIVE_CONGRUENTIAL_CPP - -#include -#include "./engine_generic.hpp" -#include - -namespace testspr { - void random_inversive_congruential_test() { - using namespace sprout; - - testspr::random_engine_test_generic(); - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::random_inversive_congruential_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_RANDOM_TEST_INVERSIVE_CONGRUENTIAL_CPP diff --git a/dsp/lib/sprout/libs/random/test/linear_congruential.cpp b/dsp/lib/sprout/libs/random/test/linear_congruential.cpp deleted file mode 100644 index 54acf95..0000000 --- a/dsp/lib/sprout/libs/random/test/linear_congruential.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_RANDOM_TEST_LINEAR_CONGRUENTIAL_CPP -#define SPROUT_LIBS_RANDOM_TEST_LINEAR_CONGRUENTIAL_CPP - -#include -#include "./engine_generic.hpp" -#include - -namespace testspr { - void random_linear_congruential_test() { - using namespace sprout; - - testspr::random_engine_test_generic(); - testspr::random_engine_test_generic(); - testspr::random_engine_test_generic(); - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::random_linear_congruential_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_RANDOM_TEST_LINEAR_CONGRUENTIAL_CPP diff --git a/dsp/lib/sprout/libs/random/test/mersenne_twister.cpp b/dsp/lib/sprout/libs/random/test/mersenne_twister.cpp deleted file mode 100644 index 9910768..0000000 --- a/dsp/lib/sprout/libs/random/test/mersenne_twister.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_RANDOM_TEST_MERSENNE_TWISTER_CPP -#define SPROUT_LIBS_RANDOM_TEST_MERSENNE_TWISTER_CPP - -#include -#include "./engine_generic.hpp" -#include - -namespace testspr { - void random_mersenne_twister_test() { - using namespace sprout; - - testspr::random_engine_test_generic(); - //testspr::random_engine_test_generic(); - //testspr::random_engine_test_generic(); - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::random_mersenne_twister_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_RANDOM_TEST_MERSENNE_TWISTER_CPP diff --git a/dsp/lib/sprout/libs/random/test/normal_distribution.cpp b/dsp/lib/sprout/libs/random/test/normal_distribution.cpp deleted file mode 100644 index 6c2b32f..0000000 --- a/dsp/lib/sprout/libs/random/test/normal_distribution.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_RANDOM_TEST_NORMAL_DISTRIBUTION_CPP -#define SPROUT_LIBS_RANDOM_TEST_NORMAL_DISTRIBUTION_CPP - -#include -#include "./distribution_generic.hpp" -#include - -namespace testspr { - void random_normal_distribution_test() { - using namespace sprout; - - testspr::random_distribution_test_generic >(); - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::random_normal_distribution_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_RANDOM_TEST_NORMAL_DISTRIBUTION_CPP diff --git a/dsp/lib/sprout/libs/random/test/poisson_distribution.cpp b/dsp/lib/sprout/libs/random/test/poisson_distribution.cpp deleted file mode 100644 index 89ea7d5..0000000 --- a/dsp/lib/sprout/libs/random/test/poisson_distribution.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_RANDOM_TEST_POISSON_DISTRIBUTION_CPP -#define SPROUT_LIBS_RANDOM_TEST_POISSON_DISTRIBUTION_CPP - -#include -#include "./distribution_generic.hpp" -#include - -namespace testspr { - void random_poisson_distribution_test() { - using namespace sprout; - - testspr::random_distribution_test_generic >(); - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::random_poisson_distribution_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_RANDOM_TEST_POISSON_DISTRIBUTION_CPP diff --git a/dsp/lib/sprout/libs/random/test/random.cpp b/dsp/lib/sprout/libs/random/test/random.cpp deleted file mode 100644 index 509a13e..0000000 --- a/dsp/lib/sprout/libs/random/test/random.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_RANDOM_TEST_RANDOM_CPP -#define SPROUT_LIBS_RANDOM_TEST_RANDOM_CPP - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_CPP_INCLUDE_DISABLE_SPROUT_LIBS_RANDOM_TEST_RANDOM_CPP -# define TESTSPR_CPP_INCLUDE -#endif - -#include "./linear_congruential.cpp" -#include "./additive_combine.cpp" -#include "./shuffle_order.cpp" -#include "./inversive_congruential.cpp" -#include "./taus88.cpp" -//#include "./mersenne_twister.cpp" -#include "./uniform_smallint.cpp" -#include "./uniform_int_distribution.cpp" -#include "./uniform_01.cpp" -#include "./uniform_real_distribution.cpp" -#include "./bernoulli_distribution.cpp" -#include "./binomial_distribution.cpp" -#include "./geometric_distribution.cpp" -#include "./poisson_distribution.cpp" -#include "./normal_distribution.cpp" -#include - -#ifdef TESTSPR_CPP_INCLUDE_DISABLE_SPROUT_LIBS_RANDOM_TEST_RANDOM_CPP -# undef TESTSPR_CPP_INCLUDE -#endif - -namespace testspr { - void random_test() { - using namespace sprout; - - testspr::random_linear_congruential_test(); - testspr::random_additive_combine_test(); - testspr::random_shuffle_order_test(); - testspr::random_inversive_congruential_test(); - testspr::random_taus88_test(); - //testspr::random_mersenne_twister_test(); - testspr::random_uniform_smallint_test(); - testspr::random_uniform_int_distribution_test(); - testspr::random_uniform_01_test(); - testspr::random_uniform_real_distribution_test(); - testspr::random_bernoulli_distribution_test(); - testspr::random_binomial_distribution_test(); - testspr::random_geometric_distribution_test(); - testspr::random_poisson_distribution_test(); - testspr::random_normal_distribution_test(); - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::random_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_RANDOM_TEST_RANDOM_CPP diff --git a/dsp/lib/sprout/libs/random/test/shuffle_order.cpp b/dsp/lib/sprout/libs/random/test/shuffle_order.cpp deleted file mode 100644 index 5f174ad..0000000 --- a/dsp/lib/sprout/libs/random/test/shuffle_order.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_RANDOM_TEST_SHUFFLE_ORDER_CPP -#define SPROUT_LIBS_RANDOM_TEST_SHUFFLE_ORDER_CPP - -#include -#include "./engine_generic.hpp" -#include - -namespace testspr { - void random_shuffle_order_test() { - using namespace sprout; - - testspr::random_engine_test_generic(); - testspr::random_engine_test_generic(); - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::random_shuffle_order_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_RANDOM_TEST_SHUFFLE_ORDER_CPP diff --git a/dsp/lib/sprout/libs/random/test/taus88.cpp b/dsp/lib/sprout/libs/random/test/taus88.cpp deleted file mode 100644 index 8c68c20..0000000 --- a/dsp/lib/sprout/libs/random/test/taus88.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_RANDOM_TEST_TAUS88_CPP -#define SPROUT_LIBS_RANDOM_TEST_TAUS88_CPP - -#include -#include "./engine_generic.hpp" -#include - -namespace testspr { - void random_taus88_test() { - using namespace sprout; - - testspr::random_engine_test_generic(); - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::random_taus88_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_RANDOM_TEST_TAUS88_CPP diff --git a/dsp/lib/sprout/libs/random/test/uniform_01.cpp b/dsp/lib/sprout/libs/random/test/uniform_01.cpp deleted file mode 100644 index fcb9693..0000000 --- a/dsp/lib/sprout/libs/random/test/uniform_01.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_RANDOM_TEST_UNIFORM_01_CPP -#define SPROUT_LIBS_RANDOM_TEST_UNIFORM_01_CPP - -#include -#include "./distribution_generic.hpp" -#include - -namespace testspr { - void random_uniform_01_test() { - using namespace sprout; - - testspr::random_distribution_test_generic >(); - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::random_uniform_01_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_RANDOM_TEST_UNIFORM_01_CPP diff --git a/dsp/lib/sprout/libs/random/test/uniform_int_distribution.cpp b/dsp/lib/sprout/libs/random/test/uniform_int_distribution.cpp deleted file mode 100644 index c553957..0000000 --- a/dsp/lib/sprout/libs/random/test/uniform_int_distribution.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_RANDOM_TEST_UNIFORM_INT_DISTRIBUTION_CPP -#define SPROUT_LIBS_RANDOM_TEST_UNIFORM_INT_DISTRIBUTION_CPP - -#include -#include "./distribution_generic.hpp" -#include - -namespace testspr { - void random_uniform_int_distribution_test() { - using namespace sprout; - - testspr::random_distribution_test_generic >(); - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::random_uniform_int_distribution_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_RANDOM_TEST_UNIFORM_INT_DISTRIBUTION_CPP diff --git a/dsp/lib/sprout/libs/random/test/uniform_real_distribution.cpp b/dsp/lib/sprout/libs/random/test/uniform_real_distribution.cpp deleted file mode 100644 index a84e13e..0000000 --- a/dsp/lib/sprout/libs/random/test/uniform_real_distribution.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_RANDOM_TEST_UNIFORM_REAL_DISTRIBUTION_CPP -#define SPROUT_LIBS_RANDOM_TEST_UNIFORM_REAL_DISTRIBUTION_CPP - -#include -#include "./distribution_generic.hpp" -#include - -namespace testspr { - void random_uniform_real_distribution_test() { - using namespace sprout; - - testspr::random_distribution_test_generic >(); - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::random_uniform_real_distribution_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_RANDOM_TEST_UNIFORM_REAL_DISTRIBUTION_CPP diff --git a/dsp/lib/sprout/libs/random/test/uniform_smallint.cpp b/dsp/lib/sprout/libs/random/test/uniform_smallint.cpp deleted file mode 100644 index 2634d33..0000000 --- a/dsp/lib/sprout/libs/random/test/uniform_smallint.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_RANDOM_TEST_UNIFORM_SMALLINT_CPP -#define SPROUT_LIBS_RANDOM_TEST_UNIFORM_SMALLINT_CPP - -#include -#include "./distribution_generic.hpp" -#include - -namespace testspr { - void random_uniform_smallint_test() { - using namespace sprout; - - testspr::random_distribution_test_generic >(); - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::random_uniform_smallint_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_RANDOM_TEST_UNIFORM_SMALLINT_CPP diff --git a/dsp/lib/sprout/libs/string/CMakeLists.txt b/dsp/lib/sprout/libs/string/CMakeLists.txt deleted file mode 100644 index 1fb854d..0000000 --- a/dsp/lib/sprout/libs/string/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -subdirs( test example ) diff --git a/dsp/lib/sprout/libs/string/example/CMakeLists.txt b/dsp/lib/sprout/libs/string/example/CMakeLists.txt deleted file mode 100644 index b171b2b..0000000 --- a/dsp/lib/sprout/libs/string/example/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -add_executable( libs_string_example_c_str_to_sprout_string c_str_to_sprout_string.cpp ) -set_target_properties( libs_string_example_c_str_to_sprout_string PROPERTIES OUTPUT_NAME "c_str_to_sprout_string" ) -add_executable( libs_string_example_literals_to_string literals_to_string.cpp ) -set_target_properties( libs_string_example_literals_to_string PROPERTIES OUTPUT_NAME "literals_to_string" ) -add_executable( libs_string_example_simple simple.cpp ) -set_target_properties( libs_string_example_simple PROPERTIES OUTPUT_NAME "simple" ) diff --git a/dsp/lib/sprout/libs/string/example/c_str_to_sprout_string.cpp b/dsp/lib/sprout/libs/string/example/c_str_to_sprout_string.cpp deleted file mode 100644 index 43187bd..0000000 --- a/dsp/lib/sprout/libs/string/example/c_str_to_sprout_string.cpp +++ /dev/null @@ -1,44 +0,0 @@ -// -// Sprout C++ Library -// -// Copyright (c) 2012 -// bolero-MURAKAMI : http://d.hatena.ne.jp/boleros/ -// osyo-manga : http://d.hatena.ne.jp/osyo-manga/ -// -// Readme: -// https://github.com/bolero-MURAKAMI/Sprout/blob/master/README -// -// License: -// Boost Software License - Version 1.0 -// -// -#include - -// -// C style string to Sprout.String -// -int -main(){ - - constexpr char const* c_str = "homu"; - - // - // String length is required - // - constexpr auto length = sprout::char_traits::length(c_str); - static_assert(length == 4, ""); - - // - // To Sprout.String - // - constexpr auto str = sprout::string_from_c_str( c_str ); - static_assert(std::is_same const, decltype(str)>{}, ""); - static_assert(str == "homu", ""); - - constexpr auto str2 = sprout::string_from_c_str( c_str, 2 ); - static_assert(std::is_same const, decltype(str2)>{}, ""); - static_assert(str2 == "ho", ""); - - - return 0; -} diff --git a/dsp/lib/sprout/libs/string/example/literals_to_string.cpp b/dsp/lib/sprout/libs/string/example/literals_to_string.cpp deleted file mode 100644 index 1938f38..0000000 --- a/dsp/lib/sprout/libs/string/example/literals_to_string.cpp +++ /dev/null @@ -1,60 +0,0 @@ -// -// Sprout C++ Library -// -// Copyright (c) 2012 -// bolero-MURAKAMI : http://d.hatena.ne.jp/boleros/ -// osyo-manga : http://d.hatena.ne.jp/osyo-manga/ -// -// Readme: -// https://github.com/bolero-MURAKAMI/Sprout/blob/master/README -// -// License: -// Boost Software License - Version 1.0 -// -// -#include - - -int -main(){ - - // - // String literal to Sprout.String - // - { - static constexpr auto str1 = sprout::to_string("homu"); - static_assert(str1 == "homu", ""); - static_assert(std::is_same const>{}, ""); - - static constexpr auto str2 = sprout::to_string(L"ほむほむ"); - static_assert(str2 == L"ほむほむ", ""); - static_assert(std::is_same const>{}, ""); - } - - // - // Integer literal to Sprout.String - // - { - static constexpr auto str = sprout::to_string(42); - static_assert(str == "42", ""); - } - - // - // Float literal to Sprout.String - // - { - static constexpr auto str = sprout::to_string(3.14f); - static_assert(str == "3.140000", ""); - } - - // - // Char literal to Sprout.String - // - { - static constexpr auto str = sprout::make_string('m', 'a', 'd', 'o'); - static_assert(str == "mado", ""); - static_assert(std::is_same const>{}, ""); - } - - return 0; -} diff --git a/dsp/lib/sprout/libs/string/example/simple.cpp b/dsp/lib/sprout/libs/string/example/simple.cpp deleted file mode 100644 index 6e1c97a..0000000 --- a/dsp/lib/sprout/libs/string/example/simple.cpp +++ /dev/null @@ -1,86 +0,0 @@ -// -// Sprout C++ Library -// -// Copyright (c) 2012 -// bolero-MURAKAMI : http://d.hatena.ne.jp/boleros/ -// osyo-manga : http://d.hatena.ne.jp/osyo-manga/ -// -// Readme: -// https://github.com/bolero-MURAKAMI/Sprout/blob/master/README -// -// License: -// Boost Software License - Version 1.0 -// -// -#include -#include -#include - - -// -// Sprout.String is constexpr string object -// -int -main(){ - - // - // String literal to Sprout.String - // - static constexpr sprout::string<4> str1 = sprout::to_string("homu"); - static constexpr auto str2 = sprout::to_string("mado"); - static constexpr auto str3 = sprout::to_string(42); - - // - // Comparison - // - static_assert(str1 == sprout::to_string("homu"), ""); - static_assert(str2 == "mado", ""); - static_assert(str3 == "42", ""); - static_assert(str1 != str2, ""); - - // - // Accessor - // - static_assert(str1.front() == 'h', ""); - static_assert(str1[1] == 'o', ""); - static_assert(str1.at(2) == 'm', ""); - static_assert(str1.back() == 'u', ""); - - // - // String concatenation - // - static_assert((str1 + "homu") == "homuhomu", ""); - static_assert((str1 + str2) == "homumado", ""); - static_assert((str1 + sprout::to_string("42")) == "homu42", ""); - - // - // C style string - // - constexpr char const* cp = str1.c_str(); - static_assert(cp[0] == 'h', ""); - - // - // Iterator - // - static_assert(*str1.begin() == 'h', ""); - static_assert(*(str1.end() - 1) == 'u', ""); - static_assert(*(str1.rbegin() + 1) == 'm', ""); - static_assert(*(str1.rend() - 2) == 'o', ""); - - // - // IOStream - // - { - std::ostringstream os; - os << str1; - assert(os.str() == "homu"); - } - { - std::istringstream is("mami"); - sprout::string<4> str; - is >> str; - assert(str == "mami"); - } - - return 0; -} diff --git a/dsp/lib/sprout/libs/string/test/CMakeLists.txt b/dsp/lib/sprout/libs/string/test/CMakeLists.txt deleted file mode 100644 index d10cbff..0000000 --- a/dsp/lib/sprout/libs/string/test/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -add_executable( libs_string_test_string string.cpp ) -set_target_properties( libs_string_test_string PROPERTIES OUTPUT_NAME "string" ) -add_test( libs_string_test_string string ) diff --git a/dsp/lib/sprout/libs/string/test/string.cpp b/dsp/lib/sprout/libs/string/test/string.cpp deleted file mode 100644 index e7dac15..0000000 --- a/dsp/lib/sprout/libs/string/test/string.cpp +++ /dev/null @@ -1,395 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_STRING_TEST_STRING_CPP -#define SPROUT_LIBS_STRING_TEST_STRING_CPP - -#include -#include -#include -#include -#include - -namespace testspr { - static void string_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR char cstr[] = "foobar1234"; - SPROUT_STATIC_CONSTEXPR auto str1 = sprout::to_string(cstr); - SPROUT_STATIC_CONSTEXPR auto str2 = sprout::to_string("hogehoge"); - - TESTSPR_BOTH_ASSERT((std::is_same const>::value)); - TESTSPR_BOTH_ASSERT((std::is_same const>::value)); - - // constructor - { - SPROUT_STATIC_CONSTEXPR auto s1 = sprout::string_t<10>::type(); - TESTSPR_BOTH_ASSERT(s1.size() == 0); - } - { - SPROUT_STATIC_CONSTEXPR auto s1 = str1; - TESTSPR_BOTH_ASSERT(s1 == str1); - } - { - SPROUT_STATIC_CONSTEXPR std::decay::type s1 = str2; - TESTSPR_BOTH_ASSERT(s1 == str2); - } - { - SPROUT_STATIC_CONSTEXPR auto s1 = std::decay::type(str1, 6); - TESTSPR_BOTH_ASSERT(s1 == "1234"); - } - { - SPROUT_STATIC_CONSTEXPR auto s1 = std::decay::type(str1, 0, 6); - TESTSPR_BOTH_ASSERT(s1 == "foobar"); - } - { - SPROUT_STATIC_CONSTEXPR auto s1 = std::decay::type(str2, 4); - TESTSPR_BOTH_ASSERT(s1 == "hoge"); - } - { - SPROUT_STATIC_CONSTEXPR auto s1 = std::decay::type(str2, 0, 4); - TESTSPR_BOTH_ASSERT(s1 == "hoge"); - } - { - SPROUT_STATIC_CONSTEXPR auto s1 = sprout::string_t<10>::type(cstr); - TESTSPR_BOTH_ASSERT(s1 == cstr); - } - { - SPROUT_STATIC_CONSTEXPR auto s1 = sprout::string_t<10>::type(cstr, 6); - TESTSPR_BOTH_ASSERT(s1 == "foobar"); - } - { - SPROUT_STATIC_CONSTEXPR auto s1 = sprout::string_t<10>::type(static_cast(cstr)); - TESTSPR_BOTH_ASSERT(s1 == cstr); - } - { - SPROUT_STATIC_CONSTEXPR auto s1 = sprout::string_t<10>::type(static_cast(cstr), 6); - TESTSPR_BOTH_ASSERT(s1 == "foobar"); - } - { - SPROUT_STATIC_CONSTEXPR auto s1 = sprout::string_t<10>::type(cstr, cstr + 6); - TESTSPR_BOTH_ASSERT(s1 == "foobar"); - } - { - SPROUT_STATIC_CONSTEXPR auto s1 = sprout::string_t<10>::type(6, 'f'); - TESTSPR_BOTH_ASSERT(s1 == "ffffff"); - } - { - SPROUT_STATIC_CONSTEXPR auto s1 = sprout::string_t<10>::type(6, int('f')); - TESTSPR_BOTH_ASSERT(s1 == "ffffff"); - } - { - SPROUT_STATIC_CONSTEXPR auto s1 = sprout::string_t<10>::type(testspr::reduce_input(str1.begin()), testspr::reduce_input(str1.begin() + 6)); - TESTSPR_BOTH_ASSERT(s1 == "foobar"); - } - { - auto s1 = sprout::string_t<10>::type({'f', 'o', 'o', 'b', 'a', 'r'}); - TESTSPR_ASSERT(s1 == "foobar"); - } - - // begin - TESTSPR_BOTH_ASSERT(cstr[0] == *str1.begin()); - - // cbegin - TESTSPR_BOTH_ASSERT(cstr[0] == *str1.cbegin()); - - // end - TESTSPR_BOTH_ASSERT(cstr[9] == *(str1.end() - 1)); - - // cend - TESTSPR_BOTH_ASSERT(cstr[9] == *(str1.cend() - 1)); - - // rbegin - TESTSPR_BOTH_ASSERT(cstr[9] == *str1.rbegin()); - - // crbegin - TESTSPR_BOTH_ASSERT(cstr[9] == *str1.crbegin()); - - // rend - TESTSPR_BOTH_ASSERT(cstr[0] == *(str1.rend() - 1)); - - // crend - TESTSPR_BOTH_ASSERT(cstr[0] == *(str1.crend() - 1)); - - // size - TESTSPR_BOTH_ASSERT(str1.size() == 10); - - // empty - TESTSPR_BOTH_ASSERT(!str1.empty()); - TESTSPR_BOTH_ASSERT((sprout::string_t<0>::type().empty())); - - // max_size - TESTSPR_BOTH_ASSERT(str1.max_size() == 10); - - // operator[] - TESTSPR_BOTH_ASSERT(cstr[0] == str1[0]); - - // at - TESTSPR_BOTH_ASSERT(cstr[0] == str1.at(0)); - - // front - TESTSPR_BOTH_ASSERT(cstr[0] == str1.front()); - - // back - TESTSPR_BOTH_ASSERT(cstr[9] == str1.back()); - - // data - TESTSPR_BOTH_ASSERT(cstr[0] == *str1.data()); - - // c_str - TESTSPR_BOTH_ASSERT(cstr[0] == *str1.c_str()); - - // swap - { - auto s1 = sprout::to_string("abc"); - auto s2 = sprout::to_string("ABC"); - s1.swap(s2); - TESTSPR_ASSERT(s1[0] == 'A'); - } - - // assign - { - auto s = sprout::to_string("abc"); - s.assign(sprout::to_string("ABC")); - TESTSPR_ASSERT(s.size() == 3); - TESTSPR_ASSERT(s[0] == 'A'); - } - { - auto s = sprout::to_string("abc"); - s.assign(sprout::to_string("ABC"), 0, 2); - TESTSPR_ASSERT(s.size() == 2); - TESTSPR_ASSERT(s[0] == 'A'); - } - { - auto s = sprout::to_string("abc"); - s.assign("ABC", 2); - TESTSPR_ASSERT(s.size() == 2); - TESTSPR_ASSERT(s[0] == 'A'); - } - { - auto s = sprout::to_string("abc"); - s.assign("ABC"); - TESTSPR_ASSERT(s.size() == 3); - TESTSPR_ASSERT(s[0] == 'A'); - } - { - auto s = sprout::to_string("abc"); - s.assign(1, 'A'); - TESTSPR_ASSERT(s.size() == 1); - TESTSPR_ASSERT(s[0] == 'A'); - } - - // operator= - { - auto s = sprout::to_string("abc"); - s = sprout::to_string("ABC"); - TESTSPR_ASSERT(s.size() == 3); - TESTSPR_ASSERT(s[0] == 'A'); - } - { - auto s = sprout::to_string("abc"); - s = "ABC"; - TESTSPR_ASSERT(s.size() == 3); - TESTSPR_ASSERT(s[0] == 'A'); - } - { - auto s = sprout::to_string("abc"); - s = 'A'; - TESTSPR_ASSERT(s.size() == 1); - TESTSPR_ASSERT(s[0] == 'A'); - } - - // find - TESTSPR_BOTH_ASSERT(str1.find(str2) == npos); - TESTSPR_BOTH_ASSERT(str1.find(sprout::to_string("bar")) == 3); - TESTSPR_BOTH_ASSERT(str1.find(str2.c_str()) == npos); - TESTSPR_BOTH_ASSERT(str1.find("bar") == 3); - TESTSPR_BOTH_ASSERT(str1.find(str2.c_str(), 0, 3) == npos); - TESTSPR_BOTH_ASSERT(str1.find("barbar", 0, 3) == 3); - TESTSPR_BOTH_ASSERT(str1.find('b') == 3); - - // rfind - TESTSPR_BOTH_ASSERT(str1.rfind(str2) == npos); - TESTSPR_BOTH_ASSERT(str1.rfind(sprout::to_string("bar")) == 3); - TESTSPR_BOTH_ASSERT(str1.rfind(str2.c_str()) == npos); - TESTSPR_BOTH_ASSERT(str1.rfind("bar") == 3); - TESTSPR_BOTH_ASSERT(str1.rfind(str2.c_str(), npos, 3) == npos); - TESTSPR_BOTH_ASSERT(str1.rfind("barbar", npos, 3) == 3); - TESTSPR_BOTH_ASSERT(str1.rfind('b') == 3); - - // find_first_of - TESTSPR_BOTH_ASSERT(str1.find_first_of(sprout::to_string("vwxyz")) == npos); - TESTSPR_BOTH_ASSERT(str1.find_first_of(sprout::to_string("rab")) == 3); - TESTSPR_BOTH_ASSERT(str1.find_first_of("vwxyz") == npos); - TESTSPR_BOTH_ASSERT(str1.find_first_of("rab") == 3); - TESTSPR_BOTH_ASSERT(str1.find_first_of("vwxyz", 0, 3) == npos); - TESTSPR_BOTH_ASSERT(str1.find_first_of("rabrab", 0, 3) == 3); - TESTSPR_BOTH_ASSERT(str1.find_first_of('b') == 3); - - // find_last_of - TESTSPR_BOTH_ASSERT(str1.find_last_of(sprout::to_string("vwxyz")) == npos); - TESTSPR_BOTH_ASSERT(str1.find_last_of(sprout::to_string("rab")) == 5); - TESTSPR_BOTH_ASSERT(str1.find_last_of("vwxyz") == npos); - TESTSPR_BOTH_ASSERT(str1.find_last_of("rab") == 5); - TESTSPR_BOTH_ASSERT(str1.find_last_of("vwxyz", npos, 3) == npos); - TESTSPR_BOTH_ASSERT(str1.find_last_of("rabrab", npos, 3) == 5); - TESTSPR_BOTH_ASSERT(str1.find_last_of('r') == 5); - - // find_first_not_of - TESTSPR_BOTH_ASSERT(str1.find_first_not_of(str1) == npos); - TESTSPR_BOTH_ASSERT(str1.find_first_not_of(sprout::to_string("foo")) == 3); - TESTSPR_BOTH_ASSERT(str1.find_first_not_of(str1.c_str()) == npos); - TESTSPR_BOTH_ASSERT(str1.find_first_not_of("foo") == 3); - TESTSPR_BOTH_ASSERT(str1.find_first_not_of(str1.c_str(), 0, 10) == npos); - TESTSPR_BOTH_ASSERT(str1.find_first_not_of("foofoo", 0, 3) == 3); - TESTSPR_BOTH_ASSERT(str1.find_first_not_of('f') == 1); - - // find_last_not_of - TESTSPR_BOTH_ASSERT(str1.find_last_not_of(str1) == npos); - TESTSPR_BOTH_ASSERT(str1.find_last_not_of(sprout::to_string("4321")) == 5); - TESTSPR_BOTH_ASSERT(str1.find_last_not_of(str1.c_str()) == npos); - TESTSPR_BOTH_ASSERT(str1.find_last_not_of("4321") == 5); - TESTSPR_BOTH_ASSERT(str1.find_last_not_of(str1.c_str(), npos, 10) == npos); - TESTSPR_BOTH_ASSERT(str1.find_last_not_of("43214321", npos, 4) == 5); - TESTSPR_BOTH_ASSERT(str1.find_last_not_of('4') == 8); - - // substr - { - SPROUT_STATIC_CONSTEXPR auto str3 = str1.substr(); - TESTSPR_BOTH_ASSERT(str3 == "foobar1234"); - } - { - SPROUT_STATIC_CONSTEXPR auto str3 = str1.substr(6); - TESTSPR_BOTH_ASSERT(str3 == "1234"); - } - { - SPROUT_STATIC_CONSTEXPR auto str3 = str1.substr(0, 6); - TESTSPR_BOTH_ASSERT(str3 == "foobar"); - } - - // compare - TESTSPR_BOTH_ASSERT(str1.compare(str1) == 0); - TESTSPR_BOTH_ASSERT(str1.compare(sprout::to_string("zzzz")) < 0); - TESTSPR_BOTH_ASSERT(str2.compare(sprout::to_string("aaaa")) > 0); - TESTSPR_BOTH_ASSERT(str1.compare(0, 3, sprout::to_string("foo")) == 0); - TESTSPR_BOTH_ASSERT(str1.compare(0, 3, sprout::to_string("zzzz")) < 0); - TESTSPR_BOTH_ASSERT(str2.compare(0, 3, sprout::to_string("aaaa")) > 0); - TESTSPR_BOTH_ASSERT(str1.compare(0, 3, sprout::to_string("foo"), 0, 3) == 0); - TESTSPR_BOTH_ASSERT(str1.compare(0, 3, sprout::to_string("zzzz"), 0, 3) < 0); - TESTSPR_BOTH_ASSERT(str2.compare(0, 3, sprout::to_string("aaaa"), 0, 3) > 0); - TESTSPR_BOTH_ASSERT(str1.compare(str1.c_str()) == 0); - TESTSPR_BOTH_ASSERT(str1.compare("zzzz") < 0); - TESTSPR_BOTH_ASSERT(str1.compare("aaaa") > 0); - TESTSPR_BOTH_ASSERT(str1.compare(0, 3, "foo") == 0); - TESTSPR_BOTH_ASSERT(str1.compare(0, 3, "zzzz") < 0); - TESTSPR_BOTH_ASSERT(str1.compare(0, 3, "aaaa") > 0); - TESTSPR_BOTH_ASSERT(str1.compare(0, 3, "foo", 3) == 0); - TESTSPR_BOTH_ASSERT(str1.compare(0, 3, "zzzz", 3) < 0); - TESTSPR_BOTH_ASSERT(str1.compare(0, 3, "aaaa", 3) > 0); - - // operator== - TESTSPR_BOTH_ASSERT(!(str1 == str2)); - - // operator!= - TESTSPR_BOTH_ASSERT(str1 != str2); - - // operator< - TESTSPR_BOTH_ASSERT(str1 < str2); - - // operator> - TESTSPR_BOTH_ASSERT(!(str1 > str2)); - - // operator<= - TESTSPR_BOTH_ASSERT(str1 <= str2); - - // operator>= - TESTSPR_BOTH_ASSERT(!(str1 >= str2)); - - // operator+ - { -#ifdef SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION - // ! Error in GCC4.7 - SPROUT_STATIC_CONSTEXPR auto str3 = str1 + sprout::to_string("hogehoge"); - TESTSPR_BOTH_ASSERT(str3 == "foobar1234hogehoge"); -#endif - - SPROUT_STATIC_CONSTEXPR auto str4 = str1 + str2; - TESTSPR_BOTH_ASSERT(str4 == "foobar1234hogehoge"); - } - - // operator<< - { - std::ostringstream os; - os << str1; - TESTSPR_ASSERT(os.str() == cstr); - } - - // operator>> - { - std::istringstream is("hogehoge piyopiyo"); - auto str3 = str1; - is >> str3; - TESTSPR_ASSERT(str3 == "hogehoge"); - } - - // string_from_c_str - { - SPROUT_STATIC_CONSTEXPR auto str3 = string_from_c_str<10>(cstr); - TESTSPR_BOTH_ASSERT(str3 == "foobar1234"); - } - { - SPROUT_STATIC_CONSTEXPR auto str3 = string_from_c_str<10>(cstr, 6); - TESTSPR_BOTH_ASSERT(str3 == "foobar"); - } - - // make_string - { - SPROUT_STATIC_CONSTEXPR auto str3 = make_string('f', 'o', 'o', 'b', 'a', 'r'); - TESTSPR_BOTH_ASSERT(str3 == "foobar"); - TESTSPR_BOTH_ASSERT(str3.size() == 6); - } - - // operator basic_string - { - SPROUT_STATIC_CONSTEXPR string_t<10>::type str3 = sprout::to_string("foobar"); - TESTSPR_BOTH_ASSERT(str3 == "foobar"); - TESTSPR_BOTH_ASSERT(str3.size() == 6); - } - - // get - TESTSPR_BOTH_ASSERT(sprout::tuples::get<0>(str1) == 'f'); - TESTSPR_BOTH_ASSERT(sprout::tuples::get<1>(str1) == 'o'); - { - auto str3 = str1; - TESTSPR_ASSERT(sprout::tuples::get<0>(str3) == 'f'); - TESTSPR_ASSERT(sprout::tuples::get<1>(str3) == 'o'); - } - - // tuple_size - TESTSPR_BOTH_ASSERT(sprout::tuples::tuple_size::value == 10); - - // tuple_element - TESTSPR_BOTH_ASSERT((std::is_same::type, char const>::value)); - TESTSPR_BOTH_ASSERT((std::is_same::type, char const>::value)); - - // is_string - TESTSPR_BOTH_ASSERT(sprout::is_string::value); - TESTSPR_BOTH_ASSERT(!sprout::is_string::value); - - // sprout::to_hash, sprout::hash - TESTSPR_BOTH_ASSERT(sprout::to_hash(str1) == sprout::hash()(str1)); - TESTSPR_BOTH_ASSERT(sprout::to_hash(str1) != sprout::to_hash(str2)); - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::string_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_STRING_TEST_STRING_CPP diff --git a/dsp/lib/sprout/libs/tuple/CMakeLists.txt b/dsp/lib/sprout/libs/tuple/CMakeLists.txt deleted file mode 100644 index a32dcf2..0000000 --- a/dsp/lib/sprout/libs/tuple/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -subdirs( test ) diff --git a/dsp/lib/sprout/libs/tuple/test/CMakeLists.txt b/dsp/lib/sprout/libs/tuple/test/CMakeLists.txt deleted file mode 100644 index 07447e1..0000000 --- a/dsp/lib/sprout/libs/tuple/test/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -add_executable( libs_tuple_test_tuple tuple.cpp ) -set_target_properties( libs_tuple_test_tuple PROPERTIES OUTPUT_NAME "tuple" ) -add_test( libs_tuple_test_tuple tuple ) diff --git a/dsp/lib/sprout/libs/tuple/test/tuple.cpp b/dsp/lib/sprout/libs/tuple/test/tuple.cpp deleted file mode 100644 index b5fcff8..0000000 --- a/dsp/lib/sprout/libs/tuple/test/tuple.cpp +++ /dev/null @@ -1,254 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_TUPLE_TEST_TUPLE_CPP -#define SPROUT_LIBS_TUPLE_TEST_TUPLE_CPP - -#include -#include -#include -#include - -namespace testspr { - static void tuple_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto tup1 = sprout::tuples::tuple(1, 1.0); - SPROUT_STATIC_CONSTEXPR auto tup2 = sprout::tuples::tuple(); - - // constructor - { - SPROUT_STATIC_CONSTEXPR auto tup3 = sprout::tuples::tuple(); - TESTSPR_BOTH_ASSERT(sprout::tuples::get<0>(tup3) == 0); - TESTSPR_BOTH_ASSERT(sprout::tuples::get<1>(tup3) == 0.0); - } - { - SPROUT_STATIC_CONSTEXPR auto tup3 = sprout::tuples::tuple(tup1); - TESTSPR_BOTH_ASSERT(sprout::tuples::get<0>(tup3) == 1); - TESTSPR_BOTH_ASSERT(sprout::tuples::get<1>(tup3) == 1.0); - } - { - SPROUT_STATIC_CONSTEXPR auto tup3 = sprout::tuples::tuple(1, 1.0); - TESTSPR_BOTH_ASSERT(sprout::tuples::get<0>(tup3) == 1); - TESTSPR_BOTH_ASSERT(sprout::tuples::get<1>(tup3) == 1.0); - } - - { - SPROUT_STATIC_CONSTEXPR auto tup3 = sprout::tuples::tuple(1l, 1.0f); - TESTSPR_BOTH_ASSERT(sprout::tuples::get<0>(tup3) == 1); - TESTSPR_BOTH_ASSERT(sprout::tuples::get<1>(tup3) == 1.0); - } - { - SPROUT_STATIC_CONSTEXPR auto tup3 = sprout::tuples::tuple(sprout::tuples::tuple(1l, 1.0f)); - TESTSPR_BOTH_ASSERT(sprout::tuples::get<0>(tup3) == 1); - TESTSPR_BOTH_ASSERT(sprout::tuples::get<1>(tup3) == 1.0); - } - - { - SPROUT_STATIC_CONSTEXPR auto tup3 = sprout::tuples::tuple(sprout::tuples::flexibly_construct, 1l); - TESTSPR_BOTH_ASSERT(sprout::tuples::get<0>(tup3) == 1); - TESTSPR_BOTH_ASSERT(sprout::tuples::get<1>(tup3) == 0.0); - } - { - SPROUT_STATIC_CONSTEXPR auto tup3 = sprout::tuples::tuple(sprout::tuples::flexibly_construct, 1l, 1.0f); - TESTSPR_BOTH_ASSERT(sprout::tuples::get<0>(tup3) == 1); - TESTSPR_BOTH_ASSERT(sprout::tuples::get<1>(tup3) == 1.0); - } - { - SPROUT_STATIC_CONSTEXPR auto tup3 = sprout::tuples::tuple(sprout::tuples::flexibly_construct, 1l, 1.0f, '-'); - TESTSPR_BOTH_ASSERT(sprout::tuples::get<0>(tup3) == 1); - TESTSPR_BOTH_ASSERT(sprout::tuples::get<1>(tup3) == 1.0); - } - - { - SPROUT_STATIC_CONSTEXPR auto tup3 = sprout::tuples::tuple(sprout::tuples::flexibly_construct, sprout::tuples::tuple(1l)); - TESTSPR_BOTH_ASSERT(sprout::tuples::get<0>(tup3) == 1); - TESTSPR_BOTH_ASSERT(sprout::tuples::get<1>(tup3) == 0.0); - } - { - SPROUT_STATIC_CONSTEXPR auto tup3 = sprout::tuples::tuple(sprout::tuples::flexibly_construct, sprout::tuples::tuple(1l, 1.0f)); - TESTSPR_BOTH_ASSERT(sprout::tuples::get<0>(tup3) == 1); - TESTSPR_BOTH_ASSERT(sprout::tuples::get<1>(tup3) == 1.0); - } - { - SPROUT_STATIC_CONSTEXPR auto tup3 = sprout::tuples::tuple(sprout::tuples::flexibly_construct, sprout::tuples::tuple(1l, 1.0f, '-')); - TESTSPR_BOTH_ASSERT(sprout::tuples::get<0>(tup3) == 1); - TESTSPR_BOTH_ASSERT(sprout::tuples::get<1>(tup3) == 1.0); - } - - // operator= - { - auto tup3 = tup2; - tup3 = sprout::tuples::tuple(1, 1.0); - TESTSPR_ASSERT(sprout::tuples::get<0>(tup3) == 1); - TESTSPR_ASSERT(sprout::tuples::get<1>(tup3) == 1.0); - } - { - auto tup3 = tup2; - tup3 = sprout::tuples::tuple(1l, 1.0f); - TESTSPR_ASSERT(sprout::tuples::get<0>(tup3) == 1); - TESTSPR_ASSERT(sprout::tuples::get<1>(tup3) == 1.0); - } - { - auto tup3 = tup2; - tup3 = sprout::pair(1, 1.0); - TESTSPR_ASSERT(sprout::tuples::get<0>(tup3) == 1); - TESTSPR_ASSERT(sprout::tuples::get<1>(tup3) == 1.0); - } - { - auto tup3 = tup2; - tup3 = sprout::pair(1l, 1.0f); - TESTSPR_ASSERT(sprout::tuples::get<0>(tup3) == 1); - TESTSPR_ASSERT(sprout::tuples::get<1>(tup3) == 1.0); - } - - // swap - { - auto tup3 = tup1; - auto tup4 = tup2; - tup3.swap(tup4); - TESTSPR_ASSERT(sprout::tuples::get<0>(tup3) == 0); - TESTSPR_ASSERT(sprout::tuples::get<1>(tup3) == 0.0); - TESTSPR_ASSERT(sprout::tuples::get<0>(tup4) == 1); - TESTSPR_ASSERT(sprout::tuples::get<1>(tup4) == 1.0); - } - { - auto tup3 = tup1; - auto tup4 = tup2; - swap(tup3, tup4); - TESTSPR_ASSERT(sprout::tuples::get<0>(tup3) == 0); - TESTSPR_ASSERT(sprout::tuples::get<1>(tup3) == 0.0); - TESTSPR_ASSERT(sprout::tuples::get<0>(tup4) == 1); - TESTSPR_ASSERT(sprout::tuples::get<1>(tup4) == 1.0); - } - - // std::tuple_size - TESTSPR_BOTH_ASSERT(std::tuple_size::value == 2); - - // std::tuple_element - TESTSPR_BOTH_ASSERT((std::is_same::type, int const>::value)); - TESTSPR_BOTH_ASSERT((std::is_same::type, double const>::value)); - - // operator== - TESTSPR_BOTH_ASSERT(!(tup1 == tup2)); - TESTSPR_BOTH_ASSERT((tup1 == sprout::tuples::tuple(1, 1.0))); - TESTSPR_BOTH_ASSERT((!(tup1 == sprout::tuples::tuple()))); - TESTSPR_BOTH_ASSERT((tup1 == sprout::tuples::tuple(1l, 1.0f))); - - // operator!= - TESTSPR_BOTH_ASSERT(tup1 != tup2); - TESTSPR_BOTH_ASSERT((!(tup1 != sprout::tuples::tuple(1, 1.0)))); - TESTSPR_BOTH_ASSERT((tup1 != sprout::tuples::tuple())); - TESTSPR_BOTH_ASSERT((!(tup1 != sprout::tuples::tuple(1l, 1.0f)))); - - // operator< - TESTSPR_BOTH_ASSERT(!(tup1 < tup2)); - TESTSPR_BOTH_ASSERT((!(tup1 < sprout::tuples::tuple(1, -1.0)))); - TESTSPR_BOTH_ASSERT((!(tup1 < sprout::tuples::tuple(1, 1.0)))); - TESTSPR_BOTH_ASSERT((tup1 < sprout::tuples::tuple(1, 2.0))); - TESTSPR_BOTH_ASSERT((!(tup1 < sprout::tuples::tuple()))); - TESTSPR_BOTH_ASSERT((!(tup1 < sprout::tuples::tuple(1l, -1.0f)))); - TESTSPR_BOTH_ASSERT((!(tup1 < sprout::tuples::tuple(1l, 1.0f)))); - TESTSPR_BOTH_ASSERT((tup1 < sprout::tuples::tuple(1l, 2.0f))); - - // operator> - TESTSPR_BOTH_ASSERT(tup1 > tup2); - TESTSPR_BOTH_ASSERT((tup1 > sprout::tuples::tuple(1, -1.0))); - TESTSPR_BOTH_ASSERT((!(tup1 > sprout::tuples::tuple(1, 1.0)))); - TESTSPR_BOTH_ASSERT((!(tup1 > sprout::tuples::tuple(1, 2.0)))); - TESTSPR_BOTH_ASSERT((tup1 > sprout::tuples::tuple())); - TESTSPR_BOTH_ASSERT((tup1 > sprout::tuples::tuple(1l, -1.0f))); - TESTSPR_BOTH_ASSERT((!(tup1 > sprout::tuples::tuple(1l, 1.0f)))); - TESTSPR_BOTH_ASSERT((!(tup1 > sprout::tuples::tuple(1l, 2.0f)))); - - // operator<= - TESTSPR_BOTH_ASSERT(!(tup1 <= tup2)); - TESTSPR_BOTH_ASSERT((!(tup1 <= sprout::tuples::tuple(1, -1.0)))); - TESTSPR_BOTH_ASSERT((tup1 <= sprout::tuples::tuple(1, 1.0))); - TESTSPR_BOTH_ASSERT((tup1 <= sprout::tuples::tuple(1, 2.0))); - TESTSPR_BOTH_ASSERT((!(tup1 <= sprout::tuples::tuple()))); - TESTSPR_BOTH_ASSERT((!(tup1 <= sprout::tuples::tuple(1l, -1.0f)))); - TESTSPR_BOTH_ASSERT((tup1 <= sprout::tuples::tuple(1l, 1.0f))); - TESTSPR_BOTH_ASSERT((tup1 <= sprout::tuples::tuple(1l, 2.0f))); - - // operator>= - TESTSPR_BOTH_ASSERT(tup1 >= tup2); - TESTSPR_BOTH_ASSERT((tup1 >= sprout::tuples::tuple(1, -1.0))); - TESTSPR_BOTH_ASSERT((tup1 >= sprout::tuples::tuple(1, 1.0))); - TESTSPR_BOTH_ASSERT((!(tup1 >= sprout::tuples::tuple(1, 2.0)))); - TESTSPR_BOTH_ASSERT((tup1 >= sprout::tuples::tuple())); - TESTSPR_BOTH_ASSERT((tup1 >= sprout::tuples::tuple(1l, -1.0f))); - TESTSPR_BOTH_ASSERT((tup1 >= sprout::tuples::tuple(1l, 1.0f))); - TESTSPR_BOTH_ASSERT((!(tup1 >= sprout::tuples::tuple(1l, 2.0f)))); - - // get - TESTSPR_BOTH_ASSERT(sprout::tuples::get<0>(tup1) == 1); - TESTSPR_BOTH_ASSERT(sprout::tuples::get<1>(tup1) == 1.0); - { - auto tup3 = tup1; - TESTSPR_ASSERT(sprout::tuples::get<0>(tup3) == 1); - TESTSPR_ASSERT(sprout::tuples::get<1>(tup3) == 1.0); - } - // get - TESTSPR_BOTH_ASSERT(sprout::tuples::get(tup1) == 1); - TESTSPR_BOTH_ASSERT(sprout::tuples::get(tup1) == 1.0); - { - auto tup3 = tup1; - TESTSPR_ASSERT(sprout::tuples::get(tup3) == 1); - TESTSPR_ASSERT(sprout::tuples::get(tup3) == 1.0); - } - - // tuple_size - TESTSPR_BOTH_ASSERT(sprout::tuples::tuple_size::value == 2); - - // tuple_element - TESTSPR_BOTH_ASSERT((std::is_same::type, int const>::value)); - TESTSPR_BOTH_ASSERT((std::is_same::type, double const>::value)); - - // make_tuple - TESTSPR_BOTH_ASSERT(sprout::tuples::make_tuple(1, 1.0) == tup1); - - // forward_as_tuple - TESTSPR_BOTH_ASSERT(sprout::tuples::forward_as_tuple(1, 1.0) == tup1); - - // tie - { - auto v1 = 0; - auto v2 = 0.0; - TESTSPR_ASSERT(sprout::tuples::tie(v1, v2) == tup2); - - sprout::tuples::tie(v1, v2) = tup1; - TESTSPR_ASSERT(v1 == 1); - TESTSPR_ASSERT(v2 == 1.0); - } - - // tuple_cat - { - SPROUT_STATIC_CONSTEXPR auto tup3 = sprout::tuples::tuple_cat(tup1, tup2); - TESTSPR_BOTH_ASSERT(sprout::tuples::get<0>(tup3) == 1); - TESTSPR_BOTH_ASSERT(sprout::tuples::get<1>(tup3) == 1.0); - TESTSPR_BOTH_ASSERT(sprout::tuples::get<2>(tup3) == 0); - TESTSPR_BOTH_ASSERT(sprout::tuples::get<3>(tup3) == 0.0); - } - - // is_tuple - TESTSPR_BOTH_ASSERT(sprout::tuples::is_tuple::value); - TESTSPR_BOTH_ASSERT(!sprout::tuples::is_tuple::value); - - // sprout::to_hash, sprout::hash - TESTSPR_BOTH_ASSERT(sprout::to_hash(tup1) == sprout::hash()(tup1)); - TESTSPR_BOTH_ASSERT(sprout::to_hash(tup1) != sprout::to_hash(sprout::tuples::tuple())); - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::tuple_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_TUPLE_TEST_TUPLE_CPP diff --git a/dsp/lib/sprout/libs/utility/CMakeLists.txt b/dsp/lib/sprout/libs/utility/CMakeLists.txt deleted file mode 100644 index c570044..0000000 --- a/dsp/lib/sprout/libs/utility/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -subdirs( string_view ) diff --git a/dsp/lib/sprout/libs/utility/string_view/CMakeLists.txt b/dsp/lib/sprout/libs/utility/string_view/CMakeLists.txt deleted file mode 100644 index a32dcf2..0000000 --- a/dsp/lib/sprout/libs/utility/string_view/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -subdirs( test ) diff --git a/dsp/lib/sprout/libs/utility/string_view/test/CMakeLists.txt b/dsp/lib/sprout/libs/utility/string_view/test/CMakeLists.txt deleted file mode 100644 index 3e13830..0000000 --- a/dsp/lib/sprout/libs/utility/string_view/test/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -add_executable( libs_utility_string_view_test_string_view string_view.cpp ) -set_target_properties( libs_utility_string_view_test_string_view PROPERTIES OUTPUT_NAME "string_view" ) -add_test( libs_utility_string_view_test_string_view string_view ) diff --git a/dsp/lib/sprout/libs/utility/string_view/test/string_view.cpp b/dsp/lib/sprout/libs/utility/string_view/test/string_view.cpp deleted file mode 100644 index efa17c3..0000000 --- a/dsp/lib/sprout/libs/utility/string_view/test/string_view.cpp +++ /dev/null @@ -1,236 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_UTILITY_STRING_VIEW_TEST_STRING_VIEW_CPP -#define SPROUT_LIBS_UTILITY_STRING_VIEW_TEST_STRING_VIEW_CPP - -#include -#include -#include -#include -#include -#include - -namespace testspr { - static void string_view_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR char cstr[] = "foobar1234"; - SPROUT_STATIC_CONSTEXPR auto s = sprout::to_string("hogehoge"); - SPROUT_STATIC_CONSTEXPR auto str1 = sprout::string_view(cstr); - SPROUT_STATIC_CONSTEXPR auto str2 = sprout::string_view(s); - - // begin - TESTSPR_BOTH_ASSERT(cstr[0] == *str1.begin()); - - // cbegin - TESTSPR_BOTH_ASSERT(cstr[0] == *str1.cbegin()); - - // end - TESTSPR_BOTH_ASSERT(cstr[9] == *(str1.end() - 1)); - - // cend - TESTSPR_BOTH_ASSERT(cstr[9] == *(str1.cend() - 1)); - - // rbegin - TESTSPR_BOTH_ASSERT(cstr[9] == *str1.rbegin()); - - // crbegin - TESTSPR_BOTH_ASSERT(cstr[9] == *str1.crbegin()); - - // rend - TESTSPR_BOTH_ASSERT(cstr[0] == *(str1.rend() - 1)); - - // crend - TESTSPR_BOTH_ASSERT(cstr[0] == *(str1.crend() - 1)); - - // size - TESTSPR_BOTH_ASSERT(str1.size() == 10); - - // empty - TESTSPR_BOTH_ASSERT(!str1.empty()); - TESTSPR_BOTH_ASSERT((sprout::string_view().empty())); - - // max_size - TESTSPR_BOTH_ASSERT(str1.max_size() == 10); - - // operator[] - TESTSPR_BOTH_ASSERT(cstr[0] == str1[0]); - - // at - TESTSPR_BOTH_ASSERT(cstr[0] == str1.at(0)); - - // front - TESTSPR_BOTH_ASSERT(cstr[0] == str1.front()); - - // back - TESTSPR_BOTH_ASSERT(cstr[9] == str1.back()); - - // data - TESTSPR_BOTH_ASSERT(cstr[0] == *str1.data()); - - // c_str - TESTSPR_BOTH_ASSERT(cstr[0] == *str1.c_str()); - - // swap - { - auto s1 = sprout::string_view("abc"); - auto s2 = sprout::string_view("ABC"); - s1.swap(s2); - TESTSPR_ASSERT(s1[0] == 'A'); - } - - // operator= - { - auto s = sprout::string_view("abc"); - s = sprout::string_view("ABC"); - TESTSPR_ASSERT(s.size() == 3); - TESTSPR_ASSERT(s[0] == 'A'); - } - { - auto s = sprout::to_string("abc"); - s = "ABC"; - TESTSPR_ASSERT(s.size() == 3); - TESTSPR_ASSERT(s[0] == 'A'); - } - { - auto s = sprout::to_string("abc"); - s = 'A'; - TESTSPR_ASSERT(s.size() == 1); - TESTSPR_ASSERT(s[0] == 'A'); - } - - // find - TESTSPR_BOTH_ASSERT(str1.find(str2) == npos); - TESTSPR_BOTH_ASSERT(str1.find(sprout::string_view("bar")) == 3); - TESTSPR_BOTH_ASSERT(str1.find(str2.c_str()) == npos); - TESTSPR_BOTH_ASSERT(str1.find("bar") == 3); - TESTSPR_BOTH_ASSERT(str1.find(str2.c_str(), 0, 3) == npos); - TESTSPR_BOTH_ASSERT(str1.find("barbar", 0, 3) == 3); - TESTSPR_BOTH_ASSERT(str1.find('b') == 3); - - // rfind - TESTSPR_BOTH_ASSERT(str1.rfind(str2) == npos); - TESTSPR_BOTH_ASSERT(str1.rfind(sprout::string_view("bar")) == 3); - TESTSPR_BOTH_ASSERT(str1.rfind(str2.c_str()) == npos); - TESTSPR_BOTH_ASSERT(str1.rfind("bar") == 3); - TESTSPR_BOTH_ASSERT(str1.rfind(str2.c_str(), npos, 3) == npos); - TESTSPR_BOTH_ASSERT(str1.rfind("barbar", npos, 3) == 3); - TESTSPR_BOTH_ASSERT(str1.rfind('b') == 3); - - // find_first_of - TESTSPR_BOTH_ASSERT(str1.find_first_of(sprout::string_view("vwxyz")) == npos); - TESTSPR_BOTH_ASSERT(str1.find_first_of(sprout::string_view("rab")) == 3); - TESTSPR_BOTH_ASSERT(str1.find_first_of("vwxyz") == npos); - TESTSPR_BOTH_ASSERT(str1.find_first_of("rab") == 3); - TESTSPR_BOTH_ASSERT(str1.find_first_of("vwxyz", 0, 3) == npos); - TESTSPR_BOTH_ASSERT(str1.find_first_of("rabrab", 0, 3) == 3); - TESTSPR_BOTH_ASSERT(str1.find_first_of('b') == 3); - - // find_last_of - TESTSPR_BOTH_ASSERT(str1.find_last_of(sprout::string_view("vwxyz")) == npos); - TESTSPR_BOTH_ASSERT(str1.find_last_of(sprout::string_view("rab")) == 5); - TESTSPR_BOTH_ASSERT(str1.find_last_of("vwxyz") == npos); - TESTSPR_BOTH_ASSERT(str1.find_last_of("rab") == 5); - TESTSPR_BOTH_ASSERT(str1.find_last_of("vwxyz", npos, 3) == npos); - TESTSPR_BOTH_ASSERT(str1.find_last_of("rabrab", npos, 3) == 5); - TESTSPR_BOTH_ASSERT(str1.find_last_of('r') == 5); - - // find_first_not_of - TESTSPR_BOTH_ASSERT(str1.find_first_not_of(str1) == npos); - TESTSPR_BOTH_ASSERT(str1.find_first_not_of(sprout::string_view("foo")) == 3); - TESTSPR_BOTH_ASSERT(str1.find_first_not_of(str1.c_str()) == npos); - TESTSPR_BOTH_ASSERT(str1.find_first_not_of("foo") == 3); - TESTSPR_BOTH_ASSERT(str1.find_first_not_of(str1.c_str(), 0, 10) == npos); - TESTSPR_BOTH_ASSERT(str1.find_first_not_of("foofoo", 0, 3) == 3); - TESTSPR_BOTH_ASSERT(str1.find_first_not_of('f') == 1); - - // find_last_not_of - TESTSPR_BOTH_ASSERT(str1.find_last_not_of(str1) == npos); - TESTSPR_BOTH_ASSERT(str1.find_last_not_of(sprout::string_view("4321")) == 5); - TESTSPR_BOTH_ASSERT(str1.find_last_not_of(str1.c_str()) == npos); - TESTSPR_BOTH_ASSERT(str1.find_last_not_of("4321") == 5); - TESTSPR_BOTH_ASSERT(str1.find_last_not_of(str1.c_str(), npos, 10) == npos); - TESTSPR_BOTH_ASSERT(str1.find_last_not_of("43214321", npos, 4) == 5); - TESTSPR_BOTH_ASSERT(str1.find_last_not_of('4') == 8); - - // substr - { - SPROUT_STATIC_CONSTEXPR auto str3 = str1.substr(); - TESTSPR_BOTH_ASSERT(str3 == "foobar1234"); - } - { - SPROUT_STATIC_CONSTEXPR auto str3 = str1.substr(6); - TESTSPR_BOTH_ASSERT(str3 == "1234"); - } - { - SPROUT_STATIC_CONSTEXPR auto str3 = str1.substr(0, 6); - TESTSPR_BOTH_ASSERT(str3 == "foobar"); - } - - // compare - TESTSPR_BOTH_ASSERT(str1.compare(str1) == 0); - TESTSPR_BOTH_ASSERT(str1.compare(sprout::string_view("zzzz")) < 0); - TESTSPR_BOTH_ASSERT(str2.compare(sprout::string_view("aaaa")) > 0); - TESTSPR_BOTH_ASSERT(str1.compare(0, 3, sprout::string_view("foo")) == 0); - TESTSPR_BOTH_ASSERT(str1.compare(0, 3, sprout::string_view("zzzz")) < 0); - TESTSPR_BOTH_ASSERT(str2.compare(0, 3, sprout::string_view("aaaa")) > 0); - TESTSPR_BOTH_ASSERT(str1.compare(0, 3, sprout::string_view("foo"), 0, 3) == 0); - TESTSPR_BOTH_ASSERT(str1.compare(0, 3, sprout::string_view("zzzz"), 0, 3) < 0); - TESTSPR_BOTH_ASSERT(str2.compare(0, 3, sprout::string_view("aaaa"), 0, 3) > 0); - TESTSPR_BOTH_ASSERT(str1.compare(str1.c_str()) == 0); - TESTSPR_BOTH_ASSERT(str1.compare("zzzz") < 0); - TESTSPR_BOTH_ASSERT(str1.compare("aaaa") > 0); - TESTSPR_BOTH_ASSERT(str1.compare(0, 3, "foo") == 0); - TESTSPR_BOTH_ASSERT(str1.compare(0, 3, "zzzz") < 0); - TESTSPR_BOTH_ASSERT(str1.compare(0, 3, "aaaa") > 0); - TESTSPR_BOTH_ASSERT(str1.compare(0, 3, "foo", 3) == 0); - TESTSPR_BOTH_ASSERT(str1.compare(0, 3, "zzzz", 3) < 0); - TESTSPR_BOTH_ASSERT(str1.compare(0, 3, "aaaa", 3) > 0); - - // operator== - TESTSPR_BOTH_ASSERT(!(str1 == str2)); - - // operator!= - TESTSPR_BOTH_ASSERT(str1 != str2); - - // operator< - TESTSPR_BOTH_ASSERT(str1 < str2); - - // operator> - TESTSPR_BOTH_ASSERT(!(str1 > str2)); - - // operator<= - TESTSPR_BOTH_ASSERT(str1 <= str2); - - // operator>= - TESTSPR_BOTH_ASSERT(!(str1 >= str2)); - - // operator<< - { - std::ostringstream os; - os << str1; - TESTSPR_ASSERT(os.str() == cstr); - } - - // is_string_view - TESTSPR_BOTH_ASSERT(sprout::is_string_view::value); - TESTSPR_BOTH_ASSERT(!sprout::is_string_view::value); - - // sprout::to_hash, sprout::hash - TESTSPR_BOTH_ASSERT(sprout::to_hash(str1) == sprout::hash()(str1)); - TESTSPR_BOTH_ASSERT(sprout::to_hash(str1) != sprout::to_hash(str2)); - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::string_view_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_UTILITY_STRING_VIEW_TEST_STRING_VIEW_CPP diff --git a/dsp/lib/sprout/libs/variant/CMakeLists.txt b/dsp/lib/sprout/libs/variant/CMakeLists.txt deleted file mode 100644 index a32dcf2..0000000 --- a/dsp/lib/sprout/libs/variant/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -subdirs( test ) diff --git a/dsp/lib/sprout/libs/variant/test/CMakeLists.txt b/dsp/lib/sprout/libs/variant/test/CMakeLists.txt deleted file mode 100644 index c7c9238..0000000 --- a/dsp/lib/sprout/libs/variant/test/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -add_executable( libs_variant_test_variant variant.cpp ) -set_target_properties( libs_variant_test_variant PROPERTIES OUTPUT_NAME "variant" ) -add_test( libs_variant_test_variant variant ) diff --git a/dsp/lib/sprout/libs/variant/test/variant.cpp b/dsp/lib/sprout/libs/variant/test/variant.cpp deleted file mode 100644 index 55b8d44..0000000 --- a/dsp/lib/sprout/libs/variant/test/variant.cpp +++ /dev/null @@ -1,240 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIBS_VARIANT_TEST_VARIANT_CPP -#define SPROUT_LIBS_VARIANT_TEST_VARIANT_CPP - -#include -#include -#include - -namespace testspr { - static void variant_test() { - using namespace sprout; - { - SPROUT_STATIC_CONSTEXPR auto var1 = sprout::variant(1.0); - SPROUT_STATIC_CONSTEXPR auto var2 = sprout::variant(); - - // constructor - { - SPROUT_STATIC_CONSTEXPR auto var3 = sprout::variant(); - TESTSPR_BOTH_ASSERT(var3.which() == 0); - TESTSPR_BOTH_ASSERT(sprout::get(var3) == 0); - } - { - SPROUT_STATIC_CONSTEXPR auto var3 = sprout::variant(var1); - TESTSPR_BOTH_ASSERT(var3.which() == 1); - TESTSPR_BOTH_ASSERT(sprout::get(var3) == 1.0); - } - { - SPROUT_STATIC_CONSTEXPR auto var3 = sprout::variant(1.0); - TESTSPR_BOTH_ASSERT(var3.which() == 1); - TESTSPR_BOTH_ASSERT(sprout::get(var3) == 1.0); - } - - // swap - { - auto var3 = var1; - auto var4 = var2; - var3.swap(var4); - TESTSPR_ASSERT(var3.which() == 0); - TESTSPR_ASSERT(sprout::get(var3) == 0); - TESTSPR_ASSERT(var4.which() == 1); - TESTSPR_ASSERT(sprout::get(var4) == 1.0); - } - { - auto var3 = var1; - auto var4 = var2; - swap(var3, var4); - TESTSPR_ASSERT(var3.which() == 0); - TESTSPR_ASSERT(sprout::get(var3) == 0); - TESTSPR_ASSERT(var4.which() == 1); - TESTSPR_ASSERT(sprout::get(var4) == 1.0); - } - - // operator= - { - auto var3 = var2; - var3 = sprout::variant(1.0); - TESTSPR_ASSERT(var3.which() == 1); - TESTSPR_ASSERT(sprout::get(var3) == 1.0); - } - { - auto var3 = var2; - var3 = 1.0; - TESTSPR_ASSERT(var3.which() == 1); - TESTSPR_ASSERT(sprout::get(var3) == 1.0); - } - - // which - TESTSPR_BOTH_ASSERT(var1.which() == 1); - TESTSPR_BOTH_ASSERT(var2.which() == 0); - - // empty - TESTSPR_BOTH_ASSERT(!var1.empty()); - TESTSPR_BOTH_ASSERT(!var2.empty()); - - // operator== - TESTSPR_BOTH_ASSERT(!(var1 == var2)); - TESTSPR_BOTH_ASSERT((var1 == sprout::variant(1.0))); - - // operator!= - TESTSPR_BOTH_ASSERT(var1 != var2); - TESTSPR_BOTH_ASSERT(!(var1 != sprout::variant(1.0))); - - // operator< - TESTSPR_BOTH_ASSERT(!(var1 < var2)); - TESTSPR_BOTH_ASSERT(!(var1 < sprout::variant(0.0))); - TESTSPR_BOTH_ASSERT(!(var1 < sprout::variant(1.0))); - TESTSPR_BOTH_ASSERT((var1 < sprout::variant(2.0))); - TESTSPR_BOTH_ASSERT(!(var1 < sprout::variant(0))); - TESTSPR_BOTH_ASSERT(!(var1 < sprout::variant(1))); - TESTSPR_BOTH_ASSERT(!(var1 < sprout::variant(2))); - - // operator> - TESTSPR_BOTH_ASSERT(var1 > var2); - TESTSPR_BOTH_ASSERT((var1 > sprout::variant(0.0))); - TESTSPR_BOTH_ASSERT(!(var1 > sprout::variant(1.0))); - TESTSPR_BOTH_ASSERT(!(var1 > sprout::variant(2.0))); - TESTSPR_BOTH_ASSERT((var1 > sprout::variant(0))); - TESTSPR_BOTH_ASSERT((var1 > sprout::variant(1))); - TESTSPR_BOTH_ASSERT((var1 > sprout::variant(2))); - - // operator<= - TESTSPR_BOTH_ASSERT(!(var1 <= var2)); - TESTSPR_BOTH_ASSERT(!(var1 <= sprout::variant(0.0))); - TESTSPR_BOTH_ASSERT((var1 <= sprout::variant(1.0))); - TESTSPR_BOTH_ASSERT((var1 <= sprout::variant(2.0))); - TESTSPR_BOTH_ASSERT(!(var1 <= sprout::variant(0))); - TESTSPR_BOTH_ASSERT(!(var1 <= sprout::variant(1))); - TESTSPR_BOTH_ASSERT(!(var1 <= sprout::variant(2))); - - // operator>= - TESTSPR_BOTH_ASSERT(var1 >= var2); - TESTSPR_BOTH_ASSERT((var1 >= sprout::variant(0.0))); - TESTSPR_BOTH_ASSERT((var1 >= sprout::variant(1.0))); - TESTSPR_BOTH_ASSERT(!(var1 >= sprout::variant(2.0))); - TESTSPR_BOTH_ASSERT((var1 >= sprout::variant(0))); - TESTSPR_BOTH_ASSERT((var1 >= sprout::variant(1))); - TESTSPR_BOTH_ASSERT((var1 >= sprout::variant(2))); - - // get_at - TESTSPR_BOTH_ASSERT(var1.get_at<1>() == 1.0); - TESTSPR_BOTH_ASSERT(var2.get_at<0>() == 0); - { - auto var3 = var1; - TESTSPR_ASSERT(var3.get_at<1>() == 1.0); - } - { - auto var3 = var2; - TESTSPR_ASSERT(var3.get_at<0>() == 0); - } - - // get - TESTSPR_BOTH_ASSERT(sprout::get(var1) == 1.0); - TESTSPR_BOTH_ASSERT(sprout::get(var2) == 0); - { - auto var3 = var1; - TESTSPR_ASSERT(sprout::get(var3) == 1.0); - } - { - auto var3 = var2; - TESTSPR_ASSERT(sprout::get(var3) == 0); - } - - // apply_visitor - TESTSPR_BOTH_ASSERT(var1.apply_visitor(testspr::x2_visitor()) == 2.0); - TESTSPR_BOTH_ASSERT(var2.apply_visitor(testspr::x2_visitor()) == 0.0); - { - auto var3 = var1; - TESTSPR_ASSERT(var3.apply_visitor(testspr::x2_assign_visitor()) == 2.0); - TESTSPR_ASSERT(var3.which() == 1); - TESTSPR_ASSERT(sprout::get(var3) == 2.0); - } - { - auto var3 = var2; - TESTSPR_ASSERT(var3.apply_visitor(testspr::x2_assign_visitor()) == 0.0); - TESTSPR_ASSERT(var3.which() == 0); - TESTSPR_ASSERT(sprout::get(var3) == 0); - } - - // apply_visitor - TESTSPR_BOTH_ASSERT(sprout::apply_visitor(testspr::x2_visitor(), var1) == 2.0); - TESTSPR_BOTH_ASSERT(sprout::apply_visitor(testspr::x2_visitor(), var2) == 0.0); - { - auto var3 = var1; - TESTSPR_ASSERT(sprout::apply_visitor(testspr::x2_assign_visitor(), var3) == 2.0); - TESTSPR_ASSERT(var3.which() == 1); - TESTSPR_ASSERT(sprout::get(var3) == 2.0); - } - { - auto var3 = var2; - TESTSPR_ASSERT(sprout::apply_visitor(testspr::x2_assign_visitor(), var3) == 0.0); - TESTSPR_ASSERT(var3.which() == 0); - TESTSPR_ASSERT(sprout::get(var3) == 0); - } - { - testspr::x2_visitor visitor1 = {}; - TESTSPR_BOTH_ASSERT(sprout::apply_visitor(visitor1, var1) == 2.0); - TESTSPR_BOTH_ASSERT(sprout::apply_visitor(visitor1, var2) == 0.0); - } - { - auto var3 = var2; - testspr::x2_assign_visitor visitor1 = {}; - TESTSPR_ASSERT(sprout::apply_visitor(visitor1, var3) == 0.0); - TESTSPR_ASSERT(var3.which() == 0); - TESTSPR_ASSERT(sprout::get(var3) == 0); - } - - // operator<< - { - std::ostringstream os; - os << var1; - TESTSPR_ASSERT(os.str() == "1"); - } - { - std::ostringstream os; - os << var2; - TESTSPR_ASSERT(os.str() == "0"); - } - - // tuples::get - TESTSPR_BOTH_ASSERT(sprout::tuples::get<1>(var1) == 1.0); - TESTSPR_BOTH_ASSERT(sprout::tuples::get<0>(var2) == 0); - { - auto var3 = var1; - TESTSPR_ASSERT(sprout::tuples::get<1>(var3) == 1.0); - } - { - auto var3 = var2; - TESTSPR_ASSERT(sprout::tuples::get<0>(var3) == 0); - } - - // tuple_size - TESTSPR_BOTH_ASSERT(sprout::tuples::tuple_size::value == 2); - - // tuple_element - TESTSPR_BOTH_ASSERT((std::is_same::type, int const>::value)); - TESTSPR_BOTH_ASSERT((std::is_same::type, double const>::value)); - - // is_variant - TESTSPR_BOTH_ASSERT(sprout::is_variant::value); - TESTSPR_BOTH_ASSERT(!sprout::is_variant::value); - - // sprout::to_hash, sprout::hash - TESTSPR_BOTH_ASSERT(sprout::to_hash(var1) == sprout::hash()(var1)); - TESTSPR_BOTH_ASSERT(sprout::to_hash(var1) != sprout::to_hash(sprout::variant())); - } - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::variant_test -# include -#endif - -#endif // #ifndef SPROUT_LIBS_VARIANT_TEST_VARIANT_CPP diff --git a/dsp/lib/sprout/libs/weed/CMakeLists.txt b/dsp/lib/sprout/libs/weed/CMakeLists.txt deleted file mode 100644 index e6cabf0..0000000 --- a/dsp/lib/sprout/libs/weed/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -subdirs( example ) diff --git a/dsp/lib/sprout/libs/weed/example/CMakeLists.txt b/dsp/lib/sprout/libs/weed/example/CMakeLists.txt deleted file mode 100644 index f835f7a..0000000 --- a/dsp/lib/sprout/libs/weed/example/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -add_executable( libs_weed_example_as_tuple as_tuple.cpp ) -set_target_properties( libs_weed_example_as_tuple PROPERTIES OUTPUT_NAME "as_tuple" ) -add_executable( libs_weed_example_remove_space remove_space.cpp ) -set_target_properties( libs_weed_example_remove_space PROPERTIES OUTPUT_NAME "remove_space" ) diff --git a/dsp/lib/sprout/libs/weed/example/__TIME__.cpp b/dsp/lib/sprout/libs/weed/example/__TIME__.cpp deleted file mode 100644 index 7073f84..0000000 --- a/dsp/lib/sprout/libs/weed/example/__TIME__.cpp +++ /dev/null @@ -1,68 +0,0 @@ -// -// Sprout C++ Library -// -// Copyright (c) 2012 -// bolero-MURAKAMI : http://d.hatena.ne.jp/boleros/ -// osyo-manga : http://d.hatena.ne.jp/osyo-manga/ -// -// Readme: -// https://github.com/bolero-MURAKAMI/Sprout/blob/master/README -// -// License: -// Boost Software License - Version 1.0 -// -// -#include -#include -#include -#include - -// -// __TIME__ Parser -// -int -main(){ - namespace w = sprout::weed; - - // - // __TIME__ to Sprout.String - // - static constexpr auto time = sprout::to_string(__TIME__); -// static constexpr auto time = sprout::to_string("23:22:45"); - - - // - // parse __TIME__ - // - constexpr auto parser = w::int_ >> ':' >> w::int_ >> ':' >> w::int_; - static constexpr auto result = w::parse(time.begin(), time.end(), parser); - static_assert(result.success(), "failed parse"); - - - // - // get result - // - static constexpr sprout::array result_attr = result.attr(); - static constexpr auto hour = result_attr[0]; - static constexpr auto minute = result_attr[1]; - static constexpr auto second = result_attr[2]; - -// static_assert(hour == 23, ""); -// static_assert(minute == 22, ""); -// static_assert(second == 45, ""); - - std::cout << hour << std::endl; - std::cout << minute << std::endl; - std::cout << second << std::endl; - - - // - // compile time output - // - namespace m = boost::mpl; - typedef m::print>::type hour_; - typedef m::print>::type minute_; - typedef m::print>::type second_; - - return 0; -} diff --git a/dsp/lib/sprout/libs/weed/example/as_tuple.cpp b/dsp/lib/sprout/libs/weed/example/as_tuple.cpp deleted file mode 100644 index 75b9358..0000000 --- a/dsp/lib/sprout/libs/weed/example/as_tuple.cpp +++ /dev/null @@ -1,67 +0,0 @@ -// -// Sprout C++ Library -// -// Copyright (c) 2012 -// bolero-MURAKAMI : http://d.hatena.ne.jp/boleros/ -// osyo-manga : http://d.hatena.ne.jp/osyo-manga/ -// -// Readme: -// https://github.com/bolero-MURAKAMI/Sprout/blob/master/README -// -// License: -// Boost Software License - Version 1.0 -// -// -#include - - -int -main(){ - namespace w = sprout::weed; - - static constexpr auto source = sprout::to_string("homu:mado"); - - // String parser - static constexpr auto item = *w::lim<4>(w::char_ - ':'); - - - // - // If you do not want to use the as_tuple - // - { - static constexpr auto parser = item >> ':' >> item; - - static constexpr auto result = w::parse( - sprout::begin(source), sprout::end(source), parser - ); - static_assert(result.success(), ""); - - // !!!! - static_assert(result.attr() == "homumado", ""); - } - - - // - // You need to use the as_tuple - // - { - static constexpr auto parser = w::as_tuple[item] >> ':' >> w::as_tuple[item]; - - static constexpr auto result = w::parse( - sprout::begin(source), sprout::end(source), parser - ); - static_assert(result.success(), ""); - - static constexpr auto attr = result.attr(); - - // OK - static_assert(std::is_same< - sprout::tuple, sprout::string<4>> const, - decltype(attr) - >::value, ""); - static_assert(sprout::get<0>(attr) == "homu", ""); - static_assert(sprout::get<1>(attr) == "mado", ""); - } - - return 0; -} diff --git a/dsp/lib/sprout/libs/weed/example/remove_space.cpp b/dsp/lib/sprout/libs/weed/example/remove_space.cpp deleted file mode 100644 index 60a7214..0000000 --- a/dsp/lib/sprout/libs/weed/example/remove_space.cpp +++ /dev/null @@ -1,36 +0,0 @@ -// -// Sprout C++ Library -// -// Copyright (c) 2012 -// bolero-MURAKAMI : http://d.hatena.ne.jp/boleros/ -// osyo-manga : http://d.hatena.ne.jp/osyo-manga/ -// -// Readme: -// https://github.com/bolero-MURAKAMI/Sprout/blob/master/README -// -// License: -// Boost Software License - Version 1.0 -// -// -#include - - -int -main(){ - namespace w = sprout::weed; - - static constexpr auto max_string_size = 32; - static constexpr auto space = *w::omit[ w::space ]; - static constexpr auto remove_space = *w::lim(space >> w::char_); - - static constexpr auto source = sprout::to_string(" homu : mami= 10 "); - static constexpr auto result = w::parse( - sprout::begin(source), sprout::end(source), - remove_space - ); - - static_assert(result.success(), "fail remove_space parse"); - static_assert(result.attr() == "homu:mami=10", ""); - - return 0; -} diff --git a/dsp/lib/sprout/sprout/CMakeLists.txt b/dsp/lib/sprout/sprout/CMakeLists.txt deleted file mode 100644 index 71ea672..0000000 --- a/dsp/lib/sprout/sprout/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -INSTALL( DIRECTORY ./ - DESTINATION include/sprout/ - FILES_MATCHING PATTERN "*.hpp" ) diff --git a/dsp/lib/sprout/sprout/adapt/boost/array.hpp b/dsp/lib/sprout/sprout/adapt/boost/array.hpp deleted file mode 100644 index d1e2e06..0000000 --- a/dsp/lib/sprout/sprout/adapt/boost/array.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ADAPT_BOOST_ARRAY_HPP -#define SPROUT_ADAPT_BOOST_ARRAY_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ADAPT_BOOST_ARRAY_HPP diff --git a/dsp/lib/sprout/sprout/adapt/sscrisk/cel/array.hpp b/dsp/lib/sprout/sprout/adapt/sscrisk/cel/array.hpp deleted file mode 100644 index d45149c..0000000 --- a/dsp/lib/sprout/sprout/adapt/sscrisk/cel/array.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ADAPT_SSCRISK_CEL_ARRAY_HPP -#define SPROUT_ADAPT_SSCRISK_CEL_ARRAY_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ADAPT_SSCRISK_CEL_ARRAY_HPP diff --git a/dsp/lib/sprout/sprout/adapt/sscrisk/cel/utility.hpp b/dsp/lib/sprout/sprout/adapt/sscrisk/cel/utility.hpp deleted file mode 100644 index 0248404..0000000 --- a/dsp/lib/sprout/sprout/adapt/sscrisk/cel/utility.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ADAPT_SSCRISK_CEL_UTILITY_HPP -#define SPROUT_ADAPT_SSCRISK_CEL_UTILITY_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ADAPT_SSCRISK_CEL_UTILITY_HPP diff --git a/dsp/lib/sprout/sprout/adapt/std/array.hpp b/dsp/lib/sprout/sprout/adapt/std/array.hpp deleted file mode 100644 index a14ca26..0000000 --- a/dsp/lib/sprout/sprout/adapt/std/array.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ADAPT_STD_ARRAY_HPP -#define SPROUT_ADAPT_STD_ARRAY_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ADAPT_STD_ARRAY_HPP diff --git a/dsp/lib/sprout/sprout/adapt/std/complex.hpp b/dsp/lib/sprout/sprout/adapt/std/complex.hpp deleted file mode 100644 index 7a82116..0000000 --- a/dsp/lib/sprout/sprout/adapt/std/complex.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ADAPT_STD_COMPLEX_HPP -#define SPROUT_ADAPT_STD_COMPLEX_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ADAPT_STD_COMPLEX_HPP diff --git a/dsp/lib/sprout/sprout/adapt/std/utility.hpp b/dsp/lib/sprout/sprout/adapt/std/utility.hpp deleted file mode 100644 index 3e1ea09..0000000 --- a/dsp/lib/sprout/sprout/adapt/std/utility.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ADAPT_STD_UTILITY_HPP -#define SPROUT_ADAPT_STD_UTILITY_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ADAPT_STD_UTILITY_HPP diff --git a/dsp/lib/sprout/sprout/adl/not_found.hpp b/dsp/lib/sprout/sprout/adl/not_found.hpp deleted file mode 100644 index cebf4c4..0000000 --- a/dsp/lib/sprout/sprout/adl/not_found.hpp +++ /dev/null @@ -1,50 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ADL_NOT_FOUND_HPP -#define SPROUT_ADL_NOT_FOUND_HPP - -#include -#include -#include - -namespace sprout { - // - // not_found_via_adl - // - struct not_found_via_adl {}; - - // - // is_not_found_via_adl - // - template - struct is_not_found_via_adl - : public sprout::is_same - {}; - template - struct is_not_found_via_adl - : public sprout::is_not_found_via_adl - {}; - template - struct is_not_found_via_adl - : public sprout::is_not_found_via_adl - {}; - template - struct is_not_found_via_adl - : public sprout::is_not_found_via_adl - {}; - - // - // is_found_via_adl - // - template - struct is_found_via_adl - : public sprout::bool_constant::value> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_ADL_NOT_FOUND_HPP diff --git a/dsp/lib/sprout/sprout/algorithm.hpp b/dsp/lib/sprout/sprout/algorithm.hpp deleted file mode 100644 index 4356f3e..0000000 --- a/dsp/lib/sprout/sprout/algorithm.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_HPP -#define SPROUT_ALGORITHM_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/abs_diff.hpp b/dsp/lib/sprout/sprout/algorithm/abs_diff.hpp deleted file mode 100644 index 5a01d0a..0000000 --- a/dsp/lib/sprout/sprout/algorithm/abs_diff.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_ABS_DIFF_HPP -#define SPROUT_ALGORITHM_ABS_DIFF_HPP - -#include - -namespace sprout { - // - // abs_diff - // - template - inline SPROUT_CONSTEXPR T - abs_diff(T const& a, T const& b) { - return (a < b) ? b - a : a - b; - } - template - inline SPROUT_CONSTEXPR T - abs_diff(T const& a, T const& b, Compare comp) { - return comp(a, b) ? b - a : a - b; - } - template - inline SPROUT_CONSTEXPR T - abs_diff(T const& a, T const& b, Compare comp, Difference diff) { - return comp(a, b) ? diff(b, a) : diff(a, b); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_ABS_DIFF_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/adjacent_find.hpp b/dsp/lib/sprout/sprout/algorithm/adjacent_find.hpp deleted file mode 100644 index 09abb49..0000000 --- a/dsp/lib/sprout/sprout/algorithm/adjacent_find.hpp +++ /dev/null @@ -1,153 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_ADJACENT_FIND_HPP -#define SPROUT_ALGORITHM_ADJACENT_FIND_HPP - -#include -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR RandomAccessIterator - adjacent_find_impl_check_ra(RandomAccessIterator const& found, RandomAccessIterator const& last) { - return sprout::distance(found, last) == 1 ? last - : found - ; - } - template - inline SPROUT_CONSTEXPR RandomAccessIterator - adjacent_find_impl_ra( - RandomAccessIterator const& first, RandomAccessIterator const& last, BinaryPredicate pred, - typename std::iterator_traits::difference_type pivot, RandomAccessIterator const& found - ) - { - return found != first ? found - : pivot == 0 ? (pred(*first, *last) ? first : last) - : sprout::detail::adjacent_find_impl_ra( - sprout::next(first, pivot), last, pred, - (sprout::distance(first, last) - pivot) / 2, - sprout::detail::adjacent_find_impl_ra( - first, sprout::next(first, pivot), pred, - pivot / 2, - first - ) - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - RandomAccessIterator - >::type - adjacent_find( - RandomAccessIterator const& first, RandomAccessIterator const& last, BinaryPredicate pred, - std::random_access_iterator_tag* - ) - { - return first == last || sprout::distance(first, last) == 1 ? last - : adjacent_find_impl_check_ra( - sprout::detail::adjacent_find_impl_ra( - first, sprout::next(first, sprout::distance(first, last) - 1), pred, - (sprout::distance(first, last) - 1) / 2, first - ), - last - ) - ; - } - - template - inline SPROUT_CONSTEXPR ForwardIterator - adjacent_find_impl_check(ForwardIterator const& found, ForwardIterator const& last) { - return sprout::next(found) == last ? last - : found - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - adjacent_find_impl_1( - sprout::pair const& current, - ForwardIterator const& last, BinaryPredicate pred, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair type; - return current.second == last ? current - : n == 1 ? pred(*current.first, *current.second) - ? type(current.first, last) - : type(current.second, sprout::next(current.second)) - : sprout::detail::adjacent_find_impl_1( - sprout::detail::adjacent_find_impl_1( - current, - last, pred, n / 2 - ), - last, pred, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - adjacent_find_impl( - sprout::pair const& current, - ForwardIterator const& last, BinaryPredicate pred, typename std::iterator_traits::difference_type n - ) - { - return current.second == last ? current - : sprout::detail::adjacent_find_impl( - sprout::detail::adjacent_find_impl_1( - current, - last, pred, n - ), - last, pred, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR ForwardIterator - adjacent_find( - ForwardIterator const& first, ForwardIterator const& last, BinaryPredicate pred, - std::forward_iterator_tag* - ) - { - typedef sprout::pair type; - return first == last ? last - : sprout::detail::adjacent_find_impl_check( - sprout::detail::adjacent_find_impl(type(first, sprout::next(first)), last, pred, 1).first, - last - ) - ; - } - } // namespace detail - - // 25.2.8 Adjacent find - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR ForwardIterator - adjacent_find(ForwardIterator first, ForwardIterator last, BinaryPredicate pred) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::detail::adjacent_find(first, last, pred, category()); - } - - template - inline SPROUT_CONSTEXPR ForwardIterator - adjacent_find(ForwardIterator first, ForwardIterator last) { - return sprout::adjacent_find( - first, last, - NS_SSCRISK_CEL_OR_SPROUT::equal_to::value_type>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_ADJACENT_FIND_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/all_of.hpp b/dsp/lib/sprout/sprout/algorithm/all_of.hpp deleted file mode 100644 index 0ff90f7..0000000 --- a/dsp/lib/sprout/sprout/algorithm/all_of.hpp +++ /dev/null @@ -1,114 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_ALL_OF_HPP -#define SPROUT_ALGORITHM_ALL_OF_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR bool - all_of_impl_ra( - RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred, - typename std::iterator_traits::difference_type pivot - ) - { - return pivot == 0 ? pred(*first) - : sprout::detail::all_of_impl_ra( - first, sprout::next(first, pivot), pred, - pivot / 2 - ) - && sprout::detail::all_of_impl_ra( - sprout::next(first, pivot), last, pred, - (sprout::distance(first, last) - pivot) / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - bool - >::type - all_of( - RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred, - std::random_access_iterator_tag* - ) - { - return first == last ? true - : sprout::detail::all_of_impl_ra(first, last, pred, sprout::distance(first, last) / 2) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::pair - all_of_impl_1( - sprout::pair const& current, - InputIterator const& last, Predicate pred, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair type; - return !current.second || current.first == last ? current - : n == 1 ? pred(*current.first) ? type(sprout::next(current.first), true) : type(current.first, false) - : sprout::detail::all_of_impl_1( - sprout::detail::all_of_impl_1( - current, - last, pred, n / 2 - ), - last, pred, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - all_of_impl( - sprout::pair const& current, - InputIterator const& last, Predicate pred, typename std::iterator_traits::difference_type n - ) - { - return !current.second || current.first == last ? current - : sprout::detail::all_of_impl( - sprout::detail::all_of_impl_1( - current, - last, pred, n - ), - last, pred, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR bool - all_of( - InputIterator const& first, InputIterator const& last, Predicate pred, - std::input_iterator_tag* - ) - { - typedef sprout::pair type; - return sprout::detail::all_of_impl(type(first, true), last, pred, 1).second; - } - } // namespace detail - - // 25.2.1 All of - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR bool - all_of(InputIterator first, InputIterator last, Predicate pred) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::detail::all_of(first, last, pred, category()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_ALL_OF_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/all_of_equal.hpp b/dsp/lib/sprout/sprout/algorithm/all_of_equal.hpp deleted file mode 100644 index f39e6f6..0000000 --- a/dsp/lib/sprout/sprout/algorithm/all_of_equal.hpp +++ /dev/null @@ -1,115 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_ALL_OF_EQUAL_HPP -#define SPROUT_ALGORITHM_ALL_OF_EQUAL_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR bool - all_of_equal_impl_ra( - RandomAccessIterator const& first, RandomAccessIterator const& last, T const& value, - typename std::iterator_traits::difference_type pivot - ) - { - return pivot == 0 ? *first == value - : sprout::detail::all_of_equal_impl_ra( - first, sprout::next(first, pivot), value, - pivot / 2 - ) - && sprout::detail::all_of_equal_impl_ra( - sprout::next(first, pivot), last, value, - (sprout::distance(first, last) - pivot) / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - bool - >::type - all_of_equal( - RandomAccessIterator const& first, RandomAccessIterator const& last, T const& value, - std::random_access_iterator_tag* - ) - { - return first == last ? true - : sprout::detail::all_of_equal_impl_ra(first, last, value, sprout::distance(first, last) / 2) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::pair - all_of_equal_impl_1( - sprout::pair const& current, - InputIterator const& last, T const& value, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair type; - return !current.second || current.first == last ? current - : n == 1 ? *current.first == value ? type(sprout::next(current.first), true) : type(current.first, false) - : sprout::detail::all_of_equal_impl_1( - sprout::detail::all_of_equal_impl_1( - current, - last, value, n / 2 - ), - last, value, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - all_of_equal_impl( - sprout::pair const& current, - InputIterator const& last, T const& value, typename std::iterator_traits::difference_type n - ) - { - return !current.second || current.first == last ? current - : sprout::detail::all_of_equal_impl( - sprout::detail::all_of_equal_impl_1( - current, - last, value, n - ), - last, value, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR bool - all_of_equal( - InputIterator const& first, InputIterator const& last, T const& value, - std::input_iterator_tag* - ) - { - typedef sprout::pair type; - return sprout::detail::all_of_equal_impl(type(first, true), last, value, 1).second; - } - } // namespace detail - - // - // all_of_equal - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR bool - all_of_equal(InputIterator first, InputIterator last, T const& value) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::detail::all_of_equal(first, last, value, category()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_ALL_OF_EQUAL_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/any_of.hpp b/dsp/lib/sprout/sprout/algorithm/any_of.hpp deleted file mode 100644 index e50c9b3..0000000 --- a/dsp/lib/sprout/sprout/algorithm/any_of.hpp +++ /dev/null @@ -1,114 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_ANY_OF_HPP -#define SPROUT_ALGORITHM_ANY_OF_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR bool - any_of_impl_ra( - RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred, - typename std::iterator_traits::difference_type pivot - ) - { - return pivot == 0 ? pred(*first) - : sprout::detail::any_of_impl_ra( - first, sprout::next(first, pivot), pred, - pivot / 2 - ) - || sprout::detail::any_of_impl_ra( - sprout::next(first, pivot), last, pred, - (sprout::distance(first, last) - pivot) / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - bool - >::type - any_of( - RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred, - std::random_access_iterator_tag* - ) - { - return first == last ? false - : sprout::detail::any_of_impl_ra(first, last, pred, sprout::distance(first, last) / 2) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::pair - any_of_impl_1( - sprout::pair const& current, - InputIterator const& last, Predicate pred, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair type; - return current.second || current.first == last ? current - : n == 1 ? pred(*current.first) ? type(current.first, true) : type(sprout::next(current.first), false) - : sprout::detail::any_of_impl_1( - sprout::detail::any_of_impl_1( - current, - last, pred, n / 2 - ), - last, pred, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - any_of_impl( - sprout::pair const& current, - InputIterator const& last, Predicate pred, typename std::iterator_traits::difference_type n - ) - { - return current.second || current.first == last ? current - : sprout::detail::any_of_impl( - sprout::detail::any_of_impl_1( - current, - last, pred, n - ), - last, pred, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR bool - any_of( - InputIterator const& first, InputIterator const& last, Predicate pred, - std::input_iterator_tag* - ) - { - typedef sprout::pair type; - return sprout::detail::any_of_impl(type(first, false), last, pred, 1).second; - } - } // namespace detail - - // 25.2.2 Any of - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR bool - any_of(InputIterator first, InputIterator last, Predicate pred) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::detail::any_of(first, last, pred, category()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_ANY_OF_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/any_of_equal.hpp b/dsp/lib/sprout/sprout/algorithm/any_of_equal.hpp deleted file mode 100644 index cf8286f..0000000 --- a/dsp/lib/sprout/sprout/algorithm/any_of_equal.hpp +++ /dev/null @@ -1,115 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_ANY_OF_EQUAL_HPP -#define SPROUT_ALGORITHM_ANY_OF_EQUAL_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR bool - any_of_equal_impl_ra( - RandomAccessIterator const& first, RandomAccessIterator const& last, T const& value, - typename std::iterator_traits::difference_type pivot - ) - { - return pivot == 0 ? *first == value - : sprout::detail::any_of_equal_impl_ra( - first, sprout::next(first, pivot), value, - pivot / 2 - ) - || sprout::detail::any_of_equal_impl_ra( - sprout::next(first, pivot), last, value, - (sprout::distance(first, last) - pivot) / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - bool - >::type - any_of_equal( - RandomAccessIterator const& first, RandomAccessIterator const& last, T const& value, - std::random_access_iterator_tag* - ) - { - return first == last ? false - : sprout::detail::any_of_equal_impl_ra(first, last, value, sprout::distance(first, last) / 2) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::pair - any_of_equal_impl_1( - sprout::pair const& current, - InputIterator const& last, T const& value, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair type; - return current.second || current.first == last ? current - : n == 1 ? *current.first == value ? type(current.first, true) : type(sprout::next(current.first), false) - : sprout::detail::any_of_equal_impl_1( - sprout::detail::any_of_equal_impl_1( - current, - last, value, n / 2 - ), - last, value, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - any_of_equal_impl( - sprout::pair const& current, - InputIterator const& last, T const& value, typename std::iterator_traits::difference_type n - ) - { - return current.second || current.first == last ? current - : sprout::detail::any_of_equal_impl( - sprout::detail::any_of_equal_impl_1( - current, - last, value, n - ), - last, value, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR bool - any_of_equal( - InputIterator const& first, InputIterator const& last, T const& value, - std::input_iterator_tag* - ) - { - typedef sprout::pair type; - return sprout::detail::any_of_equal_impl(type(first, false), last, value, 1).second; - } - } // namespace detail - - // - // any_of_equal - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR bool - any_of_equal(InputIterator first, InputIterator last, T const& value) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::detail::any_of_equal(first, last, value, category()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_ANY_OF_EQUAL_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/binary_search.hpp b/dsp/lib/sprout/sprout/algorithm/binary_search.hpp deleted file mode 100644 index a200e07..0000000 --- a/dsp/lib/sprout/sprout/algorithm/binary_search.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_BINARY_SEARCH_HPP -#define SPROUT_ALGORITHM_BINARY_SEARCH_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR bool - binary_search_impl(ForwardIterator const& first, ForwardIterator const& last, T const& value, Compare comp) { - return (first != last && !comp(value, *first)); - } - } // namespace detail - - // 25.4.3.4 binary_search - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR bool - binary_search(ForwardIterator first, ForwardIterator last, T const& value, Compare comp) { - return sprout::detail::binary_search_impl(sprout::lower_bound(first, last, value, comp), last, value, comp); - } - - template - inline SPROUT_CONSTEXPR bool - binary_search(ForwardIterator first, ForwardIterator last, T const& value) { - return sprout::binary_search(first, last, value, sprout::less<>()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_BINARY_SEARCH_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/bogo_sort.hpp b/dsp/lib/sprout/sprout/algorithm/bogo_sort.hpp deleted file mode 100644 index 448cf57..0000000 --- a/dsp/lib/sprout/sprout/algorithm/bogo_sort.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_BOGO_SORT_HPP -#define SPROUT_ALGORITHM_BOGO_SORT_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_BOGO_SORT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/bogo_sort_result.hpp b/dsp/lib/sprout/sprout/algorithm/bogo_sort_result.hpp deleted file mode 100644 index 093e447..0000000 --- a/dsp/lib/sprout/sprout/algorithm/bogo_sort_result.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_BOGO_SORT_RESULT_HPP -#define SPROUT_ALGORITHM_BOGO_SORT_RESULT_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_BOGO_SORT_RESULT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/bozo_sort.hpp b/dsp/lib/sprout/sprout/algorithm/bozo_sort.hpp deleted file mode 100644 index 92e2a3f..0000000 --- a/dsp/lib/sprout/sprout/algorithm/bozo_sort.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_BOZO_SORT_HPP -#define SPROUT_ALGORITHM_BOZO_SORT_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_BOZO_SORT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/bozo_sort_result.hpp b/dsp/lib/sprout/sprout/algorithm/bozo_sort_result.hpp deleted file mode 100644 index 773c4da..0000000 --- a/dsp/lib/sprout/sprout/algorithm/bozo_sort_result.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_BOZO_SORT_RESULT_HPP -#define SPROUT_ALGORITHM_BOZO_SORT_RESULT_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_BOZO_SORT_RESULT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/clamp.hpp b/dsp/lib/sprout/sprout/algorithm/clamp.hpp deleted file mode 100644 index 05ba693..0000000 --- a/dsp/lib/sprout/sprout/algorithm/clamp.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CLAMP_HPP -#define SPROUT_ALGORITHM_CLAMP_HPP - -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - // - // clamp - // - template - inline SPROUT_CONSTEXPR T const& - clamp(T const& value, typename sprout::identity::type const& low, typename sprout::identity::type const& high, Compare comp) { - return comp(value, low) ? low - : comp(high, value) ? high - : value - ; - } - template - inline SPROUT_CONSTEXPR T const& - clamp(T const& value, typename sprout::identity::type const& low, typename sprout::identity::type const& high) { - return sprout::clamp( - value, low, high, - NS_SSCRISK_CEL_OR_SPROUT::less() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CLAMP_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/clamp_range.hpp b/dsp/lib/sprout/sprout/algorithm/clamp_range.hpp deleted file mode 100644 index 6383d8f..0000000 --- a/dsp/lib/sprout/sprout/algorithm/clamp_range.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CLAMP_RANGE_HPP -#define SPROUT_ALGORITHM_CLAMP_RANGE_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_CLAMP_RANGE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/clamp_range_copy.hpp b/dsp/lib/sprout/sprout/algorithm/clamp_range_copy.hpp deleted file mode 100644 index d3f55c5..0000000 --- a/dsp/lib/sprout/sprout/algorithm/clamp_range_copy.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CLAMP_RANGE_COPY_HPP -#define SPROUT_ALGORITHM_CLAMP_RANGE_COPY_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_CLAMP_RANGE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/copy.hpp b/dsp/lib/sprout/sprout/algorithm/copy.hpp deleted file mode 100644 index c1b6eb9..0000000 --- a/dsp/lib/sprout/sprout/algorithm/copy.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_COPY_HPP -#define SPROUT_ALGORITHM_COPY_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/copy_backward.hpp b/dsp/lib/sprout/sprout/algorithm/copy_backward.hpp deleted file mode 100644 index 6b06fa6..0000000 --- a/dsp/lib/sprout/sprout/algorithm/copy_backward.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_COPY_BACKWARD_HPP -#define SPROUT_ALGORITHM_COPY_BACKWARD_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_COPY_BACKWARD_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/copy_if.hpp b/dsp/lib/sprout/sprout/algorithm/copy_if.hpp deleted file mode 100644 index e52eca3..0000000 --- a/dsp/lib/sprout/sprout/algorithm/copy_if.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_COPY_IF_HPP -#define SPROUT_ALGORITHM_COPY_IF_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_COPY_IF_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/copy_n.hpp b/dsp/lib/sprout/sprout/algorithm/copy_n.hpp deleted file mode 100644 index 7ed2b50..0000000 --- a/dsp/lib/sprout/sprout/algorithm/copy_n.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_COPY_N_HPP -#define SPROUT_ALGORITHM_COPY_N_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_COPY_N_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/copy_until.hpp b/dsp/lib/sprout/sprout/algorithm/copy_until.hpp deleted file mode 100644 index bebb779..0000000 --- a/dsp/lib/sprout/sprout/algorithm/copy_until.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_COPY_UNTIL_HPP -#define SPROUT_ALGORITHM_COPY_UNTIL_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_COPY_UNTIL_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/copy_while.hpp b/dsp/lib/sprout/sprout/algorithm/copy_while.hpp deleted file mode 100644 index f1229b2..0000000 --- a/dsp/lib/sprout/sprout/algorithm/copy_while.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_COPY_WHILE_HPP -#define SPROUT_ALGORITHM_COPY_WHILE_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_COPY_WHILE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/count.hpp b/dsp/lib/sprout/sprout/algorithm/count.hpp deleted file mode 100644 index dd9e8aa..0000000 --- a/dsp/lib/sprout/sprout/algorithm/count.hpp +++ /dev/null @@ -1,114 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_COUNT_HPP -#define SPROUT_ALGORITHM_COUNT_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type - count_impl_ra( - RandomAccessIterator const& first, T const& value, - typename std::iterator_traits::difference_type size - ) - { - return size == 1 ? (*first == value ? 1 : 0) - : sprout::detail::count_impl_ra( - first, value, - size / 2 - ) - + sprout::detail::count_impl_ra( - sprout::next(first, size / 2), value, - size - size / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - typename std::iterator_traits::difference_type - >::type - count( - RandomAccessIterator const& first, RandomAccessIterator const& last, T const& value, - std::random_access_iterator_tag* - ) - { - return first == last ? 0 - : sprout::detail::count_impl_ra(first, value, sprout::distance(first, last)) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::pair::difference_type> - count_impl_1( - sprout::pair::difference_type> const& current, - InputIterator const& last, T const& value, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair::difference_type> type; - return current.first == last ? current - : n == 1 ? type(sprout::next(current.first), current.second + (*current.first == value ? 1 : 0)) - : sprout::detail::count_impl_1( - sprout::detail::count_impl_1( - current, - last, value, n / 2 - ), - last, value, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair::difference_type> - count_impl( - sprout::pair::difference_type> const& current, - InputIterator const& last, T const& value, typename std::iterator_traits::difference_type n - ) - { - return current.first == last ? current - : sprout::detail::count_impl( - sprout::detail::count_impl_1( - current, - last, value, n - ), - last, value, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type - count( - InputIterator const& first, InputIterator const& last, T const& value, - std::input_iterator_tag* - ) - { - typedef sprout::pair::difference_type> type; - return sprout::detail::count_impl(type(first, 0), last, value, 1).second; - } - } // namespace detail - - // 25.2.9 Count - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type - count(InputIterator first, InputIterator last, T const& value) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::detail::count(first, last, value, category()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_COUNT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/count_if.hpp b/dsp/lib/sprout/sprout/algorithm/count_if.hpp deleted file mode 100644 index fa561c8..0000000 --- a/dsp/lib/sprout/sprout/algorithm/count_if.hpp +++ /dev/null @@ -1,114 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_COUNT_IF_HPP -#define SPROUT_ALGORITHM_COUNT_IF_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type - count_if_impl_ra( - RandomAccessIterator const& first, Predicate pred, - typename std::iterator_traits::difference_type size - ) - { - return size == 1 ? (pred(*first) ? 1 : 0) - : sprout::detail::count_if_impl_ra( - first, pred, - size / 2 - ) - + sprout::detail::count_if_impl_ra( - sprout::next(first, size / 2), pred, - size - size / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - typename std::iterator_traits::difference_type - >::type - count_if( - RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred, - std::random_access_iterator_tag* - ) - { - return first == last ? 0 - : sprout::detail::count_if_impl_ra(first, pred, sprout::distance(first, last)) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::pair::difference_type> - count_if_impl_1( - sprout::pair::difference_type> const& current, - InputIterator const& last, Predicate pred, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair::difference_type> type; - return current.first == last ? current - : n == 1 ? type(sprout::next(current.first), current.second + (pred(*current.first) ? 1 : 0)) - : sprout::detail::count_if_impl_1( - sprout::detail::count_if_impl_1( - current, - last, pred, n / 2 - ), - last, pred, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair::difference_type> - count_if_impl( - sprout::pair::difference_type> const& current, - InputIterator const& last, Predicate pred, typename std::iterator_traits::difference_type n - ) - { - return current.first == last ? current - : sprout::detail::count_if_impl( - sprout::detail::count_if_impl_1( - current, - last, pred, n - ), - last, pred, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type - count_if( - InputIterator const& first, InputIterator const& last, Predicate pred, - std::input_iterator_tag* - ) - { - typedef sprout::pair::difference_type> type; - return sprout::detail::count_if_impl(type(first, 0), last, pred, 1).second; - } - } // namespace detail - - // 25.2.9 Count - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type - count_if(InputIterator first, InputIterator last, Predicate pred) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::detail::count_if(first, last, pred, category()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_COUNT_IF_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14.hpp deleted file mode 100644 index 411d566..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14.hpp +++ /dev/null @@ -1,72 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_HPP -#define SPROUT_ALGORITHM_CXX14_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/bogo_sort.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/bogo_sort.hpp deleted file mode 100644 index b9274c2..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/bogo_sort.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_BOGO_SORT_HPP -#define SPROUT_ALGORITHM_CXX14_BOGO_SORT_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // bogo_sort - // - template - inline SPROUT_CXX14_CONSTEXPR void - bogo_sort(RandomAccessIterator first, RandomAccessIterator last, UniformRandomNumberGenerator&& g) { - while (!sprout::is_sorted(first, last)) { - sprout::shuffle(first, last, SPROUT_FORWARD(UniformRandomNumberGenerator, g)); - } - } - template - inline SPROUT_CXX14_CONSTEXPR void - bogo_sort(RandomAccessIterator first, RandomAccessIterator last, UniformRandomNumberGenerator&& g, Compare comp) { - while (!sprout::is_sorted(first, last, comp)) { - sprout::shuffle(first, last, SPROUT_FORWARD(UniformRandomNumberGenerator, g)); - } - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_BOGO_SORT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/bozo_sort.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/bozo_sort.hpp deleted file mode 100644 index 5921538..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/bozo_sort.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_BOZO_SORT_HPP -#define SPROUT_ALGORITHM_CXX14_BOZO_SORT_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // bozo_sort - // - template - inline SPROUT_CXX14_CONSTEXPR void - bozo_sort(RandomAccessIterator first, RandomAccessIterator last, UniformRandomNumberGenerator&& g) { - while (!sprout::is_sorted(first, last)) { - sprout::random_swap(first, last, SPROUT_FORWARD(UniformRandomNumberGenerator, g)); - } - } - template - inline SPROUT_CXX14_CONSTEXPR void - bozo_sort(RandomAccessIterator first, RandomAccessIterator last, UniformRandomNumberGenerator&& g, Compare comp) { - while (!sprout::is_sorted(first, last, comp)) { - sprout::random_swap(first, last, SPROUT_FORWARD(UniformRandomNumberGenerator, g)); - } - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_BOZO_SORT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/clamp_range.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/clamp_range.hpp deleted file mode 100644 index 6315bfe..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/clamp_range.hpp +++ /dev/null @@ -1,55 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_CLAMP_RANGE_HPP -#define SPROUT_ALGORITHM_CXX14_CLAMP_RANGE_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // clamp_range - // - template< - typename InputIterator, typename OutputIterator, typename Compare, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - clamp_range( - InputIterator first, InputIterator last, OutputIterator result, - typename std::iterator_traits::value_type const& low, - typename std::iterator_traits::value_type const& high, - Compare comp - ) - { - while (first != last) { - *result++ = sprout::clamp(*first++, low, high, comp); - } - return result; - } - template< - typename InputIterator, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - clamp_range( - InputIterator first, InputIterator last, OutputIterator result, - typename std::iterator_traits::value_type const& low, - typename std::iterator_traits::value_type const& high - ) - { - while (first != last) { - *result++ = sprout::clamp(*first++, low, high); - } - return result; - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_CLAMP_RANGE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/copy.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/copy.hpp deleted file mode 100644 index 5b27c63..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/copy.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_COPY_HPP -#define SPROUT_ALGORITHM_CXX14_COPY_HPP - -#include -#include -#include - -namespace sprout { - // - // 25.3.1 Copy - // - template< - typename InputIterator, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - copy(InputIterator first, InputIterator last, OutputIterator result) { - while (first != last) { - *result++ = *first++; - } - return result; - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/copy_backward.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/copy_backward.hpp deleted file mode 100644 index 5256e0d..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/copy_backward.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_COPY_BACKWARD_HPP -#define SPROUT_ALGORITHM_CXX14_COPY_BACKWARD_HPP - -#include -#include -#include - -namespace sprout { - // - // 25.3.1 Copy - // - template< - typename BidirectionalIterator1, typename BidirectionalIterator2, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR BidirectionalIterator2 - copy_backward(BidirectionalIterator1 first, BidirectionalIterator1 last, BidirectionalIterator2 result) { - while (first != last) { - *--result = *--last; - } - return result; - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_COPY_BACKWARD_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/copy_if.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/copy_if.hpp deleted file mode 100644 index 5d9c33b..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/copy_if.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_COPY_IF_HPP -#define SPROUT_ALGORITHM_CXX14_COPY_IF_HPP - -#include -#include -#include - -namespace sprout { - // - // 25.3.1 Copy - // - template< - typename InputIterator, typename OutputIterator, typename Predicate, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - copy_if(InputIterator first, InputIterator last, OutputIterator result, Predicate pred) { - for (; first != last; ++first) { - if (pred(*first)) { - *result++ = *first; - } - } - return result; - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_COPY_IF_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/copy_n.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/copy_n.hpp deleted file mode 100644 index 34b50da..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/copy_n.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_COPY_N_HPP -#define SPROUT_ALGORITHM_CXX14_COPY_N_HPP - -#include -#include -#include - -namespace sprout { - // - // 25.3.1 Copy - // - template< - typename InputIterator, typename Size, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - copy_n(InputIterator first, Size n, OutputIterator result) { - for (Size i = 0; i < n; ++i) { - *result++ = *first++; - } - return result; - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_COPY_N_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/copy_until.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/copy_until.hpp deleted file mode 100644 index a4dac29..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/copy_until.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_COPY_UNTIL_HPP -#define SPROUT_ALGORITHM_CXX14_COPY_UNTIL_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // copy_until - // - template< - typename InputIterator, typename OutputIterator, typename Predicate, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR sprout::pair - copy_until(InputIterator first, InputIterator last, OutputIterator result, Predicate pred) { - for (; first != last && !pred(*first); ++first) { - *result++ = *first; - } - return std::make_pair(first, result); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_COPY_UNTIL_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/copy_while.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/copy_while.hpp deleted file mode 100644 index 8e16d6f..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/copy_while.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_COPY_WHILE_HPP -#define SPROUT_ALGORITHM_CXX14_COPY_WHILE_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // copy_while - // - template< - typename InputIterator, typename OutputIterator, typename Predicate, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR sprout::pair - copy_while(InputIterator first, InputIterator last, OutputIterator result, Predicate pred) { - for (; first != last && pred(*first); ++first) { - *result++ = *first; - } - return std::make_pair(first, result); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_COPY_WHILE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/detail/heap_tool.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/detail/heap_tool.hpp deleted file mode 100644 index b488447..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/detail/heap_tool.hpp +++ /dev/null @@ -1,84 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_DETAIL_HEAP_TOOL_HPP -#define SPROUT_ALGORITHM_CXX14_DETAIL_HEAP_TOOL_HPP - -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CXX14_CONSTEXPR void - push_heap_front( - RandomAccessIterator first, RandomAccessIterator, Compare comp, - typename std::iterator_traits::difference_type len - ) - { - typedef typename std::iterator_traits::difference_type difference_type; - typedef typename std::iterator_traits::value_type value_type; - if (len > 1) { - difference_type p = 0; - RandomAccessIterator pp = first; - difference_type c = 2; - RandomAccessIterator cp = first + c; - if (c == len || comp(*cp, *(cp - 1))) { - --c; - --cp; - } - if (comp(*pp, *cp)) { - value_type t(sprout::move(*pp)); - do { - *pp = sprout::move(*cp); - pp = cp; - p = c; - c = (p + 1) * 2; - if (c > len) { - break; - } - cp = first + c; - if (c == len || comp(*cp, *(cp - 1))) { - --c; - --cp; - } - } while (comp(t, *cp)); - *pp = sprout::move(t); - } - } - } - template - inline SPROUT_CXX14_CONSTEXPR void - push_heap_back( - RandomAccessIterator first, RandomAccessIterator last, Compare comp, - typename std::iterator_traits::difference_type len - ) - { - typedef typename std::iterator_traits::value_type value_type; - if (len > 1) { - len = (len - 2) / 2; - RandomAccessIterator ptr = first + len; - if (comp(*ptr, *--last)) { - value_type t(sprout::move(*last)); - do { - *last = sprout::move(*ptr); - last = ptr; - if (len == 0) { - break; - } - len = (len - 1) / 2; - ptr = first + len; - } while (comp(*ptr, t)); - *last = sprout::move(t); - } - } - } - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_DETAIL_HEAP_TOOL_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/detail/insertion_sort.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/detail/insertion_sort.hpp deleted file mode 100644 index 67f412d..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/detail/insertion_sort.hpp +++ /dev/null @@ -1,53 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_DETAIL_INSERTION_SORT_HPP -#define SPROUT_ALGORITHM_CXX14_DETAIL_INSERTION_SORT_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CXX14_CONSTEXPR void - unguarded_linear_insert(RandomAccessIterator last, Compare comp) { - typedef typename std::iterator_traits::value_type value_type; - value_type val = sprout::move(*last); - RandomAccessIterator next = last; - --next; - while (comp(val, *next)) { - *last = sprout::move(*next); - last = next; - --next; - } - *last = sprout::move(val); - } - - template - inline SPROUT_CXX14_CONSTEXPR void - insertion_sort(RandomAccessIterator first, RandomAccessIterator last, Compare comp) { - typedef typename std::iterator_traits::value_type value_type; - if (first == last) { - return; - } - for (RandomAccessIterator i = first + 1; i != last; ++i) { - if (comp(*i, *first)) { - value_type val = sprout::move(*i); - sprout::move_backward(first, i, i + 1); - *first = sprout::move(val); - } else { - sprout::detail::unguarded_linear_insert(i, comp); - } - } - } - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_DETAIL_INSERTION_SORT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/detail/sort_tool.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/detail/sort_tool.hpp deleted file mode 100644 index db99691..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/detail/sort_tool.hpp +++ /dev/null @@ -1,182 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_DETAIL_SORT_TOOL_HPP -#define SPROUT_ALGORITHM_CXX14_DETAIL_SORT_TOOL_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CXX14_CONSTEXPR unsigned - sort3(ForwardIterator x, ForwardIterator y, ForwardIterator z, Compare comp) { - unsigned r = 0; - if (!comp(*y, *x)) { - if (!comp(*z, *y)) - return r; - sprout::swap(*y, *z); - r = 1; - if (comp(*y, *x)) { - sprout::swap(*x, *y); - r = 2; - } - return r; - } - if (comp(*z, *y)) { - sprout::swap(*x, *z); - r = 1; - return r; - } - sprout::swap(*x, *y); - r = 1; - if (comp(*z, *y)) { - sprout::swap(*y, *z); - r = 2; - } - return r; - } - template - inline SPROUT_CXX14_CONSTEXPR unsigned - sort4(ForwardIterator x1, ForwardIterator x2, ForwardIterator x3, ForwardIterator x4, Compare comp) { - unsigned r = sprout::detail::sort3(x1, x2, x3, comp); - if (comp(*x4, *x3)) { - sprout::swap(*x3, *x4); - ++r; - if (comp(*x3, *x2)) { - sprout::swap(*x2, *x3); - ++r; - if (comp(*x2, *x1)) { - sprout::swap(*x1, *x2); - ++r; - } - } - } - return r; - } - template - inline SPROUT_CXX14_CONSTEXPR unsigned - sort5(ForwardIterator x1, ForwardIterator x2, ForwardIterator x3, ForwardIterator x4, ForwardIterator x5, Compare comp) { - unsigned r = sprout::detail::sort4(x1, x2, x3, x4, comp); - if (comp(*x5, *x4)) { - sprout::swap(*x4, *x5); - ++r; - if (comp(*x4, *x3)) { - sprout::swap(*x3, *x4); - ++r; - if (comp(*x3, *x2)) { - sprout::swap(*x2, *x3); - ++r; - if (comp(*x2, *x1)) { - sprout::swap(*x1, *x2); - ++r; - } - } - } - } - return r; - } - template - inline SPROUT_CXX14_CONSTEXPR void - selection_sort(BirdirectionalIterator first, BirdirectionalIterator last, Compare comp) { - BirdirectionalIterator lm1 = last; - for (--lm1; first != lm1; ++first) { - BirdirectionalIterator i = sprout::min_element(first, last, comp); - if (i != first) { - sprout::swap(*first, *i); - } - } - } - template - inline SPROUT_CXX14_CONSTEXPR void - insertion_sort(BirdirectionalIterator first, BirdirectionalIterator last, Compare comp) { - typedef typename std::iterator_traits::value_type value_type; - if (first != last) { - BirdirectionalIterator i = first; - for (++i; i != last; ++i) { - BirdirectionalIterator j = i; - value_type t(sprout::move(*j)); - for (BirdirectionalIterator k = i; k != first && comp(t, *--k); --j) { - *j = sprout::move(*k); - } - *j = sprout::move(t); - } - } - } - template - inline SPROUT_CXX14_CONSTEXPR void - insertion_sort_3(RandomAccessIterator first, RandomAccessIterator last, Compare comp) { - typedef typename std::iterator_traits::value_type value_type; - RandomAccessIterator j = first + 2; - sprout::detail::sort3(first, first + 1, j, comp); - for (RandomAccessIterator i = j + 1; i != last; ++i) { - if (comp(*i, *j)) { - value_type t(sprout::move(*i)); - RandomAccessIterator k = j; - j = i; - do { - *j = sprout::move(*k); - j = k; - } while (j != first && comp(t, *--k)); - *j = sprout::move(t); - } - j = i; - } - } - template - inline SPROUT_CXX14_CONSTEXPR bool - insertion_sort_incomplete(RandomAccessIterator first, RandomAccessIterator last, Compare comp) { - switch (last - first) { - case 0: - case 1: - return true; - case 2: - if (comp(*--last, *first)) { - sprout::swap(*first, *last); - } - return true; - case 3: - sprout::detail::sort3(first, first + 1, --last, comp); - return true; - case 4: - sprout::detail::sort4(first, first + 1, first + 2, --last, comp); - return true; - case 5: - sprout::detail::sort5(first, first + 1, first + 2, first + 3, --last, comp); - return true; - } - typedef typename std::iterator_traits::value_type value_type; - RandomAccessIterator j = first+2; - sprout::detail::sort3(first, first + 1, j, comp); - unsigned const limit = 8; - unsigned count = 0; - for (RandomAccessIterator i = j + 1; i != last; ++i) { - if (comp(*i, *j)) { - value_type t(sprout::move(*i)); - RandomAccessIterator k = j; - j = i; - do { - *j = sprout::move(*k); - j = k; - } while (j != first && comp(t, *--k)); - *j = sprout::move(t); - if (++count == limit) { - return ++i == last; - } - } - j = i; - } - return true; - } - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_DETAIL_SORT_TOOL_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/fill.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/fill.hpp deleted file mode 100644 index 654b1f9..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/fill.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_FILL_HPP -#define SPROUT_ALGORITHM_CXX14_FILL_HPP - -#include - -namespace sprout { - // - // 25.3.6 Fill - // - template - inline SPROUT_CXX14_CONSTEXPR void - fill(ForwardIterator first, ForwardIterator last, T const& value) { - while (first != last) { - *first++ = value; - } - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_FILL_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/fill_n.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/fill_n.hpp deleted file mode 100644 index 96256ce..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/fill_n.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_FILL_N_HPP -#define SPROUT_ALGORITHM_CXX14_FILL_N_HPP - -#include -#include -#include - -namespace sprout { - // - // 25.3.6 Fill - // - template< - typename OutputIterator, typename Size, typename T, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - fill_n(OutputIterator first, Size n, T const& value) { - while (n-- > 0) { - *first++ = value; - } - return first; - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_FILL_N_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/for_each.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/for_each.hpp deleted file mode 100644 index fc18a07..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/for_each.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_FOR_EACH_HPP -#define SPROUT_ALGORITHM_CXX14_FOR_EACH_HPP - -#include -#include - -namespace sprout { - // - // 25.2.4 For each - // - template - inline SPROUT_CXX14_CONSTEXPR Function - for_each(InputIterator first, InputIterator last, Function f) { - for (; first != last; ++first) { - f(*first); - } - return sprout::move(f); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_FOR_EACH_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/for_each_n.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/for_each_n.hpp deleted file mode 100644 index 961d97e..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/for_each_n.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_FOR_EACH_N_HPP -#define SPROUT_ALGORITHM_CXX14_FOR_EACH_N_HPP - -#include - -namespace sprout { - // - // 25.2.4 For each - // - template - inline SPROUT_CXX14_CONSTEXPR InputIterator - for_each_n(InputIterator first, Size n, Function f) { - for (Size i = 0; i < n; ++first) { - f(*first); - } - return first; - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_FOR_EACH_N_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/gather.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/gather.hpp deleted file mode 100644 index 091b444..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/gather.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_GATHER_HPP -#define SPROUT_ALGORITHM_CXX14_GATHER_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // gather - // - template - inline SPROUT_CXX14_CONSTEXPR sprout::pair - gather(BidirectionalIterator first, BidirectionalIterator last, BidirectionalIterator pivot, Predicate pred) { - return sprout::pair( - sprout::stable_partition(first, pivot, sprout::not1(pred)), - sprout::stable_partition(pivot, last, pred) - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_GATHER_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/generate.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/generate.hpp deleted file mode 100644 index 0aa16b6..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/generate.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_GENERATE_HPP -#define SPROUT_ALGORITHM_CXX14_GENERATE_HPP - -#include - -namespace sprout { - // - // 25.3.7 Generate - // - template - inline SPROUT_CXX14_CONSTEXPR void - generate(ForwardIterator first, ForwardIterator last, Generator gen) { - while (first != last) { - *first++ = gen(); - } - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_GENERATE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/generate_n.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/generate_n.hpp deleted file mode 100644 index 2bf1a35..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/generate_n.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_GENERATE_N_HPP -#define SPROUT_ALGORITHM_CXX14_GENERATE_N_HPP - -#include - -namespace sprout { - // - // 25.3.7 Generate - // - template< - typename OutputIterator, typename Size, typename Generator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - generate_n(OutputIterator first, Size n, Generator gen) { - while (n-- > 0) { - *first++ = gen(); - } - return first; - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_GENERATE_N_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/inplace_merge.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/inplace_merge.hpp deleted file mode 100644 index 4739598..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/inplace_merge.hpp +++ /dev/null @@ -1,86 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_INPLACE_MERGE_HPP -#define SPROUT_ALGORITHM_CXX14_INPLACE_MERGE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace detail { - template - inline SPROUT_CXX14_CONSTEXPR void - inplace_merge( - BidirectionalIterator first, BidirectionalIterator middle, BidirectionalIterator last, - Distance len1, Distance len2, Compare comp - ) - { - if (len1 == 0 || len2 == 0) { - return; - } - if (len1 + len2 == 2) { - if (comp(*middle, *first)) { - sprout::iter_swap(first, middle); - } - return; - } - BidirectionalIterator first_cut = first; - BidirectionalIterator second_cut = middle; - Distance len11 = 0; - Distance len22 = 0; - if (len1 > len2) { - len11 = len1 / 2; - sprout::advance(first_cut, len11); - second_cut = sprout::lower_bound(middle, last, *first_cut, comp); - len22 = sprout::distance(middle, second_cut); - } else { - len22 = len2 / 2; - sprout::advance(second_cut, len22); - first_cut = sprout::upper_bound(first, middle, *second_cut, comp); - len11 = sprout::distance(first, first_cut); - } - sprout::rotate(first_cut, middle, second_cut); - BidirectionalIterator new_middle = first_cut; - sprout::advance(new_middle, sprout::distance(middle, second_cut)); - sprout::detail::inplace_merge(first, first_cut, new_middle, len11, len22, comp); - sprout::detail::inplace_merge(new_middle, second_cut, last, len1 - len11, len2 - len22, comp); - } - } // namespace detail - // - // 25.4.4 Merge - // - template - inline SPROUT_CXX14_CONSTEXPR void - inplace_merge(BidirectionalIterator first, BidirectionalIterator middle, BidirectionalIterator last, Compare comp) { - typedef typename std::iterator_traits::difference_type difference_type; - if (first == middle || middle == last) { - return; - } - difference_type const len1 = sprout::distance(first, middle); - difference_type const len2 = sprout::distance(middle, last); - sprout::detail::inplace_merge(first, middle, last, len1, len2, comp); - } - - template - inline SPROUT_CXX14_CONSTEXPR void - inplace_merge(BidirectionalIterator first, BidirectionalIterator middle, BidirectionalIterator last) { - sprout::inplace_merge( - first, middle, last, - NS_SSCRISK_CEL_OR_SPROUT::less::value_type>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_INPLACE_MERGE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/iter_swap.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/iter_swap.hpp deleted file mode 100644 index 7a3d8ae..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/iter_swap.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_ITER_SWAP_HPP -#define SPROUT_ALGORITHM_CXX14_ITER_SWAP_HPP - -#include -#include - -namespace sprout { - // - // 25.3.3 swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - iter_swap(ForwardIterator1 a, ForwardIterator2 b) { - sprout::swap(*a, *b); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_ITER_SWAP_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/make_heap.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/make_heap.hpp deleted file mode 100644 index 3077acc..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/make_heap.hpp +++ /dev/null @@ -1,53 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_MAKE_HEAP_HPP -#define SPROUT_ALGORITHM_CXX14_MAKE_HEAP_HPP - -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace detail { - template - inline SPROUT_CXX14_CONSTEXPR void - make_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp) { - typedef typename std::iterator_traits::difference_type difference_type; - difference_type len = last - first; - if (len > 1) { - last = first; - ++last; - for (difference_type i = 1; i < len; ++i) { - sprout::detail::push_heap_back(first, ++last, comp, i); - } - } - } - } // namespace detail - // - // 25.4.6.3 make_heap - // - template - inline SPROUT_CXX14_CONSTEXPR void - make_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp) { - typedef typename std::add_lvalue_reference::type compare_ref; - sprout::detail::make_heap(first, last, comp); - } - - template - inline SPROUT_CXX14_CONSTEXPR void - make_heap(RandomAccessIterator first, RandomAccessIterator last) { - sprout::make_heap( - first, last, - NS_SSCRISK_CEL_OR_SPROUT::less::value_type>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_MAKE_HEAP_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/merge.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/merge.hpp deleted file mode 100644 index 3177c5e..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/merge.hpp +++ /dev/null @@ -1,54 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_MERGE_HPP -#define SPROUT_ALGORITHM_CXX14_MERGE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // 25.4.4 Merge - // - template< - typename InputIterator1, typename InputIterator2, typename OutputIterator, typename Compare, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - merge(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp) { - while (true) { - if (first1 == last1) { - return sprout::copy(first2, last2, result); - } - if (first2 == last2) { - return sprout::copy(first1, last1, result); - } - *result++ = comp(*first2, *first1) - ? *first2++ - : *first1++ - ; - } - } - - template< - typename InputIterator1, typename InputIterator2, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - merge(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result) { - return sprout::merge( - first1, last1, first2, last2, result, - sprout::less<>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_MERGE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/move.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/move.hpp deleted file mode 100644 index f01399a..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/move.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_MOVE_HPP -#define SPROUT_ALGORITHM_CXX14_MOVE_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // 25.3.2 Move - // - template< - typename InputIterator, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - move(InputIterator first, InputIterator last, OutputIterator result) { - while (first != last) { - *result++ = sprout::move(*first++); - } - return result; - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_MOVE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/move_backward.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/move_backward.hpp deleted file mode 100644 index 2afab0b..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/move_backward.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_MOVE_BACKWARD_HPP -#define SPROUT_ALGORITHM_CXX14_MOVE_BACKWARD_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // 25.3.2 Move - // - template< - typename BidirectionalIterator1, typename BidirectionalIterator2, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR BidirectionalIterator2 - move_backward(BidirectionalIterator1 first, BidirectionalIterator1 last, BidirectionalIterator2 result) { - while (first != last) { - *--result = sprout::move(*--first); - } - return result; - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_MOVE_BACKWARD_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/next_permutation.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/next_permutation.hpp deleted file mode 100644 index 10788f7..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/next_permutation.hpp +++ /dev/null @@ -1,64 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_NEXT_PERMUTATION_HPP -#define SPROUT_ALGORITHM_CXX14_NEXT_PERMUTATION_HPP - -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace detail { - template - inline SPROUT_CXX14_CONSTEXPR bool - next_permutation(BidirectionalIterator first, BidirectionalIterator last, Compare comp) { - BidirectionalIterator i = last; - if (first == last || first == --i) { - return false; - } - while (true) { - BidirectionalIterator ip1 = i; - if (comp(*--i, *ip1)) { - BidirectionalIterator j = last; - while (!comp(*i, *--j)) - ; - sprout::swap(*i, *j); - sprout::reverse(ip1, last); - return true; - } - if (i == first) { - sprout::reverse(first, last); - return false; - } - } - } - } // namespace detail - // - // 25.4.9 Permutation generators - // - template - inline SPROUT_CXX14_CONSTEXPR bool - next_permutation(BidirectionalIterator first, BidirectionalIterator last, Compare comp) { - typedef typename std::add_lvalue_reference::type compare_ref; - return sprout::detail::next_permutation(first, last, comp); - } - - template - inline SPROUT_CXX14_CONSTEXPR bool - next_permutation(BidirectionalIterator first, BidirectionalIterator last) { - return sprout::next_permutation( - first, last, - NS_SSCRISK_CEL_OR_SPROUT::less::value_type>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_NEXT_PERMUTATION_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/nth_element.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/nth_element.hpp deleted file mode 100644 index d53ef03..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/nth_element.hpp +++ /dev/null @@ -1,194 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_NTH_ELEMENT_HPP -#define SPROUT_ALGORITHM_CXX14_NTH_ELEMENT_HPP - -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace detail { - template - inline SPROUT_CXX14_CONSTEXPR void - nth_element(RandomAccessIterator first, RandomAccessIterator nth, RandomAccessIterator last, Compare comp) { - typedef typename std::iterator_traits::difference_type difference_type; - difference_type const limit = 7; - while (true) { - if (nth == last) { - return; - } - difference_type len = last - first; - switch (len) { - case 0: - case 1: - return; - case 2: - if (comp(*--last, *first)) { - sprout::swap(*first, *last); - } - return; - case 3: - { - RandomAccessIterator m = first; - sprout::detail::sort3(first, ++m, --last, comp); - } - return; - } - if (len <= limit) { - sprout::detail::selection_sort(first, last, comp); - return; - } - RandomAccessIterator m = first + len / 2; - RandomAccessIterator lm1 = last; - unsigned n_swaps = sprout::detail::sort3(first, m, --lm1, comp); - RandomAccessIterator i = first; - RandomAccessIterator j = lm1; - if (!comp(*i, *m)) { - bool restart_flag = false; - while (true) { - if (i == --j) { - ++i; - j = last; - if (!comp(*first, *--j)) { - while (true) { - if (i == j) { - return; - } - if (comp(*first, *i)) { - sprout::swap(*i, *j); - ++n_swaps; - ++i; - break; - } - ++i; - } - } - if (i == j) { - return; - } - while (true) { - while (!comp(*first, *i)) { - ++i; - } - while (comp(*first, *--j)) - ; - if (i >= j) { - break; - } - sprout::swap(*i, *j); - ++n_swaps; - ++i; - } - if (nth < i) { - return; - } - first = i; - restart_flag = true; - break; - } - if (comp(*j, *m)) { - sprout::swap(*i, *j); - ++n_swaps; - break; - } - } - if (restart_flag) { - continue; - } - } - ++i; - if (i < j) { - while (true) { - while (comp(*i, *m)) { - ++i; - } - while (!comp(*--j, *m)) - ; - if (i >= j) { - break; - } - sprout::swap(*i, *j); - ++n_swaps; - if (m == i) { - m = j; - } - ++i; - } - } - if (i != m && comp(*m, *i)) { - sprout::swap(*i, *m); - ++n_swaps; - } - if (nth == i) { - return; - } - do { - bool not_sorted_flag = false; - if (n_swaps == 0) { - if (nth < i) { - j = m = first; - while (++j != i) { - if (comp(*j, *m)) { - not_sorted_flag = true; - break; - } - m = j; - } - if (not_sorted_flag) { - break; - } - return; - } else { - j = m = i; - while (++j != last) { - if (comp(*j, *m)) { - not_sorted_flag = true; - break; - } - m = j; - } - if (not_sorted_flag) { - break; - } - return; - } - } - } while (false); - if (nth < i) { - last = i; - } else { - first = ++i; - } - } - } - } // namespace detail - // - // 25.4.2 Nth element - // - template - inline SPROUT_CXX14_CONSTEXPR void - nth_element(RandomAccessIterator first, RandomAccessIterator nth, RandomAccessIterator last, Compare comp) { - typedef typename std::add_lvalue_reference::type compare_ref; - sprout::detail::nth_element(first, nth, last, comp); - } - - template - inline SPROUT_CXX14_CONSTEXPR void - nth_element(RandomAccessIterator first, RandomAccessIterator nth, RandomAccessIterator last) { - sprout::nth_element( - first, nth, last, - NS_SSCRISK_CEL_OR_SPROUT::less::value_type>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_NTH_ELEMENT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/partial_sort.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/partial_sort.hpp deleted file mode 100644 index d8f0de9..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/partial_sort.hpp +++ /dev/null @@ -1,57 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_PARTIAL_SORT_HPP -#define SPROUT_ALGORITHM_CXX14_PARTIAL_SORT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace detail { - template - inline SPROUT_CXX14_CONSTEXPR void - partial_sort(RandomAccessIterator first, RandomAccessIterator middle, RandomAccessIterator last, Compare comp) { - typedef typename std::iterator_traits::difference_type difference_type; - sprout::detail::make_heap(first, middle, comp); - difference_type len = middle - first; - for (RandomAccessIterator i = middle; i != last; ++i) { - if (comp(*i, *first)) { - sprout::swap(*i, *first); - sprout::detail::push_heap_front(first, middle, comp, len); - } - } - sprout::detail::sort_heap(first, middle, comp); - } - } // namespace detail - // - // 25.4.1.3 partial_sort - // - template - inline SPROUT_CXX14_CONSTEXPR void - partial_sort(RandomAccessIterator first, RandomAccessIterator middle, RandomAccessIterator last, Compare comp) { - typedef typename std::add_lvalue_reference::type compare_ref; - sprout::detail::partial_sort(first, middle, last, comp); - } - - template - inline SPROUT_CXX14_CONSTEXPR void - partial_sort(RandomAccessIterator first, RandomAccessIterator middle, RandomAccessIterator last) { - sprout::partial_sort( - first, middle, last, - NS_SSCRISK_CEL_OR_SPROUT::less::value_type>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_PARTIAL_SORT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/partial_sort_copy.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/partial_sort_copy.hpp deleted file mode 100644 index e305231..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/partial_sort_copy.hpp +++ /dev/null @@ -1,63 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_PARTIAL_SORT_COPY_HPP -#define SPROUT_ALGORITHM_CXX14_PARTIAL_SORT_COPY_HPP - -#include -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace detail { - template - inline SPROUT_CXX14_CONSTEXPR RandomAccessIterator - partial_sort_copy(InputIterator first, InputIterator last, RandomAccessIterator result_first, RandomAccessIterator result_last, Compare comp) { - typedef typename std::iterator_traits::difference_type difference_type; - RandomAccessIterator r = result_first; - if (r != result_last) { - difference_type len = 0; - for (; first != last && r != result_last; ++first, ++r, ++len) { - *r = *first; - } - sprout::detail::make_heap(result_first, r, comp); - for (; first != last; ++first) { - if (comp(*first, *result_first)) { - *result_first = *first; - sprout::detail::push_heap_front(result_first, r, comp, len); - } - } - sprout::detail::sort_heap(result_first, r, comp); - } - return r; - } - } // namespace detail - // - // 25.4.1.4 partial_sort_copy - // - template - inline SPROUT_CXX14_CONSTEXPR RandomAccessIterator - partial_sort_copy(InputIterator first, InputIterator last, RandomAccessIterator result_first, RandomAccessIterator result_last, Compare comp) { - typedef typename std::add_lvalue_reference::type compare_ref; - return sprout::detail::partial_sort_copy(first, last, result_first, result_last, comp); - } - - template - inline SPROUT_CXX14_CONSTEXPR RandomAccessIterator - partial_sort_copy(InputIterator first, InputIterator last, RandomAccessIterator result_first, RandomAccessIterator result_last) { - return sprout::partial_sort_copy( - first, last, result_first, result_last, - NS_SSCRISK_CEL_OR_SPROUT::less::value_type>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_PARTIAL_SORT_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/partition.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/partition.hpp deleted file mode 100644 index 48835b5..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/partition.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_PARTITION_HPP -#define SPROUT_ALGORITHM_CXX14_PARTITION_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // 25.3.13 Partitions - // - template - inline SPROUT_CXX14_CONSTEXPR ForwardIterator - partition(ForwardIterator first, ForwardIterator last, Predicate pred) { - first = sprout::find_if_not(first, last, pred); - ForwardIterator it = sprout::find_if(first, last, pred); - while (it != last) { - sprout::iter_swap(first, it); - first = sprout::find_if_not(first, last, pred); - it = sprout::find_if(it, last, pred); - } - return first; - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_PARTITION_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/partition_copy.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/partition_copy.hpp deleted file mode 100644 index def2262..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/partition_copy.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_PARTITION_COPY_HPP -#define SPROUT_ALGORITHM_CXX14_PARTITION_COPY_HPP - -#include -#include - -namespace sprout { - // - // 25.3.13 Partitions - // - template - inline SPROUT_CXX14_CONSTEXPR sprout::pair - partition_copy(InputIterator first, InputIterator last, OutputIterator1 out_true, OutputIterator2 out_false, Predicate pred) { - for (; first != last; ++first) { - if (pred(*first)) { - *out_true++ = *first; - } else { - *out_false++ = *first; - } - } - return sprout::pair(out_true, out_false); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_PARTITION_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/pop_heap.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/pop_heap.hpp deleted file mode 100644 index 8b3c0cd..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/pop_heap.hpp +++ /dev/null @@ -1,53 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_POP_HEAP_HPP -#define SPROUT_ALGORITHM_CXX14_POP_HEAP_HPP - -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace detail { - template - inline SPROUT_CXX14_CONSTEXPR void - pop_heap( - RandomAccessIterator first, RandomAccessIterator last, Compare comp, - typename std::iterator_traits::difference_type len - ) - { - if (len > 1) { - sprout::swap(*first, *--last); - sprout::detail::push_heap_front(first, last, comp, len - 1); - } - } - } // namespace detail - // - // 25.4.6.2 pop_heap - // - template - inline SPROUT_CXX14_CONSTEXPR void - pop_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp) { - typedef typename std::add_lvalue_reference::type compare_ref; - sprout::detail::pop_heap(first, last, comp, last - first); - } - - template - inline SPROUT_CXX14_CONSTEXPR void - pop_heap(RandomAccessIterator first, RandomAccessIterator last) { - sprout::pop_heap( - first, last, - NS_SSCRISK_CEL_OR_SPROUT::less::value_type>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_POP_HEAP_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/prev_permutation.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/prev_permutation.hpp deleted file mode 100644 index d6947f2..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/prev_permutation.hpp +++ /dev/null @@ -1,64 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_PREV_PERMUTATION_HPP -#define SPROUT_ALGORITHM_CXX14_PREV_PERMUTATION_HPP - -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace detail { - template - inline SPROUT_CXX14_CONSTEXPR bool - prev_permutation(BidirectionalIterator first, BidirectionalIterator last, Compare comp) { - BidirectionalIterator i = last; - if (first == last || first == --i) { - return false; - } - while (true) { - BidirectionalIterator ip1 = i; - if (comp(*ip1, *--i)) { - BidirectionalIterator j = last; - while (!comp(*--j, *i)) - ; - sprout::swap(*i, *j); - sprout::reverse(ip1, last); - return true; - } - if (i == first) { - sprout::reverse(first, last); - return false; - } - } - } - } // namespace detail - // - // 25.4.9 Permutation generators - // - template - inline SPROUT_CXX14_CONSTEXPR bool - prev_permutation(BidirectionalIterator first, BidirectionalIterator last, Compare comp) { - typedef typename std::add_lvalue_reference::type compare_ref; - return sprout::detail::prev_permutation(first, last, comp); - } - - template - inline SPROUT_CXX14_CONSTEXPR bool - prev_permutation(BidirectionalIterator first, BidirectionalIterator last) { - return sprout::prev_permutation( - first, last, - NS_SSCRISK_CEL_OR_SPROUT::less::value_type>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_PREV_PERMUTATION_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/push_heap.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/push_heap.hpp deleted file mode 100644 index 6b2c4f9..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/push_heap.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_PUSH_HEAP_HPP -#define SPROUT_ALGORITHM_CXX14_PUSH_HEAP_HPP - -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - // - // 25.4.6.1 push_heap - // - template - inline SPROUT_CXX14_CONSTEXPR void - push_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp) { - typedef typename std::add_lvalue_reference::type compare_ref; - sprout::detail::push_heap_back(first, last, comp, last - first); - } - - template - inline SPROUT_CXX14_CONSTEXPR void - push_heap(RandomAccessIterator first, RandomAccessIterator last) { - sprout::push_heap( - first, last, - NS_SSCRISK_CEL_OR_SPROUT::less::value_type>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_PUSH_HEAP_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/random_shuffle.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/random_shuffle.hpp deleted file mode 100644 index 633c778..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/random_shuffle.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_RANDOM_SHUFFLE_HPP -#define SPROUT_ALGORITHM_CXX14_RANDOM_SHUFFLE_HPP - -#include -#include - -namespace sprout { - // - // 25.3.12 Random shuffle - // - template - inline SPROUT_CXX14_CONSTEXPR void - random_shuffle(RandomAccessIterator first, RandomAccessIterator last, RandomNumberGenerator&& rand) { - if (first == last) { - return; - } - for (auto it = first + 1; it != last; ++it) { - sprout::iter_swap(it, first + rand(it - first + 1)); - } - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_RANDOM_SHUFFLE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/random_swap.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/random_swap.hpp deleted file mode 100644 index 254189c..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/random_swap.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_RANDOM_SWAP_HPP -#define SPROUT_ALGORITHM_CXX14_RANDOM_SWAP_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // random_swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - random_swap(RandomAccessIterator first, RandomAccessIterator last, UniformRandomNumberGenerator&& g) { - typedef typename std::iterator_traits::difference_type difference_type; - typedef SPROUT_WORKAROUND_DETAIL_UNIFORM_INT_DISTRIBUTION distribution_type; - difference_type d = last - first; - if (d > 1) { - distribution_type dist(0, d); - difference_type i = dist(g); - difference_type j = dist(g); - if (i != j) { - sprout::iter_swap(first + i, first + j); - } - } - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_RANDOM_SWAP_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/remove.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/remove.hpp deleted file mode 100644 index 9c4287c..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/remove.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_REMOVE_HPP -#define SPROUT_ALGORITHM_CXX14_REMOVE_HPP - -#include -#include - -namespace sprout { - // - // 25.3.8 Remove - // - template - inline SPROUT_CXX14_CONSTEXPR ForwardIterator - remove(ForwardIterator first, ForwardIterator last, T const& value) { - ForwardIterator result = first; - for (; first != last; ++first) { - if (!(*first == value)) { - *result++ = sprout::move(*first); - } - } - return result; - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_REMOVE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/remove_copy.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/remove_copy.hpp deleted file mode 100644 index 900ed67..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/remove_copy.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_REMOVE_COPY_HPP -#define SPROUT_ALGORITHM_CXX14_REMOVE_COPY_HPP - -#include -#include -#include - -namespace sprout { - // - // 25.3.8 Remove - // - template< - typename InputIterator, typename OutputIterator, typename T, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - remove_copy(InputIterator first, InputIterator last, OutputIterator result, T const& value) { - for (; first != last; ++first) { - if (!(*first == value)) { - *result++ = *first; - } - } - return result; - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_REMOVE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/remove_copy_if.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/remove_copy_if.hpp deleted file mode 100644 index fa85b0e..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/remove_copy_if.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_REMOVE_COPY_IF_HPP -#define SPROUT_ALGORITHM_CXX14_REMOVE_COPY_IF_HPP - -#include -#include -#include - -namespace sprout { - // - // 25.3.8 Remove - // - template< - typename InputIterator, typename OutputIterator, typename Predicate, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - remove_copy_if(InputIterator first, InputIterator last, OutputIterator result, Predicate pred) { - for (; first != last; ++first) { - if (!pred(*first)) { - *result++ = *first; - } - } - return result; - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_REMOVE_COPY_IF_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/remove_if.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/remove_if.hpp deleted file mode 100644 index c9e1318..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/remove_if.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_REMOVE_IF_HPP -#define SPROUT_ALGORITHM_CXX14_REMOVE_IF_HPP - -#include -#include - -namespace sprout { - // - // 25.3.8 Remove - // - template - inline SPROUT_CXX14_CONSTEXPR ForwardIterator - remove_if(ForwardIterator first, ForwardIterator last, Predicate pred) { - ForwardIterator result = first; - for (; first != last; ++first) { - if (!pred(*first)) { - *result++ = sprout::move(*first); - } - } - return result; - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_REMOVE_IF_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/replace.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/replace.hpp deleted file mode 100644 index 745f8e8..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/replace.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_REPLACE_HPP -#define SPROUT_ALGORITHM_CXX14_REPLACE_HPP - -#include - -namespace sprout { - // - // 25.3.5 Replace - // - template - inline SPROUT_CXX14_CONSTEXPR void - replace(ForwardIterator first, ForwardIterator last, T const& old_value, T const& new_value) { - for (; first != last; ++first) { - if (*first == old_value) { - *first = new_value; - } - } - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_REPLACE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/replace_copy.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/replace_copy.hpp deleted file mode 100644 index a38798a..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/replace_copy.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_REPLACE_COPY_HPP -#define SPROUT_ALGORITHM_CXX14_REPLACE_COPY_HPP - -#include -#include -#include - -namespace sprout { - // - // 25.3.5 Replace - // - template< - typename InputIterator, typename OutputIterator, typename T, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - replace_copy(InputIterator first, InputIterator last, OutputIterator result, T const& old_value, T const& new_value) { - for (; first != last; ++first) { - *result++ = (*first == old_value ? new_value : *first); - } - return result; - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_REPLACE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/replace_copy_if.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/replace_copy_if.hpp deleted file mode 100644 index 3d778ec..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/replace_copy_if.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_REPLACE_COPY_IF_HPP -#define SPROUT_ALGORITHM_CXX14_REPLACE_COPY_IF_HPP - -#include -#include -#include - -namespace sprout { - // - // 25.3.5 Replace - // - template< - typename InputIterator, typename OutputIterator, typename Predicate, typename T, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - replace_copy_if(InputIterator first, InputIterator last, OutputIterator result, Predicate pred, T const& new_value) { - for (; first != last; ++first) { - *result++ = (pred(*first) ? new_value : *first); - } - return result; - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_REPLACE_COPY_IF_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/replace_if.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/replace_if.hpp deleted file mode 100644 index 8bc9e27..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/replace_if.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_REPLACE_IF_HPP -#define SPROUT_ALGORITHM_CXX14_REPLACE_IF_HPP - -#include - -namespace sprout { - // - // 25.3.5 Replace - // - template - inline SPROUT_CXX14_CONSTEXPR void - replace_if(ForwardIterator first, ForwardIterator last, Predicate pred, T const& new_value) { - for (; first != last; ++first) { - if (pred(*first)) { - *first = new_value; - } - } - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_REPLACE_IF_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/reverse.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/reverse.hpp deleted file mode 100644 index c6a318b..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/reverse.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_REVERSE_HPP -#define SPROUT_ALGORITHM_CXX14_REVERSE_HPP - -#include -#include - -namespace sprout { - // - // 25.3.10 Reverse - // - template - inline SPROUT_CXX14_CONSTEXPR void - reverse(BidirectionalIterator first, BidirectionalIterator last) { - for (; first != last && first != --last; ++first) { - sprout::iter_swap(first, last); - } - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_REVERSE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/reverse_copy.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/reverse_copy.hpp deleted file mode 100644 index 4c2c5b3..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/reverse_copy.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_REVERSE_COPY_HPP -#define SPROUT_ALGORITHM_CXX14_REVERSE_COPY_HPP - -#include -#include -#include - -namespace sprout { - // - // 25.3.10 Reverse - // - template< - typename BidirectionalIterator, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - reverse_copy(BidirectionalIterator first, BidirectionalIterator last, OutputIterator result) { - while (first != last) { - *result++ = *--last; - } - return result; - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_REVERSE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/rotate.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/rotate.hpp deleted file mode 100644 index 84d4309..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/rotate.hpp +++ /dev/null @@ -1,58 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_ROTATE_HPP -#define SPROUT_ALGORITHM_CXX14_ROTATE_HPP - -#include -#include -#include - -namespace sprout { - // - // 25.3.11 Rotate - // - template - inline SPROUT_CXX14_CONSTEXPR ForwardIterator - rotate(ForwardIterator first, ForwardIterator middle, ForwardIterator last) { - if (first == middle) { - return last; - } else if (middle == last) { - return first; - } - ForwardIterator first2 = middle; - while (true) { - sprout::iter_swap(first, first2); - ++first; - if (++first2 == last) { - break; - } - if (first == middle) { - middle = first2; - } - } - ForwardIterator result = first; - if (first != middle) { - first2 = middle; - while (true) { - sprout::iter_swap(first, first2); - ++first; - if (++first2 == last) { - if (first == middle) { - break; - } - first2 = middle; - } else if (first == middle) { - middle = first2; - } - } - } - return result; - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_ROTATE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/rotate_copy.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/rotate_copy.hpp deleted file mode 100644 index c5514d1..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/rotate_copy.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_ROTATE_COPY_HPP -#define SPROUT_ALGORITHM_CXX14_ROTATE_COPY_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // 25.3.11 Rotate - // - template< - typename ForwardIterator, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - rotate_copy(ForwardIterator first, ForwardIterator middle, ForwardIterator last, OutputIterator result) { - return sprout::copy(first, middle, sprout::copy(middle, last, result)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_ROTATE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/sample.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/sample.hpp deleted file mode 100644 index df06bc7..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/sample.hpp +++ /dev/null @@ -1,82 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_SAMPLE_HPP -#define SPROUT_ALGORITHM_CXX14_SAMPLE_HPP - -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace detail { - template - inline SPROUT_CXX14_CONSTEXPR SampleIterator - sample_impl( - PopulationIterator first, PopulationIterator last, std::input_iterator_tag*, - SampleIterator out, std::random_access_iterator_tag*, - Distance n, URNG&& g - ) - { - typedef SPROUT_WORKAROUND_DETAIL_UNIFORM_INT_DISTRIBUTION distribution_type; - typedef typename distribution_type::param_type param_type; - distribution_type dist = {}; - Distance sample_size = 0; - while (first != last && sample_size != n) { - out[sample_size++] = *first++; - } - for (Distance pop_size = sample_size; first != last; ++first, ++pop_size) { - param_type const p(0, pop_size); - Distance const k = dist(g, p); - if (k < n) { - out[k] = *first; - } - } - return out + sample_size; - } - template - inline SPROUT_CXX14_CONSTEXPR SampleIterator - sample_impl( - PopulationIterator first, PopulationIterator last, std::forward_iterator_tag*, - SampleIterator out, std::output_iterator_tag*, - Distance n, URNG&& g - ) - { - typedef SPROUT_WORKAROUND_DETAIL_UNIFORM_INT_DISTRIBUTION distribution_type; - typedef typename distribution_type::param_type param_type; - distribution_type dist = {}; - Distance unsampled_size = sprout::distance(first, last); - for (n = NS_SSCRISK_CEL_OR_SPROUT::min(n, unsampled_size); n != 0; ++first ) { - param_type const p(0, --unsampled_size); - if (dist(g, p) < n) { - *out++ = *first; - --n; - } - } - return out; - } - } // namespace detail - // - // sample - // - template - inline SPROUT_CXX14_CONSTEXPR SampleIterator - sample(PopulationIterator first, PopulationIterator last, SampleIterator out, Distance n, URNG&& g) { - typedef typename std::iterator_traits::iterator_category* pop_category; - typedef typename std::iterator_traits::iterator_category* sample_category; - return sprout::detail::sample_impl( - first, last, pop_category(), - out, sample_category(), - n, SPROUT_FORWARD(URNG, g) - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_SAMPLE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/set_difference.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/set_difference.hpp deleted file mode 100644 index f4b8b34..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/set_difference.hpp +++ /dev/null @@ -1,55 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_SET_DIFFERENCE_HPP -#define SPROUT_ALGORITHM_CXX14_SET_DIFFERENCE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // 25.4.5.4 set_difference - // - template< - typename InputIterator1, typename InputIterator2, typename OutputIterator, typename Compare, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - set_difference(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp) { - while (first1 != last1 && first2 != last2) { - if (comp(*first1, *first2)) { - *result = *first1; - ++first1; - ++result; - } else if (comp(*first2, *first1)) { - ++first2; - } else { - ++first1; - ++first2; - } - } - return sprout::copy(first1, last1, result); - } - - template< - typename InputIterator1, typename InputIterator2, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - set_difference(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result) { - return sprout::set_difference( - first1, last1, first2, last2, result, - sprout::less<>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_SET_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/set_intersection.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/set_intersection.hpp deleted file mode 100644 index cb7933c..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/set_intersection.hpp +++ /dev/null @@ -1,54 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_SET_INTERSECTION_HPP -#define SPROUT_ALGORITHM_CXX14_SET_INTERSECTION_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // 25.4.5.3 set_intersection - // - template< - typename InputIterator1, typename InputIterator2, typename OutputIterator, typename Compare, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - set_intersection(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp) { - while (first1 != last1 && first2 != last2) { - if (comp(*first1, *first2)) { - ++first1; - } else if (comp(*first2, *first1)) { - ++first2; - } else { - *result = *first1; - ++first1; - ++first2; - ++result; - } - } - return result; - } - - template< - typename InputIterator1, typename InputIterator2, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - set_intersection(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result) { - return sprout::set_intersection( - first1, last1, first2, last2, result, - sprout::less<>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_SET_INTERSECTION_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/set_symmetric_difference.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/set_symmetric_difference.hpp deleted file mode 100644 index 4683d97..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/set_symmetric_difference.hpp +++ /dev/null @@ -1,62 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_SET_SYMMETRIC_DIFFERENCE_HPP -#define SPROUT_ALGORITHM_CXX14_SET_SYMMETRIC_DIFFERENCE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // 25.4.5.5 set_symmetric_difference - // - template< - typename InputIterator1, typename InputIterator2, typename OutputIterator, typename Compare, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - set_symmetric_difference(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp) { - while (true) { - if (first1 == last1) { - return std::copy(first2, last2, result); - } - if (first2 == last2) { - return std::copy(first1, last1, result); - } - if (comp(*first1, *first2)) { - *result = *first1; - ++first1; - ++result; - } else if (comp(*first2, *first1)) { - *result = *first2; - ++first2; - ++result; - } else { - ++first1; - ++first2; - } - } - } - - template< - typename InputIterator1, typename InputIterator2, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - set_symmetric_difference(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result) { - return sprout::set_symmetric_difference( - first1, last1, first2, last2, result, - sprout::less<>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_SET_SYMMETRIC_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/set_union.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/set_union.hpp deleted file mode 100644 index 2ae3a2a..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/set_union.hpp +++ /dev/null @@ -1,62 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_SET_UNION_HPP -#define SPROUT_ALGORITHM_CXX14_SET_UNION_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // 25.4.5.2 set_union - // - template< - typename InputIterator1, typename InputIterator2, typename OutputIterator, typename Compare, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - set_union(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp) { - while (true) { - if (first1 == last1) { - return std::copy(first2, last2, result); - } - if (first2 == last2) { - return std::copy(first1, last1, result); - } - if (comp(*first1, *first2)) { - *result = *first1; - ++first1; - } else if (comp(*first2, *first1)) { - *result = *first2; - ++first2; - } else { - *result = *first1; - ++first1; - ++first2; - } - ++result; - } - } - - template< - typename InputIterator1, typename InputIterator2, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - set_union(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result) { - return sprout::set_union( - first1, last1, first2, last2, result, - sprout::less<>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_SET_UNION_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/shuffle.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/shuffle.hpp deleted file mode 100644 index b6fad3c..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/shuffle.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_SHUFFLE_HPP -#define SPROUT_ALGORITHM_CXX14_SHUFFLE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // 25.3.12 Random shuffle - // - template - inline SPROUT_CXX14_CONSTEXPR void - shuffle(RandomAccessIterator first, RandomAccessIterator last, UniformRandomNumberGenerator&& g) { - typedef typename std::iterator_traits::difference_type difference_type; - typedef SPROUT_WORKAROUND_DETAIL_UNIFORM_INT_DISTRIBUTION distribution_type; - typedef typename distribution_type::param_type param_type; - difference_type d = last - first; - if (d > 1) { - distribution_type dist; - for (--last, --d; first < last; ++first, --d) { - difference_type i = dist(g, param_type(0, d)); - if (i != difference_type(0)) { - sprout::iter_swap(first, first + i); - } - } - } - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_SHUFFLE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/sort.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/sort.hpp deleted file mode 100644 index f0957ef..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/sort.hpp +++ /dev/null @@ -1,199 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_SORT_HPP -#define SPROUT_ALGORITHM_CXX14_SORT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace detail { - template - SPROUT_CXX14_CONSTEXPR void - sort(RandomAccessIterator first, RandomAccessIterator last, Compare comp); - template - inline SPROUT_CXX14_CONSTEXPR bool - sort_impl(RandomAccessIterator first, RandomAccessIterator last, Compare comp) { - typedef typename std::decay::type iterator; - typedef typename std::iterator_traits::difference_type difference_type; - typedef typename std::iterator_traits::value_type value_type; - difference_type const limit - = sprout::is_trivially_copy_constructible::value && sprout::is_trivially_copy_assignable::value - ? 30 - : 6 - ; - difference_type len = last - first; - switch (len) { - case 0: - case 1: - return true; - case 2: - if (comp(*--last, *first)) { - sprout::swap(*first, *last); - } - return true; - case 3: - sprout::detail::sort3(first, first + 1, --last, comp); - return true; - case 4: - sprout::detail::sort4(first, first + 1, first + 2, --last, comp); - return true; - case 5: - sprout::detail::sort5(first, first + 1, first + 2, first + 3, --last, comp); - return true; - } - if (len <= limit) { - sprout::detail::insertion_sort_3(first, last, comp); - return true; - } - iterator m = first; - iterator lm1 = last; - --lm1; - unsigned n_swaps = 0; - { - difference_type delta = 0; - if (len >= 1000) { - delta = len / 2; - m += delta; - delta /= 2; - n_swaps = sprout::detail::sort5(first, first + delta, m, m + delta, lm1, comp); - } - else - { - delta = len / 2; - m += delta; - n_swaps = sprout::detail::sort3(first, m, lm1, comp); - } - } - iterator i = first; - iterator j = lm1; - if (!comp(*i, *m)) { - while (true) { - if (i == --j) { - ++i; - j = last; - if (!comp(*first, *--j)) { - while (true) { - if (i == j) { - return true; - } - if (comp(*first, *i)) { - sprout::swap(*i, *j); - ++n_swaps; - ++i; - break; - } - ++i; - } - } - if (i == j) { - return true; - } - while (true) { - while (!comp(*first, *i)) { - ++i; - } - while (comp(*first, *--j)) - ; - if (i >= j) { - break; - } - sprout::swap(*i, *j); - ++n_swaps; - ++i; - } - first = i; - return false; - } - if (comp(*j, *m)) { - sprout::swap(*i, *j); - ++n_swaps; - break; - } - } - } - ++i; - if (i < j) { - while (true) { - while (comp(*i, *m)) { - ++i; - } - while (!comp(*--j, *m)) - ; - if (i > j) { - break; - } - sprout::swap(*i, *j); - ++n_swaps; - if (m == i) { - m = j; - } - ++i; - } - } - if (i != m && comp(*m, *i)) { - sprout::swap(*i, *m); - ++n_swaps; - } - if (n_swaps == 0) { - bool fs = sprout::detail::insertion_sort_incomplete(first, i, comp); - if (sprout::detail::insertion_sort_incomplete(i + 1, last, comp)) { - if (fs) { - return true; - } - last = i; - return false; - } else if (fs) { - first = ++i; - return false; - } - } - if (i - first < last - i) { - sprout::detail::sort(first, i, comp); - first = ++i; - } else { - sprout::detail::sort(i + 1, last, comp); - last = i; - } - return false; - } - template - inline SPROUT_CXX14_CONSTEXPR void - sort(RandomAccessIterator first, RandomAccessIterator last, Compare comp) { - typedef typename std::add_lvalue_reference::type iter_ref; - while (!sprout::detail::sort_impl(first, last, comp)) - ; - } - } // namespace detail - // - // 25.4.1.1 sort - // - template - inline SPROUT_CXX14_CONSTEXPR void - sort(RandomAccessIterator first, RandomAccessIterator last, Compare comp) { - typedef typename std::add_lvalue_reference::type compare_ref; - sprout::detail::sort(first, last, comp); - } - - template - inline SPROUT_CXX14_CONSTEXPR void - sort(RandomAccessIterator first, RandomAccessIterator last) { - sprout::sort( - first, last, - NS_SSCRISK_CEL_OR_SPROUT::less::value_type>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_SORT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/sort_heap.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/sort_heap.hpp deleted file mode 100644 index ab51bd8..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/sort_heap.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_SORT_HEAP_HPP -#define SPROUT_ALGORITHM_CXX14_SORT_HEAP_HPP - -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace detail { - template - inline SPROUT_CXX14_CONSTEXPR void - sort_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp) { - typedef typename std::iterator_traits::difference_type difference_type; - difference_type len = last - first; - for (difference_type len = last - first; len > 1; --last, --len) { - sprout::detail::pop_heap(first, last, comp, len); - } - } - } // namespace detail - // - // 25.4.6.4 sort_heap - // - template - inline SPROUT_CXX14_CONSTEXPR void - sort_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp) { - typedef typename std::add_lvalue_reference::type compare_ref; - sprout::detail::sort_heap(first, last, comp); - } - - template - inline SPROUT_CXX14_CONSTEXPR void - sort_heap(RandomAccessIterator first, RandomAccessIterator last) { - sprout::sort_heap( - first, last, - NS_SSCRISK_CEL_OR_SPROUT::less::value_type>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_SORT_HEAP_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/stable_partition.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/stable_partition.hpp deleted file mode 100644 index 029bbb1..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/stable_partition.hpp +++ /dev/null @@ -1,52 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_STABLE_PARTITION_HPP -#define SPROUT_ALGORITHM_CXX14_STABLE_PARTITION_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CXX14_CONSTEXPR BidirectionalIterator - inplace_stable_partition(BidirectionalIterator first, Predicate pred, Distance len) { - if (len == 1) { - return first; - } - BidirectionalIterator middle = first; - sprout::advance(middle, len / 2); - BidirectionalIterator left_split = sprout::detail::inplace_stable_partition(first, pred, len / 2); - Distance right_len = len - len / 2; - BidirectionalIterator right_split = sprout::find_if_not(middle, sprout::next(middle, right_len), pred); - if (right_len) { - right_split = sprout::detail::inplace_stable_partition(middle, pred, right_len); - } - sprout::rotate(left_split, middle, right_split); - sprout::advance(left_split, sprout::distance(middle, right_split)); - return left_split; - } - } // namespace sprout - // - // 25.3.13 Partitions - // - template - inline SPROUT_CXX14_CONSTEXPR BidirectionalIterator - stable_partition(BidirectionalIterator first, BidirectionalIterator last, Predicate pred) { - first = sprout::find_if_not(first, last, pred); - return first == last ? first - : sprout::detail::inplace_stable_partition(first, pred, sprout::distance(first, last)) - ; - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_STABLE_PARTITION_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/stable_sort.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/stable_sort.hpp deleted file mode 100644 index 0b63e98..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/stable_sort.hpp +++ /dev/null @@ -1,50 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_STABLE_SORT_HPP -#define SPROUT_ALGORITHM_CXX14_STABLE_SORT_HPP - -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace detail { - template - inline SPROUT_CXX14_CONSTEXPR void - inplace_stable_sort(RandomAccessIterator first, RandomAccessIterator last, Compare comp) { - if (last - first < 15) { - sprout::detail::insertion_sort(first, last, comp); - return; - } - RandomAccessIterator middle = first + (last - first) / 2; - sprout::detail::inplace_stable_sort(first, middle, comp); - sprout::detail::inplace_stable_sort(middle, last, comp); - sprout::detail::inplace_merge(first, middle, last, middle - first, last - middle, comp); - } - } // namespace detail - // - // 25.4.1.2 stable_sort - // - template - inline SPROUT_CXX14_CONSTEXPR void - stable_sort(RandomAccessIterator first, RandomAccessIterator last, Compare comp) { - sprout::detail::inplace_stable_sort(first, last, comp); - } - - template - inline SPROUT_CXX14_CONSTEXPR void - stable_sort(RandomAccessIterator first, RandomAccessIterator last) { - sprout::stable_sort( - first, last, - NS_SSCRISK_CEL_OR_SPROUT::less::value_type>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_STABLE_SORT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/swap_ranges.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/swap_ranges.hpp deleted file mode 100644 index c808729..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/swap_ranges.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_SWAP_RANGES_HPP -#define SPROUT_ALGORITHM_CXX14_SWAP_RANGES_HPP - -#include -#include - -namespace sprout { - // - // 25.3.3 swap - // - template - inline SPROUT_CXX14_CONSTEXPR ForwardIterator2 - swap_ranges(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2) { - while (first1 != last1) { - sprout::iter_swap(first1++, first2++); - } - return first2; - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_SWAP_RANGES_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/transform.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/transform.hpp deleted file mode 100644 index c7c0ee9..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/transform.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_TRANSFORM_HPP -#define SPROUT_ALGORITHM_CXX14_TRANSFORM_HPP - -#include -#include -#include - -namespace sprout { - // - // 25.3.4 Transform - // - template< - typename InputIterator, typename OutputIterator, typename UnaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - transform(InputIterator first, InputIterator last, OutputIterator result, UnaryOperation op) { - while (first != last) { - *result++ = op(*first++); - } - return result; - } - template< - typename InputIterator1, typename InputIterator2, typename OutputIterator, typename BinaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - transform(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, OutputIterator result, BinaryOperation op) { - while (first1 != last1) { - *result++ = op(*first1++, *first2++); - } - return result; - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_TRANSFORM_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/unique.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/unique.hpp deleted file mode 100644 index ade3936..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/unique.hpp +++ /dev/null @@ -1,55 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_UNIQUE_HPP -#define SPROUT_ALGORITHM_CXX14_UNIQUE_HPP - -#include -#include -#include - -namespace sprout { - // - // 25.3.9 Unique - // - template - inline SPROUT_CXX14_CONSTEXPR ForwardIterator - unique(ForwardIterator first, ForwardIterator last) { - if (first == last) { - return first; - } - ForwardIterator result = first; - typename std::iterator_traits::value_type value = sprout::move(*first++); - for (; first != last; ++first) { - if (!(value == *first)) { - *result++ = sprout::move(value); - value = sprout::move(*first); - } - } - *result++ = sprout::move(value); - return result; - } - template - inline SPROUT_CXX14_CONSTEXPR ForwardIterator - unique(ForwardIterator first, ForwardIterator last, BinaryPredicate pred) { - if (first == last) { - return first; - } - ForwardIterator result = first; - typename std::iterator_traits::value_type value = sprout::move(*first++); - for (; first != last; ++first) { - if (!pred(value, *first)) { - *result++ = sprout::move(value); - value = sprout::move(*first); - } - } - *result++ = sprout::move(value); - return result; - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_UNIQUE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/cxx14/unique_copy.hpp b/dsp/lib/sprout/sprout/algorithm/cxx14/unique_copy.hpp deleted file mode 100644 index 3d3fc94..0000000 --- a/dsp/lib/sprout/sprout/algorithm/cxx14/unique_copy.hpp +++ /dev/null @@ -1,61 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_CXX14_UNIQUE_COPY_HPP -#define SPROUT_ALGORITHM_CXX14_UNIQUE_COPY_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // 25.3.9 Unique - // - template< - typename InputIterator, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - unique_copy(InputIterator first, InputIterator last, OutputIterator result) { - if (first == last) { - return result; - } - typename std::iterator_traits::value_type value = *first++; - *result++ = value; - for (; first != last; ++first) { - if (!(value == *first)) { - value = *first; - *result++ = value; - } - } - return result; - } - - template< - typename InputIterator, typename OutputIterator, typename BinaryPredicate, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - unique_copy(InputIterator first, InputIterator last, OutputIterator result, BinaryPredicate pred) { - if (first == last) { - return result; - } - typename std::iterator_traits::value_type value = *first++; - *result++ = value; - for (; first != last; ++first) { - if (!pred(value, *first)) { - value = *first; - *result++ = value; - } - } - return result; - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_CXX14_UNIQUE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/detail/max.hpp b/dsp/lib/sprout/sprout/algorithm/detail/max.hpp deleted file mode 100644 index b3796e1..0000000 --- a/dsp/lib/sprout/sprout/algorithm/detail/max.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_DETAIL_MAX_HPP -#define SPROUT_ALGORITHM_DETAIL_MAX_HPP - -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - - // 25.4.7 Minimum and maximum - template - inline SPROUT_CONSTEXPR T const& - max(T const& a, T const& b, Compare comp) { - return comp(a, b) ? b : a; - } - - template - inline SPROUT_CONSTEXPR T const& - max(T const& a, T const& b) { - return sprout::max(a, b, NS_SSCRISK_CEL_OR_SPROUT::less()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_DETAIL_MAX_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/detail/min.hpp b/dsp/lib/sprout/sprout/algorithm/detail/min.hpp deleted file mode 100644 index ed7bf25..0000000 --- a/dsp/lib/sprout/sprout/algorithm/detail/min.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_DETAIL_MIN_HPP -#define SPROUT_ALGORITHM_DETAIL_MIN_HPP - -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - - // 25.4.7 Minimum and maximum - template - inline SPROUT_CONSTEXPR T const& - min(T const& a, T const& b, Compare comp) { - return comp(b, a) ? b : a; - } - - template - inline SPROUT_CONSTEXPR T const& - min(T const& a, T const& b) { - return sprout::min(a, b, NS_SSCRISK_CEL_OR_SPROUT::less()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_DETAIL_MIN_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/equal.hpp b/dsp/lib/sprout/sprout/algorithm/equal.hpp deleted file mode 100644 index 71022b3..0000000 --- a/dsp/lib/sprout/sprout/algorithm/equal.hpp +++ /dev/null @@ -1,226 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_EQUAL_HPP -#define SPROUT_ALGORITHM_EQUAL_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR bool - equal_impl_ra( - RandomAccessIterator1 first1, RandomAccessIterator1 last1, RandomAccessIterator2 first2, BinaryPredicate pred, - typename std::iterator_traits::difference_type pivot - ) - { - return pivot == 0 ? pred(*first1, *first2) - : sprout::detail::equal_impl_ra( - first1, sprout::next(first1, pivot), first2, pred, - pivot / 2 - ) - && sprout::detail::equal_impl_ra( - sprout::next(first1, pivot), last1, sprout::next(first2, pivot), pred, - (sprout::distance(first1, last1) - pivot) / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value && sprout::is_constant_distance_iterator::value, - bool - >::type - equal( - RandomAccessIterator1 first1, RandomAccessIterator1 last1, RandomAccessIterator2 first2, BinaryPredicate pred, - std::random_access_iterator_tag* - ) - { - return first1 == last1 ? true - : sprout::detail::equal_impl_ra( - first1, last1, first2, pred, - sprout::distance(first1, last1) / 2 - ) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - equal_impl_1( - sprout::tuples::tuple const& current, - InputIterator1 last1, BinaryPredicate pred, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::tuples::tuple type; - return !sprout::tuples::get<2>(current) || sprout::tuples::get<0>(current) == last1 ? current - : n == 1 ? pred(*sprout::tuples::get<0>(current), *sprout::tuples::get<1>(current)) - ? type(sprout::next(sprout::tuples::get<0>(current)), sprout::next(sprout::tuples::get<1>(current)), true) - : type(sprout::tuples::get<0>(current), sprout::tuples::get<1>(current), false) - : sprout::detail::equal_impl_1( - sprout::detail::equal_impl_1( - current, - last1, pred, n / 2 - ), - last1, pred, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - equal_impl( - sprout::tuples::tuple const& current, - InputIterator1 last1, BinaryPredicate pred, typename std::iterator_traits::difference_type n - ) - { - return !sprout::tuples::get<2>(current) || sprout::tuples::get<0>(current) == last1 ? current - : sprout::detail::equal_impl( - sprout::detail::equal_impl_1( - current, - last1, pred, n - ), - last1, pred, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR bool - equal( - InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, BinaryPredicate pred, - std::input_iterator_tag* - ) - { - typedef sprout::tuples::tuple type; - return sprout::tuples::get<2>( - sprout::detail::equal_impl(type(first1, first2, true), last1, pred, 1) - ); - } - } // namespace detail - - // 25.2.11 Equal - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR bool - equal(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, BinaryPredicate pred) { - typedef typename sprout::common_iterator_category::type* category; - return sprout::detail::equal(first1, last1, first2, pred, category()); - } - template - inline SPROUT_CONSTEXPR bool - equal(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2) { - return sprout::equal(first1, last1, first2, sprout::equal_to<>()); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR bool - equal_impl_check(InputIterator1 last1, InputIterator2 last2, sprout::tuples::tuple const& current) { - return sprout::tuples::get<2>(current) && sprout::tuples::get<0>(current) == last1 && sprout::tuples::get<1>(current) == last2; - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value && sprout::is_constant_distance_iterator::value, - bool - >::type - equal( - RandomAccessIterator1 first1, RandomAccessIterator1 last1, RandomAccessIterator2 first2, RandomAccessIterator2 last2, BinaryPredicate pred, - std::random_access_iterator_tag* - ) - { - return sprout::distance(first1, last1) == sprout::distance(first2, last2) - && ( - first1 == last1 - || sprout::detail::equal_impl_ra( - first1, last1, first2, pred, - sprout::distance(first1, last1) / 2 - ) - ) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - equal2_impl_1( - sprout::tuples::tuple const& current, - InputIterator1 last1, InputIterator2 last2, BinaryPredicate pred, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::tuples::tuple type; - return !sprout::tuples::get<2>(current) || sprout::tuples::get<0>(current) == last1 || sprout::tuples::get<1>(current) == last2 ? current - : n == 1 ? pred(*sprout::tuples::get<0>(current), *sprout::tuples::get<1>(current)) - ? type(sprout::next(sprout::tuples::get<0>(current)), sprout::next(sprout::tuples::get<1>(current)), true) - : type(sprout::tuples::get<0>(current), sprout::tuples::get<1>(current), false) - : sprout::detail::equal2_impl_1( - sprout::detail::equal2_impl_1( - current, - last1, last2, pred, n / 2 - ), - last1, last2, pred, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - equal2_impl( - sprout::tuples::tuple const& current, - InputIterator1 last1, InputIterator2 last2, BinaryPredicate pred, typename std::iterator_traits::difference_type n - ) - { - return !sprout::tuples::get<2>(current) || sprout::tuples::get<0>(current) == last1 || sprout::tuples::get<1>(current) == last2 ? current - : sprout::detail::equal2_impl( - sprout::detail::equal2_impl_1( - current, - last1, last2, pred, n - ), - last1, last2, pred, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR bool - equal( - InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, BinaryPredicate pred, - std::input_iterator_tag* - ) - { - typedef sprout::tuples::tuple type; - return sprout::detail::equal_impl_check( - last1, last2, - sprout::detail::equal2_impl(type(first1, first2, true), last1, last2, pred, 1) - ); - } - } // namespace detail - - // 25.2.11 Equal - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR bool - equal(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, BinaryPredicate pred) { - typedef typename sprout::common_iterator_category::type* category; - return sprout::detail::equal(first1, last1, first2, last2, pred, category()); - } - template - inline SPROUT_CONSTEXPR bool - equal(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2) { - return sprout::equal(first1, last1, first2, last2, sprout::equal_to<>()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_EQUAL_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/equal_range.hpp b/dsp/lib/sprout/sprout/algorithm/equal_range.hpp deleted file mode 100644 index 1937324..0000000 --- a/dsp/lib/sprout/sprout/algorithm/equal_range.hpp +++ /dev/null @@ -1,62 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_EQUAL_RANGE_HPP -#define SPROUT_ALGORITHM_EQUAL_RANGE_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::pair - equal_range( - ForwardIterator const& first, typename std::iterator_traits::difference_type len, - T const& value, Compare comp - ) - { - return len == 0 ? sprout::pair(first, first) - : comp(*sprout::next(first, len / 2), value) - ? sprout::detail::equal_range(sprout::next(first, len / 2 + 1), len - (len / 2 + 1), value, comp) - : comp(value, *sprout::next(first, len / 2)) - ? sprout::detail::equal_range(first, len / 2, value, comp) - : sprout::pair( - sprout::detail::lower_bound(first, len / 2, value, comp), - sprout::detail::upper_bound(sprout::next(first, len / 2 + 1), len - (len / 2 + 1), value, comp) - ) - ; - } - } // namespace detail - - // 25.4.3.3 equal_range - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR sprout::pair - equal_range(ForwardIterator first, ForwardIterator last, T const& value, Compare comp) { - return sprout::detail::equal_range(first, sprout::distance(first, last), value, comp); - } - - template - inline SPROUT_CONSTEXPR sprout::pair - equal_range(ForwardIterator first, ForwardIterator last, T const& value) { - return sprout::equal_range(first, last, value, sprout::less<>()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_EQUAL_RANGE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fill.hpp b/dsp/lib/sprout/sprout/algorithm/fill.hpp deleted file mode 100644 index 2c23412..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fill.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FILL_HPP -#define SPROUT_ALGORITHM_FILL_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_FILL_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fill_n.hpp b/dsp/lib/sprout/sprout/algorithm/fill_n.hpp deleted file mode 100644 index 8b7a529..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fill_n.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FILL_N_HPP -#define SPROUT_ALGORITHM_FILL_N_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_FILL_N_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/find.hpp b/dsp/lib/sprout/sprout/algorithm/find.hpp deleted file mode 100644 index c510e80..0000000 --- a/dsp/lib/sprout/sprout/algorithm/find.hpp +++ /dev/null @@ -1,116 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIND_HPP -#define SPROUT_ALGORITHM_FIND_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR RandomAccessIterator - find_impl_ra( - RandomAccessIterator const& first, RandomAccessIterator const& last, T const& value, - typename std::iterator_traits::difference_type pivot, RandomAccessIterator const& found - ) - { - return found != first ? found - : pivot == 0 ? (*first == value ? first : last) - : sprout::detail::find_impl_ra( - sprout::next(first, pivot), last, value, - (sprout::distance(first, last) - pivot) / 2, - sprout::detail::find_impl_ra( - first, sprout::next(first, pivot), value, - pivot / 2, - first - ) - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - RandomAccessIterator - >::type - find( - RandomAccessIterator const& first, RandomAccessIterator const& last, T const& value, - std::random_access_iterator_tag* - ) - { - return first == last ? last - : sprout::detail::find_impl_ra(first, last, value, sprout::distance(first, last) / 2, first) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::pair - find_impl_1( - sprout::pair const& current, - InputIterator const& last, T const& value, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair type; - return current.second || current.first == last ? current - : n == 1 ? *current.first == value ? type(current.first, true) : type(sprout::next(current.first), false) - : sprout::detail::find_impl_1( - sprout::detail::find_impl_1( - current, - last, value, n / 2 - ), - last, value, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - find_impl( - sprout::pair const& current, - InputIterator const& last, T const& value, typename std::iterator_traits::difference_type n - ) - { - return current.second || current.first == last ? current - : sprout::detail::find_impl( - sprout::detail::find_impl_1( - current, - last, value, n - ), - last, value, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR InputIterator - find( - InputIterator const& first, InputIterator const& last, T const& value, - std::input_iterator_tag* - ) - { - typedef sprout::pair type; - return sprout::detail::find_impl(type(first, false), last, value, 1).first; - } - } // namespace detail - - // 25.2.5 Find - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR InputIterator - find(InputIterator first, InputIterator last, T const& value) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::detail::find(first, last, value, category()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIND_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/find_difference.hpp b/dsp/lib/sprout/sprout/algorithm/find_difference.hpp deleted file mode 100644 index 7d9d27a..0000000 --- a/dsp/lib/sprout/sprout/algorithm/find_difference.hpp +++ /dev/null @@ -1,122 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIND_DIFFERENCE_HPP -#define SPROUT_ALGORITHM_FIND_DIFFERENCE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::pair - find_difference_impl_check( - sprout::tuples::tuple const& current, - InputIterator1 last1, InputIterator2 last2 - ) - { - return sprout::tuples::get<2>(current) - ? sprout::pair( - sprout::tuples::get<0>(current), - sprout::tuples::get<1>(current) - ) - : sprout::pair(last1, last2) - ; - } - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - find_difference_impl_1( - sprout::tuples::tuple const& current, - InputIterator1 last1, InputIterator2 last2, Compare comp, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::tuples::tuple type; - return sprout::tuples::get<2>(current) || sprout::tuples::get<0>(current) == last1 ? current - : n == 1 ? sprout::tuples::get<1>(current) == last2 - ? type(sprout::tuples::get<0>(current), sprout::tuples::get<1>(current), true) - : comp(*sprout::tuples::get<0>(current), *sprout::tuples::get<1>(current)) - ? type(sprout::tuples::get<0>(current), sprout::tuples::get<1>(current), true) - : comp(*sprout::tuples::get<1>(current), *sprout::tuples::get<0>(current)) - ? type(sprout::tuples::get<0>(current), sprout::next(sprout::tuples::get<1>(current)), false) - : type(sprout::next(sprout::tuples::get<0>(current)), sprout::next(sprout::tuples::get<1>(current)), false) - : sprout::detail::find_difference_impl_1( - sprout::detail::find_difference_impl_1( - current, - last1, last2, comp, n / 2 - ), - last1, last2, comp, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - find_difference_impl( - sprout::tuples::tuple const& current, - InputIterator1 last1, InputIterator2 last2, Compare comp, typename std::iterator_traits::difference_type n - ) - { - return sprout::tuples::get<2>(current) || sprout::tuples::get<0>(current) == last1 ? current - : sprout::detail::find_difference_impl( - sprout::detail::find_difference_impl_1( - current, - last1, last2, comp, n - ), - last1, last2, comp, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - find_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Compare comp - ) - { - typedef sprout::tuples::tuple type; - return sprout::detail::find_difference_impl_check( - sprout::detail::find_difference_impl(type(first1, first2, false), last1, last2, comp, 1), - last1, last2 - ); - } - } // namespace detail - - // - // find_difference - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR sprout::pair - find_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Compare comp - ) - { - return sprout::detail::find_difference(first1, last1, first2, last2, comp); - } - template - inline SPROUT_CONSTEXPR sprout::pair - find_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2 - ) - { - return sprout::find_difference(first1, last1, first2, last2, sprout::less<>()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIND_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/find_end.hpp b/dsp/lib/sprout/sprout/algorithm/find_end.hpp deleted file mode 100644 index 9a0408e..0000000 --- a/dsp/lib/sprout/sprout/algorithm/find_end.hpp +++ /dev/null @@ -1,252 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIND_END_HPP -#define SPROUT_ALGORITHM_FIND_END_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR RandomAccessIterator1 - find_end_impl_check_ra(RandomAccessIterator1 first1, RandomAccessIterator1 last1_, RandomAccessIterator1 searched) { - return searched == first1 ? searched - : last1_ - ; - } - template - inline SPROUT_CONSTEXPR RandomAccessIterator1 - find_end_impl_ra( - RandomAccessIterator1 first1, RandomAccessIterator1 last1, - RandomAccessIterator2 first2, RandomAccessIterator2 last2, - BinaryPredicate pred, - typename std::iterator_traits::difference_type pivot, RandomAccessIterator1 last1_, - RandomAccessIterator1 searched - ) - { - return searched != last1_ ? searched - : pivot == 0 - ? sprout::detail::find_end_impl_check_ra( - first1, last1_, - sprout::detail::search_one(first1, last1_, first2, last2, pred) - ) - : sprout::detail::find_end_impl_ra( - first1, sprout::next(first1, pivot), first2, last2, pred, - pivot / 2, last1_, - sprout::detail::find_end_impl_ra( - sprout::next(first1, pivot), last1, first2, last2, pred, - (sprout::distance(first1, last1) - pivot) / 2, last1_, - last1_ - ) - ) - ; - } - template - inline SPROUT_CONSTEXPR RandomAccessIterator1 - find_end_impl_ra1( - RandomAccessIterator1 first1, RandomAccessIterator1 last1, - RandomAccessIterator2 first2, RandomAccessIterator2 last2, - BinaryPredicate pred, - typename std::iterator_traits::difference_type len1, - typename std::iterator_traits::difference_type len2 - ) - { - return len1 < len2 ? last1 - : sprout::detail::find_end_impl_ra( - first1, last1 - len2 + 1, first2, last2, pred, - (len1 - len2 + 1) / 2, last1, last1 - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value && sprout::is_constant_distance_iterator::value, - RandomAccessIterator1 - >::type - find_end( - RandomAccessIterator1 first1, RandomAccessIterator1 last1, - RandomAccessIterator2 first2, RandomAccessIterator2 last2, - BinaryPredicate pred, - std::random_access_iterator_tag* - ) - { - return sprout::detail::find_end_impl_ra1( - first1, last1, first2, last2, pred, - sprout::distance(first1, last1), sprout::distance(first2, last2) - ) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::pair - find_end_impl_check_bi( - sprout::pair const& current, - BidirectionalIterator1 first1, sprout::pair searched - ) - { - typedef sprout::pair type; - return searched.second ? type(first1, current.second) - : searched.first == current.first ? type(sprout::prev(current.first), current.second) - : type(current.first, searched.first) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - find_end_impl_bi1( - sprout::pair const& current, - BidirectionalIterator1 first1, BidirectionalIterator1 last1, - BidirectionalIterator2 first2, BidirectionalIterator2 last2, BinaryPredicate pred, - typename std::iterator_traits::difference_type n - ) - { - return current.second != last1 || current.first == first1 ? current - : n == 1 ? sprout::detail::find_end_impl_check_bi( - current, first1, - sprout::detail::search_one_rev(first1, current.first, first2, last2, pred) - ) - : sprout::detail::find_end_impl_bi1( - sprout::detail::find_end_impl_bi1( - current, - first1, last1, first2, last2, pred, n / 2 - ), - first1, last1, first2, last2, pred, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - find_end_impl_bi( - sprout::pair const& current, - BidirectionalIterator1 first1, BidirectionalIterator1 last1, - BidirectionalIterator2 first2, BidirectionalIterator2 last2, BinaryPredicate pred, - typename std::iterator_traits::difference_type n - ) - { - return current.second != last1 || current.first == first1 ? current - : sprout::detail::find_end_impl_bi( - sprout::detail::find_end_impl_bi1( - current, - first1, last1, first2, last2, pred, n - ), - first1, last1, first2, last2, pred, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR BidirectionalIterator1 - find_end( - BidirectionalIterator1 first1, BidirectionalIterator1 last1, - BidirectionalIterator2 first2, BidirectionalIterator2 last2, - BinaryPredicate pred, - std::bidirectional_iterator_tag* - ) - { - typedef sprout::pair type; - return sprout::detail::find_end_impl_bi(type(last1, last1), first1, last1, first2, last2, pred, 1).second; - } - - template - inline SPROUT_CONSTEXPR sprout::pair - find_end_impl_check(sprout::pair const& current, ForwardIterator1 last1, ForwardIterator1 searched) { - typedef sprout::pair type; - return searched == current.first ? type(sprout::next(current.first), searched) - : searched == last1 ? type(last1, current.second) - : type(sprout::next(current.first), current.second) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - find_end_impl_1( - sprout::pair const& current, - ForwardIterator1 last1, ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred, - typename std::iterator_traits::difference_type n - ) - { - return current.first == last1 ? current - : n == 1 ? sprout::detail::find_end_impl_check( - current, last1, - sprout::detail::search_one(current.first, last1, first2, last2, pred) - ) - : sprout::detail::find_end_impl_1( - sprout::detail::find_end_impl_1( - current, - last1, first2, last2, pred, n / 2 - ), - last1, first2, last2, pred, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - find_end_impl( - sprout::pair const& current, - ForwardIterator1 last1, ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred, - typename std::iterator_traits::difference_type n - ) - { - return current.first == last1 ? current - : sprout::detail::find_end_impl( - sprout::detail::find_end_impl_1( - current, - last1, first2, last2, pred, n - ), - last1, first2, last2, pred, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR ForwardIterator1 - find_end( - ForwardIterator1 first1, ForwardIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2, - BinaryPredicate pred, - std::forward_iterator_tag* - ) - { - typedef sprout::pair type; - return sprout::detail::find_end_impl(type(first1, last1), last1, first2, last2, pred, 1).second; - } - } // namespace detail - - // 25.2.6 Find end - // - // recursion depth: - // O(log(N1+N2)) - // - template - inline SPROUT_CONSTEXPR ForwardIterator1 - find_end( - ForwardIterator1 first1, ForwardIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2, - BinaryPredicate pred - ) - { - typedef typename sprout::common_iterator_category::type* category; - return first1 == last1 || first2 == last2 ? last1 : sprout::detail::find_end(first1, last1, first2, last2, pred, category()); - } - - template - inline SPROUT_CONSTEXPR ForwardIterator1 - find_end( - ForwardIterator1 first1, ForwardIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2 - ) - { - return sprout::find_end(first1, last1, first2, last2, sprout::equal_to<>()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIND_END_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/find_first_of.hpp b/dsp/lib/sprout/sprout/algorithm/find_first_of.hpp deleted file mode 100644 index 317660a..0000000 --- a/dsp/lib/sprout/sprout/algorithm/find_first_of.hpp +++ /dev/null @@ -1,147 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIND_FIRST_OF_HPP -#define SPROUT_ALGORITHM_FIND_FIRST_OF_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR RandomAccessIterator1 - find_first_of_impl_ra( - RandomAccessIterator1 first1, RandomAccessIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2, - BinaryPredicate pred, - typename std::iterator_traits::difference_type pivot, RandomAccessIterator1 found - ) - { - return found != first1 ? found - : pivot == 0 ? sprout::find_if(first2, last2, sprout::bind1st(pred, *first1)) != last2 ? first1 : last1 - : sprout::detail::find_first_of_impl_ra( - sprout::next(first1, pivot), last1, first2, last2, pred, - (sprout::distance(first1, last1) - pivot) / 2, - sprout::detail::find_first_of_impl_ra( - first1, sprout::next(first1, pivot), first2, last2, pred, - pivot / 2, - first1 - ) - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - RandomAccessIterator1 - >::type - find_first_of( - RandomAccessIterator1 first1, RandomAccessIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2, - BinaryPredicate pred, - std::random_access_iterator_tag* - ) - { - return first1 == last1 ? last1 - : sprout::detail::find_first_of_impl_ra( - first1, last1, first2, last2, - pred, sprout::distance(first1, last1) / 2, first1 - ) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::pair - find_first_of_impl_1( - sprout::pair current, - InputIterator1 last1, ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred, - typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair type; - return current.second || current.first == last1 ? current - : n == 1 ? sprout::find_if(first2, last2, sprout::bind1st(pred, *current.first)) != last2 - ? type(current.first, true) - : type(sprout::next(current.first), false) - : sprout::detail::find_first_of_impl_1( - sprout::detail::find_first_of_impl_1( - current, - last1, first2, last2, pred, n / 2 - ), - last1, first2, last2, pred, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - find_first_of_impl( - sprout::pair current, - InputIterator1 last1, ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred, - typename std::iterator_traits::difference_type n - ) - { - return current.second || current.first == last1 ? current - : sprout::detail::find_first_of_impl( - sprout::detail::find_first_of_impl_1( - current, - last1, first2, last2, pred, n - ), - last1, first2, last2, pred, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR InputIterator1 - find_first_of( - InputIterator1 first1, InputIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2, - BinaryPredicate pred, - std::input_iterator_tag* - ) - { - typedef sprout::pair type; - return sprout::detail::find_first_of_impl(type(first1, false), last1, first2, last2, pred, 1).first; - } - } // namespace detail - - // 25.2.7 Find first - // - // recursion depth: - // O(log(N1+N2)) - // - template - inline SPROUT_CONSTEXPR InputIterator1 - find_first_of( - InputIterator1 first1, InputIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2, - BinaryPredicate pred - ) - { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::detail::find_first_of(first1, last1, first2, last2, pred, category()); - } - - template - inline SPROUT_CONSTEXPR InputIterator1 - find_first_of( - InputIterator1 first1, InputIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2 - ) - { - return sprout::find_first_of(first1, last1, first2, last2, sprout::equal_to<>()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIND_FIRST_OF_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/find_if.hpp b/dsp/lib/sprout/sprout/algorithm/find_if.hpp deleted file mode 100644 index e585bb1..0000000 --- a/dsp/lib/sprout/sprout/algorithm/find_if.hpp +++ /dev/null @@ -1,116 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIND_IF_HPP -#define SPROUT_ALGORITHM_FIND_IF_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR RandomAccessIterator - find_if_impl_ra( - RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred, - typename std::iterator_traits::difference_type pivot, RandomAccessIterator const& found - ) - { - return found != first ? found - : pivot == 0 ? (pred(*first) ? first : last) - : sprout::detail::find_if_impl_ra( - sprout::next(first, pivot), last, pred, - (sprout::distance(first, last) - pivot) / 2, - sprout::detail::find_if_impl_ra( - first, sprout::next(first, pivot), pred, - pivot / 2, - first - ) - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - RandomAccessIterator - >::type - find_if( - RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred, - std::random_access_iterator_tag* - ) - { - return first == last ? last - : sprout::detail::find_if_impl_ra(first, last, pred, sprout::distance(first, last) / 2, first) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::pair - find_if_impl_1( - sprout::pair const& current, - InputIterator const& last, Predicate pred, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair type; - return current.second || current.first == last ? current - : n == 1 ? pred(*current.first) ? type(current.first, true) : type(sprout::next(current.first), false) - : sprout::detail::find_if_impl_1( - sprout::detail::find_if_impl_1( - current, - last, pred, n / 2 - ), - last, pred, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - find_if_impl( - sprout::pair const& current, - InputIterator const& last, Predicate pred, typename std::iterator_traits::difference_type n - ) - { - return current.second || current.first == last ? current - : sprout::detail::find_if_impl( - sprout::detail::find_if_impl_1( - current, - last, pred, n - ), - last, pred, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR InputIterator - find_if( - InputIterator const& first, InputIterator const& last, Predicate pred, - std::input_iterator_tag* - ) - { - typedef sprout::pair type; - return sprout::detail::find_if_impl(type(first, false), last, pred, 1).first; - } - } // namespace detail - - // 25.2.5 Find - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR InputIterator - find_if(InputIterator first, InputIterator last, Predicate pred) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::detail::find_if(first, last, pred, category()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIND_IF_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/find_if_not.hpp b/dsp/lib/sprout/sprout/algorithm/find_if_not.hpp deleted file mode 100644 index 0632441..0000000 --- a/dsp/lib/sprout/sprout/algorithm/find_if_not.hpp +++ /dev/null @@ -1,116 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIND_IF_NOT_HPP -#define SPROUT_ALGORITHM_FIND_IF_NOT_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR RandomAccessIterator - find_if_not_impl_ra( - RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred, - typename std::iterator_traits::difference_type pivot, RandomAccessIterator const& found - ) - { - return found != first ? found - : pivot == 0 ? (!pred(*first) ? first : last) - : sprout::detail::find_if_not_impl_ra( - sprout::next(first, pivot), last, pred, - (sprout::distance(first, last) - pivot) / 2, - sprout::detail::find_if_not_impl_ra( - first, sprout::next(first, pivot), pred, - pivot / 2, - first - ) - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - RandomAccessIterator - >::type - find_if_not( - RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred, - std::random_access_iterator_tag* - ) - { - return first == last ? last - : sprout::detail::find_if_not_impl_ra(first, last, pred, sprout::distance(first, last) / 2, first) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::pair - find_if_not_impl_1( - sprout::pair const& current, - InputIterator const& last, Predicate pred, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair type; - return current.second || current.first == last ? current - : n == 1 ? !pred(*current.first) ? type(current.first, true) : type(sprout::next(current.first), false) - : sprout::detail::find_if_not_impl_1( - sprout::detail::find_if_not_impl_1( - current, - last, pred, n / 2 - ), - last, pred, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - find_if_not_impl( - sprout::pair const& current, - InputIterator const& last, Predicate pred, typename std::iterator_traits::difference_type n - ) - { - return current.second || current.first == last ? current - : sprout::detail::find_if_not_impl( - sprout::detail::find_if_not_impl_1( - current, - last, pred, n - ), - last, pred, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR InputIterator - find_if_not( - InputIterator const& first, InputIterator const& last, Predicate pred, - std::input_iterator_tag* - ) - { - typedef sprout::pair type; - return sprout::detail::find_if_not_impl(type(first, false), last, pred, 1).first; - } - } // namespace detail - - // 25.2.5 Find - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR InputIterator - find_if_not(InputIterator first, InputIterator last, Predicate pred) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::detail::find_if_not(first, last, pred, category()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIND_IF_NOT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/find_intersection.hpp b/dsp/lib/sprout/sprout/algorithm/find_intersection.hpp deleted file mode 100644 index db2dfb5..0000000 --- a/dsp/lib/sprout/sprout/algorithm/find_intersection.hpp +++ /dev/null @@ -1,120 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIND_INTERSECTION_HPP -#define SPROUT_ALGORITHM_FIND_INTERSECTION_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::pair - find_intersection_impl_check( - sprout::tuples::tuple const& current, - InputIterator1 last1, InputIterator2 last2 - ) - { - return sprout::tuples::get<2>(current) - ? sprout::pair( - sprout::tuples::get<0>(current), - sprout::tuples::get<1>(current) - ) - : sprout::pair(last1, last2) - ; - } - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - find_intersection_impl_1( - sprout::tuples::tuple const& current, - InputIterator1 last1, InputIterator2 last2, Compare comp, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::tuples::tuple type; - return sprout::tuples::get<2>(current) || sprout::tuples::get<0>(current) == last1 || sprout::tuples::get<1>(current) == last2 ? current - : n == 1 ? comp(*sprout::tuples::get<0>(current), *sprout::tuples::get<1>(current)) - ? type(sprout::next(sprout::tuples::get<0>(current)), sprout::tuples::get<1>(current), false) - : comp(*sprout::tuples::get<1>(current), *sprout::tuples::get<0>(current)) - ? type(sprout::tuples::get<0>(current), sprout::next(sprout::tuples::get<1>(current)), false) - : type(sprout::tuples::get<0>(current), sprout::tuples::get<1>(current), true) - : sprout::detail::find_intersection_impl_1( - sprout::detail::find_intersection_impl_1( - current, - last1, last2, comp, n / 2 - ), - last1, last2, comp, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - find_intersection_impl( - sprout::tuples::tuple const& current, - InputIterator1 last1, InputIterator2 last2, Compare comp, typename std::iterator_traits::difference_type n - ) - { - return sprout::tuples::get<2>(current) || sprout::tuples::get<0>(current) == last1 || sprout::tuples::get<1>(current) == last2 ? current - : sprout::detail::find_intersection_impl( - sprout::detail::find_intersection_impl_1( - current, - last1, last2, comp, n - ), - last1, last2, comp, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - find_intersection( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Compare comp - ) - { - typedef sprout::tuples::tuple type; - return sprout::detail::find_intersection_impl_check( - sprout::detail::find_intersection_impl(type(first1, first2, false), last1, last2, comp, 1), - last1, last2 - ); - } - } // namespace detail - - // - // find_intersection - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR sprout::pair - find_intersection( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Compare comp - ) - { - return sprout::detail::find_intersection(first1, last1, first2, last2, comp); - } - template - inline SPROUT_CONSTEXPR sprout::pair - find_intersection( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2 - ) - { - return sprout::find_intersection(first1, last1, first2, last2, sprout::less<>()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIND_INTERSECTION_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/find_symmetric_difference.hpp b/dsp/lib/sprout/sprout/algorithm/find_symmetric_difference.hpp deleted file mode 100644 index 957ae8b..0000000 --- a/dsp/lib/sprout/sprout/algorithm/find_symmetric_difference.hpp +++ /dev/null @@ -1,110 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIND_SYMMETRIC_DIFFERENCE_HPP -#define SPROUT_ALGORITHM_FIND_SYMMETRIC_DIFFERENCE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::pair - find_symmetric_difference_impl_check(sprout::tuples::tuple const& current) { - return sprout::pair( - sprout::tuples::get<0>(current), - sprout::tuples::get<1>(current) - ); - } - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - find_symmetric_difference_impl_1( - sprout::tuples::tuple const& current, - InputIterator1 last1, InputIterator2 last2, Compare comp, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::tuples::tuple type; - return sprout::tuples::get<2>(current) || sprout::tuples::get<0>(current) == last1 || sprout::tuples::get<1>(current) == last2 ? current - : n == 1 ? comp(*sprout::tuples::get<0>(current), *sprout::tuples::get<1>(current)) || comp(*sprout::tuples::get<1>(current), *sprout::tuples::get<0>(current)) - ? type(sprout::tuples::get<0>(current), sprout::tuples::get<1>(current), true) - : type(sprout::next(sprout::tuples::get<0>(current)), sprout::next(sprout::tuples::get<1>(current)), false) - : sprout::detail::find_symmetric_difference_impl_1( - sprout::detail::find_symmetric_difference_impl_1( - current, - last1, last2, comp, n / 2 - ), - last1, last2, comp, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - find_symmetric_difference_impl( - sprout::tuples::tuple const& current, - InputIterator1 last1, InputIterator2 last2, Compare comp, typename std::iterator_traits::difference_type n - ) - { - return sprout::tuples::get<2>(current) || sprout::tuples::get<0>(current) == last1 || sprout::tuples::get<1>(current) == last2 ? current - : sprout::detail::find_symmetric_difference_impl( - sprout::detail::find_symmetric_difference_impl_1( - current, - last1, last2, comp, n - ), - last1, last2, comp, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - find_symmetric_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Compare comp - ) - { - typedef sprout::tuples::tuple type; - return sprout::detail::find_symmetric_difference_impl_check( - sprout::detail::find_symmetric_difference_impl(type(first1, first2, false), last1, last2, comp, 1) - ); - } - } // namespace detail - - // - // find_symmetric_difference - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR sprout::pair - find_symmetric_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Compare comp - ) - { - return sprout::detail::find_symmetric_difference(first1, last1, first2, last2, comp); - } - template - inline SPROUT_CONSTEXPR sprout::pair - find_symmetric_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2 - ) - { - return sprout::find_symmetric_difference(first1, last1, first2, last2, sprout::less<>()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIND_SYMMETRIC_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit.hpp b/dsp/lib/sprout/sprout/algorithm/fit.hpp deleted file mode 100644 index d8a1c28..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit.hpp +++ /dev/null @@ -1,75 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_HPP -#define SPROUT_ALGORITHM_FIT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_FIT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/bogo_sort.hpp b/dsp/lib/sprout/sprout/algorithm/fit/bogo_sort.hpp deleted file mode 100644 index 4c178bc..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/bogo_sort.hpp +++ /dev/null @@ -1,77 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_BOGO_SORT_HPP -#define SPROUT_ALGORITHM_FIT_BOGO_SORT_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - bogo_sort_impl( - Container const& cont, UniformRandomNumberGenerator&& g, Compare comp, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::bogo_sort(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), comp)), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // bogo_sort - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - bogo_sort(Container const& cont, UniformRandomNumberGenerator&& g, Compare comp) { - return sprout::fit::detail::bogo_sort_impl( - cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), comp, - sprout::internal_begin_offset(cont) - ); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - bogo_sort_impl( - Container const& cont, UniformRandomNumberGenerator&& g, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::bogo_sort(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g))), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // bogo_sort - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - bogo_sort(Container const& cont, UniformRandomNumberGenerator&& g) { - return sprout::fit::detail::bogo_sort_impl( - cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), - sprout::internal_begin_offset(cont) - ); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_BOGO_SORT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/bogo_sort_result.hpp b/dsp/lib/sprout/sprout/algorithm/fit/bogo_sort_result.hpp deleted file mode 100644 index 4d4a8d7..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/bogo_sort_result.hpp +++ /dev/null @@ -1,112 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_BOGO_SORT_RESULT_HPP -#define SPROUT_ALGORITHM_FIT_BOGO_SORT_RESULT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple< - typename sprout::fit::results::algorithm::type, - typename std::decay::type - > - bogo_sort_result_impl_1( - Sorted const& sorted, - typename sprout::container_traits::difference_type offset - ) - { - typedef sprout::tuples::tuple< - typename sprout::fit::results::algorithm::type, - typename std::decay::type - > result_type; - return result_type( - sprout::sub_copy( - sprout::get_internal(sprout::tuples::get<0>(sorted)), - offset, - offset + sprout::size(sprout::tuples::get<0>(sorted)) - ), - sprout::tuples::get<1>(sorted) - ); - } - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple< - typename sprout::fit::results::algorithm::type, - typename std::decay::type - > - bogo_sort_result_impl( - Container const& cont, UniformRandomNumberGenerator&& g, Compare comp, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::fit::detail::bogo_sort_result_impl_1( - sprout::fixed::bogo_sort_result(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), comp), - offset - ); - } - } // namespace detail - // - // bogo_sort_result - // - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple< - typename sprout::fit::results::algorithm::type, - typename std::decay::type - > bogo_sort_result(Container const& cont, UniformRandomNumberGenerator&& g, Compare comp) { - return sprout::fit::detail::bogo_sort_result_impl( - cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), comp, - sprout::internal_begin_offset(cont) - ); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple< - typename sprout::fit::results::algorithm::type, - typename std::decay::type - > - bogo_sort_result_impl( - Container const& cont, UniformRandomNumberGenerator&& g, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::fit::detail::bogo_sort_result_impl_1( - sprout::fixed::bogo_sort_result(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g)), - offset - ); - } - } // namespace detail - // - // bogo_sort_result - // - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple< - typename sprout::fit::results::algorithm::type, - typename std::decay::type - > - bogo_sort_result(Container const& cont, UniformRandomNumberGenerator&& g) { - return sprout::fit::detail::bogo_sort_result_impl( - cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), - sprout::internal_begin_offset(cont) - ); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_BOGO_SORT_RESULT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/bozo_sort.hpp b/dsp/lib/sprout/sprout/algorithm/fit/bozo_sort.hpp deleted file mode 100644 index a7cf0b9..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/bozo_sort.hpp +++ /dev/null @@ -1,77 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_BOZO_SORT_HPP -#define SPROUT_ALGORITHM_FIT_BOZO_SORT_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - bozo_sort_impl( - Container const& cont, UniformRandomNumberGenerator&& g, Compare comp, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::bozo_sort(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), comp)), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // bozo_sort - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - bozo_sort(Container const& cont, UniformRandomNumberGenerator&& g, Compare comp) { - return sprout::fit::detail::bozo_sort_impl( - cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), comp, - sprout::internal_begin_offset(cont) - ); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - bozo_sort_impl( - Container const& cont, UniformRandomNumberGenerator&& g, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::bozo_sort(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g))), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // bozo_sort - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - bozo_sort(Container const& cont, UniformRandomNumberGenerator&& g) { - return sprout::fit::detail::bozo_sort_impl( - cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), - sprout::internal_begin_offset(cont) - ); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_BOZO_SORT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/bozo_sort_result.hpp b/dsp/lib/sprout/sprout/algorithm/fit/bozo_sort_result.hpp deleted file mode 100644 index 3ba76fa..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/bozo_sort_result.hpp +++ /dev/null @@ -1,113 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_BOZO_SORT_RESULT_HPP -#define SPROUT_ALGORITHM_FIT_BOZO_SORT_RESULT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple< - typename sprout::fit::results::algorithm::type, - typename std::decay::type - > - bozo_sort_result_impl_1( - Sorted const& sorted, - typename sprout::container_traits::difference_type offset - ) - { - typedef sprout::tuples::tuple< - typename sprout::fit::results::algorithm::type, - typename std::decay::type - > result_type; - return result_type( - sprout::sub_copy( - sprout::get_internal(sprout::tuples::get<0>(sorted)), - offset, - offset + sprout::size(sprout::tuples::get<0>(sorted)) - ), - sprout::tuples::get<1>(sorted) - ); - } - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple< - typename sprout::fit::results::algorithm::type, - typename std::decay::type - > - bozo_sort_result_impl( - Container const& cont, UniformRandomNumberGenerator&& g, Compare comp, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::fit::detail::bozo_sort_result_impl_1( - sprout::fixed::bozo_sort_result(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), comp), - offset - ); - } - } // namespace detail - // - // bozo_sort_result - // - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple< - typename sprout::fit::results::algorithm::type, - typename std::decay::type - > - bozo_sort_result(Container const& cont, UniformRandomNumberGenerator&& g, Compare comp) { - return sprout::fit::detail::bozo_sort_result_impl( - cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), comp, - sprout::internal_begin_offset(cont) - ); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple< - typename sprout::fit::results::algorithm::type, - typename std::decay::type - > - bozo_sort_result_impl( - Container const& cont, UniformRandomNumberGenerator&& g, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::fit::detail::bozo_sort_result_impl_1( - sprout::fixed::bozo_sort_result(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g)), - offset - ); - } - } // namespace detail - // - // bozo_sort_result - // - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple< - typename sprout::fit::results::algorithm::type, - typename std::decay::type - > - bozo_sort_result(Container const& cont, UniformRandomNumberGenerator&& g) { - return sprout::fit::detail::bozo_sort_result_impl( - cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), - sprout::internal_begin_offset(cont) - ); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_BOZO_SORT_RESULT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/clamp_range.hpp b/dsp/lib/sprout/sprout/algorithm/fit/clamp_range.hpp deleted file mode 100644 index 97c941e..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/clamp_range.hpp +++ /dev/null @@ -1,87 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_CLAMP_RANGE_HPP -#define SPROUT_ALGORITHM_FIT_CLAMP_RANGE_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - clamp_range_impl( - Container const& cont, - typename sprout::container_traits::value_type const& low, - typename sprout::container_traits::value_type const& high, - Compare comp, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::clamp_range(cont, low, high, comp)), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // clamp_range - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - clamp_range( - Container const& cont, - typename sprout::container_traits::value_type const& low, - typename sprout::container_traits::value_type const& high, - Compare comp - ) - { - return sprout::fit::detail::clamp_range_impl(cont, low, high, comp, sprout::internal_begin_offset(cont)); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - clamp_range_impl( - Container const& cont, - typename sprout::container_traits::value_type const& low, - typename sprout::container_traits::value_type const& high, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::clamp_range(cont, low, high)), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // clamp_range - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - clamp_range( - Container const& cont, - typename sprout::container_traits::value_type const& low, - typename sprout::container_traits::value_type const& high - ) - { - return sprout::fit::detail::clamp_range_impl(cont, low, high, sprout::internal_begin_offset(cont)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_CLAMP_RANGE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/clamp_range_copy.hpp b/dsp/lib/sprout/sprout/algorithm/fit/clamp_range_copy.hpp deleted file mode 100644 index 8d28a8a..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/clamp_range_copy.hpp +++ /dev/null @@ -1,91 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_CLAMP_RANGE_COPY_HPP -#define SPROUT_ALGORITHM_FIT_CLAMP_RANGE_COPY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - clamp_range_copy_impl( - InputIterator const& first, InputIterator const& last, Result const& result, - typename std::iterator_traits::value_type const& low, - typename std::iterator_traits::value_type const& high, - Compare comp, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::clamp_range_copy(first, last, result, low, high, comp)), - offset, - offset + sprout::fit_size(result, sprout::distance(first, last)) - ); - } - } // namespace detail - // - // clamp_range_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - clamp_range_copy( - InputIterator first, InputIterator last, Result const& result, - typename std::iterator_traits::value_type const& low, - typename std::iterator_traits::value_type const& high, - Compare comp - ) - { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::fit::detail::clamp_range_copy_impl(first, last, result, low, high, comp, sprout::internal_begin_offset(result)); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - clamp_range_copy_impl( - InputIterator first, InputIterator last, Result const& result, - typename std::iterator_traits::value_type const& low, - typename std::iterator_traits::value_type const& high, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::clamp_range_copy(first, last, result, low, high)), - offset, - offset + sprout::fit_size(result, sprout::distance(first, last)) - ); - } - } // namespace detail - // - // clamp_range_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - clamp_range_copy( - InputIterator first, InputIterator last, Result const& result, - typename std::iterator_traits::value_type const& low, - typename std::iterator_traits::value_type const& high - ) - { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::fit::detail::clamp_range_copy_impl(first, last, result, low, high, sprout::internal_begin_offset(result)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_CLAMP_RANGE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/copy.hpp b/dsp/lib/sprout/sprout/algorithm/fit/copy.hpp deleted file mode 100644 index f6a9a8e..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/copy.hpp +++ /dev/null @@ -1,50 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_COPY_HPP -#define SPROUT_ALGORITHM_FIT_COPY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - copy_impl( - InputIterator const& first, InputIterator const& last, Result const& result, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::copy(first, last, result)), - offset, - offset + sprout::fit_size(result, sprout::distance(first, last)) - ); - } - } // namespace detail - // - // copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - copy(InputIterator first, InputIterator last, Result const& result) { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::fit::detail::copy_impl(first, last, result, sprout::internal_begin_offset(result)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/copy_backward.hpp b/dsp/lib/sprout/sprout/algorithm/fit/copy_backward.hpp deleted file mode 100644 index 06c0dd5..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/copy_backward.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_COPY_BACKWARD_HPP -#define SPROUT_ALGORITHM_FIT_COPY_BACKWARD_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - copy_backward_impl( - BidirectionalIterator const& first, BidirectionalIterator const& last, Result const& result, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::copy_backward(first, last, result)), - offset - sprout::fit_size(result, sprout::distance(first, last)), - offset - ); - } - } // namespace detail - // - // copy_backward - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - copy_backward(BidirectionalIterator first, BidirectionalIterator last, Result const& result) { - return sprout::fit::detail::copy_backward_impl(first, last, result, sprout::internal_end_offset(result)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_COPY_BACKWARD_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/copy_if.hpp b/dsp/lib/sprout/sprout/algorithm/fit/copy_if.hpp deleted file mode 100644 index 61d8ae7..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/copy_if.hpp +++ /dev/null @@ -1,50 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_COPY_IF_HPP -#define SPROUT_ALGORITHM_FIT_COPY_IF_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - copy_if_impl( - InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::copy_if(first, last, result, pred)), - offset, - offset + sprout::fit_size(result, sprout::count_if(first, last, pred)) - ); - } - } // namespace detail - // - // copy_if - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - copy_if(InputIterator first, InputIterator last, Result const& result, Predicate pred) { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::fit::detail::copy_if_impl(first, last, result, pred, sprout::internal_begin_offset(result)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_COPY_IF_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/copy_n.hpp b/dsp/lib/sprout/sprout/algorithm/fit/copy_n.hpp deleted file mode 100644 index ffb400d..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/copy_n.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_COPY_N_HPP -#define SPROUT_ALGORITHM_FIT_COPY_N_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - copy_n_impl( - InputIterator const& first, Size n, Result const& result, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::copy_n(first, n, result)), - offset, - offset + sprout::fit_size(result, n) - ); - } - } // namespace detail - // - // copy_n - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - copy_n(InputIterator first, Size n, Result const& result) { - return sprout::fit::detail::copy_n_impl(first, n, result, sprout::internal_begin_offset(result)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_COPY_N_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/copy_until.hpp b/dsp/lib/sprout/sprout/algorithm/fit/copy_until.hpp deleted file mode 100644 index 8e5965b..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/copy_until.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_COPY_UNTIL_HPP -#define SPROUT_ALGORITHM_FIT_COPY_UNTIL_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - copy_until_impl( - InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::copy_until(first, last, result, pred)), - offset, - offset + sprout::fit_size(result, sprout::distance(first, sprout::find_if(first, last, pred))) - ); - } - } // namespace detail - // - // copy_until - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - copy_until(InputIterator first, InputIterator last, Result const& result, Predicate pred) { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::fit::detail::copy_until_impl(first, last, result, pred, sprout::internal_begin_offset(result)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_COPY_UNTIL_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/copy_while.hpp b/dsp/lib/sprout/sprout/algorithm/fit/copy_while.hpp deleted file mode 100644 index 3d75203..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/copy_while.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_COPY_WHILE_HPP -#define SPROUT_ALGORITHM_FIT_COPY_WHILE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - copy_while_impl( - InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::copy_while(first, last, result, pred)), - offset, - offset + sprout::fit_size(result, sprout::distance(first, sprout::find_if_not(first, last, pred))) - ); - } - } // namespace detail - // - // copy_while - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - copy_while(InputIterator first, InputIterator last, Result const& result, Predicate pred) { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::fit::detail::copy_while_impl(first, last, result, pred, sprout::internal_begin_offset(result)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_COPY_WHILE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/fill.hpp b/dsp/lib/sprout/sprout/algorithm/fit/fill.hpp deleted file mode 100644 index 5752c18..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/fill.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_FILL_HPP -#define SPROUT_ALGORITHM_FIT_FILL_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - fill_impl( - Container const& cont, T const& value, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::fill(cont, value)), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // fill - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - fill(Container const& cont, T const& value) { - return sprout::fit::detail::fill_impl(cont, value, sprout::internal_begin_offset(cont)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_FILL_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/fill_n.hpp b/dsp/lib/sprout/sprout/algorithm/fit/fill_n.hpp deleted file mode 100644 index f82959f..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/fill_n.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_FILL_N_HPP -#define SPROUT_ALGORITHM_FIT_FILL_N_HPP - -#include -#include -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - fill_n_impl( - Container const& cont, Size n, T const& value, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::fill_n(cont, n, value)), - offset, - offset + NS_SSCRISK_CEL_OR_SPROUT::min::difference_type>(n, sprout::size(cont)) - ); - } - } // namespace detail - // - // fill_n - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - fill_n(Container const& cont, Size n, T const& value) { - return sprout::fit::detail::fill_n_impl(cont, n, value, sprout::internal_begin_offset(cont)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_FILL_N_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/generate.hpp b/dsp/lib/sprout/sprout/algorithm/fit/generate.hpp deleted file mode 100644 index f6c8525..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/generate.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_GENERATE_HPP -#define SPROUT_ALGORITHM_FIT_GENERATE_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - generate_impl( - Container const& cont, Generator const& gen, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::generate(cont, gen)), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // generate - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - generate(Container const& cont, Generator const& gen) { - return sprout::fit::detail::generate_impl(cont, gen, sprout::internal_begin_offset(cont)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_GENERATE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/generate_n.hpp b/dsp/lib/sprout/sprout/algorithm/fit/generate_n.hpp deleted file mode 100644 index c89b472..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/generate_n.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_GENERATE_N_HPP -#define SPROUT_ALGORITHM_FIT_GENERATE_N_HPP - -#include -#include -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - generate_n_impl( - Container const& cont, Size n, Generator const& gen, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::generate_n(cont, n, gen)), - offset, - offset + NS_SSCRISK_CEL_OR_SPROUT::min::difference_type>(n, sprout::size(cont)) - ); - } - } // namespace detail - // - // generate_n - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - generate_n(Container const& cont, Size n, Generator const& gen) { - return sprout::fit::detail::generate_n_impl(cont, n, gen, sprout::internal_begin_offset(cont)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_GENERATE_N_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/inplace_merge.hpp b/dsp/lib/sprout/sprout/algorithm/fit/inplace_merge.hpp deleted file mode 100644 index b9f97e9..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/inplace_merge.hpp +++ /dev/null @@ -1,71 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_INPLACE_MERGE_HPP -#define SPROUT_ALGORITHM_FIT_INPLACE_MERGE_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - inplace_merge_impl( - Container const& cont, typename sprout::container_traits::const_iterator middle, Compare comp, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::inplace_merge(cont, middle, comp)), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // inplace_merge - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - inplace_merge(Container const& cont, typename sprout::container_traits::const_iterator middle, Compare comp) { - return sprout::fit::detail::inplace_merge_impl(cont, middle, comp, sprout::internal_begin_offset(cont)); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - inplace_merge_impl( - Container const& cont, typename sprout::container_traits::const_iterator middle, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::inplace_merge(cont, middle)), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // inplace_merge - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - inplace_merge(Container const& cont, typename sprout::container_traits::const_iterator middle) { - return sprout::fit::detail::inplace_merge_impl(cont, middle, sprout::internal_begin_offset(cont)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_INPLACE_MERGE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/make_heap.hpp b/dsp/lib/sprout/sprout/algorithm/fit/make_heap.hpp deleted file mode 100644 index 43ca9cd..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/make_heap.hpp +++ /dev/null @@ -1,71 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_MAKE_HEAP_HPP -#define SPROUT_ALGORITHM_FIT_MAKE_HEAP_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - make_heap_impl( - Container const& cont, Compare comp, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::make_heap(cont, comp)), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // make_heap - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - make_heap(Container const& cont, Compare comp) { - return sprout::fit::detail::make_heap_impl(cont, comp, sprout::internal_begin_offset(cont)); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - make_heap_impl( - Container const& cont, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::make_heap(cont)), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // make_heap - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - make_heap(Container const& cont) { - return sprout::fit::detail::make_heap_impl(cont, sprout::internal_begin_offset(cont)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_MAKE_HEAP_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/make_partial_heap.hpp b/dsp/lib/sprout/sprout/algorithm/fit/make_partial_heap.hpp deleted file mode 100644 index ae94a78..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/make_partial_heap.hpp +++ /dev/null @@ -1,72 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_MAKE_PARTIAL_HEAP_HPP -#define SPROUT_ALGORITHM_FIT_MAKE_PARTIAL_HEAP_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - make_partial_heap_impl( - Container const& cont, typename sprout::container_traits::const_iterator middle, Compare comp, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::make_partial_heap(cont, middle, comp)), - offset, - offset + sprout::distance(sprout::begin(cont), middle) - ); - } - } // namespace detail - // - // make_partial_heap - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - make_partial_heap(Container const& cont, typename sprout::container_traits::const_iterator middle, Compare comp) { - return sprout::fit::detail::make_partial_heap_impl(cont, middle, comp, sprout::internal_begin_offset(cont)); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - make_partial_heap_impl( - Container const& cont, typename sprout::container_traits::const_iterator middle, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::make_partial_heap(cont, middle)), - offset, - offset + sprout::distance(sprout::begin(cont), middle) - ); - } - } // namespace detail - // - // make_partial_heap - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - make_partial_heap(Container const& cont, typename sprout::container_traits::const_iterator middle) { - return sprout::fit::detail::make_partial_heap_impl(cont, middle, sprout::internal_begin_offset(cont)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_MAKE_PARTIAL_HEAP_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/merge.hpp b/dsp/lib/sprout/sprout/algorithm/fit/merge.hpp deleted file mode 100644 index ef89411..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/merge.hpp +++ /dev/null @@ -1,95 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_MERGE_HPP -#define SPROUT_ALGORITHM_FIT_MERGE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - merge_impl( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::merge(first1, last1, first2, last2, result, comp)), - offset, - offset + sprout::fit_size(result, sprout::distance(first1, last1) + sprout::distance(first2, last2)) - ); - } - } // namespace detail - // - // merge - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - merge( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp - ) - { - static_assert( - sprout::is_forward_iterator::value && sprout::is_forward_iterator::value, - "Sorry, not implemented." - ); - return sprout::fit::detail::merge_impl(first1, last1, first2, last2, result, comp, sprout::internal_begin_offset(result)); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - merge_impl( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::merge(first1, last1, first2, last2, result)), - offset, - offset + sprout::fit_size(result, sprout::distance(first1, last1) + sprout::distance(first2, last2)) - ); - } - } // namespace detail - // - // merge - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - merge( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result - ) - { - static_assert( - sprout::is_forward_iterator::value && sprout::is_forward_iterator::value, - "Sorry, not implemented." - ); - return sprout::fit::detail::merge_impl(first1, last1, first2, last2, result, sprout::internal_begin_offset(result)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_MERGE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/next_permutation.hpp b/dsp/lib/sprout/sprout/algorithm/fit/next_permutation.hpp deleted file mode 100644 index d6f999e..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/next_permutation.hpp +++ /dev/null @@ -1,82 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_NEXT_PERMUTATION_HPP -#define SPROUT_ALGORITHM_FIT_NEXT_PERMUTATION_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::pair::type, bool> - next_permutation_impl_1( - Container const& cont, - Permutation const& perm, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::pair::type, bool>( - sprout::sub_copy( - sprout::get_internal(perm.first), - offset, - offset + sprout::size(cont) - ), - perm.second - ); - } - - template - inline SPROUT_CONSTEXPR sprout::pair::type, bool> - next_permutation_impl( - Container const& cont, Compare comp, - typename sprout::container_traits::difference_type offset - ) - { - return next_permutation_impl_1(cont, sprout::fixed::next_permutation(cont, comp), offset); - } - } // namespace detail - // - // next_permutation - // - template - inline SPROUT_CONSTEXPR sprout::pair::type, bool> - next_permutation(Container const& cont, Compare comp) { - return sprout::fit::detail::next_permutation_impl(cont, comp, sprout::internal_begin_offset(cont)); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::pair::type, bool> - next_permutation_impl( - Container const& cont, - typename sprout::container_traits::difference_type offset - ) - { - return next_permutation_impl_1(cont, sprout::fixed::next_permutation(cont), offset); - } - } // namespace detail - // - // next_permutation - // - template - inline SPROUT_CONSTEXPR sprout::pair::type, bool> - next_permutation(Container const& cont) { - return sprout::fit::detail::next_permutation_impl(cont, sprout::internal_begin_offset(cont)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_NEXT_PERMUTATION_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/nth_element.hpp b/dsp/lib/sprout/sprout/algorithm/fit/nth_element.hpp deleted file mode 100644 index b54e78b..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/nth_element.hpp +++ /dev/null @@ -1,72 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_NTH_ELEMENT_HPP -#define SPROUT_ALGORITHM_FIT_NTH_ELEMENT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - nth_element_impl( - Container const& cont, typename sprout::container_traits::const_iterator nth, Compare comp, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::nth_element(cont, nth, comp)), - offset, - offset + sprout::distance(sprout::begin(cont), nth) + 1 - ); - } - } // namespace detail - // - // nth_element - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - nth_element(Container const& cont, typename sprout::container_traits::const_iterator nth, Compare comp) { - return sprout::fit::detail::nth_element_impl(cont, nth, comp, sprout::internal_begin_offset(cont)); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - nth_element_impl( - Container const& cont, typename sprout::container_traits::const_iterator nth, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::nth_element(cont, nth)), - offset, - offset + sprout::distance(sprout::begin(cont), nth) + 1 - ); - } - } // namespace detail - // - // nth_element - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - nth_element(Container const& cont, typename sprout::container_traits::const_iterator nth) { - return sprout::fit::detail::nth_element_impl(cont, nth, sprout::internal_begin_offset(cont)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_NTH_ELEMENT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/partial_sort.hpp b/dsp/lib/sprout/sprout/algorithm/fit/partial_sort.hpp deleted file mode 100644 index 0c4a0bf..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/partial_sort.hpp +++ /dev/null @@ -1,72 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_PARTIAL_SORT_HPP -#define SPROUT_ALGORITHM_FIT_PARTIAL_SORT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - partial_sort_impl( - Container const& cont, typename sprout::container_traits::const_iterator middle, Compare comp, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::partial_sort(cont, middle, comp)), - offset, - offset + sprout::distance(sprout::begin(cont), middle) - ); - } - } // namespace detail - // - // partial_sort - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - partial_sort(Container const& cont, typename sprout::container_traits::const_iterator middle, Compare comp) { - return sprout::fit::detail::partial_sort_impl(cont, middle, comp, sprout::internal_begin_offset(cont)); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - partial_sort_impl( - Container const& cont, typename sprout::container_traits::const_iterator middle, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::partial_sort(cont, middle)), - offset, - offset + sprout::distance(sprout::begin(cont), middle) - ); - } - } // namespace detail - // - // partial_sort - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - partial_sort(Container const& cont, typename sprout::container_traits::const_iterator middle) { - return sprout::fit::detail::partial_sort_impl(cont, middle, sprout::internal_begin_offset(cont)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_PARTIAL_SORT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/partition.hpp b/dsp/lib/sprout/sprout/algorithm/fit/partition.hpp deleted file mode 100644 index 4d0253e..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/partition.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_PARTITION_HPP -#define SPROUT_ALGORITHM_FIT_PARTITION_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - partition_impl( - Container const& cont, Predicate pred, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::partition(cont, pred)), - offset, - offset + sprout::size(cont) - sprout::count_if(sprout::begin(cont), sprout::end(cont), pred) - ); - } - } // namespace detail - // - // partition - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - partition(Container const& cont, Predicate pred) { - return sprout::fit::detail::partition_impl(cont, pred, sprout::internal_begin_offset(cont)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_PARTITION_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/partition_copy.hpp b/dsp/lib/sprout/sprout/algorithm/fit/partition_copy.hpp deleted file mode 100644 index bc92319..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/partition_copy.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_PARTITION_COPY_HPP -#define SPROUT_ALGORITHM_FIT_PARTITION_COPY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - partition_copy_impl( - InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred, - typename sprout::container_traits::difference_type offset - ) - { - typedef typename std::iterator_traits::difference_type diff_type; - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::partition_copy(first, last, result, pred)), - offset, - offset + sprout::fit_size( - result, sprout::detail::count_n_if(first, NS_SSCRISK_CEL_OR_SPROUT::min(sprout::distance(first, last), sprout::size(result)), pred) - ) - ); - } - } // namespace detail - // - // partition_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - partition_copy(InputIterator first, InputIterator last, Result const& result, Predicate pred) { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::fit::detail::partition_copy_impl(first, last, result, pred, sprout::internal_begin_offset(result)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_PARTITION_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/pop_heap.hpp b/dsp/lib/sprout/sprout/algorithm/fit/pop_heap.hpp deleted file mode 100644 index 748efe3..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/pop_heap.hpp +++ /dev/null @@ -1,71 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_POP_HEAP_HPP -#define SPROUT_ALGORITHM_FIT_POP_HEAP_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - pop_heap_impl( - Container const& cont, Compare comp, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::pop_heap(cont, comp)), - offset, - offset + sprout::size(cont) - 1 - ); - } - } // namespace detail - // - // pop_heap - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - pop_heap(Container const& cont, Compare comp) { - return sprout::fit::detail::pop_heap_impl(cont, comp, sprout::internal_begin_offset(cont)); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - pop_heap_impl( - Container const& cont, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::pop_heap(cont)), - offset, - offset + sprout::size(cont) - 1 - ); - } - } // namespace detail - // - // pop_heap - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - pop_heap(Container const& cont) { - return sprout::fit::detail::pop_heap_impl(cont, sprout::internal_begin_offset(cont)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_POP_HEAP_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/prev_permutation.hpp b/dsp/lib/sprout/sprout/algorithm/fit/prev_permutation.hpp deleted file mode 100644 index 59d4769..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/prev_permutation.hpp +++ /dev/null @@ -1,81 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_PREV_PERMUTATION_HPP -#define SPROUT_ALGORITHM_FIT_PREV_PERMUTATION_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::pair::type, bool> - prev_permutation_impl_1( - Container const& cont, Permutation const& perm, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::pair::type, bool>( - sprout::sub_copy( - sprout::get_internal(perm.first), - offset, - offset + sprout::size(cont) - ), - perm.second - ); - } - - template - inline SPROUT_CONSTEXPR sprout::pair::type, bool> - prev_permutation_impl( - Container const& cont, Compare comp, - typename sprout::container_traits::difference_type offset - ) - { - return prev_permutation_impl_1(cont, sprout::fixed::prev_permutation(cont, comp), offset); - } - } // namespace detail - // - // prev_permutation - // - template - inline SPROUT_CONSTEXPR sprout::pair::type, bool> - prev_permutation(Container const& cont, Compare comp) { - return sprout::fit::detail::prev_permutation_impl(cont, comp, sprout::internal_begin_offset(cont)); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::pair::type, bool> - prev_permutation_impl( - Container const& cont, - typename sprout::container_traits::difference_type offset - ) - { - return prev_permutation_impl_1(cont, sprout::fixed::prev_permutation(cont), offset); - } - } // namespace detail - // - // prev_permutation - // - template - inline SPROUT_CONSTEXPR sprout::pair::type, bool> - prev_permutation(Container const& cont) { - return sprout::fit::detail::prev_permutation_impl(cont, sprout::internal_begin_offset(cont)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_PREV_PERMUTATION_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/push_heap.hpp b/dsp/lib/sprout/sprout/algorithm/fit/push_heap.hpp deleted file mode 100644 index e805e57..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/push_heap.hpp +++ /dev/null @@ -1,71 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_PUSH_HEAP_HPP -#define SPROUT_ALGORITHM_FIT_PUSH_HEAP_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - push_heap_impl( - Container const& cont, Compare comp, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::push_heap(cont, comp)), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // push_heap - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - push_heap(Container const& cont, Compare comp) { - return sprout::fit::detail::push_heap_impl(cont, comp, sprout::internal_begin_offset(cont)); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - push_heap_impl( - Container const& cont, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::push_heap(cont)), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // push_heap - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - push_heap(Container const& cont) { - return sprout::fit::detail::push_heap_impl(cont, sprout::internal_begin_offset(cont)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_PUSH_HEAP_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/random_swap.hpp b/dsp/lib/sprout/sprout/algorithm/fit/random_swap.hpp deleted file mode 100644 index 59cc642..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/random_swap.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_RANDOM_SWAP_HPP -#define SPROUT_ALGORITHM_FIT_RANDOM_SWAP_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - random_swap_impl( - Container const& cont, UniformRandomNumberGenerator&& g, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::random_swap(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g))), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // random_swap - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - random_swap(Container const& cont, UniformRandomNumberGenerator&& g) { - return sprout::fit::detail::random_swap_impl( - cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), - sprout::internal_begin_offset(cont) - ); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_RANDOM_SWAP_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/random_swap_result.hpp b/dsp/lib/sprout/sprout/algorithm/fit/random_swap_result.hpp deleted file mode 100644 index 7607143..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/random_swap_result.hpp +++ /dev/null @@ -1,81 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_RANDOM_SWAP_RESULT_HPP -#define SPROUT_ALGORITHM_FIT_RANDOM_SWAP_RESULT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple< - typename sprout::fit::results::algorithm::type, - typename std::decay::type - > - random_swap_result_impl_1( - Shuffled const& random_swapd, - typename sprout::container_traits::difference_type offset - ) - { - typedef sprout::tuples::tuple< - typename sprout::fit::results::algorithm::type, - typename std::decay::type - > result_type; - return result_type( - sprout::sub_copy( - sprout::get_internal(sprout::tuples::get<0>(random_swapd)), - offset, - offset + sprout::size(sprout::tuples::get<0>(random_swapd)) - ), - sprout::tuples::get<1>(random_swapd) - ); - } - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple< - typename sprout::fit::results::algorithm::type, - typename std::decay::type - > - random_swap_result_impl( - Container const& cont, UniformRandomNumberGenerator&& g, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::fit::detail::random_swap_result_impl_1( - sprout::fixed::random_swap_result(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g)), - offset - ); - } - } // namespace detail - // - // random_swap_result - // - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple< - typename sprout::fit::results::algorithm::type, - typename std::decay::type - > - random_swap_result(Container const& cont, UniformRandomNumberGenerator&& g) { - return sprout::fit::detail::random_swap_result_impl( - cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), - sprout::internal_begin_offset(cont) - ); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_RANDOM_SWAP_RESULT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/recurrence.hpp b/dsp/lib/sprout/sprout/algorithm/fit/recurrence.hpp deleted file mode 100644 index 2da989d..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/recurrence.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_RECURRENCE_HPP -#define SPROUT_ALGORITHM_FIT_RECURRENCE_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - recurrence_impl( - Container const& cont, Generator const& gen, - typename sprout::container_traits::difference_type offset, - Inits const&... inits - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::recurrence(cont, gen, inits...)), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // recurrence - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - recurrence(Container const& cont, Generator const& gen, Inits const&... inits) { - return sprout::fit::detail::recurrence_impl(cont, gen, sprout::internal_begin_offset(cont), inits...); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_RECURRENCE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/recurrence_n.hpp b/dsp/lib/sprout/sprout/algorithm/fit/recurrence_n.hpp deleted file mode 100644 index 8eba9f8..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/recurrence_n.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_RECURRENCE_N_HPP -#define SPROUT_ALGORITHM_FIT_RECURRENCE_N_HPP - -#include -#include -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - recurrence_n_impl( - Container const& cont, Size n, Generator const& gen, - typename sprout::container_traits::difference_type offset, - Inits const&... inits - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::recurrence_n(cont, n, gen, inits...)), - offset, - offset + NS_SSCRISK_CEL_OR_SPROUT::min::difference_type>(n, sprout::size(cont)) - ); - } - } // namespace detail - // - // recurrence_n - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - recurrence_n(Container const& cont, Size n, Generator const& gen, Inits const&... inits) { - return sprout::fit::detail::recurrence_n_impl(cont, n, gen, sprout::internal_begin_offset(cont), inits...); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_RECURRENCE_N_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/remove.hpp b/dsp/lib/sprout/sprout/algorithm/fit/remove.hpp deleted file mode 100644 index b46e1a3..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/remove.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_REMOVE_HPP -#define SPROUT_ALGORITHM_FIT_REMOVE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - remove_impl( - Container const& cont, T const& value, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::remove(cont, value)), - offset, - offset + sprout::size(cont) - sprout::count(sprout::begin(cont), sprout::end(cont), value) - ); - } - } // namespace detail - // - // remove - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - remove(Container const& cont, T const& value) { - return sprout::fit::detail::remove_impl(cont, value, sprout::internal_begin_offset(cont)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_REMOVE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/remove_copy.hpp b/dsp/lib/sprout/sprout/algorithm/fit/remove_copy.hpp deleted file mode 100644 index 190d3e2..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/remove_copy.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_REMOVE_COPY_HPP -#define SPROUT_ALGORITHM_FIT_REMOVE_COPY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - remove_copy_impl( - InputIterator const& first, InputIterator const& last, Result const& result, T const& value, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::remove_copy(first, last, result, value)), - offset, - offset + sprout::fit_size(result, sprout::distance(first, last) - sprout::count(first, last, value)) - ); - } - } // namespace detail - // - // remove_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - remove_copy(InputIterator first, InputIterator last, Result const& result, T const& value) { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::fit::detail::remove_copy_impl(first, last, result, value, sprout::internal_begin_offset(result)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_REMOVE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/remove_copy_if.hpp b/dsp/lib/sprout/sprout/algorithm/fit/remove_copy_if.hpp deleted file mode 100644 index f40879a..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/remove_copy_if.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_REMOVE_COPY_IF_HPP -#define SPROUT_ALGORITHM_FIT_REMOVE_COPY_IF_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - remove_copy_if_impl( - InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::remove_copy_if(first, last, result, pred)), - offset, - offset + sprout::fit_size(result, sprout::distance(first, last) - sprout::count_if(first, last, pred)) - ); - } - } // namespace detail - // - // remove_copy_if - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - remove_copy_if(InputIterator first, InputIterator last, Result const& result, Predicate pred) { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::fit::detail::remove_copy_if_impl(first, last, result, pred, sprout::internal_begin_offset(result)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_REMOVE_COPY_IF_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/remove_if.hpp b/dsp/lib/sprout/sprout/algorithm/fit/remove_if.hpp deleted file mode 100644 index 01feb1a..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/remove_if.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_REMOVE_IF_HPP -#define SPROUT_ALGORITHM_FIT_REMOVE_IF_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - remove_if_impl( - Container const& cont, Predicate pred, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::remove_if(cont, pred)), - offset, - offset + sprout::size(cont) - sprout::count_if(sprout::begin(cont), sprout::end(cont), pred) - ); - } - } // namespace detail - // - // remove_if - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - remove_if(Container const& cont, Predicate pred) { - return sprout::fit::detail::remove_if_impl(cont, pred, sprout::internal_begin_offset(cont)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_REMOVE_IF_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/replace.hpp b/dsp/lib/sprout/sprout/algorithm/fit/replace.hpp deleted file mode 100644 index b4a5351..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/replace.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_REPLACE_HPP -#define SPROUT_ALGORITHM_FIT_REPLACE_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - replace_impl( - Container const& cont, T const& old_value, T const& new_value, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::replace(cont, old_value, new_value)), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // replace - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - replace(Container const& cont, T const& old_value, T const& new_value) { - return sprout::fit::detail::replace_impl(cont, old_value, new_value, sprout::internal_begin_offset(cont)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_REPLACE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/replace_copy.hpp b/dsp/lib/sprout/sprout/algorithm/fit/replace_copy.hpp deleted file mode 100644 index 90cc6f3..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/replace_copy.hpp +++ /dev/null @@ -1,52 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_REPLACE_COPY_HPP -#define SPROUT_ALGORITHM_FIT_REPLACE_COPY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - replace_copy_impl( - InputIterator const& first, InputIterator const& last, Result const& result, T const& old_value, T const& new_value, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::replace_copy(first, last, result, old_value, new_value)), - offset, - offset + sprout::fit_size(result, sprout::distance(first, last)) - ); - } - } // namespace detail - // - // replace_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - replace_copy(InputIterator first, InputIterator last, Result const& result, T const& old_value, T const& new_value) { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::fit::detail::replace_copy_impl( - first, last, result, old_value, new_value, sprout::internal_begin_offset(result) - ); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_REPLACE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/replace_copy_if.hpp b/dsp/lib/sprout/sprout/algorithm/fit/replace_copy_if.hpp deleted file mode 100644 index c23fdc0..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/replace_copy_if.hpp +++ /dev/null @@ -1,50 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_REPLACE_COPY_IF_HPP -#define SPROUT_ALGORITHM_FIT_REPLACE_COPY_IF_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - replace_copy_if_impl( - InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred, T const& new_value, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::replace_copy_if(first, last, result, pred, new_value)), - offset, - offset + sprout::fit_size(result, sprout::distance(first, last)) - ); - } - } // namespace detail - // - // replace_copy_if - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - replace_copy_if(InputIterator first, InputIterator last, Result const& result, Predicate pred, T const& new_value) { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::fit::detail::replace_copy_if_impl(first, last, result, pred, new_value, sprout::internal_begin_offset(result)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_REPLACE_COPY_IF_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/replace_if.hpp b/dsp/lib/sprout/sprout/algorithm/fit/replace_if.hpp deleted file mode 100644 index 497b4a1..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/replace_if.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_REPLACE_IF_HPP -#define SPROUT_ALGORITHM_FIT_REPLACE_IF_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - replace_if_impl( - Container const& cont, Predicate pred, T const& new_value, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::replace_if(cont, pred, new_value)), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // replace_if - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - replace_if(Container const& cont, Predicate pred, T const& new_value) { - return sprout::fit::detail::replace_if_impl(cont, pred, new_value, sprout::internal_begin_offset(cont)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_REPLACE_IF_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/results.hpp b/dsp/lib/sprout/sprout/algorithm/fit/results.hpp deleted file mode 100644 index 215955a..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/results.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_RESULTS_HPP -#define SPROUT_ALGORITHM_FIT_RESULTS_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace results { - // - // algorithm - // - template - struct algorithm { - public: - typedef sprout::sub_array< - typename std::decay< - typename sprout::containers::internal< - typename sprout::fixed::results::algorithm::type - >::type - >::type - > type; - }; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using algorithm_t = typename sprout::fit::results::algorithm::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - } // namespace results - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_RESULTS_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/reverse.hpp b/dsp/lib/sprout/sprout/algorithm/fit/reverse.hpp deleted file mode 100644 index c362bb7..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/reverse.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_REVERSE_HPP -#define SPROUT_ALGORITHM_FIT_REVERSE_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - reverse_impl( - Container const& cont, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::reverse(cont)), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // reverse - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - reverse(Container const& cont) { - return sprout::fit::detail::reverse_impl(cont, sprout::internal_begin_offset(cont)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_REVERSE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/reverse_copy.hpp b/dsp/lib/sprout/sprout/algorithm/fit/reverse_copy.hpp deleted file mode 100644 index 7b003cb..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/reverse_copy.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_REVERSE_COPY_HPP -#define SPROUT_ALGORITHM_FIT_REVERSE_COPY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - reverse_copy_impl( - BidirectionalIterator const& first, BidirectionalIterator const& last, Result const& result, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::reverse_copy(first, last, result)), - offset, - offset + sprout::fit_size(result, sprout::distance(first, last)) - ); - } - } // namespace detail - // - // reverse_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - reverse_copy(BidirectionalIterator first, BidirectionalIterator last, Result const& result) { - return sprout::fit::detail::reverse_copy_impl(first, last, result, sprout::internal_begin_offset(result)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_REVERSE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/rotate.hpp b/dsp/lib/sprout/sprout/algorithm/fit/rotate.hpp deleted file mode 100644 index 8fee29a..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/rotate.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_ROTATE_HPP -#define SPROUT_ALGORITHM_FIT_ROTATE_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - rotate_impl( - Container const& cont, typename sprout::container_traits::const_iterator middle, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::rotate(cont, middle)), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // rotate - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - rotate(Container const& cont, typename sprout::container_traits::const_iterator middle) { - return sprout::fit::detail::rotate_impl(cont, middle, sprout::internal_begin_offset(cont)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_ROTATE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/rotate_copy.hpp b/dsp/lib/sprout/sprout/algorithm/fit/rotate_copy.hpp deleted file mode 100644 index 54a84ab..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/rotate_copy.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_ROTATE_COPY_HPP -#define SPROUT_ALGORITHM_FIT_ROTATE_COPY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - rotate_copy_impl( - ForwardIterator const& first, ForwardIterator const& middle, ForwardIterator const& last, Result const& result, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::rotate_copy(first, middle, last, result)), - offset, - offset + sprout::fit_size(result, sprout::distance(first, last)) - ); - } - } // namespace detail - // - // rotate_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - rotate_copy(ForwardIterator first, ForwardIterator middle, ForwardIterator last, Result const& result) { - return sprout::fit::detail::rotate_copy_impl(first, middle, last, result, sprout::internal_begin_offset(result)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_ROTATE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/set_difference.hpp b/dsp/lib/sprout/sprout/algorithm/fit/set_difference.hpp deleted file mode 100644 index 1bf0ae5..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/set_difference.hpp +++ /dev/null @@ -1,100 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_SET_DIFFERENCE_HPP -#define SPROUT_ALGORITHM_FIT_SET_DIFFERENCE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - set_difference_impl( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::set_difference(first1, last1, first2, last2, result, comp)), - offset, - offset + sprout::fit_size( - result, sprout::distance(first1, last1) - sprout::detail::set_overlap_count(first1, last1, first2, last2, comp) - ) - ); - } - } // namespace detail - // - // set_difference - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - set_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp - ) - { - static_assert( - sprout::is_forward_iterator::value && sprout::is_forward_iterator::value, - "Sorry, not implemented." - ); - return sprout::fit::detail::set_difference_impl(first1, last1, first2, last2, result, comp, sprout::internal_begin_offset(result)); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - set_difference_impl( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::set_difference(first1, last1, first2, last2, result)), - offset, - offset + sprout::fit_size( - result, sprout::distance(first1, last1) - sprout::detail::set_overlap_count(first1, last1, first2, last2) - ) - ); - } - } // namespace detail - // - // set_difference - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - set_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result - ) - { - static_assert( - sprout::is_forward_iterator::value && sprout::is_forward_iterator::value, - "Sorry, not implemented." - ); - return sprout::fit::detail::set_difference_impl(first1, last1, first2, last2, result, sprout::internal_begin_offset(result)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_SET_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/set_intersection.hpp b/dsp/lib/sprout/sprout/algorithm/fit/set_intersection.hpp deleted file mode 100644 index d5f0378..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/set_intersection.hpp +++ /dev/null @@ -1,99 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_SET_INTERSECTION_HPP -#define SPROUT_ALGORITHM_FIT_SET_INTERSECTION_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - set_intersection_impl( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::set_intersection(first1, last1, first2, last2, result, comp)), - offset, - offset + sprout::fit_size( - result, sprout::detail::set_overlap_count(first1, last1, first2, last2, comp) - ) - ); - } - } // namespace detail - // - // set_intersection - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - set_intersection( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp - ) - { - static_assert( - sprout::is_forward_iterator::value && sprout::is_forward_iterator::value, - "Sorry, not implemented." - ); - return sprout::fit::detail::set_intersection_impl(first1, last1, first2, last2, result, comp, sprout::internal_begin_offset(result)); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - set_intersection_impl( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::set_intersection(first1, last1, first2, last2, result)), - offset, - offset + sprout::fit_size( - result, sprout::detail::set_overlap_count(first1, last1, first2, last2) - ) - ); - } - } // namespace detail - // - // set_intersection - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - set_intersection( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result - ) - { - static_assert( - sprout::is_forward_iterator::value && sprout::is_forward_iterator::value, - "Sorry, not implemented." - ); - return sprout::fit::detail::set_intersection_impl(first1, last1, first2, last2, result, sprout::internal_begin_offset(result)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_SET_INTERSECTION_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/set_symmetric_difference.hpp b/dsp/lib/sprout/sprout/algorithm/fit/set_symmetric_difference.hpp deleted file mode 100644 index 5636f74..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/set_symmetric_difference.hpp +++ /dev/null @@ -1,100 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_SET_SYMMETRIC_DIFFERENCE_HPP -#define SPROUT_ALGORITHM_FIT_SET_SYMMETRIC_DIFFERENCE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - set_symmetric_difference_impl( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::set_symmetric_difference(first1, last1, first2, last2, result, comp)), - offset, - offset + sprout::fit_size( - result, sprout::distance(first1, last1) + sprout::distance(first2, last2) - 2 * sprout::detail::set_overlap_count(first1, last1, first2, last2, comp) - ) - ); - } - } // namespace detail - // - // set_symmetric_difference - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - set_symmetric_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp - ) - { - static_assert( - sprout::is_forward_iterator::value && sprout::is_forward_iterator::value, - "Sorry, not implemented." - ); - return sprout::fit::detail::set_symmetric_difference_impl(first1, last1, first2, last2, result, comp, sprout::internal_begin_offset(result)); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - set_symmetric_difference_impl( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::set_symmetric_difference(first1, last1, first2, last2, result)), - offset, - offset + sprout::fit_size( - result, sprout::distance(first1, last1) + sprout::distance(first2, last2) - 2 * sprout::detail::set_overlap_count(first1, last1, first2, last2) - ) - ); - } - } // namespace detail - // - // set_symmetric_difference - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - set_symmetric_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result - ) - { - static_assert( - sprout::is_forward_iterator::value && sprout::is_forward_iterator::value, - "Sorry, not implemented." - ); - return sprout::fit::detail::set_symmetric_difference_impl(first1, last1, first2, last2, result, sprout::internal_begin_offset(result)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_SET_SYMMETRIC_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/set_union.hpp b/dsp/lib/sprout/sprout/algorithm/fit/set_union.hpp deleted file mode 100644 index 06da1de..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/set_union.hpp +++ /dev/null @@ -1,100 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_SET_UNION_HPP -#define SPROUT_ALGORITHM_FIT_SET_UNION_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - set_union_impl( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::set_union(first1, last1, first2, last2, result, comp)), - offset, - offset + sprout::fit_size( - result, sprout::distance(first1, last1) + sprout::distance(first2, last2) - sprout::detail::set_overlap_count(first1, last1, first2, last2, comp) - ) - ); - } - } // namespace detail - // - // set_union - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - set_union( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp - ) - { - static_assert( - sprout::is_forward_iterator::value && sprout::is_forward_iterator::value, - "Sorry, not implemented." - ); - return sprout::fit::detail::set_union_impl(first1, last1, first2, last2, result, comp, sprout::internal_begin_offset(result)); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - set_union_impl( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::set_union(first1, last1, first2, last2, result)), - offset, - offset + sprout::fit_size( - result, sprout::distance(first1, last1) + sprout::distance(first2, last2) - sprout::detail::set_overlap_count(first1, last1, first2, last2) - ) - ); - } - } // namespace detail - // - // set_union - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - set_union( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result - ) - { - static_assert( - sprout::is_forward_iterator::value && sprout::is_forward_iterator::value, - "Sorry, not implemented." - ); - return sprout::fit::detail::set_union_impl(first1, last1, first2, last2, result, sprout::internal_begin_offset(result)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_SET_UNION_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/shuffle.hpp b/dsp/lib/sprout/sprout/algorithm/fit/shuffle.hpp deleted file mode 100644 index d976b1e..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/shuffle.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_SHUFFLE_HPP -#define SPROUT_ALGORITHM_FIT_SHUFFLE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - shuffle_impl( - Container const& cont, UniformRandomNumberGenerator&& g, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::shuffle(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g))), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // shuffle - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - shuffle(Container const& cont, UniformRandomNumberGenerator&& g) { - return sprout::fit::detail::shuffle_impl( - cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), - sprout::internal_begin_offset(cont) - ); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_SHUFFLE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/shuffle_result.hpp b/dsp/lib/sprout/sprout/algorithm/fit/shuffle_result.hpp deleted file mode 100644 index b330396..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/shuffle_result.hpp +++ /dev/null @@ -1,81 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_SHUFFLE_RESULT_HPP -#define SPROUT_ALGORITHM_FIT_SHUFFLE_RESULT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple< - typename sprout::fit::results::algorithm::type, - typename std::decay::type - > - shuffle_result_impl_1( - Shuffled const& shuffled, - typename sprout::container_traits::difference_type offset - ) - { - typedef sprout::tuples::tuple< - typename sprout::fit::results::algorithm::type, - typename std::decay::type - > result_type; - return result_type( - sprout::sub_copy( - sprout::get_internal(sprout::tuples::get<0>(shuffled)), - offset, - offset + sprout::size(sprout::tuples::get<0>(shuffled)) - ), - sprout::tuples::get<1>(shuffled) - ); - } - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple< - typename sprout::fit::results::algorithm::type, - typename std::decay::type - > - shuffle_result_impl( - Container const& cont, UniformRandomNumberGenerator&& g, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::fit::detail::shuffle_result_impl_1( - sprout::fixed::shuffle_result(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g)), - offset - ); - } - } // namespace detail - // - // shuffle_result - // - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple< - typename sprout::fit::results::algorithm::type, - typename std::decay::type - > - shuffle_result(Container const& cont, UniformRandomNumberGenerator&& g) { - return sprout::fit::detail::shuffle_result_impl( - cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), - sprout::internal_begin_offset(cont) - ); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_SHUFFLE_RESULT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/sort.hpp b/dsp/lib/sprout/sprout/algorithm/fit/sort.hpp deleted file mode 100644 index 0bf1255..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/sort.hpp +++ /dev/null @@ -1,71 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_SORT_HPP -#define SPROUT_ALGORITHM_FIT_SORT_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - sort_impl( - Container const& cont, Compare comp, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::sort(cont, comp)), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // sort - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - sort(Container const& cont, Compare comp) { - return sprout::fit::detail::sort_impl(cont, comp, sprout::internal_begin_offset(cont)); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - sort_impl( - Container const& cont, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::sort(cont)), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // sort - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - sort(Container const& cont) { - return sprout::fit::detail::sort_impl(cont, sprout::internal_begin_offset(cont)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_SORT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/sort_heap.hpp b/dsp/lib/sprout/sprout/algorithm/fit/sort_heap.hpp deleted file mode 100644 index 34b8a08..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/sort_heap.hpp +++ /dev/null @@ -1,71 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_SORT_HEAP_HPP -#define SPROUT_ALGORITHM_FIT_SORT_HEAP_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - sort_heap_impl( - Container const& cont, Compare comp, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::sort_heap(cont, comp)), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // sort_heap - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - sort_heap(Container const& cont, Compare comp) { - return sprout::fit::detail::sort_heap_impl(cont, comp, sprout::internal_begin_offset(cont)); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - sort_heap_impl( - Container const& cont, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::sort_heap(cont)), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // sort_heap - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - sort_heap(Container const& cont) { - return sprout::fit::detail::sort_heap_impl(cont, sprout::internal_begin_offset(cont)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_SORT_HEAP_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/stable_partition.hpp b/dsp/lib/sprout/sprout/algorithm/fit/stable_partition.hpp deleted file mode 100644 index 4259dc9..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/stable_partition.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_STABLE_PARTITION_HPP -#define SPROUT_ALGORITHM_FIT_STABLE_PARTITION_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - stable_partition_impl( - Container const& cont, Predicate pred, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::stable_partition(cont, pred)), - offset, - offset + sprout::size(cont) - sprout::count_if(sprout::begin(cont), sprout::end(cont), pred) - ); - } - } // namespace detail - // - // stable_partition - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - stable_partition(Container const& cont, Predicate pred) { - return sprout::fit::detail::stable_partition_impl(cont, pred, sprout::internal_begin_offset(cont)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_STABLE_PARTITION_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/stable_partition_copy.hpp b/dsp/lib/sprout/sprout/algorithm/fit/stable_partition_copy.hpp deleted file mode 100644 index 2de444d..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/stable_partition_copy.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_STABLE_PARTITION_COPY_HPP -#define SPROUT_ALGORITHM_FIT_STABLE_PARTITION_COPY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - stable_partition_copy_impl( - BidirectionalIterator const& first, BidirectionalIterator const& last, Result const& result, Predicate pred, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::stable_partition_copy(first, last, result, pred)), - offset, - offset + sprout::fit_size(result, sprout::count_if(first, last, pred)) - ); - } - } // namespace detail - // - // stable_partition_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - stable_partition_copy(BidirectionalIterator first, BidirectionalIterator last, Result const& result, Predicate pred) { - return sprout::fit::detail::stable_partition_copy_impl(first, last, result, pred, sprout::internal_begin_offset(result)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_STABLE_PARTITION_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/stable_sort.hpp b/dsp/lib/sprout/sprout/algorithm/fit/stable_sort.hpp deleted file mode 100644 index d2951e8..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/stable_sort.hpp +++ /dev/null @@ -1,71 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_STABLE_SORT_HPP -#define SPROUT_ALGORITHM_FIT_STABLE_SORT_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - stable_sort_impl( - Container const& cont, Compare comp, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::stable_sort(cont, comp)), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // stable_sort - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - stable_sort(Container const& cont, Compare comp) { - return sprout::fit::detail::stable_sort_impl(cont, comp, sprout::internal_begin_offset(cont)); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - stable_sort_impl( - Container const& cont, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::stable_sort(cont)), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // stable_sort - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - stable_sort(Container const& cont) { - return sprout::fit::detail::stable_sort_impl(cont, sprout::internal_begin_offset(cont)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_STABLE_SORT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/swap_element.hpp b/dsp/lib/sprout/sprout/algorithm/fit/swap_element.hpp deleted file mode 100644 index 20a0e92..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/swap_element.hpp +++ /dev/null @@ -1,55 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_SWAP_ELEMENT_HPP -#define SPROUT_ALGORITHM_FIT_SWAP_ELEMENT_HPP - -#include -#include -#include -#include -#include -#include -#include - - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - swap_element_impl( - Container const& cont, - typename sprout::container_traits::const_iterator pos1, - typename sprout::container_traits::const_iterator pos2, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::swap_element(cont, pos1, pos2)), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // swap_element - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - swap_element( - Container const& cont, - typename sprout::container_traits::const_iterator pos1, - typename sprout::container_traits::const_iterator pos2 - ) - { - return sprout::fit::detail::swap_element_impl(cont, pos1, pos2, sprout::internal_begin_offset(cont)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_SWAP_ELEMENT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/swap_element_copy.hpp b/dsp/lib/sprout/sprout/algorithm/fit/swap_element_copy.hpp deleted file mode 100644 index 1330085..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/swap_element_copy.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_SWAP_ELEMENT_COPY_HPP -#define SPROUT_ALGORITHM_FIT_SWAP_ELEMENT_COPY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - swap_element_copy_impl( - ForwardIterator const& first, ForwardIterator const& last, Result const& result, ForwardIterator const& pos1, ForwardIterator const& pos2, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::swap_element_copy(first, last, result, pos1, pos2)), - offset, - offset + sprout::fit_size(result, sprout::distance(first, last)) - ); - } - } // namespace detail - // - // swap_element_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - swap_element_copy(ForwardIterator first, ForwardIterator last, Result const& result, ForwardIterator pos1, ForwardIterator pos2) { - return sprout::fit::detail::swap_element_copy_impl(first, last, result, pos1, pos2, sprout::internal_begin_offset(result)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_SWAP_ELEMENT_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/transform.hpp b/dsp/lib/sprout/sprout/algorithm/fit/transform.hpp deleted file mode 100644 index 95c4bf4..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/transform.hpp +++ /dev/null @@ -1,75 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_TRANSFORM_HPP -#define SPROUT_ALGORITHM_FIT_TRANSFORM_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - transform_impl( - InputIterator const& first, InputIterator const& last, Result const& result, UnaryOperation op, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::transform(first, last, result, op)), - offset, - offset + sprout::fit_size(result, sprout::distance(first, last)) - ); - } - } // namespace detail - // - // transform - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - transform(InputIterator first, InputIterator last, Result const& result, UnaryOperation op) { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::fit::detail::transform_impl(first, last, result, op, sprout::internal_begin_offset(result)); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - transform_impl( - InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Result const& result, BinaryOperation op, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::transform(first1, last1, first2, result, op)), - offset, - offset + sprout::fit_size(result, sprout::distance(first1, last1)) - ); - } - } // namespace detail - // - // transform - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - transform(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Result const& result, BinaryOperation op) { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::fit::detail::transform_impl(first1, last1, first2, result, op, sprout::internal_begin_offset(result)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_TRANSFORM_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/unfold.hpp b/dsp/lib/sprout/sprout/algorithm/fit/unfold.hpp deleted file mode 100644 index 18b9992..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/unfold.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_UNFOLD_HPP -#define SPROUT_ALGORITHM_FIT_UNFOLD_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - unfold_impl( - Container const& cont, Generator const& gen, Init const& init, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::unfold(cont, gen, init)), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // unfold - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - unfold(Container const& cont, Generator const& gen, Init const& init) { - return sprout::fit::detail::unfold_impl(cont, gen, init, sprout::internal_begin_offset(cont)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_UNFOLD_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/unfold_n.hpp b/dsp/lib/sprout/sprout/algorithm/fit/unfold_n.hpp deleted file mode 100644 index 092a073..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/unfold_n.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_UNFOLD_N_HPP -#define SPROUT_ALGORITHM_FIT_UNFOLD_N_HPP - -#include -#include -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - unfold_n_impl( - Container const& cont, Size n, Generator const& gen, Init const& init, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::unfold_n(cont, n, gen, init)), - offset, - offset + NS_SSCRISK_CEL_OR_SPROUT::min::difference_type>(n, sprout::size(cont)) - ); - } - } // namespace detail - // - // unfold_n - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - unfold_n(Container const& cont, Size n, Generator const& gen, Init const& init) { - return sprout::fit::detail::unfold_n_impl(cont, n, gen, init, sprout::internal_begin_offset(cont)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_UNFOLD_N_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/unique.hpp b/dsp/lib/sprout/sprout/algorithm/fit/unique.hpp deleted file mode 100644 index 11fb354..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/unique.hpp +++ /dev/null @@ -1,72 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_UNIQUE_HPP -#define SPROUT_ALGORITHM_FIT_UNIQUE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - unique_impl( - Container const& cont, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::unique(cont)), - offset, - offset + sprout::size(cont) - sprout::detail::overlap_count(sprout::begin(cont), sprout::end(cont)) - ); - } - } // namespace detail - // - // unique - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - unique(Container const& cont) { - return sprout::fit::detail::unique_impl(cont, sprout::internal_begin_offset(cont)); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - unique_impl( - Container const& cont, BinaryPredicate pred, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::unique(cont, pred)), - offset, - offset + sprout::size(cont) - sprout::detail::overlap_count(sprout::begin(cont), sprout::end(cont), pred) - ); - } - } // namespace detail - // - // unique - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - unique(Container const& cont, BinaryPredicate pred) { - return sprout::fit::detail::unique_impl(cont, pred, sprout::internal_begin_offset(cont)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_UNIQUE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fit/unique_copy.hpp b/dsp/lib/sprout/sprout/algorithm/fit/unique_copy.hpp deleted file mode 100644 index f02ac04..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fit/unique_copy.hpp +++ /dev/null @@ -1,76 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIT_UNIQUE_COPY_HPP -#define SPROUT_ALGORITHM_FIT_UNIQUE_COPY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - unique_copy_impl( - InputIterator const& first, InputIterator const& last, Result const& result, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::unique_copy(first, last, result)), - offset, - offset + sprout::fit_size(result, sprout::distance(first, last) - sprout::detail::overlap_count(first, last)) - ); - } - } // namespace detail - // - // unique_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - unique_copy(InputIterator first, InputIterator last, Result const& result) { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::fit::detail::unique_copy_impl(first, last, result, sprout::internal_begin_offset(result)); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - unique_copy_impl( - InputIterator const& first, InputIterator const& last, Result const& result, BinaryPredicate pred, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::unique_copy(first, last, result, pred)), - offset, - offset + sprout::fit_size(result, sprout::distance(first, last) - sprout::detail::overlap_count(first, last, pred)) - ); - } - } // namespace detail - // - // unique_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - unique_copy(InputIterator first, InputIterator last, Result const& result, BinaryPredicate pred) { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::fit::detail::unique_copy_impl(first, last, result, pred, sprout::internal_begin_offset(result)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIT_UNIQUE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed.hpp b/dsp/lib/sprout/sprout/algorithm/fixed.hpp deleted file mode 100644 index 3923771..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed.hpp +++ /dev/null @@ -1,75 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_HPP -#define SPROUT_ALGORITHM_FIXED_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/bogo_sort.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/bogo_sort.hpp deleted file mode 100644 index 96258f9..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/bogo_sort.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_BOGO_SORT_HPP -#define SPROUT_ALGORITHM_FIXED_BOGO_SORT_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - // - // bogo_sort - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - bogo_sort(Container const& cont, UniformRandomNumberGenerator&& g, Compare comp) { - return sprout::first( - sprout::fixed::bogo_sort_result(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), comp) - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - bogo_sort(Container const& cont, UniformRandomNumberGenerator&& g) { - return sprout::first( - sprout::fixed::bogo_sort_result(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g)) - ); - } - } // namespace fixed - - using sprout::fixed::bogo_sort; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_BOGO_SORT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/bogo_sort_result.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/bogo_sort_result.hpp deleted file mode 100644 index 90638f4..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/bogo_sort_result.hpp +++ /dev/null @@ -1,105 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_BOGO_SORT_RESULT_HPP -#define SPROUT_ALGORITHM_FIXED_BOGO_SORT_RESULT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::pair - bogo_sort_result_impl_1( - sprout::pair const& current, - Compare comp, Difference n - ) - { - typedef sprout::pair type; - return current.second ? current - : n == 1 ? sprout::is_sorted(sprout::begin(sprout::first(current.first)), sprout::end(sprout::first(current.first)), comp) - ? type(current.first, true) - : type(sprout::fixed::shuffle_result(sprout::first(current.first), sprout::second(current.first)), false) - : sprout::fixed::detail::bogo_sort_result_impl_1( - sprout::fixed::detail::bogo_sort_result_impl_1( - current, - comp, n / 2 - ), - comp, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - bogo_sort_result_impl( - sprout::pair const& current, - Compare comp, Difference n - ) - { - return current.second ? current - : sprout::fixed::detail::bogo_sort_result_impl( - sprout::fixed::detail::bogo_sort_result_impl_1( - current, - comp, n - ), - comp, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::shuffle::type - bogo_sort_result(Container const& cont, UniformRandomNumberGenerator&& g, Compare comp) { - typedef typename sprout::fixed::results::shuffle::type result_type; - typedef sprout::pair type; - return sprout::is_sorted(sprout::begin(cont), sprout::end(cont), comp) - ? result_type(sprout::deep_copy(cont), SPROUT_FORWARD(UniformRandomNumberGenerator, g)) - : sprout::fixed::detail::bogo_sort_result_impl( - type(sprout::fixed::shuffle_result(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g)), false), - comp, static_cast::difference_type>(1) - ).first - ; - } - } // namespace detail - // - // bogo_sort_result - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::shuffle::type - bogo_sort_result(Container const& cont, UniformRandomNumberGenerator&& g, Compare comp) { - return sprout::fixed::detail::bogo_sort_result( - cont, - SPROUT_FORWARD(UniformRandomNumberGenerator, g), - comp - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::shuffle::type - bogo_sort_result(Container const& cont, UniformRandomNumberGenerator&& g) { - return sprout::fixed::detail::bogo_sort_result( - cont, - SPROUT_FORWARD(UniformRandomNumberGenerator, g), - NS_SSCRISK_CEL_OR_SPROUT::less::value_type>() - ); - } - } // namespace fixed - - using sprout::fixed::bogo_sort_result; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_BOGO_SORT_RESULT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/bozo_sort.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/bozo_sort.hpp deleted file mode 100644 index 62ff686..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/bozo_sort.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_BOZO_SORT_HPP -#define SPROUT_ALGORITHM_FIXED_BOZO_SORT_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - // - // bozo_sort - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - bozo_sort(Container const& cont, UniformRandomNumberGenerator&& g, Compare comp) { - return sprout::first( - sprout::fixed::bozo_sort_result(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), comp) - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - bozo_sort(Container const& cont, UniformRandomNumberGenerator&& g) { - return sprout::first( - sprout::fixed::bozo_sort_result(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g)) - ); - } - } // namespace fixed - - using sprout::fixed::bozo_sort; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_BOZO_SORT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/bozo_sort_result.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/bozo_sort_result.hpp deleted file mode 100644 index 40fc965..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/bozo_sort_result.hpp +++ /dev/null @@ -1,105 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_BOZO_SORT_RESULT_HPP -#define SPROUT_ALGORITHM_FIXED_BOZO_SORT_RESULT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::pair - bozo_sort_result_impl_1( - sprout::pair const& current, - Compare comp, Difference n - ) - { - typedef sprout::pair type; - return current.second ? current - : n == 1 ? sprout::is_sorted(sprout::begin(sprout::first(current.first)), sprout::end(sprout::first(current.first)), comp) - ? type(current.first, true) - : type(sprout::fixed::random_swap_result(sprout::first(current.first), sprout::second(current.first)), false) - : sprout::fixed::detail::bozo_sort_result_impl_1( - sprout::fixed::detail::bozo_sort_result_impl_1( - current, - comp, n / 2 - ), - comp, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - bozo_sort_result_impl( - sprout::pair const& current, - Compare comp, Difference n - ) - { - return current.second ? current - : sprout::fixed::detail::bozo_sort_result_impl( - sprout::fixed::detail::bozo_sort_result_impl_1( - current, - comp, n - ), - comp, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::shuffle::type - bozo_sort_result(Container const& cont, UniformRandomNumberGenerator&& g, Compare comp) { - typedef typename sprout::fixed::results::shuffle::type result_type; - typedef sprout::pair type; - return sprout::is_sorted(sprout::begin(cont), sprout::end(cont), comp) - ? result_type(sprout::deep_copy(cont), SPROUT_FORWARD(UniformRandomNumberGenerator, g)) - : sprout::fixed::detail::bozo_sort_result_impl( - type(sprout::fixed::random_swap_result(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g)), false), - comp, static_cast::difference_type>(1) - ).first - ; - } - } // namespace detail - // - // bozo_sort_result - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::shuffle::type - bozo_sort_result(Container const& cont, UniformRandomNumberGenerator&& g, Compare comp) { - return sprout::fixed::detail::bozo_sort_result( - cont, - SPROUT_FORWARD(UniformRandomNumberGenerator, g), - comp - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::shuffle::type - bozo_sort_result(Container const& cont, UniformRandomNumberGenerator&& g) { - return sprout::fixed::detail::bozo_sort_result( - cont, - SPROUT_FORWARD(UniformRandomNumberGenerator, g), - NS_SSCRISK_CEL_OR_SPROUT::less::value_type>() - ); - } - } // namespace fixed - - using sprout::fixed::bozo_sort_result; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_BOZO_SORT_RESULT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/clamp_range.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/clamp_range.hpp deleted file mode 100644 index 3b3a498..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/clamp_range.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_CLAMP_RANGE_HPP -#define SPROUT_ALGORITHM_FIXED_CLAMP_RANGE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - // - // clamp_range - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - clamp_range( - Container const& cont, - typename sprout::container_traits::value_type const& low, - typename sprout::container_traits::value_type const& high, - Compare comp - ) - { - return sprout::fixed::clamp_range_copy(sprout::begin(cont), sprout::end(cont), cont, low, high, comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - clamp_range( - Container const& cont, - typename sprout::container_traits::value_type const& low, - typename sprout::container_traits::value_type const& high - ) - { - return sprout::fixed::clamp_range_copy(sprout::begin(cont), sprout::end(cont), cont, low, high); - } - } // namespace fixed - - using sprout::fixed::clamp_range; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_CLAMP_RANGE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/clamp_range_copy.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/clamp_range_copy.hpp deleted file mode 100644 index 94c753c..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/clamp_range_copy.hpp +++ /dev/null @@ -1,261 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_CLAMP_RANGE_COPY_HPP -#define SPROUT_ALGORITHM_FIXED_CLAMP_RANGE_COPY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - clamp_range_copy_impl_ra( - RandomAccessIterator const& first, RandomAccessIterator, Result const& result, - typename std::iterator_traits::value_type const& low, - typename std::iterator_traits::value_type const& high, - Compare comp, - sprout::index_tuple, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::size_type size, - typename sprout::container_traits::size_type input_size - ) - { - return sprout::remake( - result, - sprout::size(result), - (Indexes >= offset && Indexes < offset + size && Indexes < offset + input_size - ? sprout::clamp(first[Indexes - offset], low, high, comp) - : *sprout::next(sprout::internal_begin(result), Indexes) - )... - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - clamp_range_copy( - RandomAccessIterator const& first, RandomAccessIterator const& last, Result const& result, - typename std::iterator_traits::value_type const& low, - typename std::iterator_traits::value_type const& high, - Compare comp, - std::random_access_iterator_tag* - ) - { - return sprout::fixed::detail::clamp_range_copy_impl_ra( - first, last, result, low, high, comp, - sprout::container_indexes::make(), - sprout::internal_begin_offset(result), - sprout::size(result), - sprout::distance(first, last) - ); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - clamp_range_copy_impl( - InputIterator const&, InputIterator const&, Result const& result, - typename std::iterator_traits::value_type const&, - typename std::iterator_traits::value_type const&, - Compare, - typename sprout::container_traits::size_type, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - clamp_range_copy_impl( - InputIterator const& first, InputIterator const& last, Result const& result, - typename std::iterator_traits::value_type const& low, - typename std::iterator_traits::value_type const& high, - Compare comp, - typename sprout::container_traits::size_type size, - Args const&... args - ) - { - return first != last && sizeof...(Args) < size - ? clamp_range_copy_impl( - sprout::next(first), last, result, low, high, comp, - size, - args..., sprout::clamp(*first, low, high, comp) - ) - : sprout::detail::container_complate(result, args...) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - clamp_range_copy( - InputIterator const& first, InputIterator const& last, Result const& result, - typename std::iterator_traits::value_type const& low, - typename std::iterator_traits::value_type const& high, - Compare comp, - std::input_iterator_tag* - ) - { - return sprout::fixed::detail::clamp_range_copy_impl(first, last, result, low, high, comp, sprout::size(result)); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - clamp_range_copy( - InputIterator const& first, InputIterator const& last, Result const& result, - typename std::iterator_traits::value_type const& low, - typename std::iterator_traits::value_type const& high, - Compare comp - ) - { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::fixed::detail::clamp_range_copy(first, last, result, low, high, comp, category()); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - clamp_range_copy( - InputIterator const& first, InputIterator const& last, Result const& result, - typename std::iterator_traits::value_type const& low, - typename std::iterator_traits::value_type const& high, - Compare comp - ) - { - return sprout::remake( - result, sprout::size(result), - sprout::make_clamp_iterator(first, low, high, comp), - sprout::make_clamp_iterator(last, low, high, comp) - ); - } - } // namespace detail - // - // clamp_range_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - clamp_range_copy( - InputIterator first, InputIterator last, Result const& result, - typename std::iterator_traits::value_type const& low, - typename std::iterator_traits::value_type const& high, - Compare comp - ) - { - return sprout::fixed::detail::clamp_range_copy(first, last, result, low, high, comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - clamp_range_copy( - InputIterator first, InputIterator last, Result const& result, - typename std::iterator_traits::value_type const& low, - typename std::iterator_traits::value_type const& high - ) - { - return sprout::fixed::clamp_range_copy( - first, last, result, low, high, - NS_SSCRISK_CEL_OR_SPROUT::less::value_type>() - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - clamp_range_copy( - InputIterator first, InputIterator last, - typename std::iterator_traits::value_type const& low, - typename std::iterator_traits::value_type const& high, - Compare comp - ) - { - return sprout::fixed::clamp_range_copy(first, last, sprout::pit(), low, high, comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - clamp_range_copy( - InputIterator first, InputIterator last, - typename std::iterator_traits::value_type const& low, - typename std::iterator_traits::value_type const& high - ) - { - return sprout::fixed::clamp_range_copy(first, last, sprout::pit(), low, high); - } - } // namespace fixed - - template< - typename InputIterator, typename Result, typename Compare, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - clamp_range_copy( - InputIterator first, InputIterator last, Result const& result, - typename std::iterator_traits::value_type const& low, - typename std::iterator_traits::value_type const& high, - Compare comp - ) - { - return sprout::fixed::clamp_range_copy(first, last, result, low, high, comp); - } - template< - typename InputIterator, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - clamp_range_copy( - InputIterator first, InputIterator last, Result const& result, - typename std::iterator_traits::value_type const& low, - typename std::iterator_traits::value_type const& high - ) - { - return sprout::fixed::clamp_range_copy(first, last, result, low, high); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - clamp_range_copy( - InputIterator first, InputIterator last, - typename std::iterator_traits::value_type const& low, - typename std::iterator_traits::value_type const& high, - Compare comp - ) - { - return sprout::fixed::clamp_range_copy(first, last, low, high, comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - clamp_range_copy( - InputIterator first, InputIterator last, - typename std::iterator_traits::value_type const& low, - typename std::iterator_traits::value_type const& high - ) - { - return sprout::fixed::clamp_range_copy(first, last, low, high); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_CLAMP_RANGE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/copy.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/copy.hpp deleted file mode 100644 index 40ca05b..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/copy.hpp +++ /dev/null @@ -1,156 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_COPY_HPP -#define SPROUT_ALGORITHM_FIXED_COPY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_impl_ra( - RandomAccessIterator const& first, RandomAccessIterator const&, Result const& result, - sprout::index_tuple, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::size_type size, - typename sprout::container_traits::size_type input_size - ) - { - return sprout::remake( - result, sprout::size(result), - (Indexes >= offset && sprout::math::less(Indexes, offset + size) && sprout::math::less(Indexes, offset + input_size) - ? first[Indexes - offset] - : *sprout::next(sprout::internal_begin(result), Indexes) - )... - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy( - RandomAccessIterator const& first, RandomAccessIterator const& last, Result const& result, - std::random_access_iterator_tag* - ) - { - return sprout::fixed::detail::copy_impl_ra( - first, last, result, - sprout::container_indexes::make(), - sprout::internal_begin_offset(result), - sprout::size(result), - sprout::distance(first, last) - ); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - copy_impl( - InputIterator const&, InputIterator const&, Result const& result, - typename sprout::container_traits::size_type, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - copy_impl( - InputIterator const& first, InputIterator const& last, Result const& result, - typename sprout::container_traits::size_type size, - Args const&... args - ) - { - return first != last && sizeof...(Args) < size - ? sprout::fixed::detail::copy_impl(sprout::next(first), last, result, size, args..., *first) - : sprout::detail::container_complate(result, args...) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy( - InputIterator const& first, InputIterator const& last, Result const& result, - std::input_iterator_tag* - ) - { - return sprout::fixed::detail::copy_impl(first, last, result, sprout::size(result)); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - copy(InputIterator const& first, InputIterator const& last, Result const& result) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::fixed::detail::copy(first, last, result, category()); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - copy(InputIterator const& first, InputIterator const& last, Result const& result) { - return sprout::remake( - result, sprout::size(result), - first, last - ); - } - } // namespace detail - // - // copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy(InputIterator first, InputIterator last, Result const& result) { - return sprout::fixed::detail::copy(first, last, result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy(InputIterator first, InputIterator last) { - return sprout::fixed::copy(first, last, sprout::pit()); - } - } // namespace fixed - - template< - typename InputIterator, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy(InputIterator first, InputIterator last, Result const& result) { - return sprout::fixed::copy(first, last, result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy(InputIterator first, InputIterator last) { - return sprout::fixed::copy(first, last); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/copy_backward.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/copy_backward.hpp deleted file mode 100644 index 631d921..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/copy_backward.hpp +++ /dev/null @@ -1,146 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_COPY_BACKWARD_HPP -#define SPROUT_ALGORITHM_FIXED_COPY_BACKWARD_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_backward_impl_ra( - RandomAccessIterator const&, RandomAccessIterator const& last, Result const& result, - sprout::index_tuple, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::size_type size, - typename sprout::container_traits::size_type input_size - ) - { - return sprout::remake( - result, sprout::size(result), - (Indexes < offset && sprout::math::greater_equal(Indexes + size, offset) && sprout::math::greater_equal(Indexes + input_size, offset) - ? last[Indexes - offset] - : *sprout::next(sprout::internal_begin(result), Indexes) - )... - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_backward( - RandomAccessIterator const& first, RandomAccessIterator const& last, Result const& result, - std::random_access_iterator_tag* - ) - { - return sprout::fixed::detail::copy_backward_impl_ra( - first, last, result, - sprout::container_indexes::make(), - sprout::internal_end_offset(result), - sprout::size(result), - sprout::distance(first, last) - ); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - copy_backward_impl( - BidirectionalIterator, BidirectionalIterator, Result const& result, - typename sprout::container_traits::size_type, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - copy_backward_impl( - BidirectionalIterator const& first, BidirectionalIterator const& last, Result const& result, - typename sprout::container_traits::size_type size, - Args const&... args - ) - { - return first != last && sizeof...(Args) < size - ? sprout::fixed::detail::copy_backward_impl(first, sprout::prev(last), result, size, *sprout::prev(last), args...) - : sprout::detail::container_complate_backward(result, args...) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_backward( - BidirectionalIterator const& first, BidirectionalIterator const& last, Result const& result, - std::bidirectional_iterator_tag* - ) - { - return sprout::fixed::detail::copy_backward_impl( - first, last, result, - sprout::size(result) - ); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - copy_backward(BidirectionalIterator const& first, BidirectionalIterator const& last, Result const& result) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::fixed::detail::copy_backward(first, last, result, category()); - } - } // namespace detail - // - // copy_backward - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_backward(BidirectionalIterator first, BidirectionalIterator last, Result const& result) { - return sprout::fixed::detail::copy_backward(first, last, result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_backward(BidirectionalIterator first, BidirectionalIterator last) { - return sprout::fixed::copy_backward(first, last, sprout::pit()); - } - } // namespace fixed - - template< - typename BidirectionalIterator, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_backward(BidirectionalIterator first, BidirectionalIterator last, Result const& result) { - return sprout::fixed::copy_backward(first, last, result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_backward(BidirectionalIterator first, BidirectionalIterator last) { - return sprout::fixed::copy_backward(first, last); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_COPY_BACKWARD_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/copy_if.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/copy_if.hpp deleted file mode 100644 index fe37c6d..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/copy_if.hpp +++ /dev/null @@ -1,111 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_COPY_IF_HPP -#define SPROUT_ALGORITHM_FIXED_COPY_IF_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - copy_if_impl(InputIterator const&, InputIterator const&, Result const& result, Predicate, - typename sprout::container_traits::size_type, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - copy_if_impl( - InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred, - typename sprout::container_traits::size_type size, - Args const&... args - ) - { - return first != last && sizeof...(Args) < size - ? pred(*first) - ? sprout::fixed::detail::copy_if_impl(sprout::next(first), last, result, pred, size, args..., *first) - : sprout::fixed::detail::copy_if_impl(sprout::next(first), last, result, pred, size, args...) - : sprout::detail::container_complate(result, args...) - ; - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - copy_if(InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred) { - return sprout::fixed::detail::copy_if_impl(first, last, result, pred, sprout::size(result)); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - copy_if(InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred) { - return sprout::remake( - result, sprout::size(result), - sprout::make_filter_iterator(pred, first, last), - sprout::make_filter_iterator(pred, last, last) - ); - } - } // namespace detail - // - // copy_if - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_if(InputIterator first, InputIterator last, Result const& result, Predicate pred) { - return sprout::fixed::detail::copy_if(first, last, result, pred); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_if(InputIterator first, InputIterator last, Predicate pred) { - return sprout::fixed::copy_if(first, last, sprout::pit(), pred); - } - } // namespace fixed - - template< - typename InputIterator, typename Result, typename Predicate, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_if(InputIterator first, InputIterator last, Result const& result, Predicate pred) { - return sprout::fixed::copy_if(first, last, result, pred); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_if(InputIterator first, InputIterator last, Predicate pred) { - return sprout::fixed::copy_if(first, last, pred); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_COPY_IF_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/copy_n.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/copy_n.hpp deleted file mode 100644 index 55a5ec7..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/copy_n.hpp +++ /dev/null @@ -1,129 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_COPY_N_HPP -#define SPROUT_ALGORITHM_FIXED_COPY_N_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_n( - RandomAccessIterator const& first, Size n, Result const& result, - std::random_access_iterator_tag* - ) - { - return sprout::fixed::copy(first, sprout::next(first, n), result); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - copy_n_impl(InputIterator, Size, Result const& result, - typename sprout::container_traits::difference_type, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - copy_n_impl( - InputIterator const& first, Size n, Result const& result, - typename sprout::container_traits::difference_type offset, - Args const&... args - ) - { - return n != 0 && sprout::math::less(sizeof...(Args), offset) - ? sprout::fixed::detail::copy_n_impl(sprout::next(first), n - 1, result, offset, args..., *first) - : sprout::detail::container_complate(result, args...) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_n( - InputIterator const& first, Size n, Result const& result, - std::input_iterator_tag* - ) - { - return sprout::fixed::detail::copy_n_impl(first, n, result, sprout::size(result)); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - copy_n(InputIterator const& first, Size n, Result const& result) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::fixed::detail::copy_n(first, n, result, category()); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - copy_n(InputIterator const& first, Size n, Result const& result) { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::fixed::copy(first, sprout::next(first, n), result); - } - } // namespace detail - // - // copy_n - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_n(InputIterator first, Size n, Result const& result) { - return sprout::fixed::detail::copy_n(first, n, result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_n(InputIterator first, Size n) { - return sprout::fixed::copy_n(first, n, sprout::pit()); - } - } // namespace fixed - - template< - typename InputIterator, typename Size, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_n(InputIterator first, Size n, Result const& result) { - return sprout::fixed::copy_n(first, n, result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_n(InputIterator first, Size n) { - return sprout::fixed::copy_n(first, n); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_COPY_N_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/copy_until.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/copy_until.hpp deleted file mode 100644 index 1fefff7..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/copy_until.hpp +++ /dev/null @@ -1,134 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_COPY_UNTIL_HPP -#define SPROUT_ALGORITHM_FIXED_COPY_UNTIL_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_until( - RandomAccessIterator const& first, RandomAccessIterator const& last, Result const& result, Predicate pred, - std::random_access_iterator_tag* - ) - { - return sprout::fixed::copy(first, sprout::find_if(first, last, pred), result); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - copy_until_impl( - InputIterator const&, InputIterator const&, Result const& result, Predicate, - typename sprout::container_traits::size_type, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - copy_until_impl( - InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred, - typename sprout::container_traits::size_type size, - Args const&... args - ) - { - return first != last && sizeof...(Args) < size && !pred(*first) - ? sprout::fixed::detail::copy_until_impl(sprout::next(first), last, result, pred, size, args..., *first) - : sprout::detail::container_complate(result, args...) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_until( - InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred, - std::input_iterator_tag* - ) - { - return sprout::fixed::detail::copy_until_impl(first, last, result, pred, sprout::size(result)); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - copy_until(InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::fixed::detail::copy_until(first, last, result, pred, category()); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - copy_until(InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred) { - return sprout::remake( - result, sprout::size(result), - sprout::make_while_iterator(sprout::not1(pred), first, last), - sprout::make_while_iterator(sprout::not1(pred), last, last) - ); - } - } // namespace detail - // - // copy_until - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_until(InputIterator first, InputIterator last, Result const& result, Predicate pred) { - return sprout::fixed::detail::copy_until(first, last, result, pred); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_until(InputIterator first, InputIterator last, Predicate pred) { - return sprout::fixed::copy_until(first, last, sprout::pit(), pred); - } - } // namespace fixed - - template< - typename InputIterator, typename Result, typename Predicate, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_until(InputIterator first, InputIterator last, Result const& result, Predicate pred) { - return sprout::fixed::copy_until(first, last, result, pred); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_until(InputIterator first, InputIterator last, Predicate pred) { - return sprout::fixed::copy_until(first, last, pred); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_COPY_UNTIL_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/copy_while.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/copy_while.hpp deleted file mode 100644 index 96a7d42..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/copy_while.hpp +++ /dev/null @@ -1,133 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_COPY_WHILE_HPP -#define SPROUT_ALGORITHM_FIXED_COPY_WHILE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_while( - RandomAccessIterator const& first, RandomAccessIterator const& last, Result const& result, Predicate pred, - std::random_access_iterator_tag* - ) - { - return sprout::fixed::copy(first, sprout::find_if_not(first, last, pred), result); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - copy_while_impl( - InputIterator const&, InputIterator const&, Result const& result, Predicate, - typename sprout::container_traits::size_type, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - copy_while_impl( - InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred, - typename sprout::container_traits::size_type size, - Args const&... args - ) - { - return first != last && sizeof...(Args) < size && pred(*first) - ? sprout::fixed::detail::copy_while_impl(sprout::next(first), last, result, pred, size, args..., *first) - : sprout::detail::container_complate(result, args...) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_while( - InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred, - std::input_iterator_tag* - ) - { - return sprout::fixed::detail::copy_while_impl(first, last, result, pred, sprout::size(result)); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - copy_while(InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::fixed::detail::copy_while(first, last, result, pred, category()); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - copy_while(InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred) { - return sprout::remake( - result, sprout::size(result), - sprout::make_while_iterator(pred, first, last), - sprout::make_while_iterator(pred, last, last) - ); - } - } // namespace detail - // - // copy_while - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_while(InputIterator first, InputIterator last, Result const& result, Predicate pred) { - return sprout::fixed::detail::copy_while(first, last, result, pred); - } - - template< typename Result, typename InputIterator,typename Predicate> - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_while(InputIterator first, InputIterator last, Predicate pred) { - return sprout::fixed::copy_while(first, last, sprout::pit(), pred); - } - } // namespace fixed - - template< - typename InputIterator, typename Result, typename Predicate, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_while(InputIterator first, InputIterator last, Result const& result, Predicate pred) { - return sprout::fixed::copy_while(first, last, result, pred); - } - - template< typename Result, typename InputIterator,typename Predicate> - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_while(InputIterator first, InputIterator last, Predicate pred) { - return sprout::fixed::copy_while(first, last, pred); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_COPY_WHILE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/deprecated/sort.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/deprecated/sort.hpp deleted file mode 100644 index 1741234..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/deprecated/sort.hpp +++ /dev/null @@ -1,262 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_DEPRECATED_SORT_HPP -#define SPROUT_ALGORITHM_FIXED_DEPRECATED_SORT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - sort_lr( - Container const& cont, - typename sprout::container_traits::difference_type start, - typename sprout::container_traits::difference_type end, - Compare comp, - typename sprout::container_traits::difference_type l, - typename sprout::container_traits::difference_type r, - typename sprout::container_traits::value_type const& p - ); - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - sort_start( - Container const& cont, - typename sprout::container_traits::difference_type start, - typename sprout::container_traits::difference_type end, - Compare comp - ); - - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::value_type const& - sort_select_pivot( - RandomAccessIterator const& origin, - typename sprout::container_traits::difference_type start, - typename sprout::container_traits::difference_type end - ) - { // select pivot (center) - return *sprout::next(origin, (end + start) / 2); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::difference_type - sort_find_l( - RandomAccessIterator const& origin, - Compare comp, - typename sprout::container_traits::difference_type l, - typename sprout::container_traits::value_type const& p - ) - { // find left - return comp(*sprout::next(origin, l), p) - ? sprout::fixed::detail::sort_find_l(origin, comp, l + 1, p) - : l - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::difference_type - sort_find_r( - RandomAccessIterator const& origin, - Compare comp, - typename sprout::container_traits::difference_type r, - typename sprout::container_traits::value_type const& p - ) - { // find right - return comp(p, *sprout::next(origin, r)) - ? sprout::fixed::detail::sort_find_r(origin, comp, r - 1, p) - : r - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - sort_part_l( - Container const& cont, - typename sprout::container_traits::difference_type start, - Compare comp, - typename sprout::container_traits::difference_type l - ) - { // sort left side - return start < l - 1 - ? sprout::fixed::detail::sort_start(cont, start, l - 1, comp) - : sprout::deep_copy(cont) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - sort_part_r( - Container const& cont, - typename sprout::container_traits::difference_type end, - Compare comp, - typename sprout::container_traits::difference_type r - ) - { // sort right side - return r + 1 < end - ? sprout::fixed::detail::sort_start(cont, r + 1, end, comp) - : sprout::deep_copy(cont) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - sort_part_lr( - Container const& cont, - typename sprout::container_traits::difference_type start, - typename sprout::container_traits::difference_type end, - Compare comp, - typename sprout::container_traits::difference_type l, - typename sprout::container_traits::difference_type r - ) - { // sort both side - return sprout::fixed::detail::sort_part_r( - sprout::fixed::detail::sort_part_l(cont, start, comp, l), - end, - comp, - r - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - sort_next( - Container const& cont, - typename sprout::container_traits::difference_type start, - typename sprout::container_traits::difference_type end, - Compare comp, - typename sprout::container_traits::difference_type l, - typename sprout::container_traits::difference_type r, - typename sprout::container_traits::value_type const& p - ) - { // comparing right and left, sort both side, or swap and continue - return l >= r - ? sprout::fixed::detail::sort_part_lr(cont, start, end, comp, l, r) - : sprout::fixed::detail::sort_lr( - sprout::fixed::swap_element( - cont, - sprout::next(sprout::internal_begin(cont), l), - sprout::next(sprout::internal_begin(cont), r) - ), - start, - end, - comp, - l + 1, - r - 1, - p - ) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - sort_lr( - Container const& cont, - typename sprout::container_traits::difference_type start, - typename sprout::container_traits::difference_type end, - Compare comp, - typename sprout::container_traits::difference_type l, - typename sprout::container_traits::difference_type r, - typename sprout::container_traits::value_type const& p - ) - { // find left and right - return sprout::fixed::detail::sort_next( - cont, - start, - end, - comp, - sprout::fixed::detail::sort_find_l(sprout::internal_begin(cont), comp, l, p), - sprout::fixed::detail::sort_find_r(sprout::internal_begin(cont), comp, r, p), - p - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - sort_start( - Container const& cont, - typename sprout::container_traits::difference_type start, - typename sprout::container_traits::difference_type end, - Compare comp - ) - { // start sort - return sprout::fixed::detail::sort_lr( - cont, - start, - end, - comp, - start, - end, - sprout::fixed::detail::sort_select_pivot(sprout::internal_begin(cont), start, end) - ); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - (sprout::container_traits::static_size <= 1), - typename sprout::fixed::results::algorithm::type - >::type - sort(Container const& cont, Compare comp) { - return sprout::deep_copy(cont); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - (sprout::container_traits::static_size > 1), - typename sprout::fixed::results::algorithm::type - >::type - sort(Container const& cont, Compare comp) { - return sprout::fixed::detail::sort_start( - cont, - sprout::internal_begin_offset(cont), - sprout::distance(sprout::internal_begin(cont), sprout::end(cont) - 1), - comp - ); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - (sprout::container_traits::static_size <= 1), - typename sprout::fixed::results::algorithm::type - >::type - sort(Container const& cont) { - return sprout::deep_copy(cont); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - (sprout::container_traits::static_size > 1), - typename sprout::fixed::results::algorithm::type - >::type - sort(Container const& cont) { - return sprout::fixed::detail::sort_start( - cont, - sprout::internal_begin_offset(cont), - sprout::distance(sprout::internal_begin(cont), sprout::end(cont) - 1), - NS_SSCRISK_CEL_OR_SPROUT::less::value_type>() - ); - } - } // namespace detail - namespace deprecated { - // - // sort - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - sort(Container const& cont, Compare comp) { - return sprout::fixed::detail::sort(cont, comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - sort(Container const& cont) { - return sprout::fixed::detail::sort(cont); - } - } // namespace deprecated - } // namespace fixed - - namespace deprecated { - using sprout::fixed::deprecated::sort; - } // namespace deprecated -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_DEPRECATED_SORT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/fill.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/fill.hpp deleted file mode 100644 index fa5cbb3..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/fill.hpp +++ /dev/null @@ -1,87 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_FILL_HPP -#define SPROUT_ALGORITHM_FIXED_FILL_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - fill_impl( - Container const& cont, T const& value, - sprout::index_tuple, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::size_type size - ) - { - return sprout::remake( - cont, sprout::size(cont), - (Indexes >= offset && Indexes < offset + size - ? value - : *sprout::next(sprout::internal_begin(cont), Indexes) - )... - ); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - fill(Container const& cont, T const& value) { - return sprout::fixed::detail::fill_impl( - cont, value, - sprout::container_indexes::make(), - sprout::internal_begin_offset(cont), - sprout::size(cont) - ); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - fill(Container const& cont, T const& value) { - return sprout::remake( - cont, sprout::size(cont), - sprout::value_iterator(value, sprout::size(cont)), - sprout::value_iterator(value, 0) - ); - } - } // namespace detail - // - // fill - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - fill(Container const& cont, T const& value) { - return sprout::fixed::detail::fill(cont, value); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - fill(T const& value) { - return sprout::fixed::fill(sprout::pit(), value); - } - } // namespace fixed - - using sprout::fixed::fill; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_FILL_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/fill_n.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/fill_n.hpp deleted file mode 100644 index 4abd1de..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/fill_n.hpp +++ /dev/null @@ -1,85 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_FILL_N_HPP -#define SPROUT_ALGORITHM_FIXED_FILL_N_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - fill_n(Container const& cont, Size n, T const& value) { - return sprout::fixed::detail::fill_impl( - cont, value, - sprout::container_indexes::make(), - sprout::internal_begin_offset(cont), - n - ); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - fill_n(Container const& cont, Size n, T const& value) { - return sprout::remake( - cont, n, - sprout::value_iterator(value, n), - sprout::value_iterator(value, 0) - ); - } - } // namespace detail - // - // fill_n - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - fill_n(Container const& cont, Size n, T const& value) { - return sprout::fixed::detail::fill_n(cont, n, value); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - fill_n(Size n, T const& value) { - return sprout::fixed::fill_n(sprout::pit(), n, value); - } - } // namespace fixed - - template< - typename Container, typename Size, typename T, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - fill_n(Container const& cont, Size n, T const& value) { - return sprout::fixed::fill_n(cont, n, value); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - fill_n(Size n, T const& value) { - return sprout::fixed::fill_n(n, value); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_FILL_N_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/generate.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/generate.hpp deleted file mode 100644 index 7fec7cd..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/generate.hpp +++ /dev/null @@ -1,102 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_GENERATE_HPP -#define SPROUT_ALGORITHM_FIXED_GENERATE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args) + 1, - typename sprout::fixed::results::algorithm::type - >::type - generate_impl_1( - Container const& cont, Next const& next, - typename sprout::container_traits::size_type size, - Args const&... args - ) - { - return sprout::remake(cont, size, args..., sprout::generators::generated_value(next)); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args) + 1, - typename sprout::fixed::results::algorithm::type - >::type - generate_impl_1( - Container const& cont, Next const& next, - typename sprout::container_traits::size_type size, - Args const&... args - ) - { - return sizeof...(Args) + 1 < size - ? sprout::fixed::detail::generate_impl_1( - cont, sprout::generators::next_generator(next)(), size, - args..., sprout::generators::generated_value(next) - ) - : sprout::detail::container_complate(cont, args..., sprout::generators::generated_value(next)) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == 0, - typename sprout::fixed::results::algorithm::type - >::type - generate_impl( - Container const& cont, Generator const&, - typename sprout::container_traits::size_type size - ) - { - return sprout::remake(cont, size); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != 0, - typename sprout::fixed::results::algorithm::type - >::type - generate_impl( - Container const& cont, Generator const& gen, - typename sprout::container_traits::size_type size - ) - { - return size > 0 - ? sprout::fixed::detail::generate_impl_1(cont, gen(), size) - : sprout::detail::container_complate(cont) - ; - } - } // namespace detail - // - // generate - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - generate(Container const& cont, Generator const& gen) { - return sprout::fixed::detail::generate_impl(cont, gen, sprout::size(cont)); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - generate(Generator const& gen) { - return sprout::fixed::generate(sprout::pit(), gen); - } - } // namespace fixed - - using sprout::fixed::generate; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_GENERATE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/generate_n.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/generate_n.hpp deleted file mode 100644 index 7e5644d..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/generate_n.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_GENERATE_N_HPP -#define SPROUT_ALGORITHM_FIXED_GENERATE_N_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - // - // generate_n - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - generate_n(Container const& cont, Size n, Generator const& gen) { - return sprout::fixed::detail::generate_impl(cont, gen, n); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - generate_n(Size n, Generator const& gen) { - return sprout::fixed::generate_n(sprout::pit(), n, gen); - } - } // namespace fixed - - template< - typename Container, typename Size, typename Generator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - generate_n(Container const& cont, Size n, Generator const& gen) { - return sprout::fixed::generate_n(cont, n, gen); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - generate_n(Size n, Generator const& gen) { - return sprout::fixed::generate_n(n, gen); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_GENERATE_N_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/inplace_merge.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/inplace_merge.hpp deleted file mode 100644 index ee840ca..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/inplace_merge.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_INPLACE_MERGE_HPP -#define SPROUT_ALGORITHM_FIXED_INPLACE_MERGE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - // - // inplace_merge - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - inplace_merge(Container const& cont, typename sprout::container_traits::const_iterator middle, Compare comp) { - return sprout::fixed::merge( - sprout::begin(cont), middle, - middle, sprout::end(cont), - cont, comp - ); - } - // - // inplace_merge - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - inplace_merge(Container const& cont, typename sprout::container_traits::const_iterator middle) { - return sprout::fixed::merge( - sprout::begin(cont), middle, - middle, sprout::end(cont), - cont - ); - } - } // namespace fixed - - using sprout::fixed::inplace_merge; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_INPLACE_MERGE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/make_heap.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/make_heap.hpp deleted file mode 100644 index 7ac63e4..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/make_heap.hpp +++ /dev/null @@ -1,249 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_MAKE_HEAP_HPP -#define SPROUT_ALGORITHM_FIXED_MAKE_HEAP_HPP - -#include -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT -#ifdef SPROUT_WORKAROUND_NOT_TERMINATE_RECURSIVE_CONSTEXPR_FUNCTION_TEMPLATE -# include -#endif - -namespace sprout { - namespace fixed { - namespace detail { -#ifdef SPROUT_WORKAROUND_NOT_TERMINATE_RECURSIVE_CONSTEXPR_FUNCTION_TEMPLATE - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - make_heap_impl( - Container const& cont, Compare comp, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::difference_type size, - typename sprout::container_traits::difference_type n = 0, - typename sprout::container_traits::difference_type l = 1, - typename sprout::container_traits::difference_type r = 2 - ); - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - make_heap_impl( - Container const& cont, Compare comp, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::difference_type size, - typename sprout::container_traits::difference_type n = 0, - typename sprout::container_traits::difference_type l = 1, - typename sprout::container_traits::difference_type r = 2 - ); - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - make_heap_impl_1( - Container const& cont, Compare comp, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::difference_type size, - typename sprout::container_traits::difference_type n, - typename sprout::container_traits::difference_type l, - typename sprout::container_traits::difference_type r - ) - { - return comp(*sprout::next(sprout::internal_begin(cont), offset + l), *sprout::next(sprout::internal_begin(cont), offset + r)) - ? comp(*sprout::next(sprout::internal_begin(cont), offset + n), *sprout::next(sprout::internal_begin(cont), offset + r)) - ? sprout::fixed::detail::make_heap_impl( - sprout::fixed::swap_element( - cont, - sprout::next(sprout::internal_begin(cont), offset + n), - sprout::next(sprout::internal_begin(cont), offset + r) - ), - comp, - offset, size, r, r * 2 + 1, r * 2 + 2 - ) - : sprout::deep_copy(cont) - : comp(*sprout::next(sprout::internal_begin(cont), offset + n), *sprout::next(sprout::internal_begin(cont), offset + l)) - ? sprout::fixed::detail::make_heap_impl( - sprout::fixed::swap_element( - cont, - sprout::next(sprout::internal_begin(cont), offset + n), - sprout::next(sprout::internal_begin(cont), offset + l) - ), - comp, - offset, size, l, l * 2 + 1, l * 2 + 2 - ) - : sprout::deep_copy(cont) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - make_heap_impl_1( - Container const&, Compare, - typename sprout::container_traits::difference_type, - typename sprout::container_traits::difference_type, - typename sprout::container_traits::difference_type, - typename sprout::container_traits::difference_type, - typename sprout::container_traits::difference_type - ) - { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - make_heap_impl( - Container const& cont, Compare comp, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::difference_type size, - typename sprout::container_traits::difference_type n, - typename sprout::container_traits::difference_type l, - typename sprout::container_traits::difference_type r - ) - { - return r > size - ? sprout::deep_copy(cont) - : r == size - ? comp(*sprout::next(sprout::internal_begin(cont), offset + n), *sprout::next(sprout::internal_begin(cont), offset + l)) - ? sprout::fixed::swap_element( - cont, - sprout::next(sprout::internal_begin(cont), offset + n), - sprout::next(sprout::internal_begin(cont), offset + l) - ) - : sprout::deep_copy(cont) - : sprout::fixed::detail::make_heap_impl_1( - sprout::fixed::detail::make_heap_impl( - sprout::fixed::detail::make_heap_impl(cont, comp, offset, size, l, l * 2 + 1, l * 2 + 2), - comp, - offset, size, - r, r * 2 + 1, r * 2 + 2 - ), - comp, - offset, size, n, l, r - ) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - make_heap_impl( - Container const&, Compare, - typename sprout::container_traits::difference_type, - typename sprout::container_traits::difference_type, - typename sprout::container_traits::difference_type, - typename sprout::container_traits::difference_type, - typename sprout::container_traits::difference_type - ) - { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } -#else - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - make_heap_impl( - Container const& cont, Compare comp, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::difference_type size, - typename sprout::container_traits::difference_type n = 0, - typename sprout::container_traits::difference_type l = 1, - typename sprout::container_traits::difference_type r = 2 - ); - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - make_heap_impl_1( - Container const& cont, Compare comp, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::difference_type size, - typename sprout::container_traits::difference_type n, - typename sprout::container_traits::difference_type l, - typename sprout::container_traits::difference_type r - ) - { - return comp(*sprout::next(sprout::internal_begin(cont), offset + l), *sprout::next(sprout::internal_begin(cont), offset + r)) - ? comp(*sprout::next(sprout::internal_begin(cont), offset + n), *sprout::next(sprout::internal_begin(cont), offset + r)) - ? sprout::fixed::detail::make_heap_impl( - sprout::fixed::swap_element( - cont, - sprout::next(sprout::internal_begin(cont), offset + n), - sprout::next(sprout::internal_begin(cont), offset + r) - ), - comp, - offset, size, r, r * 2 + 1, r * 2 + 2 - ) - : sprout::deep_copy(cont) - : comp(*sprout::next(sprout::internal_begin(cont), offset + n), *sprout::next(sprout::internal_begin(cont), offset + l)) - ? sprout::fixed::detail::make_heap_impl( - sprout::fixed::swap_element( - cont, - sprout::next(sprout::internal_begin(cont), offset + n), - sprout::next(sprout::internal_begin(cont), offset + l) - ), - comp, - offset, size, l, l * 2 + 1, l * 2 + 2 - ) - : sprout::deep_copy(cont) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - make_heap_impl( - Container const& cont, Compare comp, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::difference_type size, - typename sprout::container_traits::difference_type n, - typename sprout::container_traits::difference_type l, - typename sprout::container_traits::difference_type r - ) - { - return r > size - ? sprout::deep_copy(cont) - : r == size - ? comp(*sprout::next(sprout::internal_begin(cont), offset + n), *sprout::next(sprout::internal_begin(cont), offset + l)) - ? sprout::fixed::swap_element( - cont, - sprout::next(sprout::internal_begin(cont), offset + n), - sprout::next(sprout::internal_begin(cont), offset + l) - ) - : sprout::deep_copy(cont) - : sprout::fixed::detail::make_heap_impl_1( - sprout::fixed::detail::make_heap_impl( - sprout::fixed::detail::make_heap_impl(cont, comp, offset, size, l, l * 2 + 1, l * 2 + 2), - comp, - offset, size, - r, r * 2 + 1, r * 2 + 2 - ), - comp, - offset, size, n, l, r - ) - ; - } -#endif - } // namespace detail - // - // make_heap - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - make_heap(Container const& cont, Compare comp) { - return sprout::fixed::detail::make_heap_impl( - cont, comp, - sprout::internal_begin_offset(cont), - sprout::size(cont) - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - make_heap(Container const& cont) { - return sprout::fixed::detail::make_heap_impl( - cont, NS_SSCRISK_CEL_OR_SPROUT::less::value_type>(), - sprout::internal_begin_offset(cont), - sprout::size(cont) - ); - } - } // namespace fixed - - using sprout::fixed::make_heap; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_MAKE_HEAP_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/make_partial_heap.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/make_partial_heap.hpp deleted file mode 100644 index 7c89023..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/make_partial_heap.hpp +++ /dev/null @@ -1,99 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_MAKE_PARTIAL_HEAP_HPP -#define SPROUT_ALGORITHM_FIXED_MAKE_PARTIAL_HEAP_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - make_partial_heap_impl_1( - Container const& cont, Compare comp, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::difference_type size, - typename sprout::container_traits::difference_type middle_size, - typename sprout::container_traits::difference_type n - ) - { - return n < size - ? comp(*sprout::next(sprout::internal_begin(cont), offset + n), *sprout::next(sprout::internal_begin(cont), offset)) - ? sprout::fixed::detail::make_partial_heap_impl_1( - sprout::fixed::detail::pop_heap_impl( - sprout::fixed::swap_element( - cont, - sprout::next(sprout::internal_begin(cont), offset + n), - sprout::next(sprout::internal_begin(cont), offset) - ), - comp, - offset, middle_size - ), - comp, - offset, size, middle_size, n + 1 - ) - : sprout::fixed::detail::make_partial_heap_impl_1(cont, comp, offset, size, middle_size, n + 1) - : sprout::deep_copy(cont) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - make_partial_heap_impl( - Container const& cont, Compare comp, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::difference_type size, - typename sprout::container_traits::difference_type middle_size - ) - { - return sprout::fixed::detail::make_partial_heap_impl_1( - sprout::fixed::detail::make_heap_impl(cont, comp, offset, middle_size), comp, - offset, size, middle_size, middle_size - ); - } - } // namespace detail - // - // make_partial_heap - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - make_partial_heap(Container const& cont, typename sprout::container_traits::const_iterator middle, Compare comp) { - return sprout::fixed::detail::make_partial_heap_impl( - cont, comp, - sprout::internal_begin_offset(cont), - sprout::size(cont), - sprout::distance(sprout::begin(cont), middle) - ); - } - // - // make_partial_heap - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - make_partial_heap(Container const& cont, typename sprout::container_traits::const_iterator middle) { - return sprout::fixed::detail::make_partial_heap_impl( - cont, NS_SSCRISK_CEL_OR_SPROUT::less::value_type>(), - sprout::internal_begin_offset(cont), - sprout::size(cont), - sprout::distance(sprout::begin(cont), middle) - ); - } - } // namespace fixed - - using sprout::fixed::make_partial_heap; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_MAKE_PARTIAL_HEAP_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/merge.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/merge.hpp deleted file mode 100644 index b2fa193..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/merge.hpp +++ /dev/null @@ -1,211 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_MERGE_HPP -#define SPROUT_ALGORITHM_FIXED_MERGE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - merge_impl( - InputIterator1, InputIterator1, - InputIterator2, InputIterator2, - Result const& result, Compare, - typename sprout::container_traits::size_type, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - merge_impl( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp, - typename sprout::container_traits::size_type size, - Args const&... args - ) - { - return sizeof...(Args) < size - ? first1 != last1 - ? first2 != last2 - ? comp(*first2, *first1) - ? sprout::fixed::detail::merge_impl( - first1, last1, sprout::next(first2), last2, result, comp, - size, args..., *first2 - ) - : sprout::fixed::detail::merge_impl( - sprout::next(first1), last1, first2, last2, result, comp, - size, args..., *first1 - ) - : sprout::fixed::detail::merge_impl( - sprout::next(first1), last1, first2, last2, result, comp, - size, args..., *first1 - ) - : first2 != last2 - ? sprout::fixed::detail::merge_impl( - first1, last1, sprout::next(first2), last2, result, comp, - size, args..., *first2 - ) - : sprout::detail::container_complate(result, args...) - : sprout::detail::container_complate(result, args...) - ; - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - merge( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp - ) - { - return sprout::fixed::detail::merge_impl( - first1, last1, - first2, last2, - result, comp, - sprout::size(result) - ); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - merge( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp - ) - { - return sprout::remake( - result, sprout::size(result), - sprout::make_merge_iterator(first1, last1, first2, last2, comp), - sprout::make_merge_iterator(last1, last1, last2, last2, comp) - ); - } - } // namespace detail - // - // merge - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - merge( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp - ) - { - return sprout::fixed::detail::merge(first1, last1, first2, last2, result, comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - merge( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result - ) - { - return sprout::fixed::merge(first1, last1, first2, last2, result, sprout::less<>()); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - merge( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Compare comp - ) - { - return sprout::fixed::merge(first1, last1, first2, last2, sprout::pit(), comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - merge( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2 - ) - { - return sprout::fixed::merge(first1, last1, first2, last2, sprout::pit()); - } - } // namespace fixed - - template< - typename InputIterator1, typename InputIterator2, typename Result, typename Compare, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - merge( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp - ) - { - return sprout::fixed::merge(first1, last1, first2, last2, result, comp); - } - template< - typename InputIterator1, typename InputIterator2, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - merge( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result - ) - { - return sprout::fixed::merge(first1, last1, first2, last2, result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - merge( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Compare comp - ) - { - return sprout::fixed::merge(first1, last1, first2, last2, comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - merge( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2 - ) - { - return sprout::fixed::merge(first1, last1, first2, last2); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_MERGE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/next_permutation.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/next_permutation.hpp deleted file mode 100644 index 339cfbb..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/next_permutation.hpp +++ /dev/null @@ -1,132 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_NEXT_PERMUTATION_HPP -#define SPROUT_ALGORITHM_FIXED_NEXT_PERMUTATION_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#if SPROUT_GCC_EARLIER(4, 8, 2) -# include -# include -#else -# include -# include -#endif -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR Result - next_permutation_impl_4(Container const& cont, Difference d) { - return Result( -#if SPROUT_GCC_EARLIER(4, 8, 2) - sprout::range::fixed::copy_backward(sprout::fit::reverse_copy(sprout::next(sprout::begin(cont), d), sprout::end(cont), cont), cont), -#else - sprout::fixed::copy_backward(sprout::make_reverse_iterator(sprout::end(cont)), sprout::make_reverse_iterator(sprout::next(sprout::begin(cont), d)), cont), -#endif - true - ); - } - template - inline SPROUT_CONSTEXPR Result - next_permutation_impl_3( - Container const& cont, Compare comp, - BidirectionalIterator const& first, BidirectionalIterator const& last, - BidirectionalIterator const& i, BidirectionalIterator const& ii, BidirectionalIterator const& j - ) - { - return !comp(*i, *sprout::prev(j)) ? sprout::fixed::detail::next_permutation_impl_3( - cont, comp, first, last, - i, ii, sprout::prev(j) - ) - : sprout::fixed::detail::next_permutation_impl_4( - sprout::fixed::swap_element(cont, i, sprout::prev(j)), - sprout::distance(first, ii) - ) - ; - } - template - inline SPROUT_CONSTEXPR Result - next_permutation_impl_2( - Container const& cont, Compare comp, - BidirectionalIterator const& first, BidirectionalIterator const& last, - BidirectionalIterator const& i, BidirectionalIterator const& ii - ) - { - return comp(*i, *ii) ? sprout::fixed::detail::next_permutation_impl_3( - cont, comp, first, last, - i, ii, last - ) - : i == first ? Result(sprout::fixed::reverse_copy(first, last, cont), false) - : sprout::fixed::detail::next_permutation_impl_2( - cont, comp, first, last, - sprout::prev(i), i - ) - ; - } - template - inline SPROUT_CONSTEXPR Result - next_permutation_impl_1( - Container const& cont, Compare comp, - BidirectionalIterator const& first, BidirectionalIterator const& last, - BidirectionalIterator const& i - ) - { - return i == last ? Result(sprout::deep_copy(cont), false) - : sprout::fixed::detail::next_permutation_impl_2( - cont, comp, first, last, - sprout::prev(last, 2), sprout::prev(last) - ) - ; - } - template - inline SPROUT_CONSTEXPR Result - next_permutation_impl(Container const& cont, Compare comp, BidirectionalIterator const& first, BidirectionalIterator const& last) { - return first == last ? Result(sprout::deep_copy(cont), false) - : sprout::fixed::detail::next_permutation_impl_1( - cont, comp, first, last, - sprout::next(first) - ); - } - } // namespace detail - // - // next_permutation - // - template - inline SPROUT_CONSTEXPR sprout::pair::type, bool> - next_permutation(Container const& cont, Compare comp) { - typedef sprout::pair::type, bool> type; - return sprout::fixed::detail::next_permutation_impl( - cont, comp, - sprout::begin(cont), sprout::end(cont) - ); - } - template - inline SPROUT_CONSTEXPR sprout::pair::type, bool> - next_permutation(Container const& cont) { - typedef sprout::pair::type, bool> type; - return sprout::fixed::detail::next_permutation_impl( - cont, NS_SSCRISK_CEL_OR_SPROUT::less::value_type>(), - sprout::begin(cont), sprout::end(cont) - ); - } - } // namespace fixed - - using sprout::fixed::next_permutation; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_NEXT_PERMUTATION_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/nth_element.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/nth_element.hpp deleted file mode 100644 index 73805e6..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/nth_element.hpp +++ /dev/null @@ -1,81 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_NTH_ELEMENT_HPP -#define SPROUT_ALGORITHM_FIXED_NTH_ELEMENT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - nth_element_impl_1( - Container const& cont, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::difference_type nth_size - ) - { - return sprout::fixed::swap_element( - cont, - sprout::next(sprout::internal_begin(cont), offset), - sprout::next(sprout::internal_begin(cont), offset + nth_size) - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - nth_element_impl( - Container const& cont, Compare comp, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::difference_type size, - typename sprout::container_traits::difference_type nth_size - ) - { - return sprout::fixed::detail::nth_element_impl_1( - sprout::fixed::detail::make_partial_heap_impl(cont, comp, offset, size, nth_size + 1), - offset, - nth_size - ); - } - } // namespace detail - // - // nth_element - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - nth_element(Container const& cont, typename sprout::container_traits::const_iterator nth, Compare comp) { - return sprout::fixed::detail::nth_element_impl( - cont, comp, - sprout::internal_begin_offset(cont), - sprout::size(cont), - sprout::distance(sprout::begin(cont), nth) - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - nth_element(Container const& cont, typename sprout::container_traits::const_iterator nth) { - return sprout::fixed::detail::nth_element_impl( - cont, NS_SSCRISK_CEL_OR_SPROUT::less::value_type>(), - sprout::internal_begin_offset(cont), - sprout::size(cont), - sprout::distance(sprout::begin(cont), nth) - ); - } - } // namespace fixed - - using sprout::fixed::nth_element; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_NTH_ELEMENT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/partial_sort.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/partial_sort.hpp deleted file mode 100644 index f3aefd0..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/partial_sort.hpp +++ /dev/null @@ -1,66 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_PARTIAL_SORT_HPP -#define SPROUT_ALGORITHM_FIXED_PARTIAL_SORT_HPP - -#include -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - partial_sort_impl( - Container const& cont, Compare comp, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::difference_type size, - typename sprout::container_traits::difference_type middle_size - ) - { - return sprout::fixed::detail::sort_heap_impl( - sprout::fixed::detail::make_partial_heap_impl(cont, comp, offset, size, middle_size), comp, - offset, middle_size - ); - } - } // namespace detail - // - // partial_sort - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - partial_sort(Container const& cont, typename sprout::container_traits::const_iterator middle, Compare comp) { - return sprout::fixed::detail::partial_sort_impl( - cont, comp, - sprout::internal_begin_offset(cont), - sprout::size(cont), - sprout::distance(sprout::begin(cont), middle) - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - partial_sort(Container const& cont, typename sprout::container_traits::const_iterator middle) { - return sprout::fixed::detail::partial_sort_impl( - cont, NS_SSCRISK_CEL_OR_SPROUT::less::value_type>(), - sprout::internal_begin_offset(cont), - sprout::size(cont), - sprout::distance(sprout::begin(cont), middle) - ); - } - } // namespace fixed - - using sprout::fixed::partial_sort; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_PARTIAL_SORT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/partition.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/partition.hpp deleted file mode 100644 index d1a9861..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/partition.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_PARTITION_HPP -#define SPROUT_ALGORITHM_FIXED_PARTITION_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - // - // partition - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - partition(Container const& cont, Predicate pred) { - return sprout::fixed::partition_copy(sprout::begin(cont), sprout::end(cont), cont, pred); - } - } // namespace fixed - - using sprout::fixed::partition; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_PARTITION_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/partition_copy.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/partition_copy.hpp deleted file mode 100644 index 5f92fed..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/partition_copy.hpp +++ /dev/null @@ -1,74 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_PARTITION_COPY_HPP -#define SPROUT_ALGORITHM_FIXED_PARTITION_COPY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - partition_copy_impl( - InputIterator const&, InputIterator const&, Result const& result, Predicate, - typename sprout::container_traits::size_type, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - partition_copy_impl( - InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred, - typename sprout::container_traits::size_type size, - Args const&... args - ) - { - return first != last && sizeof...(Args) < size - ? pred(*first) - ? sprout::fixed::detail::partition_copy_impl(sprout::next(first), last, result, pred, size, *first, args...) - : sprout::fixed::detail::partition_copy_impl(sprout::next(first), last, result, pred, size, args..., *first) - : sprout::detail::container_complate(result, args...) - ; - } - } // namespace detail - // - // partition_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - partition_copy(InputIterator first, InputIterator last, Result const& result, Predicate pred) { - return sprout::fixed::detail::partition_copy_impl(first, last, result, pred, sprout::size(result)); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - partition_copy(InputIterator first, InputIterator last, Predicate pred) { - return sprout::fixed::partition_copy(first, last, sprout::pit(), pred); - } - } // namespace fixed - - using sprout::fixed::partition_copy; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_PARTITION_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/pop_heap.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/pop_heap.hpp deleted file mode 100644 index f0f9017..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/pop_heap.hpp +++ /dev/null @@ -1,99 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_POP_HEAP_HPP -#define SPROUT_ALGORITHM_FIXED_POP_HEAP_HPP - -#include -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - pop_heap_impl( - Container const& cont, - Compare comp, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::difference_type size, - typename sprout::container_traits::difference_type n = 0, - typename sprout::container_traits::difference_type l = 1, - typename sprout::container_traits::difference_type r = 2 - ) - { - return r < size - && comp(*sprout::next(sprout::internal_begin(cont), offset + l), *sprout::next(sprout::internal_begin(cont), offset + r)) - ? comp(*sprout::next(sprout::internal_begin(cont), offset + n), *sprout::next(sprout::internal_begin(cont), offset + r)) - ? sprout::fixed::detail::pop_heap_impl( - sprout::fixed::swap_element( - cont, - sprout::next(sprout::internal_begin(cont), offset + n), - sprout::next(sprout::internal_begin(cont), offset + r) - ), - comp, - offset, - size, - r, - r * 2 + 1, - r * 2 + 2 - ) - : sprout::deep_copy(cont) - : l < size - ? comp(*sprout::next(sprout::internal_begin(cont), offset + n), *sprout::next(sprout::internal_begin(cont), offset + l)) - ? sprout::fixed::detail::pop_heap_impl( - sprout::fixed::swap_element( - cont, - sprout::next(sprout::internal_begin(cont), offset + n), - sprout::next(sprout::internal_begin(cont), offset + l) - ), - comp, - offset, - size, - l, - l * 2 + 1, - l * 2 + 2 - ) - : sprout::deep_copy(cont) - : sprout::deep_copy(cont) - ; - } - } // namespace detail - // - // pop_heap - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - pop_heap(Container const& cont, Compare comp) { - return sprout::fixed::detail::pop_heap_impl( - sprout::fixed::swap_element(cont, sprout::begin(cont), sprout::end(cont) - 1), - comp, - sprout::internal_begin_offset(cont), - sprout::size(cont) - 1 - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - pop_heap(Container const& cont) { - return sprout::fixed::detail::pop_heap_impl( - sprout::fixed::swap_element(cont, sprout::begin(cont), sprout::end(cont) - 1), - NS_SSCRISK_CEL_OR_SPROUT::less::value_type>(), - sprout::internal_begin_offset(cont), - sprout::size(cont) - 1 - ); - } - } // namespace fixed - - using sprout::fixed::pop_heap; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_POP_HEAP_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/prev_permutation.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/prev_permutation.hpp deleted file mode 100644 index 51b181a..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/prev_permutation.hpp +++ /dev/null @@ -1,135 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_PREV_PERMUTATION_HPP -#define SPROUT_ALGORITHM_FIXED_PREV_PERMUTATION_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#if SPROUT_GCC_EARLIER(4, 8, 2) -# include -# include -#else -# include -# include -#endif -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR Result - prev_permutation_impl_4(Container const& cont, Difference d) { - return Result( -#if SPROUT_GCC_EARLIER(4, 8, 2) - sprout::range::fixed::copy_backward(sprout::fit::reverse_copy(sprout::next(sprout::begin(cont), d), sprout::end(cont), cont), cont), -#else - sprout::fixed::copy_backward(sprout::make_reverse_iterator(sprout::end(cont)), sprout::make_reverse_iterator(sprout::next(sprout::begin(cont), d)), cont), -#endif - true - ); - } - template - inline SPROUT_CONSTEXPR Result - prev_permutation_impl_3( - Container const& cont, Compare comp, - BidirectionalIterator const& first, BidirectionalIterator const& last, - BidirectionalIterator const& i, BidirectionalIterator const& ii, BidirectionalIterator const& j - ) - { - return !comp(*sprout::prev(j), *i) ? sprout::fixed::detail::prev_permutation_impl_3( - cont, comp, first, last, - i, ii, sprout::prev(j) - ) - : sprout::fixed::detail::prev_permutation_impl_4( - sprout::fixed::swap_element(cont, i, sprout::prev(j)), - sprout::distance(first, ii) - ) - ; - } - template - inline SPROUT_CONSTEXPR Result - prev_permutation_impl_2( - Container const& cont, Compare comp, - BidirectionalIterator const& first, BidirectionalIterator const& last, - BidirectionalIterator const& i, BidirectionalIterator const& ii - ) - { - return comp(*ii, *i) ? sprout::fixed::detail::prev_permutation_impl_3( - cont, comp, first, last, - i, ii, last - ) - : i == first ? Result(sprout::fixed::reverse_copy(first, last, cont), false) - : sprout::fixed::detail::prev_permutation_impl_2( - cont, comp, first, last, - sprout::prev(i), i - ) - ; - } - template - inline SPROUT_CONSTEXPR Result - prev_permutation_impl_1( - Container const& cont, Compare comp, - BidirectionalIterator const& first, BidirectionalIterator const& last, - BidirectionalIterator const& i - ) - { - return i == last ? Result(sprout::deep_copy(cont), false) - : sprout::fixed::detail::prev_permutation_impl_2( - cont, comp, first, last, - sprout::prev(last, 2), sprout::prev(last) - ) - ; - } - template - inline SPROUT_CONSTEXPR Result - prev_permutation_impl(Container const& cont, Compare comp, BidirectionalIterator const& first, BidirectionalIterator const& last) { - return first == last ? Result(sprout::deep_copy(cont), false) - : sprout::fixed::detail::prev_permutation_impl_1( - cont, comp, first, last, - sprout::next(first) - ); - } - } // namespace detail - // - // prev_permutation - // - template - inline SPROUT_CONSTEXPR sprout::pair::type, bool> - prev_permutation(Container const& cont, Compare comp) { - typedef sprout::pair::type, bool> type; - return sprout::fixed::detail::prev_permutation_impl( - cont, comp, - sprout::begin(cont), sprout::end(cont) - ); - } - // - // prev_permutation - // - template - inline SPROUT_CONSTEXPR sprout::pair::type, bool> - prev_permutation(Container const& cont) { - typedef sprout::pair::type, bool> type; - return sprout::fixed::detail::prev_permutation_impl( - cont, NS_SSCRISK_CEL_OR_SPROUT::less::value_type>(), - sprout::begin(cont), sprout::end(cont) - ); - } - } // namespace fixed - - using sprout::fixed::prev_permutation; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_PREV_PERMUTATION_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/push_heap.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/push_heap.hpp deleted file mode 100644 index 693f8f9..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/push_heap.hpp +++ /dev/null @@ -1,75 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_PUSH_HEAP_HPP -#define SPROUT_ALGORITHM_FIXED_PUSH_HEAP_HPP - -#include -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - push_heap_impl( - Container const& cont, Compare comp, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::difference_type n - ) - { - return n != 0 - && comp( - *sprout::next(sprout::internal_begin(cont), offset + (n - 1) / 2), - *sprout::next(sprout::internal_begin(cont), offset + n) - ) - ? sprout::fixed::detail::push_heap_impl( - sprout::fixed::swap_element( - cont, - sprout::next(sprout::internal_begin(cont), offset + (n - 1) / 2), - sprout::next(sprout::internal_begin(cont), offset + n) - ), - comp, - offset, - (n - 1) / 2 - ) - : sprout::deep_copy(cont) - ; - } - } // namespace detail - // - // push_heap - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - push_heap(Container const& cont, Compare comp) { - return sprout::fixed::detail::push_heap_impl( - cont, comp, - sprout::internal_begin_offset(cont), - sprout::size(cont) - 1 - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - push_heap(Container const& cont) { - return sprout::fixed::detail::push_heap_impl( - cont, NS_SSCRISK_CEL_OR_SPROUT::less::value_type>(), - sprout::internal_begin_offset(cont), - sprout::size(cont) - 1 - ); - } - } // namespace fixed - - using sprout::fixed::push_heap; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_PUSH_HEAP_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/random_swap.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/random_swap.hpp deleted file mode 100644 index a55cad4..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/random_swap.hpp +++ /dev/null @@ -1,96 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_RANDOM_SWAP_HPP -#define SPROUT_ALGORITHM_FIXED_RANDOM_SWAP_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::array - make_random_swap_indexes_2(Random const& rnd, std::ptrdiff_t i0) { - return sprout::array{{i0, sprout::random::result(rnd)}}; - } - template - inline SPROUT_CONSTEXPR sprout::array - make_random_swap_indexes_1(Random const& rnd) { - return sprout::fixed::detail::make_random_swap_indexes_2( - sprout::random::next(rnd)(), - sprout::random::result(rnd) - ); - } - template - inline SPROUT_CONSTEXPR sprout::array - make_random_swap_indexes(std::ptrdiff_t n, UniformRandomNumberGenerator&& g) { - return n > 1 - ? sprout::fixed::detail::make_random_swap_indexes_1( - SPROUT_WORKAROUND_DETAIL_UNIFORM_INT_DISTRIBUTION(0, n - 1)( - SPROUT_FORWARD(UniformRandomNumberGenerator, g) - ) - ) - : sprout::array{{}} - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - random_swap_impl_1(Container const& cont, RandomSwapped const& random_swapped) { - return random_swapped[0] == random_swapped[1] - ? sprout::deep_copy(cont) - : sprout::fixed::swap_element( - cont, - sprout::next(sprout::begin(cont), random_swapped[0]), - sprout::next(sprout::begin(cont), random_swapped[1]) - ) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - random_swap_impl( - Container const& cont, UniformRandomNumberGenerator&& g, - typename sprout::container_traits::size_type size - ) - { - return sprout::fixed::detail::random_swap_impl_1( - cont, - sprout::fixed::detail::make_random_swap_indexes( - size, - SPROUT_FORWARD(UniformRandomNumberGenerator, g) - ) - ); - } - } // namespace detail - // - // random_swap - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - random_swap(Container const& cont, UniformRandomNumberGenerator&& g) { - return sprout::fixed::detail::random_swap_impl( - cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), - sprout::size(cont) - ); - } - } // namespace fixed - - using sprout::fixed::random_swap; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_RANDOM_SWAP_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/random_swap_result.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/random_swap_result.hpp deleted file mode 100644 index 3bfa1d4..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/random_swap_result.hpp +++ /dev/null @@ -1,112 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_RANDOM_SWAP_RESULT_HPP -#define SPROUT_ALGORITHM_FIXED_RANDOM_SWAP_RESULT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::pair, typename std::decay::type> - make_random_swap_result_indexes_2(Random const& rnd, std::ptrdiff_t i0) { - typedef sprout::pair, typename std::decay::type> result_type; - return result_type( - sprout::array{{i0, sprout::random::result(rnd)}}, - sprout::random::next(rnd).engine() - ); - } - template - inline SPROUT_CONSTEXPR sprout::pair, typename std::decay::type> - make_random_swap_result_indexes_1(Random const& rnd) { - return sprout::fixed::detail::make_random_swap_result_indexes_2( - sprout::random::next(rnd)(), - sprout::random::result(rnd) - ); - } - template - inline SPROUT_CONSTEXPR sprout::pair, typename std::decay::type> - make_random_swap_result_indexes(std::ptrdiff_t n, UniformRandomNumberGenerator&& g) { - typedef sprout::pair, typename std::decay::type> result_type; - return n > 1 - ? sprout::fixed::detail::make_random_swap_result_indexes_1( - SPROUT_WORKAROUND_DETAIL_UNIFORM_INT_DISTRIBUTION(0, n - 1)( - SPROUT_FORWARD(UniformRandomNumberGenerator, g) - ) - ) - : result_type( - sprout::array{{}}, - SPROUT_FORWARD(UniformRandomNumberGenerator, g) - ) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::shuffle::type - random_swap_result_impl_1(Container const& cont, RandomSwapped const& random_swapped) { - typedef typename sprout::fixed::results::shuffle::type result_type; - return sprout::first(random_swapped)[0] == sprout::first(random_swapped)[1] - ? result_type(sprout::deep_copy(cont), sprout::second(random_swapped)) - : result_type( - sprout::fixed::swap_element( - cont, - sprout::next(sprout::begin(cont), sprout::first(random_swapped)[0]), - sprout::next(sprout::begin(cont), sprout::first(random_swapped)[1]) - ), - sprout::second(random_swapped) - ) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::shuffle::type - random_swap_result_impl( - Container const& cont, UniformRandomNumberGenerator&& g, - typename sprout::container_traits::size_type size - ) - { - return sprout::fixed::detail::random_swap_result_impl_1( - cont, - sprout::fixed::detail::make_random_swap_result_indexes( - size, - SPROUT_FORWARD(UniformRandomNumberGenerator, g) - ) - ); - } - } // namespace detail - // - // random_swap_result - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::shuffle::type - random_swap_result(Container const& cont, UniformRandomNumberGenerator&& g) { - return sprout::fixed::detail::random_swap_result_impl( - cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), - sprout::size(cont) - ); - } - } // namespace fixed - - using sprout::fixed::random_swap_result; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_RANDOM_SWAP_RESULT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/recurrence.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/recurrence.hpp deleted file mode 100644 index efc586b..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/recurrence.hpp +++ /dev/null @@ -1,168 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_RECURRENCE_HPP -#define SPROUT_ALGORITHM_FIXED_RECURRENCE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - InitSize == 0, - typename sprout::container_traits::value_type - >::type - call_gen(Generator const& gen, Args const&...) { - return gen(); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - InitSize != 0 && InitSize == sizeof...(Args) + 1, - typename sprout::container_traits::value_type - >::type - call_gen(Generator const& gen, Head const& head, Args const&... args) { - return gen(head, args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - InitSize != 0 && InitSize != sizeof...(Args) + 1, - typename sprout::container_traits::value_type - >::type - call_gen(Generator const& gen, Head const&, Args const&... args) { - return call_gen(gen, args...); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - recurrence_impl_drop( - Container const& cont, Generator const&, - typename sprout::container_traits::size_type - ) - { - return sprout::detail::container_complate(cont); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - (sprout::container_traits::static_size >= sizeof...(Inits) + 1), - typename sprout::fixed::results::algorithm::type - >::type - recurrence_impl_drop( - Container const& cont, Generator const& gen, - typename sprout::container_traits::size_type size, - Head const& head, Inits const&... inits - ) - { - return size < sizeof...(Inits) + 1 - ? sprout::fixed::detail::recurrence_impl_drop(cont, gen, size, inits...) - : sprout::detail::container_complate(cont, head, inits...) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - (sprout::container_traits::static_size < sizeof...(Inits) + 1), - typename sprout::fixed::results::algorithm::type - >::type - recurrence_impl_drop( - Container const& cont, Generator const& gen, - typename sprout::container_traits::size_type size, - Head const&, Inits const&... inits - ) - { - return sprout::fixed::detail::recurrence_impl_drop(cont, gen, size, inits...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - recurrence_impl_1( - Container const& cont, Generator const&, - typename sprout::container_traits::size_type, - Args const&... args - ) - { - return sprout::remake(cont, sprout::size(cont), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - recurrence_impl_1( - Container const& cont, Generator const& gen, - typename sprout::container_traits::size_type size, - Args const&... args - ) - { - return sizeof...(Args) < size - ? sprout::fixed::detail::recurrence_impl_1( - cont, gen, - size, - args..., sprout::fixed::detail::call_gen(gen, args...) - ) - : sprout::detail::container_complate(cont, args...) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - (sprout::container_traits::static_size > sizeof...(Inits)), - typename sprout::fixed::results::algorithm::type - >::type - recurrence_impl( - Container const& cont, Generator const& gen, - typename sprout::container_traits::size_type size, - Inits const&... inits - ) - { - return sizeof...(Inits) < size - ? sprout::fixed::detail::recurrence_impl_1(cont, gen, size, inits...) - : sprout::fixed::detail::recurrence_impl_drop(cont, gen, size, inits...) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - (sprout::container_traits::static_size <= sizeof...(Inits)), - typename sprout::fixed::results::algorithm::type - >::type - recurrence_impl( - Container const& cont, Generator const& gen, - typename sprout::container_traits::size_type size, - Inits const&... inits - ) - { - return sprout::fixed::detail::recurrence_impl_drop(cont, gen, size, inits...); - } - } // namespace detail - // - // recurrence - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - recurrence(Container const& cont, Generator const& gen, Inits const&... inits) { - return sprout::fixed::detail::recurrence_impl(cont, gen, sprout::size(cont), inits...); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - recurrence(Generator const& gen, Inits const&... inits) { - return sprout::fixed::recurrence(sprout::pit(), gen, inits...); - } - } // namespace fixed - - using sprout::fixed::recurrence; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_RECURRENCE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/recurrence_n.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/recurrence_n.hpp deleted file mode 100644 index c20ccf5..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/recurrence_n.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_RECURRENCE_N_HPP -#define SPROUT_ALGORITHM_FIXED_RECURRENCE_N_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - // - // recurrence_n - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - recurrence_n(Container const& cont, Size n, Generator const& gen, Inits const&... inits) { - return sprout::fixed::detail::recurrence_impl(cont, gen, n, inits...); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - recurrence_n(Size n, Generator const& gen, Inits const&... inits) { - return sprout::fixed::recurrence_n(sprout::pit(), n, gen, inits...); - } - } // namespace fixed - - using sprout::fixed::recurrence_n; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_RECURRENCE_N_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/remove.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/remove.hpp deleted file mode 100644 index c06e544..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/remove.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_REMOVE_HPP -#define SPROUT_ALGORITHM_FIXED_REMOVE_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - // - // remove - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - remove(Container const& cont, T const& value) { - return sprout::fixed::remove_copy(sprout::begin(cont), sprout::end(cont), cont, value); - } - } // namespace fixed - - using sprout::fixed::remove; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_REMOVE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/remove_copy.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/remove_copy.hpp deleted file mode 100644 index 5b60a32..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/remove_copy.hpp +++ /dev/null @@ -1,114 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_REMOVE_COPY_HPP -#define SPROUT_ALGORITHM_FIXED_REMOVE_COPY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - remove_copy_impl( - InputIterator const&, InputIterator const&, - Result const& result, T const&, - typename sprout::container_traits::size_type, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - remove_copy_impl( - InputIterator const& first, InputIterator const& last, - Result const& result, T const& value, - typename sprout::container_traits::size_type size, - Args const&... args - ) - { - return first != last && sizeof...(Args) < size - ? *first == value - ? sprout::fixed::detail::remove_copy_impl(sprout::next(first), last, result, value, size, args...) - : sprout::fixed::detail::remove_copy_impl(sprout::next(first), last, result, value, size, args..., *first) - : sprout::detail::container_complate(result, args...) - ; - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - remove_copy(InputIterator const& first, InputIterator const& last, Result const& result, T const& value) { - return sprout::fixed::detail::remove_copy_impl(first, last, result, value, sprout::size(result)); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - remove_copy(InputIterator const& first, InputIterator const& last, Result const& result, T const& value) { - return sprout::remake( - result, sprout::size(result), - sprout::make_remove_iterator(value, first, last), - sprout::make_remove_iterator(value, last, last) - ); - } - } // namespace detail - // - // remove_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - remove_copy(InputIterator first, InputIterator last, Result const& result, T const& value) { - return sprout::fixed::detail::remove_copy(first, last, result, value); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - remove_copy(InputIterator first, InputIterator last, T const& value) { - return sprout::fixed::remove_copy(first, last, sprout::pit(), value); - } - } // namespace fixed - - template< - typename InputIterator, typename Result, typename T, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - remove_copy(InputIterator first, InputIterator last, Result const& result, T const& value) { - return sprout::fixed::remove_copy(first, last, result, value); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - remove_copy(InputIterator first, InputIterator last, T const& value) { - return sprout::fixed::remove_copy(first, last, value); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_REMOVE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/remove_copy_if.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/remove_copy_if.hpp deleted file mode 100644 index dc2ab02..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/remove_copy_if.hpp +++ /dev/null @@ -1,114 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_REMOVE_COPY_IF_HPP -#define SPROUT_ALGORITHM_FIXED_REMOVE_COPY_IF_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - remove_copy_if_impl( - InputIterator const&, InputIterator const&, - Result const& result, Predicate, - typename sprout::container_traits::size_type, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - remove_copy_if_impl( - InputIterator const& first, InputIterator const& last, - Result const& result, Predicate pred, - typename sprout::container_traits::size_type size, - Args const&... args - ) - { - return first != last && sizeof...(Args) < size - ? pred(*first) - ? sprout::fixed::detail::remove_copy_if_impl(sprout::next(first), last, result, pred, size, args...) - : sprout::fixed::detail::remove_copy_if_impl(sprout::next(first), last, result, pred, size, args..., *first) - : sprout::detail::container_complate(result, args...) - ; - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - remove_copy_if(InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred) { - return sprout::fixed::detail::remove_copy_if_impl(first, last, result, pred, sprout::size(result)); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - remove_copy_if(InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred) { - return sprout::remake( - result, sprout::size(result), - sprout::make_remove_if_iterator(pred, first, last), - sprout::make_remove_if_iterator(pred, last, last) - ); - } - } // namespace detail - // - // remove_copy_if - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - remove_copy_if(InputIterator first, InputIterator last, Result const& result, Predicate pred) { - return sprout::fixed::detail::remove_copy_if(first, last, result, pred); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - remove_copy_if(InputIterator first, InputIterator last, Predicate pred) { - return sprout::fixed::remove_copy_if(first, last, sprout::pit(), pred); - } - } // namespace fixed - - template< - typename InputIterator, typename Result, typename Predicate, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - remove_copy_if(InputIterator first, InputIterator last, Result const& result, Predicate pred) { - return sprout::fixed::remove_copy_if(first, last, result, pred); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - remove_copy_if(InputIterator first, InputIterator last, Predicate pred) { - return sprout::fixed::remove_copy_if(first, last, pred); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_REMOVE_COPY_IF_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/remove_if.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/remove_if.hpp deleted file mode 100644 index 7b16631..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/remove_if.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_REMOVE_IF_HPP -#define SPROUT_ALGORITHM_FIXED_REMOVE_IF_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - // - // remove_if - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - remove_if(Container const& cont, Predicate pred) { - return sprout::fixed::remove_copy_if(sprout::begin(cont), sprout::end(cont), cont, pred); - } - } // namespace fixed - - using sprout::fixed::remove_if; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_REMOVE_IF_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/replace.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/replace.hpp deleted file mode 100644 index 108cbb8..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/replace.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_REPLACE_HPP -#define SPROUT_ALGORITHM_FIXED_REPLACE_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - // - // replace - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - replace(Container const& cont, T const& old_value, T const& new_value) { - return sprout::fixed::replace_copy(sprout::begin(cont), sprout::end(cont), cont, old_value, new_value); - } - } // namespace fixed - - using sprout::fixed::replace; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_REPLACE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/replace_copy.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/replace_copy.hpp deleted file mode 100644 index d0e9551..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/replace_copy.hpp +++ /dev/null @@ -1,167 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_REPLACE_COPY_HPP -#define SPROUT_ALGORITHM_FIXED_REPLACE_COPY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - replace_copy_impl_ra( - RandomAccessIterator const& first, RandomAccessIterator const&, - Result const& result, T const& old_value, T const& new_value, - sprout::index_tuple, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::size_type size, - typename sprout::container_traits::size_type input_size - ) - { - return sprout::remake( - result, sprout::size(result), - (Indexes >= offset && Indexes < offset + size && Indexes < offset + input_size - ? NS_SSCRISK_CEL_OR_SPROUT::equal_to()(first[Indexes - offset], old_value) ? new_value : first[Indexes - offset] - : *sprout::next(sprout::internal_begin(result), Indexes) - )... - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - replace_copy( - RandomAccessIterator const& first, RandomAccessIterator const& last, - Result const& result, T const& old_value, T const& new_value, - std::random_access_iterator_tag* - ) - { - return sprout::fixed::detail::replace_copy_impl_ra( - first, last, - result, old_value, new_value, - sprout::container_indexes::make(), - sprout::internal_begin_offset(result), - sprout::size(result), - sprout::distance(first, last) - ); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - replace_copy_impl( - InputIterator const&, InputIterator const&, - Result const& result, T const&, T const&, - typename sprout::container_traits::size_type, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - replace_copy_impl( - InputIterator const& first, InputIterator const& last, - Result const& result, T const& old_value, T const& new_value, - typename sprout::container_traits::size_type size, - Args const&... args - ) - { - return first != last && sizeof...(Args) < size - ? replace_copy_impl( - sprout::next(first), last, result, old_value, new_value, - size, - args..., *first == old_value ? new_value : *first - ) - : sprout::detail::container_complate(result, args...) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - replace_copy( - InputIterator const& first, InputIterator const& last, - Result const& result, T const& old_value, T const& new_value, - std::input_iterator_tag* - ) - { - return sprout::fixed::detail::replace_copy_impl(first, last, result, old_value, new_value, sprout::size(result)); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - replace_copy(InputIterator const& first, InputIterator const& last, Result const& result, T const& old_value, T const& new_value) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::fixed::detail::replace_copy(first, last, result, old_value, new_value, category()); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - replace_copy(InputIterator const& first, InputIterator const& last, Result const& result, T const& old_value, T const& new_value) { - return sprout::remake( - result, sprout::size(result), - sprout::make_replace_iterator(first, old_value, new_value), - sprout::make_replace_iterator(last, old_value, new_value) - ); - } - } // namespace detail - // - // replace_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - replace_copy(InputIterator first, InputIterator last, Result const& result, T const& old_value, T const& new_value) { - return sprout::fixed::detail::replace_copy(first, last, result, old_value, new_value); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - replace_copy(InputIterator first, InputIterator last, T const& old_value, T const& new_value) { - return sprout::fixed::replace_copy(first, last, sprout::pit(), old_value, new_value); - } - } // namespace fixed - - template< - typename InputIterator, typename Result, typename T, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - replace_copy(InputIterator first, InputIterator last, Result const& result, T const& old_value, T const& new_value) { - return sprout::fixed::replace_copy(first, last, result, old_value, new_value); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - replace_copy(InputIterator first, InputIterator last, T const& old_value, T const& new_value) { - return sprout::fixed::replace_copy(first, last, old_value, new_value); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_REPLACE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/replace_copy_if.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/replace_copy_if.hpp deleted file mode 100644 index 9fb4fca..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/replace_copy_if.hpp +++ /dev/null @@ -1,166 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_REPLACE_COPY_IF_HPP -#define SPROUT_ALGORITHM_FIXED_REPLACE_COPY_IF_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - replace_copy_if_impl_ra( - RandomAccessIterator const& first, RandomAccessIterator const&, - Result const& result, Predicate pred, T const& new_value, - sprout::index_tuple, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::size_type size, - typename sprout::container_traits::size_type input_size - ) - { - return sprout::remake( - result, sprout::size(result), - (Indexes >= offset && Indexes < offset + size && Indexes < offset + input_size - ? pred(first[Indexes - offset]) ? new_value : first[Indexes - offset] - : *sprout::next(sprout::internal_begin(result), Indexes) - )... - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - replace_copy_if( - RandomAccessIterator const& first, RandomAccessIterator const& last, - Result const& result, Predicate pred, T const& new_value, - std::random_access_iterator_tag* - ) - { - return sprout::fixed::detail::replace_copy_if_impl_ra( - first, last, - result, pred, new_value, - sprout::container_indexes::make(), - sprout::internal_begin_offset(result), - sprout::size(result), - sprout::distance(first, last) - ); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - replace_copy_if_impl( - InputIterator const&, InputIterator const&, - Result const& result, Predicate, T const&, - typename sprout::container_traits::size_type, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - replace_copy_if_impl( - InputIterator const& first, InputIterator const& last, - Result const& result, Predicate pred, T const& new_value, - typename sprout::container_traits::size_type size, - Args const&... args - ) - { - return first != last && sizeof...(Args) < size - ? replace_copy_if_impl( - sprout::next(first), last, result, pred, new_value, - size, - args..., pred(*first) ? new_value : *first - ) - : sprout::detail::container_complate(result, args...) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - replace_copy_if( - InputIterator const& first, InputIterator const& last, - Result const& result, Predicate pred, T const& new_value, - std::input_iterator_tag* - ) - { - return sprout::fixed::detail::replace_copy_if_impl(first, last, result, pred, new_value, sprout::size(result)); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - replace_copy_if(InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred, T const& new_value) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::fixed::detail::replace_copy_if(first, last, result, pred, new_value, category()); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - replace_copy_if(InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred, T const& new_value) { - return sprout::remake( - result, sprout::size(result), - sprout::make_replace_if_iterator(first, pred, new_value), - sprout::make_replace_if_iterator(last, pred, new_value) - ); - } - } // namespace detail - // - // replace_copy_if - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - replace_copy_if(InputIterator first, InputIterator last, Result const& result, Predicate pred, T const& new_value) { - return sprout::fixed::detail::replace_copy_if(first, last, result, pred, new_value); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - replace_copy_if(InputIterator first, InputIterator last, Predicate pred, T const& new_value) { - return sprout::fixed::replace_copy_if(first, last, sprout::pit(), pred, new_value); - } - } // namespace fixed - - template< - typename InputIterator, typename Result, typename Predicate, typename T, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - replace_copy_if(InputIterator first, InputIterator last, Result const& result, Predicate pred, T const& new_value) { - return sprout::fixed::replace_copy_if(first, last, result, pred, new_value); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - replace_copy_if(InputIterator first, InputIterator last, Predicate pred, T const& new_value) { - return sprout::fixed::replace_copy_if(first, last, pred, new_value); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_REPLACE_COPY_IF_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/replace_if.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/replace_if.hpp deleted file mode 100644 index c9a7db3..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/replace_if.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_REPLACE_IF_HPP -#define SPROUT_ALGORITHM_FIXED_REPLACE_IF_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - // - // replace_if - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - replace_if(Container const& cont, Predicate pred, T const& new_value) { - return sprout::fixed::replace_copy_if(sprout::begin(cont), sprout::end(cont), cont, pred, new_value); - } - } // namespace fixed - - using sprout::fixed::replace_if; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_REPLACE_IF_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/results.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/results.hpp deleted file mode 100644 index 7b9e6b7..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/results.hpp +++ /dev/null @@ -1,78 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_RESULTS_HPP -#define SPROUT_ALGORITHM_FIXED_RESULTS_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace results { - // - // algorithm - // - template - struct algorithm - : public sprout::identity::copied_type> - {}; - - // - // shuffle - // - template - struct shuffle - : public sprout::identity< - sprout::pair< - typename sprout::fixed::results::algorithm::type, - typename std::decay::type - > - > - {}; - - // - // resized_relative - // - template::difference_type RelativeSize> - struct resized_relative - : public std::decay< - typename sprout::container_transform_traits - ::template rebind_size::static_size + RelativeSize>::type - > - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using algorithm_t = typename sprout::fixed::results::algorithm::type; - - template - using shuffle_t = typename sprout::fixed::results::shuffle::type; - - template::difference_type RelativeSize> - using resized_relative_t = typename sprout::fixed::results::resized_relative::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - } // namespace results - } // namespace fixed - - namespace results { - using sprout::fixed::results::algorithm; - using sprout::fixed::results::shuffle; - using sprout::fixed::results::resized_relative; - -#if SPROUT_USE_TEMPLATE_ALIASES - using sprout::fixed::results::algorithm_t; - using sprout::fixed::results::shuffle_t; - using sprout::fixed::results::resized_relative_t; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - } // namespace results -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_RESULTS_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/reverse.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/reverse.hpp deleted file mode 100644 index febddfa..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/reverse.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_REVERSE_HPP -#define SPROUT_ALGORITHM_FIXED_REVERSE_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - // - // reverse - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - reverse(Container const& cont) { - return sprout::fixed::reverse_copy(sprout::begin(cont), sprout::end(cont), cont); - } - } // namespace fixed - - using sprout::fixed::reverse; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_REVERSE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/reverse_copy.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/reverse_copy.hpp deleted file mode 100644 index fa6f7cf..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/reverse_copy.hpp +++ /dev/null @@ -1,156 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_REVERSE_COPY_HPP -#define SPROUT_ALGORITHM_FIXED_REVERSE_COPY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - reverse_copy_impl_ra( - RandomAccessIterator const&, RandomAccessIterator const& last, Result const& result, - sprout::index_tuple, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::size_type size, - typename sprout::container_traits::size_type input_size - ) - { - return sprout::remake( - result, - sprout::size(result), - (Indexes >= offset && Indexes < offset + size && Indexes < offset + input_size - ? last[-(1 + Indexes - offset)] - : *sprout::next(sprout::internal_begin(result), Indexes) - )... - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - reverse_copy( - RandomAccessIterator const& first, RandomAccessIterator const& last, Result const& result, - std::random_access_iterator_tag* - ) - { - return sprout::fixed::detail::reverse_copy_impl_ra( - first, last, result, - sprout::container_indexes::make(), - sprout::internal_begin_offset(result), - sprout::size(result), - sprout::distance(first, last) - ); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - reverse_copy_impl( - BidirectionalIterator, BidirectionalIterator, Result const& result, - typename sprout::container_traits::size_type, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - reverse_copy_impl( - BidirectionalIterator const& first, BidirectionalIterator const& last, Result const& result, - typename sprout::container_traits::size_type size, - Args const&... args - ) - { - return first != last && sizeof...(Args) < size - ? sprout::fixed::detail::reverse_copy_impl(first, sprout::prev(last), result, size, args..., *sprout::prev(last)) - : sprout::detail::container_complate(result, args...) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - reverse_copy( - BidirectionalIterator const& first, BidirectionalIterator const& last, Result const& result, - std::bidirectional_iterator_tag* - ) - { - return sprout::fixed::detail::reverse_copy_impl(first, last, result, sprout::size(result)); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - reverse_copy(BidirectionalIterator const& first, BidirectionalIterator const& last, Result const& result) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::fixed::detail::reverse_copy(first, last, result, category()); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - reverse_copy(BidirectionalIterator const& first, BidirectionalIterator const& last, Result const& result) { - return sprout::remake( - result, sprout::size(result), - sprout::make_reverse_iterator(last), - sprout::make_reverse_iterator(first) - ); - } - } // namespace detail - // - // reverse_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - reverse_copy(BidirectionalIterator first, BidirectionalIterator last, Result const& result) { - return sprout::fixed::detail::reverse_copy(first, last, result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - reverse_copy(BidirectionalIterator first, BidirectionalIterator last) { - return sprout::fixed::reverse_copy(first, last, sprout::pit()); - } - } // namespace fixed - - template< - typename BidirectionalIterator, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - reverse_copy(BidirectionalIterator first, BidirectionalIterator last, Result const& result) { - return sprout::fixed::reverse_copy(first, last, result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - reverse_copy(BidirectionalIterator first, BidirectionalIterator last) { - return sprout::fixed::reverse_copy(first, last); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_REVERSE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/rotate.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/rotate.hpp deleted file mode 100644 index 6eb2316..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/rotate.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_ROTATE_HPP -#define SPROUT_ALGORITHM_FIXED_ROTATE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - // - // rotate - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - rotate(Container const& cont, typename sprout::container_traits::const_iterator middle) { - return sprout::fixed::rotate_copy(sprout::begin(cont), middle, sprout::end(cont), cont); - } - } // namespace fixed - - using sprout::fixed::rotate; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_ROTATE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/rotate_copy.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/rotate_copy.hpp deleted file mode 100644 index 2d6aacb..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/rotate_copy.hpp +++ /dev/null @@ -1,201 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_ROTATE_COPY_HPP -#define SPROUT_ALGORITHM_FIXED_ROTATE_COPY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - rotate_copy_impl_ra( - RandomAccessIterator const& first, RandomAccessIterator const& middle, - typename sprout::container_traits::size_type last_half_size, - Result const& result, - sprout::index_tuple, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::size_type size, - typename sprout::container_traits::size_type input_size - ) - { - return sprout::remake( - result, - sprout::size(result), - (Indexes >= offset && Indexes < offset + size && Indexes < offset + input_size - ? (Indexes < offset + last_half_size - ? middle[Indexes - offset] - : first[(Indexes - offset) - last_half_size] - ) - : *sprout::next(sprout::internal_begin(result), Indexes) - )... - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - rotate_copy( - RandomAccessIterator const& first, RandomAccessIterator const& middle, RandomAccessIterator const& last, - Result const& result, - std::random_access_iterator_tag* - ) - { - return sprout::fixed::detail::rotate_copy_impl_ra( - first, middle, - sprout::distance(middle, last), - result, - sprout::container_indexes::make(), - sprout::internal_begin_offset(result), - sprout::size(result), - sprout::distance(first, last) - ); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - rotate_copy_impl_1( - ForwardIterator const&, ForwardIterator const&, - Result const& result, - typename sprout::container_traits::size_type, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - rotate_copy_impl_1( - ForwardIterator const& first, ForwardIterator const& last, - Result const& result, - typename sprout::container_traits::size_type size, - Args const&... args - ) - { - return first != last && sizeof...(Args) < size - ? sprout::fixed::detail::rotate_copy_impl_1(sprout::next(first), last, result, size, args..., *first) - : sprout::detail::container_complate(result, args...) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - rotate_copy_impl( - ForwardIterator const&, ForwardIterator const&, - ForwardIterator const&, ForwardIterator const&, - Result const& result, - typename sprout::container_traits::size_type, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - rotate_copy_impl( - ForwardIterator const& first, ForwardIterator const& middle, - ForwardIterator const& middle_first, ForwardIterator const& last, - Result const& result, - typename sprout::container_traits::size_type size, - Args const&... args - ) - { - return middle_first != last && sizeof...(Args) < size - ? sprout::fixed::detail::rotate_copy_impl(first, middle, sprout::next(middle_first), last, result, size, args..., *middle_first) - : sprout::fixed::detail::rotate_copy_impl_1(first, middle, result, size, args...) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - rotate_copy( - ForwardIterator const& first, ForwardIterator const& middle, ForwardIterator const& last, Result const& result, - std::forward_iterator_tag* - ) - { - return sprout::fixed::detail::rotate_copy_impl(first, middle, middle, last, result, sprout::size(result)); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - rotate_copy(ForwardIterator const& first, ForwardIterator const& middle, ForwardIterator const& last, Result const& result) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::fixed::detail::rotate_copy(first, middle, last, result, category()); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - rotate_copy(ForwardIterator const& first, ForwardIterator const& middle, ForwardIterator const& last, Result const& result) { - return sprout::remake( - result, sprout::size(result), - sprout::make_joint_iterator(middle, last, first, first), - sprout::make_joint_iterator(last, last, first, middle) - ); - } - } // namespace detail - // - // rotate_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - rotate_copy(ForwardIterator first, ForwardIterator middle, ForwardIterator last, Result const& result) { - return sprout::fixed::detail::rotate_copy(first, middle, last, result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - rotate_copy(ForwardIterator first, ForwardIterator middle, ForwardIterator last) { - return sprout::fixed::rotate_copy(first, middle, last, sprout::pit()); - } - } // namespace fixed - - template< - typename ForwardIterator, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - rotate_copy(ForwardIterator first, ForwardIterator middle, ForwardIterator last, Result const& result) { - return sprout::fixed::rotate_copy(first, middle, last, result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - rotate_copy(ForwardIterator first, ForwardIterator middle, ForwardIterator last) { - return sprout::fixed::rotate_copy(first, middle, last); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_ROTATE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/set_difference.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/set_difference.hpp deleted file mode 100644 index 38d2375..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/set_difference.hpp +++ /dev/null @@ -1,211 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_SET_DIFFERENCE_HPP -#define SPROUT_ALGORITHM_FIXED_SET_DIFFERENCE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - set_difference_impl( - InputIterator1, InputIterator1, - InputIterator2, InputIterator2, - Result const& result, Compare, - typename sprout::container_traits::size_type, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - set_difference_impl( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp, - typename sprout::container_traits::size_type size, - Args const&... args - ) - { - return sizeof...(Args) < size - ? first1 != last1 - ? first2 != last2 - ? comp(*first1, *first2) - ? sprout::fixed::detail::set_difference_impl( - sprout::next(first1), last1, first2, last2, result, comp, - size, args..., *first1 - ) - : comp(*first2, *first1) - ? sprout::fixed::detail::set_difference_impl( - first1, last1, sprout::next(first2), last2, result, comp, - size, args... - ) - : sprout::fixed::detail::set_difference_impl( - sprout::next(first1), last1, sprout::next(first2), last2, result, comp, - size, args... - ) - : sprout::fixed::detail::set_difference_impl( - sprout::next(first1), last1, first2, last2, result, comp, - size, args..., *first1 - ) - : sprout::detail::container_complate(result, args...) - : sprout::detail::container_complate(result, args...) - ; - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - set_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp - ) - { - return sprout::fixed::detail::set_difference_impl( - first1, last1, - first2, last2, - result, comp, - sprout::size(result) - ); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - set_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp - ) - { - return sprout::remake( - result, sprout::size(result), - sprout::make_set_difference_iterator(first1, last1, first2, last2, comp), - sprout::make_set_difference_iterator(last1, last1, last2, last2, comp) - ); - } - } // namespace detail - // - // set_difference - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp - ) - { - return sprout::fixed::detail::set_difference(first1, last1, first2, last2, result, comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result - ) - { - return sprout::fixed::set_difference(first1, last1, first2, last2, result, sprout::less<>()); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Compare comp - ) - { - return sprout::fixed::set_difference(first1, last1, first2, last2, sprout::pit(), comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2 - ) - { - return sprout::fixed::set_difference(first1, last1, first2, last2, sprout::pit()); - } - } // namespace fixed - - template< - typename InputIterator1, typename InputIterator2, typename Result, typename Compare, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp - ) - { - return sprout::fixed::set_difference(first1, last1, first2, last2, result, comp); - } - template< - typename InputIterator1, typename InputIterator2, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result - ) - { - return sprout::fixed::set_difference(first1, last1, first2, last2, result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Compare comp - ) - { - return sprout::fixed::set_difference(first1, last1, first2, last2, comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2 - ) - { - return sprout::fixed::set_difference(first1, last1, first2, last2); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_SET_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/set_intersection.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/set_intersection.hpp deleted file mode 100644 index cbbc148..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/set_intersection.hpp +++ /dev/null @@ -1,208 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_SET_INTERSECTION_HPP -#define SPROUT_ALGORITHM_FIXED_SET_INTERSECTION_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - set_intersection_impl( - InputIterator1, InputIterator1, - InputIterator2, InputIterator2, - Result const& result, Compare, - typename sprout::container_traits::size_type, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - set_intersection_impl( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp, - typename sprout::container_traits::size_type size, - Args const&... args - ) - { - return sizeof...(Args) < size - ? first1 != last1 - ? first2 != last2 - ? comp(*first1, *first2) - ? sprout::fixed::detail::set_intersection_impl( - sprout::next(first1), last1, first2, last2, result, comp, - size, args... - ) - : comp(*first2, *first1) - ? sprout::fixed::detail::set_intersection_impl( - first1, last1, sprout::next(first2), last2, result, comp, - size, args... - ) - : sprout::fixed::detail::set_intersection_impl( - sprout::next(first1), last1, sprout::next(first2), last2, result, comp, - size, args..., *first1 - ) - : sprout::detail::container_complate(result, args...) - : sprout::detail::container_complate(result, args...) - : sprout::detail::container_complate(result, args...) - ; - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - set_intersection( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp - ) - { - return sprout::fixed::detail::set_intersection_impl( - first1, last1, - first2, last2, - result, comp, - sprout::size(result) - ); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - set_intersection( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp - ) - { - return sprout::remake( - result, sprout::size(result), - sprout::make_set_intersection_iterator(first1, last1, first2, last2, comp), - sprout::make_set_intersection_iterator(last1, last1, last2, last2, comp) - ); - } - } // namespace detail - // - // set_intersection - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_intersection( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp - ) - { - return sprout::fixed::detail::set_intersection(first1, last1, first2, last2, result, comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_intersection( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result - ) - { - return sprout::fixed::set_intersection(first1, last1, first2, last2, result, sprout::less<>()); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_intersection( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Compare comp - ) - { - return sprout::fixed::set_intersection(first1, last1, first2, last2, sprout::pit(), comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_intersection( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2 - ) - { - return sprout::fixed::set_intersection(first1, last1, first2, last2, sprout::pit()); - } - } // namespace fixed - - template< - typename InputIterator1, typename InputIterator2, typename Result, typename Compare, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_intersection( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp - ) - { - return sprout::fixed::set_intersection(first1, last1, first2, last2, result, comp); - } - template< - typename InputIterator1, typename InputIterator2, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_intersection( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result - ) - { - return sprout::fixed::set_intersection(first1, last1, first2, last2, result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_intersection( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Compare comp - ) - { - return sprout::fixed::set_intersection(first1, last1, first2, last2, comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_intersection( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2 - ) - { - return sprout::fixed::set_intersection(first1, last1, first2, last2); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_SET_INTERSECTION_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/set_symmetric_difference.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/set_symmetric_difference.hpp deleted file mode 100644 index 496388c..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/set_symmetric_difference.hpp +++ /dev/null @@ -1,216 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_SET_SYMMETRIC_DIFFERENCE_HPP -#define SPROUT_ALGORITHM_FIXED_SET_SYMMETRIC_DIFFERENCE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - set_symmetric_difference_impl( - InputIterator1, InputIterator1, - InputIterator2, InputIterator2, - Result const& result, Compare, - typename sprout::container_traits::size_type, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - set_symmetric_difference_impl( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp, - typename sprout::container_traits::size_type size, - Args const&... args - ) - { - return sizeof...(Args) < size - ? first1 != last1 - ? first2 != last2 - ? comp(*first1, *first2) - ? sprout::fixed::detail::set_symmetric_difference_impl( - sprout::next(first1), last1, first2, last2, result, comp, - size, args..., *first1 - ) - : comp(*first2, *first1) - ? sprout::fixed::detail::set_symmetric_difference_impl( - first1, last1, sprout::next(first2), last2, result, comp, - size, args..., *first2 - ) - : sprout::fixed::detail::set_symmetric_difference_impl( - sprout::next(first1), last1, sprout::next(first2), last2, result, comp, - size, args... - ) - : sprout::fixed::detail::set_symmetric_difference_impl( - sprout::next(first1), last1, first2, last2, result, comp, - size, args..., *first1 - ) - : first2 != last2 - ? sprout::fixed::detail::set_symmetric_difference_impl( - first1, last1, sprout::next(first2), last2, result, comp, - size, args..., *first2 - ) - : sprout::detail::container_complate(result, args...) - : sprout::detail::container_complate(result, args...) - ; - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - set_symmetric_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp - ) - { - return sprout::fixed::detail::set_symmetric_difference_impl( - first1, last1, - first2, last2, - result, comp, - sprout::size(result) - ); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - set_symmetric_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp - ) - { - return sprout::remake( - result, sprout::size(result), - sprout::make_set_symmetric_difference_iterator(first1, last1, first2, last2, comp), - sprout::make_set_symmetric_difference_iterator(last1, last1, last2, last2, comp) - ); - } - } // namespace detail - // - // set_symmetric_difference - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_symmetric_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp - ) - { - return sprout::fixed::detail::set_symmetric_difference(first1, last1, first2, last2, result, comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_symmetric_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result - ) - { - return sprout::fixed::set_symmetric_difference(first1, last1, first2, last2, result, sprout::less<>()); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_symmetric_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Compare comp - ) - { - return sprout::fixed::set_symmetric_difference(first1, last1, first2, last2, sprout::pit(), comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_symmetric_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2 - ) - { - return sprout::fixed::set_symmetric_difference(first1, last1, first2, last2, sprout::pit()); - } - } // namespace fixed - - template< - typename InputIterator1, typename InputIterator2, typename Result, typename Compare, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_symmetric_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp - ) - { - return sprout::fixed::set_symmetric_difference(first1, last1, first2, last2, result, comp); - } - template< - typename InputIterator1, typename InputIterator2, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_symmetric_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result - ) - { - return sprout::fixed::set_symmetric_difference(first1, last1, first2, last2, result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_symmetric_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Compare comp - ) - { - return sprout::fixed::set_symmetric_difference(first1, last1, first2, last2, comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_symmetric_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2 - ) - { - return sprout::fixed::set_symmetric_difference(first1, last1, first2, last2); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_SET_SYMMETRIC_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/set_union.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/set_union.hpp deleted file mode 100644 index 69e3d44..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/set_union.hpp +++ /dev/null @@ -1,216 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_SET_UNION_HPP -#define SPROUT_ALGORITHM_FIXED_SET_UNION_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - set_union_impl( - InputIterator1, InputIterator1, - InputIterator2, InputIterator2, - Result const& result, Compare, - typename sprout::container_traits::size_type, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - set_union_impl( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp, - typename sprout::container_traits::size_type size, - Args const&... args - ) - { - return sizeof...(Args) < size - ? first1 != last1 - ? first2 != last2 - ? comp(*first1, *first2) - ? sprout::fixed::detail::set_union_impl( - sprout::next(first1), last1, first2, last2, result, comp, - size, args..., *first1 - ) - : comp(*first2, *first1) - ? sprout::fixed::detail::set_union_impl( - first1, last1, sprout::next(first2), last2, result, comp, - size, args..., *first2 - ) - : sprout::fixed::detail::set_union_impl( - sprout::next(first1), last1, sprout::next(first2), last2, result, comp, - size, args..., *first1 - ) - : sprout::fixed::detail::set_union_impl( - sprout::next(first1), last1, first2, last2, result, comp, - size, args..., *first1 - ) - : first2 != last2 - ? sprout::fixed::detail::set_union_impl( - first1, last1, sprout::next(first2), last2, result, comp, - size, args..., *first2 - ) - : sprout::detail::container_complate(result, args...) - : sprout::detail::container_complate(result, args...) - ; - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - set_union( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp - ) - { - return sprout::fixed::detail::set_union_impl( - first1, last1, - first2, last2, - result, comp, - sprout::size(result) - ); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - set_union( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp - ) - { - return sprout::remake( - result, sprout::size(result), - sprout::make_set_union_iterator(first1, last1, first2, last2, comp), - sprout::make_set_union_iterator(last1, last1, last2, last2, comp) - ); - } - } // namespace detail - // - // set_union - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_union( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp - ) - { - return sprout::fixed::detail::set_union(first1, last1, first2, last2, result, comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_union( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result - ) - { - return sprout::fixed::set_union(first1, last1, first2, last2, result, sprout::less<>()); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_union( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Compare comp - ) - { - return sprout::fixed::set_union(first1, last1, first2, last2, sprout::pit(), comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_union( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2 - ) - { - return sprout::fixed::set_union(first1, last1, first2, last2, sprout::pit()); - } - } // namespace fixed - - template< - typename InputIterator1, typename InputIterator2, typename Result, typename Compare, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_union( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result, Compare comp - ) - { - return sprout::fixed::set_union(first1, last1, first2, last2, result, comp); - } - template< - typename InputIterator1, typename InputIterator2, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_union( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Result const& result - ) - { - return sprout::fixed::set_union(first1, last1, first2, last2, result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_union( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Compare comp - ) - { - return sprout::fixed::set_union(first1, last1, first2, last2, comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_union( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2 - ) - { - return sprout::fixed::set_union(first1, last1, first2, last2); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_SET_UNION_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/shuffle.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/shuffle.hpp deleted file mode 100644 index daacc5c..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/shuffle.hpp +++ /dev/null @@ -1,118 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_SHUFFLE_HPP -#define SPROUT_ALGORITHM_FIXED_SHUFFLE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::array - make_shuffle_indexes_1(std::ptrdiff_t n, Random const& rnd, sprout::array const& arr, std::ptrdiff_t i) { - return i < n - 1 - ? sprout::fixed::detail::make_shuffle_indexes_1( - n, - sprout::random::next(rnd)(), - sprout::fixed::swap_element(arr, arr.begin() + i, arr.begin() + sprout::random::result(rnd)), - i + 1 - ) - : sprout::fixed::swap_element(arr, arr.begin() + i, arr.begin() + sprout::random::result(rnd)) - ; - } - template - inline SPROUT_CONSTEXPR sprout::array - make_shuffle_indexes(std::ptrdiff_t n, UniformRandomNumberGenerator&& g) { - return n > 1 - ? sprout::fixed::detail::make_shuffle_indexes_1( - n, - SPROUT_WORKAROUND_DETAIL_UNIFORM_INT_DISTRIBUTION(0, n - 1)( - SPROUT_FORWARD(UniformRandomNumberGenerator, g) - ), - sprout::fixed::iota(sprout::pit >(), 0), - 0 - ) - : sprout::array{{}} - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - shuffle_impl_1( - Container const& cont, - sprout::index_tuple, - Shuffled const& shuffled, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::size_type size - ) - { - return sprout::remake( - cont, - sprout::size(cont), - (Indexes >= offset && Indexes < offset + size - ? *sprout::next(sprout::begin(cont), shuffled[Indexes - offset]) - : *sprout::next(sprout::internal_begin(cont), Indexes) - )... - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - shuffle_impl( - Container const& cont, - sprout::index_tuple indexes, - UniformRandomNumberGenerator&& g, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::size_type size - ) - { - return sprout::fixed::detail::shuffle_impl_1( - cont, - indexes, - sprout::fixed::detail::make_shuffle_indexes::static_size>( - size, - SPROUT_FORWARD(UniformRandomNumberGenerator, g) - ), - offset, - size - ); - } - } // namespace detail - // - // shuffle - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - shuffle(Container const& cont, UniformRandomNumberGenerator&& g) { - return sprout::fixed::detail::shuffle_impl( - cont, - sprout::container_indexes::make(), - SPROUT_FORWARD(UniformRandomNumberGenerator, g), - sprout::internal_begin_offset(cont), - sprout::size(cont) - ); - } - } // namespace fixed - - using sprout::fixed::shuffle; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_SHUFFLE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/shuffle_result.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/shuffle_result.hpp deleted file mode 100644 index 8d9ae82..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/shuffle_result.hpp +++ /dev/null @@ -1,133 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_SHUFFLE_RESULT_HPP -#define SPROUT_ALGORITHM_FIXED_SHUFFLE_RESULT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::pair, typename std::decay::type> - make_shuffle_result_indexes_1(std::ptrdiff_t n, Random const& rnd, sprout::array const& arr, std::ptrdiff_t i) { - typedef sprout::pair, typename std::decay::type> result_type; - return i < n - 1 - ? sprout::fixed::detail::make_shuffle_result_indexes_1( - n, - sprout::random::next(rnd)(), - sprout::fixed::swap_element(arr, arr.begin() + i, arr.begin() + sprout::random::result(rnd)), - i + 1 - ) - : result_type( - sprout::fixed::swap_element(arr, arr.begin() + i, arr.begin() + sprout::random::result(rnd)), - sprout::random::next(rnd).engine() - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair, typename std::decay::type> - make_shuffle_result_indexes(std::ptrdiff_t n, UniformRandomNumberGenerator&& g) { - typedef sprout::pair, typename std::decay::type> result_type; - return n > 1 - ? sprout::fixed::detail::make_shuffle_result_indexes_1( - n, - SPROUT_WORKAROUND_DETAIL_UNIFORM_INT_DISTRIBUTION(0, n - 1)( - SPROUT_FORWARD(UniformRandomNumberGenerator, g) - ), - sprout::fixed::iota(sprout::pit >(), 0), - 0 - ) - : result_type( - sprout::array{{}}, - SPROUT_FORWARD(UniformRandomNumberGenerator, g) - ) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::shuffle::type - shuffle_result_impl_1( - Container const& cont, - sprout::index_tuple, - Shuffled const& shuffled, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::size_type size - ) - { - typedef typename sprout::fixed::results::shuffle::type result_type; - return result_type( - sprout::remake( - cont, - sprout::size(cont), - (Indexes >= offset && Indexes < offset + size - ? *sprout::next(sprout::begin(cont), sprout::first(shuffled)[Indexes - offset]) - : *sprout::next(sprout::internal_begin(cont), Indexes) - )... - ), - sprout::second(shuffled) - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::shuffle::type - shuffle_result_impl( - Container const& cont, - sprout::index_tuple indexes, - UniformRandomNumberGenerator&& g, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::size_type size - ) - { - return sprout::fixed::detail::shuffle_result_impl_1( - cont, - indexes, - sprout::fixed::detail::make_shuffle_result_indexes::static_size>( - size, - SPROUT_FORWARD(UniformRandomNumberGenerator, g) - ), - offset, - size - ); - } - } // namespace detail - // - // shuffle_result - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::shuffle::type - shuffle_result(Container const& cont, UniformRandomNumberGenerator&& g) { - return sprout::fixed::detail::shuffle_result_impl( - cont, - sprout::container_indexes::make(), - SPROUT_FORWARD(UniformRandomNumberGenerator, g), - sprout::internal_begin_offset(cont), - sprout::size(cont) - ); - } - } // namespace fixed - - using sprout::fixed::shuffle_result; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_SHUFFLE_RESULT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/sort.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/sort.hpp deleted file mode 100644 index a87436e..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/sort.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_SORT_HPP -#define SPROUT_ALGORITHM_FIXED_SORT_HPP - -#include -#include -#include - -namespace sprout { - namespace fixed { - // - // sort - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - sort(Container const& cont, Compare comp) { - return sprout::fixed::stable_sort(cont, comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - sort(Container const& cont) { - return sprout::fixed::stable_sort(cont); - } - } // namespace fixed - - using sprout::fixed::sort; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_SORT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/sort_heap.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/sort_heap.hpp deleted file mode 100644 index 56ae29c..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/sort_heap.hpp +++ /dev/null @@ -1,73 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_SORT_HEAP_HPP -#define SPROUT_ALGORITHM_FIXED_SORT_HEAP_HPP - -#include -#include -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - sort_heap_impl( - Container const& cont, Compare comp, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::difference_type size - ) - { - return size < 2 - ? sprout::deep_copy(cont) - : sprout::fixed::detail::sort_heap_impl( - sprout::fixed::detail::pop_heap_impl( - sprout::fixed::swap_element(cont, sprout::begin(cont), sprout::next(sprout::begin(cont), size - 1)), - comp, - offset, - size - 1 - ), - comp, - offset, - size - 1 - ) - ; - } - } // namespace detail - // - // sort_heap - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - sort_heap(Container const& cont, Compare comp) { - return sprout::fixed::detail::sort_heap_impl( - cont, comp, - sprout::internal_begin_offset(cont), - sprout::size(cont) - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - sort_heap(Container const& cont) { - return sprout::fixed::detail::sort_heap_impl( - cont, NS_SSCRISK_CEL_OR_SPROUT::less::value_type>(), - sprout::internal_begin_offset(cont), - sprout::size(cont) - ); - } - } // namespace fixed - - using sprout::fixed::sort_heap; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_SORT_HEAP_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/stable_partition.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/stable_partition.hpp deleted file mode 100644 index e958f11..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/stable_partition.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_STABLE_PARTITION_HPP -#define SPROUT_ALGORITHM_FIXED_STABLE_PARTITION_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - // - // stable_partition - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - stable_partition(Container const& cont, Predicate pred) { - return sprout::fixed::stable_partition_copy(sprout::begin(cont), sprout::end(cont), cont, pred); - } - } // namespace fixed - - using sprout::fixed::stable_partition; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_STABLE_PARTITION_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/stable_partition_copy.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/stable_partition_copy.hpp deleted file mode 100644 index b91ca92..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/stable_partition_copy.hpp +++ /dev/null @@ -1,127 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_STABLE_PARTITION_COPY_HPP -#define SPROUT_ALGORITHM_FIXED_STABLE_PARTITION_COPY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - stable_partition_copy_impl_1( - BidirectionalIterator const&, BidirectionalIterator const&, - Result const& result, Predicate, - typename sprout::container_traits::size_type, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - stable_partition_copy_impl_1( - BidirectionalIterator const& first, BidirectionalIterator const& last, - Result const& result, Predicate pred, - typename sprout::container_traits::size_type size, - Args const&... args - ) - { - return first != last && sizeof...(Args) < size - ? !pred(*first) - ? sprout::fixed::detail::stable_partition_copy_impl_1( - sprout::next(first), last, result, pred, - size, args..., *first - ) - : sprout::fixed::detail::stable_partition_copy_impl_1( - sprout::next(first), last, result, pred, - size, args... - ) - : sprout::detail::container_complate(result, args...) - ; - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - stable_partition_copy_impl( - BidirectionalIterator, BidirectionalIterator, - Result const& result, Predicate, - typename sprout::container_traits::size_type, - BidirectionalIterator, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - stable_partition_copy_impl( - BidirectionalIterator const& first, BidirectionalIterator const& last, - Result const& result, Predicate pred, - typename sprout::container_traits::size_type size, - BidirectionalIterator const& temp_first, - Args const&... args - ) - { - return first != last && sizeof...(Args) < size - ? pred(*first) - ? sprout::fixed::detail::stable_partition_copy_impl( - sprout::next(first), last, result, pred, - size, temp_first, args..., *first - ) - : sprout::fixed::detail::stable_partition_copy_impl( - sprout::next(first), last, result, pred, - size, temp_first, args... - ) - : sprout::fixed::detail::stable_partition_copy_impl_1( - temp_first, last, result, pred, - size, args... - ) - ; - } - } // namespace detail - // - // stable_partition_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - stable_partition_copy(BidirectionalIterator first, BidirectionalIterator last, Result const& result, Predicate pred) { - return sprout::fixed::detail::stable_partition_copy_impl(first, last, result, pred, sprout::size(result), first); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - stable_partition_copy(BidirectionalIterator first, BidirectionalIterator last, Predicate pred) { - return sprout::fixed::stable_partition_copy(first, last, sprout::pit(), pred); - } - } // namespace fixed - - using sprout::fixed::stable_partition_copy; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_STABLE_PARTITION_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/stable_sort.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/stable_sort.hpp deleted file mode 100644 index c8824bb..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/stable_sort.hpp +++ /dev/null @@ -1,249 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_STABLE_SORT_HPP -#define SPROUT_ALGORITHM_FIXED_STABLE_SORT_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - stable_sort_impl_restart( - Container const& cont, Compare comp, - typename sprout::container_traits::size_type size, - typename sprout::container_traits::value_type const& prev_value, - Args const&... args - ); - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - stable_sort_impl_synonym( - Container const& cont, Compare, - typename sprout::container_traits::size_type, - typename sprout::container_traits::const_iterator, - typename sprout::container_traits::const_iterator, - typename sprout::container_traits::value_type const&, - typename sprout::container_traits::size_type, - Args const&... args - ) - { - return sprout::remake(cont, sprout::size(cont), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - stable_sort_impl_synonym( - Container const& cont, Compare comp, - typename sprout::container_traits::size_type size, - typename sprout::container_traits::const_iterator first, - typename sprout::container_traits::const_iterator last, - typename sprout::container_traits::value_type const& value, - typename sprout::container_traits::size_type count, - Args const&... args - ) - { - return first != last && count != 0 - ? !comp(*first, value) && !comp(value, *first) - ? sprout::fixed::detail::stable_sort_impl_synonym( - cont, comp, - size, sprout::next(first), last, value, count - 1, args..., *first - ) - : sprout::fixed::detail::stable_sort_impl_synonym( - cont, comp, - size, sprout::next(first), last, value, count, args... - ) - : sprout::fixed::detail::stable_sort_impl_restart( - cont, comp, - size, value, args... - ) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - stable_sort_impl_restart_1( - Container const& cont, Compare comp, - typename sprout::container_traits::size_type size, - typename sprout::container_traits::const_iterator first, - typename sprout::container_traits::const_iterator last, - typename sprout::container_traits::value_type const& value, - typename sprout::container_traits::size_type count, - typename sprout::container_traits::const_iterator current, - typename sprout::container_traits::value_type const& prev_value, - Args const&... args - ) - { - return first != last - ? comp(prev_value, *first) - ? count == 0 || comp(*first, value) - ? sprout::fixed::detail::stable_sort_impl_restart_1( - cont, comp, - size, sprout::next(first), last, *first, 1, first, prev_value, args... - ) - : comp(value, *first) - ? sprout::fixed::detail::stable_sort_impl_restart_1( - cont, comp, - size, sprout::next(first), last, value, count, current, prev_value, args... - ) - : sprout::fixed::detail::stable_sort_impl_restart_1( - cont, comp, - size, sprout::next(first), last, value, count + 1, current, prev_value, args... - ) - : sprout::fixed::detail::stable_sort_impl_restart_1( - cont, comp, - size, sprout::next(first), last, value, count, current, prev_value, args... - ) - : sprout::fixed::detail::stable_sort_impl_synonym( - cont, comp, - size, sprout::next(current), last, value, count - 1, args..., value - ) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - stable_sort_impl_restart( - Container const& cont, Compare comp, - typename sprout::container_traits::size_type size, - typename sprout::container_traits::value_type const& prev_value, - Args const&... args - ) - { - return sizeof...(Args) < size - ? sprout::fixed::detail::stable_sort_impl_restart_1( - cont, comp, - size, - sprout::begin(cont), - sprout::end(cont), - *sprout::begin(cont), - 0, - sprout::begin(cont), - prev_value, - args... - ) - : sprout::detail::container_complate(cont, args...) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - stable_sort_impl_1( - Container const& cont, Compare comp, - typename sprout::container_traits::size_type size, - typename sprout::container_traits::const_iterator first, - typename sprout::container_traits::const_iterator last, - typename sprout::container_traits::value_type const& value, - typename sprout::container_traits::size_type count, - typename sprout::container_traits::const_iterator current - ) - { - return first != last - ? comp(*first, value) - ? sprout::fixed::detail::stable_sort_impl_1( - cont, comp, - size, sprout::next(first), last, *first, 1, first - ) - : comp(value, *first) - ? sprout::fixed::detail::stable_sort_impl_1( - cont, comp, - size, sprout::next(first), last, value, count, current - ) - : sprout::fixed::detail::stable_sort_impl_1( - cont, comp, - size, sprout::next(first), last, value, count + 1, current - ) - : sprout::fixed::detail::stable_sort_impl_synonym( - cont, comp, - size, sprout::next(current), last, value, count - 1, value - ) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - stable_sort_impl( - Container const& cont, Compare comp, - typename sprout::container_traits::size_type size - ) - { - return sprout::fixed::detail::stable_sort_impl_1( - cont, comp, - size, - sprout::next(sprout::begin(cont)), - sprout::end(cont), - *sprout::begin(cont), - 1, - sprout::begin(cont) - ); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - (sprout::container_traits::static_size <= 1), - typename sprout::fixed::results::algorithm::type - >::type - stable_sort(Container const& cont, Compare) { - return sprout::deep_copy(cont); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - (sprout::container_traits::static_size > 1), - typename sprout::fixed::results::algorithm::type - >::type - stable_sort(Container const& cont, Compare comp) { - return sprout::fixed::detail::stable_sort_impl( - cont, comp, - sprout::size(cont) - ); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - (sprout::container_traits::static_size <= 1), - typename sprout::fixed::results::algorithm::type - >::type - stable_sort(Container const& cont) { - return sprout::deep_copy(cont); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - (sprout::container_traits::static_size > 1), - typename sprout::fixed::results::algorithm::type - >::type - stable_sort(Container const& cont) { - return sprout::fixed::detail::stable_sort_impl( - cont, NS_SSCRISK_CEL_OR_SPROUT::less::value_type>(), - sprout::size(cont) - ); - } - } // namespace detail - // - // stable_sort - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - stable_sort(Container const& cont, Compare comp) { - return sprout::fixed::detail::stable_sort(cont, comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - stable_sort(Container const& cont) { - return sprout::fixed::detail::stable_sort(cont); - } - } // namespace fixed - - using sprout::fixed::stable_sort; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_STABLE_SORT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/swap_element.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/swap_element.hpp deleted file mode 100644 index a9a292a..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/swap_element.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_SWAP_ELEMENT_HPP -#define SPROUT_ALGORITHM_FIXED_SWAP_ELEMENT_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - // - // swap_element - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - swap_element( - Container const& cont, - typename sprout::container_traits::const_iterator pos1, - typename sprout::container_traits::const_iterator pos2 - ) - { - return sprout::fixed::swap_element_copy(sprout::begin(cont), sprout::end(cont), cont, pos1, pos2); - } - } // namespace fixed - - using sprout::fixed::swap_element; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_SWAP_ELEMENT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/swap_element_copy.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/swap_element_copy.hpp deleted file mode 100644 index 475b92c..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/swap_element_copy.hpp +++ /dev/null @@ -1,155 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_SWAP_ELEMENT_COPY_HPP -#define SPROUT_ALGORITHM_FIXED_SWAP_ELEMENT_COPY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - swap_element_copy_impl_ra( - RandomAccessIterator const& first, RandomAccessIterator const&, - Result const& result, - RandomAccessIterator const& pos1, RandomAccessIterator const& pos2, - sprout::index_tuple, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::size_type size, - typename sprout::container_traits::size_type input_size - ) - { - return sprout::remake( - result, - sprout::size(result), - (Indexes >= offset && Indexes < offset + size && Indexes < offset + input_size - ? sprout::next(first, Indexes - offset) == pos1 - ? *pos2 - : sprout::next(first, Indexes - offset) == pos2 - ? *pos1 - : first[Indexes - offset] - : *sprout::next(sprout::internal_begin(result), Indexes) - )... - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - swap_element_copy( - RandomAccessIterator const& first, RandomAccessIterator const& last, - Result const& result, - RandomAccessIterator const& pos1, RandomAccessIterator const& pos2, - std::random_access_iterator_tag* - ) - { - return sprout::fixed::detail::swap_element_copy_impl_ra( - first, last, - result, - pos1, pos2, - sprout::container_indexes::make(), - sprout::internal_begin_offset(result), - sprout::size(result), - sprout::distance(first, last) - ); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - swap_element_copy_impl( - ForwardIterator const&, ForwardIterator const&, - Result const& result, - ForwardIterator const&, ForwardIterator const&, - typename sprout::container_traits::size_type, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - swap_element_copy_impl( - ForwardIterator const& first, ForwardIterator const& last, - Result const& result, - ForwardIterator const& pos1, ForwardIterator const& pos2, - typename sprout::container_traits::size_type size, - Args const&... args - ) - { - return first != last && sizeof...(Args) < size - ? sprout::fixed::detail::swap_element_copy_impl( - sprout::next(first), last, result, pos1, pos2, - size, args..., first == pos1 ? *pos2 : first == pos2 ? *pos1 : *first - ) - : sprout::detail::container_complate(result, args...) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - swap_element_copy( - ForwardIterator const& first, ForwardIterator const& last, - Result const& result, - ForwardIterator const& pos1, ForwardIterator const& pos2, - std::forward_iterator_tag* - ) - { - return sprout::fixed::detail::swap_element_copy_impl(first, last, result, pos1, pos2, sprout::size(result)); - } - } // namespace detail - // - // swap_element_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - swap_element_copy(ForwardIterator first, ForwardIterator last, Result const& result, ForwardIterator pos1, ForwardIterator pos2) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::fixed::detail::swap_element_copy(first, last, result, pos1, pos2, category()); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - swap_element_copy(ForwardIterator first, ForwardIterator last, ForwardIterator pos1, ForwardIterator pos2) { - return sprout::fixed::swap_element_copy(first, last, sprout::pit(), pos1, pos2); - } - } // namespace fixed - - template< - typename ForwardIterator, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - swap_element_copy(ForwardIterator first, ForwardIterator last, Result const& result, ForwardIterator pos1, ForwardIterator pos2) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::fixed::detail::swap_element_copy(first, last, result, pos1, pos2, category()); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - swap_element_copy(ForwardIterator first, ForwardIterator last, ForwardIterator pos1, ForwardIterator pos2) { - return sprout::fixed::swap_element_copy(first, last, sprout::pit(), pos1, pos2); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_SWAP_ELEMENT_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/transform.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/transform.hpp deleted file mode 100644 index 41dc628..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/transform.hpp +++ /dev/null @@ -1,300 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_TRANSFORM_HPP -#define SPROUT_ALGORITHM_FIXED_TRANSFORM_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform_impl_ra( - RandomAccessIterator const& first, RandomAccessIterator const&, - Result const& result, UnaryOperation op, - sprout::index_tuple, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::size_type size, - typename sprout::container_traits::size_type input_size - ) - { - return sprout::remake( - result, sprout::size(result), - (Indexes >= offset && Indexes < offset + size && Indexes < offset + input_size - ? op(*sprout::next(first, Indexes - offset)) - : *sprout::next(sprout::internal_begin(result), Indexes) - )... - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform( - RandomAccessIterator const& first, RandomAccessIterator const& last, - Result const& result, UnaryOperation op, - std::random_access_iterator_tag* - ) - { - return sprout::fixed::detail::transform_impl_ra( - first, last, - result, op, - sprout::container_indexes::make(), - sprout::internal_begin_offset(result), - sprout::size(result), - sprout::distance(first, last) - ); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - transform_impl( - InputIterator const&, InputIterator const&, - Result const& result, UnaryOperation, - typename sprout::container_traits::size_type, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - transform_impl( - InputIterator const& first, InputIterator const& last, - Result const& result, UnaryOperation op, - typename sprout::container_traits::size_type size, - Args const&... args - ) - { - return first != last && sizeof...(Args) < size - ? sprout::fixed::detail::transform_impl(sprout::next(first), last, result, op, size, args..., op(*first)) - : sprout::detail::container_complate(result, args...) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform( - InputIterator const& first, InputIterator const& last, - Result const& result, UnaryOperation op, - std::input_iterator_tag* - ) - { - return sprout::fixed::detail::transform_impl(first, last, result, op, sprout::size(result)); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - transform(InputIterator const& first, InputIterator const& last, Result const& result, UnaryOperation op) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::fixed::detail::transform(first, last, result, op, category()); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - transform(InputIterator const& first, InputIterator const& last, Result const& result, UnaryOperation op) { - return sprout::remake( - result, sprout::size(result), - sprout::make_transform_iterator(first, op), - sprout::make_transform_iterator(last, op) - ); - } - } // namespace detail - // - // transform - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform(InputIterator first, InputIterator last, Result const& result, UnaryOperation op) { - return sprout::fixed::detail::transform(first, last, result, op); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform(InputIterator first, InputIterator last, UnaryOperation op) { - return sprout::fixed::transform(first, last, sprout::pit(), op); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform_impl_ra( - RandomAccessIterator1 const& first1, RandomAccessIterator1 const&, RandomAccessIterator2 first2, - Result const& result, BinaryOperation op, - sprout::index_tuple, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::size_type size, - typename sprout::container_traits::size_type input_size - ) - { - return sprout::remake( - result, sprout::size(result), - (Indexes >= offset && Indexes < offset + size && Indexes < offset + input_size - ? op(*sprout::next(first1, Indexes - offset), *sprout::next(first2, Indexes - offset)) - : *sprout::next(sprout::internal_begin(result), Indexes) - )... - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform( - RandomAccessIterator1 const& first1, RandomAccessIterator1 const& last1, RandomAccessIterator2 first2, - Result const& result, BinaryOperation op, - std::random_access_iterator_tag* - ) - { - return sprout::fixed::detail::transform_impl_ra( - first1, last1, first2, - result, op, - sprout::container_indexes::make(), - sprout::internal_begin_offset(result), - sprout::size(result), - sprout::distance(first1, last1) - ); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - transform_impl( - InputIterator1, InputIterator1, InputIterator2, - Result const& result, BinaryOperation, - typename sprout::container_traits::size_type, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - transform_impl( - InputIterator1 const& first1, InputIterator1 const& last1, InputIterator2 first2, - Result const& result, BinaryOperation op, - typename sprout::container_traits::size_type size, - Args const&... args - ) - { - return first1 != last1 && sizeof...(Args) < size - ? sprout::fixed::detail::transform_impl(sprout::next(first1), last1, sprout::next(first2), result, op, size, args..., op(*first1, *first2)) - : sprout::detail::container_complate(result, args...) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform( - InputIterator1 const& first1, InputIterator1 const& last1, InputIterator2 first2, - Result const& result, BinaryOperation op, - std::input_iterator_tag* - ) - { - return sprout::fixed::detail::transform_impl(first1, last1, first2, result, op, sprout::size(result)); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - transform(InputIterator1 const& first1, InputIterator1 const& last1, InputIterator2 const& first2, Result const& result, BinaryOperation op) { - typedef typename sprout::common_iterator_category::type* category; - return sprout::fixed::detail::transform(first1, last1, first2, result, op, category()); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - transform(InputIterator1 const& first1, InputIterator1 const& last1, InputIterator2 const& first2, Result const& result, BinaryOperation op) { - return sprout::remake( - result, sprout::size(result), - sprout::make_transform_iterator(first1, first2, op), - sprout::make_transform_iterator(last1, first2, op) - ); - } - } // namespace detail - // - // transform - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Result const& result, BinaryOperation op) { - return sprout::fixed::detail::transform(first1, last1, first2, result, op); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, BinaryOperation op) { - return sprout::fixed::transform(first1, last1, first2, sprout::pit(), op); - } - } // namespace fixed - - template< - typename InputIterator, typename Result, typename UnaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform(InputIterator first, InputIterator last, Result const& result, UnaryOperation op) { - return sprout::fixed::transform(first, last, result, op); - } - template< - typename Result, typename InputIterator, typename UnaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform(InputIterator first, InputIterator last, UnaryOperation op) { - return sprout::fixed::transform(first, last, op); - } - - template< - typename InputIterator1, typename InputIterator2, typename Result, typename BinaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Result const& result, BinaryOperation op) { - return sprout::fixed::transform(first1, last1, first2, result, op); - } - template< - typename Result, typename InputIterator1, typename InputIterator2, typename BinaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, BinaryOperation op) { - return sprout::fixed::transform(first1, last1, first2, op); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_TRANSFORM_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/unfold.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/unfold.hpp deleted file mode 100644 index f05ddc4..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/unfold.hpp +++ /dev/null @@ -1,101 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_UNFOLD_HPP -#define SPROUT_ALGORITHM_FIXED_UNFOLD_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args) + 1, - typename sprout::fixed::results::algorithm::type - >::type - unfold_impl_1( - Container const& cont, Generator const&, Next const& next, - typename sprout::container_traits::size_type size, - Args const&... args - ) - { - return sprout::remake(cont, size, args..., sprout::generators::generated_value(next)); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args) + 1, - typename sprout::fixed::results::algorithm::type - >::type - unfold_impl_1( - Container const& cont, Generator const& gen, Next const& next, - typename sprout::container_traits::size_type size, - Args const&... args - ) - { - return sizeof...(Args) + 1 < size - ? sprout::fixed::detail::unfold_impl_1( - cont, gen, gen(sprout::generators::next_generator(next)), size, - args..., sprout::generators::generated_value(next) - ) - : sprout::detail::container_complate(cont, args..., sprout::generators::generated_value(next)) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == 0, - typename sprout::fixed::results::algorithm::type - >::type unfold_impl( - Container const& cont, Generator const&, Init const&, - typename sprout::container_traits::size_type size - ) - { - return sprout::remake(cont, size); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != 0, - typename sprout::fixed::results::algorithm::type - >::type - unfold_impl( - Container const& cont, Generator const& gen, Init const& init, - typename sprout::container_traits::size_type size - ) - { - return size > 0 - ? sprout::fixed::detail::unfold_impl_1(cont, gen, gen(init), size) - : sprout::detail::container_complate(cont) - ; - } - } // namespace detail - // - // unfold - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - unfold(Container const& cont, Generator const& gen, Init const& init) { - return sprout::fixed::detail::unfold_impl(cont, gen, init, sprout::size(cont)); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - unfold(Generator const& gen, Init const& init) { - return sprout::fixed::unfold(sprout::pit(), gen, init); - } - } // namespace fixed - - using sprout::fixed::unfold; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_UNFOLD_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/unfold_n.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/unfold_n.hpp deleted file mode 100644 index 9369a07..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/unfold_n.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_UNFOLD_N_HPP -#define SPROUT_ALGORITHM_FIXED_UNFOLD_N_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - // - // unfold_n - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - unfold_n(Container const& cont, Size n, Generator const& gen, Init const& init) { - return sprout::fixed::detail::unfold_impl(cont, gen, init, n); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - unfold_n(Size n, Generator const& gen, Init const& init) { - return sprout::fixed::unfold_n(sprout::pit(), n, gen, init); - } - } // namespace fixed - - using sprout::fixed::unfold_n; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_UNFOLD_N_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/unique.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/unique.hpp deleted file mode 100644 index 67162ad..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/unique.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_UNIQUE_HPP -#define SPROUT_ALGORITHM_FIXED_UNIQUE_HPP - -#include -#include -#include - -namespace sprout { - namespace fixed { - // - // unique - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - unique(Container const& cont) { - return sprout::fixed::unique_copy(sprout::begin(cont), sprout::end(cont), cont); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - unique(Container const& cont, BinaryPredicate pred) { - return sprout::fixed::unique_copy(sprout::begin(cont), sprout::end(cont), cont, pred); - } - } // namespace fixed - - using sprout::fixed::unique; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_UNIQUE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fixed/unique_copy.hpp b/dsp/lib/sprout/sprout/algorithm/fixed/unique_copy.hpp deleted file mode 100644 index 7179b49..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fixed/unique_copy.hpp +++ /dev/null @@ -1,217 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FIXED_UNIQUE_COPY_HPP -#define SPROUT_ALGORITHM_FIXED_UNIQUE_COPY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args) + 1, - typename sprout::fixed::results::algorithm::type - >::type - unique_copy_impl( - InputIterator const&, InputIterator const&, - Result const& result, - typename sprout::container_traits::size_type, - Head const& head, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args..., head); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args) + 1, - typename sprout::fixed::results::algorithm::type - >::type - unique_copy_impl( - InputIterator const& first, InputIterator const& last, - Result const& result, - typename sprout::container_traits::size_type size, - Head const& head, - Args const&... args - ) - { - return first != last && sizeof...(Args) + 1 < size - ? !(head == *first) - ? unique_copy_impl(sprout::next(first), last, result, size, *first, args..., head) - : unique_copy_impl(sprout::next(first), last, result, size, head, args...) - : sprout::detail::container_complate(result, args..., head) - ; - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - unique_copy(InputIterator const& first, InputIterator const& last, Result const& result) { - return first != last - ? sprout::fixed::detail::unique_copy_impl(sprout::next(first), last, result, sprout::size(result), *first) - : sprout::detail::container_complate(result) - ; - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - unique_copy(InputIterator const& first, InputIterator const& last, Result const& result) { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::remake( - result, sprout::size(result), - sprout::make_unique_iterator(first, last), - sprout::make_unique_iterator(last, last) - ); - } - } // namespace detail - // - // unique_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - unique_copy(InputIterator first, InputIterator last, Result const& result) { - return sprout::fixed::detail::unique_copy(first, last, result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - unique_copy(InputIterator first, InputIterator last) { - return sprout::fixed::unique_copy(first, last, sprout::pit()); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args) + 1, - typename sprout::fixed::results::algorithm::type - >::type - unique_copy_impl( - InputIterator const&, InputIterator const&, - Result const& result, BinaryPredicate, - typename sprout::container_traits::size_type, - Head const& head, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args..., head); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args) + 1, - typename sprout::fixed::results::algorithm::type - >::type - unique_copy_impl( - InputIterator const& first, InputIterator const& last, - Result const& result, BinaryPredicate pred, - typename sprout::container_traits::size_type size, - Head const& head, - Args const&... args - ) - { - return first != last && sizeof...(Args) + 1 < size - ? !pred(head, *first) - ? sprout::fixed::detail::unique_copy_impl(sprout::next(first), last, result, pred, size, *first, args..., head) - : sprout::fixed::detail::unique_copy_impl(sprout::next(first), last, result, pred, size, head, args...) - : sprout::detail::container_complate(result, args..., head) - ; - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - unique_copy(InputIterator const& first, InputIterator const& last, Result const& result, BinaryPredicate pred) { - return first != last - ? sprout::fixed::detail::unique_copy_impl(sprout::next(first), last, result, pred, sprout::size(result), *first) - : sprout::detail::container_complate(result) - ; - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - unique_copy(InputIterator const& first, InputIterator const& last, Result const& result, BinaryPredicate pred) { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::remake( - result, sprout::size(result), - sprout::make_unique_iterator(pred, first, last), - sprout::make_unique_iterator(pred, last, last) - ); - } - } // namespace detail - // - // unique_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - unique_copy(InputIterator first, InputIterator last, Result const& result, BinaryPredicate pred) { - return sprout::fixed::detail::unique_copy(first, last, result, pred); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - unique_copy(InputIterator first, InputIterator last, BinaryPredicate pred) { - return sprout::fixed::unique_copy(first, last, sprout::pit(), pred); - } - } // namespace fixed - - template< - typename InputIterator, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - unique_copy(InputIterator first, InputIterator last, Result const& result) { - return sprout::fixed::unique_copy(first, last, result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - unique_copy(InputIterator first, InputIterator last) { - return sprout::fixed::unique_copy(first, last); - } - - template< - typename InputIterator, typename Result, typename BinaryPredicate, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - unique_copy(InputIterator first, InputIterator last, Result const& result, BinaryPredicate pred) { - return sprout::fixed::unique_copy(first, last, result, pred); - } - - template< - typename Result, typename InputIterator, typename BinaryPredicate, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - unique_copy(InputIterator first, InputIterator last, BinaryPredicate pred) { - return sprout::fixed::unique_copy(first, last, pred); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FIXED_UNIQUE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fold_until.hpp b/dsp/lib/sprout/sprout/algorithm/fold_until.hpp deleted file mode 100644 index 1a2fc21..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fold_until.hpp +++ /dev/null @@ -1,70 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FOLD_UNTIL_HPP -#define SPROUT_ALGORITHM_FOLD_UNTIL_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::pair - fold_until_impl_1( - sprout::pair const& current, - InputIterator const& last, BinaryOperation binary_op, Predicate pred, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair type; - return current.first == last || pred(current.second) ? current - : n == 1 ? type(sprout::next(current.first), binary_op(current.second, *current.first)) - : sprout::detail::fold_until_impl_1( - sprout::detail::fold_until_impl_1( - current, - last, binary_op, pred, n / 2 - ), - last, binary_op, pred, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - fold_until_impl( - sprout::pair const& current, - InputIterator const& last, BinaryOperation binary_op, Predicate pred, typename std::iterator_traits::difference_type n - ) - { - return current.first == last || pred(current.second) ? current - : sprout::detail::fold_until_impl( - sprout::detail::fold_until_impl_1( - current, - last, binary_op, pred, n - ), - last, binary_op, pred, n * 2 - ) - ; - } - } // namespace detail - - // - // fold_until - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR T - fold_until(InputIterator first, InputIterator last, T init, BinaryOperation binary_op, Predicate pred) { - typedef sprout::pair type; - return sprout::detail::fold_until_impl(type(first, init), last, binary_op, pred, 1).second; - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FOLD_UNTIL_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/fold_while.hpp b/dsp/lib/sprout/sprout/algorithm/fold_while.hpp deleted file mode 100644 index ff127ee..0000000 --- a/dsp/lib/sprout/sprout/algorithm/fold_while.hpp +++ /dev/null @@ -1,70 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FOLD_WHILE_HPP -#define SPROUT_ALGORITHM_FOLD_WHILE_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::pair - fold_while_impl_1( - sprout::pair const& current, - InputIterator const& last, BinaryOperation binary_op, Predicate pred, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair type; - return current.first == last || !pred(current.second) ? current - : n == 1 ? type(sprout::next(current.first), binary_op(current.second, *current.first)) - : sprout::detail::fold_while_impl_1( - sprout::detail::fold_while_impl_1( - current, - last, binary_op, pred, n / 2 - ), - last, binary_op, pred, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - fold_while_impl( - sprout::pair const& current, - InputIterator const& last, BinaryOperation binary_op, Predicate pred, typename std::iterator_traits::difference_type n - ) - { - return current.first == last || !pred(current.second) ? current - : sprout::detail::fold_while_impl( - sprout::detail::fold_while_impl_1( - current, - last, binary_op, pred, n - ), - last, binary_op, pred, n * 2 - ) - ; - } - } // namespace detail - - // - // fold_while - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR T - fold_while(InputIterator first, InputIterator last, T init, BinaryOperation binary_op, Predicate pred) { - typedef sprout::pair type; - return sprout::detail::fold_while_impl(type(first, init), last, binary_op, pred, 1).second; - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_FOLD_WHILE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/for_each.hpp b/dsp/lib/sprout/sprout/algorithm/for_each.hpp deleted file mode 100644 index 7534416..0000000 --- a/dsp/lib/sprout/sprout/algorithm/for_each.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FOR_EACH_HPP -#define SPROUT_ALGORITHM_FOR_EACH_HPP - -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_FOR_EACH_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/for_each_n.hpp b/dsp/lib/sprout/sprout/algorithm/for_each_n.hpp deleted file mode 100644 index 892edc0..0000000 --- a/dsp/lib/sprout/sprout/algorithm/for_each_n.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_FOR_EACH_N_HPP -#define SPROUT_ALGORITHM_FOR_EACH_N_HPP - -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_FOR_EACH_N_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/gather.hpp b/dsp/lib/sprout/sprout/algorithm/gather.hpp deleted file mode 100644 index d39bcea..0000000 --- a/dsp/lib/sprout/sprout/algorithm/gather.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_GATHER_HPP -#define SPROUT_ALGORITHM_GATHER_HPP - -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_GATHER_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/generate.hpp b/dsp/lib/sprout/sprout/algorithm/generate.hpp deleted file mode 100644 index f7ba656..0000000 --- a/dsp/lib/sprout/sprout/algorithm/generate.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_GENERATE_HPP -#define SPROUT_ALGORITHM_GENERATE_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_GENERATE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/generate_n.hpp b/dsp/lib/sprout/sprout/algorithm/generate_n.hpp deleted file mode 100644 index 30507fb..0000000 --- a/dsp/lib/sprout/sprout/algorithm/generate_n.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_GENERATE_N_HPP -#define SPROUT_ALGORITHM_GENERATE_N_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_GENERATE_N_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/includes.hpp b/dsp/lib/sprout/sprout/algorithm/includes.hpp deleted file mode 100644 index b273ccb..0000000 --- a/dsp/lib/sprout/sprout/algorithm/includes.hpp +++ /dev/null @@ -1,151 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_INCLUDES_HPP -#define SPROUT_ALGORITHM_INCLUDES_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::pair - includes_impl_ra( - RandomAccessIterator1 first1, - sprout::pair current, - InputIterator2 last2, Compare comp, - typename std::iterator_traits::difference_type len - ) - { - typedef sprout::pair type; - return current.second || current.first == last2 ? current - : len == 1 ? comp(*current.first, *first1) - ? type(current.first, true) - : type(comp(*first1, *current.first) ? current.first : sprout::next(current.first), false) - : sprout::detail::includes_impl_ra( - sprout::next(first1, len / 2), - sprout::detail::includes_impl_ra( - first1, - current, - last2, comp, - len / 2 - ), - last2, comp, - len - len / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - bool - >::type - includes( - RandomAccessIterator1 first1, RandomAccessIterator1 last1, InputIterator2 first2, InputIterator2 last2, Compare comp, - std::random_access_iterator_tag* - ) - { - return first1 == last1 ? first2 == last2 - : sprout::detail::includes_impl_ra( - first1, - sprout::pair(first2, false), - last2, comp, - sprout::distance(first1, last1) - ).first - == last2 - ; - } - - template - inline SPROUT_CONSTEXPR sprout::pair - includes_impl_1( - sprout::pair const& current, - InputIterator1 last1, InputIterator2 last2, Compare comp, - typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair type; - return current.second == last2 || current.first == last1 ? current - : n == 1 - ? comp(*current.second, *current.first) - ? type(last1, current.second) - : type( - sprout::next(current.first), - comp(*current.first, *current.second) ? current.second : sprout::next(current.second) - ) - : sprout::detail::includes_impl_1( - sprout::detail::includes_impl_1( - current, - last1, last2, comp, n / 2 - ), - last1, last2, comp, n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - includes_impl( - sprout::pair const& current, - InputIterator1 last1, InputIterator2 last2, Compare comp, - typename std::iterator_traits::difference_type n - ) - { - return current.second == last2 || current.first == last1 ? current - : sprout::detail::includes_impl( - sprout::detail::includes_impl_1( - current, - last1, last2, comp, n - ), - last1, last2, comp, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR bool - includes( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Compare comp, - std::input_iterator_tag* - ) - { - typedef sprout::pair type; - return first2 == last2 ? true - : sprout::detail::includes_impl(type(first1, first2), last1, last2, comp, 1).second == last2 - ; - } - } // namespace detail - - // 25.4.5.1 includes - // - // recursion depth: - // O(log(N1+N2)) - // - template - inline SPROUT_CONSTEXPR bool - includes(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, Compare comp) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::detail::includes(first1, last1, first2, last2, comp, category()); - } - - template - inline SPROUT_CONSTEXPR bool - includes(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2) { - return sprout::includes( - first1, last1, first2, last2, - sprout::less<>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_INCLUDES_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/inplace_merge.hpp b/dsp/lib/sprout/sprout/algorithm/inplace_merge.hpp deleted file mode 100644 index 1952d95..0000000 --- a/dsp/lib/sprout/sprout/algorithm/inplace_merge.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_INPLACE_MERGE_HPP -#define SPROUT_ALGORITHM_INPLACE_MERGE_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_INPLACE_MERGE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/is_decreasing.hpp b/dsp/lib/sprout/sprout/algorithm/is_decreasing.hpp deleted file mode 100644 index 5a5b784..0000000 --- a/dsp/lib/sprout/sprout/algorithm/is_decreasing.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_IS_DECREASING_HPP -#define SPROUT_ALGORITHM_IS_DECREASING_HPP - -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - // - // is_decreasing - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR bool - is_decreasing(ForwardIterator first, ForwardIterator last) { - return sprout::is_sorted( - first, last, - NS_SSCRISK_CEL_OR_SPROUT::greater::value_type>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_IS_DECREASING_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/is_heap.hpp b/dsp/lib/sprout/sprout/algorithm/is_heap.hpp deleted file mode 100644 index 6d08357..0000000 --- a/dsp/lib/sprout/sprout/algorithm/is_heap.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_IS_HEAP_HPP -#define SPROUT_ALGORITHM_IS_HEAP_HPP - -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - - // 25.4.6.5 is_heap - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR bool - is_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp) { - return sprout::is_heap_until(first, last, comp) == last; - } - - template - inline SPROUT_CONSTEXPR bool - is_heap(RandomAccessIterator first, RandomAccessIterator last) { - return sprout::is_heap( - first, last, - NS_SSCRISK_CEL_OR_SPROUT::less::value_type>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_IS_HEAP_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/is_heap_until.hpp b/dsp/lib/sprout/sprout/algorithm/is_heap_until.hpp deleted file mode 100644 index a4c285b..0000000 --- a/dsp/lib/sprout/sprout/algorithm/is_heap_until.hpp +++ /dev/null @@ -1,77 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_IS_HEAP_UNTIL_HPP -#define SPROUT_ALGORITHM_IS_HEAP_UNTIL_HPP - -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type - is_heap_until_impl( - RandomAccessIterator const& it, Compare comp, - typename std::iterator_traits::difference_type first, typename std::iterator_traits::difference_type last, - typename std::iterator_traits::difference_type pivot, typename std::iterator_traits::difference_type found - ) - { - return found != first ? found - : pivot == 0 ? (!comp(it[first], it[(first - 1) / 2]) ? first : last) - : sprout::detail::is_heap_until_impl( - it, comp, first + pivot, last, - ((last - first) - pivot) / 2, - sprout::detail::is_heap_until_impl( - it, comp, first, first + pivot, - pivot / 2, - first - ) - ) - ; - } - - template - inline SPROUT_CONSTEXPR RandomAccessIterator - is_heap_until_impl( - RandomAccessIterator const& first, RandomAccessIterator const& last, Compare comp, - typename std::iterator_traits::difference_type size - ) - { - return size < 2 ? last - : sprout::next(first, sprout::detail::is_heap_until_impl(first, comp, 1, size, (size - 1) / 2, 1)) - ; - } - } // namespace detail - - // 25.4.6.5 is_heap - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR RandomAccessIterator - is_heap_until(RandomAccessIterator first, RandomAccessIterator last, Compare comp) { - return sprout::detail::is_heap_until_impl( - first, last, comp, - sprout::distance(first, last) - ); - } - - template - inline SPROUT_CONSTEXPR RandomAccessIterator - is_heap_until(RandomAccessIterator first, RandomAccessIterator last) { - return sprout::is_heap_until( - first, last, - NS_SSCRISK_CEL_OR_SPROUT::less::value_type>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_IS_HEAP_UNTIL_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/is_increasing.hpp b/dsp/lib/sprout/sprout/algorithm/is_increasing.hpp deleted file mode 100644 index eda442d..0000000 --- a/dsp/lib/sprout/sprout/algorithm/is_increasing.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_IS_INCREASING_HPP -#define SPROUT_ALGORITHM_IS_INCREASING_HPP - -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - // - // is_increasing - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR bool - is_increasing(ForwardIterator first, ForwardIterator last) { - return sprout::is_sorted( - first, last, - NS_SSCRISK_CEL_OR_SPROUT::less::value_type>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_IS_INCREASING_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/is_partitioned.hpp b/dsp/lib/sprout/sprout/algorithm/is_partitioned.hpp deleted file mode 100644 index b7a4d7d..0000000 --- a/dsp/lib/sprout/sprout/algorithm/is_partitioned.hpp +++ /dev/null @@ -1,108 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_IS_PARTITIONED_HPP -#define SPROUT_ALGORITHM_IS_PARTITIONED_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR bool - is_partitioned_impl_ra(RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred) { - return first == last ? true - : sprout::none_of(sprout::next(first), last, pred) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - bool - >::type - is_partitioned( - RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred, - std::random_access_iterator_tag* - ) - { - return sprout::detail::is_partitioned_impl_ra( - sprout::find_if_not(first, last, pred), - last, pred - ); - } - - template - inline SPROUT_CONSTEXPR sprout::pair::difference_type> - is_partitioned_impl_1( - sprout::pair::difference_type> const& current, - InputIterator const& last, Predicate pred, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair::difference_type> type; - return current.second > 1 || current.first == last ? current - : n == 1 ? current.second == 0 - ? pred(*current.first) ? type(sprout::next(current.first), 0) : type(sprout::next(current.first), 1) - : !pred(*current.first) ? type(sprout::next(current.first), 1) : type(current.first, 2) - : sprout::detail::is_partitioned_impl_1( - sprout::detail::is_partitioned_impl_1( - current, - last, pred, n / 2 - ), - last, pred, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair::difference_type> - is_partitioned_impl( - sprout::pair::difference_type> const& current, - InputIterator const& last, Predicate pred, typename std::iterator_traits::difference_type n - ) - { - return current.second > 1 || current.first == last ? current - : sprout::detail::is_partitioned_impl( - sprout::detail::is_partitioned_impl_1( - current, - last, pred, n - ), - last, pred, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR bool - is_partitioned( - InputIterator const& first, InputIterator const& last, Predicate pred, - std::input_iterator_tag* - ) - { - typedef sprout::pair::difference_type> type; - return sprout::detail::is_partitioned_impl(type(first, 0), last, pred, 1).second <= 1; - } - } // namespace detail - - // 25.3.13 Partitions - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR bool - is_partitioned(InputIterator first, InputIterator last, Predicate pred) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::detail::is_partitioned(first, last, pred, category()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_IS_PARTITIONED_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/is_permutation.hpp b/dsp/lib/sprout/sprout/algorithm/is_permutation.hpp deleted file mode 100644 index 7f88d4e..0000000 --- a/dsp/lib/sprout/sprout/algorithm/is_permutation.hpp +++ /dev/null @@ -1,236 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_IS_PERMUTATION_HPP -#define SPROUT_ALGORITHM_IS_PERMUTATION_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR bool - is_permutation_impl_check(Difference count, ForwardIterator const& first, ForwardIterator const& last, BinaryPredicate pred) - { - return count != 0 && sprout::count_if(sprout::next(first), last, sprout::bind2nd(pred, *first)) + 1 == count; - } - template - inline SPROUT_CONSTEXPR bool - is_permutation_impl_ra( - RandomAccessIterator1 const& first1, RandomAccessIterator1 const& last1, - RandomAccessIterator2 const& first2, RandomAccessIterator2 const& last2, - BinaryPredicate pred, RandomAccessIterator1 const& current, - typename std::iterator_traits::difference_type size - ) - { - return size == 1 ? sprout::find_if(first1, current, sprout::bind2nd(pred, *current)) != current - || sprout::detail::is_permutation_impl_check( - sprout::count_if(first2, last2, sprout::bind2nd(pred, *current)), - current, last1, pred - ) - : sprout::detail::is_permutation_impl_ra( - first1, last1, first2, last2, - pred, current, size / 2 - ) - && sprout::detail::is_permutation_impl_ra( - first1, last1, first2, last2, - pred, sprout::next(current, size / 2), size - size / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value && sprout::is_constant_distance_iterator::value, - bool - >::type - is_permutation( - sprout::pair first, RandomAccessIterator1 const& last1, BinaryPredicate pred, - std::random_access_iterator_tag* - ) - { - return first.first == last1 - || sprout::detail::is_permutation_impl_ra( - first.first, last1, first.second, sprout::next(first.second, sprout::distance(first.first, last1)), - pred, first.first, sprout::distance(first.first, last1) - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - is_permutation_impl_1( - sprout::pair const& current, - ForwardIterator1 const& first1, ForwardIterator1 const& last1, ForwardIterator2 const& first2, ForwardIterator2 const& last2, - BinaryPredicate pred, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair type; - return !current.second || current.first == last1 ? current - : n == 1 ? sprout::find_if(first1, current.first, sprout::bind2nd(pred, *current.first)) != current.first - || sprout::detail::is_permutation_impl_check( - sprout::count_if(first2, last2, sprout::bind2nd(pred, *current.first)), - current.first, last1, pred - ) - ? type(sprout::next(current.first), true) - : type(current.first, false) - : sprout::detail::is_permutation_impl_1( - sprout::detail::is_permutation_impl_1( - current, - first1, last1, first2, last2, pred, n / 2 - ), - first1, last1, first2, last2, pred, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR bool - is_permutation_impl( - ForwardIterator1 const& first1, ForwardIterator1 const& last1, ForwardIterator2 const& first2, - BinaryPredicate pred, typename std::iterator_traits::difference_type size - ) - { - typedef sprout::pair type; - return sprout::detail::is_permutation_impl_1( - type(first1, true), - first1, last1, first2, sprout::next(first2, size), - pred, size - ).second - ; - } - template - inline SPROUT_CONSTEXPR bool - is_permutation( - sprout::pair first, ForwardIterator1 const& last1, BinaryPredicate pred, - std::forward_iterator_tag* - ) - { - return first.first == last1 - || sprout::detail::is_permutation_impl( - first.first, last1, first.second, pred, sprout::distance(first.first, last1) - ) - ; - } - } // namespace detail - - // 25.2.12 Is permutation - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR bool - is_permutation(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2, BinaryPredicate pred) { - typedef typename sprout::common_iterator_category::type* category; - return sprout::detail::is_permutation(sprout::mismatch(first1, last1, first2, pred), last1, pred, category()); - } - template - inline SPROUT_CONSTEXPR bool - is_permutation(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2) { - return sprout::is_permutation(first1, last1, first2, sprout::equal_to<>()); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR bool - is_permutation_impl_ra_1( - sprout::pair first, - RandomAccessIterator1 const& last1, RandomAccessIterator2 const& last2, BinaryPredicate pred - ) - { - return first.first == last1 - || sprout::detail::is_permutation_impl_ra( - first.first, last1, first.second, last2, - pred, first.first, sprout::distance(first.first, last1) - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value && sprout::is_constant_distance_iterator::value, - bool - >::type - is_permutation( - RandomAccessIterator1 const& first1, RandomAccessIterator1 const& last1, RandomAccessIterator2 const& first2, RandomAccessIterator2 const& last2, BinaryPredicate pred, - std::random_access_iterator_tag* - ) - { - return sprout::distance(first1, last1) == sprout::distance(first2, last2) - && sprout::detail::is_permutation_impl_ra_1( - sprout::mismatch(first1, last1, first2, last2, pred), - last1, last2, pred) - ; - } - template - inline SPROUT_CONSTEXPR bool - is_permutation_impl_3( - ForwardIterator1 const& first1, ForwardIterator1 const& last1, - ForwardIterator2 const& first2, ForwardIterator2 const& last2, BinaryPredicate pred, - Difference1 size1, Difference2 size2 - ) - { - typedef sprout::pair type; - return size1 == size2 - && sprout::detail::is_permutation_impl_1( - type(first1, true), first1, last1, first2, last2, - pred, size1 - ).second - ; - } - template - inline SPROUT_CONSTEXPR bool - is_permutation_impl_2( - sprout::pair first, - ForwardIterator1 const& last1, ForwardIterator2 const& last2, BinaryPredicate pred - ) - { - return sprout::detail::is_permutation_impl_3( - first.first, last1, first.second, last2, pred, - sprout::distance(first.first, last1), sprout::distance(first.second, last2) - ) - ; - } - template - inline SPROUT_CONSTEXPR bool - is_permutation( - ForwardIterator1 const& first1, ForwardIterator1 const& last1, ForwardIterator2 const& first2, ForwardIterator2 const& last2, BinaryPredicate pred, - std::forward_iterator_tag* - ) - { - return sprout::detail::is_permutation_impl_2( - sprout::mismatch(first1, last1, first2, last2, pred), - last1, last2, pred); - } - } // namespace detail - - // 25.2.12 Is permutation - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR bool - is_permutation(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred) { - typedef typename sprout::common_iterator_category::type* category; - return sprout::detail::is_permutation(first1, last1, first2, last2, pred, category()); - } - template - inline SPROUT_CONSTEXPR bool - is_permutation(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2, ForwardIterator2 last2) { - return sprout::is_permutation(first1, last1, first2, last2, sprout::equal_to<>()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_IS_PERMUTATION_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/is_sorted.hpp b/dsp/lib/sprout/sprout/algorithm/is_sorted.hpp deleted file mode 100644 index 913d568..0000000 --- a/dsp/lib/sprout/sprout/algorithm/is_sorted.hpp +++ /dev/null @@ -1,93 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_IS_SORTED_HPP -#define SPROUT_ALGORITHM_IS_SORTED_HPP - -#include -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR bool - is_sorted_impl_ra( - RandomAccessIterator const& first, RandomAccessIterator const& last, Compare comp, - typename std::iterator_traits::difference_type pivot - ) - { - return pivot == 0 ? !comp(*last, *first) - : sprout::detail::is_sorted_impl_ra( - first, sprout::next(first, pivot), comp, - pivot / 2 - ) - && sprout::detail::is_sorted_impl_ra( - sprout::next(first, pivot), last, comp, - (sprout::distance(first, last) - pivot) / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - bool - >::type - is_sorted( - RandomAccessIterator const& first, RandomAccessIterator const& last, Compare comp, - std::random_access_iterator_tag* - ) - { - return first == last || sprout::distance(first, last) == 1 ? true - : sprout::detail::is_sorted_impl_ra( - first, sprout::next(first, sprout::distance(first, last) - 1), comp, - (sprout::distance(first, last) - 1) / 2 - ) - ; - } - - template - inline SPROUT_CONSTEXPR bool - is_sorted( - ForwardIterator const& first, ForwardIterator const& last, Compare comp, - std::forward_iterator_tag* - ) - { - return sprout::is_sorted_until(first, last, comp) == last; - } - } // namespace detail - - // 25.4.1.5 is_sorted - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR bool - is_sorted(ForwardIterator first, ForwardIterator last, Compare comp) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::detail::is_sorted(first, last, comp, category()); - } - - template - inline SPROUT_CONSTEXPR bool - is_sorted(ForwardIterator first, ForwardIterator last) { - return sprout::is_sorted( - first, last, - NS_SSCRISK_CEL_OR_SPROUT::less::value_type>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_IS_SORTED_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/is_sorted_until.hpp b/dsp/lib/sprout/sprout/algorithm/is_sorted_until.hpp deleted file mode 100644 index 43bbd4e..0000000 --- a/dsp/lib/sprout/sprout/algorithm/is_sorted_until.hpp +++ /dev/null @@ -1,137 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_IS_SORTED_UNTIL_HPP -#define SPROUT_ALGORITHM_IS_SORTED_UNTIL_HPP - -#include -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR RandomAccessIterator - is_sorted_until_impl_ra( - RandomAccessIterator const& first, RandomAccessIterator const& last, Compare comp, - typename std::iterator_traits::difference_type pivot, RandomAccessIterator const& found - ) - { - return found != first ? found - : pivot == 0 ? (comp(*last, *first) ? first : last) - : sprout::detail::is_sorted_until_impl_ra( - sprout::next(first, pivot), last, comp, - (sprout::distance(first, last) - pivot) / 2, - sprout::detail::is_sorted_until_impl_ra( - first, sprout::next(first, pivot), comp, - pivot / 2, - first - ) - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - RandomAccessIterator - >::type - is_sorted_until( - RandomAccessIterator const& first, RandomAccessIterator const& last, Compare comp, - std::random_access_iterator_tag* - ) - { - return first == last || sprout::distance(first, last) == 1 ? last - : sprout::next( - sprout::detail::is_sorted_until_impl_ra( - first, sprout::next(first, sprout::distance(first, last) - 1), comp, - (sprout::distance(first, last) - 1) / 2, first - ) - ) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::pair - is_sorted_until_impl_1( - sprout::pair const& current, - ForwardIterator const& last, Compare comp, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair type; - return current.second == last ? current - : n == 1 ? comp(*current.second, *current.first) - ? type(current.first, last) - : type(current.second, sprout::next(current.second)) - : sprout::detail::is_sorted_until_impl_1( - sprout::detail::is_sorted_until_impl_1( - current, - last, comp, n / 2 - ), - last, comp, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - is_sorted_until_impl( - sprout::pair const& current, - ForwardIterator const& last, Compare comp, typename std::iterator_traits::difference_type n - ) - { - return current.second == last ? current - : sprout::detail::is_sorted_until_impl( - sprout::detail::is_sorted_until_impl_1( - current, - last, comp, n - ), - last, comp, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR ForwardIterator - is_sorted_until( - ForwardIterator const& first, ForwardIterator const& last, Compare comp, - std::forward_iterator_tag* - ) - { - typedef sprout::pair type; - return first == last ? last - : sprout::next( - sprout::detail::is_sorted_until_impl(type(first, sprout::next(first)), last, comp, 1).first - ) - ; - } - } // namespace detail - - // 25.4.1.5 is_sorted - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR ForwardIterator - is_sorted_until(ForwardIterator first, ForwardIterator last, Compare comp) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::detail::is_sorted_until(first, last, comp, category()); - } - - template - inline SPROUT_CONSTEXPR ForwardIterator - is_sorted_until(ForwardIterator first, ForwardIterator last) { - return sprout::is_sorted_until( - first, last, - NS_SSCRISK_CEL_OR_SPROUT::less::value_type>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_IS_SORTED_UNTIL_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/is_strictly_decreasing.hpp b/dsp/lib/sprout/sprout/algorithm/is_strictly_decreasing.hpp deleted file mode 100644 index 53cc129..0000000 --- a/dsp/lib/sprout/sprout/algorithm/is_strictly_decreasing.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_IS_STRICTLY_DECREASING_HPP -#define SPROUT_ALGORITHM_IS_STRICTLY_DECREASING_HPP - -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - // - // is_strictly_decreasing - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR bool - is_strictly_decreasing(ForwardIterator first, ForwardIterator last) { - return sprout::is_sorted( - first, last, - NS_SSCRISK_CEL_OR_SPROUT::greater_equal::value_type>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_IS_STRICTLY_DECREASING_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/is_strictly_increasing.hpp b/dsp/lib/sprout/sprout/algorithm/is_strictly_increasing.hpp deleted file mode 100644 index 10e696e..0000000 --- a/dsp/lib/sprout/sprout/algorithm/is_strictly_increasing.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_IS_STRICTLY_INCREASING_HPP -#define SPROUT_ALGORITHM_IS_STRICTLY_INCREASING_HPP - -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - // - // is_strictly_increasing - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR bool - is_strictly_increasing(ForwardIterator first, ForwardIterator last) { - return sprout::is_sorted( - first, last, - NS_SSCRISK_CEL_OR_SPROUT::less_equal::value_type>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_IS_STRICTLY_INCREASING_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/iter_swap.hpp b/dsp/lib/sprout/sprout/algorithm/iter_swap.hpp deleted file mode 100644 index 6a3d833..0000000 --- a/dsp/lib/sprout/sprout/algorithm/iter_swap.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_ITER_SWAP_HPP -#define SPROUT_ALGORITHM_ITER_SWAP_HPP - -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_ITER_SWAP_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/lexicographical_compare.hpp b/dsp/lib/sprout/sprout/algorithm/lexicographical_compare.hpp deleted file mode 100644 index 94c19c1..0000000 --- a/dsp/lib/sprout/sprout/algorithm/lexicographical_compare.hpp +++ /dev/null @@ -1,115 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_LEXICOGRAPHICAL_COMPARE_HPP -#define SPROUT_ALGORITHM_LEXICOGRAPHICAL_COMPARE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR bool - lexicographical_compare_impl_check( - Difference1 size1, Difference2 size2, - int found - ) - { - return found < 0 || (found == 2 && size1 < size2); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - bool - >::type - lexicographical_compare( - RandomAccessIterator1 first1, RandomAccessIterator1 last1, RandomAccessIterator2 first2, RandomAccessIterator2 last2, Compare comp, - std::random_access_iterator_tag* - ) - { - return first2 == last2 ? false - : first1 == last1 ? true - : sprout::detail::lexicographical_compare_impl_check( - sprout::distance(first1, last1), sprout::distance(first2, last2), - sprout::detail::lexicographical_compare_impl_ra( - first1, first2, comp, - NS_SSCRISK_CEL_OR_SPROUT::min(sprout::distance(first1, last1), sprout::distance(first2, last2)), - 2 - ) - ) - ; - } - - template - inline SPROUT_CONSTEXPR bool - lexicographical_compare_impl_check( - InputIterator1 last1, InputIterator2 last2, Compare comp, - sprout::pair const& found - ) - { - return found.second == last2 ? false - : found.first == last1 || comp(*found.first, *found.second) - ; - } - - template - inline SPROUT_CONSTEXPR bool - lexicographical_compare( - InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, Compare comp, - std::input_iterator_tag* - ) - { - typedef sprout::pair type; - return sprout::detail::lexicographical_compare_impl_check( - last1, last2, comp, - sprout::detail::lexicographical_compare_impl(type(first1, first2), last1, last2, comp, 1) - ); - } - } // namespace detail - - // 25.4.8 Lexicographical comparison - // - // recursion depth: - // O(log(N1+N2)) - // - template - inline SPROUT_CONSTEXPR bool - lexicographical_compare( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Compare comp - ) - { - typedef typename sprout::common_iterator_category::type* category; - return sprout::detail::lexicographical_compare(first1, last1, first2, last2, comp, category()); - } - - template - inline SPROUT_CONSTEXPR bool - lexicographical_compare( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2 - ) - { - return sprout::lexicographical_compare( - first1, last1, first2, last2, - sprout::less<>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_LEXICOGRAPHICAL_COMPARE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/lower_bound.hpp b/dsp/lib/sprout/sprout/algorithm/lower_bound.hpp deleted file mode 100644 index 5a56e8d..0000000 --- a/dsp/lib/sprout/sprout/algorithm/lower_bound.hpp +++ /dev/null @@ -1,55 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_LOWER_BOUND_HPP -#define SPROUT_ALGORITHM_LOWER_BOUND_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR ForwardIterator - lower_bound( - ForwardIterator const& first, typename std::iterator_traits::difference_type len, - T const& value, Compare comp - ) - { - return len == 0 ? first - : comp(*sprout::next(first, len / 2), value) - ? sprout::detail::lower_bound(sprout::next(first, len / 2 + 1), len - (len / 2 + 1), value, comp) - : sprout::detail::lower_bound(first, len / 2, value, comp) - ; - } - } // namespace detail - - // 25.4.3.1 lower_bound - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR ForwardIterator - lower_bound(ForwardIterator first, ForwardIterator last, T const& value, Compare comp) { - return sprout::detail::lower_bound(first, sprout::distance(first, last), value, comp); - } - - template - inline SPROUT_CONSTEXPR ForwardIterator - lower_bound(ForwardIterator first, ForwardIterator last, T const& value) { - return sprout::lower_bound(first, last, value, sprout::less<>()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_LOWER_BOUND_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/make_heap.hpp b/dsp/lib/sprout/sprout/algorithm/make_heap.hpp deleted file mode 100644 index 588c057..0000000 --- a/dsp/lib/sprout/sprout/algorithm/make_heap.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_MAKE_HEAP_HPP -#define SPROUT_ALGORITHM_MAKE_HEAP_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_MAKE_HEAP_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/make_partial_heap.hpp b/dsp/lib/sprout/sprout/algorithm/make_partial_heap.hpp deleted file mode 100644 index d76d742..0000000 --- a/dsp/lib/sprout/sprout/algorithm/make_partial_heap.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_MAKE_PARTIAL_HEAP_HPP -#define SPROUT_ALGORITHM_MAKE_PARTIAL_HEAP_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_MAKE_PARTIAL_HEAP_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/max.hpp b/dsp/lib/sprout/sprout/algorithm/max.hpp deleted file mode 100644 index c66791b..0000000 --- a/dsp/lib/sprout/sprout/algorithm/max.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_MAX_HPP -#define SPROUT_ALGORITHM_MAX_HPP - -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - - // 25.4.7 Minimum and maximum - template - inline SPROUT_INITIALIZER_LIST_CONSTEXPR T - max(std::initializer_list t, Compare comp) { - return *sprout::max_element(sprout::ptr_index(t.begin(), 0), sprout::ptr_index(t.begin(), t.size()), comp); - } - - template - inline SPROUT_INITIALIZER_LIST_CONSTEXPR T - max(std::initializer_list t) { - return sprout::max(t, NS_SSCRISK_CEL_OR_SPROUT::less()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_MAX_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/max_element.hpp b/dsp/lib/sprout/sprout/algorithm/max_element.hpp deleted file mode 100644 index 1fa7965..0000000 --- a/dsp/lib/sprout/sprout/algorithm/max_element.hpp +++ /dev/null @@ -1,139 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_MAX_ELEMENT_HPP -#define SPROUT_ALGORITHM_MAX_ELEMENT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR ForwardIterator - iter_max(ForwardIterator const& a, ForwardIterator const& b, Compare comp) { - return comp(*a, *b) ? b : a; - } - - template - inline SPROUT_CONSTEXPR RandomAccessIterator - max_element_impl_ra( - RandomAccessIterator const& first, RandomAccessIterator const& last, Compare comp, - typename std::iterator_traits::difference_type pivot - ) - { - return pivot == 0 ? first - : sprout::detail::iter_max( - sprout::detail::max_element_impl_ra( - first, sprout::next(first, pivot), comp, - pivot / 2 - ), - sprout::detail::max_element_impl_ra( - sprout::next(first, pivot), last, comp, - (sprout::distance(first, last) - pivot) / 2 - ), - comp - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - RandomAccessIterator - >::type - max_element( - RandomAccessIterator const& first, RandomAccessIterator const& last, Compare comp, - std::random_access_iterator_tag* - ) - { - return first == last ? last - : sprout::detail::max_element_impl_ra( - first, last, comp, - sprout::distance(first, last) / 2 - ) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::pair - max_element_impl_1( - sprout::pair const& current, - ForwardIterator const& last, Compare comp, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair type; - return current.first == last ? current - : n == 1 ? type(sprout::next(current.first), sprout::detail::iter_max(current.second, current.first, comp)) - : sprout::detail::max_element_impl_1( - sprout::detail::max_element_impl_1( - current, - last, comp, n / 2 - ), - last, comp, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - max_element_impl( - sprout::pair const& current, - ForwardIterator const& last, Compare comp, typename std::iterator_traits::difference_type n - ) - { - return current.first == last ? current - : sprout::detail::max_element_impl( - sprout::detail::max_element_impl_1( - current, - last, comp, n - ), - last, comp, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR ForwardIterator - max_element( - ForwardIterator const& first, ForwardIterator const& last, Compare comp, - std::forward_iterator_tag* - ) - { - typedef sprout::pair type; - return first == last ? last - : sprout::detail::max_element_impl(type(sprout::next(first), first), last, comp, 1).second - ; - } - } // namespace detail - - // 25.4.7 Minimum and maximum - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR ForwardIterator - max_element(ForwardIterator first, ForwardIterator last, Compare comp) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::detail::max_element(first, last, comp, category()); - } - - template - inline SPROUT_CONSTEXPR ForwardIterator - max_element(ForwardIterator first, ForwardIterator last) { - return sprout::max_element( - first, last, - NS_SSCRISK_CEL_OR_SPROUT::less::value_type>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_MAX_ELEMENT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/merge.hpp b/dsp/lib/sprout/sprout/algorithm/merge.hpp deleted file mode 100644 index 150b48a..0000000 --- a/dsp/lib/sprout/sprout/algorithm/merge.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_MERGE_HPP -#define SPROUT_ALGORITHM_MERGE_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_MERGE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/min.hpp b/dsp/lib/sprout/sprout/algorithm/min.hpp deleted file mode 100644 index eaf9cc7..0000000 --- a/dsp/lib/sprout/sprout/algorithm/min.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_MIN_HPP -#define SPROUT_ALGORITHM_MIN_HPP - -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - - // 25.4.7 Minimum and maximum - template - inline SPROUT_INITIALIZER_LIST_CONSTEXPR T - min(std::initializer_list t, Compare comp) { - return *sprout::min_element(sprout::ptr_index(t.begin(), 0), sprout::ptr_index(t.begin(), t.size()), comp); - } - - template - inline SPROUT_INITIALIZER_LIST_CONSTEXPR T - min(std::initializer_list t) { - return sprout::min(t, NS_SSCRISK_CEL_OR_SPROUT::less()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_MIN_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/min_element.hpp b/dsp/lib/sprout/sprout/algorithm/min_element.hpp deleted file mode 100644 index 3db2a76..0000000 --- a/dsp/lib/sprout/sprout/algorithm/min_element.hpp +++ /dev/null @@ -1,139 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_MIN_ELEMENT_HPP -#define SPROUT_ALGORITHM_MIN_ELEMENT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR ForwardIterator - iter_min(ForwardIterator const& a, ForwardIterator const& b, Compare comp) { - return comp(*b, *a) ? b : a; - } - - template - inline SPROUT_CONSTEXPR RandomAccessIterator - min_element_impl_ra( - RandomAccessIterator const& first, RandomAccessIterator const& last, Compare comp, - typename std::iterator_traits::difference_type pivot - ) - { - return pivot == 0 ? first - : sprout::detail::iter_min( - sprout::detail::min_element_impl_ra( - first, sprout::next(first, pivot), comp, - pivot / 2 - ), - sprout::detail::min_element_impl_ra( - sprout::next(first, pivot), last, comp, - (sprout::distance(first, last) - pivot) / 2 - ), - comp - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - RandomAccessIterator - >::type - min_element( - RandomAccessIterator const& first, RandomAccessIterator const& last, Compare comp, - std::random_access_iterator_tag* - ) - { - return first == last ? last - : sprout::detail::min_element_impl_ra( - first, last, comp, - sprout::distance(first, last) / 2 - ) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::pair - min_element_impl_1( - sprout::pair const& current, - ForwardIterator const& last, Compare comp, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair type; - return current.first == last ? current - : n == 1 ? type(sprout::next(current.first), sprout::detail::iter_min(current.second, current.first, comp)) - : sprout::detail::min_element_impl_1( - sprout::detail::min_element_impl_1( - current, - last, comp, n / 2 - ), - last, comp, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - min_element_impl( - sprout::pair const& current, - ForwardIterator const& last, Compare comp, typename std::iterator_traits::difference_type n - ) - { - return current.first == last ? current - : sprout::detail::min_element_impl( - sprout::detail::min_element_impl_1( - current, - last, comp, n - ), - last, comp, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR ForwardIterator - min_element( - ForwardIterator const& first, ForwardIterator const& last, Compare comp, - std::forward_iterator_tag* - ) - { - typedef sprout::pair type; - return first == last ? last - : sprout::detail::min_element_impl(type(sprout::next(first), first), last, comp, 1).second - ; - } - } // namespace detail - - // 25.4.7 Minimum and maximum - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR ForwardIterator - min_element(ForwardIterator first, ForwardIterator last, Compare comp) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::detail::min_element(first, last, comp, category()); - } - - template - inline SPROUT_CONSTEXPR ForwardIterator - min_element(ForwardIterator first, ForwardIterator last) { - return sprout::min_element( - first, last, - NS_SSCRISK_CEL_OR_SPROUT::less::value_type>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_MIN_ELEMENT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/minmax.hpp b/dsp/lib/sprout/sprout/algorithm/minmax.hpp deleted file mode 100644 index efcc071..0000000 --- a/dsp/lib/sprout/sprout/algorithm/minmax.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_MINMAX_HPP -#define SPROUT_ALGORITHM_MINMAX_HPP - -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - // 25.4.7 Minimum and maximum - template - inline SPROUT_CONSTEXPR sprout::pair - minmax(T const& a, T const& b, Compare comp) { - return comp(b, a) ? sprout::pair(b, a) : sprout::pair(a, b); - } - - template - inline SPROUT_CONSTEXPR sprout::pair - minmax(T const& a, T const& b) { - return sprout::minmax(a, b, NS_SSCRISK_CEL_OR_SPROUT::less()); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::pair - minmax_impl(sprout::pair const& p) { - return sprout::pair(*p.first, *p.second); - } - } // namespace detail - - template - inline SPROUT_INITIALIZER_LIST_CONSTEXPR sprout::pair - minmax(std::initializer_list t, Compare comp) { - return sprout::detail::minmax_impl(sprout::minmax_element(sprout::ptr_index(t.begin(), 0), sprout::ptr_index(t.begin(), t.size()), comp)); - } - - template - inline SPROUT_INITIALIZER_LIST_CONSTEXPR sprout::pair - minmax(std::initializer_list t) { - return sprout::minmax(t, NS_SSCRISK_CEL_OR_SPROUT::less()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_MINMAX_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/minmax_element.hpp b/dsp/lib/sprout/sprout/algorithm/minmax_element.hpp deleted file mode 100644 index 5cd6cec..0000000 --- a/dsp/lib/sprout/sprout/algorithm/minmax_element.hpp +++ /dev/null @@ -1,208 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_MINMAX_ELEMENT_HPP -#define SPROUT_ALGORITHM_MINMAX_ELEMENT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR ForwardIteratorPair - iter_minmax_pair(ForwardIteratorPair const& a, ForwardIteratorPair const& b, Compare comp) { - return ForwardIteratorPair( - comp(*sprout::first(b), *sprout::first(a)) ? sprout::first(b) : sprout::first(a), - comp(*sprout::second(b), *sprout::second(a)) ? sprout::second(a) : sprout::second(b) - ); - } - template - inline SPROUT_CONSTEXPR ForwardIteratorPair - iter_minmax(ForwardIteratorPair const& a, ForwardIterator const& b, Compare comp) { - return ForwardIteratorPair( - comp(*b, *sprout::first(a)) ? b : sprout::first(a), - comp(*b, *sprout::second(a)) ? sprout::second(a) : b - ); - } - template - inline SPROUT_CONSTEXPR sprout::pair - iter_minmax(ForwardIterator const& a, ForwardIterator const& b, Compare comp) { - typedef sprout::pair type; - return comp(*b, *a) - ? type(b, a) - : type(a, b) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::pair - minmax_element_impl_ra( - RandomAccessIterator const& first, Compare comp, - typename std::iterator_traits::difference_type half - ) - { - return half == 1 - ? iter_minmax(first, sprout::next(first), comp) - : sprout::detail::iter_minmax_pair( - sprout::detail::minmax_element_impl_ra( - first, comp, half / 2 - ), - sprout::detail::minmax_element_impl_ra( - sprout::next(first, half - (half & 1)), comp, (half + 1) / 2 - ), - comp - ) - ; - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - sprout::pair - >::type - minmax_element( - RandomAccessIterator const& first, RandomAccessIterator const& last, Compare comp, - std::random_access_iterator_tag* - ) - { - return first == last || sprout::next(first) == last - ? sprout::pair(first, first) - : sprout::distance(first, last) % 2 == 0 - ? sprout::detail::minmax_element_impl_ra( - first, comp, - sprout::distance(first, last) / 2 - ) - : sprout::detail::iter_minmax( - sprout::detail::minmax_element_impl_ra( - first, comp, - sprout::distance(first, last) / 2 - ), - sprout::prev(last), - comp - ) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::pair > - minmax_element_impl_3( - sprout::pair minmax, - ForwardIterator const& first, ForwardIterator const& next, - ForwardIterator const& last, Compare comp) { - typedef sprout::pair > type; - return next == last - ? type( - next, - sprout::detail::iter_minmax(minmax, first, comp) - ) - : type( - sprout::next(next), - sprout::detail::iter_minmax_pair( - minmax, - sprout::detail::iter_minmax(first, next, comp), - comp - ) - ) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::pair > - minmax_element_impl_1( - sprout::pair > const& current, - ForwardIterator const& last, Compare comp, typename std::iterator_traits::difference_type n - ) - { - return current.first == last ? current - : n == 1 ? sprout::detail::minmax_element_impl_3( - current.second, current.first, sprout::next(current.first), - last, comp) - : sprout::detail::minmax_element_impl_1( - sprout::detail::minmax_element_impl_1( - current, - last, comp, n / 2 - ), - last, comp, n - n / 2 - ) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::pair > - minmax_element_impl( - sprout::pair > const& current, - ForwardIterator const& last, Compare comp, typename std::iterator_traits::difference_type n - ) - { - return current.first == last ? current - : sprout::detail::minmax_element_impl( - sprout::detail::minmax_element_impl_1( - current, - last, comp, n - ), - last, comp, n * 2 - ) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::pair > - minmax_element_impl_2( - ForwardIterator const& first, ForwardIterator const& next, ForwardIterator const& last, Compare comp - ) - { - typedef sprout::pair type; - return next == last ? sprout::pair(next, type(first, first)) - : sprout::pair(sprout::next(next), iter_minmax(first, next, comp)) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::pair - minmax_element( - ForwardIterator const& first, ForwardIterator const& last, Compare comp, - std::forward_iterator_tag* - ) - { - return first == last ? sprout::pair(first, first) - : sprout::detail::minmax_element_impl( - sprout::detail::minmax_element_impl_2(first, sprout::next(first), last, comp), - last, comp, 1).second - ; - } - } // namespace detail - - // 25.4.7 Minimum and maximum - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR sprout::pair - minmax_element(ForwardIterator first, ForwardIterator last, Compare comp) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::detail::minmax_element(first, last, comp, category()); - } - - template - inline SPROUT_CONSTEXPR sprout::pair - minmax_element(ForwardIterator first, ForwardIterator last) { - return sprout::minmax_element( - first, last, - NS_SSCRISK_CEL_OR_SPROUT::less::value_type>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_MINMAX_ELEMENT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/mismatch.hpp b/dsp/lib/sprout/sprout/algorithm/mismatch.hpp deleted file mode 100644 index 29088e0..0000000 --- a/dsp/lib/sprout/sprout/algorithm/mismatch.hpp +++ /dev/null @@ -1,262 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_MISMATCH_HPP -#define SPROUT_ALGORITHM_MISMATCH_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::pair - mismatch_impl_check(RandomAccessIterator1 first1, RandomAccessIterator2 first2, RandomAccessIterator1 found) { - return sprout::pair( - found, sprout::next(first2, sprout::distance(first1, found)) - ); - } - - template - inline SPROUT_CONSTEXPR RandomAccessIterator1 - mismatch_impl_ra( - RandomAccessIterator1 first1, RandomAccessIterator1 last1, RandomAccessIterator2 first2, BinaryPredicate pred, - typename std::iterator_traits::difference_type pivot, RandomAccessIterator1 found - ) - { - return found != first1 ? found - : pivot == 0 ? (!pred(*first1, *first2) ? first1 : last1) - : sprout::detail::mismatch_impl_ra( - sprout::next(first1, pivot), last1, sprout::next(first2, pivot), pred, - (sprout::distance(first1, last1) - pivot) / 2, - sprout::detail::mismatch_impl_ra( - first1, sprout::next(first1, pivot), first2, pred, - pivot / 2, - first1 - ) - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value && sprout::is_constant_distance_iterator::value, - sprout::pair - >::type - mismatch( - RandomAccessIterator1 first1, RandomAccessIterator1 last1, RandomAccessIterator2 first2, BinaryPredicate pred, - std::random_access_iterator_tag* - ) - { - return first1 == last1 ? sprout::pair(first1, first2) - : sprout::detail::mismatch_impl_check( - first1, first2, - sprout::detail::mismatch_impl_ra( - first1, last1, first2, pred, - sprout::distance(first1, last1) / 2, first1 - ) - ) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::pair - mismatch_impl_check(sprout::tuples::tuple const& current) { - return sprout::pair( - sprout::tuples::get<0>(current), - sprout::tuples::get<1>(current) - ); - } - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - mismatch_impl_1( - sprout::tuples::tuple const& current, - InputIterator1 last1, BinaryPredicate pred, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::tuples::tuple type; - return sprout::tuples::get<2>(current) || sprout::tuples::get<0>(current) == last1 ? current - : n == 1 ? !pred(*sprout::tuples::get<0>(current), *sprout::tuples::get<1>(current)) - ? type(sprout::tuples::get<0>(current), sprout::tuples::get<1>(current), true) - : type(sprout::next(sprout::tuples::get<0>(current)), sprout::next(sprout::tuples::get<1>(current)), false) - : sprout::detail::mismatch_impl_1( - sprout::detail::mismatch_impl_1( - current, - last1, pred, n / 2 - ), - last1, pred, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - mismatch_impl( - sprout::tuples::tuple const& current, - InputIterator1 last1, BinaryPredicate pred, typename std::iterator_traits::difference_type n - ) - { - return sprout::tuples::get<2>(current) || sprout::tuples::get<0>(current) == last1 ? current - : sprout::detail::mismatch_impl( - sprout::detail::mismatch_impl_1( - current, - last1, pred, n - ), - last1, pred, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - mismatch( - InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, BinaryPredicate pred, - std::input_iterator_tag* - ) - { - typedef sprout::tuples::tuple type; - return sprout::detail::mismatch_impl_check( - sprout::detail::mismatch_impl(type(first1, first2, false), last1, pred, 1) - ); - } - } // namespace detail - - // 25.2.10 Mismatch - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR sprout::pair - mismatch(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, BinaryPredicate pred) { - typedef typename sprout::common_iterator_category::type* category; - return sprout::detail::mismatch(first1, last1, first2, pred, category()); - } - template - inline SPROUT_CONSTEXPR sprout::pair - mismatch(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2) { - return sprout::mismatch(first1, last1, first2, sprout::equal_to<>()); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR RandomAccessIterator1 - mismatch2_impl_ra( - RandomAccessIterator1 first1, RandomAccessIterator2 first2, BinaryPredicate pred, - typename std::iterator_traits::difference_type size - ) - { - return sprout::detail::mismatch_impl_ra( - first1, sprout::next(first1, size), first2, pred, - size / 2, first1 - ); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value && sprout::is_constant_distance_iterator::value, - sprout::pair - >::type - mismatch( - RandomAccessIterator1 first1, RandomAccessIterator1 last1, RandomAccessIterator2 first2, RandomAccessIterator2 last2, BinaryPredicate pred, - std::random_access_iterator_tag* - ) - { - return first1 == last1 || first2 == last2 ? sprout::pair(first1, first2) - : sprout::detail::mismatch_impl_check( - first1, first2, - sprout::detail::mismatch2_impl_ra( - first1, first2, pred, - NS_SSCRISK_CEL_OR_SPROUT::min(sprout::distance(first1, last1), sprout::distance(first2, last2)) - ) - ) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::pair - mismatch2_impl_check(sprout::tuples::tuple const& current) { - return sprout::pair( - sprout::tuples::get<0>(current), - sprout::tuples::get<1>(current) - ); - } - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - mismatch2_impl_1( - sprout::tuples::tuple const& current, - InputIterator1 last1, InputIterator2 last2, BinaryPredicate pred, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::tuples::tuple type; - return sprout::tuples::get<2>(current) || sprout::tuples::get<0>(current) == last1 || sprout::tuples::get<1>(current) == last2 ? current - : n == 1 ? !pred(*sprout::tuples::get<0>(current), *sprout::tuples::get<1>(current)) - ? type(sprout::tuples::get<0>(current), sprout::tuples::get<1>(current), true) - : type(sprout::next(sprout::tuples::get<0>(current)), sprout::next(sprout::tuples::get<1>(current)), false) - : sprout::detail::mismatch2_impl_1( - sprout::detail::mismatch2_impl_1( - current, - last1, last2, pred, n / 2 - ), - last1, last2, pred, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - mismatch2_impl( - sprout::tuples::tuple const& current, - InputIterator1 last1, InputIterator2 last2, BinaryPredicate pred, typename std::iterator_traits::difference_type n - ) - { - return sprout::tuples::get<2>(current) || sprout::tuples::get<0>(current) == last1 || sprout::tuples::get<1>(current) == last2 ? current - : sprout::detail::mismatch2_impl( - sprout::detail::mismatch2_impl_1( - current, - last1, last2, pred, n - ), - last1, last2, pred, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - mismatch( - InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, BinaryPredicate pred, - std::input_iterator_tag* - ) - { - typedef sprout::tuples::tuple type; - return sprout::detail::mismatch2_impl_check( - sprout::detail::mismatch2_impl(type(first1, first2, false), last1, last2, pred, 1) - ); - } - } // namespace detail - - // 25.2.10 Mismatch - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR sprout::pair - mismatch(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, BinaryPredicate pred) { - typedef typename sprout::common_iterator_category::type* category; - return sprout::detail::mismatch(first1, last1, first2, last2, pred, category()); - } - template - inline SPROUT_CONSTEXPR sprout::pair - mismatch(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2) { - return sprout::mismatch(first1, last1, first2, last2, sprout::equal_to<>()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_MISMATCH_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/modifying.hpp b/dsp/lib/sprout/sprout/algorithm/modifying.hpp deleted file mode 100644 index f912370..0000000 --- a/dsp/lib/sprout/sprout/algorithm/modifying.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_MODIFYIING_HPP -#define SPROUT_ALGORITHM_MODIFYIING_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_MODIFYIING_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/move.hpp b/dsp/lib/sprout/sprout/algorithm/move.hpp deleted file mode 100644 index 747a322..0000000 --- a/dsp/lib/sprout/sprout/algorithm/move.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_MOVE_HPP -#define SPROUT_ALGORITHM_MOVE_HPP - -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_MOVE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/move_backward.hpp b/dsp/lib/sprout/sprout/algorithm/move_backward.hpp deleted file mode 100644 index 15f6215..0000000 --- a/dsp/lib/sprout/sprout/algorithm/move_backward.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_MOVE_BACKWARD_HPP -#define SPROUT_ALGORITHM_MOVE_BACKWARD_HPP - -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_MOVE_BACKWARD_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/next_difference.hpp b/dsp/lib/sprout/sprout/algorithm/next_difference.hpp deleted file mode 100644 index 8b246fa..0000000 --- a/dsp/lib/sprout/sprout/algorithm/next_difference.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_NEXT_DIFFERENCE_HPP -#define SPROUT_ALGORITHM_NEXT_DIFFERENCE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // next_difference - // - // recursion depth: - // O(log(N1+N2)) - // - template - inline SPROUT_CONSTEXPR sprout::pair - next_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Compare comp - ) - { - typedef sprout::pair type; - return first1 == last1 ? type(last1, last2) - : sprout::find_difference(sprout::next(first1), last1, first2, last2, comp) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - next_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2 - ) - { - return sprout::next_difference(first1, last1, first2, last2, sprout::less<>()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_NEXT_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/next_intersection.hpp b/dsp/lib/sprout/sprout/algorithm/next_intersection.hpp deleted file mode 100644 index f439c27..0000000 --- a/dsp/lib/sprout/sprout/algorithm/next_intersection.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_NEXT_INTERSECTION_HPP -#define SPROUT_ALGORITHM_NEXT_INTERSECTION_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // next_intersection - // - // recursion depth: - // O(log(N1+N2)) - // - template - inline SPROUT_CONSTEXPR sprout::pair - next_intersection( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Compare comp - ) - { - typedef sprout::pair type; - return first1 == last1 || first2 == last2 ? type(last1, last2) - : sprout::find_intersection(sprout::next(first1), last1, sprout::next(first2), last2, comp) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - next_intersection( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2 - ) - { - return sprout::next_intersection(first1, last1, first2, last2, sprout::less<>()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_NEXT_INTERSECTION_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/next_permutation.hpp b/dsp/lib/sprout/sprout/algorithm/next_permutation.hpp deleted file mode 100644 index de455b2..0000000 --- a/dsp/lib/sprout/sprout/algorithm/next_permutation.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_NEXT_PERMUTATION_HPP -#define SPROUT_ALGORITHM_NEXT_PERMUTATION_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_NEXT_PERMUTATION_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/next_symmetric_difference.hpp b/dsp/lib/sprout/sprout/algorithm/next_symmetric_difference.hpp deleted file mode 100644 index bd007e1..0000000 --- a/dsp/lib/sprout/sprout/algorithm/next_symmetric_difference.hpp +++ /dev/null @@ -1,55 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_NEXT_SYMMETRIC_DIFFERENCE_HPP -#define SPROUT_ALGORITHM_NEXT_SYMMETRIC_DIFFERENCE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // next_symmetric_difference - // - // recursion depth: - // O(log(N1+N2)) - // - template - inline SPROUT_CONSTEXPR sprout::pair - next_symmetric_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Compare comp - ) - { - typedef sprout::pair type; - return first1 != last1 - ? first2 != last2 - ? comp(*first1, *first2) - ? sprout::find_symmetric_difference(sprout::next(first1), last1, first2, last2, comp) - : sprout::find_symmetric_difference(first1, last1, sprout::next(first2), last2, comp) - : type(sprout::next(first1), first2) - : first2 != last2 - ? type(first1, sprout::next(first2)) - : type(last1, last2) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - next_symmetric_difference( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2 - ) - { - return sprout::next_symmetric_difference(first1, last1, first2, last2, sprout::less<>()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_NEXT_SYMMETRIC_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/next_union.hpp b/dsp/lib/sprout/sprout/algorithm/next_union.hpp deleted file mode 100644 index f72d1cc..0000000 --- a/dsp/lib/sprout/sprout/algorithm/next_union.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_NEXT_UNION_HPP -#define SPROUT_ALGORITHM_NEXT_UNION_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // next_union - // - // recursion depth: - // O(1) - // - template - inline SPROUT_CONSTEXPR sprout::pair - next_union( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Compare comp - ) - { - typedef sprout::pair type; - return first1 != last1 - ? first2 != last2 - ? comp(*first1, *first2) - ? type(sprout::next(first1), first2) - : comp(*first2, *first1) - ? type(first1, sprout::next(first2)) - : type(sprout::next(first1), sprout::next(first2)) - : type(sprout::next(first1), first2) - : first2 != last2 - ? type(first1, sprout::next(first2)) - : type(last1, last2) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - next_union( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2 - ) - { - return sprout::next_union(first1, last1, first2, last2, sprout::less<>()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_NEXT_UNION_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/non_modifying.hpp b/dsp/lib/sprout/sprout/algorithm/non_modifying.hpp deleted file mode 100644 index 8b49624..0000000 --- a/dsp/lib/sprout/sprout/algorithm/non_modifying.hpp +++ /dev/null @@ -1,68 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_NON_MODIFYIING_HPP -#define SPROUT_ALGORITHM_NON_MODIFYIING_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_NON_MODIFYIING_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/none_of.hpp b/dsp/lib/sprout/sprout/algorithm/none_of.hpp deleted file mode 100644 index b5123b3..0000000 --- a/dsp/lib/sprout/sprout/algorithm/none_of.hpp +++ /dev/null @@ -1,114 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_NONE_OF_HPP -#define SPROUT_ALGORITHM_NONE_OF_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR bool - none_of_impl_ra( - RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred, - typename std::iterator_traits::difference_type pivot - ) - { - return pivot == 0 ? !pred(*first) - : sprout::detail::none_of_impl_ra( - first, sprout::next(first, pivot), pred, - pivot / 2 - ) - && sprout::detail::none_of_impl_ra( - sprout::next(first, pivot), last, pred, - (sprout::distance(first, last) - pivot) / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - bool - >::type - none_of( - RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred, - std::random_access_iterator_tag* - ) - { - return first == last ? true - : sprout::detail::none_of_impl_ra(first, last, pred, sprout::distance(first, last) / 2) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::pair - none_of_impl_1( - sprout::pair const& current, - InputIterator const& last, Predicate pred, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair type; - return !current.second || current.first == last ? current - : n == 1 ? !pred(*current.first) ? type(sprout::next(current.first), true) : type(current.first, false) - : sprout::detail::none_of_impl_1( - sprout::detail::none_of_impl_1( - current, - last, pred, n / 2 - ), - last, pred, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - none_of_impl( - sprout::pair const& current, - InputIterator const& last, Predicate pred, typename std::iterator_traits::difference_type n - ) - { - return !current.second || current.first == last ? current - : sprout::detail::none_of_impl( - sprout::detail::none_of_impl_1( - current, - last, pred, n - ), - last, pred, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR bool - none_of( - InputIterator const& first, InputIterator const& last, Predicate pred, - std::input_iterator_tag* - ) - { - typedef sprout::pair type; - return sprout::detail::none_of_impl(type(first, true), last, pred, 1).second; - } - } // namespace detail - - // 25.2.3 None of - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR bool - none_of(InputIterator first, InputIterator last, Predicate pred) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::detail::none_of(first, last, pred, category()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_NONE_OF_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/none_of_equal.hpp b/dsp/lib/sprout/sprout/algorithm/none_of_equal.hpp deleted file mode 100644 index 99a1f5f..0000000 --- a/dsp/lib/sprout/sprout/algorithm/none_of_equal.hpp +++ /dev/null @@ -1,115 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_NONE_OF_EQUAL_HPP -#define SPROUT_ALGORITHM_NONE_OF_EQUAL_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR bool - none_of_equal_impl_ra( - RandomAccessIterator const& first, RandomAccessIterator const& last, T const& value, - typename std::iterator_traits::difference_type pivot - ) - { - return pivot == 0 ? !(*first == value) - : sprout::detail::none_of_equal_impl_ra( - first, sprout::next(first, pivot), value, - pivot / 2 - ) - && sprout::detail::none_of_equal_impl_ra( - sprout::next(first, pivot), last, value, - (sprout::distance(first, last) - pivot) / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - bool - >::type - none_of_equal( - RandomAccessIterator const& first, RandomAccessIterator const& last, T const& value, - std::random_access_iterator_tag* - ) - { - return first == last ? true - : sprout::detail::none_of_equal_impl_ra(first, last, value, sprout::distance(first, last) / 2) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::pair - none_of_equal_impl_1( - sprout::pair const& current, - InputIterator const& last, T const& value, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair type; - return !current.second || current.first == last ? current - : n == 1 ? !(*current.first == value) ? type(sprout::next(current.first), true) : type(current.first, false) - : sprout::detail::none_of_equal_impl_1( - sprout::detail::none_of_equal_impl_1( - current, - last, value, n / 2 - ), - last, value, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - none_of_equal_impl( - sprout::pair const& current, - InputIterator const& last, T const& value, typename std::iterator_traits::difference_type n - ) - { - return !current.second || current.first == last ? current - : sprout::detail::none_of_equal_impl( - sprout::detail::none_of_equal_impl_1( - current, - last, value, n - ), - last, value, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR bool - none_of_equal( - InputIterator const& first, InputIterator const& last, T const& value, - std::input_iterator_tag* - ) - { - typedef sprout::pair type; - return sprout::detail::none_of_equal_impl(type(first, true), last, value, 1).second; - } - } // namespace detail - - // - // none_of_equal - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR bool - none_of_equal(InputIterator first, InputIterator last, T const& value) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::detail::none_of_equal(first, last, value, category()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_NONE_OF_EQUAL_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/nth_element.hpp b/dsp/lib/sprout/sprout/algorithm/nth_element.hpp deleted file mode 100644 index 8faf787..0000000 --- a/dsp/lib/sprout/sprout/algorithm/nth_element.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_NTH_ELEMENT_HPP -#define SPROUT_ALGORITHM_NTH_ELEMENT_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_NTH_ELEMENT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/one_of.hpp b/dsp/lib/sprout/sprout/algorithm/one_of.hpp deleted file mode 100644 index 55c9bca..0000000 --- a/dsp/lib/sprout/sprout/algorithm/one_of.hpp +++ /dev/null @@ -1,138 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_ONE_OF_HPP -#define SPROUT_ALGORITHM_ONE_OF_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR bool - one_of_impl_ra_1( - RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred, - typename std::iterator_traits::difference_type pivot - ) - { - return pivot == 0 ? !pred(*first) - : sprout::detail::one_of_impl_ra_1( - first, sprout::next(first, pivot), pred, - pivot / 2 - ) - && sprout::detail::one_of_impl_ra_1( - sprout::next(first, pivot), last, pred, - (sprout::distance(first, last) - pivot) / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR bool - one_of_impl_ra( - RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred, - typename std::iterator_traits::difference_type pivot - ) - { - return pivot == 0 ? pred(*first) - : sprout::detail::one_of_impl_ra( - first, sprout::next(first, pivot), pred, - pivot / 2 - ) - ? sprout::detail::one_of_impl_ra_1( - sprout::next(first, pivot), last, pred, - (sprout::distance(first, last) - pivot) / 2 - ) - : sprout::detail::one_of_impl_ra( - sprout::next(first, pivot), last, pred, - (sprout::distance(first, last) - pivot) / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - bool - >::type - one_of( - RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred, - std::random_access_iterator_tag* - ) - { - return first == last ? false - : sprout::detail::one_of_impl_ra(first, last, pred, sprout::distance(first, last) / 2) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::pair::difference_type> - one_of_impl_1( - sprout::pair::difference_type> const& current, - InputIterator const& last, Predicate pred, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair::difference_type> type; - return current.second > 1 || current.first == last ? current - : n == 1 ? current.second == 0 - ? !pred(*current.first) ? type(sprout::next(current.first), 0) : type(sprout::next(current.first), 1) - : !pred(*current.first) ? type(sprout::next(current.first), 1) : type(current.first, 2) - : sprout::detail::one_of_impl_1( - sprout::detail::one_of_impl_1( - current, - last, pred, n / 2 - ), - last, pred, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair::difference_type> - one_of_impl( - sprout::pair::difference_type> const& current, - InputIterator const& last, Predicate pred, typename std::iterator_traits::difference_type n - ) - { - return current.second > 1 || current.first == last ? current - : sprout::detail::one_of_impl( - sprout::detail::one_of_impl_1( - current, - last, pred, n - ), - last, pred, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR bool - one_of( - InputIterator const& first, InputIterator const& last, Predicate pred, - std::input_iterator_tag* - ) - { - typedef sprout::pair::difference_type> type; - return sprout::detail::one_of_impl(type(first, 0), last, pred, 1).second == 1; - } - } // namespace detail - // - // one_of - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR bool - one_of(InputIterator first, InputIterator last, Predicate pred) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::detail::one_of(first, last, pred, category()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_ONE_OF_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/one_of_equal.hpp b/dsp/lib/sprout/sprout/algorithm/one_of_equal.hpp deleted file mode 100644 index 732a20e..0000000 --- a/dsp/lib/sprout/sprout/algorithm/one_of_equal.hpp +++ /dev/null @@ -1,139 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_ONE_OF_EQUAL_HPP -#define SPROUT_ALGORITHM_ONE_OF_EQUAL_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR bool - one_of_equal_impl_ra_1( - RandomAccessIterator const& first, RandomAccessIterator const& last, T const& value, - typename std::iterator_traits::difference_type pivot - ) - { - return pivot == 0 ? !(*first == value) - : sprout::detail::one_of_equal_impl_ra_1( - first, sprout::next(first, pivot), value, - pivot / 2 - ) - && sprout::detail::one_of_equal_impl_ra_1( - sprout::next(first, pivot), last, value, - (sprout::distance(first, last) - pivot) / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR bool - one_of_equal_impl_ra( - RandomAccessIterator const& first, RandomAccessIterator const& last, T const& value, - typename std::iterator_traits::difference_type pivot - ) - { - return pivot == 0 ? *first == value - : sprout::detail::one_of_equal_impl_ra( - first, sprout::next(first, pivot), value, - pivot / 2 - ) - ? sprout::detail::one_of_equal_impl_ra_1( - sprout::next(first, pivot), last, value, - (sprout::distance(first, last) - pivot) / 2 - ) - : sprout::detail::one_of_equal_impl_ra( - sprout::next(first, pivot), last, value, - (sprout::distance(first, last) - pivot) / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - bool - >::type - one_of_equal( - RandomAccessIterator const& first, RandomAccessIterator const& last, T const& value, - std::random_access_iterator_tag* - ) - { - return first == last ? false - : sprout::detail::one_of_equal_impl_ra(first, last, value, sprout::distance(first, last) / 2) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::pair::difference_type> - one_of_equal_impl_1( - sprout::pair::difference_type> const& current, - InputIterator const& last, T const& value, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair::difference_type> type; - return current.second > 1 || current.first == last ? current - : n == 1 ? current.second == 0 - ? !(*current.first == value) ? type(sprout::next(current.first), 0) : type(sprout::next(current.first), 1) - : !(*current.first == value) ? type(sprout::next(current.first), 1) : type(current.first, 2) - : sprout::detail::one_of_equal_impl_1( - sprout::detail::one_of_equal_impl_1( - current, - last, value, n / 2 - ), - last, value, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair::difference_type> - one_of_equal_impl( - sprout::pair::difference_type> const& current, - InputIterator const& last, T const& value, typename std::iterator_traits::difference_type n - ) - { - return current.second > 1 || current.first == last ? current - : sprout::detail::one_of_equal_impl( - sprout::detail::one_of_equal_impl_1( - current, - last, value, n - ), - last, value, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR bool - one_of_equal( - InputIterator const& first, InputIterator const& last, T const& value, - std::input_iterator_tag* - ) - { - typedef sprout::pair::difference_type> type; - return sprout::detail::one_of_equal_impl(type(first, 0), last, value, 1).second == 1; - } - } // namespace detail - - // - // one_of_equal - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR bool - one_of_equal(InputIterator first, InputIterator last, T const& value) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::detail::one_of_equal(first, last, value, category()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_ONE_OF_EQUAL_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/partial_sort.hpp b/dsp/lib/sprout/sprout/algorithm/partial_sort.hpp deleted file mode 100644 index 4c68179..0000000 --- a/dsp/lib/sprout/sprout/algorithm/partial_sort.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_PARTIAL_SORT_HPP -#define SPROUT_ALGORITHM_PARTIAL_SORT_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_PARTIAL_SORT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/partial_sort_copy.hpp b/dsp/lib/sprout/sprout/algorithm/partial_sort_copy.hpp deleted file mode 100644 index 9cc99db..0000000 --- a/dsp/lib/sprout/sprout/algorithm/partial_sort_copy.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_PARTIAL_SORT_COPY_HPP -#define SPROUT_ALGORITHM_PARTIAL_SORT_COPY_HPP - -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_PARTIAL_SORT_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/partition.hpp b/dsp/lib/sprout/sprout/algorithm/partition.hpp deleted file mode 100644 index 290dad1..0000000 --- a/dsp/lib/sprout/sprout/algorithm/partition.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_PARTITION_HPP -#define SPROUT_ALGORITHM_PARTITION_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_PARTITION_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/partition_copy.hpp b/dsp/lib/sprout/sprout/algorithm/partition_copy.hpp deleted file mode 100644 index fbe29ce..0000000 --- a/dsp/lib/sprout/sprout/algorithm/partition_copy.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_PARTITION_COPY_HPP -#define SPROUT_ALGORITHM_PARTITION_COPY_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_PARTITION_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/partition_point.hpp b/dsp/lib/sprout/sprout/algorithm/partition_point.hpp deleted file mode 100644 index 41423d2..0000000 --- a/dsp/lib/sprout/sprout/algorithm/partition_point.hpp +++ /dev/null @@ -1,76 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_PARTITION_POINT_HPP -#define SPROUT_ALGORITHM_PARTITION_POINT_HPP - -#include -#include -#include -#include - -namespace sprout { -#if defined(SPROUT_CONFIG_DISABLE_CXX14_CONSTEXPR) || SPROUT_GCC_IN_RANGE((5, 1, 0), (6, 0, 0)) - namespace detail { - template - inline SPROUT_CONSTEXPR ForwardIterator - partition_point_impl(ForwardIterator const& first, ForwardIterator const& last, Predicate pred, ForwardIterator const& mid) { - return mid == last ? mid - : pred(*mid) ? sprout::detail::partition_point_impl( - sprout::next(mid), last, pred, - sprout::next(mid, 1 + (sprout::distance(mid, last) - 1) / 2) - ) - : sprout::detail::partition_point_impl( - first, mid, pred, - sprout::next(first, sprout::distance(first, mid) / 2) - ) - ; - } - } // namespace detail - - // 25.3.13 Partitions - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR ForwardIterator - partition_point(ForwardIterator first, ForwardIterator last, Predicate pred) { - return sprout::detail::partition_point_impl( - first, last, pred, - sprout::next(first, sprout::distance(first, last) / 2) - ); - } -#else - // 25.3.13 Partitions - // - // recursion depth: - // 0 - // - template - inline SPROUT_CXX14_CONSTEXPR ForwardIterator - partition_point(ForwardIterator first, ForwardIterator last, Predicate pred) { - typedef typename std::iterator_traits::difference_type difference_type; - for (difference_type len = sprout::distance(first, last); len != 0; ) { - difference_type const half = len / 2; - ForwardIterator const mid = sprout::next(first, half); - if (pred(*mid)) { - first = sprout::next(mid); - len -= half + 1; - } else { - len = half; - } - } - return first; - } -#endif -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_PARTITION_POINT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/pop_heap.hpp b/dsp/lib/sprout/sprout/algorithm/pop_heap.hpp deleted file mode 100644 index 1dee17c..0000000 --- a/dsp/lib/sprout/sprout/algorithm/pop_heap.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_POP_HEAP_HPP -#define SPROUT_ALGORITHM_POP_HEAP_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_POP_HEAP_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/prev_permutation.hpp b/dsp/lib/sprout/sprout/algorithm/prev_permutation.hpp deleted file mode 100644 index ffa78cd..0000000 --- a/dsp/lib/sprout/sprout/algorithm/prev_permutation.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_PREV_PERMUTATION_HPP -#define SPROUT_ALGORITHM_PREV_PERMUTATION_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_PREV_PERMUTATION_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/push_heap.hpp b/dsp/lib/sprout/sprout/algorithm/push_heap.hpp deleted file mode 100644 index 8040464..0000000 --- a/dsp/lib/sprout/sprout/algorithm/push_heap.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_PUSH_HEAP_HPP -#define SPROUT_ALGORITHM_PUSH_HEAP_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_PUSH_HEAP_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/random_shuffle.hpp b/dsp/lib/sprout/sprout/algorithm/random_shuffle.hpp deleted file mode 100644 index 413e099..0000000 --- a/dsp/lib/sprout/sprout/algorithm/random_shuffle.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_RANDOM_SHUFFLE_HPP -#define SPROUT_ALGORITHM_RANDOM_SHUFFLE_HPP - -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_RANDOM_SHUFFLE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/random_swap.hpp b/dsp/lib/sprout/sprout/algorithm/random_swap.hpp deleted file mode 100644 index d0f7287..0000000 --- a/dsp/lib/sprout/sprout/algorithm/random_swap.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_RANDOM_SWAP_HPP -#define SPROUT_ALGORITHM_RANDOM_SWAP_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_RANDOM_SWAP_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/random_swap_result.hpp b/dsp/lib/sprout/sprout/algorithm/random_swap_result.hpp deleted file mode 100644 index c62eff5..0000000 --- a/dsp/lib/sprout/sprout/algorithm/random_swap_result.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_RANDOM_SWAP_RESULT_HPP -#define SPROUT_ALGORITHM_RANDOM_SWAP_RESULT_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_RANDOM_SWAP_RESULT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/recurrence.hpp b/dsp/lib/sprout/sprout/algorithm/recurrence.hpp deleted file mode 100644 index c86736b..0000000 --- a/dsp/lib/sprout/sprout/algorithm/recurrence.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_RECURRENCE_HPP -#define SPROUT_ALGORITHM_RECURRENCE_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_RECURRENCE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/recurrence_n.hpp b/dsp/lib/sprout/sprout/algorithm/recurrence_n.hpp deleted file mode 100644 index 130f875..0000000 --- a/dsp/lib/sprout/sprout/algorithm/recurrence_n.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_RECURRENCE_N_HPP -#define SPROUT_ALGORITHM_RECURRENCE_N_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_RECURRENCE_N_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/remove.hpp b/dsp/lib/sprout/sprout/algorithm/remove.hpp deleted file mode 100644 index 5bdcdfa..0000000 --- a/dsp/lib/sprout/sprout/algorithm/remove.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_REMOVE_HPP -#define SPROUT_ALGORITHM_REMOVE_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_REMOVE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/remove_copy.hpp b/dsp/lib/sprout/sprout/algorithm/remove_copy.hpp deleted file mode 100644 index 14814f0..0000000 --- a/dsp/lib/sprout/sprout/algorithm/remove_copy.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_REMOVE_COPY_HPP -#define SPROUT_ALGORITHM_REMOVE_COPY_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_REMOVE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/remove_copy_if.hpp b/dsp/lib/sprout/sprout/algorithm/remove_copy_if.hpp deleted file mode 100644 index 054dc7c..0000000 --- a/dsp/lib/sprout/sprout/algorithm/remove_copy_if.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_REMOVE_COPY_IF_HPP -#define SPROUT_ALGORITHM_REMOVE_COPY_IF_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_REMOVE_COPY_IF_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/remove_if.hpp b/dsp/lib/sprout/sprout/algorithm/remove_if.hpp deleted file mode 100644 index c914437..0000000 --- a/dsp/lib/sprout/sprout/algorithm/remove_if.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_REMOVE_IF_HPP -#define SPROUT_ALGORITHM_REMOVE_IF_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_REMOVE_IF_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/replace.hpp b/dsp/lib/sprout/sprout/algorithm/replace.hpp deleted file mode 100644 index 3b7e725..0000000 --- a/dsp/lib/sprout/sprout/algorithm/replace.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_REPLACE_HPP -#define SPROUT_ALGORITHM_REPLACE_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_REPLACE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/replace_copy.hpp b/dsp/lib/sprout/sprout/algorithm/replace_copy.hpp deleted file mode 100644 index 1d9bf80..0000000 --- a/dsp/lib/sprout/sprout/algorithm/replace_copy.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_REPLACE_COPY_HPP -#define SPROUT_ALGORITHM_REPLACE_COPY_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_REPLACE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/replace_copy_if.hpp b/dsp/lib/sprout/sprout/algorithm/replace_copy_if.hpp deleted file mode 100644 index 642037e..0000000 --- a/dsp/lib/sprout/sprout/algorithm/replace_copy_if.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_REPLACE_COPY_IF_HPP -#define SPROUT_ALGORITHM_REPLACE_COPY_IF_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_REPLACE_COPY_IF_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/replace_if.hpp b/dsp/lib/sprout/sprout/algorithm/replace_if.hpp deleted file mode 100644 index e4f5abb..0000000 --- a/dsp/lib/sprout/sprout/algorithm/replace_if.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_REPLACE_IF_HPP -#define SPROUT_ALGORITHM_REPLACE_IF_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_REPLACE_IF_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/reverse.hpp b/dsp/lib/sprout/sprout/algorithm/reverse.hpp deleted file mode 100644 index fbb7e70..0000000 --- a/dsp/lib/sprout/sprout/algorithm/reverse.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_REVERSE_HPP -#define SPROUT_ALGORITHM_REVERSE_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_REVERSE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/reverse_copy.hpp b/dsp/lib/sprout/sprout/algorithm/reverse_copy.hpp deleted file mode 100644 index c6e453f..0000000 --- a/dsp/lib/sprout/sprout/algorithm/reverse_copy.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_REVERSE_COPY_HPP -#define SPROUT_ALGORITHM_REVERSE_COPY_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_REVERSE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/rotate.hpp b/dsp/lib/sprout/sprout/algorithm/rotate.hpp deleted file mode 100644 index 9451922..0000000 --- a/dsp/lib/sprout/sprout/algorithm/rotate.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_ROTATE_HPP -#define SPROUT_ALGORITHM_ROTATE_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_ROTATE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/rotate_copy.hpp b/dsp/lib/sprout/sprout/algorithm/rotate_copy.hpp deleted file mode 100644 index 23bc4f7..0000000 --- a/dsp/lib/sprout/sprout/algorithm/rotate_copy.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_ROTATE_COPY_HPP -#define SPROUT_ALGORITHM_ROTATE_COPY_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_ROTATE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/sample.hpp b/dsp/lib/sprout/sprout/algorithm/sample.hpp deleted file mode 100644 index b2ac4ef..0000000 --- a/dsp/lib/sprout/sprout/algorithm/sample.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_SAMPLE_HPP -#define SPROUT_ALGORITHM_SAMPLE_HPP - -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_SAMPLE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/search.hpp b/dsp/lib/sprout/sprout/algorithm/search.hpp deleted file mode 100644 index 8c2dc22..0000000 --- a/dsp/lib/sprout/sprout/algorithm/search.hpp +++ /dev/null @@ -1,161 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_SEARCH_HPP -#define SPROUT_ALGORITHM_SEARCH_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR RandomAccessIterator1 - search_impl_ra( - RandomAccessIterator1 const& first1, RandomAccessIterator1 const& last1, - ForwardIterator2 const& first2, ForwardIterator2 const& last2, - BinaryPredicate pred, - typename std::iterator_traits::difference_type pivot, RandomAccessIterator1 const& last1_, RandomAccessIterator1 const& searched - ) - { - return searched < first1 || searched == last1_ ? searched - : pivot == 0 ? sprout::detail::search_one(first1, last1_, first2, last2, pred) - : sprout::detail::search_impl_ra( - sprout::next(first1, pivot), last1, first2, last2, pred, - (sprout::distance(first1, last1) - pivot) / 2, last1_, - sprout::detail::search_impl_ra( - first1, sprout::next(first1, pivot), first2, last2, pred, - pivot / 2, last1_, - first1 - ) - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - RandomAccessIterator1 - >::type - search( - RandomAccessIterator1 const& first1, RandomAccessIterator1 const& last1, - ForwardIterator2 const& first2, ForwardIterator2 const& last2, - BinaryPredicate pred, - std::random_access_iterator_tag* - ) - { - return first1 == last1 ? last1 - : sprout::detail::search_impl_ra( - first1, last1, first2, last2, pred, - sprout::distance(first1, last1) / 2, last1, first1 - ) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::pair - search_impl_fork(sprout::pair const& current, ForwardIterator1 const& last1, ForwardIterator1 const& searched) { - typedef sprout::pair type; - return searched == current.first || searched == last1 ? type(searched, true) - : type(sprout::next(current.first), false) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - search_impl_1( - sprout::pair const& current, - ForwardIterator1 const& last1, ForwardIterator2 const& first2, ForwardIterator2 const& last2, BinaryPredicate pred, - typename std::iterator_traits::difference_type n - ) - { - return current.second || current.first == last1 ? current - : n == 1 ? sprout::detail::search_impl_fork( - current, last1, - sprout::detail::search_one(current.first, last1, first2, last2, pred) - ) - : sprout::detail::search_impl_1( - sprout::detail::search_impl_1( - current, - last1, first2, last2, pred, n / 2 - ), - last1, first2, last2, pred, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - search_impl( - sprout::pair const& current, - ForwardIterator1 const& last1, ForwardIterator2 const& first2, ForwardIterator2 const& last2, BinaryPredicate pred, - typename std::iterator_traits::difference_type n - ) - { - return current.second || current.first == last1 ? current - : sprout::detail::search_impl( - sprout::detail::search_impl_1( - current, - last1, first2, last2, pred, n - ), - last1, first2, last2, pred, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR ForwardIterator1 - search( - ForwardIterator1 const& first1, ForwardIterator1 const& last1, - ForwardIterator2 const& first2, ForwardIterator2 const& last2, - BinaryPredicate pred, - std::forward_iterator_tag* - ) - { - typedef sprout::pair type; - return sprout::detail::search_impl(type(first1, false), last1, first2, last2, pred, 1).first; - } - } // namespace detail - - // 25.2.13 Search - // - // recursion depth: - // O(log(N1+N2)) - // - template - inline SPROUT_CONSTEXPR ForwardIterator1 - search( - ForwardIterator1 first1, ForwardIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2, - BinaryPredicate pred - ) - { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::detail::search(first1, last1, first2, last2, pred, category()); - } - - template - inline SPROUT_CONSTEXPR ForwardIterator1 - search( - ForwardIterator1 first1, ForwardIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2 - ) - { - return sprout::search(first1, last1, first2, last2, sprout::equal_to<>()); - } - - // - template - inline SPROUT_CONSTEXPR ForwardIterator - search(ForwardIterator first, ForwardIterator last, Searcher const& searcher) { - return searcher(first, last); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_SEARCH_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/search_n.hpp b/dsp/lib/sprout/sprout/algorithm/search_n.hpp deleted file mode 100644 index 0addf5a..0000000 --- a/dsp/lib/sprout/sprout/algorithm/search_n.hpp +++ /dev/null @@ -1,145 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_SEARCH_N_HPP -#define SPROUT_ALGORITHM_SEARCH_N_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR RandomAccessIterator - search_n_impl_ra( - RandomAccessIterator const& current, RandomAccessIterator const& last, - Size count, T const& value, BinaryPredicate pred, - typename std::iterator_traits::difference_type len, - RandomAccessIterator const& searched - ) - { - return sprout::distance(searched, current) >= count || searched == last ? searched - : len == 1 ? pred(*current, value) ? searched - : sprout::distance(current, last) > count ? sprout::next(current) : last - : sprout::detail::search_n_impl_ra( - current + len / 2, last, count, value, pred, len - len / 2, - sprout::detail::search_n_impl_ra( - current, last, count, value, pred, len / 2, searched - ) - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - RandomAccessIterator - >::type - search_n( - RandomAccessIterator const& first, RandomAccessIterator const& last, Size count, T const& value, BinaryPredicate pred, - std::random_access_iterator_tag* - ) - { - return sprout::distance(first, last) < count - ? last - : sprout::detail::search_n_impl_ra( - first, last, count, value, pred, sprout::distance(first, last), first - ) - ; - } - template - inline SPROUT_CONSTEXPR ForwardIterator - search_n_impl_check( - sprout::tuple current, - ForwardIterator const& last, Size count - ) - { - return sprout::tuples::get<2>(current) == count ? sprout::tuples::get<1>(current) : last; - } - template - inline SPROUT_CONSTEXPR sprout::tuple - search_n_impl_1( - sprout::tuple current, - ForwardIterator const& last, Size count, T const& value, BinaryPredicate pred, - typename std::iterator_traits::difference_type n - ) - { - typedef sprout::tuple type; - return sprout::tuples::get<2>(current) == count || sprout::tuples::get<0>(current) == last ? current - : n == 1 - ? pred(*sprout::tuples::get<0>(current), value) - ? type(sprout::next(sprout::tuples::get<0>(current)), sprout::tuples::get<1>(current), sprout::tuples::get<2>(current) + 1) - : type(sprout::next(sprout::tuples::get<0>(current)), sprout::next(sprout::tuples::get<0>(current)), 0) - : sprout::detail::search_n_impl_1( - sprout::detail::search_n_impl_1( - current, - last, count, value, pred, n / 2 - ), - last, count, value, pred, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::tuple - search_n_impl( - sprout::tuple current, - ForwardIterator const& last, Size count, T const& value, BinaryPredicate pred, - typename std::iterator_traits::difference_type n - ) - { - return sprout::tuples::get<2>(current) == count || sprout::tuples::get<0>(current) == last ? current - : sprout::detail::search_n_impl( - sprout::detail::search_n_impl_1( - current, - last, count, value, pred, n - ), - last, count, value, pred, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR ForwardIterator - search_n( - ForwardIterator const& first, ForwardIterator const& last, Size count, T const& value, BinaryPredicate pred, - std::forward_iterator_tag* - ) - { - typedef sprout::tuple type; - return sprout::detail::search_n_impl_check( - sprout::detail::search_n_impl(type(first, first, 0), last, count, value, pred, 1), - last, count - ) - ; - } - } - // 25.2.13 Search - // - // recursion depth: - // O(log(N1+N2)) - // - template - inline SPROUT_CONSTEXPR ForwardIterator - search_n(ForwardIterator first, ForwardIterator last, Size count, T const& value, BinaryPredicate pred) { - typedef typename std::iterator_traits::iterator_category* category; - return count == 0 ? last : count == 1 ? sprout::find_if(first, last, sprout::bind2nd(pred, value)) - : sprout::detail::search_n(first, last, count, value, pred, category()); - } - - template - inline SPROUT_CONSTEXPR ForwardIterator - search_n(ForwardIterator first, ForwardIterator last, Size count, T const& value) { - typedef typename std::iterator_traits::iterator_category* category; - return count == 0 ? last : count == 1 ? sprout::find(first, last, value) - : sprout::detail::search_n(first, last, count, value, sprout::equal_to<>(), category()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_SEARCH_N_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/searching.hpp b/dsp/lib/sprout/sprout/algorithm/searching.hpp deleted file mode 100644 index d1f4858..0000000 --- a/dsp/lib/sprout/sprout/algorithm/searching.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_SEARCHING_HPP -#define SPROUT_ALGORITHM_SEARCHING_HPP - -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_SEARCHING_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/searching/default_searcher.hpp b/dsp/lib/sprout/sprout/algorithm/searching/default_searcher.hpp deleted file mode 100644 index 9c977b7..0000000 --- a/dsp/lib/sprout/sprout/algorithm/searching/default_searcher.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_SEARCHING_DEFAULT_SEARCHER_HPP -#define SPROUT_ALGORITHM_SEARCHING_DEFAULT_SEARCHER_HPP - -#include -#include -#include - -namespace sprout { - // - // default_searcher - // - template > - class default_searcher { - private: - ForwardIterator2 first2_; - ForwardIterator2 last2_; - BinaryPredicate pred_; - public: - SPROUT_CONSTEXPR default_searcher(ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred) - : first2_(first2), last2_(last2), pred_(pred) - {} - SPROUT_CONSTEXPR default_searcher(ForwardIterator2 first2, ForwardIterator2 last2) - : first2_(first2), last2_(last2), pred_() - {} - template - SPROUT_CONSTEXPR ForwardIterator1 - operator()(ForwardIterator1 first1, ForwardIterator1 last1) const { - return sprout::search(first1, last1, first2_, last2_, pred_); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_SEARCHING_DEFAULT_SEARCHER_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/set_difference.hpp b/dsp/lib/sprout/sprout/algorithm/set_difference.hpp deleted file mode 100644 index 7ee13d2..0000000 --- a/dsp/lib/sprout/sprout/algorithm/set_difference.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_SET_DIFFERENCE_HPP -#define SPROUT_ALGORITHM_SET_DIFFERENCE_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_SET_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/set_intersection.hpp b/dsp/lib/sprout/sprout/algorithm/set_intersection.hpp deleted file mode 100644 index 3d3fc6f..0000000 --- a/dsp/lib/sprout/sprout/algorithm/set_intersection.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_SET_INTERSECTION_HPP -#define SPROUT_ALGORITHM_SET_INTERSECTION_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_SET_INTERSECTION_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/set_symmetric_difference.hpp b/dsp/lib/sprout/sprout/algorithm/set_symmetric_difference.hpp deleted file mode 100644 index 74d5d48..0000000 --- a/dsp/lib/sprout/sprout/algorithm/set_symmetric_difference.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_SET_SYMMETRIC_DIFFERENCE_HPP -#define SPROUT_ALGORITHM_SET_SYMMETRIC_DIFFERENCE_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_SET_SYMMETRIC_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/set_union.hpp b/dsp/lib/sprout/sprout/algorithm/set_union.hpp deleted file mode 100644 index 3b0a905..0000000 --- a/dsp/lib/sprout/sprout/algorithm/set_union.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_SET_UNION_HPP -#define SPROUT_ALGORITHM_SET_UNION_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_SET_UNION_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/shuffle.hpp b/dsp/lib/sprout/sprout/algorithm/shuffle.hpp deleted file mode 100644 index 74d31a3..0000000 --- a/dsp/lib/sprout/sprout/algorithm/shuffle.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_SHUFFLE_HPP -#define SPROUT_ALGORITHM_SHUFFLE_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_SHUFFLE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/shuffle_result.hpp b/dsp/lib/sprout/sprout/algorithm/shuffle_result.hpp deleted file mode 100644 index b247d86..0000000 --- a/dsp/lib/sprout/sprout/algorithm/shuffle_result.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_SHUFFLE_RESULT_HPP -#define SPROUT_ALGORITHM_SHUFFLE_RESULT_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_SHUFFLE_RESULT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/sort.hpp b/dsp/lib/sprout/sprout/algorithm/sort.hpp deleted file mode 100644 index ce9f3d2..0000000 --- a/dsp/lib/sprout/sprout/algorithm/sort.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_SORT_HPP -#define SPROUT_ALGORITHM_SORT_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_SORT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/sort_heap.hpp b/dsp/lib/sprout/sprout/algorithm/sort_heap.hpp deleted file mode 100644 index 167b745..0000000 --- a/dsp/lib/sprout/sprout/algorithm/sort_heap.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_SORT_HEAP_HPP -#define SPROUT_ALGORITHM_SORT_HEAP_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_SORT_HEAP_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/stable_partition.hpp b/dsp/lib/sprout/sprout/algorithm/stable_partition.hpp deleted file mode 100644 index be82fe4..0000000 --- a/dsp/lib/sprout/sprout/algorithm/stable_partition.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_STABLE_PARTITION_HPP -#define SPROUT_ALGORITHM_STABLE_PARTITION_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_STABLE_PARTITION_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/stable_partition_copy.hpp b/dsp/lib/sprout/sprout/algorithm/stable_partition_copy.hpp deleted file mode 100644 index 0792eb5..0000000 --- a/dsp/lib/sprout/sprout/algorithm/stable_partition_copy.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_STABLE_PARTITION_COPY_HPP -#define SPROUT_ALGORITHM_STABLE_PARTITION_COPY_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_STABLE_PARTITION_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/stable_sort.hpp b/dsp/lib/sprout/sprout/algorithm/stable_sort.hpp deleted file mode 100644 index 305a31e..0000000 --- a/dsp/lib/sprout/sprout/algorithm/stable_sort.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_STABLE_SORT_HPP -#define SPROUT_ALGORITHM_STABLE_SORT_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_STABLE_SORT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/string.hpp b/dsp/lib/sprout/sprout/algorithm/string.hpp deleted file mode 100644 index a151191..0000000 --- a/dsp/lib/sprout/sprout/algorithm/string.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_STRING_HPP -#define SPROUT_ALGORITHM_STRING_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_STRING_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/string/case_conv.hpp b/dsp/lib/sprout/sprout/algorithm/string/case_conv.hpp deleted file mode 100644 index 4e7c5c5..0000000 --- a/dsp/lib/sprout/sprout/algorithm/string/case_conv.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_STRING_CASE_CONV_HPP -#define SPROUT_ALGORITHM_STRING_CASE_CONV_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_STRING_CASE_CONV_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/string/fit/case_conv.hpp b/dsp/lib/sprout/sprout/algorithm/string/fit/case_conv.hpp deleted file mode 100644 index dede4f3..0000000 --- a/dsp/lib/sprout/sprout/algorithm/string/fit/case_conv.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_STRING_FIT_CASE_CONV_HPP -#define SPROUT_ALGORITHM_STRING_FIT_CASE_CONV_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_STRING_FIT_CASE_CONV_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/string/fit/to_lower.hpp b/dsp/lib/sprout/sprout/algorithm/string/fit/to_lower.hpp deleted file mode 100644 index c242847..0000000 --- a/dsp/lib/sprout/sprout/algorithm/string/fit/to_lower.hpp +++ /dev/null @@ -1,53 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_STRING_FIT_TO_LOWER_HPP -#define SPROUT_ALGORITHM_STRING_FIT_TO_LOWER_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace algorithm { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - to_lower_impl( - Container const& cont, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::algorithm::fixed::to_lower(cont)), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // to_lower - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - to_lower(Container const& cont) { - return sprout::algorithm::fit::detail::to_lower_impl(cont, sprout::internal_begin_offset(cont)); - } - } // namespace fit - } // namespace algorithm - - namespace fit { - using sprout::algorithm::fit::to_lower; - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_STRING_FIT_TO_LOWER_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/string/fit/to_lower_copy.hpp b/dsp/lib/sprout/sprout/algorithm/string/fit/to_lower_copy.hpp deleted file mode 100644 index 1c3fe4c..0000000 --- a/dsp/lib/sprout/sprout/algorithm/string/fit/to_lower_copy.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_STRING_FIT_TO_LOWER_COPY_HPP -#define SPROUT_ALGORITHM_STRING_FIT_TO_LOWER_COPY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace algorithm { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - to_lower_copy_impl( - InputIterator const& first, InputIterator const& last, Result const& result, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::algorithm::fixed::to_lower_copy(first, last, result)), - offset, - offset + sprout::fit_size(result, sprout::distance(first, last)) - ); - } - } // namespace detail - // - // to_lower_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - to_lower_copy(InputIterator first, InputIterator last, Result const& result) { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::algorithm::fit::detail::to_lower_copy_impl(first, last, result, sprout::internal_begin_offset(result)); - } - } // namespace fit - } // namespace algorithm - - namespace fit { - using sprout::algorithm::fit::to_lower_copy; - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_STRING_FIT_TO_LOWER_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/string/fit/to_upper.hpp b/dsp/lib/sprout/sprout/algorithm/string/fit/to_upper.hpp deleted file mode 100644 index 849577b..0000000 --- a/dsp/lib/sprout/sprout/algorithm/string/fit/to_upper.hpp +++ /dev/null @@ -1,53 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_STRING_FIT_TO_UPPER_HPP -#define SPROUT_ALGORITHM_STRING_FIT_TO_UPPER_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace algorithm { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - to_upper_impl( - Container const& cont, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::algorithm::fixed::to_upper(cont)), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // to_upper - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - to_upper(Container const& cont) { - return sprout::algorithm::fit::detail::to_upper_impl(cont, sprout::internal_begin_offset(cont)); - } - } // namespace fit - } // namespace algorithm - - namespace fit { - using sprout::algorithm::fit::to_upper; - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_STRING_FIT_TO_UPPER_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/string/fit/to_upper_copy.hpp b/dsp/lib/sprout/sprout/algorithm/string/fit/to_upper_copy.hpp deleted file mode 100644 index 81631be..0000000 --- a/dsp/lib/sprout/sprout/algorithm/string/fit/to_upper_copy.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_STRING_FIT_TO_UPPER_COPY_HPP -#define SPROUT_ALGORITHM_STRING_FIT_TO_UPPER_COPY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace algorithm { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - to_upper_copy_impl( - InputIterator const& first, InputIterator const& last, Result const& result, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::algorithm::fixed::to_upper_copy(first, last, result)), - offset, - offset + sprout::fit_size(result, sprout::distance(first, last)) - ); - } - } // namespace detail - // - // to_upper_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - to_upper_copy(InputIterator first, InputIterator last, Result const& result) { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::algorithm::fit::detail::to_upper_copy_impl(first, last, result, sprout::internal_begin_offset(result)); - } - } // namespace fit - } // namespace algorithm - - namespace fit { - using sprout::algorithm::fit::to_upper_copy; - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_STRING_FIT_TO_UPPER_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/string/fixed/case_conv.hpp b/dsp/lib/sprout/sprout/algorithm/string/fixed/case_conv.hpp deleted file mode 100644 index 01f1e60..0000000 --- a/dsp/lib/sprout/sprout/algorithm/string/fixed/case_conv.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_STRING_FIXED_CASE_CONV_HPP -#define SPROUT_ALGORITHM_STRING_FIXED_CASE_CONV_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_STRING_FIXED_CASE_CONV_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/string/fixed/to_lower.hpp b/dsp/lib/sprout/sprout/algorithm/string/fixed/to_lower.hpp deleted file mode 100644 index 211f2c9..0000000 --- a/dsp/lib/sprout/sprout/algorithm/string/fixed/to_lower.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_STRING_FIXED_TO_LOWER_HPP -#define SPROUT_ALGORITHM_STRING_FIXED_TO_LOWER_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace algorithm { - namespace fixed { - // - // to_lower - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - to_lower(Container const& cont) { - return sprout::algorithm::fixed::to_lower_copy(sprout::begin(cont), sprout::end(cont), cont); - } - } // namespace fixed - - using sprout::algorithm::fixed::to_lower; - } // namespace algorithm - - namespace fixed { - using sprout::algorithm::fixed::to_lower; - } // namespace fixed - - using sprout::algorithm::fixed::to_lower; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_STRING_FIXED_TO_LOWER_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/string/fixed/to_lower_copy.hpp b/dsp/lib/sprout/sprout/algorithm/string/fixed/to_lower_copy.hpp deleted file mode 100644 index 1950899..0000000 --- a/dsp/lib/sprout/sprout/algorithm/string/fixed/to_lower_copy.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_STRING_FIXED_TO_LOWER_COPY_HPP -#define SPROUT_ALGORITHM_STRING_FIXED_TO_LOWER_COPY_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace algorithm { - namespace fixed { - // - // to_lower_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - to_lower_copy(InputIterator first, InputIterator last, Result const& result) { - return sprout::fixed::transform(first, last, sprout::ctypes::to_lower<>(), result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - to_lower_copy(InputIterator first, InputIterator last) { - return sprout::algorithm::fixed::to_lower_copy(first, last, sprout::pit()); - } - } // namespace fixed - - using sprout::algorithm::fixed::to_lower_copy; - } // namespace algorithm - - namespace fixed { - using sprout::algorithm::fixed::to_lower_copy; - } // namespace fixed - - using sprout::algorithm::fixed::to_lower_copy; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_STRING_FIXED_TO_LOWER_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/string/fixed/to_upper.hpp b/dsp/lib/sprout/sprout/algorithm/string/fixed/to_upper.hpp deleted file mode 100644 index d0c71f8..0000000 --- a/dsp/lib/sprout/sprout/algorithm/string/fixed/to_upper.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_STRING_FIXED_TO_UPPER_HPP -#define SPROUT_ALGORITHM_STRING_FIXED_TO_UPPER_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace algorithm { - namespace fixed { - // - // to_upper - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - to_upper(Container const& cont) { - return sprout::algorithm::fixed::to_upper_copy(sprout::begin(cont), sprout::end(cont), cont); - } - } // namespace fixed - - using sprout::algorithm::fixed::to_upper; - } // namespace algorithm - - namespace fixed { - using sprout::algorithm::fixed::to_upper; - } // namespace fixed - - using sprout::algorithm::fixed::to_upper; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_STRING_FIXED_TO_UPPER_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/string/fixed/to_upper_copy.hpp b/dsp/lib/sprout/sprout/algorithm/string/fixed/to_upper_copy.hpp deleted file mode 100644 index d6adb9e..0000000 --- a/dsp/lib/sprout/sprout/algorithm/string/fixed/to_upper_copy.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_STRING_FIXED_TO_UPPER_COPY_HPP -#define SPROUT_ALGORITHM_STRING_FIXED_TO_UPPER_COPY_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace algorithm { - namespace fixed { - // - // to_upper_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - to_upper_copy(InputIterator first, InputIterator last, Result const& result) { - return sprout::fixed::transform(first, last, sprout::ctypes::to_upper<>(), result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - to_upper_copy(InputIterator first, InputIterator last) { - return sprout::algorithm::fixed::to_upper_copy(first, last, sprout::pit()); - } - } // namespace fixed - - using sprout::algorithm::fixed::to_upper_copy; - } // namespace algorithm - - namespace fixed { - using sprout::algorithm::fixed::to_upper_copy; - } // namespace fixed - - using sprout::algorithm::fixed::to_upper_copy; -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_STRING_FIXED_TO_UPPER_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/string/join.hpp b/dsp/lib/sprout/sprout/algorithm/string/join.hpp deleted file mode 100644 index 9c76c5d..0000000 --- a/dsp/lib/sprout/sprout/algorithm/string/join.hpp +++ /dev/null @@ -1,501 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_STRING_JOIN_HPP -#define SPROUT_ALGORITHM_STRING_JOIN_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace algorithm { - namespace detail { - template - struct string_size; - template - struct string_size< - String, - typename std::enable_if::value>::type - > - : public sprout::integral_constant< - typename sprout::container_traits::size_type, - sprout::container_traits::static_size - 1 - > - {}; - template - struct string_size< - String, - typename std::enable_if::value>::type - > - : public sprout::integral_constant< - typename sprout::container_traits::size_type, - sprout::container_traits::static_size - > - {}; - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_c_str::value, - typename sprout::container_traits::difference_type - >::type - str_size(String const& str) { - return sprout::size(str) - 1; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_c_str::value, - typename sprout::container_traits::difference_type - >::type - str_size(String const& str) { - return sprout::size(str); - } - } // namespace detail - - namespace results { - // - // join - // - template - struct join - : public sprout::container_transform_traits< - typename sprout::container_traits::value_type - >::template rebind_size< - sprout::container_traits< - typename sprout::container_traits::value_type - >::static_size - ? (sprout::container_traits< - typename sprout::container_traits::value_type - >::static_size - + sprout::algorithm::detail::string_size::value - ) - * sprout::container_traits::static_size - - sprout::algorithm::detail::string_size::value - : 0 - > - {}; - template - struct join - : public sprout::container_transform_traits< - typename sprout::container_traits::value_type - >::template rebind_size< - sprout::container_traits< - typename sprout::container_traits::value_type - >::static_size - * sprout::container_traits::static_size - > - {}; - } // namespace results - - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::value_type - join_impl_ra_2( - ContIterator const& first_cont, - SizeIterator const& found, - Sizes const& sizes, - sprout::index_t idx - ) - { - typedef typename sprout::container_traits::value_type value_type; - return found == sizes.end() ? value_type() - : sprout::begin(first_cont[found - sizes.begin()])[idx - (found != sizes.begin() ? found[-1] : 0)] - ; - } - template - inline SPROUT_CONSTEXPR Result - join_impl_ra_1( - ContIterator const& first_cont, - sprout::index_tuple, - Sizes const& sizes - ) - { - return sprout::make( - sprout::algorithm::detail::join_impl_ra_2( - first_cont, - sprout::range::lower_bound(sizes, Indexes + 1), - sizes, - Indexes - )... - ); - } - template - inline SPROUT_CONSTEXPR Result - join_impl_ra(ContainerContainer const& cont_cont) { - typedef typename sprout::container_traits::difference_type size_type; - typedef sprout::array< - size_type, - sprout::container_traits::static_size - > sizes_type; - return sprout::algorithm::detail::join_impl_ra_1( - sprout::begin(cont_cont), - sprout::container_indexes::make(), - sprout::range::fixed::partial_sum( - cont_cont | sprout::adaptors::size_enumed, - sprout::pit() - ) - ); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - Result - >::type join_impl( - ContIterator const& first_cont, ContIterator const& last_cont, - Args const&... args - ); - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - Result - >::type join_impl( - ContIterator const& first_cont, ContIterator const& last_cont, - Args const&... args - ); - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - Result - >::type join_impl_1( - ContIterator, ContIterator, - InputIterator const&, InputIterator const&, - Args const&... args - ) - { - return sprout::make(args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - Result - >::type join_impl_1( - ContIterator const& first_cont, ContIterator const& last_cont, - InputIterator const& first, InputIterator const& last, - Args const&... args - ) - { - return first != last - ? sprout::algorithm::detail::join_impl_1( - first_cont, last_cont, - sprout::next(first), last, - args..., *first - ) - : sprout::algorithm::detail::join_impl(sprout::next(first_cont), last_cont, args...) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - Result - >::type join_impl( - ContIterator, ContIterator, - Args const&... args - ) - { - return sprout::make(args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - Result - >::type join_impl( - ContIterator const& first_cont, ContIterator const& last_cont, - Args const&... args - ) - { - return first_cont != last_cont - ? sprout::algorithm::detail::join_impl_1( - first_cont, last_cont, - sprout::begin(*first_cont), sprout::end(*first_cont), - args... - ) - : sprout::make(args...) - ; - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_random_access_iterator< - typename sprout::container_traits::iterator - >::value - && sprout::is_random_access_iterator< - typename sprout::container_traits< - typename sprout::container_traits::value_type - >::iterator - >::value - , - typename sprout::algorithm::results::join::type - >::type - join(ContainerContainer const& cont_cont) { - typedef typename sprout::algorithm::results::join::type result_type; - return sprout::algorithm::detail::join_impl_ra(cont_cont); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::iterator - >::value - && sprout::is_random_access_iterator< - typename sprout::container_traits< - typename sprout::container_traits::value_type - >::iterator - >::value - ), - typename sprout::algorithm::results::join::type - >::type - join(ContainerContainer const& cont_cont) { - typedef typename sprout::algorithm::results::join::type result_type; - return sprout::algorithm::detail::join_impl( - sprout::begin(cont_cont), - sprout::end(cont_cont) - ); - } - } // namespace detail - // - // join - // - template - inline SPROUT_CONSTEXPR typename sprout::algorithm::results::join::type - join(ContainerContainer const& cont_cont) { - return sprout::algorithm::detail::join(cont_cont); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::value_type - join_impl_ra_2( - ContIterator const& first_cont, SepIterator const& first, - SizeIterator const& found, - Sizes const& sizes, - sprout::index_t idx - ) - { - typedef typename sprout::container_traits::value_type value_type; - return found == sizes.end() ? value_type() - : (found - sizes.begin()) % 2 ? first[idx - found[-1]] - : sprout::begin(first_cont[(found - sizes.begin()) / 2])[idx - (found != sizes.begin() ? found[-1] : 0)] - ; - } - template - inline SPROUT_CONSTEXPR Result - join_impl_ra_1( - ContIterator const& first_cont, - SepIterator const& first, - sprout::index_tuple, - Sizes const& sizes - ) - { - return sprout::make( - sprout::algorithm::detail::join_impl_ra_2( - first_cont, - first, - sprout::range::lower_bound(sizes, Indexes + 1), - sizes, - Indexes - )... - ); - } - template - inline SPROUT_CONSTEXPR Result - join_impl_ra(ContainerContainer const& cont_cont, Separator const& separator) { - typedef typename sprout::container_traits::difference_type size_type; - typedef sprout::array< - size_type, - sprout::container_traits::static_size - ? sprout::container_traits::static_size * 2 - 1 - : 0 - > sizes_type; - return sprout::algorithm::detail::join_impl_ra_1( - sprout::begin(cont_cont), - sprout::begin(separator), - sprout::container_indexes::make(), - sprout::range::fixed::partial_sum( - cont_cont | sprout::adaptors::size_enumed(sprout::algorithm::detail::str_size(separator), true), - sprout::pit() - ) - ); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - Result - >::type join_impl( - ContIterator const& first_cont, ContIterator const& last_cont, - Args const&... args - ); - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - Result - >::type join_impl( - ContIterator const& first_cont, ContIterator const& last_cont, - Args const&... args - ); - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - Result - >::type join_impl_1( - ContIterator, ContIterator, - SepIterator, SepIterator, - bool, - InputIterator const&, InputIterator const&, - Args const&... args - ) - { - return sprout::make(args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - Result - >::type join_impl_1( - ContIterator const& first_cont, ContIterator const& last_cont, - SepIterator const& sep_first, SepIterator const& sep_last, - bool sep, - InputIterator const& first, InputIterator const& last, - Args const&... args - ) - { - return first != last - ? sprout::algorithm::detail::join_impl_1( - first_cont, last_cont, - sep_first, sep_last, - sep, - sprout::next(first), last, - args..., *first - ) - : sep - ? sprout::algorithm::detail::join_impl( - sprout::next(first_cont), last_cont, - sep_first, sep_last, - false, - args... - ) - : sprout::algorithm::detail::join_impl( - first_cont, last_cont, - sep_first, sep_last, - true, - args... - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - Result - >::type join_impl( - ContIterator, ContIterator, - SepIterator, SepIterator, - bool, - Args const&... args - ) - { - return sprout::make(args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - Result - >::type join_impl( - ContIterator const& first_cont, ContIterator const& last_cont, - SepIterator const& sep_first, SepIterator const& sep_last, - bool sep, - Args const&... args - ) - { - return first_cont != last_cont - ? sep - ? sprout::algorithm::detail::join_impl_1( - first_cont, last_cont, - sep_first, sep_last, - sep, - sep_first, sep_last, - args... - ) - : sprout::algorithm::detail::join_impl_1( - first_cont, last_cont, - sep_first, sep_last, - sep, - sprout::begin(*first_cont), sprout::end(*first_cont), - args... - ) - : sprout::make(args...) - ; - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_random_access_iterator< - typename sprout::container_traits::iterator - >::value - && sprout::is_random_access_iterator< - typename sprout::container_traits< - typename sprout::container_traits::value_type - >::iterator - >::value - && sprout::is_random_access_iterator< - typename sprout::container_traits::iterator - >::value - , - typename sprout::algorithm::results::join::type - >::type - join(ContainerContainer const& cont_cont, Separator const& separator) { - typedef typename sprout::algorithm::results::join::type result_type; - return sprout::algorithm::detail::join_impl_ra(cont_cont, separator); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::iterator - >::value - && sprout::is_random_access_iterator< - typename sprout::container_traits< - typename sprout::container_traits::value_type - >::iterator - >::value - && sprout::is_random_access_iterator< - typename sprout::container_traits::iterator - >::value - ), - typename sprout::algorithm::results::join::type - >::type - join(ContainerContainer const& cont_cont, Separator const& separator) { - typedef typename sprout::algorithm::results::join::type result_type; - return sprout::algorithm::detail::join_impl( - sprout::begin(cont_cont), - sprout::end(cont_cont), - sprout::begin(separator), - sprout::end(separator), - false - ); - } - } // namespace detail - // - // join - // - template - inline SPROUT_CONSTEXPR typename sprout::algorithm::results::join::type - join(ContainerContainer const& cont_cont, Separator const& separator) { - return sprout::algorithm::detail::join(cont_cont, separator); - } - } // namespace algorithm -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_STRING_JOIN_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/string/to_lower.hpp b/dsp/lib/sprout/sprout/algorithm/string/to_lower.hpp deleted file mode 100644 index 3c83fc7..0000000 --- a/dsp/lib/sprout/sprout/algorithm/string/to_lower.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_STRING_TO_LOWER_HPP -#define SPROUT_ALGORITHM_STRING_TO_LOWER_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_STRING_TO_LOWER_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/string/to_lower_copy.hpp b/dsp/lib/sprout/sprout/algorithm/string/to_lower_copy.hpp deleted file mode 100644 index eee8ab6..0000000 --- a/dsp/lib/sprout/sprout/algorithm/string/to_lower_copy.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_STRING_TO_LOWER_COPY_HPP -#define SPROUT_ALGORITHM_STRING_TO_LOWER_COPY_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_STRING_TO_LOWER_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/string/to_upper.hpp b/dsp/lib/sprout/sprout/algorithm/string/to_upper.hpp deleted file mode 100644 index 36e7493..0000000 --- a/dsp/lib/sprout/sprout/algorithm/string/to_upper.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_STRING_TO_UPPER_HPP -#define SPROUT_ALGORITHM_STRING_TO_UPPER_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_STRING_TO_UPPER_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/string/to_upper_copy.hpp b/dsp/lib/sprout/sprout/algorithm/string/to_upper_copy.hpp deleted file mode 100644 index af6c170..0000000 --- a/dsp/lib/sprout/sprout/algorithm/string/to_upper_copy.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_STRING_TO_UPPER_COPY_HPP -#define SPROUT_ALGORITHM_STRING_TO_UPPER_COPY_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_STRING_TO_UPPER_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/swap_element.hpp b/dsp/lib/sprout/sprout/algorithm/swap_element.hpp deleted file mode 100644 index 134d9a1..0000000 --- a/dsp/lib/sprout/sprout/algorithm/swap_element.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_SWAP_ELEMENT_HPP -#define SPROUT_ALGORITHM_SWAP_ELEMENT_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_SWAP_ELEMENT_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/swap_element_copy.hpp b/dsp/lib/sprout/sprout/algorithm/swap_element_copy.hpp deleted file mode 100644 index 2a5fa2a..0000000 --- a/dsp/lib/sprout/sprout/algorithm/swap_element_copy.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_SWAP_ELEMENT_COPY_HPP -#define SPROUT_ALGORITHM_SWAP_ELEMENT_COPY_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_SWAP_ELEMENT_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/swap_ranges.hpp b/dsp/lib/sprout/sprout/algorithm/swap_ranges.hpp deleted file mode 100644 index 598bd07..0000000 --- a/dsp/lib/sprout/sprout/algorithm/swap_ranges.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_SWAP_RANGES_HPP -#define SPROUT_ALGORITHM_SWAP_RANGES_HPP - -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_SWAP_RANGES_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/transform.hpp b/dsp/lib/sprout/sprout/algorithm/transform.hpp deleted file mode 100644 index 5dd57c8..0000000 --- a/dsp/lib/sprout/sprout/algorithm/transform.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_TRANSFORM_HPP -#define SPROUT_ALGORITHM_TRANSFORM_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_TRANSFORM_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/tristate_lexicographical_compare.hpp b/dsp/lib/sprout/sprout/algorithm/tristate_lexicographical_compare.hpp deleted file mode 100644 index e1eba8a..0000000 --- a/dsp/lib/sprout/sprout/algorithm/tristate_lexicographical_compare.hpp +++ /dev/null @@ -1,263 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_TRISTATE_LEXICOGRAPHICAL_COMPARE_HPP -#define SPROUT_ALGORITHM_TRISTATE_LEXICOGRAPHICAL_COMPARE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR int - tristate_lexicographical_compare_impl_ra_check( - Difference1 size1, Difference2 size2, int found - ) - { - return found != 2 ? found - : size1 < size2 ? -1 - : size1 > size2 ? 1 : 0 - ; - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - int - >::type - tristate_lexicographical_compare( - RandomAccessIterator1 first1, RandomAccessIterator1 last1, RandomAccessIterator2 first2, RandomAccessIterator2 last2, Compare comp, - std::random_access_iterator_tag* - ) - { - return first2 == last2 ? (first1 == last1 ? 0 : 1) - : first1 == last1 ? -1 - : sprout::detail::tristate_lexicographical_compare_impl_ra_check( - sprout::distance(first1, last1), sprout::distance(first2, last2), - sprout::detail::lexicographical_compare_impl_ra( - first1, first2, comp, - NS_SSCRISK_CEL_OR_SPROUT::min(sprout::distance(first1, last1), sprout::distance(first2, last2)), - 2 - ) - ) - ; - } - - template - inline SPROUT_CONSTEXPR int - tristate_lexicographical_compare_impl_check( - InputIterator1 last1, InputIterator2 last2, Compare comp, - sprout::pair const& found - ) - { - return found.second == last2 ? (found.first == last1 ? 0 : 1) - : found.first == last1 ? -1 - : comp(*found.first, *found.second) ? -1 - : comp(*found.second, *found.first) ? 1 - : 0 - ; - } - - template - inline SPROUT_CONSTEXPR int - tristate_lexicographical_compare( - InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, Compare comp, - std::input_iterator_tag* - ) - { - typedef sprout::pair type; - return sprout::detail::tristate_lexicographical_compare_impl_check( - last1, last2, comp, - sprout::detail::lexicographical_compare_impl(type(first1, first2), last1, last2, comp, 1) - ); - } - } // namespace detail - - // - // tristate_lexicographical_compare - // - // recursion depth: - // O(log(N1+N2)) - // - template - inline SPROUT_CONSTEXPR int - tristate_lexicographical_compare( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Compare comp - ) - { - typedef typename sprout::common_iterator_category::type* category; - return sprout::detail::tristate_lexicographical_compare(first1, last1, first2, last2, comp, category()); - } - - template - inline SPROUT_CONSTEXPR int - tristate_lexicographical_compare( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2 - ) - { - return sprout::tristate_lexicographical_compare( - first1, last1, first2, last2, - sprout::less<>() - ); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR int - tristate_lexicographical_compare_2_impl_ra( - RandomAccessIterator1 first1, T1 const& delim1, - RandomAccessIterator2 first2, T2 const& delim2, - Compare comp, - typename std::iterator_traits::difference_type size, int found - ) - { - return found != 2 ? found - : size == 1 - ? !comp(*first2, delim2) && !comp(delim2, *first2) - ? !comp(*first1, delim1) && !comp(delim1, *first1) ? 0 : 1 - : (!comp(*first1, delim1) && !comp(delim1, *first1)) || comp(*first1, *first2) - ? -1 - : comp(*first2, *first1) ? 1 : 2 - : sprout::detail::tristate_lexicographical_compare_2_impl_ra( - sprout::next(first1, size / 2), delim1, sprout::next(first2, size / 2), delim2, comp, - size - size / 2, - sprout::detail::tristate_lexicographical_compare_2_impl_ra( - first1, delim1, first2, delim2, comp, - size / 2, - 2 - ) - ) - ; - } - template - inline SPROUT_CONSTEXPR int - tristate_lexicographical_compare_2( - RandomAccessIterator1 first1, RandomAccessIterator1 last1, T1 const& delim1, - RandomAccessIterator2 first2, RandomAccessIterator2 last2, T2 const& delim2, - Compare comp, - std::random_access_iterator_tag* - ) - { - return sprout::detail::tristate_lexicographical_compare_impl_ra_check( - sprout::distance(first1, last1), sprout::distance(first2, last2), - first2 == last2 || first1 == last1 - ? 2 - : sprout::detail::tristate_lexicographical_compare_2_impl_ra( - first1, delim1, first2, delim2, comp, - NS_SSCRISK_CEL_OR_SPROUT::min(sprout::distance(first1, last1), sprout::distance(first2, last2)), - 2 - ) - ) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::pair - tristate_lexicographical_compare_impl_1( - sprout::pair const& current, - InputIterator1 last1, T1 const& delim1, InputIterator2 last2, T2 const& delim2, Compare comp, - typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair type; - return current.second == last2 || current.first == last1 ? current - : n == 1 - ? !comp(*current.second, delim2) && !comp(delim2, *current.second) - ? type(!comp(*current.first, delim1) && !comp(delim1, *current.first) ? last1 : current.first, last2) - : (!comp(*current.first, delim1) && !comp(delim1, *current.first)) || comp(*current.first, *current.second) - ? type(last1, current.second) - : comp(*current.second, *current.first) ? type(current.first, last2) - : type(sprout::next(current.first), sprout::next(current.second)) - : sprout::detail::tristate_lexicographical_compare_impl_1( - sprout::detail::tristate_lexicographical_compare_impl_1( - current, - last1, delim1, last2, delim2, comp, n / 2 - ), - last1, delim1, last2, delim2, comp, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - tristate_lexicographical_compare_impl( - sprout::pair const& current, - InputIterator1 last1, T1 const& delim1, InputIterator2 last2, T2 const& delim2, Compare comp, - typename std::iterator_traits::difference_type n - ) - { - return current.second == last2 || current.first == last1 ? current - : sprout::detail::tristate_lexicographical_compare_impl( - sprout::detail::tristate_lexicographical_compare_impl_1( - current, - last1, delim1, last2, delim2, comp, n - ), - last1, delim1, last2, delim2, comp, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR int - tristate_lexicographical_compare_2( - InputIterator1 first1, InputIterator1 last1, T1 const& delim1, - InputIterator2 first2, InputIterator2 last2, T2 const& delim2, - Compare comp, - std::input_iterator_tag* - ) - { - typedef sprout::pair type; - return sprout::detail::tristate_lexicographical_compare_impl_check( - last1, last2, comp, - sprout::detail::tristate_lexicographical_compare_impl(type(first1, first2), last1, delim1, last2, delim2, comp, 1) - ); - } - } // namespace detail - - // - // tristate_lexicographical_compare - // - // recursion depth: - // O(log(N1+N2)) - // - template - inline SPROUT_CONSTEXPR int - tristate_lexicographical_compare( - InputIterator1 first1, InputIterator1 last1, T1 const& delim1, - InputIterator2 first2, InputIterator2 last2, T2 const& delim2, - Compare comp - ) - { - typedef typename sprout::common_iterator_category::type* category; - return sprout::detail::tristate_lexicographical_compare_2(first1, last1, delim1, first2, last2, delim2, comp, category()); - } - - template - inline SPROUT_CONSTEXPR int - tristate_lexicographical_compare( - InputIterator1 first1, InputIterator1 last1, T1 const& delim1, - InputIterator2 first2, InputIterator2 last2, T2 const& delim2 - ) - { - return sprout::tristate_lexicographical_compare( - first1, last1, delim1, first2, last2, delim2, - sprout::less<>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_TRISTATE_LEXICOGRAPHICAL_COMPARE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/unfold.hpp b/dsp/lib/sprout/sprout/algorithm/unfold.hpp deleted file mode 100644 index 71d9f2f..0000000 --- a/dsp/lib/sprout/sprout/algorithm/unfold.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_UNFOLD_HPP -#define SPROUT_ALGORITHM_UNFOLD_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_UNFOLD_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/unfold_n.hpp b/dsp/lib/sprout/sprout/algorithm/unfold_n.hpp deleted file mode 100644 index e1bf933..0000000 --- a/dsp/lib/sprout/sprout/algorithm/unfold_n.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_UNFOLD_N_HPP -#define SPROUT_ALGORITHM_UNFOLD_N_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_UNFOLD_N_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/unique.hpp b/dsp/lib/sprout/sprout/algorithm/unique.hpp deleted file mode 100644 index 6a0d51b..0000000 --- a/dsp/lib/sprout/sprout/algorithm/unique.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_UNIQUE_HPP -#define SPROUT_ALGORITHM_UNIQUE_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_UNIQUE_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/unique_copy.hpp b/dsp/lib/sprout/sprout/algorithm/unique_copy.hpp deleted file mode 100644 index b3cbd7c..0000000 --- a/dsp/lib/sprout/sprout/algorithm/unique_copy.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_UNIQUE_COPY_HPP -#define SPROUT_ALGORITHM_UNIQUE_COPY_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ALGORITHM_UNIQUE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/algorithm/upper_bound.hpp b/dsp/lib/sprout/sprout/algorithm/upper_bound.hpp deleted file mode 100644 index 8b4b379..0000000 --- a/dsp/lib/sprout/sprout/algorithm/upper_bound.hpp +++ /dev/null @@ -1,55 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ALGORITHM_UPPER_BOUND_HPP -#define SPROUT_ALGORITHM_UPPER_BOUND_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR ForwardIterator - upper_bound( - ForwardIterator const& first, typename std::iterator_traits::difference_type len, - T const& value, Compare comp - ) - { - return len == 0 ? first - : comp(value, *sprout::next(first, len / 2)) - ? sprout::detail::upper_bound(first, len / 2, value, comp) - : sprout::detail::upper_bound(sprout::next(first, len / 2 + 1), len - (len / 2 + 1), value, comp) - ; - } - } // namespace detail - - // 25.4.3.2 upper_bound - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR ForwardIterator - upper_bound(ForwardIterator first, ForwardIterator last, T const& value, Compare comp) { - return sprout::detail::upper_bound(first, sprout::distance(first, last), value, comp); - } - - template - inline SPROUT_CONSTEXPR ForwardIterator - upper_bound(ForwardIterator first, ForwardIterator last, T const& value) { - return sprout::upper_bound(first, last, value, sprout::less<>()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ALGORITHM_UPPER_BOUND_HPP diff --git a/dsp/lib/sprout/sprout/array.hpp b/dsp/lib/sprout/sprout/array.hpp deleted file mode 100644 index 09241b4..0000000 --- a/dsp/lib/sprout/sprout/array.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ARRAY_HPP -#define SPROUT_ARRAY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ARRAY_HPP diff --git a/dsp/lib/sprout/sprout/array/array.hpp b/dsp/lib/sprout/sprout/array/array.hpp deleted file mode 100644 index 8536c82..0000000 --- a/dsp/lib/sprout/sprout/array/array.hpp +++ /dev/null @@ -1,329 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ARRAY_ARRAY_HPP -#define SPROUT_ARRAY_ARRAY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION -# include -#endif - -namespace sprout { - // - // array - // - template - class array { - public: - typedef T value_type; -#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION - typedef sprout::index_iterator iterator; - typedef sprout::index_iterator const_iterator; -#else - typedef T* iterator; - typedef T const* const_iterator; -#endif - typedef T& reference; - typedef T const& const_reference; - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - typedef T* pointer; - typedef T const* const_pointer; - typedef sprout::reverse_iterator reverse_iterator; - typedef sprout::reverse_iterator const_reverse_iterator; - public: - SPROUT_STATIC_CONSTEXPR size_type static_size = N; - private: - template - static SPROUT_CONSTEXPR value_type const& - dummy_get(value_type const& value) { - return value; - } - template - static SPROUT_CONSTEXPR array - fill_impl(value_type const& value, sprout::index_tuple) { - return array{{dummy_get(value)...}}; - } - public: - value_type elems[static_size ? static_size : 1]; - private: - template - SPROUT_CONSTEXPR std::array - to_std_array(sprout::index_tuple) const - SPROUT_NOEXCEPT_IF(sprout::is_nothrow_copy_constructible::type>::value) - { - return std::array{{elems[Indexes]...}}; - } - public: - // construct/copy/destroy: - template - SPROUT_CXX14_CONSTEXPR array& operator=(array const& rhs) { - sprout::copy(rhs.begin(), rhs.end(), begin()); - return *this; - } - template - SPROUT_CXX14_CONSTEXPR array& operator=(array&& rhs) { - sprout::move(rhs.begin(), rhs.end(), begin()); - return *this; - } - // modifiers: - SPROUT_CXX14_CONSTEXPR void fill(const_reference value) { - sprout::fill_n(begin(), size(), value); - } - SPROUT_CONSTEXPR array fill(const_reference value) const { - return fill_impl(value, sprout::index_n<0, N>::make()); - } - SPROUT_CXX14_CONSTEXPR void assign(const_reference value) { - fill(value); - } - SPROUT_CONSTEXPR array assign(const_reference value) const { - return fill(value); - } - SPROUT_CXX14_CONSTEXPR void swap(array& other) - SPROUT_NOEXCEPT_IF_EXPR(sprout::swap(std::declval(), std::declval())) - { - sprout::swap_ranges(other.begin(), other.end(), begin()); - } - // iterators: -#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION - SPROUT_CXX14_CONSTEXPR iterator begin() SPROUT_NOEXCEPT { - return iterator(*this, 0); - } - SPROUT_CONSTEXPR const_iterator begin() const SPROUT_NOEXCEPT { - return const_iterator(*this, 0); - } - SPROUT_CXX14_CONSTEXPR iterator end() SPROUT_NOEXCEPT { - return iterator(*this, size()); - } - SPROUT_CONSTEXPR const_iterator end() const SPROUT_NOEXCEPT { - return const_iterator(*this, size()); - } -#else - SPROUT_CXX14_CONSTEXPR iterator begin() SPROUT_NOEXCEPT { - return iterator(elems); - } - SPROUT_CONSTEXPR const_iterator begin() const SPROUT_NOEXCEPT { - return iterator(elems); - } - SPROUT_CXX14_CONSTEXPR iterator end() SPROUT_NOEXCEPT { - return iterator(elems) + size(); - } - SPROUT_CONSTEXPR const_iterator end() const SPROUT_NOEXCEPT { - return iterator(elems) + size(); - } -#endif - SPROUT_CXX14_CONSTEXPR reverse_iterator rbegin() SPROUT_NOEXCEPT { - return reverse_iterator(end()); - } - SPROUT_CONSTEXPR const_reverse_iterator rbegin() const SPROUT_NOEXCEPT { - return const_reverse_iterator(end()); - } - SPROUT_CXX14_CONSTEXPR reverse_iterator rend() SPROUT_NOEXCEPT { - return reverse_iterator(begin()); - } - SPROUT_CONSTEXPR const_reverse_iterator rend() const SPROUT_NOEXCEPT { - return const_reverse_iterator(begin()); - } -#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION - SPROUT_CONSTEXPR const_iterator cbegin() const SPROUT_NOEXCEPT { - return const_iterator(*this, 0); - } - SPROUT_CONSTEXPR const_iterator cend() const SPROUT_NOEXCEPT { - return const_iterator(*this, size()); - } -#else - SPROUT_CONSTEXPR const_iterator cbegin() const SPROUT_NOEXCEPT { - return const_iterator(elems); - } - SPROUT_CONSTEXPR const_iterator cend() const SPROUT_NOEXCEPT { - return const_iterator(elems) + size(); - } -#endif - SPROUT_CONSTEXPR const_reverse_iterator crbegin() const SPROUT_NOEXCEPT { - return const_reverse_iterator(end()); - } - SPROUT_CONSTEXPR const_reverse_iterator crend() const SPROUT_NOEXCEPT { - return const_reverse_iterator(begin()); - } - // capacity: - SPROUT_CONSTEXPR size_type size() const SPROUT_NOEXCEPT { - return static_size; - } - SPROUT_CONSTEXPR size_type max_size() const SPROUT_NOEXCEPT { - return size(); - } - SPROUT_CONSTEXPR bool empty() const SPROUT_NOEXCEPT { - return size() == 0; - } - // element access: - SPROUT_CXX14_CONSTEXPR reference operator[](size_type i) { - return elems[i]; - } - SPROUT_CONSTEXPR const_reference operator[](size_type i) const { - return elems[i]; - } - SPROUT_CXX14_CONSTEXPR reference at(size_type i) { - return i < size() ? elems[i] - : (throw std::out_of_range("array<>: index out of range"), elems[i]) - ; - } - SPROUT_CONSTEXPR const_reference at(size_type i) const { - return i < size() ? elems[i] - : (throw std::out_of_range("array<>: index out of range"), elems[i]) - ; - } - SPROUT_CXX14_CONSTEXPR reference front() { - return elems[0]; - } - SPROUT_CONSTEXPR const_reference front() const { - return elems[0]; - } - SPROUT_CXX14_CONSTEXPR reference back() { - return elems[size() - 1]; - } - SPROUT_CONSTEXPR const_reference back() const { - return elems[size() - 1]; - } - - SPROUT_CXX14_CONSTEXPR pointer data() SPROUT_NOEXCEPT { - return elems; - } - SPROUT_CONSTEXPR const_pointer data() const SPROUT_NOEXCEPT { - return elems; - } - SPROUT_CXX14_CONSTEXPR pointer c_array() SPROUT_NOEXCEPT { - return data(); - } - SPROUT_CONSTEXPR const_pointer c_array() const SPROUT_NOEXCEPT { - return data(); - } - // others: - SPROUT_CXX14_CONSTEXPR void rangecheck(size_type i) const { - return i >= size() ? throw std::out_of_range("array<>: index out of range") - : (void)0 - ; - } - -#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION - SPROUT_CXX14_CONSTEXPR iterator nth(size_type i) { - return i < size() ? iterator(*this, i) - : (throw std::out_of_range("array<>: index out of range"), iterator()) - ; - } - SPROUT_CONSTEXPR const_iterator nth(size_type i) const { - return i < size() ? const_iterator(*this, i) - : (throw std::out_of_range("array<>: index out of range"), const_iterator()) - ; - } - SPROUT_CXX14_CONSTEXPR size_type index_of(iterator p) SPROUT_NOEXCEPT { - return p.index(); - } - SPROUT_CONSTEXPR size_type index_of(const_iterator p) const SPROUT_NOEXCEPT { - return p.index(); - } -#else - SPROUT_CXX14_CONSTEXPR iterator nth(size_type i) { - return i < size() ? iterator(elems) + i - : (throw std::out_of_range("array<>: index out of range"), iterator()) - ; - } - SPROUT_CONSTEXPR const_iterator nth(size_type i) const { - return i < size() ? const_iterator(elems) + i - : (throw std::out_of_range("array<>: index out of range"), const_iterator()) - ; - } - SPROUT_CXX14_CONSTEXPR size_type index_of(iterator p) SPROUT_NOEXCEPT { - return sprout::distance(begin(), p); - } - SPROUT_CONSTEXPR size_type index_of(const_iterator p) const SPROUT_NOEXCEPT { - return sprout::distance(begin(), p); - } -#endif - - SPROUT_CONSTEXPR operator std::array() const - SPROUT_NOEXCEPT_IF(sprout::is_nothrow_copy_constructible::type>::value) - { - return to_std_array(sprout::make_index_tuple::make()); - } - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::array::size_type sprout::array::static_size; - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::array& lhs, sprout::array& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // to_array - // - template - inline SPROUT_CONSTEXPR sprout::array - to_array(sprout::array const& arr) - SPROUT_NOEXCEPT_IF(sprout::is_nothrow_copy_constructible::value) - { - return arr; - } - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::array::type, N> - to_array_impl(T (& arr)[N], sprout::index_tuple) - SPROUT_NOEXCEPT_IF(sprout::is_nothrow_copy_constructible::type>::value) - { - return sprout::array::type, N>{{arr[Indexes]...}}; - } - } // namespace detail - template - inline SPROUT_CONSTEXPR sprout::array::type, N> - to_array(T (& arr)[N]) - SPROUT_NOEXCEPT_IF(sprout::is_nothrow_copy_constructible::type>::value) - { - return sprout::detail::to_array_impl(arr, sprout::make_index_tuple::make()); - } - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::array - to_array_impl(std::array const& arr, sprout::index_tuple) - SPROUT_NOEXCEPT_IF(sprout::is_nothrow_copy_constructible::value) - { - return sprout::array{{arr[Indexes]...}}; - } - } // namespace detail - template - inline SPROUT_CONSTEXPR sprout::array - to_array(std::array const& arr) - SPROUT_NOEXCEPT_IF(sprout::is_nothrow_copy_constructible::value) - { - return sprout::detail::to_array_impl(arr, sprout::make_index_tuple::make()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ARRAY_ARRAY_HPP diff --git a/dsp/lib/sprout/sprout/array/comparison.hpp b/dsp/lib/sprout/sprout/array/comparison.hpp deleted file mode 100644 index 3a7834c..0000000 --- a/dsp/lib/sprout/sprout/array/comparison.hpp +++ /dev/null @@ -1,58 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ARRAY_COMPARISON_HPP -#define SPROUT_ARRAY_COMPARISON_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // operator== - // operator!= - // operator< - // operator> - // operator<= - // operator>= - // - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::array const& lhs, sprout::array const& rhs) { - return sprout::equal(lhs.begin(), lhs.end(), rhs.begin()); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::array const& lhs, sprout::array const& rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator<(sprout::array const& lhs, sprout::array const& rhs) { - return sprout::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end()); - } - template - inline SPROUT_CONSTEXPR bool - operator>(sprout::array const& lhs, sprout::array const& rhs) { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator<=(sprout::array const& lhs, sprout::array const& rhs) { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(sprout::array const& lhs, sprout::array const& rhs) { - return !(lhs < rhs); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ARRAY_COMPARISON_HPP diff --git a/dsp/lib/sprout/sprout/array/hash.hpp b/dsp/lib/sprout/sprout/array/hash.hpp deleted file mode 100644 index 46ffce5..0000000 --- a/dsp/lib/sprout/sprout/array/hash.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ARRAY_HASH_HPP -#define SPROUT_ARRAY_HASH_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // hash_value - // - template - inline SPROUT_CONSTEXPR std::size_t - hash_value(sprout::array const& v) { - return sprout::hash_range(v); - } -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // hash - // - template - struct hash > - : public sprout::hash > - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -#endif // #ifndef SPROUT_ARRAY_HASH_HPP diff --git a/dsp/lib/sprout/sprout/array/make_array.hpp b/dsp/lib/sprout/sprout/array/make_array.hpp deleted file mode 100644 index eafaada..0000000 --- a/dsp/lib/sprout/sprout/array/make_array.hpp +++ /dev/null @@ -1,107 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ARRAY_MAKE_ARRAY_HPP -#define SPROUT_ARRAY_MAKE_ARRAY_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - enum make_array_t { - make_array_in_common_elements - }; - } // namespace detail - // - // make_array - // - template - inline SPROUT_CONSTEXPR sprout::array::type, sizeof...(Types)> - make_array(Types&&... args) { - return sprout::array::type, sizeof...(Types)>{{T(SPROUT_FORWARD(Types, args))...}}; - } - template - inline SPROUT_CONSTEXPR sprout::array::type, N> - make_array(Types&&... args) { - return sprout::array::type, N>{{T(SPROUT_FORWARD(Types, args))...}}; - } - template - inline SPROUT_CONSTEXPR sprout::array::type, sizeof...(Types)> - make_array(Types&&... args) { - typedef typename sprout::common_decay::type value_type; - typedef sprout::array type; - return type{{value_type(SPROUT_FORWARD(Types, args))...}}; - } - template - inline SPROUT_CONSTEXPR sprout::array::type, N> - make_array(Types&&... args) { - typedef typename sprout::common_decay::type value_type; - typedef sprout::array type; - return type{{value_type(SPROUT_FORWARD(Types, args))...}}; - } - - // - // make_array_without_narrowing - // - template - inline SPROUT_CONSTEXPR sprout::array::type, sizeof...(Types)> - make_array_without_narrowing(Types&&... args) { - return sprout::array::type, sizeof...(Types)>{{SPROUT_FORWARD(Types, args)...}}; - } - template - inline SPROUT_CONSTEXPR sprout::array::type, N> - make_array_without_narrowing(Types&&... args) { - return sprout::array::type, N>{{SPROUT_FORWARD(Types, args)...}}; - } - template - inline SPROUT_CONSTEXPR sprout::array::type, sizeof...(Types)> - make_array_without_narrowing(Types&&... args) { - typedef typename sprout::common_decay::type value_type; - typedef sprout::array type; - return type{{SPROUT_FORWARD(Types, args)...}}; - } - template - inline SPROUT_CONSTEXPR sprout::array::type, N> - make_array_without_narrowing(Types&&... args) { - typedef typename sprout::common_decay::type value_type; - typedef sprout::array type; - return type{{SPROUT_FORWARD(Types, args)...}}; - } - - // - // make_common_array - // - template - inline SPROUT_CONSTEXPR sprout::array::type, sizeof...(Types)> - make_common_array(Types&&... args) { - return sprout::make_array(SPROUT_FORWARD(Types, args)...); - } - template - inline SPROUT_CONSTEXPR sprout::array::type, N> - make_common_array(Types&&... args) { - return sprout::make_array(SPROUT_FORWARD(Types, args)...); - } - - // - // convert_array - // [[deprecated]] - // - template - SPROUT_DEPRECATED - inline SPROUT_CONSTEXPR sprout::array - convert_array(Converter&& conv, Types&&... args) { - return sprout::make_array(SPROUT_FORWARD(Converter, conv)(SPROUT_FORWARD(Types, args))...); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ARRAY_MAKE_ARRAY_HPP diff --git a/dsp/lib/sprout/sprout/array/nested_array.hpp b/dsp/lib/sprout/sprout/array/nested_array.hpp deleted file mode 100644 index 0e7710a..0000000 --- a/dsp/lib/sprout/sprout/array/nested_array.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ARRAY_NESTED_ARRAY_HPP -#define SPROUT_ARRAY_NESTED_ARRAY_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - struct nested_array_t_impl; - template - struct nested_array_t_impl - : public sprout::identity > - {}; - template - struct nested_array_t_impl - : public sprout::detail::nested_array_t_impl, Ms...> - {}; - } // namespace detail - // - // nested_array_t - // - template - struct nested_array_t - : public sprout::detail::nested_array_t_impl - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - // - // nested_array - // - template - using nested_array = typename sprout::nested_array_t::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_ARRAY_NESTED_ARRAY_HPP diff --git a/dsp/lib/sprout/sprout/array/tuple.hpp b/dsp/lib/sprout/sprout/array/tuple.hpp deleted file mode 100644 index 46857c3..0000000 --- a/dsp/lib/sprout/sprout/array/tuple.hpp +++ /dev/null @@ -1,70 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ARRAY_TUPLE_HPP -#define SPROUT_ARRAY_TUPLE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // tuple_get - // - template - inline SPROUT_CONSTEXPR T& - tuple_get(sprout::array& t) SPROUT_NOEXCEPT { - static_assert(I < N, "tuple_get: index out of range"); - return t[I]; - } - template - inline SPROUT_CONSTEXPR T const& - tuple_get(sprout::array const& t) SPROUT_NOEXCEPT { - static_assert(I < N, "tuple_get: index out of range"); - return t[I]; - } - template - inline SPROUT_CONSTEXPR T&& - tuple_get(sprout::array&& t) SPROUT_NOEXCEPT { - return sprout::move(sprout::tuples::get(t)); - } -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // tuple_size - // - template - struct tuple_size > - : public sprout::integral_constant - {}; - - // - // tuple_element - // - template - struct tuple_element > - : public std::conditional<(I < N), sprout::identity, sprout::detail::nil_base>::type - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -#endif // #ifndef SPROUT_ARRAY_TUPLE_HPP diff --git a/dsp/lib/sprout/sprout/array/type_traits.hpp b/dsp/lib/sprout/sprout/array/type_traits.hpp deleted file mode 100644 index e61a622..0000000 --- a/dsp/lib/sprout/sprout/array/type_traits.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ARRAY_TYPE_TRAITS_HPP -#define SPROUT_ARRAY_TYPE_TRAITS_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // is_array_class - // - template - struct is_array_class - : public sprout::false_type - {}; - template - struct is_array_class - : public sprout::is_array_class - {}; - template - struct is_array_class - : public sprout::is_array_class - {}; - template - struct is_array_class > - : public sprout::true_type - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_array_class_v = sprout::is_array_class::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_ARRAY_TYPE_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/assert.hpp b/dsp/lib/sprout/sprout/assert.hpp deleted file mode 100644 index ca24255..0000000 --- a/dsp/lib/sprout/sprout/assert.hpp +++ /dev/null @@ -1,284 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ASEERT_HPP -#define SPROUT_ASEERT_HPP - -#if defined(SPROUT_DISABLE_ASSERTS) || defined(NDEBUG) -# include -# include -# include -# include -#elif defined(SPROUT_ENABLE_ASSERT_HANDLER) -# include -# include -# include -# include -#else -# include -# include -# include -# include -# include -# include -#endif -#include - -// -// SPROUT_ASSERTION_FAILED_FORMAT -// -#ifndef SPROUT_ASSERTION_FAILED_FORMAT -# define SPROUT_ASSERTION_FAILED_FORMAT(expr, file, line) \ - "***** Internal Program Error - assertion (" #expr ") failed: " file "(" SPROUT_PP_STRINGIZE(line) ")" -#endif - -// -// SPROUT_ASSERT_MSG -// - -#if defined(SPROUT_DISABLE_ASSERTS) || defined(NDEBUG) - -# define SPROUT_ASSERT_MSG(expr, msg) \ - ((void)0) - -#elif defined(SPROUT_ENABLE_ASSERT_HANDLER) - -namespace sprout { - // - // assertion_info_msg - // - class assertion_info_msg { - private: - char const* expr_; - char const* msg_; - char const* function_; - char const* file_; - long line_; - public: - SPROUT_CONSTEXPR assertion_info_msg(char const* expr, char const* msg, char const* function, char const* file, long line) - : expr_(expr), msg_(msg), function_(function), file_(file), line_(line) - {} - SPROUT_CONSTEXPR char const* expr() const SPROUT_NOEXCEPT { - return expr_; - } - SPROUT_CONSTEXPR char const* msg() const SPROUT_NOEXCEPT { - return msg_; - } - SPROUT_CONSTEXPR char const* function() const SPROUT_NOEXCEPT { - return function_; - } - SPROUT_CONSTEXPR char const* file() const SPROUT_NOEXCEPT { - return file_; - } - SPROUT_CONSTEXPR long line() const SPROUT_NOEXCEPT { - return line_; - } - }; - - // - // assertion_failed_msg_default - // - inline SPROUT_NON_CONSTEXPR bool - assertion_failed_default(sprout::assertion_info_msg const& info) { - return (std::cerr << "***** Internal Program Error - assertion (" << info.expr() << ") failed: " << info.file() << "(" << info.line() << ")" << ": " << msg << std::endl), - std::abort(), false - ; - } - - // - // assertion_failed_msg - // * user defined - // - void - assertion_failed_msg(sprout::assertion_info_msg const&); -} // namespace sprout - -namespace sprout { - namespace detail { - inline bool - assertion_failed_msg(bool cond, char const* formatted, char const* expr, char const* msg, char const* function, char const* file, long line) { - return cond ? true - : ((void)sprout::assertion_failed_msg(sprout::assertion_info_msg(expr, msg, function, file, line)), false) - ; - } - inline SPROUT_CONSTEXPR bool - assertion_check_msg(bool cond, char const* formatted, char const* expr, char const* msg, char const* function, char const* file, long line) { - return cond ? true - : sprout::detail::assertion_failed_msg(cond, formatted, expr, msg, function, file, line) - ; - } - } // namespace detail -} // namespace sprout - -# define SPROUT_ASSERT_MSG(expr, msg) ( \ - (void)sprout::detail::assertion_check_msg( \ - (expr), SPROUT_ASSERTION_FAILED_FORMAT(expr, __FILE__, __LINE__), \ - #expr, msg, "(unknown)"/*SPROUT_CURRENT_FUNCTION*/, __FILE__, __LINE__ \ - ) \ - ) - -#else - -namespace sprout { - namespace detail { - inline SPROUT_NON_CONSTEXPR bool - assertion_failed_msg(char const* formatted, char const* msg) { - return (std::cerr << formatted << ": " << msg << std::endl), std::abort(), false; - } - inline SPROUT_CONSTEXPR bool - assertion_check_msg(bool cond, char const* formatted, char const* msg) { - return cond ? true - : sprout::detail::assertion_failed_msg(formatted, msg) - ; - } - } // namespace detail -} // namespace sprout - -# define SPROUT_ASSERT_MSG(expr, msg) \ - ((void)sprout::detail::assertion_check_msg((expr), SPROUT_ASSERTION_FAILED_FORMAT(expr, __FILE__, __LINE__), msg)) - -#endif - -// -// SPROUT_ASSERT -// - -#if defined(SPROUT_DISABLE_ASSERTS) || defined(NDEBUG) - -# define SPROUT_ASSERT_1(expr) \ - ((void)0) - -#elif defined(SPROUT_ENABLE_ASSERT_HANDLER) - -namespace sprout { - // - // assertion_info - // - class assertion_info { - private: - char const* expr_; - char const* function_; - char const* file_; - long line_; - public: - SPROUT_CONSTEXPR assertion_info(char const* expr, char const* function, char const* file, long line) - : expr_(expr), function_(function), file_(file), line_(line) - {} - SPROUT_CONSTEXPR char const* expr() const SPROUT_NOEXCEPT { - return expr_; - } - SPROUT_CONSTEXPR char const* function() const SPROUT_NOEXCEPT { - return function_; - } - SPROUT_CONSTEXPR char const* file() const SPROUT_NOEXCEPT { - return file_; - } - SPROUT_CONSTEXPR long line() const SPROUT_NOEXCEPT { - return line_; - } - }; - - // - // assertion_failed_default - // - inline SPROUT_NON_CONSTEXPR bool - assertion_failed_default(sprout::assertion_info const& info) { - return (std::cerr << "***** Internal Program Error - assertion (" << info.expr() << ") failed: " << info.file() << "(" << info.line() << ")" << std::endl), - std::abort(), false - ; - } - - // - // assertion_failed - // * user defined - // - void - assertion_failed(sprout::assertion_info const&); -} // namespace sprout - -namespace sprout { - namespace detail { - inline SPROUT_NON_CONSTEXPR bool - assertion_failed(bool cond, char const* formatted, char const* expr, char const* function, char const* file, long line) { - return cond ? true - : ((void)sprout::assertion_failed(sprout::assertion_info(expr, function, file, line)), false) - ; - } - inline SPROUT_CONSTEXPR bool - assertion_check(bool cond, char const* formatted, char const* expr, char const* function, char const* file, long line) { - return cond ? true - : sprout::detail::assertion_failed(cond, formatted, expr, function, file, line) - ; - } - } // namespace detail -} // namespace sprout - -# define SPROUT_ASSERT_1(expr) \ - (void)sprout::detail::assertion_check( \ - (expr), SPROUT_ASSERTION_FAILED_FORMAT(expr, __FILE__, __LINE__), \ - #expr, "(unknown)"/*SPROUT_CURRENT_FUNCTION*/, __FILE__, __LINE__ \ - ) \ - ) - -#else - -namespace sprout { - namespace detail { - inline SPROUT_NON_CONSTEXPR bool - assertion_failed(char const* formatted) { - return (std::cerr << formatted << std::endl), std::abort(), false; - } - inline SPROUT_CONSTEXPR bool - assertion_check(bool cond, char const* formatted) { - return cond ? true - : sprout::detail::assertion_failed(formatted) - ; - } - } // namespace detail -} // namespace sprout - -# define SPROUT_ASSERT_1(expr) \ - ((void)sprout::detail::assertion_check((expr), SPROUT_ASSERTION_FAILED_FORMAT(expr, __FILE__, __LINE__))) - -#endif - -#if SPROUT_PP_VARIADICS -# define SPROUT_ASSERT_2(expr, msg) \ - SPROUT_ASSERT_MSG(expr, msg) -# define SPROUT_ASSERT(...) \ - SPROUT_PP_CAT(SPROUT_ASSERT_, SPROUT_PP_VARIADIC_SIZE(__VA_ARGS__))(__VA_ARGS__) -#else -# define SPROUT_ASSERT(expr) \ - SPROUT_ASSERT_1(expr) -#endif - -// -// SPROUT_VERIFY -// - -#if defined(SPROUT_DISABLE_ASSERTS) || (!defined(SPROUT_ENABLE_ASSERT_HANDLER) && defined(NDEBUG)) - -namespace sprout { - namespace detail { - inline SPROUT_CONSTEXPR bool - verification_disabled(bool) SPROUT_NOEXCEPT { - return true; - } - } // namespace detail -} // namespace sprout - -# define SPROUT_VERIFY(expr) \ - ((void)(sprout::detail::verification_disabled((expr)))) - -#else - -# define SPROUT_VERIFY(expr) \ - SPROUT_ASSERT(expr) - -#endif - -#endif // #ifndef SPROUT_ASEERT_HPP diff --git a/dsp/lib/sprout/sprout/bit/bit_length.hpp b/dsp/lib/sprout/sprout/bit/bit_length.hpp deleted file mode 100644 index e708b97..0000000 --- a/dsp/lib/sprout/sprout/bit/bit_length.hpp +++ /dev/null @@ -1,80 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_BIT_LENGTH_HPP -#define SPROUT_BIT_BIT_LENGTH_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace detail { - SPROUT_STATIC_CONSTEXPR std::size_t bit_len_8_table[std::size_t(UCHAR_MAX) + 1] = { - 0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 - }; - template - struct bit_len { - private: - SPROUT_STATIC_CONSTEXPR std::size_t next_size = Size - 1; - SPROUT_STATIC_CONSTEXPR std::size_t shift_bits = next_size * CHAR_BIT; - private: - template - SPROUT_CONSTEXPR Integral - impl(Integral x, unsigned char i) const { - return bit_len_8_table[i] - ? bit_len_8_table[i] + next_size * CHAR_BIT - : sprout::detail::bit_len().template operator()(x) - ; - } - public: - template - SPROUT_CONSTEXPR Integral - operator()(Integral x) const { - return impl(x, static_cast((x >> shift_bits) & UCHAR_MAX)); - } - }; - template<> - struct bit_len<1> { - public: - template - SPROUT_CONSTEXPR Integral - operator()(Integral x) const { - return bit_len_8_table[static_cast(x & UCHAR_MAX)]; - } - }; - } // namespace detail - // - // bit_length - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - Integral - >::type - bit_length(Integral x) { - return sprout::detail::bit_len().template operator()(x); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_BIT_LENGTH_HPP diff --git a/dsp/lib/sprout/sprout/bit/bit_reverse.hpp b/dsp/lib/sprout/sprout/bit/bit_reverse.hpp deleted file mode 100644 index aaa23e4..0000000 --- a/dsp/lib/sprout/sprout/bit/bit_reverse.hpp +++ /dev/null @@ -1,90 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_BIT_REVERSE_HPP -#define SPROUT_BIT_BIT_REVERSE_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace detail { - SPROUT_STATIC_CONSTEXPR unsigned char bit_rev_8_table[std::size_t(UCHAR_MAX) + 1] = { - 0, 128, 64, 192, 32, 160, 96, 224, 16, 144, 80, 208, 48, 176, 112, 240, 8, 136, 72, 200, - 40, 168, 104, 232, 24, 152, 88, 216, 56, 184, 120, 248, 4, 132, 68, 196, 36, 164, 100, 228, - 20, 148, 84, 212, 52, 180, 116, 244, 12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, - 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82, 210, 50, 178, 114, 242, - 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, - 38, 166, 102, 230, 22, 150, 86, 214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, - 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81, 209, - 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, - 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85, 213, 53, 181, 117, 245, 13, 141, 77, 205, - 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 3, 131, 67, 195, 35, 163, 99, 227, - 19, 147, 83, 211, 51, 179, 115, 243, 11, 139, 75, 203, 43, 171, 107, 235, 27, 155, 91, 219, - 59, 187, 123, 251, 7, 135, 71, 199, 39, 167, 103, 231, 23, 151, 87, 215, 55, 183, 119, 247, - 15, 143, 79, 207, 47, 175, 111, 239, 31, 159, 95, 223, 63, 191, 127, 255 - }; - template - struct bit_rev { - private: - SPROUT_STATIC_CONSTEXPR std::size_t next_size = Size / 2; - SPROUT_STATIC_CONSTEXPR std::size_t shift_bits = next_size * CHAR_BIT; - public: - template - SPROUT_CONSTEXPR Integral - operator()(Integral x) const { - return (sprout::detail::bit_rev().template operator()(x) << shift_bits) - | (sprout::detail::bit_rev().template operator()(x >> shift_bits)) - ; - } - }; - template<> - struct bit_rev<1> { - public: - template - SPROUT_CONSTEXPR Integral - operator()(Integral x) const { - return sprout::detail::bit_rev_8_table[static_cast(x & UCHAR_MAX)]; - } - }; - } // namespace detail - // - // bit_reverse - // - template - SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - Integral - >::type - bit_reverse(Integral x) { - typedef typename std::make_unsigned::type unsigned_type; - return static_cast( - sprout::detail::bit_rev().template operator()(x) - ); - } - // - // bit_reverse_in - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - Integral - >::type - bit_reverse_in(Integral x, int length) { - typedef typename std::make_unsigned::type unsigned_type; - return SPROUT_ASSERT(length <= sizeof(Integral) * CHAR_BIT), - static_cast( - sprout::detail::bit_rev().template operator()(x) - >> (sizeof(Integral) * CHAR_BIT - length) - ) - ; - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_BIT_REVERSE_HPP diff --git a/dsp/lib/sprout/sprout/bit/clrsb.hpp b/dsp/lib/sprout/sprout/bit/clrsb.hpp deleted file mode 100644 index 19810fa..0000000 --- a/dsp/lib/sprout/sprout/bit/clrsb.hpp +++ /dev/null @@ -1,50 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_CLRSB_HPP -#define SPROUT_BIT_CLRSB_HPP - -#include -#include -#include - -namespace sprout { - namespace detail { -# if SPROUT_USE_BUILTIN_BIT_OPERATION - inline SPROUT_CONSTEXPR int - clrsb(unsigned x) { - return __builtin_clrsb(x); - } - inline SPROUT_CONSTEXPR int - clrsb(unsigned long x) { - return __builtin_clrsbl(x); - } - inline SPROUT_CONSTEXPR int - clrsb(unsigned long long x) { - return __builtin_clrsbll(x); - } -# endif - template - inline SPROUT_CONSTEXPR int - clrsb(Integral x) SPROUT_NOEXCEPT { - return sprout::clz(~x); - } - } // namespace detail - // - // clrsb - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - int - >::type - clrsb(Integral x) SPROUT_NOEXCEPT { - return sprout::detail::clrsb(x); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_CLRSB_HPP diff --git a/dsp/lib/sprout/sprout/bit/clz.hpp b/dsp/lib/sprout/sprout/bit/clz.hpp deleted file mode 100644 index a2837f2..0000000 --- a/dsp/lib/sprout/sprout/bit/clz.hpp +++ /dev/null @@ -1,115 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_CLZ_HPP -#define SPROUT_BIT_CLZ_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { -# if SPROUT_USE_BUILTIN_BIT_OPERATION - inline SPROUT_CONSTEXPR int - clz_non0(unsigned x) { - return __builtin_clz(x); - } - inline SPROUT_CONSTEXPR int - clz_non0(unsigned long x) { - return __builtin_clzl(x); - } - inline SPROUT_CONSTEXPR int - clz_non0(unsigned long long x) { - return __builtin_clzll(x); - } -# endif - template - inline SPROUT_CONSTEXPR typename std::enable_if< - (N == 1), - sprout::pair - >::type - clz_bytes(sprout::pair const& xn) SPROUT_NOEXCEPT { - return xn; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - (N > 1), - sprout::pair - >::type - clz_bytes(sprout::pair const& xn) SPROUT_NOEXCEPT { - typedef sprout::pair type; - return sprout::detail::clz_bytes( - sprout::shlr(xn.first, (sizeof(Integral) - N / 2) * CHAR_BIT) ? xn - : type(sprout::shll(xn.first, N / 2 * CHAR_BIT), xn.second + N / 2 * CHAR_BIT) - ); - } - template - inline SPROUT_CONSTEXPR sprout::pair - clz_bytes(sprout::pair const& xn) SPROUT_NOEXCEPT { - return sprout::detail::clz_bytes(xn); - } - template - inline SPROUT_CONSTEXPR int - clz_bits1(sprout::pair const& xn) SPROUT_NOEXCEPT { - return xn.second - sprout::shlr(xn.first, sizeof(Integral) * CHAR_BIT - 1); - } - template - inline SPROUT_CONSTEXPR int - clz_bits2(sprout::pair const& xn) SPROUT_NOEXCEPT { - typedef sprout::pair type; - return sprout::detail::clz_bits1( - sprout::shlr(xn.first, sizeof(Integral) * CHAR_BIT - 2) ? xn - : type(sprout::shll(xn.first, 2), xn.second + 2) - ); - } - template - inline SPROUT_CONSTEXPR int - clz_bits4(sprout::pair const& xn) SPROUT_NOEXCEPT { - typedef sprout::pair type; - return sprout::detail::clz_bits2( - sprout::shlr(xn.first, sizeof(Integral) * CHAR_BIT - 4) ? xn - : type(sprout::shll(xn.first, 4), xn.second + 4) - ); - } - template - inline SPROUT_CONSTEXPR int - clz_bits(sprout::pair const& xn) SPROUT_NOEXCEPT { - return sprout::detail::clz_bits4(xn); - } - template - inline SPROUT_CONSTEXPR int - clz_non0(Integral x) SPROUT_NOEXCEPT { - typedef sprout::pair type; - return sprout::detail::clz_bits(sprout::detail::clz_bytes(type(x, 1))); - } - template - inline SPROUT_CONSTEXPR int - clz(Integral x) SPROUT_NOEXCEPT { - return x == 0 ? static_cast(sizeof(x) * CHAR_BIT) - : sprout::detail::clz_non0(x) - ; - } - } // namespace detail - // - // clz - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - int - >::type - clz(Integral x) SPROUT_NOEXCEPT { - return sprout::detail::clz(x); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_CLZ_HPP diff --git a/dsp/lib/sprout/sprout/bit/cntl0.hpp b/dsp/lib/sprout/sprout/bit/cntl0.hpp deleted file mode 100644 index 1ec0029..0000000 --- a/dsp/lib/sprout/sprout/bit/cntl0.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_CNTL0_HPP -#define SPROUT_BIT_CNTL0_HPP - -#include -#include -#include - -namespace sprout { - // - // cntl0 - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - int - >::type - cntl0(Integral x) SPROUT_NOEXCEPT { - return sprout::clz(x); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_CNTL0_HPP diff --git a/dsp/lib/sprout/sprout/bit/cntl1.hpp b/dsp/lib/sprout/sprout/bit/cntl1.hpp deleted file mode 100644 index 49bb5d5..0000000 --- a/dsp/lib/sprout/sprout/bit/cntl1.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_CNTL1_HPP -#define SPROUT_BIT_CNTL1_HPP - -#include -#include -#include - -namespace sprout { - // - // cntl1 - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - int - >::type - cntl1(Integral x) SPROUT_NOEXCEPT { - return sprout::clrsb(x); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_CNTL0_HPP diff --git a/dsp/lib/sprout/sprout/bit/cntt0.hpp b/dsp/lib/sprout/sprout/bit/cntt0.hpp deleted file mode 100644 index 0f4a394..0000000 --- a/dsp/lib/sprout/sprout/bit/cntt0.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_CNTT0_HPP -#define SPROUT_BIT_CNTT0_HPP - -#include -#include -#include - -namespace sprout { - // - // cntt0 - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - int - >::type - cntt0(Integral x) SPROUT_NOEXCEPT { - return sprout::ctz(x); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_CNTT0_HPP diff --git a/dsp/lib/sprout/sprout/bit/cntt1.hpp b/dsp/lib/sprout/sprout/bit/cntt1.hpp deleted file mode 100644 index e266982..0000000 --- a/dsp/lib/sprout/sprout/bit/cntt1.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_CNTT1_HPP -#define SPROUT_BIT_CNTT1_HPP - -#include -#include -#include - -namespace sprout { - // - // cntt1 - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - int - >::type - cntt1(Integral x) SPROUT_NOEXCEPT { - return sprout::ctz(~x); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_CNTT1_HPP diff --git a/dsp/lib/sprout/sprout/bit/count.hpp b/dsp/lib/sprout/sprout/bit/count.hpp deleted file mode 100644 index 31637de..0000000 --- a/dsp/lib/sprout/sprout/bit/count.hpp +++ /dev/null @@ -1,22 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_COUNT_HPP -#define SPROUT_BIT_COUNT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_BIT_COUNT_HPP diff --git a/dsp/lib/sprout/sprout/bit/ctz.hpp b/dsp/lib/sprout/sprout/bit/ctz.hpp deleted file mode 100644 index 9f65701..0000000 --- a/dsp/lib/sprout/sprout/bit/ctz.hpp +++ /dev/null @@ -1,118 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_CTZ_HPP -#define SPROUT_BIT_CTZ_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { -# if SPROUT_USE_BUILTIN_BIT_OPERATION - inline SPROUT_CONSTEXPR int - ctz_non0(unsigned x) { - return __builtin_ctz(x); - } - inline SPROUT_CONSTEXPR int - ctz_non0(unsigned long x) { - return __builtin_ctzl(x); - } - inline SPROUT_CONSTEXPR int - ctz_non0(unsigned long long x) { - return __builtin_ctzll(x); - } -# endif - template - inline SPROUT_CONSTEXPR typename std::enable_if< - (N == 1), - sprout::pair - >::type - ctz_bytes(sprout::pair const& xn) SPROUT_NOEXCEPT { - return xn; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - (N > 1), - sprout::pair - >::type - ctz_bytes(sprout::pair const& xn) SPROUT_NOEXCEPT { - typedef sprout::pair type; - return sprout::detail::ctz_bytes( - (xn.first & static_cast(sprout::numeric_limits::least>::max())) ? xn - : type(sprout::shlr(xn.first, N / 2 * CHAR_BIT), xn.second + N / 2 * CHAR_BIT) - ); - } - template - inline SPROUT_CONSTEXPR sprout::pair - ctz_bytes(sprout::pair const& xn) SPROUT_NOEXCEPT { - return sprout::detail::ctz_bytes(xn); - } - template - inline SPROUT_CONSTEXPR int - ctz_bits1(sprout::pair const& xn) SPROUT_NOEXCEPT { - return (xn.first & Integral(0x1ul)) ? xn.second - : xn.second + 1 - ; - } - template - inline SPROUT_CONSTEXPR int - ctz_bits2(sprout::pair const& xn) SPROUT_NOEXCEPT { - typedef sprout::pair type; - return sprout::detail::ctz_bits1( - (xn.first & Integral(0x3ul)) ? xn - : type(sprout::shlr(xn.first, 2), xn.second + 2) - ); - } - template - inline SPROUT_CONSTEXPR int - ctz_bits4(sprout::pair const& xn) SPROUT_NOEXCEPT { - typedef sprout::pair type; - return sprout::detail::ctz_bits2( - (xn.first & Integral(0xful)) ? xn - : type(sprout::shlr(xn.first, 4), xn.second + 4) - ); - } - template - inline SPROUT_CONSTEXPR int - ctz_bits(sprout::pair const& xn) SPROUT_NOEXCEPT { - return sprout::detail::ctz_bits4(xn); - } - template - inline SPROUT_CONSTEXPR int - ctz_non0(Integral x) SPROUT_NOEXCEPT { - typedef sprout::pair type; - return sprout::detail::ctz_bits(sprout::detail::ctz_bytes(type(x, 0))); - } - template - inline SPROUT_CONSTEXPR int - ctz(Integral x) SPROUT_NOEXCEPT { - return x == 0 ? static_cast(sizeof(x) * CHAR_BIT) - : sprout::detail::ctz_non0(x) - ; - } - } // namespace detail - // - // ctz - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - int - >::type - ctz(Integral x) SPROUT_NOEXCEPT { - return sprout::detail::ctz(x); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_CTZ_HPP diff --git a/dsp/lib/sprout/sprout/bit/flipbit.hpp b/dsp/lib/sprout/sprout/bit/flipbit.hpp deleted file mode 100644 index 425ac28..0000000 --- a/dsp/lib/sprout/sprout/bit/flipbit.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_FLIPBIT_HPP -#define SPROUT_BIT_FLIPBIT_HPP - -#include -#include - -namespace sprout { - // - // flipbit - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - Integral - >::type - flipbit(Integral x, int b) SPROUT_NOEXCEPT { - return x ^ (Integral(1) << b); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_FLIPBIT_HPP diff --git a/dsp/lib/sprout/sprout/bit/flipbitsge.hpp b/dsp/lib/sprout/sprout/bit/flipbitsge.hpp deleted file mode 100644 index 616635e..0000000 --- a/dsp/lib/sprout/sprout/bit/flipbitsge.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_FLIPBITSGE_HPP -#define SPROUT_BIT_FLIPBITSGE_HPP - -#include -#include - -namespace sprout { - // - // flipbitsge - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - Integral - >::type - flipbitsge(Integral x, int b) SPROUT_NOEXCEPT { - return x ^ ~((Integral(1) << b) - 1); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_FLIPBITSGE_HPP diff --git a/dsp/lib/sprout/sprout/bit/flipbitsle.hpp b/dsp/lib/sprout/sprout/bit/flipbitsle.hpp deleted file mode 100644 index e48d0de..0000000 --- a/dsp/lib/sprout/sprout/bit/flipbitsle.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_FLIPBITSLE_HPP -#define SPROUT_BIT_FLIPBITSLE_HPP - -#include -#include - -namespace sprout { - // - // flipbitsle - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - Integral - >::type - flipbitsle(Integral x, int b) SPROUT_NOEXCEPT { - return x ^ ((Integral(1) << (b + 1)) - 1); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_FLIPBITSLE_HPP diff --git a/dsp/lib/sprout/sprout/bit/isols0b.hpp b/dsp/lib/sprout/sprout/bit/isols0b.hpp deleted file mode 100644 index 3c0bc5c..0000000 --- a/dsp/lib/sprout/sprout/bit/isols0b.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_ISOLS0B_HPP -#define SPROUT_BIT_ISOLS0B_HPP - -#include -#include - -namespace sprout { - // - // isols0b - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - Integral - >::type - isols0b(Integral x) SPROUT_NOEXCEPT { - return ~x & (x + 1); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_ISOLS0B_HPP diff --git a/dsp/lib/sprout/sprout/bit/isols1b.hpp b/dsp/lib/sprout/sprout/bit/isols1b.hpp deleted file mode 100644 index 55afd0f..0000000 --- a/dsp/lib/sprout/sprout/bit/isols1b.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_ISOLS1B_HPP -#define SPROUT_BIT_ISOLS1B_HPP - -#include -#include - -namespace sprout { - // - // isols1b - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - Integral - >::type - isols1b(Integral x) SPROUT_NOEXCEPT { - return x & -x; - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_ISOLS1B_HPP diff --git a/dsp/lib/sprout/sprout/bit/length.hpp b/dsp/lib/sprout/sprout/bit/length.hpp deleted file mode 100644 index 50575f8..0000000 --- a/dsp/lib/sprout/sprout/bit/length.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_LENGTH_HPP -#define SPROUT_BIT_LENGTH_HPP - -#include -#include - -#endif // #ifndef SPROUT_BIT_LENGTH_HPP diff --git a/dsp/lib/sprout/sprout/bit/maskt0.hpp b/dsp/lib/sprout/sprout/bit/maskt0.hpp deleted file mode 100644 index 000a0f4..0000000 --- a/dsp/lib/sprout/sprout/bit/maskt0.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_MASKT0_HPP -#define SPROUT_BIT_MASKT0_HPP - -#include -#include - -namespace sprout { - // - // maskt0 - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - Integral - >::type - maskt0(Integral x) SPROUT_NOEXCEPT { - return ~x & (x - 1); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_MASKT0_HPP diff --git a/dsp/lib/sprout/sprout/bit/maskt0ls1b.hpp b/dsp/lib/sprout/sprout/bit/maskt0ls1b.hpp deleted file mode 100644 index dbc5624..0000000 --- a/dsp/lib/sprout/sprout/bit/maskt0ls1b.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_MASKT0LS1B_HPP -#define SPROUT_BIT_MASKT0LS1B_HPP - -#include -#include - -namespace sprout { - // - // maskt0ls1b - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - Integral - >::type - maskt0ls1b(Integral x) SPROUT_NOEXCEPT { - return (x - 1) ^ x; - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_MASKT0LS1B_HPP diff --git a/dsp/lib/sprout/sprout/bit/maskt1.hpp b/dsp/lib/sprout/sprout/bit/maskt1.hpp deleted file mode 100644 index 79213e8..0000000 --- a/dsp/lib/sprout/sprout/bit/maskt1.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_MASKT1_HPP -#define SPROUT_BIT_MASKT1_HPP - -#include -#include - -namespace sprout { - // - // maskt1 - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - Integral - >::type - maskt1(Integral x) SPROUT_NOEXCEPT { - return ~(~x | (x + 1)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_MASKT1_HPP diff --git a/dsp/lib/sprout/sprout/bit/maskt1ls0b.hpp b/dsp/lib/sprout/sprout/bit/maskt1ls0b.hpp deleted file mode 100644 index f5d0c71..0000000 --- a/dsp/lib/sprout/sprout/bit/maskt1ls0b.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_MASKT0LS0B_HPP -#define SPROUT_BIT_MASKT0LS0B_HPP - -#include -#include - -namespace sprout { - // - // maskt1ls0b - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - Integral - >::type - maskt1ls0b(Integral x) SPROUT_NOEXCEPT { - return x ^ (x + 1); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_MASKT0LS0B_HPP diff --git a/dsp/lib/sprout/sprout/bit/operation.hpp b/dsp/lib/sprout/sprout/bit/operation.hpp deleted file mode 100644 index bbb3ebc..0000000 --- a/dsp/lib/sprout/sprout/bit/operation.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_OPERATION_HPP -#define SPROUT_BIT_OPERATION_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_BIT_OPERATION_HPP diff --git a/dsp/lib/sprout/sprout/bit/parity.hpp b/dsp/lib/sprout/sprout/bit/parity.hpp deleted file mode 100644 index 26202e7..0000000 --- a/dsp/lib/sprout/sprout/bit/parity.hpp +++ /dev/null @@ -1,99 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_PARITY_HPP -#define SPROUT_BIT_PARITY_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { -# if SPROUT_USE_BUILTIN_BIT_OPERATION - inline SPROUT_CONSTEXPR int - parity(unsigned x) { - return __builtin_parity(x); - } - inline SPROUT_CONSTEXPR int - parity(unsigned long x) { - return __builtin_parityl(x); - } - inline SPROUT_CONSTEXPR int - parity(unsigned long long x) { - return __builtin_parityll(x); - } -# endif - template - inline SPROUT_CONSTEXPR typename std::enable_if< - (N == 1), - Integral - >::type - parity_bytes(Integral x) SPROUT_NOEXCEPT { - return x; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - (N > 1), - Integral - >::type - parity_bytes(Integral x) SPROUT_NOEXCEPT { - return sprout::detail::parity_bytes( - x ^ sprout::shlr(x, N / 2 * CHAR_BIT) - ); - } - template - inline SPROUT_CONSTEXPR Integral - parity_bytes(Integral x) SPROUT_NOEXCEPT { - return sprout::detail::parity_bytes(x); - } - template - inline SPROUT_CONSTEXPR Integral - parity_bits4(Integral x) SPROUT_NOEXCEPT { - return x ^ sprout::shlr(x, 4); - } - template - inline SPROUT_CONSTEXPR Integral - parity_bits2(Integral x) SPROUT_NOEXCEPT { - return sprout::detail::parity_bits4( - x ^ sprout::shlr(x, 2) - ); - } - template - inline SPROUT_CONSTEXPR Integral - parity_bits1(Integral x) SPROUT_NOEXCEPT { - return sprout::detail::parity_bits2( - x ^ sprout::shlr(x, 1) - ); - } - template - inline SPROUT_CONSTEXPR Integral - parity_bits(Integral x) SPROUT_NOEXCEPT { - return sprout::detail::parity_bits1(x); - } - template - inline SPROUT_CONSTEXPR int - parity(Integral x) { - return static_cast(sprout::detail::parity_bytes(sprout::detail::parity_bits(x))) & 1; - } - } // namespace detail - // - // parity - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - int - >::type - parity(Integral x) { - return sprout::detail::parity(x); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_PARITY_HPP diff --git a/dsp/lib/sprout/sprout/bit/popcount.hpp b/dsp/lib/sprout/sprout/bit/popcount.hpp deleted file mode 100644 index 98c9c67..0000000 --- a/dsp/lib/sprout/sprout/bit/popcount.hpp +++ /dev/null @@ -1,64 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_POPCOUNT_HPP -#define SPROUT_BIT_POPCOUNT_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace detail { -# if SPROUT_USE_BUILTIN_BIT_OPERATION - inline SPROUT_CONSTEXPR int - popcount(unsigned n) { - return __builtin_popcount(n); - } - inline SPROUT_CONSTEXPR int - popcount(unsigned long n) { - return __builtin_popcountl(n); - } - inline SPROUT_CONSTEXPR int - popcount(unsigned long long n) { - return __builtin_popcountll(n); - } -# endif - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_unsigned::value, - int - >::type - popcount(T n) { - return n == 0 ? 0 - : 1 + sprout::detail::popcount(static_cast(n & (n - 1))) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_signed::value, - int - >::type - popcount(T n) { - return sprout::detail::popcount(static_cast::type>(n)); - } - } // namespace detail - // - // popcount - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - int - >::type - popcount(T n) { - return sprout::detail::popcount(n); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_POPCOUNT_HPP diff --git a/dsp/lib/sprout/sprout/bit/range.hpp b/dsp/lib/sprout/sprout/bit/range.hpp deleted file mode 100644 index bb2bfe0..0000000 --- a/dsp/lib/sprout/sprout/bit/range.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_RANGE_HPP -#define SPROUT_BIT_RANGE_HPP - -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_BIT_RANGE_HPP diff --git a/dsp/lib/sprout/sprout/bit/reverse.hpp b/dsp/lib/sprout/sprout/bit/reverse.hpp deleted file mode 100644 index b412f23..0000000 --- a/dsp/lib/sprout/sprout/bit/reverse.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_REVERSE_HPP -#define SPROUT_BIT_REVERSE_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_BIT_REVERSE_HPP diff --git a/dsp/lib/sprout/sprout/bit/rightmost.hpp b/dsp/lib/sprout/sprout/bit/rightmost.hpp deleted file mode 100644 index 6c706fd..0000000 --- a/dsp/lib/sprout/sprout/bit/rightmost.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_RIGHTMOTS_HPP -#define SPROUT_BIT_RIGHTMOTS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_BIT_RIGHTMOTS_HPP diff --git a/dsp/lib/sprout/sprout/bit/rotl.hpp b/dsp/lib/sprout/sprout/bit/rotl.hpp deleted file mode 100644 index ddeeadd..0000000 --- a/dsp/lib/sprout/sprout/bit/rotl.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_ROTL_HPP -#define SPROUT_BIT_ROTL_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // rotl - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - Integral - >::type - rotl(Integral x, int s) SPROUT_NOEXCEPT { - return (x << s) | sprout::shlr(x, sizeof(x) * CHAR_BIT - s); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_ROTL_HPP diff --git a/dsp/lib/sprout/sprout/bit/rotr.hpp b/dsp/lib/sprout/sprout/bit/rotr.hpp deleted file mode 100644 index be5d3ed..0000000 --- a/dsp/lib/sprout/sprout/bit/rotr.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_ROTR_HPP -#define SPROUT_BIT_ROTR_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // rotr - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - Integral - >::type - rotr(Integral x, int s) SPROUT_NOEXCEPT { - return sprout::shlr(x, s) | (x << (sizeof(x) * CHAR_BIT - s)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_ROTR_HPP diff --git a/dsp/lib/sprout/sprout/bit/rstbit.hpp b/dsp/lib/sprout/sprout/bit/rstbit.hpp deleted file mode 100644 index fbc4137..0000000 --- a/dsp/lib/sprout/sprout/bit/rstbit.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_RSTBIT_HPP -#define SPROUT_BIT_RSTBIT_HPP - -#include -#include - -namespace sprout { - // - // rstbit - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - Integral - >::type - rstbit(Integral x, int b) SPROUT_NOEXCEPT { - return x & ~(Integral(1) << b); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_RSTBIT_HPP diff --git a/dsp/lib/sprout/sprout/bit/rstbitsge.hpp b/dsp/lib/sprout/sprout/bit/rstbitsge.hpp deleted file mode 100644 index ef7832e..0000000 --- a/dsp/lib/sprout/sprout/bit/rstbitsge.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_RSTBITSGE_HPP -#define SPROUT_BIT_RSTBITSGE_HPP - -#include -#include - -namespace sprout { - // - // rstbitsge - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - Integral - >::type - rstbitsge(Integral x, int b) SPROUT_NOEXCEPT { - return x & ((Integral(1) << b) - 1); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_RSTBITSGE_HPP diff --git a/dsp/lib/sprout/sprout/bit/rstbitsle.hpp b/dsp/lib/sprout/sprout/bit/rstbitsle.hpp deleted file mode 100644 index 2b9af99..0000000 --- a/dsp/lib/sprout/sprout/bit/rstbitsle.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_SRSTBITSLE_HPP -#define SPROUT_BIT_SRSTBITSLE_HPP - -#include -#include - -namespace sprout { - // - // rstbitsle - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - Integral - >::type - rstbitsle(Integral x, int b) SPROUT_NOEXCEPT { - return x & ~((Integral(1) << (b + 1)) - 1); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_SRSTBITSLE_HPP diff --git a/dsp/lib/sprout/sprout/bit/rstls1b.hpp b/dsp/lib/sprout/sprout/bit/rstls1b.hpp deleted file mode 100644 index 68552c4..0000000 --- a/dsp/lib/sprout/sprout/bit/rstls1b.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_RSTLS1B_HPP -#define SPROUT_BIT_RSTLS1B_HPP - -#include -#include - -namespace sprout { - // - // rstls1b - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - Integral - >::type - rstls1b(Integral x) SPROUT_NOEXCEPT { - return x & (x - 1); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_RSTLS1B_HPP diff --git a/dsp/lib/sprout/sprout/bit/rstt1.hpp b/dsp/lib/sprout/sprout/bit/rstt1.hpp deleted file mode 100644 index 90eb813..0000000 --- a/dsp/lib/sprout/sprout/bit/rstt1.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_RSTT1_HPP -#define SPROUT_BIT_RSTT1_HPP - -#include -#include - -namespace sprout { - // - // rstt1 - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - Integral - >::type - rstt1(Integral x) SPROUT_NOEXCEPT { - return x & (x + 1); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_RSTT1_HPP diff --git a/dsp/lib/sprout/sprout/bit/setbit.hpp b/dsp/lib/sprout/sprout/bit/setbit.hpp deleted file mode 100644 index 7014b80..0000000 --- a/dsp/lib/sprout/sprout/bit/setbit.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_SETBIT_HPP -#define SPROUT_BIT_SETBIT_HPP - -#include -#include - -namespace sprout { - // - // setbit - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - Integral - >::type - setbit(Integral x, int b) SPROUT_NOEXCEPT { - return x | (Integral(1) << b); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_SETBIT_HPP diff --git a/dsp/lib/sprout/sprout/bit/setbitsge.hpp b/dsp/lib/sprout/sprout/bit/setbitsge.hpp deleted file mode 100644 index 56f2f1b..0000000 --- a/dsp/lib/sprout/sprout/bit/setbitsge.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_SETBITSGE_HPP -#define SPROUT_BIT_SETBITSGE_HPP - -#include -#include - -namespace sprout { - // - // setbitsge - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - Integral - >::type - setbitsge(Integral x, int b) SPROUT_NOEXCEPT { - return x | ~((Integral(1) << b) - 1); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_SETBITSGE_HPP diff --git a/dsp/lib/sprout/sprout/bit/setbitsle.hpp b/dsp/lib/sprout/sprout/bit/setbitsle.hpp deleted file mode 100644 index 1961f14..0000000 --- a/dsp/lib/sprout/sprout/bit/setbitsle.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_SETBITSLE_HPP -#define SPROUT_BIT_SETBITSLE_HPP - -#include -#include - -namespace sprout { - // - // setbitsle - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - Integral - >::type - setbitsle(Integral x, int b) SPROUT_NOEXCEPT { - return x | ((Integral(1) << (b + 1)) - 1); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_SETBITSLE_HPP diff --git a/dsp/lib/sprout/sprout/bit/setls0b.hpp b/dsp/lib/sprout/sprout/bit/setls0b.hpp deleted file mode 100644 index abbcd12..0000000 --- a/dsp/lib/sprout/sprout/bit/setls0b.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_RSTLS0B_HPP -#define SPROUT_BIT_RSTLS0B_HPP - -#include -#include - -namespace sprout { - // - // setls0b - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - Integral - >::type - setls0b(Integral x) SPROUT_NOEXCEPT { - return x | (x + 1); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_RSTLS0B_HPP diff --git a/dsp/lib/sprout/sprout/bit/sett0.hpp b/dsp/lib/sprout/sprout/bit/sett0.hpp deleted file mode 100644 index 5f5c357..0000000 --- a/dsp/lib/sprout/sprout/bit/sett0.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_SETT0_HPP -#define SPROUT_BIT_SETT0_HPP - -#include -#include - -namespace sprout { - // - // sett0 - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - Integral - >::type - sett0(Integral x) SPROUT_NOEXCEPT { - return x | (x - 1); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_SETT0_HPP diff --git a/dsp/lib/sprout/sprout/bit/shal.hpp b/dsp/lib/sprout/sprout/bit/shal.hpp deleted file mode 100644 index de6e086..0000000 --- a/dsp/lib/sprout/sprout/bit/shal.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_SHAL_HPP -#define SPROUT_BIT_SHAL_HPP - -#include -#include -#include - -namespace sprout { - // - // shal - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - Integral - >::type - shal(Integral x, int s) SPROUT_NOEXCEPT { - return sprout::shll(x, s); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_SHAL_HPP diff --git a/dsp/lib/sprout/sprout/bit/shar.hpp b/dsp/lib/sprout/sprout/bit/shar.hpp deleted file mode 100644 index 28e388f..0000000 --- a/dsp/lib/sprout/sprout/bit/shar.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_SHAR_HPP -#define SPROUT_BIT_SHAR_HPP - -#include -#include - -namespace sprout { - // - // shar - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - Integral - >::type - shar(Integral x, int s) SPROUT_NOEXCEPT { - typedef typename std::make_signed::type type; - return static_cast(static_cast(x) >> s); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_SHAR_HPP diff --git a/dsp/lib/sprout/sprout/bit/shift.hpp b/dsp/lib/sprout/sprout/bit/shift.hpp deleted file mode 100644 index 9ed4991..0000000 --- a/dsp/lib/sprout/sprout/bit/shift.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_SHIFT_HPP -#define SPROUT_BIT_SHIFT_HPP - -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_BIT_SHIFT_HPP diff --git a/dsp/lib/sprout/sprout/bit/shll.hpp b/dsp/lib/sprout/sprout/bit/shll.hpp deleted file mode 100644 index 5ac5a06..0000000 --- a/dsp/lib/sprout/sprout/bit/shll.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_SHLL_HPP -#define SPROUT_BIT_SHLL_HPP - -#include -#include - -namespace sprout { - // - // shll - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - Integral - >::type - shll(Integral x, int s) SPROUT_NOEXCEPT { - typedef typename std::make_unsigned::type type; - return static_cast(static_cast(x) << s); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_SHLL_HPP diff --git a/dsp/lib/sprout/sprout/bit/shlr.hpp b/dsp/lib/sprout/sprout/bit/shlr.hpp deleted file mode 100644 index 32e08ea..0000000 --- a/dsp/lib/sprout/sprout/bit/shlr.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_SHLR_HPP -#define SPROUT_BIT_SHLR_HPP - -#include -#include - -namespace sprout { - // - // shlr - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - Integral - >::type - shlr(Integral x, int s) SPROUT_NOEXCEPT { - typedef typename std::make_unsigned::type type; - return static_cast(static_cast(x) >> s); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_SHLR_HPP diff --git a/dsp/lib/sprout/sprout/bit/single.hpp b/dsp/lib/sprout/sprout/bit/single.hpp deleted file mode 100644 index 48ebaae..0000000 --- a/dsp/lib/sprout/sprout/bit/single.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_SINGLE_HPP -#define SPROUT_BIT_SINGLE_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_BIT_SINGLE_HPP diff --git a/dsp/lib/sprout/sprout/bit/testbit.hpp b/dsp/lib/sprout/sprout/bit/testbit.hpp deleted file mode 100644 index 1071bab..0000000 --- a/dsp/lib/sprout/sprout/bit/testbit.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BIT_TESTBIT_HPP -#define SPROUT_BIT_TESTBIT_HPP - -#include -#include - -namespace sprout { - // - // testbit - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - bool - >::type - testbit(Integral x, int b) SPROUT_NOEXCEPT { - return x & (Integral(1) << b); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BIT_TESTBIT_HPP diff --git a/dsp/lib/sprout/sprout/bitset.hpp b/dsp/lib/sprout/sprout/bitset.hpp deleted file mode 100644 index 391e10a..0000000 --- a/dsp/lib/sprout/sprout/bitset.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BITSET_HPP -#define SPROUT_BITSET_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_BITSET_HPP diff --git a/dsp/lib/sprout/sprout/bitset/bitset.hpp b/dsp/lib/sprout/sprout/bitset/bitset.hpp deleted file mode 100644 index 06db610..0000000 --- a/dsp/lib/sprout/sprout/bitset/bitset.hpp +++ /dev/null @@ -1,1422 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BITSET_BITSET_HPP -#define SPROUT_BITSET_BITSET_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace detail { - struct base_bitset_from_words_construct_tag {}; - - template - class base_bitset { - public: - typedef unsigned long word_type; - typedef word_type value_type; - typedef sprout::index_iterator iterator; - typedef sprout::index_iterator const_iterator; - typedef value_type& reference; - typedef value_type const& const_reference; - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - SPROUT_STATIC_CONSTEXPR std::size_t static_size = N; - public: - struct are_all_pred { - public: - SPROUT_CONSTEXPR bool - operator()(word_type t) const SPROUT_NOEXCEPT { - return t == ~static_cast(0); - } - }; - struct is_any_pred { - public: - SPROUT_CONSTEXPR bool - operator()(word_type t) const SPROUT_NOEXCEPT { - return t != static_cast(0); - } - }; - struct to_ulong_pred { - public: - SPROUT_CONSTEXPR bool - operator()(word_type t) const SPROUT_NOEXCEPT { - return t != 0; - } - }; - struct count_op { - public: - SPROUT_CONSTEXPR size_type - operator()(size_type lhs, size_type rhs) const SPROUT_NOEXCEPT { - return lhs + sprout::popcount(rhs); - } - }; - public: - static SPROUT_CONSTEXPR size_type - whichword(size_type pos) SPROUT_NOEXCEPT { - return pos / (CHAR_BIT * sprout::detail::sizeof_::value); - } - static SPROUT_CONSTEXPR size_type - whichbyte(size_type pos) SPROUT_NOEXCEPT { - return (pos % (CHAR_BIT * sprout::detail::sizeof_::value)) / CHAR_BIT; - } - static SPROUT_CONSTEXPR size_type - whichbit(size_type pos) SPROUT_NOEXCEPT { - return pos % (CHAR_BIT * sprout::detail::sizeof_::value); - } - static SPROUT_CONSTEXPR word_type - maskbit(size_type pos) SPROUT_NOEXCEPT { - return (static_cast(1)) << whichbit(pos); - } - private: - word_type w_[N]; - private: - SPROUT_CONSTEXPR size_type - find_first_impl( - size_type not_found, const_iterator first, const_iterator last, - size_type i = 0 - ) const SPROUT_NOEXCEPT - { - return first == last ? not_found - : *first != static_cast(0) - ? i * (CHAR_BIT * sprout::detail::sizeof_::value) + sprout::ctz(*first) - : find_first_impl(not_found, first + 1, last, i + 1) - ; - } - SPROUT_CONSTEXPR size_type - find_next_impl_2( - size_type not_found, const_iterator first, const_iterator last, - size_type i - ) const SPROUT_NOEXCEPT - { - return first == last ? not_found - : *first != static_cast(0) - ? i * (CHAR_BIT * sprout::detail::sizeof_::value) + sprout::ctz(*first) - : find_next_impl_2(not_found, first + 1, last) - ; - } - SPROUT_CONSTEXPR size_type - find_next_impl_1(size_type not_found, size_type i, word_type thisword) const SPROUT_NOEXCEPT { - return thisword != static_cast(0) - ? i * (CHAR_BIT * sprout::detail::sizeof_::value) + sprout::ctz(thisword) - : find_next_impl_2(not_found, begin() + (i + 1), end(), i + 1) - ; - } - SPROUT_CONSTEXPR size_type - find_next_impl(size_type prev, size_type not_found, size_type i) const SPROUT_NOEXCEPT { - return find_next_impl_1(not_found, i, w_[i] & ~static_cast(0) << whichbit(prev)); - } - template - SPROUT_CONSTEXPR base_bitset - do_left_shift_impl_2( - size_type wshift, size_type offset, size_type sub_offset, - sprout::index_tuple - ) const SPROUT_NOEXCEPT - { - return base_bitset( - sprout::detail::base_bitset_from_words_construct_tag(), - (sprout::math::greater(Indexes, wshift) - ? (w_[Indexes - wshift] << offset) | (w_[Indexes - wshift - 1] >> sub_offset) - : Indexes == wshift ? w_[0] << offset - : static_cast(0) - )... - ); - } - template - SPROUT_CONSTEXPR base_bitset - do_left_shift_impl_1( - size_type wshift, size_type, - sprout::index_tuple - ) const SPROUT_NOEXCEPT - { - return base_bitset( - sprout::detail::base_bitset_from_words_construct_tag(), - (sprout::math::greater_equal(Indexes, wshift) ? w_[Indexes - wshift] - : static_cast(0) - )... - ); - } - SPROUT_CONSTEXPR base_bitset - do_left_shift_impl(size_type wshift, size_type offset) const SPROUT_NOEXCEPT { - return offset == 0 - ? do_left_shift_impl_1( - wshift, offset, - sprout::make_index_tuple::make() - ) - : do_left_shift_impl_2( - wshift, offset, (CHAR_BIT * sprout::detail::sizeof_::value) - offset, - sprout::make_index_tuple::make() - ) - ; - } - template - SPROUT_CONSTEXPR base_bitset - do_right_shift_impl_2( - size_type wshift, size_type offset, size_type limit, size_type sub_offset, - sprout::index_tuple - ) const SPROUT_NOEXCEPT - { - return base_bitset( - sprout::detail::base_bitset_from_words_construct_tag(), - (sprout::math::less(Indexes, limit) - ? (w_[Indexes + wshift] >> offset) | (w_[Indexes + wshift + 1] << sub_offset) - : Indexes == limit ? w_[N-1] >> offset - : static_cast(0) - )... - ); - } - template - SPROUT_CONSTEXPR base_bitset - do_right_shift_impl_1( - size_type wshift, size_type, size_type limit, - sprout::index_tuple - ) const SPROUT_NOEXCEPT - { - return base_bitset( - sprout::detail::base_bitset_from_words_construct_tag(), - (sprout::math::less_equal(Indexes, limit) ? w_[Indexes + wshift] - : static_cast(0) - )... - ) - ; - } - SPROUT_CONSTEXPR base_bitset - do_right_shift_impl(size_type wshift, size_type offset, size_type limit) const SPROUT_NOEXCEPT { - return offset == 0 - ? do_right_shift_impl_1( - wshift, offset, limit, - sprout::make_index_tuple::make() - ) - : do_right_shift_impl_2( - wshift, offset, limit, (CHAR_BIT * sprout::detail::sizeof_::value) - offset, - sprout::make_index_tuple::make() - ) - ; - } - public: - SPROUT_CONSTEXPR base_bitset() SPROUT_NOEXCEPT - : w_() - {} - base_bitset(base_bitset const&) = default; - SPROUT_CONSTEXPR base_bitset(unsigned long long val) SPROUT_NOEXCEPT - : w_{word_type(val), word_type(val >> (CHAR_BIT * sprout::detail::sizeof_::value))} - {} - template - SPROUT_CONSTEXPR base_bitset(sprout::detail::base_bitset_from_words_construct_tag, Words... words) - : w_{words...} - {} - SPROUT_CXX14_CONSTEXPR base_bitset& operator=(base_bitset const& rhs) { - sprout::copy(rhs.w_ + 0, rhs.w_ + N, w_ + 0); - return *this; - } - SPROUT_CXX14_CONSTEXPR base_bitset& operator=(base_bitset&& rhs) { - sprout::move(rhs.w_ + 0, rhs.w_ + N, w_ + 0); - return *this; - } - - SPROUT_CXX14_CONSTEXPR void - setword(size_type pos, word_type word) SPROUT_NOEXCEPT { - w_[whichword(pos)] = word; - } - SPROUT_CONSTEXPR base_bitset - setword(size_type pos, word_type word) const SPROUT_NOEXCEPT { - return sprout::fixed::set(*this, whichword(pos), word); - } - SPROUT_CONSTEXPR base_bitset - hiword(word_type word) const SPROUT_NOEXCEPT { - return sprout::fixed::set(*this, N - 1, word); - } - - SPROUT_CXX14_CONSTEXPR word_type& - getword(size_type pos) SPROUT_NOEXCEPT { - return w_[whichword(pos)]; - } - SPROUT_CONSTEXPR word_type - getword(size_type pos) const SPROUT_NOEXCEPT { - return w_[whichword(pos)]; - } - SPROUT_CONSTEXPR word_type const* - getdata() const SPROUT_NOEXCEPT { - return w_; - } - SPROUT_CXX14_CONSTEXPR word_type& - hiword() SPROUT_NOEXCEPT { - return w_[N - 1]; - } - SPROUT_CONSTEXPR word_type - hiword() const SPROUT_NOEXCEPT { - return w_[N - 1]; - } - - SPROUT_CXX14_CONSTEXPR void - do_and(base_bitset const& x) SPROUT_NOEXCEPT { - for (size_type i = 0; i < N; i++) { - w_[i] &= x.w_[i]; - } - } - SPROUT_CONSTEXPR base_bitset - do_and(base_bitset const& x) const SPROUT_NOEXCEPT { - return sprout::fixed::transform( - begin(), end(), x.begin(), *this, NS_SSCRISK_CEL_OR_SPROUT::bit_and() - ); - } - SPROUT_CXX14_CONSTEXPR void - do_or(base_bitset const& x) SPROUT_NOEXCEPT { - for (size_type i = 0; i < N; i++) { - w_[i] |= x.w_[i]; - } - } - SPROUT_CONSTEXPR base_bitset - do_or(base_bitset const& x) const SPROUT_NOEXCEPT { - return sprout::fixed::transform( - begin(), end(), x.begin(), *this, NS_SSCRISK_CEL_OR_SPROUT::bit_or() - ); - } - SPROUT_CXX14_CONSTEXPR void - do_xor(base_bitset const& x) SPROUT_NOEXCEPT { - for (size_type i = 0; i < N; i++) { - w_[i] ^= x.w_[i]; - } - } - SPROUT_CONSTEXPR base_bitset - do_xor(base_bitset const& x) const SPROUT_NOEXCEPT { - return sprout::fixed::transform( - begin(), end(), x.begin(), *this, NS_SSCRISK_CEL_OR_SPROUT::bit_xor() - ); - } - SPROUT_CXX14_CONSTEXPR void - do_left_shift(size_type shift) SPROUT_NOEXCEPT { - if (shift != 0) { - size_type const wshift = shift / (CHAR_BIT * sprout::detail::sizeof_::value); - size_type const offset = shift % (CHAR_BIT * sprout::detail::sizeof_::value); - if (offset == 0) { - for (size_type n = N - 1; n >= wshift; --n) { - w_[n] = w_[n - wshift]; - } - } else { - size_type const sub_offset = (CHAR_BIT * sprout::detail::sizeof_::value) - offset; - for (size_type n = N - 1; n > wshift; --n) { - w_[n] = (w_[n - wshift] << offset) | (w_[n - wshift - 1] >> sub_offset); - } - w_[wshift] = w_[0] << offset; - } - sprout::fill(w_ + 0, w_ + wshift, static_cast(0)); - } - } - SPROUT_CONSTEXPR base_bitset - do_left_shift(size_type shift) const SPROUT_NOEXCEPT { - return shift != 0 ? do_left_shift_impl( - shift / (CHAR_BIT * sprout::detail::sizeof_::value), - shift % (CHAR_BIT * sprout::detail::sizeof_::value) - ) - : *this - ; - } - SPROUT_CXX14_CONSTEXPR void - do_right_shift(size_type shift) SPROUT_NOEXCEPT { - if (shift != 0) { - size_type const wshift = shift / (CHAR_BIT * sprout::detail::sizeof_::value); - size_type const offset = shift % (CHAR_BIT * sprout::detail::sizeof_::value); - size_type const limit = N - wshift - 1; - if (offset == 0) { - for (size_type n = 0; n <= limit; ++n) { - w_[n] = w_[n + wshift]; - } - } else { - size_type const sub_offset = (CHAR_BIT * sprout::detail::sizeof_::value) - offset; - for (size_type n = 0; n < limit; ++n) { - w_[n] = (w_[n + wshift] >> offset) | (w_[n + wshift + 1] << sub_offset); - } - w_[limit] = w_[N-1] >> offset; - } - sprout::fill(w_ + limit + 1, w_ + N, static_cast(0)); - } - } - SPROUT_CONSTEXPR base_bitset - do_right_shift(size_type shift) const SPROUT_NOEXCEPT { - return shift != 0 ? do_right_shift_impl( - shift / (CHAR_BIT * sprout::detail::sizeof_::value), - shift % (CHAR_BIT * sprout::detail::sizeof_::value), - N - shift / (CHAR_BIT * sprout::detail::sizeof_::value) - 1 - ) - : *this - ; - } - SPROUT_CXX14_CONSTEXPR void - do_flip() SPROUT_NOEXCEPT { - for (size_type i = 0; i < N; i++) { - w_[i] = ~w_[i]; - } - } - SPROUT_CONSTEXPR base_bitset - do_flip() const SPROUT_NOEXCEPT { - return sprout::fixed::transform( - begin(), end(), *this, NS_SSCRISK_CEL_OR_SPROUT::bit_not() - ); - } - SPROUT_CONSTEXPR base_bitset - do_set() const SPROUT_NOEXCEPT { - return sprout::fixed::fill(*this, ~static_cast(0)); - } - SPROUT_CXX14_CONSTEXPR void - do_set() SPROUT_NOEXCEPT { - for (size_type i = 0; i < N; i++) { - w_[i] = ~static_cast(0); - } - } - SPROUT_CONSTEXPR base_bitset - do_reset() const SPROUT_NOEXCEPT { - return base_bitset(); - } - SPROUT_CXX14_CONSTEXPR void - do_reset() SPROUT_NOEXCEPT { - sprout::fill(w_ + 0, w_ + N, static_cast(0)); - } - - SPROUT_CONSTEXPR bool - is_equal(base_bitset const& x) const SPROUT_NOEXCEPT { - return sprout::equal(begin(), end(), x.begin()); - } - template - SPROUT_CONSTEXPR bool - are_all() const SPROUT_NOEXCEPT { - return sprout::all_of(begin(), end() - 1, are_all_pred()) - && hiword() == (~static_cast(0) >> (N * (CHAR_BIT * sprout::detail::sizeof_::value) - N2)) - ; - } - SPROUT_CONSTEXPR bool - is_any() const SPROUT_NOEXCEPT { - return sprout::any_of(begin(), end(), is_any_pred()); - } - SPROUT_CONSTEXPR size_type - do_count() const SPROUT_NOEXCEPT { - return sprout::accumulate(begin(), end(), static_cast(0), count_op()); - } - - SPROUT_CONSTEXPR unsigned long - do_to_ulong() const { - return sprout::find_if(begin() + 1, end(), to_ulong_pred()) != end() - ? throw std::overflow_error("base_bitset::do_to_ulong") - : w_[0] - ; - } - SPROUT_CONSTEXPR unsigned long long - do_to_ullong() const { - return sprout::find_if( - sprout::detail::sizeof_::value > sprout::detail::sizeof_::value ? begin() + 2 - : begin() + 1 - , - end(), - to_ulong_pred() - ) != end() - ? throw std::overflow_error("base_bitset::to_ullong") - : sprout::detail::sizeof_::value > sprout::detail::sizeof_::value - ? w_[0] + (static_cast(w_[1]) << (CHAR_BIT * sizeof(unsigned long))) - : w_[0] - ; - } - - SPROUT_CONSTEXPR size_type - find_first(size_type not_found) const SPROUT_NOEXCEPT { - return find_first_impl(not_found, begin(), end()); - } - SPROUT_CONSTEXPR size_type - find_next(size_type prev, size_type not_found) const SPROUT_NOEXCEPT { - return prev + 1 >= N * (CHAR_BIT * sprout::detail::sizeof_::value) ? not_found - : find_next_impl(prev + 1, not_found, whichword(prev + 1)); - ; - } - - SPROUT_CONSTEXPR size_type do_to_hash() const { - return sprout::hash_range(*this); - } - - SPROUT_CXX14_CONSTEXPR word_type& operator[](size_type i) { - return w_[i]; - } - SPROUT_CONSTEXPR word_type const& operator[](size_type i) const { - return w_[i]; - } - SPROUT_CXX14_CONSTEXPR iterator begin() SPROUT_NOEXCEPT { - return iterator(*this, 0); - } - SPROUT_CONSTEXPR const_iterator begin() const SPROUT_NOEXCEPT { - return const_iterator(*this, 0); - } - SPROUT_CXX14_CONSTEXPR iterator end() SPROUT_NOEXCEPT { - return iterator(*this, N); - } - SPROUT_CONSTEXPR const_iterator end() const SPROUT_NOEXCEPT { - return const_iterator(*this, N); - } - }; - - template<> - class base_bitset<1> { - public: - typedef unsigned long word_type; - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - private: - word_type w_; - public: - static SPROUT_CONSTEXPR size_type - whichword(size_type pos) SPROUT_NOEXCEPT { - return pos / (CHAR_BIT * sprout::detail::sizeof_::value); - } - static SPROUT_CONSTEXPR size_type - whichbyte(size_type pos) SPROUT_NOEXCEPT { - return (pos % (CHAR_BIT * sprout::detail::sizeof_::value)) / CHAR_BIT; - } - static SPROUT_CONSTEXPR size_type - whichbit(size_type pos) SPROUT_NOEXCEPT { - return pos % (CHAR_BIT * sprout::detail::sizeof_::value); - } - static SPROUT_CONSTEXPR word_type - maskbit(size_type pos) SPROUT_NOEXCEPT { - return (static_cast(1)) << whichbit(pos); - } - private: - SPROUT_CONSTEXPR size_type - find_next_impl(size_type prev, size_type not_found, word_type x) const SPROUT_NOEXCEPT { - return x != 0 ? sprout::ctz(x) + prev - : not_found - ; - } - public: - SPROUT_CONSTEXPR base_bitset() SPROUT_NOEXCEPT - : w_(0) - {} - base_bitset(base_bitset<1> const&) = default; - SPROUT_CONSTEXPR base_bitset(unsigned long long val) SPROUT_NOEXCEPT - : w_(static_cast(val)) - {} - SPROUT_CONSTEXPR base_bitset(sprout::detail::base_bitset_from_words_construct_tag, word_type word) - : w_(word) - {} - SPROUT_CXX14_CONSTEXPR base_bitset<1>& operator=(base_bitset<1> const& rhs) { - w_ = rhs.w_; - return *this; - } - SPROUT_CXX14_CONSTEXPR base_bitset<1>& operator=(base_bitset<1>&& rhs) { - w_ = sprout::move(rhs.w_); - return *this; - } - - SPROUT_CXX14_CONSTEXPR void - setword(size_type, word_type word) SPROUT_NOEXCEPT { - w_ = word; - } - SPROUT_CONSTEXPR base_bitset<1> - setword(size_type, word_type word) const SPROUT_NOEXCEPT { - return base_bitset(sprout::detail::base_bitset_from_words_construct_tag(), word); - } - SPROUT_CONSTEXPR base_bitset<1> - hiword(word_type word) const SPROUT_NOEXCEPT { - return base_bitset(sprout::detail::base_bitset_from_words_construct_tag(), word); - } - - SPROUT_CXX14_CONSTEXPR word_type& - getword(size_type) SPROUT_NOEXCEPT { - return w_; - } - SPROUT_CONSTEXPR word_type - getword(size_type) const SPROUT_NOEXCEPT { - return w_; - } - SPROUT_CONSTEXPR word_type const* - getdata() const SPROUT_NOEXCEPT { - return &w_; - } - SPROUT_CXX14_CONSTEXPR word_type& - hiword() SPROUT_NOEXCEPT { - return w_; - } - SPROUT_CONSTEXPR word_type - hiword() const SPROUT_NOEXCEPT { - return w_; - } - - SPROUT_CXX14_CONSTEXPR void - do_and(base_bitset<1> const& x) SPROUT_NOEXCEPT { - w_ &= x.w_; - } - SPROUT_CONSTEXPR base_bitset<1> - do_and(base_bitset<1> const& x) const SPROUT_NOEXCEPT { - return base_bitset<1>(w_ & x.w_); - } - SPROUT_CXX14_CONSTEXPR void - do_or(base_bitset<1> const& x) SPROUT_NOEXCEPT { - w_ |= x.w_; - } - SPROUT_CONSTEXPR base_bitset<1> - do_or(base_bitset<1> const& x) const SPROUT_NOEXCEPT { - return base_bitset<1>(w_ | x.w_); - } - SPROUT_CXX14_CONSTEXPR void - do_xor(base_bitset<1> const& x) SPROUT_NOEXCEPT { - w_ ^= x.w_; - } - SPROUT_CONSTEXPR base_bitset<1> - do_xor(base_bitset<1> const& x) const SPROUT_NOEXCEPT { - return base_bitset<1>(w_ ^ x.w_); - } - SPROUT_CXX14_CONSTEXPR void - do_left_shift(size_type shift) SPROUT_NOEXCEPT { - w_ <<= shift; - } - SPROUT_CONSTEXPR base_bitset<1> - do_left_shift(base_bitset<1> const& x) const SPROUT_NOEXCEPT { - return base_bitset<1>(w_ << x.w_); - } - SPROUT_CXX14_CONSTEXPR void - do_right_shift(size_type shift) SPROUT_NOEXCEPT { - w_ >>= shift; - } - SPROUT_CONSTEXPR base_bitset<1> - do_right_shift(base_bitset<1> const& x) const SPROUT_NOEXCEPT { - return base_bitset<1>(w_ >> x.w_); - } - SPROUT_CXX14_CONSTEXPR void - do_flip() SPROUT_NOEXCEPT { - w_ = ~w_; - } - SPROUT_CONSTEXPR base_bitset<1> - do_flip() const SPROUT_NOEXCEPT { - return base_bitset<1>(~w_); - } - SPROUT_CXX14_CONSTEXPR void - do_set() SPROUT_NOEXCEPT { - w_ = ~static_cast(0); - } - SPROUT_CONSTEXPR base_bitset<1> - do_set() const SPROUT_NOEXCEPT { - return base_bitset<1>(~static_cast(0)); - } - SPROUT_CXX14_CONSTEXPR void - do_reset() SPROUT_NOEXCEPT { - w_ = 0; - } - SPROUT_CONSTEXPR base_bitset<1> - do_reset() const SPROUT_NOEXCEPT { - return base_bitset<1>(0); - } - - SPROUT_CONSTEXPR bool - is_equal(base_bitset<1> const& x) const SPROUT_NOEXCEPT { - return w_ == x.w_; - } - template - SPROUT_CONSTEXPR bool - are_all() const SPROUT_NOEXCEPT { - return w_ == ~static_cast(0) >> ((CHAR_BIT * sizeof(unsigned long)) - N2); - } - SPROUT_CONSTEXPR bool - is_any() const SPROUT_NOEXCEPT { - return w_ != 0; - } - SPROUT_CONSTEXPR size_type - do_count() const SPROUT_NOEXCEPT { - return sprout::popcount(w_); - } - - SPROUT_CONSTEXPR unsigned long - do_to_ulong() const SPROUT_NOEXCEPT { - return w_; - } - SPROUT_CONSTEXPR unsigned long long - do_to_ullong() const SPROUT_NOEXCEPT { - return w_; - } - - SPROUT_CONSTEXPR size_type - find_first(size_type not_found) const SPROUT_NOEXCEPT { - return w_ != 0 ? sprout::ctz(w_) - : not_found - ; - } - SPROUT_CONSTEXPR size_type - find_next(size_type prev, size_type not_found) const SPROUT_NOEXCEPT { - return prev + 1 >= static_cast(CHAR_BIT * sprout::detail::sizeof_::value) ? not_found - : find_next_impl(prev + 1, not_found, w_ >> (prev + 1)) - ; - } - - SPROUT_CONSTEXPR size_type do_to_hash() const { - return sprout::to_hash(w_); - } - }; - - template<> - class base_bitset<0> { - public: - typedef unsigned long word_type; - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - public: - static SPROUT_CONSTEXPR size_type - whichword(size_type pos) SPROUT_NOEXCEPT { - return pos / (CHAR_BIT * sprout::detail::sizeof_::value); - } - - static SPROUT_CONSTEXPR size_type - whichbyte(size_type pos) SPROUT_NOEXCEPT { - return (pos % (CHAR_BIT * sprout::detail::sizeof_::value)) / CHAR_BIT; - } - - static SPROUT_CONSTEXPR size_type - whichbit(size_type pos) SPROUT_NOEXCEPT { - return pos % (CHAR_BIT * sprout::detail::sizeof_::value); - } - - static SPROUT_CONSTEXPR word_type - maskbit(size_type pos) SPROUT_NOEXCEPT { - return (static_cast(1)) << whichbit(pos); - } - public: - SPROUT_CONSTEXPR base_bitset() SPROUT_NOEXCEPT {} - base_bitset(base_bitset<0> const&) = default; - SPROUT_CONSTEXPR base_bitset(unsigned long long) SPROUT_NOEXCEPT {} - SPROUT_CONSTEXPR base_bitset(sprout::detail::base_bitset_from_words_construct_tag) {} - SPROUT_CXX14_CONSTEXPR base_bitset<0>& operator=(base_bitset<0> const&) SPROUT_NOEXCEPT { - return *this; - } - SPROUT_CXX14_CONSTEXPR base_bitset<0>& operator=(base_bitset<0>&&) SPROUT_NOEXCEPT { - return *this; - } - - SPROUT_CXX14_CONSTEXPR void - setword(size_type, word_type) SPROUT_NOEXCEPT {} - SPROUT_CONSTEXPR base_bitset<0> - setword(size_type, word_type) const SPROUT_NOEXCEPT { - return *this; - } - SPROUT_CONSTEXPR base_bitset<0> - hiword(word_type) const SPROUT_NOEXCEPT { - return *this; - } - - SPROUT_CXX14_CONSTEXPR word_type - getword(size_type, bool c = false) SPROUT_NOEXCEPT { - return SPROUT_ASSERT_MSG(!c, "base_bitset::getword"), - 0 - ; - } - SPROUT_CONSTEXPR word_type - getword(size_type) const SPROUT_NOEXCEPT { - return 0; - } - SPROUT_CONSTEXPR word_type - hiword() const SPROUT_NOEXCEPT { - return 0; - } - - SPROUT_CXX14_CONSTEXPR void - do_and(base_bitset<0> const&) SPROUT_NOEXCEPT {} - SPROUT_CONSTEXPR base_bitset<0> - do_and(base_bitset<0> const&) const SPROUT_NOEXCEPT { - return *this; - } - SPROUT_CXX14_CONSTEXPR void - do_or(base_bitset<0> const&) SPROUT_NOEXCEPT {} - SPROUT_CONSTEXPR base_bitset<0> - do_or(base_bitset<0> const&) const SPROUT_NOEXCEPT { - return *this; - } - SPROUT_CXX14_CONSTEXPR void - do_xor(base_bitset<0> const&) SPROUT_NOEXCEPT {} - SPROUT_CONSTEXPR base_bitset<0> - do_xor(base_bitset<0> const&) const SPROUT_NOEXCEPT { - return *this; - } - SPROUT_CXX14_CONSTEXPR void - do_left_shift(size_type) SPROUT_NOEXCEPT {} - SPROUT_CONSTEXPR base_bitset<0> - do_left_shift(base_bitset<0> const&) const SPROUT_NOEXCEPT { - return *this; - } - SPROUT_CXX14_CONSTEXPR void - do_right_shift(size_type) SPROUT_NOEXCEPT {} - SPROUT_CONSTEXPR base_bitset<0> - do_right_shift(base_bitset<0> const&) const SPROUT_NOEXCEPT { - return *this; - } - SPROUT_CXX14_CONSTEXPR void - do_flip() SPROUT_NOEXCEPT {} - SPROUT_CONSTEXPR base_bitset<0> - do_flip() const SPROUT_NOEXCEPT { - return *this; - } - SPROUT_CXX14_CONSTEXPR void - do_set() SPROUT_NOEXCEPT {} - SPROUT_CONSTEXPR base_bitset<0> - do_set() const SPROUT_NOEXCEPT { - return base_bitset<0>(); - } - SPROUT_CXX14_CONSTEXPR void - do_reset() SPROUT_NOEXCEPT {} - SPROUT_CONSTEXPR base_bitset<0> - do_reset() const SPROUT_NOEXCEPT { - return base_bitset<0>(); - } - - SPROUT_CONSTEXPR bool - is_equal(base_bitset<0> const&) const SPROUT_NOEXCEPT { - return true; - } - template - SPROUT_CONSTEXPR bool - are_all() const SPROUT_NOEXCEPT { - return true; - } - SPROUT_CONSTEXPR bool - is_any() const SPROUT_NOEXCEPT { - return false; - } - SPROUT_CONSTEXPR size_type - do_count() const SPROUT_NOEXCEPT { - return 0; - } - - SPROUT_CONSTEXPR unsigned long - do_to_ulong() const SPROUT_NOEXCEPT { - return 0; - } - SPROUT_CONSTEXPR unsigned long long - do_to_ullong() const SPROUT_NOEXCEPT { - return 0; - } - - SPROUT_CONSTEXPR size_type - find_first(size_type) const SPROUT_NOEXCEPT { - return 0; - } - SPROUT_CONSTEXPR size_type - find_next(size_type, size_type) const SPROUT_NOEXCEPT { - return 0; - } - - SPROUT_CONSTEXPR size_type do_to_hash() const { - return 0; - } - }; - - template - struct sanitize { - public: - typedef unsigned long word_type; - public: - static SPROUT_CXX14_CONSTEXPR void - do_sanitize(word_type& val) SPROUT_NOEXCEPT { - val &= ~(~static_cast(0) << Extrabits); - } - static SPROUT_CONSTEXPR word_type - do_sanitize_c(word_type val) SPROUT_NOEXCEPT { - return val & ~(~static_cast(0) << Extrabits); - } - }; - template<> - struct sanitize<0> { - public: - typedef unsigned long word_type; - public: - static SPROUT_CXX14_CONSTEXPR void - do_sanitize(word_type) SPROUT_NOEXCEPT {} - static SPROUT_CONSTEXPR word_type - do_sanitize_c(word_type val) SPROUT_NOEXCEPT { - return val; - } - }; - - template::value))> - struct sanitize_val { - public: - static SPROUT_CONSTEXPR unsigned long long - do_sanitize_val(unsigned long long val) { - return val; - } - }; - template - struct sanitize_val { - public: - static SPROUT_CONSTEXPR unsigned long long - do_sanitize_val(unsigned long long val) { - return val & ~((~static_cast(0)) << N2); - } - }; - } // namespace detail - - template - struct container_construct_traits > { - public: - typedef sprout::detail::base_bitset copied_type; - public: - template - static SPROUT_CONSTEXPR copied_type deep_copy(Cont&& cont) { - return SPROUT_FORWARD(Cont, cont); - } - template - static SPROUT_CONSTEXPR copied_type make(Args&&... args) { - return copied_type(sprout::detail::base_bitset_from_words_construct_tag(), args...); - } - template - static SPROUT_CONSTEXPR copied_type remake( - Cont&&, - typename sprout::container_traits >::difference_type, - Args&&... args - ) - { - return make(args...); - } - }; - - template - class bitset; - - template - inline SPROUT_CONSTEXPR bitset - operator&(sprout::bitset const& lhs, sprout::bitset const& rhs) SPROUT_NOEXCEPT; - template - inline SPROUT_CONSTEXPR bitset - operator|(sprout::bitset const& lhs, sprout::bitset const& rhs) SPROUT_NOEXCEPT; - template - inline SPROUT_CONSTEXPR bitset - operator^(sprout::bitset const& lhs, sprout::bitset const& rhs) SPROUT_NOEXCEPT; - template - inline SPROUT_NON_CONSTEXPR std::basic_istream& - operator>>(std::basic_istream& lhs, sprout::bitset& rhs); - template - inline SPROUT_NON_CONSTEXPR std::basic_ostream& - operator<<(std::basic_ostream& lhs, sprout::bitset const& rhs); - - template - inline SPROUT_CONSTEXPR std::size_t - hash_value(sprout::bitset const& v); - - // - // bitset - // - template - class bitset - : private sprout::detail::base_bitset< - N / (CHAR_BIT * sprout::detail::sizeof_::value) + (N % (CHAR_BIT * sprout::detail::sizeof_::value) == 0 ? 0 : 1) - > - { - private: - typedef sprout::detail::base_bitset< - N / (CHAR_BIT * sprout::detail::sizeof_::value) + (N % (CHAR_BIT * sprout::detail::sizeof_::value) == 0 ? 0 : 1) - > base_type; - typedef unsigned long word_type; - public: - typedef std::size_t size_type; - typedef bool value_type; - public: - class reference { - friend class bitset; - private: - word_type* wp_; - size_type bpos_; - private: - reference() SPROUT_DELETED_FUNCTION_DECL - public: - SPROUT_CONSTEXPR reference(bitset& b, size_type pos) SPROUT_NOEXCEPT - : wp_(&b.getword(pos)) - , bpos_(base_type::whichbit(pos)) - {} - - SPROUT_CXX14_CONSTEXPR reference& - operator=(value_type x) SPROUT_NOEXCEPT { - if (x) { - *wp_ |= base_type::maskbit(bpos_); - } else { - *wp_ &= ~base_type::maskbit(bpos_); - } - return *this; - } - SPROUT_CXX14_CONSTEXPR reference& - operator=(const reference& j) SPROUT_NOEXCEPT { - if ((*(j.wp_) & base_type::maskbit(j.bpos_))) { - *wp_ |= base_type::maskbit(bpos_); - } else { - *wp_ &= ~base_type::maskbit(bpos_); - } - return *this; - } - - SPROUT_CONSTEXPR value_type - operator~() const SPROUT_NOEXCEPT { - return (*wp_ & base_type::maskbit(bpos_)) == 0; - } - SPROUT_CONSTEXPR - operator value_type() const SPROUT_NOEXCEPT { - return (*wp_ & base_type::maskbit(bpos_)) != 0; - } - SPROUT_CXX14_CONSTEXPR reference& - flip() SPROUT_NOEXCEPT { - *wp_ ^= base_type::maskbit(bpos_); - return *this; - } - }; - friend class reference; - private: - explicit SPROUT_CONSTEXPR bitset(base_type const& base) SPROUT_NOEXCEPT - : base_type(base) - {} - - SPROUT_CXX14_CONSTEXPR void - do_sanitize() SPROUT_NOEXCEPT { - typedef sprout::detail::sanitize::value)> sanitize_type; - sanitize_type::do_sanitize(this->hiword()); - } - SPROUT_CONSTEXPR bitset - do_sanitize() const SPROUT_NOEXCEPT { - typedef sprout::detail::sanitize::value)> sanitize_type; - return bitset(this->hiword(sanitize_type::do_sanitize_c(this->hiword()))); - } - SPROUT_CONSTEXPR bitset - do_sanitize_c() const SPROUT_NOEXCEPT { - return do_sanitize(); - } - - SPROUT_CXX14_CONSTEXPR bitset& - unchecked_set(size_type pos) SPROUT_NOEXCEPT { - this->getword(pos) |= base_type::maskbit(pos); - return *this; - } - SPROUT_CONSTEXPR bitset - unchecked_set(size_type pos) const SPROUT_NOEXCEPT { - return bitset(this->setword(pos, this->getword(pos) | base_type::maskbit(pos))); - } - SPROUT_CXX14_CONSTEXPR bitset& - unchecked_set(size_type pos, int val) SPROUT_NOEXCEPT { - if (val) { - this->getword(pos) |= base_type::maskbit(pos); - } else { - this->getword(pos) &= ~base_type::maskbit(pos); - } - return *this; - } - SPROUT_CONSTEXPR bitset - unchecked_set(size_type pos, int val) const SPROUT_NOEXCEPT { - return val ? bitset(this->setword(pos, this->getword(pos) | base_type::maskbit(pos))) - : bitset(this->setword(pos, this->getword(pos) & ~base_type::maskbit(pos))) - ; - } - SPROUT_CXX14_CONSTEXPR bitset& - unchecked_reset(size_type pos) SPROUT_NOEXCEPT { - this->getword(pos) &= ~base_type::maskbit(pos); - return *this; - } - SPROUT_CONSTEXPR bitset - unchecked_reset(size_type pos) const SPROUT_NOEXCEPT { - return bitset(this->setword(pos, this->getword(pos) & ~base_type::maskbit(pos))); - } - SPROUT_CXX14_CONSTEXPR bitset& - unchecked_flip(size_type pos) SPROUT_NOEXCEPT { - this->getword(pos) ^= base_type::maskbit(pos); - return *this; - } - SPROUT_CONSTEXPR bitset - unchecked_flip(size_type pos) const SPROUT_NOEXCEPT { - return bitset(this->setword(pos, this->getword(pos) ^ base_type::maskbit(pos))); - } - SPROUT_CONSTEXPR value_type - unchecked_test(size_type pos) const SPROUT_NOEXCEPT { - return (this->getword(pos) & base_type::maskbit(pos)) != static_cast(0); - } - - template - SPROUT_CXX14_CONSTEXPR void - copy_from_ptr(Char const* s, size_type len, size_type pos, size_type n, Char zero, Char one) { - reset(); - size_type const nbits = std::min(N, std::min(n, len - pos)); - for (size_type i = nbits; i > 0; --i) { - Char const c = s[pos + nbits - i]; - if (Traits::eq(c, zero)) { - } else if (Traits::eq(c, one)) { - unchecked_set(i - 1); - } else { - throw std::invalid_argument("bitset::copy_from_ptr"); - } - } - } - template - SPROUT_NON_CONSTEXPR void - copy_from_string( - std::basic_string const& s, - size_type pos, size_type n, Char zero, Char one - ) - { - copy_from_ptr(s.data(), s.size(), pos, n, zero, one); - } - template - SPROUT_NON_CONSTEXPR void - copy_to_string(std::basic_string& s, Char zero, Char one) const { - s.assign(N, zero); - for (size_type i = N; i > 0; --i) { - if (unchecked_test(i - 1)) { - Traits::assign(s[N - i], one); - } - } - } - template - SPROUT_NON_CONSTEXPR void - copy_from_string(std::basic_string const& s, size_type pos, size_type n) { - copy_from_string(s, pos, n, SPROUT_CHAR_LITERAL('0', Char), SPROUT_CHAR_LITERAL('1', Char)); - } - template - SPROUT_NON_CONSTEXPR void - copy_to_string(std::basic_string& s) const { - copy_to_string(s, SPROUT_CHAR_LITERAL('0', Char), SPROUT_CHAR_LITERAL('1', Char)); - } - - SPROUT_CONSTEXPR size_type to_hash() const { - return this->do_to_hash(); - } - public: - // 20.5.1 constructors: - SPROUT_CONSTEXPR bitset() SPROUT_NOEXCEPT - : base_type() - {} - bitset(bitset const&) = default; - SPROUT_CONSTEXPR bitset(unsigned long long val) SPROUT_NOEXCEPT - : base_type(sprout::detail::sanitize_val::do_sanitize_val(val)) - {} - template - explicit SPROUT_NON_CONSTEXPR bitset(std::basic_string const& s, size_type position = 0) - : base_type() - { - if (position > s.size()) { - throw std::out_of_range("bitset::bitset initial position not valid"); - } - copy_from_string(s, position, std::basic_string::npos, SPROUT_CHAR_LITERAL('0', Char), SPROUT_CHAR_LITERAL('1', Char)); - } - template - SPROUT_NON_CONSTEXPR bitset(std::basic_string const& s, size_type position, size_type n) - : base_type() - { - if (position > s.size()) { - throw std::out_of_range("bitset::bitset initial position not valid"); - } - copy_from_string(s, position, n, SPROUT_CHAR_LITERAL('0', Char), SPROUT_CHAR_LITERAL('1', Char)); - } - - template - SPROUT_NON_CONSTEXPR bitset( - std::basic_string const& s, size_type position, size_type n, - Char zero, Char one = SPROUT_CHAR_LITERAL('1', Char) - ) - : base_type() - { - if (position > s.size()) { - throw std::out_of_range("bitset::bitset initial position not valid"); - } - copy_from_string(s, position, n, zero, one); - } - template - explicit SPROUT_NON_CONSTEXPR bitset( - Char const* str, typename std::basic_string::size_typeype n = std::basic_string::npos, - Char zero = SPROUT_CHAR_LITERAL('0', Char), Char one = SPROUT_CHAR_LITERAL('1', Char) - ) - : base_type() - { - if (!str) { - throw std::out_of_range("bitset::bitset"); - } - if (n == std::basic_string::npos) { - n = std::char_traits::length(str); - } - copy_from_ptr>(str, n, 0, n, zero, one); - } - // 20.5.2 bitset operations: - SPROUT_CXX14_CONSTEXPR bitset& - operator=(bitset const& rhs) { - base_type::operator=(rhs); - return *this; - } - SPROUT_CXX14_CONSTEXPR bitset& - operator=(bitset&& rhs) { - base_type::operator=(sprout::move(rhs)); - return *this; - } - SPROUT_CXX14_CONSTEXPR bitset& - operator&=(bitset const& rhs) SPROUT_NOEXCEPT { - this->do_and(rhs); - return *this; - } - SPROUT_CXX14_CONSTEXPR bitset& - operator|=(bitset const& rhs) SPROUT_NOEXCEPT { - this->do_or(rhs); - return *this; - } - SPROUT_CXX14_CONSTEXPR bitset& - operator^=(bitset const& rhs) SPROUT_NOEXCEPT { - this->do_xor(rhs); - return *this; - } - SPROUT_CXX14_CONSTEXPR bitset& - operator<<=(size_type position) SPROUT_NOEXCEPT { - if (position < N) { - this->do_left_shift(position); - this->do_sanitize(); - } else { - this->do_reset(); - } - return *this; - } - SPROUT_CXX14_CONSTEXPR bitset& - operator>>=(size_type position) SPROUT_NOEXCEPT { - if (position < N) { - this->do_right_shift(position); - this->do_sanitize(); - } else { - this->do_reset(); - } - return *this; - } - SPROUT_CXX14_CONSTEXPR bitset& - set() SPROUT_NOEXCEPT { - this->do_set(); - this->do_sanitize(); - return *this; - } - SPROUT_CONSTEXPR bitset - set() const SPROUT_NOEXCEPT { - return bitset(this->do_set()).do_sanitize_c(); - } - SPROUT_CXX14_CONSTEXPR bitset& - set(size_type position, value_type val = true) { - if (position >= N) { - throw std::out_of_range("bitset::set"); - } - return unchecked_set(position, val); - } - SPROUT_CONSTEXPR bitset - set(size_type position, value_type val = true) const { - return position >= N ? throw std::out_of_range("bitset::set") - : unchecked_set(position, val) - ; - } - SPROUT_CXX14_CONSTEXPR bitset& - reset() SPROUT_NOEXCEPT { - this->do_reset(); - return *this; - } - SPROUT_CONSTEXPR bitset - reset() const SPROUT_NOEXCEPT { - return bitset(this->do_reset()); - } - SPROUT_CXX14_CONSTEXPR bitset& - reset(size_type position) { - if (position >= N) { - throw std::out_of_range("bitset::reset"); - } - return unchecked_reset(position); - } - SPROUT_CONSTEXPR bitset - reset(size_type position) const { - return position >= N ? throw std::out_of_range("bitset::reset") - : unchecked_reset(position) - ; - } - SPROUT_CXX14_CONSTEXPR bitset& - flip() SPROUT_NOEXCEPT { - this->do_flip(); - this->do_sanitize(); - return *this; - } - SPROUT_CONSTEXPR bitset - flip() const SPROUT_NOEXCEPT { - return bitset(this->do_flip()).do_sanitize_c(); - } - SPROUT_CXX14_CONSTEXPR bitset& - flip(size_type position) { - if (position >= N) { - throw std::out_of_range("bitset::flip"); - } - return unchecked_flip(position); - } - SPROUT_CONSTEXPR bitset - flip(size_type position) const { - return position >= N ? throw std::out_of_range("bitset::flip") - : unchecked_flip(position) - ; - } - SPROUT_CONSTEXPR bitset - operator~() const SPROUT_NOEXCEPT { - return flip(); - } - - // element access: - SPROUT_CXX14_CONSTEXPR reference - operator[](size_type position) { - return reference(*this, position); - } - SPROUT_CONSTEXPR value_type - operator[](size_type position) const { - return unchecked_test(position); - } - SPROUT_CONSTEXPR unsigned long - to_ulong() const { - return this->do_to_ulong(); - } - SPROUT_CONSTEXPR unsigned long long - to_ullong() const { - return this->do_to_ullong(); - } - template - SPROUT_NON_CONSTEXPR std::basic_string - to_string() const { - std::basic_string result; - copy_to_string(result, SPROUT_CHAR_LITERAL('0', Char), SPROUT_CHAR_LITERAL('1', Char)); - return result; - } - template - SPROUT_NON_CONSTEXPR std::basic_string - to_string(Char zero, Char one = SPROUT_CHAR_LITERAL('1', Char)) const { - std::basic_string result; - copy_to_string(result, zero, one); - return result; - } - template - SPROUT_NON_CONSTEXPR std::basic_string > - to_string() const { - return to_string >(); - } - template - SPROUT_NON_CONSTEXPR std::basic_string > - to_string(Char zero, Char one = SPROUT_CHAR_LITERAL('1', Char)) const { - return to_string >(zero, one); - } - template - SPROUT_NON_CONSTEXPR std::basic_string, std::allocator > - to_string() const { - return to_string, std::allocator >(); - } - template - SPROUT_NON_CONSTEXPR std::basic_string, std::allocator > - to_string(Char zero, Char one = SPROUT_CHAR_LITERAL('1', Char)) const { - return to_string, std::allocator >(zero, one); - } - SPROUT_NON_CONSTEXPR std::basic_string, std::allocator > - to_string() const { - return to_string, std::allocator >(); - } - SPROUT_NON_CONSTEXPR std::basic_string, std::allocator > - to_string(char zero, char one = '1') const { - return to_string, std::allocator >(zero, one); - } - - SPROUT_CONSTEXPR size_type - count() const SPROUT_NOEXCEPT { - return this->do_count(); - } - SPROUT_CONSTEXPR size_type - size() const SPROUT_NOEXCEPT { - return N; - } - SPROUT_CONSTEXPR bool - operator==(bitset const& rhs) const SPROUT_NOEXCEPT { - return this->is_equal(rhs); - } - SPROUT_CONSTEXPR bool - operator!=(bitset const& rhs) const SPROUT_NOEXCEPT { - return !this->is_equal(rhs); - } - SPROUT_CONSTEXPR value_type - test(size_type position) const { - return position >= N ? throw std::out_of_range("bitset::test") - : unchecked_test(position) - ; - } - SPROUT_CONSTEXPR bool - all() const SPROUT_NOEXCEPT { - return this->template are_all(); - } - SPROUT_CONSTEXPR bool - any() const SPROUT_NOEXCEPT { - return this->is_any(); - } - SPROUT_CONSTEXPR bool - none() const SPROUT_NOEXCEPT { - return !this->is_any(); - } - SPROUT_CONSTEXPR bitset - operator<<(size_type position) const SPROUT_NOEXCEPT { - return position < N - ? bitset(this->do_left_shift(position)).do_sanitize_c() - : bitset(this->do_reset()) - ; - } - SPROUT_CONSTEXPR bitset - operator>>(size_type position) const SPROUT_NOEXCEPT { - return position < N - ? bitset(this->do_right_shift(position)).do_sanitize_c() - : bitset(this->do_reset()) - ; - } - - SPROUT_CONSTEXPR size_type - find_first() const SPROUT_NOEXCEPT { - return this->find_first(N); - } - SPROUT_CONSTEXPR size_type - find_next(size_type prev) const SPROUT_NOEXCEPT { - return this->find_next(prev, N); - } - - public: - template - friend SPROUT_CONSTEXPR sprout::bitset - sprout::operator&(sprout::bitset const& lhs, sprout::bitset const& rhs) SPROUT_NOEXCEPT; - template - friend SPROUT_CONSTEXPR sprout::bitset - sprout::operator|(sprout::bitset const& lhs, sprout::bitset const& rhs) SPROUT_NOEXCEPT; - template - friend SPROUT_CONSTEXPR sprout::bitset - sprout::operator^(sprout::bitset const& lhs, sprout::bitset const& rhs) SPROUT_NOEXCEPT; - template - friend SPROUT_NON_CONSTEXPR std::basic_istream& - sprout::operator>>(std::basic_istream& lhs, sprout::bitset& rhs); - template - friend SPROUT_NON_CONSTEXPR std::basic_ostream& - sprout::operator<<(std::basic_ostream& lhs, sprout::bitset const& rhs); - - template - friend SPROUT_CONSTEXPR std::size_t - hash_value(sprout::bitset const& v); - }; -} // namespace sprout - -#endif // #ifndef SPROUT_BITSET_BITSET_HPP diff --git a/dsp/lib/sprout/sprout/bitset/bitwise.hpp b/dsp/lib/sprout/sprout/bitset/bitwise.hpp deleted file mode 100644 index 7513a12..0000000 --- a/dsp/lib/sprout/sprout/bitset/bitwise.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BITSET_BITWISE_HPP -#define SPROUT_BITSET_BITWISE_HPP - -#include -#include -#include - -namespace sprout { - // 20.5.4 bitset operators: - - template - inline SPROUT_CONSTEXPR sprout::bitset - operator&(sprout::bitset const& lhs, sprout::bitset const& rhs) SPROUT_NOEXCEPT { - return sprout::bitset(lhs.do_and(rhs)); - } - template - inline SPROUT_CONSTEXPR sprout::bitset - operator|(sprout::bitset const& lhs, sprout::bitset const& rhs) SPROUT_NOEXCEPT { - return sprout::bitset(lhs.do_or(rhs)); - } - template - inline SPROUT_CONSTEXPR sprout::bitset - operator^(sprout::bitset const& lhs, sprout::bitset const& rhs) SPROUT_NOEXCEPT { - return sprout::bitset(lhs.do_xor(rhs)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_BITSET_BITWISE_HPP diff --git a/dsp/lib/sprout/sprout/bitset/hash.hpp b/dsp/lib/sprout/sprout/bitset/hash.hpp deleted file mode 100644 index d5f42e9..0000000 --- a/dsp/lib/sprout/sprout/bitset/hash.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BITSET_HASH_HPP -#define SPROUT_BITSET_HASH_HPP - -#include -#include -#include -#include - -namespace sprout { - // 20.5.3 hash support - - // - // hash_value - // - template - inline SPROUT_CONSTEXPR std::size_t - hash_value(sprout::bitset const& v) { - return v.to_hash(); - } -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // hash - // - template - struct hash > - : public sprout::hash > - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -#endif // #ifndef SPROUT_BITSET_HASH_HPP diff --git a/dsp/lib/sprout/sprout/bitset/io.hpp b/dsp/lib/sprout/sprout/bitset/io.hpp deleted file mode 100644 index 930a5e4..0000000 --- a/dsp/lib/sprout/sprout/bitset/io.hpp +++ /dev/null @@ -1,78 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BITSET_IO_HPP -#define SPROUT_BITSET_IO_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // 20.5.4 bitset operators: - - template - inline SPROUT_NON_CONSTEXPR std::basic_istream& - operator>>(std::basic_istream& lhs, sprout::bitset& rhs) { - typedef typename Traits::char_type char_type; - typedef std::basic_istream istream_type; - typedef typename istream_type::ios_base ios_base; - - std::basic_string tmp; - tmp.reserve(N); - char_type const zero = lhs.widen('0'); - char_type const one = lhs.widen('1'); - typename ios_base::iostate state = ios_base::goodbit; - typename istream_type::sentry sentry(lhs); - if (sentry) { - try { - for (std::size_t i = N; i > 0; --i) { - static typename Traits::int_type eof = Traits::eof(); - typename Traits::int_type c1 = lhs.rdbuf()->sbumpc(); - if (Traits::eq_int_type(c1, eof)) { - state |= ios_base::eofbit; - break; - } else { - char_type const c2 = Traits::to_char_type(c1); - if (Traits::eq(c2, zero)) { - tmp.push_back(zero); - } else if (Traits::eq(c2, one)) { - tmp.push_back(one); - } else if (Traits::eq_int_type(lhs.rdbuf()->sputbackc(c2), eof)) { - state |= ios_base::failbit; - break; - } - } - } - } catch(...) { - lhs.setstate(ios_base::badbit); - } - } - if (tmp.empty() && N) { - state |= ios_base::failbit; - } else { - rhs.copy_from_string(tmp, static_cast(0), N, zero, one); - if (state) { - lhs.setstate(state); - return lhs; - } - } - return lhs; - } - template - inline SPROUT_NON_CONSTEXPR std::basic_ostream& - operator<<(std::basic_ostream& lhs, sprout::bitset const& rhs) { - std::basic_string tmp; - std::ctype const& ct = std::use_facet >(lhs.getloc()); - rhs.copy_to_string(tmp, ct.widen('0'), ct.widen('1')); - return lhs << tmp; - } -} // namespace sprout - -#endif // #ifndef SPROUT_BITSET_IO_HPP diff --git a/dsp/lib/sprout/sprout/brainfuck.hpp b/dsp/lib/sprout/sprout/brainfuck.hpp deleted file mode 100644 index b1d05c3..0000000 --- a/dsp/lib/sprout/sprout/brainfuck.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BRAINFUCK_HPP -#define SPROUT_BRAINFUCK_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_BRAINFUCK_HPP diff --git a/dsp/lib/sprout/sprout/brainfuck/brainfuck.hpp b/dsp/lib/sprout/sprout/brainfuck/brainfuck.hpp deleted file mode 100644 index 4a2b86f..0000000 --- a/dsp/lib/sprout/sprout/brainfuck/brainfuck.hpp +++ /dev/null @@ -1,225 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BRAINFUCK_BRAINFUCK_HPP -#define SPROUT_BRAINFUCK_BRAINFUCK_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace brainfuck { - namespace detail { - template - inline SPROUT_CONSTEXPR InputIterator - find_scope_end(InputIterator const& first, std::size_t count = 0) { - typedef typename std::iterator_traits::value_type value_type; - return *first == SPROUT_CHAR_LITERAL('[', value_type) ? sprout::brainfuck::detail::find_scope_end(sprout::next(first), count + 1) - : *first == SPROUT_CHAR_LITERAL(']', value_type) ? count == 0 - ? first - : sprout::brainfuck::detail::find_scope_end(sprout::next(first), count - 1) - : sprout::brainfuck::detail::find_scope_end(sprout::next(first), count) - ; - } - - template - inline SPROUT_CONSTEXPR BidirectionalIterator - find_scope_start(BidirectionalIterator const& first, std::size_t count = 0) { - typedef typename std::iterator_traits::value_type value_type; - return *first == SPROUT_CHAR_LITERAL(']', value_type) ? sprout::brainfuck::detail::find_scope_start(sprout::prev(first), count + 1) - : *first == SPROUT_CHAR_LITERAL('[', value_type) ? count == 0 - ? first - : sprout::brainfuck::detail::find_scope_start(sprout::prev(first), count - 1) - : sprout::brainfuck::detail::find_scope_start(sprout::prev(first), count) - ; - } - - template - inline SPROUT_CONSTEXPR bool - is_well_formed(InputIterator const& first, InputIterator const& last, std::size_t count = 0) { - typedef typename std::iterator_traits::value_type value_type; - return first == last ? count == 0 - : *first == SPROUT_CHAR_LITERAL('[', value_type) - ? sprout::brainfuck::detail::is_well_formed(sprout::next(first), last, count + 1) - : *first == SPROUT_CHAR_LITERAL(']', value_type) - ? count != 0 && sprout::brainfuck::detail::is_well_formed(sprout::next(first), last, count - 1) - : sprout::brainfuck::detail::is_well_formed(sprout::next(first), last, count) - ; - } - - template< - typename BidirectionalIteratorSource, typename Output, typename InputIteratorInput, - typename Buffer, typename OutputBuffer - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - exec_impl( - BidirectionalIteratorSource first, BidirectionalIteratorSource last, - Output const& output, InputIteratorInput in_first, InputIteratorInput in_last, - Buffer const& buffer, OutputBuffer const& out_buffer, std::size_t pos = 0, std::size_t out_pos = 0 - ) - { - typedef typename std::iterator_traits::value_type value_type; - typedef typename sprout::container_traits::value_type out_value_type; - return first == last - ? sprout::fixed::copy( - sprout::begin(out_buffer), - sprout::next(sprout::begin(out_buffer), NS_SSCRISK_CEL_OR_SPROUT::min(out_pos, sprout::size(out_buffer))), - output - ) - : *first == SPROUT_CHAR_LITERAL('>', value_type) - ? sprout::brainfuck::detail::exec_impl( - sprout::next(first), last, output, in_first, in_last, - buffer, out_buffer, pos + 1, out_pos - ) - : *first == SPROUT_CHAR_LITERAL('<', value_type) - ? sprout::brainfuck::detail::exec_impl( - sprout::next(first), last, output, in_first, in_last, - buffer, out_buffer, pos - 1, out_pos - ) - : *first == SPROUT_CHAR_LITERAL('+', value_type) - ? sprout::brainfuck::detail::exec_impl( - sprout::next(first), last, output, in_first, in_last, - sprout::fixed::set(buffer, pos, value_type(buffer.at(pos) + 1)), out_buffer, pos, out_pos - ) - : *first == SPROUT_CHAR_LITERAL('+', value_type) - ? sprout::brainfuck::detail::exec_impl( - sprout::next(first), last, output, in_first, in_last, - sprout::fixed::set(buffer, pos, value_type(buffer.at(pos) - 1)), out_buffer, pos, out_pos - ) - : *first == SPROUT_CHAR_LITERAL('.', value_type) ? out_pos != out_buffer.size() - ? sprout::brainfuck::detail::exec_impl( - sprout::next(first), last, output, in_first, in_last, - buffer, sprout::fixed::set(out_buffer, out_pos, out_value_type(buffer.at(pos))), pos, out_pos + 1 - ) - : throw std::out_of_range("output out of range") - : *first == SPROUT_CHAR_LITERAL(',', value_type) ? in_first != in_last - ? sprout::brainfuck::detail::exec_impl( - sprout::next(first), last, output, sprout::next(in_first), in_last, - sprout::fixed::set(buffer, pos, value_type(*in_first)), out_buffer, pos, out_pos - ) - : throw std::out_of_range("input out of range") - : *first == SPROUT_CHAR_LITERAL('[', value_type) ? buffer.at(pos) == 0 - ? sprout::brainfuck::detail::exec_impl( - sprout::next(sprout::brainfuck::detail::find_scope_end(sprout::next(first))), last, output, in_first, in_last, - buffer, out_buffer, pos, out_pos - ) - : sprout::brainfuck::detail::exec_impl( - sprout::next(first), last, output, in_first, in_last, - buffer, out_buffer, pos, out_pos - ) - : *first == SPROUT_CHAR_LITERAL(']', value_type) ? buffer.at(pos) != 0 - ? sprout::brainfuck::detail::exec_impl( - sprout::next(sprout::brainfuck::detail::find_scope_start(sprout::prev(first))), last, output, in_first, in_last, - buffer, out_buffer, pos, out_pos - ) - : sprout::brainfuck::detail::exec_impl( - sprout::next(first), last, output, in_first, in_last, - buffer, out_buffer, pos, out_pos - ) - : sprout::brainfuck::detail::exec_impl( - sprout::next(first), last, output, in_first, in_last, - buffer, out_buffer, pos, out_pos - ) - ; - } - } // namespace detail - - // - // exec - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - exec( - BidirectionalIteratorSource first, BidirectionalIteratorSource last, - Output const& output, InputIteratorInput in_first, InputIteratorInput in_last - ) - { - typedef typename std::iterator_traits::value_type value_type; - typedef sprout::container_traits out_traits; - return sprout::brainfuck::detail::exec_impl( - first, last, output, in_first, in_last, - sprout::array{{}}, sprout::array{{}} - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - exec( - BidirectionalIteratorSource first, BidirectionalIteratorSource last, - Output const& output - ) - { - typedef typename std::iterator_traits::value_type value_type; - return sprout::brainfuck::exec( - first, last, output, sprout::value_iterator(value_type()), sprout::value_iterator() - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm< - sprout::array::value_type, BufferSize> - >::type - exec( - BidirectionalIteratorSource first, BidirectionalIteratorSource last - ) - { - typedef typename std::iterator_traits::value_type value_type; - return sprout::brainfuck::exec( - first, last, sprout::pit >() - ); - } - - // - // exec_range - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - exec_range(BidirectionalRangeSource const& source, Output const& output, InputRangeInput const& input) { - return sprout::brainfuck::exec( - sprout::begin(source), sprout::end(source), output, sprout::begin(input), sprout::end(input) - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - exec_range(BidirectionalRangeSource const& source, Output const& output) { - return sprout::brainfuck::exec( - sprout::begin(source), sprout::end(source), output - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm< - sprout::array::value_type, BufferSize> - >::type - exec_range(BidirectionalRangeSource const& source) { - return sprout::brainfuck::exec( - sprout::begin(source), sprout::end(source) - ); - } - - // - // is_well_formed - // - template - inline SPROUT_CONSTEXPR bool - is_well_formed(InputIterator first, InputIterator last) { - return sprout::brainfuck::detail::is_well_formed(first, last); - } - } // namespace brainfuck -} // namespace sprout - -#endif // #ifndef SPROUT_BRAINFUCK_BRAINFUCK_HPP diff --git a/dsp/lib/sprout/sprout/brainfuck/detail/convert.hpp b/dsp/lib/sprout/sprout/brainfuck/detail/convert.hpp deleted file mode 100644 index 60d1d3b..0000000 --- a/dsp/lib/sprout/sprout/brainfuck/detail/convert.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BRAINFUCK_DETAIL_CONVERT_HPP -#define SPROUT_BRAINFUCK_DETAIL_CONVERT_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace brainfuck { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::pair::type, bool> - parsed_to_brainfuck(Parsed const& parsed, Result const& result) { - return parsed.success() - ? sprout::pair::type, bool>( - sprout::fixed::copy(sprout::begin(parsed.attr()), sprout::end(parsed.attr()), result), - true - ) - : sprout::pair::type, bool>( - sprout::deep_copy(result), - false - ) - ; - } - } // namespace detail - } // namespace brainfuck -} // namespace sprout - -#endif // #ifndef SPROUT_BRAINFUCK_DETAIL_CONVERT_HPP diff --git a/dsp/lib/sprout/sprout/brainfuck/misa.hpp b/dsp/lib/sprout/sprout/brainfuck/misa.hpp deleted file mode 100644 index 0fe1c60..0000000 --- a/dsp/lib/sprout/sprout/brainfuck/misa.hpp +++ /dev/null @@ -1,99 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BRAINFUCK_MISA_HPP -#define SPROUT_BRAINFUCK_MISA_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace brainfuck { - namespace misa { - // - // to_brainfuck - // - template - inline SPROUT_CONSTEXPR sprout::pair::type, bool> - to_brainfuck(InputIterator first, InputIterator last, Result const& result) { - return sprout::brainfuck::detail::parsed_to_brainfuck( - sprout::weed::parse( - first, last, - *sprout::weed::lim::static_size>( - sprout::weed::replace('>') - [sprout::weed::lit('>') | "\x81\xA8"/*""*/ | "\x81\x60"/*"`"*/ | "\x81\5B"/*"["*/] - | sprout::weed::replace('<') - [sprout::weed::lit('<') | "\x81\xA9"/*""*/ | "\x81\x9A"/*""*/ | "\x81\x99"/*""*/] - | sprout::weed::replace('+') - [sprout::weed::lit('+') | "\x82\xA0"/*""*/ | "\x82\x9F"/*""*/ | "\x82\xA8"/*""*/ | "\x82\xA7"/*""*/] - | sprout::weed::replace('-') - [sprout::weed::lit('-') | "\x82\xC1"/*""*/ | "\x83\x62"/*"b"*/] - | sprout::weed::replace('.') - [sprout::weed::lit('.') | "\x81\x49"/*"I"*/] - | sprout::weed::replace(',') - [sprout::weed::lit(',') | "\x81\x48"/*"H"*/] - | sprout::weed::replace('[') - [sprout::weed::lit('[') | "\x81\x75"/*"u"*/ | "\x81\x77"/*"w"*/] - | sprout::weed::replace(']') - [sprout::weed::lit(']') | "\x81\x76"/*"v"*/ | "\x81\x78"/*"x"*/] - | sprout::weed::replace(' ') - [sprout::weed::char_] - ) - ), - result - ); - } - - // - // exec_range - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - exec_range(BidirectionalRangeSource const& source, Output const& output, InputRangeInput const& input) { - typedef typename sprout::container_construct_traits::copied_type copied_type; - return sprout::brainfuck::exec_range( - sprout::brainfuck::misa::to_brainfuck(sprout::begin(source), sprout::end(source), sprout::pit()).first, - output, input - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - exec_range(BidirectionalRangeSource const& source, Output const& output) { - typedef typename sprout::container_construct_traits::copied_type copied_type; - return sprout::brainfuck::exec_range( - sprout::brainfuck::misa::to_brainfuck(sprout::begin(source), sprout::end(source), sprout::pit()).first, - output - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm< - sprout::array::value_type, BufferSize> - >::type - exec_range(BidirectionalRangeSource const& source) { - typedef typename sprout::container_construct_traits::copied_type copied_type; - return sprout::brainfuck::exec_range( - sprout::brainfuck::misa::to_brainfuck(sprout::begin(source), sprout::end(source), sprout::pit()).first - ); - } - } // namespace misa - } // namespace brainfuck -} // namespace sprout - -#endif // #ifndef SPROUT_BRAINFUCK_MISA_HPP diff --git a/dsp/lib/sprout/sprout/brainfuck/ook.hpp b/dsp/lib/sprout/sprout/brainfuck/ook.hpp deleted file mode 100644 index 0b236f2..0000000 --- a/dsp/lib/sprout/sprout/brainfuck/ook.hpp +++ /dev/null @@ -1,99 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_BRAINFUCK_OOK_HPP -#define SPROUT_BRAINFUCK_OOK_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace brainfuck { - namespace ook { - // - // to_brainfuck - // - template - inline SPROUT_CONSTEXPR sprout::pair::type, bool> - to_brainfuck(InputIterator first, InputIterator last, Result const& result) { - return sprout::brainfuck::detail::parsed_to_brainfuck( - sprout::weed::parse( - first, last, - *sprout::weed::lim::static_size>( - sprout::weed::replace('>') - ["Ook." >> *sprout::weed::space_ >> "Ook?"] - | sprout::weed::replace('>') - ["Ook?" >> *sprout::weed::space_ >> "Ook."] - | sprout::weed::replace('>') - ["Ook." >> *sprout::weed::space_ >> "Ook."] - | sprout::weed::replace('>') - ["Ook!" >> *sprout::weed::space_ >> "Ook!"] - | sprout::weed::replace('>') - ["Ook!" >> *sprout::weed::space_ >> "Ook."] - | sprout::weed::replace('>') - ["Ook." >> *sprout::weed::space_ >> "Ook!"] - | sprout::weed::replace('>') - ["Ook!" >> *sprout::weed::space_ >> "Ook?"] - | sprout::weed::replace('>') - ["Ook?" >> *sprout::weed::space_ >> "Ook!"] - | sprout::weed::replace(' ') - [sprout::weed::char_] - ) - ), - result - ); - } - - // - // exec_range - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - exec_range(BidirectionalRangeSource const& source, Output const& output, InputRangeInput const& input) { - typedef typename sprout::container_construct_traits::copied_type copied_type; - return sprout::brainfuck::exec_range( - sprout::brainfuck::ook::to_brainfuck(sprout::begin(source), sprout::end(source), sprout::pit()).first, - output, input - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - exec_range(BidirectionalRangeSource const& source, Output const& output) { - typedef typename sprout::container_construct_traits::copied_type copied_type; - return sprout::brainfuck::exec_range( - sprout::brainfuck::ook::to_brainfuck(sprout::begin(source), sprout::end(source), sprout::pit()).first, - output - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm< - sprout::array::value_type, BufferSize> - >::type - exec_range(BidirectionalRangeSource const& source) { - typedef typename sprout::container_construct_traits::copied_type copied_type; - return sprout::brainfuck::exec_range( - sprout::brainfuck::ook::to_brainfuck(sprout::begin(source), sprout::end(source), sprout::pit()).first - ); - } - } // namespace ook - } // namespace brainfuck -} // namespace sprout - -#endif // #ifndef SPROUT_BRAINFUCK_OOK_HPP diff --git a/dsp/lib/sprout/sprout/cctype.hpp b/dsp/lib/sprout/sprout/cctype.hpp deleted file mode 100644 index 1837027..0000000 --- a/dsp/lib/sprout/sprout/cctype.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CCTYPE_HPP -#define SPROUT_CCTYPE_HPP - -#include -#include - -#endif // #ifndef SPROUT_CCTYPE_HPP diff --git a/dsp/lib/sprout/sprout/checksum.hpp b/dsp/lib/sprout/sprout/checksum.hpp deleted file mode 100644 index 9a4fb9f..0000000 --- a/dsp/lib/sprout/sprout/checksum.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CHECKSUM_HPP -#define SPROUT_CHECKSUM_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_CHECKSUM_HPP diff --git a/dsp/lib/sprout/sprout/checksum/md5.hpp b/dsp/lib/sprout/sprout/checksum/md5.hpp deleted file mode 100644 index 892b07f..0000000 --- a/dsp/lib/sprout/sprout/checksum/md5.hpp +++ /dev/null @@ -1,557 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CHECKSUM_MD5_HPP -#define SPROUT_CHECKSUM_MD5_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - static_assert(CHAR_BIT == 8, "CHAR_BIT == 8"); - - namespace md5_detail { - inline SPROUT_CONSTEXPR std::uint32_t - func_f(std::uint32_t x, std::uint32_t y, std::uint32_t z) { - return (x & y) | (~x & z); - } - inline SPROUT_CONSTEXPR std::uint32_t - func_g(std::uint32_t x, std::uint32_t y, std::uint32_t z) { - return (x & z) | (y & ~z); - } - inline SPROUT_CONSTEXPR std::uint32_t - func_h(std::uint32_t x, std::uint32_t y, std::uint32_t z) { - return x ^ y ^ z; - } - inline SPROUT_CONSTEXPR std::uint32_t - func_i(std::uint32_t x, std::uint32_t y, std::uint32_t z) { - return y ^ (x | ~z); - } - - struct round1_op { - public: - SPROUT_CONSTEXPR std::uint32_t - operator()(std::uint32_t a, std::uint32_t b, std::uint32_t c, std::uint32_t d, std::uint32_t x, std::uint32_t t, std::uint32_t s) const { - return b + sprout::rotl(a + sprout::md5_detail::func_f(b, c, d) + x + t, s); - } - }; - struct round2_op { - public: - inline SPROUT_CONSTEXPR std::uint32_t - operator()(std::uint32_t a, std::uint32_t b, std::uint32_t c, std::uint32_t d, std::uint32_t x, std::uint32_t t, std::uint32_t s) const { - return b + sprout::rotl(a + sprout::md5_detail::func_g(b, c, d) + x + t, s); - } - }; - struct round3_op { - public: - inline SPROUT_CONSTEXPR std::uint32_t - operator()(std::uint32_t a, std::uint32_t b, std::uint32_t c, std::uint32_t d, std::uint32_t x, std::uint32_t t, std::uint32_t s) const { - return b + sprout::rotl(a + sprout::md5_detail::func_h(b, c, d) + x + t, s); - } - }; - struct round4_op { - public: - inline SPROUT_CONSTEXPR std::uint32_t - operator()(std::uint32_t a, std::uint32_t b, std::uint32_t c, std::uint32_t d, std::uint32_t x, std::uint32_t t, std::uint32_t s) const { - return b + sprout::rotl(a + sprout::md5_detail::func_i(b, c, d) + x + t, s); - } - }; - - template - inline SPROUT_CONSTEXPR sprout::array - round_x_impl( - std::uint32_t a, std::uint32_t b, std::uint32_t c, std::uint32_t d, sprout::array const& x, RoundOp round_op, - sprout::array const& xis, sprout::array const& ts, sprout::array const& ss, - std::size_t i = 0 - ) - { - return i == 16 ? sprout::array{{a, b, c, d}} - : i % 4 == 0 ? sprout::md5_detail::round_x_impl(round_op(a, b, c, d, x[xis[i]], ts[i], ss[i]), b, c, d, x, round_op, xis, ts, ss, i + 1) - : i % 4 == 1 ? sprout::md5_detail::round_x_impl(a, b, c, round_op(d, a, b, c, x[xis[i]], ts[i], ss[i]), x, round_op, xis, ts, ss, i + 1) - : i % 4 == 2 ? sprout::md5_detail::round_x_impl(a, b, round_op(c, d, a, b, x[xis[i]], ts[i], ss[i]), d, x, round_op, xis, ts, ss, i + 1) - : sprout::md5_detail::round_x_impl(a, round_op(b, c, d, a, x[xis[i]], ts[i], ss[i]), c, d, x, round_op, xis, ts, ss, i + 1) - ; - } - template - inline SPROUT_CONSTEXPR sprout::array - round_x( - sprout::array const& k, sprout::array const& x, RoundOp round_op, - sprout::array const& xis, sprout::array const& ts, sprout::array const& ss - ) - { - return sprout::md5_detail::round_x_impl(k[0], k[1], k[2], k[3], x, round_op, xis, ts, ss); - } - - template - struct round_table; - -# define SPROUT_MD5_DETAIL_ROUND_TABLE_DEF(N, XIS, TS, SS) \ - template \ - struct round_table { \ - public: \ - typedef sprout::array xis_type; \ - typedef sprout::array ts_type; \ - typedef sprout::array ss_type; \ - public: \ - SPROUT_STATIC_CONSTEXPR xis_type xis \ - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(XIS) \ - ; \ - SPROUT_STATIC_CONSTEXPR ts_type ts \ - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(TS) \ - ; \ - SPROUT_STATIC_CONSTEXPR ss_type ss \ - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(SS) \ - ; \ - }; \ - template \ - SPROUT_CONSTEXPR_OR_CONST typename sprout::md5_detail::round_table::xis_type sprout::md5_detail::round_table::xis \ - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(XIS) \ - ; \ - template \ - SPROUT_CONSTEXPR_OR_CONST typename sprout::md5_detail::round_table::ts_type sprout::md5_detail::round_table::ts \ - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(TS) \ - ; \ - template \ - SPROUT_CONSTEXPR_OR_CONST typename sprout::md5_detail::round_table::ss_type sprout::md5_detail::round_table::ss \ - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(SS) - - SPROUT_MD5_DETAIL_ROUND_TABLE_DEF( \ - 1, \ - sprout::make_array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), \ - sprout::make_array( \ - 0xD76AA478, 0xE8C7B756, 0x242070DB, 0xC1BDCEEE, 0xF57C0FAF, 0x4787C62A, 0xA8304613, 0xFD469501, \ - 0x698098D8, 0x8B44F7AF, 0xFFFF5BB1, 0x895CD7BE, 0x6B901122, 0xFD987193, 0xA679438E, 0x49B40821 \ - ), \ - sprout::make_array(7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22) \ - ); - SPROUT_MD5_DETAIL_ROUND_TABLE_DEF( \ - 2, \ - sprout::make_array(1, 6, 11, 0, 5, 10, 15, 4, 9, 14, 3, 8, 13, 2, 7, 12), \ - sprout::make_array( \ - 0xF61E2562, 0xC040B340, 0x265E5A51, 0xE9B6C7AA, 0xD62F105D, 0x02441453, 0xD8A1E681, 0xE7D3FBC8, \ - 0x21E1CDE6, 0xC33707D6, 0xF4D50D87, 0x455A14ED, 0xA9E3E905, 0xFCEFA3F8, 0x676F02D9, 0x8D2A4C8A \ - ), \ - sprout::make_array(5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20) \ - ); - SPROUT_MD5_DETAIL_ROUND_TABLE_DEF( \ - 3, \ - sprout::make_array(5, 8, 11, 14, 1, 4, 7, 10, 13, 0, 3, 6, 9, 12, 15, 2), \ - sprout::make_array( \ - 0xFFFA3942, 0x8771F681, 0x6D9D6122, 0xFDE5380C, 0xA4BEEA44, 0x4BDECFA9, 0xF6BB4B60, 0xBEBFBC70, \ - 0x289B7EC6, 0xEAA127FA, 0xD4EF3085, 0x04881D05, 0xD9D4D039, 0xE6DB99E5, 0x1FA27CF8, 0xC4AC5665 \ - ), \ - sprout::make_array(4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23) \ - ); - SPROUT_MD5_DETAIL_ROUND_TABLE_DEF( \ - 4, \ - sprout::make_array(0, 7, 14, 5, 12, 3, 10, 1, 8, 15, 6, 13, 4, 11, 2, 9), \ - sprout::make_array( \ - 0xF4292244, 0x432AFF97, 0xAB9423A7, 0xFC93A039, 0x655B59C3, 0x8F0CCC92, 0xFFEFF47D, 0x85845DD1, \ - 0x6FA87E4F, 0xFE2CE6E0, 0xA3014314, 0x4E0811A1, 0xF7537E82, 0xBD3AF235, 0x2AD7D2BB, 0xEB86D391 \ - ), \ - sprout::make_array(6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21) \ - ); -# undef SPROUT_MD5_DETAIL_ROUND_TABLE_DEF - - inline SPROUT_CONSTEXPR sprout::array - round1(sprout::array const& k, sprout::array const& x) { - return sprout::md5_detail::round_x( - k, x, sprout::md5_detail::round1_op(), - sprout::md5_detail::round_table<1>::xis, - sprout::md5_detail::round_table<1>::ts, - sprout::md5_detail::round_table<1>::ss - ); - } - inline SPROUT_CONSTEXPR sprout::array - round2(sprout::array const& k, sprout::array const& x) { - return sprout::md5_detail::round_x( - k, x, sprout::md5_detail::round2_op(), - sprout::md5_detail::round_table<2>::xis, - sprout::md5_detail::round_table<2>::ts, - sprout::md5_detail::round_table<2>::ss - ); - } - inline SPROUT_CONSTEXPR sprout::array - round3(sprout::array const& k, sprout::array const& x) { - return sprout::md5_detail::round_x( - k, x, sprout::md5_detail::round3_op(), - sprout::md5_detail::round_table<3>::xis, - sprout::md5_detail::round_table<3>::ts, - sprout::md5_detail::round_table<3>::ss - ); - } - inline SPROUT_CONSTEXPR sprout::array - round4(sprout::array const& k, sprout::array const& x) { - return sprout::md5_detail::round_x( - k, x, sprout::md5_detail::round4_op(), - sprout::md5_detail::round_table<4>::xis, - sprout::md5_detail::round_table<4>::ts, - sprout::md5_detail::round_table<4>::ss - ); - } - - inline SPROUT_CONSTEXPR sprout::array - round_all(sprout::array const& k, sprout::array const& x) { - return sprout::md5_detail::round4( - sprout::md5_detail::round3( - sprout::md5_detail::round2( - sprout::md5_detail::round1(k, x), - x - ), - x - ), - x - ); - } - } // namespace detail - - // - // md5 - // - class md5 { - public: - typedef sprout::array value_type; - typedef md5 const const_type; - private: - sprout::array k_; - sprout::array block_; - std::uint64_t bit_count_; - private: - SPROUT_CONSTEXPR md5( - sprout::array const& k, - std::uint64_t bit_count - ) - : k_(k) - , block_{{}} - , bit_count_(bit_count) - {} - SPROUT_CONSTEXPR md5( - sprout::array const& k, - sprout::array const& block, - std::uint64_t bit_count - ) - : k_(k) - , block_(block) - , bit_count_(bit_count) - {} - SPROUT_CONSTEXPR md5 const process( - sprout::array const& k, - sprout::array const& block, - std::uint64_t bit_count - ) const - { - return bit_count % (64 * 8) != 0 ? const_type(k, block, bit_count) - : const_type(k, block, bit_count).c_process_block() - ; - } - SPROUT_CONSTEXPR md5 const process_block_1(sprout::array const& x) const { - return md5( - sprout::array{{k_[0] + x[0], k_[1] + x[1], k_[2] + x[2], k_[3] + x[3]}}, - bit_count_ - ); - } - SPROUT_CONSTEXPR md5 const process_block() const { - return process_block_1(sprout::md5_detail::round_all(k_, block_)); - } - SPROUT_CONSTEXPR md5 const c_process_block() const { - return process_block_1(sprout::md5_detail::round_all(k_, block_)); - } - SPROUT_CONSTEXPR md5 const process_bit_impl(bool bit, std::size_t index, std::size_t offset) const { - return process( - k_, - sprout::fixed::set( - block_, - block_.begin() + index, - block_[index] | static_cast(bit) << (offset / 8 * 8 + (7 - offset % 8)) - ), - bit_count_ + 1 - ); - } - SPROUT_CONSTEXPR md5 const process_bits_impl(std::uint8_t bits, std::size_t i) const { - return i == 0 ? *this - : c_process_bit(((bits >> (i - 1)) & 1) != 0).process_bits_impl(bits, i - 1) - ; - } - SPROUT_CONSTEXPR md5 const process_byte_impl(std::uint8_t byte, std::size_t index, std::size_t offset) const { - return process( - k_, - sprout::fixed::set( - block_, - block_.begin() + index, - block_[index] - | static_cast(((byte >> 7) & 1) != 0) << (offset / 8 * 8 + (7 - offset % 8)) - | static_cast(((byte >> 6) & 1) != 0) << ((offset + 1) / 8 * 8 + (7 - (offset + 1) % 8)) - | static_cast(((byte >> 5) & 1) != 0) << ((offset + 2) / 8 * 8 + (7 - (offset + 2) % 8)) - | static_cast(((byte >> 4) & 1) != 0) << ((offset + 3) / 8 * 8 + (7 - (offset + 3) % 8)) - | static_cast(((byte >> 3) & 1) != 0) << ((offset + 4) / 8 * 8 + (7 - (offset + 4) % 8)) - | static_cast(((byte >> 2) & 1) != 0) << ((offset + 5) / 8 * 8 + (7 - (offset + 5) % 8)) - | static_cast(((byte >> 1) & 1) != 0) << ((offset + 6) / 8 * 8 + (7 - (offset + 6) % 8)) - | static_cast((byte & 1) != 0) << ((offset + 7) / 8 * 8 + (7 - (offset + 7) % 8)) - ), - bit_count_ + 8 - ); - } - template - SPROUT_CONSTEXPR md5 const process_block_impl(InputIterator const& first, InputIterator const& last) const { - return first == last ? *this - : c_process_byte(*first).process_block_impl(sprout::next(first), last) - ; - } - SPROUT_CONSTEXPR std::uint64_t pad_size() const { - return static_cast((511 + 448 - bit_count_) % 512); - } - SPROUT_CONSTEXPR md5 const process_padding(std::uint64_t pad_size) const { - return pad_size == 0 ? *this - : c_process_bit(false).process_padding(pad_size - 1) - ; - } - SPROUT_CONSTEXPR md5 const process_length(std::uint64_t bit_count) const { - return c_process_byte(static_cast(bit_count & 0xFF)) - .c_process_byte(static_cast((bit_count >> 8) & 0xFF)) - .c_process_byte(static_cast((bit_count >> 16) & 0xFF)) - .c_process_byte(static_cast((bit_count >> 24) & 0xFF)) - .c_process_byte(static_cast((bit_count >> 32) & 0xFF)) - .c_process_byte(static_cast((bit_count >> 40) & 0xFF)) - .c_process_byte(static_cast((bit_count >> 48) & 0xFF)) - .c_process_byte(static_cast((bit_count >> 56) & 0xFF)) - ; - } - SPROUT_CONSTEXPR value_type make_value() const { - return value_type{{ - static_cast((k_[0]) & 0xFF), - static_cast((k_[0] >> 8) & 0xFF), - static_cast((k_[0] >> 16) & 0xFF), - static_cast((k_[0] >> 24) & 0xFF), - static_cast((k_[1]) & 0xFF), - static_cast((k_[1] >> 8) & 0xFF), - static_cast((k_[1] >> 16) & 0xFF), - static_cast((k_[1] >> 24) & 0xFF), - static_cast((k_[2]) & 0xFF), - static_cast((k_[2] >> 8) & 0xFF), - static_cast((k_[2] >> 16) & 0xFF), - static_cast((k_[2] >> 24) & 0xFF), - static_cast((k_[3]) & 0xFF), - static_cast((k_[3] >> 8) & 0xFF), - static_cast((k_[3] >> 16) & 0xFF), - static_cast((k_[3] >> 24) & 0xFF) - }}; - } - SPROUT_CXX14_CONSTEXPR void process_block() { - sprout::array x = sprout::md5_detail::round_all(k_, block_); - k_[0] += x[0]; - k_[1] += x[1]; - k_[2] += x[2]; - k_[3] += x[3]; - block_.assign(0); - } - template - SPROUT_CXX14_CONSTEXPR void process_block_impl(InputIterator const& first, InputIterator const& last) { - for (; first != last; ++first) { - process_byte(*first); - } - } - public: - SPROUT_CONSTEXPR md5() - : k_{{0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476}} - , block_{{}} - , bit_count_() - {} - SPROUT_CXX14_CONSTEXPR void reset() { - k_[0] = 0x67452301; - k_[1] = 0xEFCDAB89; - k_[2] = 0x98BADCFE; - k_[3] = 0x10325476; - block_.assign(0); - bit_count_ = 0; - } - - SPROUT_CONSTEXPR md5 const process_bit(bool bit) const { - return c_process_bit(bit); - } - SPROUT_CONSTEXPR md5 const process_bits(std::uint8_t bits, std::size_t bit_count) const { - return c_process_bits(bits, bit_count); - } - SPROUT_CONSTEXPR md5 const process_byte(std::uint8_t byte) const { - return c_process_byte(byte); - } - template - SPROUT_CONSTEXPR md5 const process_block(InputIterator bytes_begin, InputIterator bytes_end) const { - return c_process_block(bytes_begin, bytes_end); - } - template - SPROUT_CONSTEXPR md5 const process_bytes(InputIterator buffer, std::size_t byte_count) const { - return c_process_bytes(buffer, byte_count); - } - template - SPROUT_CONSTEXPR md5 const process_range(InputRange const& bytes_range) const { - return c_process_range(bytes_range); - } - SPROUT_CONSTEXPR md5 const c_process_bit(bool bit) const { - return process_bit_impl( - bit, - static_cast(bit_count_ % (64 * 8) / 32), - static_cast(bit_count_ % 32) - ); - } - SPROUT_CONSTEXPR md5 const c_process_bits(std::uint8_t bits, std::size_t bit_count) const { - return process_bits_impl(bits, bit_count); - } - SPROUT_CONSTEXPR md5 const c_process_byte(std::uint8_t byte) const { - return bit_count_ % 8 == 0 ? process_byte_impl( - byte, - static_cast(bit_count_ % (64 * 8) / 32), - static_cast(bit_count_ % 32) - ) - : c_process_bit(((byte >> 7) & 1) != 0) - .c_process_bit(((byte >> 6) & 1) != 0) - .c_process_bit(((byte >> 5) & 1) != 0) - .c_process_bit(((byte >> 4) & 1) != 0) - .c_process_bit(((byte >> 3) & 1) != 0) - .c_process_bit(((byte >> 2) & 1) != 0) - .c_process_bit(((byte >> 1) & 1) != 0) - .c_process_bit((byte & 1) != 0) - ; - } - template - SPROUT_CONSTEXPR md5 const c_process_block(InputIterator bytes_begin, InputIterator bytes_end) const { - return process_block_impl( - sprout::make_bytes_iterator(bytes_begin), - sprout::make_bytes_iterator(bytes_end) - ); - } - template - SPROUT_CONSTEXPR md5 const c_process_bytes(InputIterator buffer, std::size_t byte_count) const { - return c_process_block(buffer, sprout::next(buffer, byte_count)); - } - template - SPROUT_CONSTEXPR md5 const c_process_range(InputRange const& bytes_range) const { - return c_process_block(sprout::begin(bytes_range), sprout::end(bytes_range)); - } - - SPROUT_CXX14_CONSTEXPR void process_bit(bool bit) { - std::size_t index = static_cast(bit_count_ % (64 * 8) / 32); - std::size_t offset = static_cast(bit_count_ % 32); - block_[index] |= static_cast(bit) << (offset / 8 * 8 + (7 - offset % 8)); - if (++bit_count_ % 512 == 0) { - process_block(); - } - } - SPROUT_CXX14_CONSTEXPR void process_bits(std::uint8_t bits, std::size_t bit_count) { - while (bit_count--) { - process_bit(((bits >> bit_count) & 1) != 0); - } - } - SPROUT_CXX14_CONSTEXPR void process_byte(std::uint8_t byte) { - process_bits(byte, 8); - } - template - SPROUT_CXX14_CONSTEXPR void process_block(InputIterator bytes_begin, InputIterator bytes_end) { - process_block_impl( - sprout::make_bytes_iterator(bytes_begin), - sprout::make_bytes_iterator(bytes_end) - ); - } - template - SPROUT_CXX14_CONSTEXPR void process_bytes(InputIterator buffer, std::size_t byte_count) { - process_block(buffer, sprout::next(buffer, byte_count)); - } - template - SPROUT_CXX14_CONSTEXPR void process_range(InputRange const& bytes_range) { - process_block(sprout::begin(bytes_range), sprout::end(bytes_range)); - } - - SPROUT_CONSTEXPR value_type checksum() const { - return process_bit(true).process_padding(pad_size()).process_length(bit_count_).make_value(); - } - SPROUT_CONSTEXPR value_type operator()() const { - return checksum(); - } - }; - - // - // make_md5 - // - template - inline SPROUT_CONSTEXPR sprout::md5::value_type - make_md5(ForwardIterator first, ForwardIterator last) { - return sprout::md5().c_process_block(first, last)(); - } - template - inline SPROUT_CONSTEXPR sprout::md5::value_type - make_md5(sprout::basic_string const& s) { - return sprout::md5().c_process_range(s)(); - } - inline SPROUT_CONSTEXPR sprout::md5::value_type - make_md5(char const* s) { - return sprout::md5().c_process_bytes(s, sprout::char_traits::length(s))(); - } - inline SPROUT_CONSTEXPR sprout::md5::value_type - make_md5(wchar_t const* s) { - return sprout::md5().c_process_bytes(s, sprout::char_traits::length(s))(); - } -#if SPROUT_USE_UNICODE_LITERALS - inline SPROUT_CONSTEXPR sprout::md5::value_type - make_md5(char16_t const* s) { - return sprout::md5().c_process_bytes(s, sprout::char_traits::length(s))(); - } - inline SPROUT_CONSTEXPR sprout::md5::value_type - make_md5(char32_t const* s) { - return sprout::md5().c_process_bytes(s, sprout::char_traits::length(s))(); - } -#endif -} // namespace sprout - -#if SPROUT_USE_USER_DEFINED_LITERALS - -namespace sprout { - namespace literals { - namespace checksum { - // - // _md5 - // - inline SPROUT_CONSTEXPR sprout::md5::value_type - operator"" _md5(char const* s, std::size_t size) { - return sprout::md5().c_process_bytes(s, size)(); - } - inline SPROUT_CONSTEXPR sprout::md5::value_type - operator"" _md5(wchar_t const* s, std::size_t size) { - return sprout::md5().c_process_bytes(s, size)(); - } -#if SPROUT_USE_UNICODE_LITERALS - inline SPROUT_CONSTEXPR sprout::md5::value_type - operator"" _md5(char16_t const* s, std::size_t size) { - return sprout::md5().c_process_bytes(s, size)(); - } - inline SPROUT_CONSTEXPR sprout::md5::value_type - operator"" _md5(char32_t const* s, std::size_t size) { - return sprout::md5().c_process_bytes(s, size)(); - } -#endif - } // namespace checksum - - using sprout::literals::checksum::operator"" _md5; - } // namespace literals - - using sprout::literals::checksum::operator"" _md5; -} // namespace sprout - -#endif // #if SPROUT_USE_USER_DEFINED_LITERALS - -#endif // #ifndef SPROUT_CHECKSUM_MD5_HPP diff --git a/dsp/lib/sprout/sprout/checksum/sha1.hpp b/dsp/lib/sprout/sprout/checksum/sha1.hpp deleted file mode 100644 index af56533..0000000 --- a/dsp/lib/sprout/sprout/checksum/sha1.hpp +++ /dev/null @@ -1,599 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CHECKSUM_SHA1_HPP -#define SPROUT_CHECKSUM_SHA1_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef SPROUT_WORKAROUND_NOT_TERMINATE_RECURSIVE_CONSTEXPR_FUNCTION_TEMPLATE -# include -#endif - -namespace sprout { - static_assert(CHAR_BIT == 8, "CHAR_BIT == 8"); - - // - // sha1 - // - class sha1 { - public: - typedef sprout::array value_type; - typedef sha1 const const_type; - private: - sprout::array h_; - sprout::array block_; - std::size_t block_byte_index_; - std::uint64_t bit_count_; - private: - SPROUT_CONSTEXPR sha1( - sprout::array const& h, - sprout::array const& block, - std::size_t block_byte_index, - std::uint64_t bit_count - ) - : h_(h) - , block_(block) - , block_byte_index_(block_byte_index) - , bit_count_(bit_count) - {} - SPROUT_CONSTEXPR std::uint32_t calc_w(std::size_t i) const { - return i < 16 - ? (block_[i * 4] << 24) - | (block_[i * 4 + 1] << 16) - | (block_[i * 4 + 2] << 8) - | (block_[i * 4 + 3]) - : sprout::rotl( - calc_w(i - 3) ^ calc_w(i - 8) ^ calc_w(i - 14) ^ calc_w(i - 16), - 1 - ) - ; - } -#ifdef SPROUT_WORKAROUND_NOT_TERMINATE_RECURSIVE_CONSTEXPR_FUNCTION_TEMPLATE - template - SPROUT_CONSTEXPR sha1 const process( - sprout::array const& h, - sprout::array const& block, - std::size_t block_byte_index, - std::uint64_t bit_count - ) const - { - return block_byte_index != 64 - ? const_type(h, block, block_byte_index, bit_count) - : const_type(h, block, 0, bit_count).process_block() - ; - } - template - SPROUT_CONSTEXPR sha1 const process( - sprout::array const&, - sprout::array const&, - std::size_t, - std::uint64_t - ) const - { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - SPROUT_CONSTEXPR sha1 const process_block_2( - std::uint32_t a, std::uint32_t b, std::uint32_t c, std::uint32_t d, std::uint32_t e, - std::size_t i, std::uint32_t f, std::uint32_t k - ) const - { - return process_block_1( - sprout::rotl(a, 5) + f + e + k + calc_w(i), - a, - sprout::rotl(b, 30), - c, - d, - i + 1 - ); - } - template - SPROUT_CONSTEXPR sha1 const process_block_2( - std::uint32_t, std::uint32_t, std::uint32_t, std::uint32_t, std::uint32_t, - std::size_t, std::uint32_t, std::uint32_t - ) const - { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - SPROUT_CONSTEXPR sha1 const process_block_1( - std::uint32_t a, std::uint32_t b, std::uint32_t c, std::uint32_t d, std::uint32_t e, - std::size_t i = 0 - ) const - { - return i < 80 - ? process_block_2( - a, b, c, d, e, - i, - i < 20 ? (b & c) | (~b & d) - : i < 40 ? b ^ c ^ d - : i < 60 ? (b & c) | (b & d) | (c & d) - : b ^ c ^ d - , - i < 20 ? 0x5A827999 - : i < 40 ? 0x6ED9EBA1 - : i < 60 ? 0x8F1BBCDC - : 0xCA62C1D6 - ) - : sha1( - sprout::array{{h_[0] + a, h_[1] + b, h_[2] + c, h_[3] + d, h_[4] + e}}, - block_, - block_byte_index_, - bit_count_ - ) - ; - } - template - SPROUT_CONSTEXPR sha1 const process_block_1( - std::uint32_t, std::uint32_t, std::uint32_t, std::uint32_t, std::uint32_t, - std::size_t - ) const - { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - SPROUT_CONSTEXPR sha1 const process_block() const { - return process_block_1(h_[0], h_[1], h_[2], h_[3], h_[4]); - } - template - SPROUT_CONSTEXPR sha1 const process_block() const { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - SPROUT_CONSTEXPR typename std::enable_if::type - process_block_impl(InputIterator const& first, InputIterator const& last, Args... args) const { - return first == last ? process( - h_, - sprout::make_array(args...), - 64, - bit_count_ + 64 * 8 - ) - // !!! TEMP: -// : process( -// h_, -// sprout::make_array(args...), -// 64, -// bit_count_ + 64 * 8 -// ).template process_block_impl(first, last) - : sprout::throw_recursive_function_template_instantiation_exeeded() - ; - } - template - SPROUT_CONSTEXPR typename std::enable_if::type - process_block_impl(InputIterator const&, InputIterator const&, Args...) const { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - SPROUT_CONSTEXPR typename std::enable_if::type - process_block_impl(InputIterator const& first, InputIterator const& last, Args... args) const { - return first == last ? process( - h_, - sprout::get_internal(sprout::range::fixed::copy(sprout::make_array(args...), sprout::sub(block_, block_byte_index_))), - block_byte_index_ + sizeof...(Args), - bit_count_ + sizeof...(Args) * 8 - ) - : block_byte_index_ + sizeof...(Args) == 64 - // !!! TEMP: -// ? process( -// h_, -// sprout::get_internal(sprout::range::fixed::copy(sprout::make_array(args...), sprout::sub(block_, block_byte_index_))), -// block_byte_index_ + sizeof...(Args), -// bit_count_ + sizeof...(Args) * 8 -// ).template process_block_impl(first, last) - ? sprout::throw_recursive_function_template_instantiation_exeeded() - : process_block_impl(sprout::next(first), last, args..., *first) - ; - } - template - SPROUT_CONSTEXPR typename std::enable_if::type - process_block_impl(InputIterator const&, InputIterator const&, Args...) const { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } -#else - SPROUT_CONSTEXPR sha1 const process( - sprout::array const& h, - sprout::array const& block, - std::size_t block_byte_index, - std::uint64_t bit_count - ) const - { - return block_byte_index != 64 - ? const_type(h, block, block_byte_index, bit_count) - : const_type(h, block, 0, bit_count).c_process_block() - ; - } - SPROUT_CONSTEXPR sha1 const process_block_2( - std::uint32_t a, std::uint32_t b, std::uint32_t c, std::uint32_t d, std::uint32_t e, - std::size_t i, std::uint32_t f, std::uint32_t k - ) const - { - return process_block_1( - sprout::rotl(a, 5) + f + e + k + calc_w(i), - a, - sprout::rotl(b, 30), - c, - d, - i + 1 - ); - } - SPROUT_CONSTEXPR sha1 const process_block_1( - std::uint32_t a, std::uint32_t b, std::uint32_t c, std::uint32_t d, std::uint32_t e, - std::size_t i = 0 - ) const - { - return i < 80 - ? process_block_2( - a, b, c, d, e, - i, - i < 20 ? (b & c) | (~b & d) - : i < 40 ? b ^ c ^ d - : i < 60 ? (b & c) | (b & d) | (c & d) - : b ^ c ^ d - , - i < 20 ? 0x5A827999 - : i < 40 ? 0x6ED9EBA1 - : i < 60 ? 0x8F1BBCDC - : 0xCA62C1D6 - ) - : sha1( - sprout::array{{h_[0] + a, h_[1] + b, h_[2] + c, h_[3] + d, h_[4] + e}}, - block_, - block_byte_index_, - bit_count_ - ) - ; - } - SPROUT_CONSTEXPR sha1 const process_block() const { - return c_process_block(); - } - SPROUT_CONSTEXPR sha1 const c_process_block() const { - return process_block_1(h_[0], h_[1], h_[2], h_[3], h_[4]); - } - template - SPROUT_CONSTEXPR typename std::enable_if::type - process_block_impl(InputIterator const& first, InputIterator const& last, Args... args) const { - return first == last ? process( - h_, - sprout::make_array(args...), - 64, - bit_count_ + 64 * 8 - ) - : process( - h_, - sprout::make_array(args...), - 64, - bit_count_ + 64 * 8 - ).process_block_impl(first, last) - ; - } - template - SPROUT_CONSTEXPR typename std::enable_if::type - process_block_impl(InputIterator const& first, InputIterator const& last, Args... args) const { - return first == last ? process( - h_, - sprout::get_internal(sprout::range::fixed::copy(sprout::make_array(args...), sprout::sub(block_, block_byte_index_))), - block_byte_index_ + sizeof...(Args), - bit_count_ + sizeof...(Args) * 8 - ) - : block_byte_index_ + sizeof...(Args) == 64 ? process( - h_, - sprout::get_internal(sprout::range::fixed::copy(sprout::make_array(args...), sprout::sub(block_, block_byte_index_))), - block_byte_index_ + sizeof...(Args), - bit_count_ + sizeof...(Args) * 8 - ).process_block_impl(first, last) - : process_block_impl(sprout::next(first), last, args..., *first) - ; - } -#endif - SPROUT_CONSTEXPR sha1 const process_one() const { - return process( - h_, - sprout::fixed::set(block_, block_.begin() + block_byte_index_, static_cast(0x80)), - block_byte_index_ + 1, - bit_count_ - ); - } - template - SPROUT_CONSTEXPR sha1 const process_padding_after() const { - return process( - h_, - sprout::array{{}}, - 56, - bit_count_ - ); - } - template - SPROUT_CONSTEXPR sha1 const process_padding() const { - return block_byte_index_ == 56 ? *this - : block_byte_index_ > 56 ? process( - h_, - sprout::get_internal(sprout::fixed::fill(sprout::sub(block_, block_byte_index_), static_cast(0))), - 64, - bit_count_ - ).process_padding_after() - : process( - h_, - sprout::get_internal(sprout::fixed::fill(sprout::sub(block_, block_byte_index_, 56), static_cast(0))), - 56, - bit_count_ - ) - ; - } - SPROUT_CONSTEXPR sha1 const process_length() const { - return process( - h_, - sprout::get_internal(sprout::range::fixed::copy( - sprout::array{{ - static_cast((bit_count_ >> 56) & 0xFF), - static_cast((bit_count_ >> 48) & 0xFF), - static_cast((bit_count_ >> 40) & 0xFF), - static_cast((bit_count_ >> 32) & 0xFF), - static_cast((bit_count_ >> 24) & 0xFF), - static_cast((bit_count_ >> 16) & 0xFF), - static_cast((bit_count_ >> 8) & 0xFF), - static_cast(bit_count_ & 0xFF) - }}, - sprout::sub(block_, block_byte_index_) - )), - block_byte_index_ + 8, - bit_count_ - ); - } - SPROUT_CONSTEXPR value_type make_value() const { - return value_type{{ - static_cast((h_[0] >> 24) & 0xFF), - static_cast((h_[0] >> 16) & 0xFF), - static_cast((h_[0] >> 8) & 0xFF), - static_cast((h_[0]) & 0xFF), - static_cast((h_[1] >> 24) & 0xFF), - static_cast((h_[1] >> 16) & 0xFF), - static_cast((h_[1] >> 8) & 0xFF), - static_cast((h_[1]) & 0xFF), - static_cast((h_[2] >> 24) & 0xFF), - static_cast((h_[2] >> 16) & 0xFF), - static_cast((h_[2] >> 8) & 0xFF), - static_cast((h_[2]) & 0xFF), - static_cast((h_[3] >> 24) & 0xFF), - static_cast((h_[3] >> 16) & 0xFF), - static_cast((h_[3] >> 8) & 0xFF), - static_cast((h_[3]) & 0xFF), - static_cast((h_[4] >> 24) & 0xFF), - static_cast((h_[4] >> 16) & 0xFF), - static_cast((h_[4] >> 8) & 0xFF), - static_cast((h_[4]) & 0xFF) - }}; - } - SPROUT_CXX14_CONSTEXPR void process_block() { - std::uint32_t w[80] = {}; - for (std::size_t i = 0; i < 16; ++i) { - w[i] = (block_[i * 4 + 0] << 24); - w[i] |= (block_[i * 4 + 1] << 16); - w[i] |= (block_[i * 4 + 2] << 8); - w[i] |= (block_[i * 4 + 3]); - } - for (std::size_t i = 16; i < 80; ++i) { - w[i] = sprout::rotl((w[i - 3] ^ w[i - 8] ^ w[i - 14] ^ w[i - 16]), 1); - } - std::uint32_t a = h_[0]; - std::uint32_t b = h_[1]; - std::uint32_t c = h_[2]; - std::uint32_t d = h_[3]; - std::uint32_t e = h_[4]; - for (std::size_t i = 0; i < 80; ++i) { - std::uint32_t f = 0; - std::uint32_t k = 0; - if (i<20) { - f = (b & c) | (~b & d); - k = 0x5A827999; - } else if (i<40) { - f = b ^ c ^ d; - k = 0x6ED9EBA1; - } else if (i<60) { - f = (b & c) | (b & d) | (c & d); - k = 0x8F1BBCDC; - } else { - f = b ^ c ^ d; - k = 0xCA62C1D6; - } - unsigned temp = sprout::rotl(a, 5) + f + e + k + w[i]; - e = d; - d = c; - c = sprout::rotl(b, 30); - b = a; - a = temp; - } - h_[0] += a; - h_[1] += b; - h_[2] += c; - h_[3] += d; - h_[4] += e; - } - SPROUT_CXX14_CONSTEXPR void process_byte_impl(unsigned char byte) { - block_[block_byte_index_++] = byte; - if (block_byte_index_ == 64) { - block_byte_index_ = 0; - process_block(); - } - } - template - SPROUT_CXX14_CONSTEXPR void process_block_impl(InputIterator first, InputIterator last) { - for (; first != last; ++first) { - process_byte(*first); - } - } - public: - SPROUT_CONSTEXPR sha1() - : h_{{0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0}} - , block_{{}} - , block_byte_index_() - , bit_count_() - {} - SPROUT_CXX14_CONSTEXPR void reset() { - h_[0] = 0x67452301; - h_[1] = 0xEFCDAB89; - h_[2] = 0x98BADCFE; - h_[3] = 0x10325476; - h_[4] = 0xC3D2E1F0; - block_byte_index_ = 0; - bit_count_ = 0; - } - - SPROUT_CONSTEXPR sha1 const process_byte(std::uint8_t byte) const { - return c_process_byte(byte); - } - template - SPROUT_CONSTEXPR sha1 const process_block(InputIterator bytes_begin, InputIterator bytes_end) const { - return c_process_block(bytes_begin, bytes_end); - } - template - SPROUT_CONSTEXPR sha1 const process_bytes(InputIterator buffer, std::size_t byte_count) const { - return c_process_bytes(buffer, byte_count); - } - template - SPROUT_CONSTEXPR sha1 const process_range(InputRange const& bytes_range) const { - return c_process_range(bytes_range); - } - SPROUT_CONSTEXPR sha1 const c_process_byte(std::uint8_t byte) const { - return process( - h_, - sprout::fixed::set(block_, block_.begin() + block_byte_index_, byte), - block_byte_index_ + 1, - bit_count_ + 8 - ); - } - template - SPROUT_CONSTEXPR sha1 const c_process_block(InputIterator bytes_begin, InputIterator bytes_end) const { - return process_block_impl( - sprout::make_bytes_iterator(bytes_begin), - sprout::make_bytes_iterator(bytes_end) - ); - } - template - SPROUT_CONSTEXPR sha1 const c_process_bytes(InputIterator buffer, std::size_t byte_count) const { - return c_process_block(buffer, sprout::next(buffer, byte_count)); - } - template - SPROUT_CONSTEXPR sha1 const c_process_range(InputRange const& bytes_range) const { - return c_process_block(sprout::begin(bytes_range), sprout::end(bytes_range)); - } - - SPROUT_CXX14_CONSTEXPR void process_byte(std::uint8_t byte) { - process_byte_impl(byte); - bit_count_ += 8; - } - template - SPROUT_CXX14_CONSTEXPR void process_block(InputIterator bytes_begin, InputIterator bytes_end) { - process_block_impl( - sprout::make_bytes_iterator(bytes_begin), - sprout::make_bytes_iterator(bytes_end) - ); - } - template - SPROUT_CXX14_CONSTEXPR void process_bytes(InputIterator buffer, std::size_t byte_count) { - process_block(buffer, sprout::next(buffer, byte_count)); - } - template - SPROUT_CXX14_CONSTEXPR void process_range(InputRange const& bytes_range) { - process_block(sprout::begin(bytes_range), sprout::end(bytes_range)); - } - - SPROUT_CONSTEXPR value_type checksum() const { - return process_one().process_padding().process_length().make_value(); - } - SPROUT_CONSTEXPR value_type operator()() const { - return checksum(); - } - }; - - // - // make_sha1 - // - template - inline SPROUT_CONSTEXPR sprout::sha1::value_type - make_sha1(ForwardIterator first, ForwardIterator last) { - return sprout::sha1().c_process_block(first, last)(); - } - template - inline SPROUT_CONSTEXPR sprout::sha1::value_type - make_sha1(sprout::basic_string const& s) { - return sprout::sha1().c_process_range(s)(); - } - inline SPROUT_CONSTEXPR sprout::sha1::value_type - make_sha1(char const* s) { - return sprout::sha1().c_process_bytes(s, sprout::char_traits::length(s))(); - } - inline SPROUT_CONSTEXPR sprout::sha1::value_type - make_sha1(wchar_t const* s) { - return sprout::sha1().c_process_bytes(s, sprout::char_traits::length(s))(); - } -#if SPROUT_USE_UNICODE_LITERALS - inline SPROUT_CONSTEXPR sprout::sha1::value_type - make_sha1(char16_t const* s) { - return sprout::sha1().c_process_bytes(s, sprout::char_traits::length(s))(); - } - inline SPROUT_CONSTEXPR sprout::sha1::value_type - make_sha1(char32_t const* s) { - return sprout::sha1().c_process_bytes(s, sprout::char_traits::length(s))(); - } -#endif -} // namespace sprout - -#if SPROUT_USE_USER_DEFINED_LITERALS - -namespace sprout { - namespace literals { - namespace checksum { - // - // _sha1 - // - inline SPROUT_CONSTEXPR sprout::sha1::value_type - operator"" _sha1(char const* s, std::size_t size) { - return sprout::sha1().c_process_bytes(s, size)(); - } - inline SPROUT_CONSTEXPR sprout::sha1::value_type - operator"" _sha1(wchar_t const* s, std::size_t size) { - return sprout::sha1().c_process_bytes(s, size)(); - } -#if SPROUT_USE_UNICODE_LITERALS - inline SPROUT_CONSTEXPR sprout::sha1::value_type - operator"" _sha1(char16_t const* s, std::size_t size) { - return sprout::sha1().c_process_bytes(s, size)(); - } - inline SPROUT_CONSTEXPR sprout::sha1::value_type - operator"" _sha1(char32_t const* s, std::size_t size) { - return sprout::sha1().c_process_bytes(s, size)(); - } -#endif - } // namespace checksum - - using sprout::literals::checksum::operator"" _sha1; - } // namespace literals - - using sprout::literals::checksum::operator"" _sha1; -} // namespace sprout - -#endif // #if SPROUT_USE_USER_DEFINED_LITERALS - -#endif // #ifndef SPROUT_CHECKSUM_SHA1_HPP diff --git a/dsp/lib/sprout/sprout/checksum/sum.hpp b/dsp/lib/sprout/sprout/checksum/sum.hpp deleted file mode 100644 index 360e495..0000000 --- a/dsp/lib/sprout/sprout/checksum/sum.hpp +++ /dev/null @@ -1,307 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CHECKSUM_SUM_HPP -#define SPROUT_CHECKSUM_SUM_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - static_assert(CHAR_BIT == 8, "CHAR_BIT == 8"); - - // - // sum_basic - // - template - class sum_basic { - static_assert(Bits % 8 == 0, "Bits % 8 == 0"); - public: - typedef typename sprout::detail::uint_t::least value_type; - typedef sum_basic const const_type; - typedef typename std::conditional< - sizeof(std::size_t) < sizeof(value_type), - value_type, - std::size_t - >::type sum_type; - private: - sum_type sum_; - private: - template - SPROUT_CONSTEXPR sum_type calc_sum(InputIterator const& first, InputIterator const& last) const { - return sprout::accumulate( - sprout::make_bytes_iterator(first), - sprout::make_bytes_iterator(last), - sum_ - ); - } - public: - SPROUT_CONSTEXPR sum_basic() - : sum_() - {} - sum_basic(sum_basic const&) = default; - explicit SPROUT_CONSTEXPR sum_basic(sum_type sum) - : sum_(sum) - {} - SPROUT_CXX14_CONSTEXPR void reset(sum_type new_sum = 0) { - sum_ = new_sum; - } - - SPROUT_CONSTEXPR sum_basic const process_byte(std::uint8_t byte) const { - return c_process_byte(byte); - } - template - SPROUT_CONSTEXPR sum_basic const process_block(InputIterator bytes_begin, InputIterator bytes_end) const { - return c_process_block(bytes_begin, bytes_end); - } - template - SPROUT_CONSTEXPR sum_basic const process_bytes(InputIterator buffer, std::size_t byte_count) const { - return c_process_bytes(buffer, byte_count); - } - template - SPROUT_CONSTEXPR sum_basic const process_range(InputRange const& bytes_range) const { - return c_process_range(bytes_range); - } - SPROUT_CONSTEXPR sum_basic const c_process_byte(std::uint8_t byte) const { - return sum_basic(sum_ + byte); - } - template - SPROUT_CONSTEXPR sum_basic const c_process_block(InputIterator bytes_begin, InputIterator bytes_end) const { - return sum_basic(calc_sum(bytes_begin, bytes_end)); - } - template - SPROUT_CONSTEXPR sum_basic const c_process_bytes(InputIterator buffer, std::size_t byte_count) const { - return c_process_block(buffer, sprout::next(buffer, byte_count)); - } - template - SPROUT_CONSTEXPR sum_basic const c_process_range(InputRange const& bytes_range) const { - return c_process_block(sprout::begin(bytes_range), sprout::end(bytes_range)); - } - - SPROUT_CXX14_CONSTEXPR void process_byte(std::uint8_t byte) { - sum_ += byte; - } - template - SPROUT_CXX14_CONSTEXPR void process_block(InputIterator bytes_begin, InputIterator bytes_end) { - sum_ = calc_sum(bytes_begin, bytes_end); - } - template - SPROUT_CXX14_CONSTEXPR void process_bytes(InputIterator buffer, std::size_t byte_count) { - process_block(buffer, sprout::next(buffer, byte_count)); - } - template - SPROUT_CXX14_CONSTEXPR void process_range(InputRange const& bytes_range) { - process_block(sprout::begin(bytes_range), sprout::end(bytes_range)); - } - - SPROUT_CONSTEXPR value_type checksum() const { - return static_cast(sum_ & sprout::numeric_limits::max()); - } - SPROUT_CONSTEXPR value_type operator()() const { - return checksum(); - } - }; - - // - // sum8 - // sum16 - // sum32 - // - typedef sprout::sum_basic<8> sum8; - typedef sprout::sum_basic<16> sum16; - typedef sprout::sum_basic<32> sum32; - - // - // make_sum8 - // - template - inline SPROUT_CONSTEXPR sprout::sum8::value_type - make_sum8(ForwardIterator first, ForwardIterator last) { - return sprout::sum8().c_process_block(first, last)(); - } - template - inline SPROUT_CONSTEXPR sprout::sum8::value_type - make_sum8(sprout::basic_string const& s) { - return sprout::sum8().c_process_range(s)(); - } - inline SPROUT_CONSTEXPR sprout::sum8::value_type - make_sum8(char const* s) { - return sprout::sum8().c_process_bytes(s, sprout::char_traits::length(s))(); - } - inline SPROUT_CONSTEXPR sprout::sum8::value_type - make_sum8(wchar_t const* s) { - return sprout::sum8().c_process_bytes(s, sprout::char_traits::length(s))(); - } -#if SPROUT_USE_UNICODE_LITERALS - inline SPROUT_CONSTEXPR sprout::sum8::value_type - make_sum8(char16_t const* s) { - return sprout::sum8().c_process_bytes(s, sprout::char_traits::length(s))(); - } - inline SPROUT_CONSTEXPR sprout::sum8::value_type - make_sum8(char32_t const* s) { - return sprout::sum8().c_process_bytes(s, sprout::char_traits::length(s))(); - } -#endif - // - // make_sum16 - // - template - inline SPROUT_CONSTEXPR sprout::sum16::value_type - make_sum16(ForwardIterator first, ForwardIterator last) { - return sprout::sum16().c_process_block(first, last)(); - } - template - inline SPROUT_CONSTEXPR sprout::sum16::value_type - make_sum16(sprout::basic_string const& s) { - return sprout::sum16().c_process_range(s)(); - } - inline SPROUT_CONSTEXPR sprout::sum16::value_type - make_sum16(char const* s) { - return sprout::sum16().c_process_bytes(s, sprout::char_traits::length(s))(); - } - inline SPROUT_CONSTEXPR sprout::sum16::value_type - make_sum16(wchar_t const* s) { - return sprout::sum16().c_process_bytes(s, sprout::char_traits::length(s))(); - } -#if SPROUT_USE_UNICODE_LITERALS - inline SPROUT_CONSTEXPR sprout::sum16::value_type - make_sum16(char16_t const* s) { - return sprout::sum16().c_process_bytes(s, sprout::char_traits::length(s))(); - } - inline SPROUT_CONSTEXPR sprout::sum16::value_type - make_sum16(char32_t const* s) { - return sprout::sum16().c_process_bytes(s, sprout::char_traits::length(s))(); - } -#endif - // - // make_sum32 - // - template - inline SPROUT_CONSTEXPR sprout::sum32::value_type - make_sum32(ForwardIterator first, ForwardIterator last) { - return sprout::sum32().c_process_block(first, last)(); - } - template - inline SPROUT_CONSTEXPR sprout::sum32::value_type - make_sum32(sprout::basic_string const& s) { - return sprout::sum32().c_process_range(s)(); - } - inline SPROUT_CONSTEXPR sprout::sum32::value_type - make_sum32(char const* s) { - return sprout::sum32().c_process_bytes(s, sprout::char_traits::length(s))(); - } - inline SPROUT_CONSTEXPR sprout::sum32::value_type - make_sum32(wchar_t const* s) { - return sprout::sum32().c_process_bytes(s, sprout::char_traits::length(s))(); - } -#if SPROUT_USE_UNICODE_LITERALS - inline SPROUT_CONSTEXPR sprout::sum32::value_type - make_sum32(char16_t const* s) { - return sprout::sum32().c_process_bytes(s, sprout::char_traits::length(s))(); - } - inline SPROUT_CONSTEXPR sprout::sum32::value_type - make_sum32(char32_t const* s) { - return sprout::sum32().c_process_bytes(s, sprout::char_traits::length(s))(); - } -#endif -} // namespace sprout - -#if SPROUT_USE_USER_DEFINED_LITERALS - -namespace sprout { - namespace literals { - namespace checksum { - // - // _sum8 - // - inline SPROUT_CONSTEXPR sprout::sum8::value_type - operator"" _sum8(char const* s, std::size_t size) { - return sprout::sum8().c_process_bytes(s, size)(); - } - inline SPROUT_CONSTEXPR sprout::sum8::value_type - operator"" _sum8(wchar_t const* s, std::size_t size) { - return sprout::sum8().c_process_bytes(s, size)(); - } -#if SPROUT_USE_UNICODE_LITERALS - inline SPROUT_CONSTEXPR sprout::sum8::value_type - operator"" _sum8(char16_t const* s, std::size_t size) { - return sprout::sum8().c_process_bytes(s, size)(); - } - inline SPROUT_CONSTEXPR sprout::sum8::value_type - operator"" _sum8(char32_t const* s, std::size_t size) { - return sprout::sum8().c_process_bytes(s, size)(); - } -#endif - // - // _sum16 - // - inline SPROUT_CONSTEXPR sprout::sum16::value_type - operator"" _sum16(char const* s, std::size_t size) { - return sprout::sum16().c_process_bytes(s, size)(); - } - inline SPROUT_CONSTEXPR sprout::sum16::value_type - operator"" _sum16(wchar_t const* s, std::size_t size) { - return sprout::sum16().c_process_bytes(s, size)(); - } -#if SPROUT_USE_UNICODE_LITERALS - inline SPROUT_CONSTEXPR sprout::sum16::value_type - operator"" _sum16(char16_t const* s, std::size_t size) { - return sprout::sum16().c_process_bytes(s, size)(); - } - inline SPROUT_CONSTEXPR sprout::sum16::value_type - operator"" _sum16(char32_t const* s, std::size_t size) { - return sprout::sum16().c_process_bytes(s, size)(); - } -#endif - // - // _sum32 - // - inline SPROUT_CONSTEXPR sprout::sum32::value_type - operator"" _sum32(char const* s, std::size_t size) { - return sprout::sum32().c_process_bytes(s, size)(); - } - inline SPROUT_CONSTEXPR sprout::sum32::value_type - operator"" _sum32(wchar_t const* s, std::size_t size) { - return sprout::sum32().c_process_bytes(s, size)(); - } -#if SPROUT_USE_UNICODE_LITERALS - inline SPROUT_CONSTEXPR sprout::sum32::value_type - operator"" _sum32(char16_t const* s, std::size_t size) { - return sprout::sum32().c_process_bytes(s, size)(); - } - inline SPROUT_CONSTEXPR sprout::sum32::value_type - operator"" _sum32(char32_t const* s, std::size_t size) { - return sprout::sum32().c_process_bytes(s, size)(); - } -#endif - } // namespace checksum - - using sprout::literals::checksum::operator"" _sum8; - using sprout::literals::checksum::operator"" _sum16; - using sprout::literals::checksum::operator"" _sum32; - } // namespace literals - - using sprout::literals::checksum::operator"" _sum8; - using sprout::literals::checksum::operator"" _sum16; - using sprout::literals::checksum::operator"" _sum32; -} // namespace sprout - -#endif // #if SPROUT_USE_USER_DEFINED_LITERALS - -#endif // #ifndef SPROUT_CHECKSUM_SUM_HPP diff --git a/dsp/lib/sprout/sprout/checksum/xor.hpp b/dsp/lib/sprout/sprout/checksum/xor.hpp deleted file mode 100644 index a1a6b26..0000000 --- a/dsp/lib/sprout/sprout/checksum/xor.hpp +++ /dev/null @@ -1,180 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CHECKSUM_XOR_HPP -#define SPROUT_CHECKSUM_XOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // xor8 - // - class xor8 { - public: - typedef std::uint8_t value_type; - typedef xor8 const const_type; - typedef std::size_t sum_type; - private: - sum_type sum_; - private: - template - SPROUT_CONSTEXPR sum_type calc_sum(InputIterator const& first, InputIterator const& last) const { - return sprout::accumulate( - sprout::make_bytes_iterator(first), - sprout::make_bytes_iterator(last), - sum_, - sprout::bit_xor_ - ); - } - public: - SPROUT_CONSTEXPR xor8() - : sum_() - {} - xor8(xor8 const&) = default; - explicit SPROUT_CONSTEXPR xor8(sum_type sum) - : sum_(sum) - {} - SPROUT_CXX14_CONSTEXPR void reset(sum_type new_sum = 0) { - sum_ = new_sum; - } - - SPROUT_CONSTEXPR xor8 const process_byte(std::uint8_t byte) const { - return c_process_byte(byte); - } - template - SPROUT_CONSTEXPR xor8 const process_block(InputIterator bytes_begin, InputIterator bytes_end) const { - return c_process_block(bytes_begin, bytes_end); - } - template - SPROUT_CONSTEXPR xor8 const process_bytes(InputIterator buffer, std::size_t byte_count) const { - return c_process_bytes(buffer, byte_count); - } - template - SPROUT_CONSTEXPR xor8 const process_range(InputRange const& bytes_range) const { - return c_process_range(bytes_range); - } - SPROUT_CONSTEXPR xor8 const c_process_byte(std::uint8_t byte) const { - return xor8(sum_ ^ byte); - } - template - SPROUT_CONSTEXPR xor8 const c_process_block(InputIterator bytes_begin, InputIterator bytes_end) const { - return xor8(calc_sum(bytes_begin, bytes_end)); - } - template - SPROUT_CONSTEXPR xor8 const c_process_bytes(InputIterator buffer, std::size_t byte_count) const { - return c_process_block(buffer, sprout::next(buffer, byte_count)); - } - template - SPROUT_CONSTEXPR xor8 const c_process_range(InputRange const& bytes_range) const { - return c_process_block(sprout::begin(bytes_range), sprout::end(bytes_range)); - } - - SPROUT_CXX14_CONSTEXPR void process_byte(std::uint8_t byte) { - sum_ ^= byte; - } - template - SPROUT_CXX14_CONSTEXPR void process_block(InputIterator bytes_begin, InputIterator bytes_end) { - sum_ = calc_sum(bytes_begin, bytes_end); - } - template - SPROUT_CXX14_CONSTEXPR void process_bytes(InputIterator buffer, std::size_t byte_count) { - process_block(buffer, sprout::next(buffer, byte_count)); - } - template - SPROUT_CXX14_CONSTEXPR void process_range(InputRange const& bytes_range) { - process_block(sprout::begin(bytes_range), sprout::end(bytes_range)); - } - - SPROUT_CONSTEXPR value_type checksum() const { - return static_cast(sum_ & 0xFF); - } - SPROUT_CONSTEXPR value_type operator()() const { - return checksum(); - } - }; - - // - // make_xor8 - // - template - inline SPROUT_CONSTEXPR sprout::xor8::value_type - make_xor8(ForwardIterator first, ForwardIterator last) { - return sprout::xor8().c_process_block(first, last)(); - } - template - inline SPROUT_CONSTEXPR sprout::xor8::value_type - make_xor8(sprout::basic_string const& s) { - return sprout::xor8().c_process_range(s)(); - } - inline SPROUT_CONSTEXPR sprout::xor8::value_type - make_xor8(char const* s) { - return sprout::xor8().c_process_bytes(s, sprout::char_traits::length(s))(); - } - inline SPROUT_CONSTEXPR sprout::xor8::value_type - make_xor8(wchar_t const* s) { - return sprout::xor8().c_process_bytes(s, sprout::char_traits::length(s))(); - } -#if SPROUT_USE_UNICODE_LITERALS - inline SPROUT_CONSTEXPR sprout::xor8::value_type - make_xor8(char16_t const* s) { - return sprout::xor8().c_process_bytes(s, sprout::char_traits::length(s))(); - } - inline SPROUT_CONSTEXPR sprout::xor8::value_type - make_xor8(char32_t const* s) { - return sprout::xor8().c_process_bytes(s, sprout::char_traits::length(s))(); - } -#endif -} // namespace sprout - -#if SPROUT_USE_USER_DEFINED_LITERALS - -namespace sprout { - namespace literals { - namespace checksum { - // - // _xor8 - // - inline SPROUT_CONSTEXPR sprout::xor8::value_type - operator"" _xor8(char const* s, std::size_t size) { - return sprout::xor8().c_process_bytes(s, size)(); - } - inline SPROUT_CONSTEXPR sprout::xor8::value_type - operator"" _xor8(wchar_t const* s, std::size_t size) { - return sprout::xor8().c_process_bytes(s, size)(); - } -#if SPROUT_USE_UNICODE_LITERALS - inline SPROUT_CONSTEXPR sprout::xor8::value_type - operator"" _xor8(char16_t const* s, std::size_t size) { - return sprout::xor8().c_process_bytes(s, size)(); - } - inline SPROUT_CONSTEXPR sprout::xor8::value_type - operator"" _xor8(char32_t const* s, std::size_t size) { - return sprout::xor8().c_process_bytes(s, size)(); - } -#endif - } // namespace checksum - - using sprout::literals::checksum::operator"" _xor8; - } // namespace literals - - using sprout::literals::checksum::operator"" _xor8; -} // namespace sprout - -#endif // #if SPROUT_USE_USER_DEFINED_LITERALS - -#endif // #ifndef SPROUT_CHECKSUM_XOR_HPP diff --git a/dsp/lib/sprout/sprout/cinttypes.hpp b/dsp/lib/sprout/sprout/cinttypes.hpp deleted file mode 100644 index 1630bec..0000000 --- a/dsp/lib/sprout/sprout/cinttypes.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CINTTYPES_HPP -#define SPROUT_CINTTYPES_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_CINTTYPES_HPP diff --git a/dsp/lib/sprout/sprout/cinttypes/abs.hpp b/dsp/lib/sprout/sprout/cinttypes/abs.hpp deleted file mode 100644 index 01198b9..0000000 --- a/dsp/lib/sprout/sprout/cinttypes/abs.hpp +++ /dev/null @@ -1,21 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CINTTYPES_ABS_HPP -#define SPROUT_CINTTYPES_ABS_HPP - -#include -#include - -namespace sprout { - inline SPROUT_CONSTEXPR std::intmax_t - imaxabs(std::intmax_t j) { - return j < 0 ? -j : j; - } -} // namespace sprout - -#endif // #ifndef SPROUT_CINTTYPES_ABS_HPP diff --git a/dsp/lib/sprout/sprout/cinttypes/arithmetic.hpp b/dsp/lib/sprout/sprout/cinttypes/arithmetic.hpp deleted file mode 100644 index 8b7efb9..0000000 --- a/dsp/lib/sprout/sprout/cinttypes/arithmetic.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CINTTYPES_ARITHMETIC_HPP -#define SPROUT_CINTTYPES_ARITHMETIC_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_CINTTYPES_ARITHMETIC_HPP diff --git a/dsp/lib/sprout/sprout/cinttypes/conversion.hpp b/dsp/lib/sprout/sprout/cinttypes/conversion.hpp deleted file mode 100644 index 85a0c3b..0000000 --- a/dsp/lib/sprout/sprout/cinttypes/conversion.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CINTTYPES_CONVERSION_HPP -#define SPROUT_CINTTYPES_CONVERSION_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_CINTTYPES_CONVERSION_HPP diff --git a/dsp/lib/sprout/sprout/cinttypes/div.hpp b/dsp/lib/sprout/sprout/cinttypes/div.hpp deleted file mode 100644 index 0028553..0000000 --- a/dsp/lib/sprout/sprout/cinttypes/div.hpp +++ /dev/null @@ -1,239 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CINTTYPES_DIV_HPP -#define SPROUT_CINTTYPES_DIV_HPP - -#include -#include -#if !defined(_MSC_VER) -# include -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // imaxdiv_t - // -#if defined(_MSC_VER) - struct imaxdiv_t { - public: - std::intmax_t quot; - std::intmax_t rem; - }; -#else - typedef std::imaxdiv_t imaxdiv_t; -#endif - - namespace detail { - template - struct div_t_traits2 {}; - -# define SPROUT_DETAIL_DIV_T_TRAITS2_IMPL(INT_T, DIV_T) \ - template<> \ - struct div_t_traits2 { \ - public: \ - typedef DIV_T type; \ - SPROUT_STATIC_CONSTEXPR std::size_t offsetof_quot = offsetof(DIV_T, quot); \ - SPROUT_STATIC_CONSTEXPR std::size_t offsetof_rem = offsetof(DIV_T, rem); \ - } - - SPROUT_DETAIL_DIV_T_TRAITS2_IMPL(std::intmax_t, sprout::imaxdiv_t); -# undef SPROUT_DETAIL_DIV_T_TRAITS2_IMPL - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::detail::div_t_traits2::offsetof_quot == 0, - typename sprout::detail::div_t_traits2::type - >::type - div_impl2(T const& numer, T const& denom) { -#if defined(_MSC_VER) && (_MSC_VER > 1900) - typename sprout::detail::div_t_traits2::type result = {numer / denom, numer % denom}; - return result; -#else - return {numer / denom, numer % denom}; -#endif - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::detail::div_t_traits2::offsetof_rem == 0, - typename sprout::detail::div_t_traits2::type - >::type - div_impl2(T const& numer, T const& denom) { -#if defined(_MSC_VER) && (_MSC_VER > 1900) - typename sprout::detail::div_t_traits2::type result = {numer % denom, numer / denom}; - return result; -#else - return {numer % denom, numer / denom}; -#endif - } - } // namespace detail - - inline SPROUT_CONSTEXPR sprout::imaxdiv_t - imaxdiv(std::intmax_t numer, std::intmax_t denom) { - return sprout::detail::div_impl2(numer, denom); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_same::value, - sprout::imaxdiv_t - >::type - div(T numer, T denom) { - return sprout::imaxdiv(numer, denom); - } -} // namespace sprout - -namespace sprout { - // - // hash_value - // - inline SPROUT_CONSTEXPR std::size_t - hash_value(sprout::imaxdiv_t const& v) { - return sprout::hash_values(v.quot, v.rem); - } -} // namespace sprout - -namespace sprout { - namespace tuples { - namespace detail { - template - struct tuple_element_impl; - template - struct tuple_element_impl - : public sprout::detail::nil_base - {}; - template<> - struct tuple_element_impl<0, sprout::imaxdiv_t> - : public sprout::identity - {}; - template<> - struct tuple_element_impl<1, sprout::imaxdiv_t> - : public sprout::identity - {}; - - template - struct get_impl; - template<> - struct get_impl<0, sprout::imaxdiv_t> { - public: - SPROUT_CONSTEXPR std::intmax_t& operator()(sprout::imaxdiv_t& t) const { - return t.quot; - } - SPROUT_CONSTEXPR std::intmax_t const& operator()(sprout::imaxdiv_t const& t) const { - return t.quot; - } - }; - template<> - struct get_impl<1, sprout::imaxdiv_t> { - public: - SPROUT_CONSTEXPR std::intmax_t& operator()(sprout::imaxdiv_t& t) const { - return t.rem; - } - SPROUT_CONSTEXPR std::intmax_t const& operator()(sprout::imaxdiv_t const& t) const { - return t.rem; - } - }; - } // namespace detail - } // namespace tuples -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // tuple_size - // - template<> - struct tuple_size - : public sprout::integral_constant - {}; - - // - // tuple_element - // - template - struct tuple_element - : public sprout::tuples::detail::tuple_element_impl - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -namespace sprout { - // - // tuple_get - // - template - inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element::type& - tuple_get(sprout::imaxdiv_t& t) SPROUT_NOEXCEPT { - static_assert(I < 2, "tuple_get: index out of range"); - return sprout::tuples::detail::get_impl()(t); - } - template - inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element::type const& - tuple_get(sprout::imaxdiv_t const& t) SPROUT_NOEXCEPT { - static_assert(I < 2, "tuple_get: index out of range"); - return sprout::tuples::detail::get_impl()(t); - } - template - inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element::type&& - tuple_get(sprout::imaxdiv_t&& t) SPROUT_NOEXCEPT { - return sprout::move(sprout::tuples::get(t)); - } -} // namespace sprout - -namespace sprout { - // - // container_traits - // - SPROUT_DETAIL_DIV_T_CONTAINER_TRAITS_IMPL(std::intmax_t, sprout::imaxdiv_t); - - // - // container_range_traits - // - SPROUT_DETAIL_DIV_T_CONTAINER_RANGE_TRAITS_IMPL(std::intmax_t, sprout::imaxdiv_t); - - // - // container_construct_traits - // - SPROUT_DETAIL_DIV_T_CONTAINER_CONSTRUCT_TRAITS_IMPL(std::intmax_t, sprout::imaxdiv_t); - - // - // container_transform_traits - // -# define SPROUT_DETAIL_DIV_T_CONTAINER_TRANSFORM_TRAITS2_IMPL(INT_T, DIV_T) \ - template<> \ - struct container_transform_traits { \ - public: \ - template \ - struct rebind_type { \ - public: \ - typedef typename sprout::detail::div_t_traits2::type type; \ - }; \ - } - - SPROUT_DETAIL_DIV_T_CONTAINER_TRANSFORM_TRAITS2_IMPL(std::intmax_t, sprout::imaxdiv_t); -} // namespace sprout - -#endif // #ifndef SPROUT_CINTTYPES_DIV_HPP diff --git a/dsp/lib/sprout/sprout/cinttypes/strtoimax.hpp b/dsp/lib/sprout/sprout/cinttypes/strtoimax.hpp deleted file mode 100644 index 551cb92..0000000 --- a/dsp/lib/sprout/sprout/cinttypes/strtoimax.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CINTTYPES_STRTOIMAX_HPP -#define SPROUT_CINTTYPES_STRTOIMAX_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // strtoimax - // - inline SPROUT_CONSTEXPR std::intmax_t - strtoimax(char const* str, char** endptr, int base = 10) { - return sprout::str_to_int(str, endptr, base); - } - template - inline SPROUT_CONSTEXPR std::intmax_t - strtoimax(Char const* str, Char** endptr, int base = 10) { - return sprout::str_to_int(str, endptr, base); - } - template - inline SPROUT_CONSTEXPR std::intmax_t - strtoimax(Char const* str, std::nullptr_t endptr, int base = 10) { - return sprout::str_to_int(str, base); - } - template - inline SPROUT_CONSTEXPR std::intmax_t - strtoimax(Char const* str, int base = 10) { - return sprout::str_to_int(str, base); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CINTTYPES_STRTOIMAX_HPP diff --git a/dsp/lib/sprout/sprout/cinttypes/strtoumax.hpp b/dsp/lib/sprout/sprout/cinttypes/strtoumax.hpp deleted file mode 100644 index 9e6692f..0000000 --- a/dsp/lib/sprout/sprout/cinttypes/strtoumax.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CINTTYPES_STRTOUMAX_HPP -#define SPROUT_CINTTYPES_STRTOUMAX_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // strtoumax - // - inline SPROUT_CONSTEXPR std::uintmax_t - strtoumax(char const* str, char** endptr, int base = 10) { - return sprout::str_to_int(str, endptr, base); - } - template - inline SPROUT_CONSTEXPR std::uintmax_t - strtoumax(Char const* str, Char** endptr, int base = 10) { - return sprout::str_to_int(str, endptr, base); - } - template - inline SPROUT_CONSTEXPR std::uintmax_t - strtoumax(Char const* str, std::nullptr_t endptr, int base = 10) { - return sprout::str_to_int(str, base); - } - template - inline SPROUT_CONSTEXPR std::uintmax_t - strtoumax(Char const* str, int base = 10) { - return sprout::str_to_int(str, base); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CINTTYPES_STRTOUMAX_HPP diff --git a/dsp/lib/sprout/sprout/cmath.hpp b/dsp/lib/sprout/sprout/cmath.hpp deleted file mode 100644 index b5be811..0000000 --- a/dsp/lib/sprout/sprout/cmath.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CMATH_HPP -#define SPROUT_CMATH_HPP - -#include -#include - -#endif // #ifndef SPROUT_CMATH_HPP diff --git a/dsp/lib/sprout/sprout/complex.hpp b/dsp/lib/sprout/sprout/complex.hpp deleted file mode 100644 index cc008e2..0000000 --- a/dsp/lib/sprout/sprout/complex.hpp +++ /dev/null @@ -1,24 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_HPP -#define SPROUT_COMPLEX_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_COMPLEX_HPP diff --git a/dsp/lib/sprout/sprout/complex/abs.hpp b/dsp/lib/sprout/sprout/complex/abs.hpp deleted file mode 100644 index 5aa566d..0000000 --- a/dsp/lib/sprout/sprout/complex/abs.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_ABS_HPP -#define SPROUT_COMPLEX_ABS_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // abs - // - template - inline SPROUT_CONSTEXPR T - abs(sprout::complex const& x) { - return sprout::math::sqrt(sprout::norm(x)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_ABS_HPP diff --git a/dsp/lib/sprout/sprout/complex/acos.hpp b/dsp/lib/sprout/sprout/complex/acos.hpp deleted file mode 100644 index 15377b5..0000000 --- a/dsp/lib/sprout/sprout/complex/acos.hpp +++ /dev/null @@ -1,71 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_ACOS_HPP -#define SPROUT_COMPLEX_ACOS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // acos - // - // G.6.1.1 The cacos functions - // cacos(conj(z)) = conj(cacos(z)). - // cacos(}0 + i0) returns p /2 - i0. - // cacos(}0 + iNaN) returns p /2 + iNaN. - // cacos(x + i) returns p /2 - i, for finite x. - // cacos(x + iNaN) returns NaN + iNaN and optionally raises the eeinvalidff floating-point exception, for nonzero finite x. - // cacos(-+ iy) returns p - i, for positive-signed finite y. - // cacos(++ iy) returns +0 - i, for positive-signed finite y. - // cacos(-+ i) returns 3p /4 - i. - // cacos(++ i) returns p /4 - i. - // cacos(}+ iNaN) returns NaN } i (where the sign of the imaginary part of the result is unspecified). - // cacos(NaN + iy) returns NaN + iNaN and optionally raises the eeinvalidff floating-point exception, for finite y. - // cacos(NaN + i) returns NaN - i. - // cacos(NaN + iNaN) returns NaN + iNaN. - // - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::complex - acos_impl(sprout::complex const& t) { - return sprout::complex(sprout::math::half_pi() - t.real(), -t.imag()); - } - } // namespace detail - template - inline SPROUT_CONSTEXPR sprout::complex - acos(sprout::complex const& x) { - typedef sprout::complex type; - return sprout::math::isnan(x.real()) - ? sprout::math::isnan(x.imag()) ? x - : sprout::math::isinf(x.imag()) ? type(x.real(), -x.imag()) - : type(x.real(), sprout::numeric_limits::quiet_NaN()) - : sprout::math::isnan(x.imag()) - ? sprout::math::isinf(x.real()) ? type(sprout::numeric_limits::quiet_NaN(), x.real()) - : x.real() == 0 ? type(sprout::math::half_pi(), x.imag()) - : type(sprout::numeric_limits::quiet_NaN(), sprout::numeric_limits::quiet_NaN()) - : x.real() == sprout::numeric_limits::infinity() - ? sprout::math::isinf(x.imag()) ? type(sprout::math::quarter_pi(), -x.imag()) - : type(T(0), sprout::math::copysign(sprout::numeric_limits::infinity(), -x.imag())) - : x.real() == -sprout::numeric_limits::infinity() - ? sprout::math::isinf(x.imag()) ? type(sprout::math::three_quarters_pi(), -x.imag()) - : type(sprout::math::pi(), sprout::math::copysign(sprout::numeric_limits::infinity(), -x.imag())) - : sprout::math::isinf(x.imag()) ? type(sprout::math::half_pi(), sprout::math::copysign(sprout::numeric_limits::infinity(), -x.imag())) - : x.real() == 0 && x.imag() == 0 ? type(sprout::math::half_pi(), -x.imag()) - : sprout::detail::acos_impl(sprout::asin(x)) - ; - } -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_ACOS_HPP diff --git a/dsp/lib/sprout/sprout/complex/acosh.hpp b/dsp/lib/sprout/sprout/complex/acosh.hpp deleted file mode 100644 index 183e5da..0000000 --- a/dsp/lib/sprout/sprout/complex/acosh.hpp +++ /dev/null @@ -1,63 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_ACOSH_HPP -#define SPROUT_COMPLEX_ACOSH_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // acosh - // - // G.6.2.1 The cacosh functions - // cacosh(conj(z)) = conj(cacosh(z)). - // cacosh(}0 + i0) returns +0 + ip /2. - // cacosh(x + i) returns ++ ip /2, for finite x. - // cacosh(x + iNaN) returns NaN + iNaN and optionally raises the eeinvalidff floating-point exception, for finite x. - // cacosh(-+ iy) returns ++ ip , for positive-signed finite y. - // cacosh(++ iy) returns ++ i0, for positive-signed finite y. - // cacosh(-+ i) returns ++ i3p /4. - // cacosh(++ i) returns ++ ip /4. - // cacosh(}+ iNaN) returns ++ iNaN. - // cacosh(NaN + iy) returns NaN + iNaN and optionally raises the eeinvalidff floating-point exception, for finite y. - // cacosh(NaN + i) returns ++ iNaN. - // cacosh(NaN + iNaN) returns NaN + iNaN. - // - template - inline SPROUT_CONSTEXPR sprout::complex - acosh(sprout::complex const& x) { - typedef sprout::complex type; - return sprout::math::isnan(x.real()) - ? sprout::math::isnan(x.imag()) ? x - : sprout::math::isinf(x.imag()) ? type(sprout::numeric_limits::infinity(), x.real()) - : type(x.real(), x.real()) - : sprout::math::isnan(x.imag()) - ? sprout::math::isinf(x.real()) ? type(sprout::numeric_limits::infinity(), x.imag()) - : type(sprout::numeric_limits::quiet_NaN(), x.imag()) - : x.real() == sprout::numeric_limits::infinity() - ? sprout::math::isinf(x.imag()) ? type(sprout::numeric_limits::infinity(), sprout::math::copysign(sprout::math::quarter_pi(), x.imag())) - : type(sprout::numeric_limits::infinity(), (x.imag() == 0 ? x.imag() : sprout::math::copysign(T(0), x.imag()))) - : x.real() == -sprout::numeric_limits::infinity() - ? sprout::math::isinf(x.imag()) ? type(sprout::numeric_limits::infinity(), sprout::math::copysign(sprout::math::three_quarters_pi(), x.imag())) - : type(sprout::numeric_limits::infinity(), sprout::math::copysign(sprout::math::pi(), x.imag())) - : sprout::math::isinf(x.imag()) ? type(sprout::numeric_limits::infinity(), sprout::math::copysign(sprout::math::half_pi(), x.imag())) - : x.real() == 0 && x.imag() == 0 ? type(T(0), sprout::math::copysign(sprout::math::half_pi(), x.imag())) - : T(2) * sprout::log(sprout::sqrt(sprout::math::half() * (x + T(1))) + sprout::sqrt(sprout::math::half() * (x - T(1)))) - ; - } -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_ACOSH_HPP diff --git a/dsp/lib/sprout/sprout/complex/arg.hpp b/dsp/lib/sprout/sprout/complex/arg.hpp deleted file mode 100644 index b34c00c..0000000 --- a/dsp/lib/sprout/sprout/complex/arg.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_ARG_HPP -#define SPROUT_COMPLEX_ARG_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // arg - // - template - inline SPROUT_CONSTEXPR T - arg(sprout::complex const& x) { - return sprout::math::atan2(x.imag(), x.real()); - } - template< - typename ArithmeticType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::float_promote::type - arg(ArithmeticType x) { - return sprout::math::atan2(ArithmeticType(0), x); - } -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_ARG_HPP diff --git a/dsp/lib/sprout/sprout/complex/arithmetic_operators.hpp b/dsp/lib/sprout/sprout/complex/arithmetic_operators.hpp deleted file mode 100644 index e8ed8fd..0000000 --- a/dsp/lib/sprout/sprout/complex/arithmetic_operators.hpp +++ /dev/null @@ -1,136 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_ARITHMETIC_OPERATORS_HPP -#define SPROUT_COMPLEX_ARITHMETIC_OPERATORS_HPP - -#include -#include - -namespace sprout { - // 26.4.6, operators: - template - inline SPROUT_CONSTEXPR sprout::complex - operator+(sprout::complex const& lhs, sprout::complex const& rhs) { - return sprout::complex(lhs.real() + rhs.real(), lhs.imag() + rhs.imag()); - } - template - inline SPROUT_CONSTEXPR sprout::complex - operator+(sprout::complex const& lhs, T const& rhs) { - return sprout::complex(lhs.real() + rhs, lhs.imag()); - } - template - inline SPROUT_CONSTEXPR sprout::complex - operator+(T const& lhs, sprout::complex const& rhs) { - return sprout::complex(lhs + rhs.real(), rhs.imag()); - } - template - inline SPROUT_CONSTEXPR sprout::complex - operator-(sprout::complex const& lhs, sprout::complex const& rhs) { - return sprout::complex(lhs.real() - rhs.real(), lhs.imag() - rhs.imag()); - } - template - inline SPROUT_CONSTEXPR sprout::complex - operator-(sprout::complex const& lhs, T const& rhs) { - return sprout::complex(lhs.real() - rhs, lhs.imag()); - } - template - inline SPROUT_CONSTEXPR sprout::complex - operator-(T const& lhs, sprout::complex const& rhs) { - return sprout::complex(lhs - rhs.real(), -rhs.imag()); - } - template - inline SPROUT_CONSTEXPR sprout::complex - operator*(sprout::complex const& lhs, sprout::complex const& rhs) { - return sprout::complex( - lhs.real() * rhs.real() - lhs.imag() * rhs.imag(), - lhs.real() * rhs.imag() + lhs.imag() * rhs.real() - ); - } - template - inline SPROUT_CONSTEXPR sprout::complex - operator*(sprout::complex const& lhs, T const& rhs) { - return sprout::complex(lhs.real() * rhs, lhs.imag() * rhs); - } - template - inline SPROUT_CONSTEXPR sprout::complex - operator*(T const& lhs, sprout::complex const& rhs) { - return sprout::complex(lhs * rhs.real(), lhs * rhs.imag()); - } - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::complex - divides_impl(sprout::complex const& lhs, sprout::complex const& rhs, T const& n) { - return sprout::complex( - (lhs.real() * rhs.real() + lhs.imag() * rhs.imag()) / n, - (lhs.imag() * rhs.real() - lhs.real() * rhs.imag()) / n - ); - } - template - inline SPROUT_CONSTEXPR sprout::complex - divides_impl(T const& lhs, sprout::complex const& rhs, T const& n) { - return sprout::complex(lhs * rhs.real() / n, -lhs * rhs.imag() / n); - } - } // namespace detail - template - inline SPROUT_CONSTEXPR sprout::complex - operator/(sprout::complex const& lhs, sprout::complex const& rhs) { - return sprout::detail::divides_impl(lhs, rhs, sprout::detail::complex_norm(rhs)); - } - template - inline SPROUT_CONSTEXPR sprout::complex - operator/(sprout::complex const& lhs, T const& rhs) { - return sprout::complex(lhs.real() / rhs, lhs.imag() / rhs); - } - template - inline SPROUT_CONSTEXPR sprout::complex - operator/(T const& lhs, sprout::complex const& rhs) { - return sprout::detail::divides_impl(lhs, rhs, sprout::detail::complex_norm(rhs)); - } - template - inline SPROUT_CONSTEXPR sprout::complex - operator+(sprout::complex const& x) { - return x; - } - template - inline SPROUT_CONSTEXPR sprout::complex - operator-(sprout::complex const& x) { - return sprout::complex(-x.real(), -x.imag()); - } - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::complex const& lhs, sprout::complex const& rhs) { - return lhs.real() == rhs.real() && lhs.imag() == rhs.imag(); - } - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::complex const& lhs, T const& rhs) { - return lhs.real() == rhs && lhs.imag() == T(); - } - template - inline SPROUT_CONSTEXPR bool - operator==(T const& lhs, sprout::complex const& rhs) { - return lhs == rhs.real() && T() == rhs.imag(); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::complex const& lhs, sprout::complex const& rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::complex const& lhs, T const& rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(T const& lhs, sprout::complex const& rhs) { - return !(lhs == rhs); - } -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_ARITHMETIC_OPERATORS_HPP diff --git a/dsp/lib/sprout/sprout/complex/asin.hpp b/dsp/lib/sprout/sprout/complex/asin.hpp deleted file mode 100644 index 73c98c9..0000000 --- a/dsp/lib/sprout/sprout/complex/asin.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_ASIN_HPP -#define SPROUT_COMPLEX_ASIN_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // asin - // - // casin(z) = -i casinh(iz) - // - template - inline SPROUT_CONSTEXPR sprout::complex - asin(sprout::complex const& x) { - return -sprout::perp(sprout::asinh(sprout::perp(x))); - } -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_ASIN_HPP diff --git a/dsp/lib/sprout/sprout/complex/asinh.hpp b/dsp/lib/sprout/sprout/complex/asinh.hpp deleted file mode 100644 index eec4528..0000000 --- a/dsp/lib/sprout/sprout/complex/asinh.hpp +++ /dev/null @@ -1,65 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_ASINH_HPP -#define SPROUT_COMPLEX_ASINH_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // asinh - // - // G.6.2.2 The casinh functions - // casinh(conj(z)) = conj(casinh(z)) and casinh is odd. - // casinh(+0 + i0) returns 0 + i0. - // casinh(x + i) returns ++ ip /2 for positive-signed finite x. - // casinh(x + iNaN) returns NaN + iNaN and optionally raises the eeinvalidff floating-point exception, for finite x. - // casinh(++ iy) returns ++ i0 for positive-signed finite y. - // casinh(++ i) returns ++ ip /4. - // casinh(++ iNaN) returns ++ iNaN. - // casinh(NaN + i0) returns NaN + i0. - // casinh(NaN + iy) returns NaN + iNaN and optionally raises the eeinvalidff floating-point exception, for finite nonzero y. - // casinh(NaN + i) returns }+ iNaN (where the sign of the real part of the result is unspecified). - // casinh(NaN + iNaN) returns NaN + iNaN. - // - template - inline SPROUT_CONSTEXPR sprout::complex - asinh(sprout::complex const& x) { - typedef sprout::complex type; - return sprout::math::isnan(x.real()) - ? sprout::math::isnan(x.imag()) ? x - : sprout::math::isinf(x.imag()) ? type(x.imag(), x.real()) - : x.imag() == 0 ? x - : type(x.real(), x.real()) - : sprout::math::isnan(x.imag()) - ? sprout::math::isinf(x.real()) ? x - : type(sprout::math::copysign(sprout::numeric_limits::quiet_NaN(), x.real()), x.imag()) - : sprout::math::isinf(x.real()) - ? x.imag() == sprout::numeric_limits::infinity() ? type(x.real(), sprout::math::quarter_pi()) - : x.imag() == -sprout::numeric_limits::infinity() ? type(x.real(), -sprout::math::quarter_pi()) - : x.imag() == 0 ? x - : type(x.real(), (x.imag() == 0 ? x.imag() : sprout::math::copysign(T(0), x.imag()))) - : sprout::math::isinf(x.imag()) ? type( - sprout::math::copysign(sprout::numeric_limits::infinity(), x.real()), - sprout::math::copysign(sprout::math::half_pi(), x.imag()) - ) - : x.real() == 0 && x.imag() == 0 ? x - : sprout::log(sprout::sqrt(type((x.real() - x.imag()) * (x.real() + x.imag()) + T(1), T(2) * x.real() * x.imag())) + x) - ; - } -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_ASINH_HPP diff --git a/dsp/lib/sprout/sprout/complex/atan.hpp b/dsp/lib/sprout/sprout/complex/atan.hpp deleted file mode 100644 index 0e1abab..0000000 --- a/dsp/lib/sprout/sprout/complex/atan.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_ATAN_HPP -#define SPROUT_COMPLEX_ATAN_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // atan - // - // catan(z) = -i catanh(iz) - // - template - inline SPROUT_CONSTEXPR sprout::complex - atan(sprout::complex const& x) { - return -sprout::perp(sprout::atanh(sprout::perp(x))); - } -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_ATAN_HPP diff --git a/dsp/lib/sprout/sprout/complex/atanh.hpp b/dsp/lib/sprout/sprout/complex/atanh.hpp deleted file mode 100644 index 71b65d0..0000000 --- a/dsp/lib/sprout/sprout/complex/atanh.hpp +++ /dev/null @@ -1,63 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_ATANH_HPP -#define SPROUT_COMPLEX_ATANH_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // atanh - // - // G.6.2.3 The catanh functions - // catanh(conj(z)) = conj(catanh(z)) and catanh is odd. - // catanh(+0 + i0) returns +0 + i0. - // catanh(+0 + iNaN) returns +0 + iNaN. - // catanh(+1 + i0) returns ++ i0 and raises the eedivide-by-zeroff floating-point exception. - // catanh(x + i) returns +0 + ip /2, for finite positive-signed x. - // catanh(x + iNaN) returns NaN + iNaN and optionally raises the eeinvalidff floating-point exception, for nonzero finite x. - // catanh(++ iy) returns +0 + ip /2, for finite positive-signed y. - // catanh(++ i) returns +0 + ip /2. - // catanh(++ iNaN) returns +0 + iNaN. - // catanh(NaN + iy) returns NaN + iNaN and optionally raises the eeinvalidff floating-point exception, for finite y. - // catanh(NaN + i) returns }0 + ip /2 (where the sign of the real part of the result is unspecified). - // catanh(NaN + iNaN) returns NaN + iNaN. - // - template - inline SPROUT_CONSTEXPR sprout::complex - atanh(sprout::complex const& x) { - typedef sprout::complex type; - return sprout::math::isnan(x.real()) - ? sprout::math::isnan(x.imag()) ? type(x.imag(), x.imag()) - : sprout::math::isinf(x.imag()) ? type(sprout::math::copysign(T(0), x.real()), sprout::math::copysign(sprout::math::half_pi(), x.imag())) - : type(x.real(), x.real()) - : sprout::math::isnan(x.imag()) - ? sprout::math::isinf(x.real()) ? type(sprout::math::copysign(T(0), x.real()), x.imag()) - : x.real() == 0 ? x - : type(x.imag(), x.imag()) - : sprout::math::isinf(x.real()) || sprout::math::isinf(x.imag()) - ? type(sprout::math::copysign(T(0), x.real()), sprout::math::copysign(sprout::math::half_pi(), x.imag())) - : x.real() == 0 && x.imag() == 0 ? x - : (x.real() == 1 || x.real() == -1) && x.imag() == 0 ? type(sprout::math::copysign(sprout::numeric_limits::infinity(), x.real()), x.imag()) - : (sprout::log(T(1) + x) - sprout::log(T(1) - x)) / T(2) - ; - } -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_ATANH_HPP diff --git a/dsp/lib/sprout/sprout/complex/complex.hpp b/dsp/lib/sprout/sprout/complex/complex.hpp deleted file mode 100644 index a7f22b5..0000000 --- a/dsp/lib/sprout/sprout/complex/complex.hpp +++ /dev/null @@ -1,236 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_COMPLEX_HPP -#define SPROUT_COMPLEX_COMPLEX_HPP - -#include -#include -#include - -namespace sprout { - template - class complex; - - namespace detail { - template - inline SPROUT_CONSTEXPR typename Complex::value_type - complex_norm(Complex const& x) { - return x.real() * x.real() + x.imag() * x.imag(); - } - } // namespace detail - - // - // complex - // - template - class complex { - private: - typedef sprout::array array_type; - public: - typedef T value_type; - typedef typename array_type::iterator iterator; - typedef typename array_type::const_iterator const_iterator; - typedef typename array_type::reference reference; - typedef typename array_type::const_reference const_reference; - typedef typename array_type::size_type size_type; - typedef typename array_type::pointer pointer; - typedef typename array_type::const_pointer const_pointer; - typedef typename array_type::reverse_iterator reverse_iterator; - typedef typename array_type::const_reverse_iterator const_reverse_iterator; - public: - SPROUT_STATIC_CONSTEXPR size_type static_size = array_type::static_size; - private: - array_type elems_; - public: - SPROUT_CONSTEXPR complex(T const& re = T(), T const& im = T()) SPROUT_NOEXCEPT - : elems_{{re, im}} - {} - SPROUT_CXX14_CONSTEXPR complex(complex const&) = default; - template - SPROUT_CONSTEXPR complex(complex const& other) SPROUT_NOEXCEPT - : elems_{{other.real(), other.imag()}} - {} - template - SPROUT_CONSTEXPR complex(std::complex const& other) SPROUT_NOEXCEPT - : elems_{{other.real(), other.imag()}} - {} - SPROUT_CONSTEXPR T const& real() const SPROUT_NOEXCEPT { - return elems_[0]; - } - SPROUT_CXX14_CONSTEXPR T& real() SPROUT_NOEXCEPT { - return elems_[0]; - } - SPROUT_CXX14_CONSTEXPR void real(T re) SPROUT_NOEXCEPT { - elems_[0] = re; - } - SPROUT_CONSTEXPR T const& imag() const SPROUT_NOEXCEPT { - return elems_[1]; - } - SPROUT_CXX14_CONSTEXPR T& imag() SPROUT_NOEXCEPT { - return elems_[1]; - } - SPROUT_CXX14_CONSTEXPR void imag(T im) SPROUT_NOEXCEPT { - elems_[1] = im; - } - SPROUT_CXX14_CONSTEXPR complex& operator=(T const& rhs) SPROUT_NOEXCEPT { - real() = rhs; - imag() = T(); - return *this; - } - SPROUT_CXX14_CONSTEXPR complex& operator+=(T const& rhs) SPROUT_NOEXCEPT { - real() += rhs; - return *this; - } - SPROUT_CXX14_CONSTEXPR complex& operator-=(T const& rhs) SPROUT_NOEXCEPT { - real() -= rhs; - return *this; - } - SPROUT_CXX14_CONSTEXPR complex& operator*=(T const& rhs) SPROUT_NOEXCEPT { - real() *= rhs; - imag() *= rhs; - return *this; - } - SPROUT_CXX14_CONSTEXPR complex& operator/=(T const& rhs) SPROUT_NOEXCEPT { - real() /= rhs; - imag() /= rhs; - return *this; - } - SPROUT_CXX14_CONSTEXPR complex& operator=(complex const& rhs) SPROUT_NOEXCEPT { - real() = rhs.real(); - imag() = rhs.imag(); - return *this; - } - template - SPROUT_CXX14_CONSTEXPR complex& operator=(complex const& rhs) SPROUT_NOEXCEPT { - real() = rhs.real(); - imag() = rhs.imag(); - return *this; - } - template - SPROUT_CXX14_CONSTEXPR complex& operator+=(complex const& rhs) SPROUT_NOEXCEPT { - real() += rhs.real(); - imag() += rhs.imag(); - return *this; - } - template - SPROUT_CXX14_CONSTEXPR complex& operator-=(complex const& rhs) SPROUT_NOEXCEPT { - real() -= rhs.real(); - imag() -= rhs.imag(); - return *this; - } - template - SPROUT_CXX14_CONSTEXPR complex& operator*=(complex const& rhs) SPROUT_NOEXCEPT { - return *this = complex( - real() * rhs.real() - imag() * rhs.imag(), - real() * rhs.imag() + imag() * rhs.real() - ); - } - template - SPROUT_CXX14_CONSTEXPR complex& operator/=(complex const& rhs) SPROUT_NOEXCEPT { - T n = sprout::detail::complex_norm(rhs); - return *this = complex( - (real() * rhs.real() + imag() * rhs.imag()) / n, - (imag() * rhs.real() - real() * rhs.imag()) / n - ); - } - // iterators: - SPROUT_CXX14_CONSTEXPR iterator begin() SPROUT_NOEXCEPT { - return elems_.begin(); - } - SPROUT_CONSTEXPR const_iterator begin() const SPROUT_NOEXCEPT { - return elems_.begin(); - } - SPROUT_CXX14_CONSTEXPR iterator end() SPROUT_NOEXCEPT { - return elems_.end(); - } - SPROUT_CONSTEXPR const_iterator end() const SPROUT_NOEXCEPT { - return elems_.end(); - } - SPROUT_CXX14_CONSTEXPR reverse_iterator rbegin() SPROUT_NOEXCEPT { - return elems_.rbegin(); - } - SPROUT_CONSTEXPR const_reverse_iterator rbegin() const SPROUT_NOEXCEPT { - return elems_.rbegin(); - } - SPROUT_CXX14_CONSTEXPR reverse_iterator rend() SPROUT_NOEXCEPT { - return elems_.rend(); - } - SPROUT_CONSTEXPR const_reverse_iterator rend() const SPROUT_NOEXCEPT { - return elems_.rend(); - } - SPROUT_CONSTEXPR const_iterator cbegin() const SPROUT_NOEXCEPT { - return elems_.cbegin(); - } - SPROUT_CONSTEXPR const_iterator cend() const SPROUT_NOEXCEPT { - return elems_.cbegin(); - } - SPROUT_CONSTEXPR const_reverse_iterator crbegin() const SPROUT_NOEXCEPT { - return elems_.crbegin(); - } - SPROUT_CONSTEXPR const_reverse_iterator crend() const SPROUT_NOEXCEPT { - return elems_.crend(); - } - // capacity: - SPROUT_CONSTEXPR size_type size() const SPROUT_NOEXCEPT { - return elems_.size(); - } - SPROUT_CONSTEXPR size_type max_size() const SPROUT_NOEXCEPT { - return elems_.max_size(); - } - SPROUT_CONSTEXPR bool empty() const SPROUT_NOEXCEPT { - return elems_.empty(); - } - // element access: - SPROUT_CXX14_CONSTEXPR reference operator[](size_type i) { - return elems_[i]; - } - SPROUT_CONSTEXPR const_reference operator[](size_type i) const { - return elems_[i]; - } - SPROUT_CXX14_CONSTEXPR reference at(size_type i) { - return elems_.at(i); - } - SPROUT_CONSTEXPR const_reference at(size_type i) const { - return elems_.at(i); - } - SPROUT_CXX14_CONSTEXPR reference front() { - return elems_.front(); - } - SPROUT_CONSTEXPR const_reference front() const { - return elems_.front(); - } - SPROUT_CXX14_CONSTEXPR reference back() { - return elems_.back(); - } - SPROUT_CONSTEXPR const_reference back() const { - return elems_.back(); - } - - SPROUT_CXX14_CONSTEXPR pointer data() SPROUT_NOEXCEPT { - return elems_.data(); - } - SPROUT_CONSTEXPR const_pointer data() const SPROUT_NOEXCEPT { - return elems_.data(); - } - SPROUT_CXX14_CONSTEXPR pointer c_array() SPROUT_NOEXCEPT { - return elems_.c_array(); - } - SPROUT_CONSTEXPR const_pointer c_array() const SPROUT_NOEXCEPT { - return elems_.c_array(); - } - - template - SPROUT_EXPLICIT_CONVERSION SPROUT_CONSTEXPR operator std::complex() const SPROUT_NOEXCEPT { - return std::complex(real(), imag()); - } - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::complex::size_type sprout::complex::static_size; -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_COMPLEX_HPP diff --git a/dsp/lib/sprout/sprout/complex/conj.hpp b/dsp/lib/sprout/sprout/complex/conj.hpp deleted file mode 100644 index 710a86d..0000000 --- a/dsp/lib/sprout/sprout/complex/conj.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_CONJ_HPP -#define SPROUT_COMPLEX_CONJ_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // conj - // - template - inline SPROUT_CONSTEXPR sprout::complex - conj(sprout::complex const& x) { - return sprout::complex(x.real(), -x.imag()); - } - template< - typename ArithmeticType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::complex_promote::type - conj(ArithmeticType x) { - typedef typename sprout::complex_promote::type type; - return type(x); - } -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_CONJ_HPP diff --git a/dsp/lib/sprout/sprout/complex/container.hpp b/dsp/lib/sprout/sprout/complex/container.hpp deleted file mode 100644 index af49bcc..0000000 --- a/dsp/lib/sprout/sprout/complex/container.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_CONTAINER_HPP -#define SPROUT_COMPLEX_CONTAINER_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // container_construct_traits - // - template - struct container_construct_traits > { - public: - typedef sprout::complex copied_type; - public: - template - static SPROUT_CONSTEXPR copied_type - deep_copy(Cont&& cont) { - return SPROUT_FORWARD(Cont, cont); - } - template - static SPROUT_CONSTEXPR copied_type - make(Args&&... args) { - return copied_type(SPROUT_FORWARD(Args, args)...); - } - template - static SPROUT_CONSTEXPR copied_type - remake(Cont&&, typename sprout::container_traits >::difference_type, Args&&... args) { - return copied_type(SPROUT_FORWARD(Args, args)...); - } - }; - - // - // container_transform_traits - // - template - struct container_transform_traits > { - public: - template - struct rebind_type { - public: - typedef sprout::complex type; - }; - }; -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_CONTAINER_HPP diff --git a/dsp/lib/sprout/sprout/complex/cos.hpp b/dsp/lib/sprout/sprout/complex/cos.hpp deleted file mode 100644 index 968980b..0000000 --- a/dsp/lib/sprout/sprout/complex/cos.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_COS_HPP -#define SPROUT_COMPLEX_COS_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // cos - // - // ccos(z) = ccosh(iz) - // - template - inline SPROUT_CONSTEXPR sprout::complex - cos(sprout::complex const& x) { - return sprout::cosh(sprout::perp(x)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_COS_HPP diff --git a/dsp/lib/sprout/sprout/complex/cosh.hpp b/dsp/lib/sprout/sprout/complex/cosh.hpp deleted file mode 100644 index 9013f12..0000000 --- a/dsp/lib/sprout/sprout/complex/cosh.hpp +++ /dev/null @@ -1,73 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_COSH_HPP -#define SPROUT_COMPLEX_COSH_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // cosh - // - // G.6.2.4 The ccosh functions - // ccosh(conj(z)) = conj(ccosh(z)) and ccosh is even. - // ccosh(+0 + i0) returns 1 + i0. - // ccosh(+0 + i) returns NaN } i0 (where the sign of the imaginary part of the result is unspecified) and raises the eeinvalidff floating-point exception. - // ccosh(+0 + iNaN) returns NaN } i0 (where the sign of the imaginary part of the result is unspecified). - // ccosh(x + i) returns NaN + iNaN and raises the eeinvalidff floating-point exception, for finite nonzero x. - // ccosh(x + iNaN) returns NaN + iNaN and optionally raises the eeinvalidff floating-point exception, for finite nonzero x. - // ccosh(++ i0) returns ++ i0. - // ccosh(++ iy) returns + cis(y), for finite nonzero y. - // ccosh(++ i) returns }+ iNaN (where the sign of the real part of the result is unspecified) and raises the eeinvalidff floating-point exception. - // ccosh(++ iNaN) returns ++ iNaN. - // ccosh(NaN + i0) returns NaN } i0 (where the sign of the imaginary part of the result is unspecified). - // ccosh(NaN + iy) returns NaN + iNaN and optionally raises the eeinvalidff floating-point exception, for all nonzero numbers y. - // ccosh(NaN + iNaN) returns NaN + iNaN. - // - template - inline SPROUT_CONSTEXPR sprout::complex - cosh(sprout::complex const& x) { - typedef sprout::complex type; - return sprout::math::isnan(x.real()) - ? sprout::math::isnan(x.imag()) ? type(x.real(), x.real()) - : x.imag() == 0 ? type(sprout::numeric_limits::quiet_NaN(), x.imag()) - : type(x.real(), x.real()) - : sprout::math::isnan(x.imag()) - ? sprout::math::isinf(x.real()) ? type(sprout::numeric_limits::infinity(), sprout::numeric_limits::quiet_NaN()) - : x.real() == 0 ? type(sprout::numeric_limits::quiet_NaN(), x.real()) - : type(x.imag(), x.imag()) - : x.real() == sprout::numeric_limits::infinity() - ? sprout::math::isinf(x.imag()) ? type(sprout::numeric_limits::infinity(), sprout::numeric_limits::quiet_NaN()) - : x.imag() == 0 ? type(sprout::numeric_limits::infinity(), x.imag()) - : sprout::detail::copysign_mul(sprout::numeric_limits::infinity(), sprout::euler(x.imag())) - : x.real() == -sprout::numeric_limits::infinity() - ? sprout::math::isinf(x.imag()) ? type(sprout::numeric_limits::infinity(), sprout::numeric_limits::quiet_NaN()) - : x.imag() == 0 ? type(sprout::numeric_limits::infinity(), x.imag()) // ???? GCC or Clang - : sprout::detail::copysign_mul(sprout::numeric_limits::infinity(), sprout::euler(-x.imag())) - : sprout::math::isinf(x.imag()) - ? x.real() == 0 ? type(sprout::numeric_limits::quiet_NaN(), x.real()) - : type(-sprout::numeric_limits::quiet_NaN(), -sprout::numeric_limits::quiet_NaN()) - : x.real() == 0 && x.imag() == 0 ? type(T(1), x.imag()) - : type(sprout::math::cosh(x.real()) * sprout::math::cos(x.imag()), sprout::math::sinh(x.real()) * sprout::math::sin(x.imag())) - ; - } -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_COSH_HPP diff --git a/dsp/lib/sprout/sprout/complex/detail/copysign_mul.hpp b/dsp/lib/sprout/sprout/complex/detail/copysign_mul.hpp deleted file mode 100644 index 00df1da..0000000 --- a/dsp/lib/sprout/sprout/complex/detail/copysign_mul.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_DETAIL_COPYSIGN_MUL_HPP -#define SPROUT_COMPLEX_DETAIL_COPYSIGN_MUL_HPP - -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::complex - copysign_mul(T const& t, sprout::complex const& z) { - return sprout::complex( - sprout::math::copysign(t, z.real()), - sprout::math::copysign(t, z.imag()) - ); - } - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_DETAIL_COPYSIGN_MUL_HPP diff --git a/dsp/lib/sprout/sprout/complex/euler.hpp b/dsp/lib/sprout/sprout/complex/euler.hpp deleted file mode 100644 index eb5ada6..0000000 --- a/dsp/lib/sprout/sprout/complex/euler.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_EULER_HPP -#define SPROUT_COMPLEX_EULER_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // euler - // - template - inline SPROUT_CONSTEXPR sprout::complex - euler(T const& theta) { - return sprout::complex(sprout::math::cos(theta), sprout::math::sin(theta)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_EULER_HPP diff --git a/dsp/lib/sprout/sprout/complex/exp.hpp b/dsp/lib/sprout/sprout/complex/exp.hpp deleted file mode 100644 index aaa0a50..0000000 --- a/dsp/lib/sprout/sprout/complex/exp.hpp +++ /dev/null @@ -1,70 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_EXP_HPP -#define SPROUT_COMPLEX_EXP_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // exp - // - // G.6.3.1 The cexp functions - // cexp(conj(z)) = conj(cexp(z)). - // cexp(}0 + i0) returns 1 + i0. - // cexp(x + i) returns NaN + iNaN and raises the eeinvalidff floating-point exception, for finite x. - // cexp(x + iNaN) returns NaN + iNaN and optionally raises the eeinvalidff floating-point exception, for finite x. - // cexp(++ i0) returns ++ i0. - // cexp(-+ iy) returns +0 cis(y), for finite y. - // cexp(++ iy) returns + cis(y), for finite nonzero y. - // cexp(-+ i) returns }0 } i0 (where the signs of the real and imaginary parts of the result are unspecified). - // cexp(++ i) returns }+ iNaN and raises the eeinvalidff floating-point exception (where the sign of the real part of the result is unspecified). - // cexp(-+ iNaN) returns }0 } i0 (where the signs of the real and imaginary parts of the result are unspecified). - // cexp(++ iNaN) returns }+ iNaN (where the sign of the real part of the result is unspecified). - // cexp(NaN + i0) returns NaN + i0. - // cexp(NaN + iy) returns NaN + iNaN and optionally raises the eeinvalidff floating-point exception, for all non-zero numbers y. - // cexp(NaN + iNaN) returns NaN + iNaN. - // - template - inline SPROUT_CONSTEXPR sprout::complex - exp(sprout::complex const& x) { - typedef sprout::complex type; - return sprout::math::isnan(x.real()) - ? sprout::math::isnan(x.imag()) ? type(x.real(), x.real()) - : x.imag() == 0 ? type(x.real(), x.imag()) - : type(x.real(), x.real()) - : sprout::math::isnan(x.imag()) - ? x.real() == sprout::numeric_limits::infinity() ? type(x.real(), x.imag()) - : x.real() == -sprout::numeric_limits::infinity() ? type(T(0), T(0)) - : sprout::math::isinf(x.real()) ? type(sprout::numeric_limits::infinity(), sprout::numeric_limits::quiet_NaN()) - : type(x.imag(), x.imag()) - : x.real() == sprout::numeric_limits::infinity() - ? sprout::math::isinf(x.imag()) ? type(sprout::numeric_limits::infinity(), sprout::numeric_limits::quiet_NaN()) - : x.imag() == 0 ? type(sprout::numeric_limits::infinity(), x.imag()) - : sprout::detail::copysign_mul(sprout::numeric_limits::infinity(), sprout::euler(x.imag())) - : x.real() == -sprout::numeric_limits::infinity() - ? sprout::math::isinf(x.imag()) ? type(T(0), T(0)) - : T(0) * sprout::euler(x.imag()) - : sprout::math::isinf(x.imag()) - ? type(-sprout::numeric_limits::quiet_NaN(), -sprout::numeric_limits::quiet_NaN()) - : x.real() == 0 && x.imag() == 0 ? type(T(1), x.imag()) - : sprout::polar(sprout::math::exp(x.real()), x.imag()) - ; - } -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_EXP_HPP diff --git a/dsp/lib/sprout/sprout/complex/hash.hpp b/dsp/lib/sprout/sprout/complex/hash.hpp deleted file mode 100644 index 21b2b55..0000000 --- a/dsp/lib/sprout/sprout/complex/hash.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_HASH_HPP -#define SPROUT_COMPLEX_HASH_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // hash_value - // - template - inline SPROUT_CONSTEXPR std::size_t - hash_value(sprout::complex const& v) { - return sprout::hash_values(v.real(), v.imag()); - } -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // hash - // - template - struct hash > - : public sprout::hash > - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -#endif // #ifndef SPROUT_COMPLEX_HASH_HPP diff --git a/dsp/lib/sprout/sprout/complex/imag.hpp b/dsp/lib/sprout/sprout/complex/imag.hpp deleted file mode 100644 index 8b08ea2..0000000 --- a/dsp/lib/sprout/sprout/complex/imag.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_IMAG_HPP -#define SPROUT_COMPLEX_IMAG_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // imag - // - template - inline SPROUT_CONSTEXPR T const& - imag(sprout::complex const& x) { - return x.imag(); - } - template - inline SPROUT_CONSTEXPR T& - imag(sprout::complex& x) { - return x.imag(); - } - template< - typename ArithmeticType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::float_promote::type - imag(ArithmeticType) { - return 0; - } -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_IMAG_HPP diff --git a/dsp/lib/sprout/sprout/complex/literals.hpp b/dsp/lib/sprout/sprout/complex/literals.hpp deleted file mode 100644 index a363896..0000000 --- a/dsp/lib/sprout/sprout/complex/literals.hpp +++ /dev/null @@ -1,71 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_LITERALS_HPP -#define SPROUT_COMPLEX_LITERALS_HPP - -#include -#include -#include - -#if SPROUT_USE_USER_DEFINED_LITERALS - -namespace sprout { - namespace literals { - namespace complex { - // - // _i - // - inline SPROUT_CONSTEXPR sprout::complex - operator"" _i(long double x) { - return sprout::complex(0, x); - } - - // - // _if - // _iF - // - inline SPROUT_CONSTEXPR sprout::complex - operator"" _if(long double x) { - return sprout::complex(0, static_cast(x)); - } - inline SPROUT_CONSTEXPR sprout::complex - operator"" _iF(long double x) { - return sprout::complex(0, static_cast(x)); - } - - // - // _il - // _iL - // - inline SPROUT_CONSTEXPR sprout::complex - operator"" _il(long double x) { - return sprout::complex(0, x); - } - inline SPROUT_CONSTEXPR sprout::complex - operator"" _iL(long double x) { - return sprout::complex(0, x); - } - } // namespace complex - - using sprout::literals::complex::operator"" _i; - using sprout::literals::complex::operator"" _if; - using sprout::literals::complex::operator"" _iF; - using sprout::literals::complex::operator"" _il; - using sprout::literals::complex::operator"" _iL; - } // namespace literals - - using sprout::literals::complex::operator"" _i; - using sprout::literals::complex::operator"" _if; - using sprout::literals::complex::operator"" _iF; - using sprout::literals::complex::operator"" _il; - using sprout::literals::complex::operator"" _iL; -} // namespace sprout - -#endif // #if SPROUT_USE_USER_DEFINED_LITERALS - -#endif // #ifndef SPROUT_COMPLEX_LITERALS_HPP diff --git a/dsp/lib/sprout/sprout/complex/log.hpp b/dsp/lib/sprout/sprout/complex/log.hpp deleted file mode 100644 index d7765d8..0000000 --- a/dsp/lib/sprout/sprout/complex/log.hpp +++ /dev/null @@ -1,70 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_LOG_HPP -#define SPROUT_COMPLEX_LOG_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // log - // - // G.6.3.2 The clog functions - // clog(conj(z)) = conj(clog(z)). - // clog(-0 + i0) returns -+ ip and raises the eedivide-by-zeroff floating-point exception. - // clog(+0 + i0) returns -+ i0 and raises the eedivide-by-zeroff floating-point exception. - // clog(x + i) returns ++ ip /2, for finite x. - // clog(x + iNaN) returns NaN + iNaN and optionally raises the eeinvalidff floating-point exception, for finite x. - // clog(-+ iy) returns ++ ip , for finite positive-signed y. - // clog(++ iy) returns ++ i0, for finite positive-signed y. - // clog(-+ i) returns ++ i3p /4. - // clog(++ i) returns ++ ip /4. - // clog(}+ iNaN) returns ++ iNaN. - // clog(NaN + iy) returns NaN + iNaN and optionally raises the eeinvalidff floating-point exception, for finite y. - // clog(NaN + i) returns ++ iNaN. - // clog(NaN + iNaN) returns NaN + iNaN. - // - template - inline SPROUT_CONSTEXPR sprout::complex - log(sprout::complex const& x) { - typedef sprout::complex type; - return sprout::math::isnan(x.real()) - ? sprout::math::isnan(x.imag()) ? type(sprout::numeric_limits::quiet_NaN(), x.real()) - : sprout::math::isinf(x.imag()) ? type(sprout::numeric_limits::infinity(), x.real()) - : type(sprout::numeric_limits::quiet_NaN(), x.real()) - : sprout::math::isnan(x.imag()) - ? sprout::math::isinf(x.real()) ? type(sprout::numeric_limits::infinity(), x.imag()) - : type(sprout::numeric_limits::quiet_NaN(), x.imag()) - : x.real() == sprout::numeric_limits::infinity() - ? x.imag() == sprout::numeric_limits::infinity() ? type(sprout::numeric_limits::infinity(), sprout::math::quarter_pi()) - : x.imag() == -sprout::numeric_limits::infinity() ? type(sprout::numeric_limits::infinity(), -sprout::math::quarter_pi()) - : type(sprout::numeric_limits::infinity(), (x.imag() == 0 ? x.imag() : sprout::math::copysign(T(0), x.imag()))) - : x.real() == -sprout::numeric_limits::infinity() - ? x.imag() == sprout::numeric_limits::infinity() ? type(sprout::numeric_limits::infinity(), sprout::math::three_quarters_pi()) - : x.imag() == -sprout::numeric_limits::infinity() ? type(sprout::numeric_limits::infinity(), -sprout::math::three_quarters_pi()) - : type(sprout::numeric_limits::infinity(), sprout::math::copysign(sprout::math::pi(), x.imag())) - : sprout::math::isinf(x.imag()) ? type(sprout::numeric_limits::infinity(), sprout::math::copysign(sprout::math::half_pi(), x.imag())) - : x.real() == 0 && x.imag() == 0 - ? sprout::math::signbit(x.real()) ? type(-sprout::numeric_limits::infinity(), sprout::math::copysign(sprout::math::pi(), x.imag())) - : type(-sprout::numeric_limits::infinity(), x.imag()) - : type(sprout::math::log(sprout::abs(x)), sprout::arg(x)) - ; - } -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_LOG_HPP diff --git a/dsp/lib/sprout/sprout/complex/log10.hpp b/dsp/lib/sprout/sprout/complex/log10.hpp deleted file mode 100644 index 0920f7f..0000000 --- a/dsp/lib/sprout/sprout/complex/log10.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_LOG10_HPP -#define SPROUT_COMPLEX_LOG10_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // log10 - // - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::complex - log10_impl(sprout::complex const& z) { - return sprout::math::isnan(z.real()) || sprout::math::isnan(z.imag()) ? z - : z / sprout::math::ln_ten() - ; - } - } // namespace detail - template - inline SPROUT_CONSTEXPR sprout::complex - log10(sprout::complex const& x) { - return sprout::detail::log10_impl(sprout::log(x)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_LOG10_HPP diff --git a/dsp/lib/sprout/sprout/complex/log2.hpp b/dsp/lib/sprout/sprout/complex/log2.hpp deleted file mode 100644 index 57125a5..0000000 --- a/dsp/lib/sprout/sprout/complex/log2.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_LOG2_HPP -#define SPROUT_COMPLEX_LOG2_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // log2 - // - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::complex - log2_impl(sprout::complex const& z) { - return sprout::math::isnan(z.real()) || sprout::math::isnan(z.imag()) ? z - : z / sprout::math::ln_two() - ; - } - } // namespace detail - template - inline SPROUT_CONSTEXPR sprout::complex - log2(sprout::complex const& x) { - return sprout::detail::log2_impl(sprout::log(x)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_LOG2_HPP diff --git a/dsp/lib/sprout/sprout/complex/nearest.hpp b/dsp/lib/sprout/sprout/complex/nearest.hpp deleted file mode 100644 index 942d56e..0000000 --- a/dsp/lib/sprout/sprout/complex/nearest.hpp +++ /dev/null @@ -1,53 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_NEAREST_HPP -#define SPROUT_COMPLEX_NEAREST_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // ceil - // - template - inline SPROUT_CONSTEXPR sprout::complex - ceil(sprout::complex const& x) { - return sprout::complex(sprout::math::ceil(x.real()), sprout::math::ceil(x.imag())); - } - // - // floor - // - template - inline SPROUT_CONSTEXPR sprout::complex - floor(sprout::complex const& x) { - return sprout::complex(sprout::math::floor(x.real()), sprout::math::floor(x.imag())); - } - // - // trunc - // - template - inline SPROUT_CONSTEXPR sprout::complex - trunc(sprout::complex const& x) { - return sprout::complex(sprout::math::trunc(x.real()), sprout::math::trunc(x.imag())); - } - // - // round - // - template - inline SPROUT_CONSTEXPR sprout::complex - round(sprout::complex const& x) { - return sprout::complex(sprout::math::round(x.real()), sprout::math::round(x.imag())); - } -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_NEAREST_HPP diff --git a/dsp/lib/sprout/sprout/complex/norm.hpp b/dsp/lib/sprout/sprout/complex/norm.hpp deleted file mode 100644 index cd26b6c..0000000 --- a/dsp/lib/sprout/sprout/complex/norm.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_NORM_HPP -#define SPROUT_COMPLEX_NORM_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // norm - // - template - inline SPROUT_CONSTEXPR T - norm(sprout::complex const& x) { - return sprout::math::isinf(x.imag()) || sprout::math::isinf(x.real()) ? sprout::numeric_limits::infinity() - : sprout::math::isnan(x.real()) ? x.real() - : sprout::math::isnan(x.imag()) ? x.imag() - : x.real() * x.real() + x.imag() * x.imag() - ; - } - template< - typename ArithmeticType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::float_promote::type - norm(ArithmeticType x) { - typedef typename sprout::float_promote::type type; - return sprout::math::isinf(x) ? sprout::numeric_limits::infinity() - : sprout::math::isnan(x) ? type(x) - : type(x) * type(x) - ; - } -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_NORM_HPP diff --git a/dsp/lib/sprout/sprout/complex/operators.hpp b/dsp/lib/sprout/sprout/complex/operators.hpp deleted file mode 100644 index 62cf934..0000000 --- a/dsp/lib/sprout/sprout/complex/operators.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_OPERATORS_HPP -#define SPROUT_COMPLEX_OPERATORS_HPP - -#include -#include - -#endif // #ifndef SPROUT_COMPLEX_OPERATORS_HPP - diff --git a/dsp/lib/sprout/sprout/complex/perp.hpp b/dsp/lib/sprout/sprout/complex/perp.hpp deleted file mode 100644 index c87bb96..0000000 --- a/dsp/lib/sprout/sprout/complex/perp.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_PERP_HPP -#define SPROUT_COMPLEX_PERP_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // perp - // - template - inline SPROUT_CONSTEXPR sprout::complex - perp(sprout::complex const& x) { - return sprout::complex(-x.imag(), x.real()); - } - template< - typename ArithmeticType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::complex_promote::type - perp(ArithmeticType x) { - typedef typename sprout::complex_promote::type type; - typedef typename type::value_type value_type; - return type(-value_type(0), value_type(x)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_PERP_HPP diff --git a/dsp/lib/sprout/sprout/complex/polar.hpp b/dsp/lib/sprout/sprout/complex/polar.hpp deleted file mode 100644 index dadd696..0000000 --- a/dsp/lib/sprout/sprout/complex/polar.hpp +++ /dev/null @@ -1,63 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_POLER_HPP -#define SPROUT_COMPLEX_POLER_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // polar - // - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::complex - polar_impl(T const& x, T const& y) { - return sprout::complex( - sprout::math::isnan(x) ? T() : x, - sprout::math::isnan(y) ? T() : y - ); - } - } // namespace detail - template - inline SPROUT_CONSTEXPR sprout::complex - polar(T const& rho, T const& theta = T()) { - typedef sprout::complex type; - return sprout::math::isnan(rho) || sprout::math::signbit(rho) - ? type(sprout::numeric_limits::quiet_NaN(), sprout::numeric_limits::quiet_NaN()) - : sprout::math::isnan(theta) - ? sprout::math::isinf(rho) ? type(rho, theta) - : type(theta, theta) - : sprout::math::isinf(theta) - ? sprout::math::isinf(rho) ? type(rho, sprout::numeric_limits::quiet_NaN()) - : type(sprout::numeric_limits::quiet_NaN(), sprout::numeric_limits::quiet_NaN()) - : sprout::detail::polar_impl(rho * sprout::math::cos(theta), rho * sprout::math::sin(theta)) - ; - } - template< - typename ArithmeticType1, typename ArithmeticType2, - typename sprout::enabler_if::value && std::is_arithmetic::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::complex_promote::type - polar(ArithmeticType1 const& rho, ArithmeticType2 const& theta) { - typedef typename sprout::complex_promote::type::value_type value_type; - return sprout::polar(static_cast(rho), static_cast(theta)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_POLER_HPP diff --git a/dsp/lib/sprout/sprout/complex/pow.hpp b/dsp/lib/sprout/sprout/complex/pow.hpp deleted file mode 100644 index ef54bd7..0000000 --- a/dsp/lib/sprout/sprout/complex/pow.hpp +++ /dev/null @@ -1,59 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_POW_HPP -#define SPROUT_COMPLEX_POW_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // pow - // - // G.6.4.1 The cpow functions - // 1 The cpow functions raise floating-point exceptions if appropriate for the calculation of - // the parts of the result, and may raise spurious exceptions.317) - // - // 317) This allows cpow(z, c) to be implemented as cexp(c clog(z)) without precluding - // implementations that treat special cases more carefully. - // - template - inline SPROUT_CONSTEXPR sprout::complex - pow(sprout::complex const& x, sprout::complex const& y) { - return x == T() ? T() - : sprout::exp(y * sprout::log(x)) - ; - } - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::complex pow_impl(sprout::complex const& t, T const& y) { - return sprout::polar(sprout::exp(y * t.real()), y * t.imag()); - } - } // namespace detail - template - inline SPROUT_CONSTEXPR sprout::complex - pow(sprout::complex const& x, T const& y) { - return x == T() ? T() - : x.imag() == T() && x.real() > T() ? sprout::math::pow(x.real(), y) - : sprout::detail::pow_impl(sprout::log(x), y) - ; - } - template - inline SPROUT_CONSTEXPR sprout::complex - pow(T const& x, sprout::complex const& y) { - return x > T() ? sprout::polar(sprout::pow(x, y.real()), y.imag() * sprout::log(x)) - : sprout::pow(sprout::complex(x), y) - ; - } -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_POW_HPP diff --git a/dsp/lib/sprout/sprout/complex/proj.hpp b/dsp/lib/sprout/sprout/complex/proj.hpp deleted file mode 100644 index 2520a43..0000000 --- a/dsp/lib/sprout/sprout/complex/proj.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_PROJ_HPP -#define SPROUT_COMPLEX_PROJ_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // proj - // - template - inline SPROUT_CONSTEXPR sprout::complex - proj(sprout::complex const& x) { - typedef sprout::complex type; - return sprout::math::isinf(x.real()) || sprout::math::isinf(x.imag()) - ? type(sprout::numeric_limits::infinity(), sprout::math::copysign(T(), x.imag())) - : x - ; - } - template< - typename ArithmeticType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::complex_promote::type - proj(ArithmeticType x) { - typedef typename sprout::complex_promote::type type; - return sprout::math::isinf(x) - ? type(sprout::numeric_limits::infinity()) - : type(x) - ; - } -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_PROJ_HPP diff --git a/dsp/lib/sprout/sprout/complex/real.hpp b/dsp/lib/sprout/sprout/complex/real.hpp deleted file mode 100644 index 60fe157..0000000 --- a/dsp/lib/sprout/sprout/complex/real.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_REAL_HPP -#define SPROUT_COMPLEX_REAL_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // real - // - template - inline SPROUT_CONSTEXPR T const& - real(sprout::complex const& x) { - return x.real(); - } - template - inline SPROUT_CONSTEXPR T& - real(sprout::complex& x) { - return x.real(); - } - template< - typename ArithmeticType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::float_promote::type - real(ArithmeticType x) { - return x; - } -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_REAL_HPP diff --git a/dsp/lib/sprout/sprout/complex/sin.hpp b/dsp/lib/sprout/sprout/complex/sin.hpp deleted file mode 100644 index 125ee9b..0000000 --- a/dsp/lib/sprout/sprout/complex/sin.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_SIN_HPP -#define SPROUT_COMPLEX_SIN_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // sin - // - // csin(z) = -i csinh(iz) - // - template - inline SPROUT_CONSTEXPR sprout::complex - sin(sprout::complex const& x) { - return -sprout::perp(sprout::sinh(sprout::perp(x))); - } -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_SIN_HPP diff --git a/dsp/lib/sprout/sprout/complex/sinh.hpp b/dsp/lib/sprout/sprout/complex/sinh.hpp deleted file mode 100644 index 6352a56..0000000 --- a/dsp/lib/sprout/sprout/complex/sinh.hpp +++ /dev/null @@ -1,73 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_SINH_HPP -#define SPROUT_COMPLEX_SINH_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // sinh - // - // G.6.2.5 The csinh functions - // csinh(conj(z)) = conj(csinh(z)) and csinh is odd. - // csinh(+0 + i0) returns +0 + i0. - // csinh(+0 + i) returns }0 + iNaN (where the sign of the real part of the result is unspecified) and raises the eeinvalidff floating-point exception. - // csinh(+0 + iNaN) returns }0 + iNaN (where the sign of the real part of the result is unspecified). - // csinh(x + i) returns NaN + iNaN and raises the eeinvalidff floating-point exception, for positive finite x. - // csinh(x + iNaN) returns NaN + iNaN and optionally raises the eeinvalidff floating-point exception, for finite nonzero x. - // csinh(++ i0) returns ++ i0. - // csinh(++ iy) returns + cis(y), for positive finite y. - // csinh(++ i) returns }+ iNaN (where the sign of the real part of the result is unspecified) and raises the eeinvalidff floating-point exception. - // csinh(++ iNaN) returns }+ iNaN (where the sign of the real part of the result is unspecified). - // csinh(NaN + i0) returns NaN + i0. - // csinh(NaN + iy) returns NaN + iNaN and optionally raises the eeinvalidff floating-point exception, for all nonzero numbers y. - // csinh(NaN + iNaN) returns NaN + iNaN. - // - template - inline SPROUT_CONSTEXPR sprout::complex - sinh(sprout::complex const& x) { - typedef sprout::complex type; - return sprout::math::isnan(x.real()) - ? sprout::math::isnan(x.imag()) ? type(x.real(), x.real()) - : sprout::math::isinf(x.imag()) ? type(x.real(), x.real()) - : x.imag() == 0 ? x - : type(x.real(), x.real()) - : sprout::math::isnan(x.imag()) - ? sprout::math::isinf(x.real()) ? type(x.real(), sprout::numeric_limits::quiet_NaN()) - : x.real() == 0 ? type(x.real(), sprout::numeric_limits::quiet_NaN()) - : type(x.imag(), x.imag()) - : x.real() == sprout::numeric_limits::infinity() - ? sprout::math::isinf(x.imag()) ? type(x.real(), sprout::numeric_limits::quiet_NaN()) - : x.imag() == 0 ? x - : sprout::detail::copysign_mul(sprout::numeric_limits::infinity(), sprout::euler(x.imag())) - : x.real() == -sprout::numeric_limits::infinity() - ? sprout::math::isinf(x.imag()) ? type(x.real(), sprout::numeric_limits::quiet_NaN()) - : x.imag() == 0 ? x - : -sprout::detail::copysign_mul(sprout::numeric_limits::infinity(), sprout::euler(-x.imag())) - : sprout::math::isinf(x.imag()) - ? x.real() == 0 ? type(x.real(), sprout::numeric_limits::quiet_NaN()) - : type(-sprout::numeric_limits::quiet_NaN(), -sprout::numeric_limits::quiet_NaN()) - : x.real() == 0 && x.imag() == 0 ? x - : type(sprout::math::sinh(x.real()) * sprout::math::cos(x.imag()), sprout::math::cosh(x.real()) * sprout::math::sin(x.imag())) - ; - } -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_SINH_HPP diff --git a/dsp/lib/sprout/sprout/complex/sqrt.hpp b/dsp/lib/sprout/sprout/complex/sqrt.hpp deleted file mode 100644 index 9a1b93e..0000000 --- a/dsp/lib/sprout/sprout/complex/sqrt.hpp +++ /dev/null @@ -1,85 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_SQRT_HPP -#define SPROUT_COMPLEX_SQRT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // sqrt - // - // G.6.4.2 The csqrt functions - // csqrt(conj(z)) = conj(csqrt(z)). - // csqrt(}0 + i0) returns +0 + i0. - // csqrt(x + i) returns ++ i, for all x (including NaN). - // csqrt(x + iNaN) returns NaN + iNaN and optionally raises the eeinvalidff floating-point exception, for finite x. - // csqrt(-+ iy) returns +0 + i, for finite positive-signed y. - // csqrt(++ iy) returns ++ i0, for finite positive-signed y. - // csqrt(-+ iNaN) returns NaN } i (where the sign of the imaginary part of the result is unspecified). - // csqrt(++ iNaN) returns ++ iNaN. - // csqrt(NaN + iy) returns NaN + iNaN and optionally raises the eeinvalidff floating-point exception, for finite y. - // csqrt(NaN + iNaN) returns NaN + iNaN. - // - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::complex - sqrt_impl_1(sprout::complex const& x, T const& t) { - return sprout::complex(t, sprout::math::signbit(x.imag()) ? -t : t); - } - template - inline SPROUT_CONSTEXPR sprout::complex - sqrt_impl_2_1(sprout::complex const& x, T const& t, T const& u) { - return x.real() > T(0) ? sprout::complex(u, x.imag() / t) - : sprout::complex(sprout::math::abs(x.imag()) / t, sprout::math::signbit(x.imag()) ? -u : u) - ; - } - template - inline SPROUT_CONSTEXPR sprout::complex - sqrt_impl_2(sprout::complex const& x, T const& t) { - return sprout::detail::sqrt_impl_2_1(x, t, t / T(2)); - } - } // namespace detail - template - inline SPROUT_CONSTEXPR sprout::complex - sqrt(sprout::complex const& x) { - typedef sprout::complex type; - return sprout::math::isinf(x.imag()) ? type(sprout::numeric_limits::infinity(), x.imag()) - : sprout::math::isnan(x.real()) - ? sprout::math::isnan(x.imag()) ? type(sprout::numeric_limits::quiet_NaN(), sprout::numeric_limits::quiet_NaN()) - : type(sprout::numeric_limits::quiet_NaN(), sprout::numeric_limits::quiet_NaN()) - : sprout::math::isnan(x.imag()) - ? x.real() == sprout::numeric_limits::infinity() - ? type(sprout::numeric_limits::infinity(), sprout::math::copysign(sprout::numeric_limits::quiet_NaN(), x.imag())) - : x.real() == -sprout::numeric_limits::infinity() - ? type( - sprout::math::copysign(sprout::numeric_limits::quiet_NaN(), x.imag()), - sprout::math::copysign(sprout::numeric_limits::infinity(), x.imag()) - ) - : type(sprout::numeric_limits::quiet_NaN(), sprout::numeric_limits::quiet_NaN()) - : x.real() == sprout::numeric_limits::infinity() - ? type(sprout::numeric_limits::infinity(), (x.imag() == 0 ? x.imag() : sprout::math::copysign(T(0), x.imag()))) - : x.real() == -sprout::numeric_limits::infinity() - ? type(T(0), sprout::math::copysign(T(0), x.imag())) - : x.real() == 0 && x.imag() == 0 ? type(T(0), x.imag()) - : x.real() == 0 ? sprout::detail::sqrt_impl_1(x, sprout::math::sqrt(sprout::math::abs(x.imag()) / T(2))) - : sprout::detail::sqrt_impl_2(x, sprout::math::sqrt(T(2) * (sprout::abs(x) + sprout::math::abs(x.real())))) - ; - } -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_SQRT_HPP diff --git a/dsp/lib/sprout/sprout/complex/stream_operators.hpp b/dsp/lib/sprout/sprout/complex/stream_operators.hpp deleted file mode 100644 index a3a1bd7..0000000 --- a/dsp/lib/sprout/sprout/complex/stream_operators.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_STREAM_OPERATORS_HPP -#define SPROUT_COMPLEX_STREAM_OPERATORS_HPP - -#include -#include -#include -#include - -namespace sprout { - template - inline SPROUT_NON_CONSTEXPR std::basic_istream& - operator>>(std::basic_istream& lhs, sprout::complex& rhs) { - T re, im; - Char ch; - lhs >> ch; - if (ch == '(') { - lhs >> re >> ch; - if (ch == ',') { - lhs >> im >> ch; - if (ch == ')') { - rhs = sprout::complex(re, im); - } else { - lhs.setstate(std::ios_base::failbit); - } - } else if (ch == ')') { - rhs = re; - } else { - lhs.setstate(std::ios_base::failbit); - } - } else { - lhs.putback(ch); - lhs >> re; - rhs = re; - } - return lhs; - } - template - inline SPROUT_NON_CONSTEXPR std::basic_ostream& - operator<<(std::basic_ostream& lhs, sprout::complex const& rhs) { - return lhs << '(' << rhs.real() << ',' << rhs.imag() << ')'; - } -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_STREAM_OPERATORS_HPP diff --git a/dsp/lib/sprout/sprout/complex/tan.hpp b/dsp/lib/sprout/sprout/complex/tan.hpp deleted file mode 100644 index de6c5c1..0000000 --- a/dsp/lib/sprout/sprout/complex/tan.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_TAN_HPP -#define SPROUT_COMPLEX_TAN_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // tan - // - // ctan(z) = -i ctanh(iz) - // - template - inline SPROUT_CONSTEXPR sprout::complex - tan(sprout::complex const& x) { - return -sprout::perp(sprout::tanh(sprout::perp(x))); - } -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_TAN_HPP diff --git a/dsp/lib/sprout/sprout/complex/tanh.hpp b/dsp/lib/sprout/sprout/complex/tanh.hpp deleted file mode 100644 index ce82dae..0000000 --- a/dsp/lib/sprout/sprout/complex/tanh.hpp +++ /dev/null @@ -1,60 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_TANH_HPP -#define SPROUT_COMPLEX_TANH_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // tanh - // - // G.6.2.6 The ctanh functions - // ctanh(conj(z)) = conj(ctanh(z))and ctanh is odd. - // ctanh(+0 + i0) returns +0 + i0. - // ctanh(x + i) returns NaN + iNaN and raises the eeinvalidff floating-point exception, for finite x. - // ctanh(x + iNaN) returns NaN + iNaN and optionally raises the eeinvalidff floating-point exception, for finite x. - // ctanh(++ iy) returns 1 + i0 sin(2y), for positive-signed finite y. - // ctanh(++ i) returns 1 } i0 (where the sign of the imaginary part of the result is unspecified). - // ctanh(++ iNaN) returns 1 } i0 (where the sign of the imaginary part of the result is unspecified). - // ctanh(NaN + i0) returns NaN + i0. - // ctanh(NaN + iy) returns NaN + iNaN and optionally raises the eeinvalidff floating-point exception, for all nonzero numbers y. - // ctanh(NaN + iNaN) returns NaN + iNaN. - // - template - inline SPROUT_CONSTEXPR sprout::complex - tanh(sprout::complex const& x) { - typedef sprout::complex type; - return sprout::math::isnan(x.real()) - ? sprout::math::isnan(x.imag()) ? x - : x.imag() == 0 ? x - : type(x.real(), x.real()) - : sprout::math::isnan(x.imag()) - ? sprout::math::isinf(x.real()) ? type(T(1), T(0)) - : type(x.imag(), x.imag()) - : sprout::math::isinf(x.real()) - ? sprout::math::isinf(x.imag()) ? type(T(1), T(0)) - : type(T(1), T(0) * sprout::math::sin(T(2) * x.imag())) - : sprout::math::isinf(x.imag()) - ? type(-sprout::numeric_limits::quiet_NaN(), -sprout::numeric_limits::quiet_NaN()) - : x.real() == 0 && x.imag() == 0 ? x - : sprout::sinh(x) / sprout::cosh(x) - ; - } -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_TANH_HPP diff --git a/dsp/lib/sprout/sprout/complex/transcendentals.hpp b/dsp/lib/sprout/sprout/complex/transcendentals.hpp deleted file mode 100644 index 3b425fc..0000000 --- a/dsp/lib/sprout/sprout/complex/transcendentals.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_TRANSCENDENTALS_HPP -#define SPROUT_COMPLEX_TRANSCENDENTALS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_COMPLEX_TRANSCENDENTALS_HPP diff --git a/dsp/lib/sprout/sprout/complex/tuple.hpp b/dsp/lib/sprout/sprout/complex/tuple.hpp deleted file mode 100644 index 691ccc5..0000000 --- a/dsp/lib/sprout/sprout/complex/tuple.hpp +++ /dev/null @@ -1,111 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_TUPLE_HPP -#define SPROUT_COMPLEX_TUPLE_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - namespace detail { - template - struct tuple_element_impl; - template - struct tuple_element_impl > - : public sprout::detail::nil_base - {}; - template - struct tuple_element_impl<0, sprout::complex > - : public sprout::identity - {}; - template - struct tuple_element_impl<1, sprout::complex > - : public sprout::identity - {}; - - template - struct get_impl; - template - struct get_impl<0, sprout::complex > { - public: - SPROUT_CONSTEXPR T& operator()(sprout::complex& t) const { - return t.real(); - } - SPROUT_CONSTEXPR T const& operator()(sprout::complex const& t) const { - return t.real(); - } - }; - template - struct get_impl<1, sprout::complex > { - public: - SPROUT_CONSTEXPR T& operator()(sprout::complex& t) const { - return t.imag(); - } - SPROUT_CONSTEXPR T const& operator()(sprout::complex const& t) const { - return t.imag(); - } - }; - } // namespace detail - } // namespace tuples -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // tuple_size - // - template - struct tuple_size > - : public sprout::integral_constant - {}; - - // - // tuple_element - // - template - struct tuple_element > - : public sprout::tuples::detail::tuple_element_impl > - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -namespace sprout { - // - // tuple_get - // - template - inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element >::type& - tuple_get(sprout::complex& t) SPROUT_NOEXCEPT { - static_assert(I < 2, "tuple_get: index out of range"); - return sprout::tuples::detail::get_impl >()(t); - } - template - inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element >::type const& - tuple_get(sprout::complex const& t) SPROUT_NOEXCEPT { - static_assert(I < 2, "tuple_get: index out of range"); - return sprout::tuples::detail::get_impl >()(t); - } - template - inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element >::type&& - tuple_get(sprout::complex&& t) SPROUT_NOEXCEPT { - return sprout::move(sprout::tuples::get(t)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_TUPLE_HPP diff --git a/dsp/lib/sprout/sprout/complex/type_traits.hpp b/dsp/lib/sprout/sprout/complex/type_traits.hpp deleted file mode 100644 index c78837a..0000000 --- a/dsp/lib/sprout/sprout/complex/type_traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_TYPE_TRAITS_HPP -#define SPROUT_COMPLEX_TYPE_TRAITS_HPP - -#include -#include -#include - -namespace sprout { - // - // is_complex - // - template - struct is_complex - : public sprout::false_type - {}; - template - struct is_complex - : public sprout::is_complex - {}; - template - struct is_complex - : public sprout::is_complex - {}; - template - struct is_complex > - : public sprout::true_type - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_complex_v = sprout::is_complex::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_COMPLEX_TYPE_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/complex/values.hpp b/dsp/lib/sprout/sprout/complex/values.hpp deleted file mode 100644 index e76955c..0000000 --- a/dsp/lib/sprout/sprout/complex/values.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPLEX_VALUES_HPP -#define SPROUT_COMPLEX_VALUES_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_COMPLEX_VALUES_HPP diff --git a/dsp/lib/sprout/sprout/compost.hpp b/dsp/lib/sprout/sprout/compost.hpp deleted file mode 100644 index 9751b13..0000000 --- a/dsp/lib/sprout/sprout/compost.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_HPP -#define SPROUT_COMPOST_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_COMPOST_HPP diff --git a/dsp/lib/sprout/sprout/compost/analyses.hpp b/dsp/lib/sprout/sprout/compost/analyses.hpp deleted file mode 100644 index ba59619..0000000 --- a/dsp/lib/sprout/sprout/compost/analyses.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_ANALYSES_HPP -#define SPROUT_COMPOST_ANALYSES_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_COMPOST_ANALYSES_HPP diff --git a/dsp/lib/sprout/sprout/compost/analyses/amplitude_spectrum.hpp b/dsp/lib/sprout/sprout/compost/analyses/amplitude_spectrum.hpp deleted file mode 100644 index d58583f..0000000 --- a/dsp/lib/sprout/sprout/compost/analyses/amplitude_spectrum.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_ANALYSES_AMPLITUDE_SPECTRUM_HPP -#define SPROUT_COMPOST_ANALYSES_AMPLITUDE_SPECTRUM_HPP - -#include -#include - -namespace sprout { - namespace compost { - namespace analyses { - // - // amplitude_spectrum - // - using sprout::adaptors::amplitude_spectrum; - } // namespace analyses - - using sprout::compost::analyses::amplitude_spectrum; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_ANALYSES_AMPLITUDE_SPECTRUM_HPP diff --git a/dsp/lib/sprout/sprout/compost/analyses/dft.hpp b/dsp/lib/sprout/sprout/compost/analyses/dft.hpp deleted file mode 100644 index f70f634..0000000 --- a/dsp/lib/sprout/sprout/compost/analyses/dft.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_ANALYSES_DFT_HPP -#define SPROUT_COMPOST_ANALYSES_DFT_HPP - -#include -#include - -namespace sprout { - namespace compost { - namespace analyses { - // - // dft - // - using sprout::adaptors::dft; - } // namespace analyses - - using sprout::compost::analyses::dft; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_ANALYSES_DFT_HPP diff --git a/dsp/lib/sprout/sprout/compost/analyses/idft.hpp b/dsp/lib/sprout/sprout/compost/analyses/idft.hpp deleted file mode 100644 index 9bdeb23..0000000 --- a/dsp/lib/sprout/sprout/compost/analyses/idft.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_ANALYSES_IDFT_HPP -#define SPROUT_COMPOST_ANALYSES_IDFT_HPP - -#include -#include - -namespace sprout { - namespace compost { - namespace analyses { - // - // idft - // - using sprout::adaptors::idft; - } // namespace analyses - - using sprout::compost::analyses::idft; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_ANALYSES_IDFT_HPP diff --git a/dsp/lib/sprout/sprout/compost/analyses/phase_spectrum.hpp b/dsp/lib/sprout/sprout/compost/analyses/phase_spectrum.hpp deleted file mode 100644 index 7b16b65..0000000 --- a/dsp/lib/sprout/sprout/compost/analyses/phase_spectrum.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_ANALYSES_PHASE_SPECTRUM_HPP -#define SPROUT_COMPOST_ANALYSES_PHASE_SPECTRUM_HPP - -#include -#include - -namespace sprout { - namespace compost { - namespace analyses { - // - // phase_spectrum - // - using sprout::adaptors::phase_spectrum; - } // namespace analyses - - using sprout::compost::analyses::phase_spectrum; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_ANALYSES_PHASE_SPECTRUM_HPP diff --git a/dsp/lib/sprout/sprout/compost/effects.hpp b/dsp/lib/sprout/sprout/compost/effects.hpp deleted file mode 100644 index b35c9e8..0000000 --- a/dsp/lib/sprout/sprout/compost/effects.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_EFFECTS_HPP -#define SPROUT_COMPOST_EFFECTS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_COMPOST_EFFECTS_HPP diff --git a/dsp/lib/sprout/sprout/compost/effects/auto_pan.hpp b/dsp/lib/sprout/sprout/compost/effects/auto_pan.hpp deleted file mode 100644 index 6866c61..0000000 --- a/dsp/lib/sprout/sprout/compost/effects/auto_pan.hpp +++ /dev/null @@ -1,165 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_EFFECTS_AUTO_PAN_HPP -#define SPROUT_COMPOST_EFFECTS_AUTO_PAN_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace compost { - // - // auto_pan_outdirected_value - // - template - struct auto_pan_outdirected_value { - public: - typedef Value value_type; - typedef IntType int_type; - private: - value_type depth_; - value_type rate_; - int_type samples_per_sec_; - private: - template - SPROUT_CONSTEXPR typename std::enable_if< - Left, - typename std::iterator_traits::value_type - >::type - calc(Outdirected const& x) const { - return (1 + depth_ * sprout::sin(sprout::math::two_pi() * rate_ * x.index() / samples_per_sec_)) * *x; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - !Left, - typename std::iterator_traits::value_type - >::type - calc(Outdirected const& x) const { - return (1 + depth_ * sprout::sin(sprout::math::two_pi() * rate_ * x.index() / samples_per_sec_ + sprout::math::pi())) * *x; - } - public: - SPROUT_CONSTEXPR auto_pan_outdirected_value( - value_type const& depth, value_type const& rate, - int_type samples_per_sec = 44100 - ) - : depth_(depth), rate_(rate), samples_per_sec_(samples_per_sec) - {} - template - SPROUT_CONSTEXPR typename std::iterator_traits::value_type - operator()(Outdirected const& x) const { - return calc(x); - } - }; - - namespace effects { - // - // auto_pan_holder - // - template - class auto_pan_holder { - public: - typedef T value_type; - typedef IntType int_type; - private: - value_type depth_; - value_type rate_; - int_type samples_per_sec_; - public: - SPROUT_CONSTEXPR auto_pan_holder() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - auto_pan_holder(auto_pan_holder const&) = default; - SPROUT_CONSTEXPR auto_pan_holder( - value_type const& depth, value_type const& rate, - int_type samples_per_sec = 44100 - ) - : depth_(depth), rate_(rate), samples_per_sec_(samples_per_sec) - {} - SPROUT_CONSTEXPR value_type const& depth() const { - return depth_; - } - SPROUT_CONSTEXPR value_type const& rate() const { - return rate_; - } - SPROUT_CONSTEXPR int_type const& samples_per_sec() const { - return samples_per_sec_; - } - }; - - // - // auto_pan_forwarder - // - class auto_pan_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::compost::effects::auto_pan_holder - operator()(T const& depth, T const& rate, IntType samples_per_sec) const { - return sprout::compost::effects::auto_pan_holder(depth, rate, samples_per_sec); - } - template - SPROUT_CONSTEXPR sprout::compost::effects::auto_pan_holder - operator()(T const& depth, T const& rate) const { - return sprout::compost::effects::auto_pan_holder(depth, rate); - } - }; - - // - // auto_pan - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::compost::effects::auto_pan_forwarder auto_pan = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::compost::effects::auto_pan_holder const& rhs) - -> decltype( - SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::indexed | sprout::adaptors::outdirected - | sprout::adaptors::transformed( - sprout::compost::auto_pan_outdirected_value(rhs.depth(), rhs.rate(), rhs.samples_per_sec()) - ) - | sprout::compost::formats::stereo( - SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::indexed | sprout::adaptors::outdirected - | sprout::adaptors::transformed( - sprout::compost::auto_pan_outdirected_value(rhs.depth(), rhs.rate(), rhs.samples_per_sec()) - ) - ) - ) - { - return SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::indexed | sprout::adaptors::outdirected - | sprout::adaptors::transformed( - sprout::compost::auto_pan_outdirected_value(rhs.depth(), rhs.rate(), rhs.samples_per_sec()) - ) - | sprout::compost::formats::stereo( - SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::indexed | sprout::adaptors::outdirected - | sprout::adaptors::transformed( - sprout::compost::auto_pan_outdirected_value(rhs.depth(), rhs.rate(), rhs.samples_per_sec()) - ) - ) - ; - } - } // namespace effects - - using sprout::compost::effects::auto_pan; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_EFFECTS_AUTO_PAN_HPP diff --git a/dsp/lib/sprout/sprout/compost/effects/changed_volume.hpp b/dsp/lib/sprout/sprout/compost/effects/changed_volume.hpp deleted file mode 100644 index 7ead6d5..0000000 --- a/dsp/lib/sprout/sprout/compost/effects/changed_volume.hpp +++ /dev/null @@ -1,80 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_EFFECTS_CHANGED_VOLUME_HPP -#define SPROUT_COMPOST_EFFECTS_CHANGED_VOLUME_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace compost { - namespace effects { - // - // change_volume_holder - // - template - class change_volume_holder { - public: - typedef T value_type; - private: - value_type value_; - public: - SPROUT_CONSTEXPR change_volume_holder() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - change_volume_holder(change_volume_holder const&) = default; - explicit SPROUT_CONSTEXPR change_volume_holder(value_type const& value) - : value_(value) - {} - SPROUT_CONSTEXPR value_type const& value() const { - return value_; - } - }; - - // - // changed_volume_forwarder - // - class changed_volume_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::compost::effects::change_volume_holder - operator()(T const& value) const { - return sprout::compost::effects::change_volume_holder(value); - } - }; - - // - // changed_volume - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::compost::effects::changed_volume_forwarder changed_volume = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::compost::effects::change_volume_holder const& rhs) - -> decltype( - SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::transformed(sprout::bind2nd(sprout::multiplies<>(), rhs.value())) - ) - { - return SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::transformed(sprout::bind2nd(sprout::multiplies<>(), rhs.value())) - ; - } - } // namespace effects - - using sprout::compost::effects::changed_volume; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_EFFECTS_CHANGED_VOLUME_HPP diff --git a/dsp/lib/sprout/sprout/compost/effects/chorus.hpp b/dsp/lib/sprout/sprout/compost/effects/chorus.hpp deleted file mode 100644 index d28675e..0000000 --- a/dsp/lib/sprout/sprout/compost/effects/chorus.hpp +++ /dev/null @@ -1,165 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_EFFECTS_CHORUS_HPP -#define SPROUT_COMPOST_EFFECTS_CHORUS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace compost { - // - // chorus_outdirected_value - // - template - struct chorus_outdirected_value { - public: - typedef Value value_type; - typedef IntType int_type; - private: - value_type d_; - value_type depth_; - value_type rate_; - int_type samples_per_sec_; - private: - template - SPROUT_CONSTEXPR typename std::iterator_traits::value_type - calc_2(Outdirected const& x, typename Outdirected::index_type m, value_type const& delta) const { - return *x + (m >= 0 && (m + 1 < x.base().get() || x.base().get() < 0) - ? delta * x[m + 1 - x.index()] + (1 - delta) * x[m - x.index()] - : 0 - ) - ; - } - template - SPROUT_CONSTEXPR typename std::iterator_traits::value_type - calc_1(Outdirected const& x, value_type const& t) const { - return calc_2(x, static_cast(t), t - static_cast(t)); - } - template - SPROUT_CONSTEXPR typename std::iterator_traits::value_type - calc(Outdirected const& x, value_type const& tau) const { - return calc_1(x, x.index() - tau); - } - public: - SPROUT_CONSTEXPR chorus_outdirected_value( - value_type const& d, value_type const& depth, value_type const& rate, - int_type samples_per_sec = 44100 - ) - : d_(d), depth_(depth), rate_(rate), samples_per_sec_(samples_per_sec) - {} - template - SPROUT_CONSTEXPR typename std::iterator_traits::value_type - operator()(Outdirected const& x) const { - return calc(x, d_ + depth_ * sprout::sin(sprout::math::two_pi() * rate_ * x.index() / samples_per_sec_)); - } - }; - - namespace effects { - // - // chorus_holder - // - template - class chorus_holder { - public: - typedef T value_type; - typedef IntType int_type; - private: - value_type d_; - value_type depth_; - value_type rate_; - int_type samples_per_sec_; - public: - SPROUT_CONSTEXPR chorus_holder() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - chorus_holder(chorus_holder const&) = default; - SPROUT_CONSTEXPR chorus_holder( - value_type const& d, value_type const& depth, value_type const& rate, - int_type samples_per_sec = 44100 - ) - : d_(d), depth_(depth), rate_(rate), samples_per_sec_(samples_per_sec) - {} - SPROUT_CONSTEXPR value_type const& d() const { - return d_; - } - SPROUT_CONSTEXPR value_type const& depth() const { - return depth_; - } - SPROUT_CONSTEXPR value_type const& rate() const { - return rate_; - } - SPROUT_CONSTEXPR int_type const& samples_per_sec() const { - return samples_per_sec_; - } - }; - - // - // chorus_forwarder - // - class chorus_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::compost::effects::chorus_holder - operator()(T const& d, T const& depth, T const& rate, IntType samples_per_sec) const { - return sprout::compost::effects::chorus_holder(d, depth, rate, samples_per_sec); - } - template - SPROUT_CONSTEXPR sprout::compost::effects::chorus_holder - operator()(T const& d, T const& depth, T const& rate) const { - return sprout::compost::effects::chorus_holder(d, depth, rate); - } - }; - - // - // chorus - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::compost::effects::chorus_forwarder chorus = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::compost::effects::chorus_holder const& rhs) - -> decltype( - SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::valued(sprout::size(SPROUT_FORWARD(Range, lhs))) - | sprout::adaptors::indexed | sprout::adaptors::outdirected - | sprout::adaptors::transformed( - sprout::compost::chorus_outdirected_value( - rhs.d(), rhs.depth(), rhs.rate(), rhs.samples_per_sec() - ) - ) - ) - { - return SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::valued(sprout::size(SPROUT_FORWARD(Range, lhs))) - | sprout::adaptors::indexed | sprout::adaptors::outdirected - | sprout::adaptors::transformed( - sprout::compost::chorus_outdirected_value( - rhs.d(), rhs.depth(), rhs.rate(), rhs.samples_per_sec() - ) - ) - ; - } - } // namespace effects - - using sprout::compost::effects::chorus; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_EFFECTS_CHORUS_HPP diff --git a/dsp/lib/sprout/sprout/compost/effects/clipped.hpp b/dsp/lib/sprout/sprout/compost/effects/clipped.hpp deleted file mode 100644 index f687bd4..0000000 --- a/dsp/lib/sprout/sprout/compost/effects/clipped.hpp +++ /dev/null @@ -1,94 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_EFFECTS_CLIPPED_HPP -#define SPROUT_COMPOST_EFFECTS_CLIPPED_HPP - -#include -#include -#include - -namespace sprout { - namespace compost { - namespace effects { - // - // clip_holder - // - template - class clip_holder { - public: - typedef T value_type; - private: - value_type low_; - value_type up_; - public: - SPROUT_CONSTEXPR clip_holder() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - clip_holder(clip_holder const&) = default; - explicit SPROUT_CONSTEXPR clip_holder(value_type const& low = -1, value_type const& up = 1) - : low_(low), up_(up) - {} - SPROUT_CONSTEXPR value_type const& lower() const { - return low_; - } - SPROUT_CONSTEXPR value_type const& upper() const { - return up_; - } - }; - - // - // clipped_forwarder - // - class clipped_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::compost::effects::clip_holder - operator()(T const& low = -1, T const& up = 1) const { - return sprout::compost::effects::clip_holder(low, up); - } - }; - - // - // clipped - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::compost::effects::clipped_forwarder clipped = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::compost::effects::clip_holder const& rhs) - -> decltype( - SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::clamped(rhs.lower(), rhs.upper()) - ) - { - return SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::clamped(rhs.lower(), rhs.upper()) - ; - } - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::compost::effects::clipped_forwarder const&) - -> decltype( - SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::clamped(-1., 1.) - ) - { - return SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::clamped(-1., 1.) - ; - } - } // namespace effects - - using sprout::compost::effects::clipped; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_EFFECTS_CLIPPED_HPP diff --git a/dsp/lib/sprout/sprout/compost/effects/compressed.hpp b/dsp/lib/sprout/sprout/compost/effects/compressed.hpp deleted file mode 100644 index cbce9d3..0000000 --- a/dsp/lib/sprout/sprout/compost/effects/compressed.hpp +++ /dev/null @@ -1,135 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_EFFECTS_COMPRESEDS_HPP -#define SPROUT_COMPOST_EFFECTS_COMPRESEDS_HPP - -#include -#include -#include - -namespace sprout { - namespace compost { - namespace detail { - template - SPROUT_CONSTEXPR T - compress_value(T const& x, Value const& threshold, Value const& ratio, Value const& gain) { - return (x > threshold ? threshold + (x - threshold) * ratio - : x < -threshold ? -threshold + (x + threshold) * ratio - : x - ) * gain - ; - } - } // namespace detail - // - // compress_value - // - template - struct compress_value { - public: - typedef Value value_type; - typedef T argument_type; - typedef T result_type; - private: - value_type threshold_; - value_type ratio_; - value_type gain_; - public: - SPROUT_CONSTEXPR compress_value(Value const& threshold, Value const& ratio) - : threshold_(threshold), ratio_(ratio), gain_(1 / (threshold + (1 - threshold) * ratio)) - {} - SPROUT_CONSTEXPR result_type - operator()(T const& x) const { - return sprout::compost::detail::compress_value(x, threshold_, ratio_, gain_); - } - }; - template - struct compress_value { - public: - typedef Value value_type; - private: - value_type threshold_; - value_type ratio_; - value_type gain_; - public: - SPROUT_CONSTEXPR compress_value(Value const& threshold, Value const& ratio) - : threshold_(threshold), ratio_(ratio), gain_(1 / (threshold + (1 - threshold) * ratio)) - {} - template - SPROUT_CONSTEXPR T - operator()(T const& x) const { - return sprout::compost::detail::compress_value(x, threshold_, ratio_, gain_); - } - }; - - namespace effects { - // - // compress_holder - // - template - class compress_holder { - public: - typedef T value_type; - private: - value_type threshold_; - value_type ratio_; - public: - SPROUT_CONSTEXPR compress_holder() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - compress_holder(compress_holder const&) = default; - SPROUT_CONSTEXPR compress_holder(value_type const& threshold, value_type const& ratio) - : threshold_(threshold), ratio_(ratio) - {} - SPROUT_CONSTEXPR value_type const& threshold() const { - return threshold_; - } - SPROUT_CONSTEXPR value_type const& ratio() const { - return ratio_; - } - }; - - - // - // compressed_forwarder - // - class compressed_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::compost::effects::compress_holder - operator()(T const& threshold, T const& ratio) const { - return sprout::compost::effects::compress_holder(threshold, ratio); - } - }; - - // - // compressed - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::compost::effects::compressed_forwarder compressed = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::compost::effects::compress_holder const& rhs) - -> decltype( - SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::transformed(sprout::compost::compress_value(rhs.threshold(), rhs.ratio())) - ) - { - return SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::transformed(sprout::compost::compress_value(rhs.threshold(), rhs.ratio())) - ; - } - } // namespace effects - - using sprout::compost::effects::compressed; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_EFFECTS_COMPRESEDS_HPP diff --git a/dsp/lib/sprout/sprout/compost/effects/distorted.hpp b/dsp/lib/sprout/sprout/compost/effects/distorted.hpp deleted file mode 100644 index 54c5247..0000000 --- a/dsp/lib/sprout/sprout/compost/effects/distorted.hpp +++ /dev/null @@ -1,87 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_EFFECTS_DISTORTED_HPP -#define SPROUT_COMPOST_EFFECTS_DISTORTED_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace compost { - namespace effects { - // - // distort_holder - // - template - class distort_holder { - public: - typedef T value_type; - private: - value_type gain_; - value_type level_; - public: - SPROUT_CONSTEXPR distort_holder() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - distort_holder(distort_holder const&) = default; - SPROUT_CONSTEXPR distort_holder(value_type const& gain, value_type const& level) - : gain_(gain), level_(level) - {} - SPROUT_CONSTEXPR value_type const& gain() const { - return gain_; - } - SPROUT_CONSTEXPR value_type const& level() const { - return level_; - } - }; - - // - // distorted_forwarder - // - class distorted_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::compost::effects::distort_holder - operator()(T const& gain, T const& level) const { - return sprout::compost::effects::distort_holder(gain, level); - } - }; - - // - // distorted - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::compost::effects::distorted_forwarder distorted = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::compost::effects::distort_holder const& rhs) - -> decltype( - SPROUT_FORWARD(Range, lhs) - | sprout::compost::effects::changed_volume(rhs.gain()) - | sprout::compost::effects::clipped() - | sprout::compost::effects::changed_volume(rhs.level()) - ) - { - return SPROUT_FORWARD(Range, lhs) - | sprout::compost::effects::changed_volume(rhs.gain()) - | sprout::compost::effects::clipped() - | sprout::compost::effects::changed_volume(rhs.level()) - ; - } - } // namespace effects - - using sprout::compost::effects::distorted; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_EFFECTS_DISTORTED_HPP diff --git a/dsp/lib/sprout/sprout/compost/effects/fuzzed.hpp b/dsp/lib/sprout/sprout/compost/effects/fuzzed.hpp deleted file mode 100644 index 33a478f..0000000 --- a/dsp/lib/sprout/sprout/compost/effects/fuzzed.hpp +++ /dev/null @@ -1,86 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_EFFECTS_FUZZED_HPP -#define SPROUT_COMPOST_EFFECTS_FUZZED_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace compost { - namespace effects { - // - // fuzz_holder - // - template - class fuzz_holder { - public: - typedef T value_type; - private: - value_type gain_; - value_type level_; - public: - SPROUT_CONSTEXPR fuzz_holder() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - fuzz_holder(fuzz_holder const&) = default; - SPROUT_CONSTEXPR fuzz_holder(value_type const& gain, value_type const& level) - : gain_(gain), level_(level) - {} - SPROUT_CONSTEXPR value_type const& gain() const { - return gain_; - } - SPROUT_CONSTEXPR value_type const& level() const { - return level_; - } - }; - - // - // fuzzed_forwarder - // - class fuzzed_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::compost::effects::fuzz_holder - operator()(T const& gain, T const& level) const { - return sprout::compost::effects::fuzz_holder(gain, level); - } - }; - - // - // fuzzed - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::compost::effects::fuzzed_forwarder fuzzed = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::compost::effects::fuzz_holder const& rhs) - -> decltype( - SPROUT_FORWARD(Range, lhs) - | sprout::compost::effects::rectified - | sprout::compost::effects::distorted(rhs.gain(), rhs.level()) - ) - { - return SPROUT_FORWARD(Range, lhs) - | sprout::compost::effects::rectified - | sprout::compost::effects::distorted(rhs.gain(), rhs.level()) - ; - } - } // namespace effects - - using sprout::compost::effects::fuzzed; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_EFFECTS_FUZZED_HPP diff --git a/dsp/lib/sprout/sprout/compost/effects/noise_gated.hpp b/dsp/lib/sprout/sprout/compost/effects/noise_gated.hpp deleted file mode 100644 index f8e18b6..0000000 --- a/dsp/lib/sprout/sprout/compost/effects/noise_gated.hpp +++ /dev/null @@ -1,125 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_EFFECTS_NOISE_GATED_HPP -#define SPROUT_COMPOST_EFFECTS_NOISE_GATED_HPP - -#include -#include -#include - -namespace sprout { - namespace compost { - namespace detail { - template - SPROUT_CONSTEXPR T - noise_gate_value(T const& x, Value const& threshold) { - return x <= threshold && x >= -threshold ? 0 - : x - ; - } - } // namespace detail - // - // noise_gate_value - // - template - struct noise_gate_value { - public: - typedef Value value_type; - typedef T argument_type; - typedef T result_type; - private: - value_type threshold_; - public: - explicit SPROUT_CONSTEXPR noise_gate_value(Value const& threshold) - : threshold_(threshold) - {} - SPROUT_CONSTEXPR result_type - operator()(T const& x) const { - return sprout::compost::detail::noise_gate_value(x, threshold_); - } - }; - template - struct noise_gate_value { - public: - typedef Value value_type; - private: - value_type threshold_; - public: - explicit SPROUT_CONSTEXPR noise_gate_value(Value const& threshold) - : threshold_(threshold) - {} - template - SPROUT_CONSTEXPR T - operator()(T const& x) const { - return sprout::compost::detail::noise_gate_value(x, threshold_); - } - }; - - namespace effects { - // - // noise_gate_holder - // - template - class noise_gate_holder { - public: - typedef T value_type; - private: - value_type threshold_; - public: - SPROUT_CONSTEXPR noise_gate_holder() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - noise_gate_holder(noise_gate_holder const&) = default; - explicit SPROUT_CONSTEXPR noise_gate_holder(value_type const& threshold) - : threshold_(threshold) - {} - SPROUT_CONSTEXPR value_type const& threshold() const { - return threshold_; - } - }; - - - // - // noise_gated_forwarder - // - class noise_gated_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::compost::effects::noise_gate_holder - operator()(T const& threshold) const { - return sprout::compost::effects::noise_gate_holder(threshold); - } - }; - - // - // noise_gated - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::compost::effects::noise_gated_forwarder noise_gated = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::compost::effects::noise_gate_holder const& rhs) - -> decltype( - SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::transformed(sprout::compost::noise_gate_value(rhs.threshold())) - ) - { - return SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::transformed(sprout::compost::noise_gate_value(rhs.threshold())) - ; - } - } // namespace effects - - using sprout::compost::effects::noise_gated; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_EFFECTS_NOISE_GATED_HPP diff --git a/dsp/lib/sprout/sprout/compost/effects/overdriven.hpp b/dsp/lib/sprout/sprout/compost/effects/overdriven.hpp deleted file mode 100644 index 6d3ef8a..0000000 --- a/dsp/lib/sprout/sprout/compost/effects/overdriven.hpp +++ /dev/null @@ -1,115 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_EFFECTS_OVERDRIVEN_HPP -#define SPROUT_COMPOST_EFFECTS_OVERDRIVEN_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace compost { - // - // overdrive_clip_value - // - template - struct overdrive_clip_value { - public: - typedef T argument_type; - typedef T result_type; - public: - SPROUT_CONSTEXPR T - operator()(T const& x) const { - return x >= 0 ? sprout::atan(x) / sprout::math::half_pi() - : sprout::atan(x) / sprout::math::half_pi() / 10 - ; - } - }; - template<> - struct overdrive_clip_value { - public: - template - SPROUT_CONSTEXPR T - operator()(T const& x) const { - return sprout::compost::overdrive_clip_value()(x); - } - }; - - namespace effects { - // - // overdrive_holder - // - template - class overdrive_holder { - public: - typedef T value_type; - private: - value_type gain_; - value_type level_; - public: - SPROUT_CONSTEXPR overdrive_holder() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - overdrive_holder(overdrive_holder const&) = default; - SPROUT_CONSTEXPR overdrive_holder(value_type const& gain, value_type const& level) - : gain_(gain), level_(level) - {} - SPROUT_CONSTEXPR value_type const& gain() const { - return gain_; - } - SPROUT_CONSTEXPR value_type const& level() const { - return level_; - } - }; - - // - // overdriven_forwarder - // - class overdriven_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::compost::effects::overdrive_holder - operator()(T const& gain, T const& level) const { - return sprout::compost::effects::overdrive_holder(gain, level); - } - }; - - // - // overdriven - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::compost::effects::overdriven_forwarder overdriven = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::compost::effects::overdrive_holder const& rhs) - -> decltype( - SPROUT_FORWARD(Range, lhs) - | sprout::compost::effects::changed_volume(rhs.gain()) - | sprout::adaptors::transformed(sprout::compost::overdrive_clip_value<>()) - | sprout::compost::effects::changed_volume(rhs.level()) - ) - { - return SPROUT_FORWARD(Range, lhs) - | sprout::compost::effects::changed_volume(rhs.gain()) - | sprout::adaptors::transformed(sprout::compost::overdrive_clip_value<>()) - | sprout::compost::effects::changed_volume(rhs.level()) - ; - } - } // namespace effects - - using sprout::compost::effects::overdriven; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_EFFECTS_OVERDRIVEN_HPP diff --git a/dsp/lib/sprout/sprout/compost/effects/pseudo_stereo.hpp b/dsp/lib/sprout/sprout/compost/effects/pseudo_stereo.hpp deleted file mode 100644 index 82694ae..0000000 --- a/dsp/lib/sprout/sprout/compost/effects/pseudo_stereo.hpp +++ /dev/null @@ -1,161 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_EFFECTS_PSEUDO_STEREO_HPP -#define SPROUT_COMPOST_EFFECTS_PSEUDO_STEREO_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace compost { - // - // pseudo_stereo_outdirected_value - // - template - struct pseudo_stereo_outdirected_value { - public: - typedef Value value_type; - typedef IntType int_type; - private: - value_type delay_; - int_type samples_per_sec_; - int_type d_; - private: - template - SPROUT_CONSTEXPR typename std::enable_if< - Left, - typename std::iterator_traits::value_type - >::type - calc(Outdirected const& x) const { - return x.index() + d_ >= 0 ? *x + x[d_] - : 0 - ; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - !Left, - typename std::iterator_traits::value_type - >::type - calc(Outdirected const& x) const { - return x.index() + d_ >= 0 ? *x - x[d_] - : 0 - ; - } - public: - explicit SPROUT_CONSTEXPR pseudo_stereo_outdirected_value( - value_type const& delay, int_type samples_per_sec = 44100 - ) - : delay_(delay), samples_per_sec_(samples_per_sec), d_(static_cast(-delay * samples_per_sec_)) - {} - template - SPROUT_CONSTEXPR typename std::iterator_traits::value_type - operator()(Outdirected const& x) const { - return calc(x); - } - }; - - namespace effects { - // - // pseudo_stereo_holder - // - template - class pseudo_stereo_holder { - public: - typedef T value_type; - typedef IntType int_type; - private: - value_type delay_; - int_type samples_per_sec_; - public: - SPROUT_CONSTEXPR pseudo_stereo_holder() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - pseudo_stereo_holder(pseudo_stereo_holder const&) = default; - explicit SPROUT_CONSTEXPR pseudo_stereo_holder( - value_type const& delay, int_type samples_per_sec = 44100 - ) - : delay_(delay), samples_per_sec_(samples_per_sec) - {} - SPROUT_CONSTEXPR value_type const& delay() const { - return delay_; - } - SPROUT_CONSTEXPR int_type const& samples_per_sec() const { - return samples_per_sec_; - } - }; - - // - // pseudo_stereo_forwarder - // - class pseudo_stereo_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::compost::effects::pseudo_stereo_holder - operator()(T const& delay, IntType samples_per_sec) const { - return sprout::compost::effects::pseudo_stereo_holder(delay, samples_per_sec); - } - template - SPROUT_CONSTEXPR sprout::compost::effects::pseudo_stereo_holder - operator()(T const& delay) const { - return sprout::compost::effects::pseudo_stereo_holder(delay); - } - }; - - // - // pseudo_stereo - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::compost::effects::pseudo_stereo_forwarder pseudo_stereo = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::compost::effects::pseudo_stereo_holder const& rhs) - -> decltype( - sprout::lvalue_forward(lhs) - | sprout::adaptors::indexed | sprout::adaptors::outdirected - | sprout::adaptors::transformed( - sprout::compost::pseudo_stereo_outdirected_value(rhs.delay(), rhs.samples_per_sec()) - ) - | sprout::compost::formats::stereo( - sprout::lvalue_forward(lhs) - | sprout::adaptors::indexed | sprout::adaptors::outdirected - | sprout::adaptors::transformed( - sprout::compost::pseudo_stereo_outdirected_value(rhs.delay(), rhs.samples_per_sec()) - ) - ) - ) - { - return sprout::lvalue_forward(lhs) - | sprout::adaptors::indexed | sprout::adaptors::outdirected - | sprout::adaptors::transformed( - sprout::compost::pseudo_stereo_outdirected_value(rhs.delay(), rhs.samples_per_sec()) - ) - | sprout::compost::formats::stereo( - sprout::lvalue_forward(lhs) - | sprout::adaptors::indexed | sprout::adaptors::outdirected - | sprout::adaptors::transformed( - sprout::compost::pseudo_stereo_outdirected_value(rhs.delay(), rhs.samples_per_sec()) - ) - ) - ; - } - } // namespace effects - - using sprout::compost::effects::pseudo_stereo; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_EFFECTS_PSEUDO_STEREO_HPP diff --git a/dsp/lib/sprout/sprout/compost/effects/rectified.hpp b/dsp/lib/sprout/sprout/compost/effects/rectified.hpp deleted file mode 100644 index 1b06b00..0000000 --- a/dsp/lib/sprout/sprout/compost/effects/rectified.hpp +++ /dev/null @@ -1,75 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_EFFECTS_RECTIFIED_HPP -#define SPROUT_COMPOST_EFFECTS_RECTIFIED_HPP - -#include -#include -#include - -namespace sprout { - namespace compost { - // - // rectify_value - // - template - struct rectify_value { - public: - typedef T argument_type; - typedef T result_type; - public: - SPROUT_CONSTEXPR T - operator()(T const& x) const { - return x < 0 ? -x : x; - } - }; - template<> - struct rectify_value { - public: - template - SPROUT_CONSTEXPR T - operator()(T const& x) const { - return sprout::compost::rectify_value()(x); - } - }; - - namespace effects { - // - // rectified_forwarder - // - class rectified_forwarder {}; - - // - // rectified - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::compost::effects::rectified_forwarder rectified = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::compost::effects::rectified_forwarder const&) - -> decltype( - SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::transformed(sprout::compost::rectify_value<>()) - ) - { - return SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::transformed(sprout::compost::rectify_value<>()) - ; - } - } // namespace effects - - using sprout::compost::effects::rectified; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_EFFECTS_RECTIFIED_HPP diff --git a/dsp/lib/sprout/sprout/compost/effects/reverbed.hpp b/dsp/lib/sprout/sprout/compost/effects/reverbed.hpp deleted file mode 100644 index b828df6..0000000 --- a/dsp/lib/sprout/sprout/compost/effects/reverbed.hpp +++ /dev/null @@ -1,158 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_EFFECTS_REVERBED_HPP -#define SPROUT_COMPOST_EFFECTS_REVERBED_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace compost { - // - // reverb_outdirected_value - // - template - struct reverb_outdirected_value { - public: - typedef Value value_type; - typedef IntType int_type; - private: - value_type attenuation_; - value_type delay_; - std::size_t repeat_; - int_type samples_per_sec_; - private: - template - SPROUT_CONSTEXPR typename std::iterator_traits::value_type - calc_1(Outdirected const& x, std::size_t i, typename Outdirected::index_type m) const { - return m >= 0 ? sprout::math::pow(attenuation_, i) * x[m - x.index()] - : 0 - ; - } - template - SPROUT_CONSTEXPR typename std::iterator_traits::value_type - calc(Outdirected const& x, std::size_t i = 1) const { - return i <= repeat_ - ? calc_1(x, i, static_cast(x.index() - i * delay_ * samples_per_sec_)) + calc(x, i + 1) - : 0 - ; - } - public: - SPROUT_CONSTEXPR reverb_outdirected_value( - value_type const& attenuation, value_type const& delay, - std::size_t repeat = 2, int_type samples_per_sec = 44100 - ) - : attenuation_(attenuation), delay_(delay), repeat_(repeat), samples_per_sec_(samples_per_sec) - {} - template - SPROUT_CONSTEXPR typename std::iterator_traits::value_type - operator()(Outdirected const& x) const { - return *x + calc(x); - } - }; - - namespace effects { - // - // reverb_holder - // - template - class reverb_holder { - public: - typedef T value_type; - typedef IntType int_type; - private: - value_type attenuation_; - value_type delay_; - std::size_t repeat_; - int_type samples_per_sec_; - public: - SPROUT_CONSTEXPR reverb_holder() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - reverb_holder(reverb_holder const&) = default; - SPROUT_CONSTEXPR reverb_holder( - value_type const& attenuation, value_type const& delay, - std::size_t repeat = 2, int_type samples_per_sec = 44100 - ) - : attenuation_(attenuation), delay_(delay), repeat_(repeat), samples_per_sec_(samples_per_sec) - {} - SPROUT_CONSTEXPR value_type const& attenuation() const { - return attenuation_; - } - SPROUT_CONSTEXPR value_type const& delay() const { - return delay_; - } - SPROUT_CONSTEXPR std::size_t const& repeat() const { - return repeat_; - } - SPROUT_CONSTEXPR int_type const& samples_per_sec() const { - return samples_per_sec_; - } - }; - - // - // reverbed_forwarder - // - class reverbed_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::compost::effects::reverb_holder - operator()(T const& attenuation, T const& delay, std::size_t repeat, IntType samples_per_sec) const { - return sprout::compost::effects::reverb_holder(attenuation, delay, repeat, samples_per_sec); - } - template - SPROUT_CONSTEXPR sprout::compost::effects::reverb_holder - operator()(T const& attenuation, T const& delay, std::size_t repeat = 2) const { - return sprout::compost::effects::reverb_holder(attenuation, delay, repeat); - } - }; - - // - // reverbed - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::compost::effects::reverbed_forwarder reverbed = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::compost::effects::reverb_holder const& rhs) - -> decltype( - SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::indexed | sprout::adaptors::outdirected - | sprout::adaptors::transformed( - sprout::compost::reverb_outdirected_value( - rhs.attenuation(), rhs.delay(), rhs.repeat(), rhs.samples_per_sec() - ) - ) - ) - { - return SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::indexed | sprout::adaptors::outdirected - | sprout::adaptors::transformed( - sprout::compost::reverb_outdirected_value( - rhs.attenuation(), rhs.delay(), rhs.repeat(), rhs.samples_per_sec() - ) - ) - ; - } - } // namespace effects - - using sprout::compost::effects::reverbed; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_EFFECTS_REVERBED_HPP diff --git a/dsp/lib/sprout/sprout/compost/effects/superposed.hpp b/dsp/lib/sprout/sprout/compost/effects/superposed.hpp deleted file mode 100644 index 2348b28..0000000 --- a/dsp/lib/sprout/sprout/compost/effects/superposed.hpp +++ /dev/null @@ -1,88 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_EFFECTS_SUPERPOSED_HPP -#define SPROUT_COMPOST_EFFECTS_SUPERPOSED_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace compost { - namespace effects { - // - // superpose_holder - // - template - class superpose_holder { - public: - typedef RRange range2_type; - private: - sprout::value_holder range_; - public: - SPROUT_CONSTEXPR superpose_holder() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - superpose_holder(superpose_holder const&) = default; - explicit SPROUT_CONSTEXPR superpose_holder(range2_type& range) - : range_(range) - {} - SPROUT_CONSTEXPR range2_type& range() const { - return range_; - } - }; - - // - // superposed_forwarder - // - class superposed_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::compost::effects::superpose_holder< - typename std::remove_reference::type>::type - > - operator()(RRange&& range) const { - return sprout::compost::effects::superpose_holder< - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(range) - ); - } - }; - - // - // superposed - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::compost::effects::superposed_forwarder superposed = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::compost::effects::superpose_holder const& rhs) - -> decltype( - SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::transformed(rhs.range(), sprout::plus<>()) - ) - { - return SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::transformed(rhs.range(), sprout::plus<>()) - ; - } - } // namespace effects - - using sprout::compost::effects::superposed; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_EFFECTS_SUPERPOSED_HPP diff --git a/dsp/lib/sprout/sprout/compost/effects/tremolo.hpp b/dsp/lib/sprout/sprout/compost/effects/tremolo.hpp deleted file mode 100644 index 009b3af..0000000 --- a/dsp/lib/sprout/sprout/compost/effects/tremolo.hpp +++ /dev/null @@ -1,126 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_EFFECTS_TREMOLO_HPP -#define SPROUT_COMPOST_EFFECTS_TREMOLO_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace compost { - // - // tremolo_outdirected_value - // - template - struct tremolo_outdirected_value { - public: - typedef Value value_type; - typedef IntType int_type; - private: - value_type depth_; - value_type rate_; - int_type samples_per_sec_; - public: - SPROUT_CONSTEXPR tremolo_outdirected_value(value_type const& depth, value_type const& rate, int_type samples_per_sec = 44100) - : depth_(depth), rate_(rate), samples_per_sec_(samples_per_sec) - {} - template - SPROUT_CONSTEXPR typename std::iterator_traits::value_type - operator()(Outdirected const& x) const { - return (1 + depth_ * sprout::math::sin(sprout::math::two_pi() * rate_ * x.index() / samples_per_sec_)) * *x; - } - }; - - namespace effects { - // - // tremolo_holder - // - template - class tremolo_holder { - public: - typedef T value_type; - typedef IntType int_type; - private: - value_type depth_; - value_type rate_; - int_type samples_per_sec_; - public: - SPROUT_CONSTEXPR tremolo_holder() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - tremolo_holder(tremolo_holder const&) = default; - SPROUT_CONSTEXPR tremolo_holder(value_type const& depth, value_type const& rate, int_type samples_per_sec = 44100) - : depth_(depth), rate_(rate), samples_per_sec_(samples_per_sec) - {} - SPROUT_CONSTEXPR value_type const& depth() const { - return depth_; - } - SPROUT_CONSTEXPR value_type const& rate() const { - return rate_; - } - SPROUT_CONSTEXPR int_type const& samples_per_sec() const { - return samples_per_sec_; - } - }; - - // - // tremolo_forwarder - // - class tremolo_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::compost::effects::tremolo_holder - operator()(T const& depth, T const& rate, IntType samples_per_sec) const { - return sprout::compost::effects::tremolo_holder(depth, rate, samples_per_sec); - } - template - SPROUT_CONSTEXPR sprout::compost::effects::tremolo_holder - operator()(T const& depth, T const& rate) const { - return sprout::compost::effects::tremolo_holder(depth, rate); - } - }; - - // - // tremolo - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::compost::effects::tremolo_forwarder tremolo = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::compost::effects::tremolo_holder const& rhs) - -> decltype( - SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::indexed | sprout::adaptors::outdirected - | sprout::adaptors::transformed( - sprout::compost::tremolo_outdirected_value(rhs.depth(), rhs.rate(), rhs.samples_per_sec()) - ) - ) - { - return SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::indexed | sprout::adaptors::outdirected - | sprout::adaptors::transformed( - sprout::compost::tremolo_outdirected_value(rhs.depth(), rhs.rate(), rhs.samples_per_sec()) - ) - ; - } - } // namespace effects - - using sprout::compost::effects::tremolo; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_EFFECTS_TREMOLO_HPP diff --git a/dsp/lib/sprout/sprout/compost/effects/vibrato.hpp b/dsp/lib/sprout/sprout/compost/effects/vibrato.hpp deleted file mode 100644 index b1f01a5..0000000 --- a/dsp/lib/sprout/sprout/compost/effects/vibrato.hpp +++ /dev/null @@ -1,164 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_EFFECTS_VIBRATO_HPP -#define SPROUT_COMPOST_EFFECTS_VIBRATO_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace compost { - // - // vibrato_outdirected_value - // - template - struct vibrato_outdirected_value { - public: - typedef Value value_type; - typedef IntType int_type; - private: - value_type d_; - value_type depth_; - value_type rate_; - int_type samples_per_sec_; - private: - template - SPROUT_CONSTEXPR typename std::iterator_traits::value_type - calc_2(Outdirected const& x, typename Outdirected::index_type m, value_type const& delta) const { - return m >= 0 && (m + 1 < x.base().get() || x.base().get() < 0) - ? delta * x[m + 1 - x.index()] + (1 - delta) * x[m - x.index()] - : 0 - ; - } - template - SPROUT_CONSTEXPR typename std::iterator_traits::value_type - calc_1(Outdirected const& x, value_type const& t) const { - return calc_2(x, static_cast(t), t - static_cast(t)); - } - template - SPROUT_CONSTEXPR typename std::iterator_traits::value_type - calc(Outdirected const& x, value_type const& tau) const { - return calc_1(x, x.index() - tau); - } - public: - SPROUT_CONSTEXPR vibrato_outdirected_value( - value_type const& d, value_type const& depth, value_type const& rate, - int_type samples_per_sec = 44100 - ) - : d_(d), depth_(depth), rate_(rate), samples_per_sec_(samples_per_sec) - {} - template - SPROUT_CONSTEXPR typename std::iterator_traits::value_type - operator()(Outdirected const& x) const { - return calc(x, d_ + depth_ * sprout::sin(sprout::math::two_pi() * rate_ * x.index() / samples_per_sec_)); - } - }; - - namespace effects { - // - // vibrato_holder - // - template - class vibrato_holder { - public: - typedef T value_type; - typedef IntType int_type; - private: - value_type d_; - value_type depth_; - value_type rate_; - int_type samples_per_sec_; - public: - SPROUT_CONSTEXPR vibrato_holder() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - vibrato_holder(vibrato_holder const&) = default; - SPROUT_CONSTEXPR vibrato_holder( - value_type const& d, value_type const& depth, value_type const& rate, - int_type samples_per_sec = 44100 - ) - : d_(d), depth_(depth), rate_(rate), samples_per_sec_(samples_per_sec) - {} - SPROUT_CONSTEXPR value_type const& d() const { - return d_; - } - SPROUT_CONSTEXPR value_type const& depth() const { - return depth_; - } - SPROUT_CONSTEXPR value_type const& rate() const { - return rate_; - } - SPROUT_CONSTEXPR int_type const& samples_per_sec() const { - return samples_per_sec_; - } - }; - - // - // vibrato_forwarder - // - class vibrato_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::compost::effects::vibrato_holder - operator()(T const& d, T const& depth, T const& rate, IntType samples_per_sec) const { - return sprout::compost::effects::vibrato_holder(d, depth, rate, samples_per_sec); - } - template - SPROUT_CONSTEXPR sprout::compost::effects::vibrato_holder - operator()(T const& d, T const& depth, T const& rate) const { - return sprout::compost::effects::vibrato_holder(d, depth, rate); - } - }; - - // - // vibrato - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::compost::effects::vibrato_forwarder vibrato = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::compost::effects::vibrato_holder const& rhs) - -> decltype( - SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::valued(sprout::size(SPROUT_FORWARD(Range, lhs))) - | sprout::adaptors::indexed | sprout::adaptors::outdirected - | sprout::adaptors::transformed( - sprout::compost::vibrato_outdirected_value( - rhs.d(), rhs.depth(), rhs.rate(), rhs.samples_per_sec() - ) - ) - ) - { - return SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::valued(sprout::size(SPROUT_FORWARD(Range, lhs))) - | sprout::adaptors::indexed | sprout::adaptors::outdirected - | sprout::adaptors::transformed( - sprout::compost::vibrato_outdirected_value( - rhs.d(), rhs.depth(), rhs.rate(), rhs.samples_per_sec() - ) - ) - ; - } - } // namespace effects - - using sprout::compost::effects::vibrato; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_EFFECTS_VIBRATO_HPP diff --git a/dsp/lib/sprout/sprout/compost/effects/vocal_cancelled.hpp b/dsp/lib/sprout/sprout/compost/effects/vocal_cancelled.hpp deleted file mode 100644 index 0fd9c2a..0000000 --- a/dsp/lib/sprout/sprout/compost/effects/vocal_cancelled.hpp +++ /dev/null @@ -1,63 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_EFFECTS_VOCAL_CANCELLED_HPP -#define SPROUT_COMPOST_EFFECTS_VOCAL_CANCELLED_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace compost { - namespace effects { - // - // vocal_cancelled_forwarder - // - class vocal_cancelled_forwarder {}; - - // - // vocal_cancelled - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::compost::effects::vocal_cancelled_forwarder vocal_cancelled = {}; - } // anonymous-namespace - - // - // operator| - // - // ??? -#if !defined(__clang__) - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::compost::effects::vocal_cancelled_forwarder const& rhs) - -> decltype( - sprout::lvalue_forward(lhs) | sprout::compost::formats::left_channel - | sprout::adaptors::transformed( - sprout::lvalue_forward(lhs) | sprout::compost::formats::right_channel, - sprout::minus<>() - ) - ) - { - return sprout::lvalue_forward(lhs) | sprout::compost::formats::left_channel - | sprout::adaptors::transformed( - sprout::lvalue_forward(lhs) | sprout::compost::formats::right_channel, - sprout::minus<>() - ) - ; - } -#endif - } // namespace effects - - using sprout::compost::effects::vocal_cancelled; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_EFFECTS_VOCAL_CANCELLED_HPP diff --git a/dsp/lib/sprout/sprout/compost/formats.hpp b/dsp/lib/sprout/sprout/compost/formats.hpp deleted file mode 100644 index fe8931c..0000000 --- a/dsp/lib/sprout/sprout/compost/formats.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_FORMATS_HPP -#define SPROUT_COMPOST_FORMATS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_COMPOST_FORMATS_HPP diff --git a/dsp/lib/sprout/sprout/compost/formats/as_complex.hpp b/dsp/lib/sprout/sprout/compost/formats/as_complex.hpp deleted file mode 100644 index e5b882c..0000000 --- a/dsp/lib/sprout/sprout/compost/formats/as_complex.hpp +++ /dev/null @@ -1,63 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_FORMATS_AS_COMPLEX_HPP -#define SPROUT_COMPOST_FORMATS_AS_COMPLEX_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace compost { - // - // to_complex_value - // - struct to_complex_value { - public: - template - SPROUT_CONSTEXPR sprout::complex operator()(FloatType const& x) const { - return sprout::complex(x); - } - }; - - namespace formats { - // - // as_complex_forwarder - // - class as_complex_forwarder {}; - - // - // as_complex - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::compost::formats::as_complex_forwarder as_complex = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::compost::formats::as_complex_forwarder const&) - -> decltype( - SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::transformed(sprout::compost::to_complex_value()) - ) - { - return SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::transformed(sprout::compost::to_complex_value()) - ; - } - } // namespace formats - - using sprout::compost::formats::as_complex; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_FORMATS_AS_COMPLEX_HPP diff --git a/dsp/lib/sprout/sprout/compost/formats/as_imag.hpp b/dsp/lib/sprout/sprout/compost/formats/as_imag.hpp deleted file mode 100644 index 1e3d83c..0000000 --- a/dsp/lib/sprout/sprout/compost/formats/as_imag.hpp +++ /dev/null @@ -1,64 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_FORMATS_AS_IMAG_HPP -#define SPROUT_COMPOST_FORMATS_AS_IMAG_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace compost { - // - // to_imag_value - // - struct to_imag_value { - public: - template - SPROUT_CONSTEXPR decltype(imag(std::declval())) operator()(Complex const& x) const { - return imag(x); - } - }; - - namespace formats { - // - // as_imag_forwarder - // - class as_imag_forwarder {}; - - // - // as_imag - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::compost::formats::as_imag_forwarder as_imag = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::compost::formats::as_imag_forwarder const&) - -> decltype( - SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::transformed(sprout::compost::to_imag_value()) - ) - { - return SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::transformed(sprout::compost::to_imag_value()) - ; - } - } // namespace formats - - using sprout::compost::formats::as_imag; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_FORMATS_AS_IMAG_HPP diff --git a/dsp/lib/sprout/sprout/compost/formats/as_pcm_wave.hpp b/dsp/lib/sprout/sprout/compost/formats/as_pcm_wave.hpp deleted file mode 100644 index 80a2e68..0000000 --- a/dsp/lib/sprout/sprout/compost/formats/as_pcm_wave.hpp +++ /dev/null @@ -1,109 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_FORMATS_AS_PCM_WAVE_HPP -#define SPROUT_COMPOST_FORMATS_AS_PCM_WAVE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace compost { - namespace detail { - template - struct normalized_to_pcm_wave; - template - struct normalized_to_pcm_wave< - IntType, - typename std::enable_if::value>::type - > { - public: - typedef IntType result_type; - public: - template - SPROUT_CONSTEXPR result_type operator()(T const& x) const { - return static_cast(sprout::clamp(x, -1, 1) * sprout::numeric_limits::max()); - } - }; - template - struct normalized_to_pcm_wave< - IntType, - typename std::enable_if::value>::type - > { - public: - typedef IntType result_type; - public: - template - SPROUT_CONSTEXPR result_type operator()(T const& x) const { - return static_cast(sprout::clamp((x + 1) / 2, 0, 1) * sprout::numeric_limits::max()); - } - }; - } // namespace detail - // - // normalized_to_pcm_wave - // - template - struct normalized_to_pcm_wave - : public sprout::compost::detail::normalized_to_pcm_wave - {}; - - namespace formats { - // - // as_pcm_wave_forwarder - // - template - class as_pcm_wave_forwarder {}; - - // - // as_pcm_wave - // - template - inline SPROUT_CONSTEXPR sprout::compost::formats::as_pcm_wave_forwarder - as_pcm_wave() { - return sprout::compost::formats::as_pcm_wave_forwarder(); - } - - // - // operator| - // - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::compost::formats::as_pcm_wave_forwarder const&) - -> decltype( - SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::transformed(sprout::compost::normalized_to_pcm_wave()) - ) - { - return SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::transformed(sprout::compost::normalized_to_pcm_wave()) - ; - } - - // - // as_pcm_wave8 - // as_pcm_wave16 - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::compost::formats::as_pcm_wave_forwarder as_pcm_wave8 = {}; - SPROUT_STATIC_CONSTEXPR sprout::compost::formats::as_pcm_wave_forwarder as_pcm_wave16 = {}; - } // anonymous-namespace - } // namespace formats - - using sprout::compost::formats::as_pcm_wave; - using sprout::compost::formats::as_pcm_wave8; - using sprout::compost::formats::as_pcm_wave16; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_FORMATS_AS_PCM_WAVE_HPP diff --git a/dsp/lib/sprout/sprout/compost/formats/as_real.hpp b/dsp/lib/sprout/sprout/compost/formats/as_real.hpp deleted file mode 100644 index 4ca8f0d..0000000 --- a/dsp/lib/sprout/sprout/compost/formats/as_real.hpp +++ /dev/null @@ -1,64 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_FORMATS_AS_REAL_HPP -#define SPROUT_COMPOST_FORMATS_AS_REAL_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace compost { - // - // to_real_value - // - struct to_real_value { - public: - template - SPROUT_CONSTEXPR decltype(real(std::declval())) operator()(Complex const& x) const { - return real(x); - } - }; - - namespace formats { - // - // as_real_forwarder - // - class as_real_forwarder {}; - - // - // as_real - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::compost::formats::as_real_forwarder as_real = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::compost::formats::as_real_forwarder const&) - -> decltype( - SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::transformed(sprout::compost::to_real_value()) - ) - { - return SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::transformed(sprout::compost::to_real_value()) - ; - } - } // namespace formats - - using sprout::compost::formats::as_real; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_FORMATS_AS_REAL_HPP diff --git a/dsp/lib/sprout/sprout/compost/formats/effected_each.hpp b/dsp/lib/sprout/sprout/compost/formats/effected_each.hpp deleted file mode 100644 index 7d84496..0000000 --- a/dsp/lib/sprout/sprout/compost/formats/effected_each.hpp +++ /dev/null @@ -1,114 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_FORMATS_EFFECTED_EACH_HPP -#define SPROUT_COMPOST_FORMATS_EFFECTED_EACH_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace compost { - namespace formats { - // - // effect_each_holder - // - template - class effect_each_holder { - public: - typedef LAdaptor left_adaptor_type; - typedef RAdaptor right_adaptor_type; - private: - left_adaptor_type left_adaptor_; - right_adaptor_type right_adaptor_; - public: - SPROUT_CONSTEXPR effect_each_holder(left_adaptor_type const& left_adaptor, right_adaptor_type const& right_adaptor) - : left_adaptor_(left_adaptor), right_adaptor_(right_adaptor) - {} - SPROUT_CONSTEXPR left_adaptor_type const& left_adaptor() const { - return left_adaptor_; - } - SPROUT_CONSTEXPR right_adaptor_type const& right_adaptor() const { - return right_adaptor_; - } - }; - template - class effect_each_holder { - public: - typedef Adaptor adaptor_type; - private: - adaptor_type adaptor_; - public: - explicit SPROUT_CONSTEXPR effect_each_holder(adaptor_type const& adaptor) - : adaptor_(adaptor) - {} - SPROUT_CONSTEXPR adaptor_type const& adaptor() const { - return adaptor_; - } - }; - - // - // effected_each_cannel_forwarder - // - class effected_each_cannel_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::compost::formats::effect_each_holder - operator()(LAdaptor const& left_adaptor, RAdaptor const& right_adaptor) const { - return sprout::compost::formats::effect_each_holder(left_adaptor, right_adaptor); - } - template - SPROUT_CONSTEXPR sprout::compost::formats::effect_each_holder - operator()(Adaptor const& adaptor) const { - return sprout::compost::formats::effect_each_holder(adaptor); - } - }; - - // - // effected_each_cannel - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::compost::formats::effected_each_cannel_forwarder effected_each_cannel = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::compost::formats::effect_each_holder const& rhs) - -> decltype( - sprout::lvalue_forward(lhs) | sprout::compost::formats::left_channel | rhs.left_adaptor() - | sprout::compost::formats::stereo(sprout::lvalue_forward(lhs) | sprout::compost::formats::right_channel | rhs.right_adaptor()) - ) - { - return sprout::lvalue_forward(lhs) | sprout::compost::formats::left_channel | rhs.left_adaptor() - | sprout::compost::formats::stereo(sprout::lvalue_forward(lhs) | sprout::compost::formats::right_channel | rhs.right_adaptor()) - ; - } - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::compost::formats::effect_each_holder const& rhs) - -> decltype( - sprout::lvalue_forward(lhs) | sprout::compost::formats::left_channel | rhs.adaptor() - | sprout::compost::formats::stereo(sprout::lvalue_forward(lhs) | sprout::compost::formats::right_channel | rhs.adaptor()) - ) - { - return sprout::lvalue_forward(lhs) | sprout::compost::formats::left_channel | rhs.adaptor() - | sprout::compost::formats::stereo(sprout::lvalue_forward(lhs) | sprout::compost::formats::right_channel | rhs.adaptor()) - ; - } - } // namespace formats - - using sprout::compost::formats::effected_each_cannel; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_FORMATS_EFFECTED_EACH_HPP diff --git a/dsp/lib/sprout/sprout/compost/formats/effected_left.hpp b/dsp/lib/sprout/sprout/compost/formats/effected_left.hpp deleted file mode 100644 index cd95c05..0000000 --- a/dsp/lib/sprout/sprout/compost/formats/effected_left.hpp +++ /dev/null @@ -1,78 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_FORMATS_EFFECTED_LEFT_HPP -#define SPROUT_COMPOST_FORMATS_EFFECTED_LEFT_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace compost { - namespace formats { - // - // effect_left_holder - // - template - class effect_left_holder { - public: - typedef Adaptor adaptor_type; - private: - adaptor_type adaptor_; - public: - explicit SPROUT_CONSTEXPR effect_left_holder(adaptor_type const& adaptor) - : adaptor_(adaptor) - {} - SPROUT_CONSTEXPR adaptor_type const& adaptor() const { - return adaptor_; - } - }; - - // - // effected_left_cannel_forwarder - // - class effected_left_cannel_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::compost::formats::effect_left_holder - operator()(Adaptor const& adaptor) const { - return sprout::compost::formats::effect_left_holder(adaptor); - } - }; - - // - // effected_left_cannel - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::compost::formats::effected_left_cannel_forwarder effected_left_cannel = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::compost::formats::effect_left_holder const& rhs) - -> decltype( - sprout::lvalue_forward(lhs) | sprout::compost::formats::left_channel | rhs.adaptor() - | sprout::compost::formats::stereo(sprout::lvalue_forward(lhs) | sprout::compost::formats::right_channel) - ) - { - return sprout::lvalue_forward(lhs) | sprout::compost::formats::left_channel | rhs.adaptor() - | sprout::compost::formats::stereo(sprout::lvalue_forward(lhs) | sprout::compost::formats::right_channel) - ; - } - } // namespace formats - - using sprout::compost::formats::effected_left_cannel; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_FORMATS_EFFECTED_LEFT_HPP diff --git a/dsp/lib/sprout/sprout/compost/formats/effected_right.hpp b/dsp/lib/sprout/sprout/compost/formats/effected_right.hpp deleted file mode 100644 index 3d6ffe1..0000000 --- a/dsp/lib/sprout/sprout/compost/formats/effected_right.hpp +++ /dev/null @@ -1,78 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_FORMATS_EFFECTED_RIGHT_HPP -#define SPROUT_COMPOST_FORMATS_EFFECTED_RIGHT_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace compost { - namespace formats { - // - // effect_right_holder - // - template - class effect_right_holder { - public: - typedef Adaptor adaptor_type; - private: - adaptor_type adaptor_; - public: - explicit SPROUT_CONSTEXPR effect_right_holder(adaptor_type const& adaptor) - : adaptor_(adaptor) - {} - SPROUT_CONSTEXPR adaptor_type const& adaptor() const { - return adaptor_; - } - }; - - // - // effected_right_cannel_forwarder - // - class effected_right_cannel_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::compost::formats::effect_right_holder - operator()(Adaptor const& adaptor) const { - return sprout::compost::formats::effect_right_holder(adaptor); - } - }; - - // - // effected_right_cannel - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::compost::formats::effected_right_cannel_forwarder effected_right_cannel = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::compost::formats::effect_right_holder const& rhs) - -> decltype( - sprout::lvalue_forward(lhs) | sprout::compost::formats::left_channel - | sprout::compost::formats::stereo(sprout::lvalue_forward(lhs) | sprout::compost::formats::right_channel | rhs.adaptor()) - ) - { - return sprout::lvalue_forward(lhs) | sprout::compost::formats::left_channel - | sprout::compost::formats::stereo(sprout::lvalue_forward(lhs) | sprout::compost::formats::right_channel | rhs.adaptor()) - ; - } - } // namespace formats - - using sprout::compost::formats::effected_right_cannel; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_FORMATS_EFFECTED_RIGHT_HPP diff --git a/dsp/lib/sprout/sprout/compost/formats/left_channel.hpp b/dsp/lib/sprout/sprout/compost/formats/left_channel.hpp deleted file mode 100644 index 02f1baa..0000000 --- a/dsp/lib/sprout/sprout/compost/formats/left_channel.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_FORMATS_LEFT_CHANNEL_HPP -#define SPROUT_COMPOST_FORMATS_LEFT_CHANNEL_HPP - -#include -#include -#include - -namespace sprout { - namespace compost { - namespace formats { - // - // left_channel_forwarder - // - class left_channel_forwarder {}; - - // - // left_channel - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::compost::formats::left_channel_forwarder left_channel = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, left_channel_forwarder const&) - -> decltype( - SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::steps(2) - ) - { - return SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::steps(2) - ; - } - } // namespace formats - - using sprout::compost::formats::left_channel; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_FORMATS_LEFT_CHANNEL_HPP diff --git a/dsp/lib/sprout/sprout/compost/formats/right_channel.hpp b/dsp/lib/sprout/sprout/compost/formats/right_channel.hpp deleted file mode 100644 index 1646ff3..0000000 --- a/dsp/lib/sprout/sprout/compost/formats/right_channel.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_FORMATS_RIGHT_CHANNEL_HPP -#define SPROUT_COMPOST_FORMATS_RIGHT_CHANNEL_HPP - -#include -#include -#include - -namespace sprout { - namespace compost { - namespace formats { - // - // right_channel_forwarder - // - class right_channel_forwarder {}; - - // - // right_channel - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::compost::formats::right_channel_forwarder right_channel = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, right_channel_forwarder const&) - -> decltype( - SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::steps(2, 1) - ) - { - return SPROUT_FORWARD(Range, lhs) - | sprout::adaptors::steps(2, 1) - ; - } - } // namespace formats - - using sprout::compost::formats::right_channel; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_FORMATS_RIGHT_CHANNEL_HPP diff --git a/dsp/lib/sprout/sprout/compost/formats/stereo.hpp b/dsp/lib/sprout/sprout/compost/formats/stereo.hpp deleted file mode 100644 index beae3c6..0000000 --- a/dsp/lib/sprout/sprout/compost/formats/stereo.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_FORMATS_STEREO_HPP -#define SPROUT_COMPOST_FORMATS_STEREO_HPP - -#include -#include - -namespace sprout { - namespace compost { - namespace formats { - // - // stereo - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::alternated_forwarder stereo = {}; - } // anonymous-namespace - } // namespace formats - - using sprout::compost::formats::stereo; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_FORMATS_STEREO_HPP diff --git a/dsp/lib/sprout/sprout/compost/load/source.hpp b/dsp/lib/sprout/sprout/compost/load/source.hpp deleted file mode 100644 index b0dda5a..0000000 --- a/dsp/lib/sprout/sprout/compost/load/source.hpp +++ /dev/null @@ -1,72 +0,0 @@ - -#ifndef COMPOST_DEF_LOAD_SOURCE_IDENTIFIER -# error should define COMPOST_DEF_LOAD_SOURCE_IDENTIFIER. -#endif - -#ifndef COMPOST_DEF_LOAD_SOURCE_FILE -# error should define COMPOST_DEF_LOAD_SOURCE_FILE. -#endif - -#define COMPOST_LOAD_IDENTIFIER_DETAIL_CAT(id, suffix) COMPOST_LOAD_IDENTIFIER_DETAIL_CAT_I(id, suffix) -#define COMPOST_LOAD_IDENTIFIER_DETAIL_CAT_I(id, suffix) COMPOST_LOAD_IDENTIFIER_DETAIL_CAT_II(id ## suffix) -#define COMPOST_LOAD_IDENTIFIER_DETAIL_CAT_II(res) res - -#define COMPOST_LOAD_DETAIL_IDENTIFIER(id) COMPOST_LOAD_IDENTIFIER_DETAIL_CAT( \ - COMPOST_LOAD_IDENTIFIER_DETAIL_CAT(COMPOST_DEF_LOAD_SOURCE_IDENTIFIER, id), \ - _compost_load_source_detail \ - ) - -#define COMPOST_LOAD_IDENTIFIER COMPOST_DEF_LOAD_SOURCE_IDENTIFIER -#ifdef COMPOST_DEF_LOAD_INFO_IDENTIFIER -# define COMPOST_LOAD_INFO_IDENTIFIER COMPOST_DEF_LOAD_INFO_IDENTIFIER -#else -# define COMPOST_LOAD_INFO_IDENTIFIER COMPOST_LOAD_DETAIL_IDENTIFIER(info) -#endif - -#ifdef COMPOST_DEF_LOAD_SOURCE_INDEX -# define COMPOST_LOAD_SOURCE_INDEX COMPOST_DEF_LOAD_SOURCE_INDEX -#else -# define COMPOST_LOAD_SOURCE_INDEX 0 -#endif - -SPROUT_STATIC_CONSTEXPR sprout::compost::sources::version_type COMPOST_LOAD_DETAIL_IDENTIFIER(version) = -# define COMPOST_LOADING_SOURCE_VERSION -# include COMPOST_DEF_LOAD_SOURCE_FILE -# undef COMPOST_LOADING_SOURCE_VERSION - ; - -static_assert(COMPOST_LOAD_DETAIL_IDENTIFIER(version) <= 0, "Unsupported compost src version"); - -SPROUT_STATIC_CONSTEXPR sprout::compost::sources::info_type COMPOST_LOAD_INFO_IDENTIFIER = { -# define COMPOST_LOADING_SOURCE_INFO -# include COMPOST_DEF_LOAD_SOURCE_FILE -# undef COMPOST_LOADING_SOURCE_INFO - }; - -SPROUT_STATIC_CONSTEXPR sprout::compost::sources::sound_type< - COMPOST_LOAD_INFO_IDENTIFIER.size -> COMPOST_LOAD_IDENTIFIER( - COMPOST_LOAD_INFO_IDENTIFIER, -# define COMPOST_LOADING_SOURCE_DATA -# include COMPOST_DEF_LOAD_SOURCE_FILE -# undef COMPOST_LOADING_SOURCE_DATA - ); - -#undef COMPOST_LOAD_IDENTIFIER -#undef COMPOST_LOAD_INFO_IDENTIFIER -#undef COMPOST_LOAD_SOURCE_INDEX - -#undef COMPOST_LOAD_DETAIL_IDENTIFIER - -#undef COMPOST_LOAD_IDENTIFIER_DETAIL_CAT -#undef COMPOST_LOAD_IDENTIFIER_DETAIL_CAT_I -#undef COMPOST_LOAD_IDENTIFIER_DETAIL_CAT_II - -#undef COMPOST_DEF_LOAD_SOURCE_IDENTIFIER -#undef COMPOST_DEF_LOAD_SOURCE_FILE -#ifdef COMPOST_DEF_LOAD_INFO_IDENTIFIER -# undef COMPOST_DEF_LOAD_INFO_IDENTIFIER -#endif -#ifdef COMPOST_DEF_LOAD_SOURCE_INDEX -# undef COMPOST_DEF_LOAD_SOURCE_INDEX -#endif diff --git a/dsp/lib/sprout/sprout/compost/ranges.hpp b/dsp/lib/sprout/sprout/compost/ranges.hpp deleted file mode 100644 index 1c24332..0000000 --- a/dsp/lib/sprout/sprout/compost/ranges.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_RANGES_HPP -#define SPROUT_COMPOST_RANGES_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_COMPOST_RANGES_HPP diff --git a/dsp/lib/sprout/sprout/compost/ranges/adapted_dropped.hpp b/dsp/lib/sprout/sprout/compost/ranges/adapted_dropped.hpp deleted file mode 100644 index 276c590..0000000 --- a/dsp/lib/sprout/sprout/compost/ranges/adapted_dropped.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_RANGES_ADAPTED_DROPPED_HPP -#define SPROUT_COMPOST_RANGES_ADAPTED_DROPPED_HPP - -#include -#include - -namespace sprout { - namespace compost { - namespace ranges { - // - // adapted_dropped - // - using sprout::adaptors::adapted_dropped; - } // namespace ranges - - using sprout::compost::ranges::adapted_dropped; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_RANGES_ADAPTED_DROPPED_HPP diff --git a/dsp/lib/sprout/sprout/compost/ranges/adapted_dropped_end.hpp b/dsp/lib/sprout/sprout/compost/ranges/adapted_dropped_end.hpp deleted file mode 100644 index 3fe29d4..0000000 --- a/dsp/lib/sprout/sprout/compost/ranges/adapted_dropped_end.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_RANGES_ADAPTED_DROPPED_END_HPP -#define SPROUT_COMPOST_RANGES_ADAPTED_DROPPED_END_HPP - -#include -#include - -namespace sprout { - namespace compost { - namespace ranges { - // - // adapted_dropped_end - // - using sprout::adaptors::adapted_dropped_end; - } // namespace ranges - - using sprout::compost::ranges::adapted_dropped_end; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_RANGES_ADAPTED_DROPPED_END_HPP diff --git a/dsp/lib/sprout/sprout/compost/ranges/adapted_offset.hpp b/dsp/lib/sprout/sprout/compost/ranges/adapted_offset.hpp deleted file mode 100644 index f9b80a6..0000000 --- a/dsp/lib/sprout/sprout/compost/ranges/adapted_offset.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_RANGES_ADAPTED_OFFSET_HPP -#define SPROUT_COMPOST_RANGES_ADAPTED_OFFSET_HPP - -#include -#include - -namespace sprout { - namespace compost { - namespace ranges { - // - // adapted_offset - // - using sprout::adaptors::adapted_offset; - } // namespace ranges - - using sprout::compost::ranges::adapted_offset; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_RANGES_ADAPTED_OFFSET_HPP diff --git a/dsp/lib/sprout/sprout/compost/ranges/adapted_taken.hpp b/dsp/lib/sprout/sprout/compost/ranges/adapted_taken.hpp deleted file mode 100644 index 8526b6b..0000000 --- a/dsp/lib/sprout/sprout/compost/ranges/adapted_taken.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_RANGES_ADAPTED_TAKEN_HPP -#define SPROUT_COMPOST_RANGES_ADAPTED_TAKEN_HPP - -#include -#include - -namespace sprout { - namespace compost { - namespace ranges { - // - // adapted_taken - // - using sprout::adaptors::adapted_taken; - } // namespace ranges - - using sprout::compost::ranges::adapted_taken; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_RANGES_ADAPTED_TAKEN_HPP diff --git a/dsp/lib/sprout/sprout/compost/ranges/adapted_taken_end.hpp b/dsp/lib/sprout/sprout/compost/ranges/adapted_taken_end.hpp deleted file mode 100644 index 4634193..0000000 --- a/dsp/lib/sprout/sprout/compost/ranges/adapted_taken_end.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_RANGES_ADAPTED_TAKEN_END_HPP -#define SPROUT_COMPOST_RANGES_ADAPTED_TAKEN_END_HPP - -#include -#include - -namespace sprout { - namespace compost { - namespace ranges { - // - // adapted_taken_end - // - using sprout::adaptors::adapted_taken_end; - } // namespace ranges - - using sprout::compost::ranges::adapted_taken_end; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_RANGES_ADAPTED_TAKEN_END_HPP diff --git a/dsp/lib/sprout/sprout/compost/ranges/adapted_window.hpp b/dsp/lib/sprout/sprout/compost/ranges/adapted_window.hpp deleted file mode 100644 index 3edb106..0000000 --- a/dsp/lib/sprout/sprout/compost/ranges/adapted_window.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_RANGES_ADAPTED_WINDOW_HPP -#define SPROUT_COMPOST_RANGES_ADAPTED_WINDOW_HPP - -#include -#include - -namespace sprout { - namespace compost { - namespace ranges { - // - // adapted_window - // - using sprout::adaptors::adapted_window; - } // namespace ranges - - using sprout::compost::ranges::adapted_window; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_RANGES_ADAPTED_WINDOW_HPP diff --git a/dsp/lib/sprout/sprout/compost/ranges/copied.hpp b/dsp/lib/sprout/sprout/compost/ranges/copied.hpp deleted file mode 100644 index 748b9f1..0000000 --- a/dsp/lib/sprout/sprout/compost/ranges/copied.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_RANGES_COPIED_HPP -#define SPROUT_COMPOST_RANGES_COPIED_HPP - -#include -#include - -namespace sprout { - namespace compost { - namespace ranges { - // - // copied - // - using sprout::adaptors::copied; - } // namespace ranges - - using sprout::compost::ranges::copied; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_RANGES_COPIED_HPP diff --git a/dsp/lib/sprout/sprout/compost/ranges/dropped.hpp b/dsp/lib/sprout/sprout/compost/ranges/dropped.hpp deleted file mode 100644 index 88d9f04..0000000 --- a/dsp/lib/sprout/sprout/compost/ranges/dropped.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_RANGES_DROPPED_HPP -#define SPROUT_COMPOST_RANGES_DROPPED_HPP - -#include -#include - -namespace sprout { - namespace compost { - namespace ranges { - // - // dropped - // - using sprout::adaptors::dropped; - } // namespace ranges - - using sprout::compost::ranges::dropped; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_RANGES_DROPPED_HPP diff --git a/dsp/lib/sprout/sprout/compost/ranges/dropped_end.hpp b/dsp/lib/sprout/sprout/compost/ranges/dropped_end.hpp deleted file mode 100644 index a6dce52..0000000 --- a/dsp/lib/sprout/sprout/compost/ranges/dropped_end.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_RANGES_DROPPED_END_HPP -#define SPROUT_COMPOST_RANGES_DROPPED_END_HPP - -#include -#include - -namespace sprout { - namespace compost { - namespace ranges { - // - // dropped_end - // - using sprout::adaptors::dropped_end; - } // namespace ranges - - using sprout::compost::ranges::dropped_end; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_RANGES_DROPPED_END_HPP diff --git a/dsp/lib/sprout/sprout/compost/ranges/jointed.hpp b/dsp/lib/sprout/sprout/compost/ranges/jointed.hpp deleted file mode 100644 index 9bf8ea9..0000000 --- a/dsp/lib/sprout/sprout/compost/ranges/jointed.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_RANGES_JOINTED_HPP -#define SPROUT_COMPOST_RANGES_JOINTED_HPP - -#include -#include - -namespace sprout { - namespace compost { - namespace ranges { - // - // jointed - // - using sprout::adaptors::jointed; - } // namespace ranges - - using sprout::compost::ranges::jointed; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_RANGES_JOINTED_HPP diff --git a/dsp/lib/sprout/sprout/compost/ranges/offset.hpp b/dsp/lib/sprout/sprout/compost/ranges/offset.hpp deleted file mode 100644 index 221d0f1..0000000 --- a/dsp/lib/sprout/sprout/compost/ranges/offset.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_RANGES_OFFSET_HPP -#define SPROUT_COMPOST_RANGES_OFFSET_HPP - -#include -#include - -namespace sprout { - namespace compost { - namespace ranges { - // - // offset - // - using sprout::adaptors::offset; - } // namespace ranges - - using sprout::compost::ranges::offset; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_RANGES_OFFSET_HPP diff --git a/dsp/lib/sprout/sprout/compost/ranges/piped.hpp b/dsp/lib/sprout/sprout/compost/ranges/piped.hpp deleted file mode 100644 index d436b4b..0000000 --- a/dsp/lib/sprout/sprout/compost/ranges/piped.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_RANGES_PIPED_HPP -#define SPROUT_COMPOST_RANGES_PIPED_HPP - -#include -#include - -namespace sprout { - namespace compost { - namespace ranges { - // - // piped - // - using sprout::adaptors::piped; - } // namespace ranges - - using sprout::compost::ranges::piped; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_RANGES_PIPED_HPP diff --git a/dsp/lib/sprout/sprout/compost/ranges/taken.hpp b/dsp/lib/sprout/sprout/compost/ranges/taken.hpp deleted file mode 100644 index 3bc72c4..0000000 --- a/dsp/lib/sprout/sprout/compost/ranges/taken.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_RANGES_TAKEN_HPP -#define SPROUT_COMPOST_RANGES_TAKEN_HPP - -#include -#include - -namespace sprout { - namespace compost { - namespace ranges { - // - // taken - // - using sprout::adaptors::taken; - } // namespace ranges - - using sprout::compost::ranges::taken; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_RANGES_TAKEN_HPP diff --git a/dsp/lib/sprout/sprout/compost/ranges/taken_end.hpp b/dsp/lib/sprout/sprout/compost/ranges/taken_end.hpp deleted file mode 100644 index 6fb2b80..0000000 --- a/dsp/lib/sprout/sprout/compost/ranges/taken_end.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_RANGES_TAKEN_END_HPP -#define SPROUT_COMPOST_RANGES_TAKEN_END_HPP - -#include -#include - -namespace sprout { - namespace compost { - namespace ranges { - // - // taken_end - // - using sprout::adaptors::taken_end; - } // namespace ranges - - using sprout::compost::ranges::taken_end; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_RANGES_TAKEN_END_HPP diff --git a/dsp/lib/sprout/sprout/compost/ranges/window.hpp b/dsp/lib/sprout/sprout/compost/ranges/window.hpp deleted file mode 100644 index 7663df0..0000000 --- a/dsp/lib/sprout/sprout/compost/ranges/window.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_RANGES_WINDOW_HPP -#define SPROUT_COMPOST_RANGES_WINDOW_HPP - -#include -#include - -namespace sprout { - namespace compost { - namespace ranges { - // - // window - // - using sprout::adaptors::window; - } // namespace ranges - - using sprout::compost::ranges::window; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_RANGES_WINDOW_HPP diff --git a/dsp/lib/sprout/sprout/compost/sources.hpp b/dsp/lib/sprout/sprout/compost/sources.hpp deleted file mode 100644 index 43e5072..0000000 --- a/dsp/lib/sprout/sprout/compost/sources.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_SOURCES_HPP -#define SPROUT_COMPOST_SOURCES_HPP - -#include -#include - -#endif // #ifndef SPROUT_COMPOST_SOURCES_HPP diff --git a/dsp/lib/sprout/sprout/compost/sources/source.hpp b/dsp/lib/sprout/sprout/compost/sources/source.hpp deleted file mode 100644 index 46cacea..0000000 --- a/dsp/lib/sprout/sprout/compost/sources/source.hpp +++ /dev/null @@ -1,89 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_SOURCES_SOURCE_HPP -#define SPROUT_COMPOST_SOURCES_SOURCE_HPP - -#include -#include -#include - -// -// COMPOST_LOAD_SOURCE -// -#define COMPOST_LOAD_SOURCE - -// -// COMPOST_SRC_VERSION -// -#define COMPOST_SRC_VERSION(NUM) NUM - -namespace sprout { - namespace compost { - namespace sources { - // - // version_type - // - typedef unsigned long version_type; - // - // info_type - // - struct info_type { - public: - std::uint16_t format_tag; // format ID - std::uint16_t channels; // channels - std::uint32_t samples_per_sec; // sampling rate - std::uint32_t bytes_per_sec; // data speed (Byte/sec) - std::uint16_t block_size; // block size (Byte/sample*channels) - std::uint16_t bits_per_sample; // bits per sample (bit/sample) - std::size_t size; // elements - }; - // - // sound_type - // - template - struct sound_type { - public: - typedef Elem element_type; - typedef element_type value_type; - typedef std::size_t size_type; - SPROUT_STATIC_CONSTEXPR size_type static_size = Size; - typedef sprout::array elements_type; - private: - elements_type elements_; - public: - template - SPROUT_CONSTEXPR sound_type(info_type const& info, Elems const&... elems) - : elements_{{ - (info.bits_per_sample == 8 ? elems / static_cast(0x80) - 1 - : elems / static_cast(0x8000) - )... - }} - { - static_assert(sizeof...(Elems) == static_size, "sound_type<>: unmatch source size"); - } - SPROUT_CONSTEXPR value_type const& - operator()(size_type x) const { - return elements_[x]; - } - SPROUT_CONSTEXPR size_type - size() const { - return static_size; - } - SPROUT_CONSTEXPR elements_type const& - elements() const { - return elements_; - } - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::compost::sources::sound_type::size_type - sprout::compost::sources::sound_type::static_size; - } // namespace sources - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_SOURCES_SOURCE_HPP diff --git a/dsp/lib/sprout/sprout/compost/utility.hpp b/dsp/lib/sprout/sprout/compost/utility.hpp deleted file mode 100644 index 596d4db..0000000 --- a/dsp/lib/sprout/sprout/compost/utility.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_UTILITY_HPP -#define SPROUT_COMPOST_UTILITY_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_COMPOST_UTILITY_HPP diff --git a/dsp/lib/sprout/sprout/compost/utility/equal_temperament.hpp b/dsp/lib/sprout/sprout/compost/utility/equal_temperament.hpp deleted file mode 100644 index 74492bf..0000000 --- a/dsp/lib/sprout/sprout/compost/utility/equal_temperament.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_UTILITY_EQUAL_TEMPERAMENT_HPP -#define SPROUT_COMPOST_UTILITY_EQUAL_TEMPERAMENT_HPP - -#include -#include -#include - -namespace sprout { - namespace compost { - // - // equal_temperament_value - // - template - SPROUT_CONSTEXPR typename sprout::float_promote::type - equal_temperament_value(ArithmeticType1 i, ArithmeticType2 div) { - typedef typename sprout::float_promote::type type; - using sprout::pow; - return pow(type(2), type(i) / type(div)); - } - template - SPROUT_CONSTEXPR typename sprout::float_promote::type - equal_temperament_value(ArithmeticType i) { - return sprout::compost::equal_temperament_value(i, 12); - } - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_UTILITY_EQUAL_TEMPERAMENT_HPP diff --git a/dsp/lib/sprout/sprout/compost/utility/iir_filter.hpp b/dsp/lib/sprout/sprout/compost/utility/iir_filter.hpp deleted file mode 100644 index eb2b6f6..0000000 --- a/dsp/lib/sprout/sprout/compost/utility/iir_filter.hpp +++ /dev/null @@ -1,568 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_UTILITY_IIR_FILTER_HPP -#define SPROUT_COMPOST_UTILITY_IIR_FILTER_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace compost { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::float_promote::type - iir_fc(T const& fc) { - typedef typename sprout::float_promote::type type; - using sprout::tan; - return tan(sprout::math::pi() * fc) / sprout::math::two_pi(); - } - template - inline SPROUT_CONSTEXPR typename sprout::float_promote::type - iir_g(T const& g) { - return g + 1; - } - } // namespace detail - - namespace detail { - template - inline SPROUT_CONSTEXPR Result - iir_lpf_impl_2(T const&, T const& q, A const& a, B const& b, T const& x, T const& x2, T const& y) { - return Result( - sprout::remake( - a, 3, - T(1), - (2 * x2 - 2) / y, - (1 - x / q + x2) / y - ), - sprout::remake( - b, 3, - x2 / y, - 2 * x2 / y, - x2 / y - ) - ); - } - template - inline SPROUT_CONSTEXPR Result - iir_lpf_impl_1(T const& fc, T const& q, A const& a, B const& b, T const& x) { - return sprout::compost::detail::iir_lpf_impl_2( - fc, q, a, b, - x, x * x, 1 + x / q + x * x - ); - } - template - inline SPROUT_CONSTEXPR Result - iir_lpf_impl(T const& fc, T const& q, A const& a, B const& b) { - return sprout::compost::detail::iir_lpf_impl_1( - fc, q, a, b, - sprout::math::two_pi() * fc - ); - } - } // namespace detail - // - // iir_lpf - // - template - inline SPROUT_CONSTEXPR sprout::pair< - typename sprout::fixed::results::algorithm::type, - typename sprout::fixed::results::algorithm::type - > - iir_lpf(T const& fc, T const& q, A const& a, B const& b) { - typedef sprout::pair< - typename sprout::fixed::results::algorithm::type, - typename sprout::fixed::results::algorithm::type - > result_type; - return sprout::compost::detail::iir_lpf_impl(sprout::compost::detail::iir_fc(fc), q, a, b); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR Result - iir_hpf_impl_2(T const&, T const& q, A const& a, B const& b, T const& x, T const& x2, T const& y) { - return Result( - sprout::remake( - a, 3, - T(1), - (2 * x2 - 2) / y, - (1 - x / q + x2) / y - ), - sprout::remake( - b, 3, - 1 / y, - -2 / y, - 1 / y - ) - ); - } - template - inline SPROUT_CONSTEXPR Result - iir_hpf_impl_1(T const& fc, T const& q, A const& a, B const& b, T const& x) { - return sprout::compost::detail::iir_hpf_impl_2( - fc, q, a, b, - x, x * x, 1 + x / q + x * x - ); - } - template - inline SPROUT_CONSTEXPR Result - iir_hpf_impl(T const& fc, T const& q, A const& a, B const& b) { - return sprout::compost::detail::iir_hpf_impl_1( - fc, q, a, b, - sprout::math::two_pi() * fc - ); - } - } // namespace detail - // - // iir_hpf - // - template - inline SPROUT_CONSTEXPR sprout::pair< - typename sprout::fixed::results::algorithm::type, - typename sprout::fixed::results::algorithm::type - > - iir_hpf(T const& fc, T const& q, A const& a, B const& b) { - typedef sprout::pair< - typename sprout::fixed::results::algorithm::type, - typename sprout::fixed::results::algorithm::type - > result_type; - return sprout::compost::detail::iir_hpf_impl(sprout::compost::detail::iir_fc(fc), q, a, b); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR Result - iir_bpf_impl_2(T const&, A const& a, B const& b, T const& x, T const& x2, T const& y) { - return Result( - sprout::remake( - a, 3, - T(1), - (2 * x2 - 2) / y, - (1 - x + x2) / y - ), - sprout::remake( - b, 3, - x / y, - T(0), - -x / y - ) - ); - } - template - inline SPROUT_CONSTEXPR Result - iir_bpf_impl_1(T const& fc1, A const& a, B const& b, T const& x, T const& x2) { - return sprout::compost::detail::iir_bpf_impl_2( - fc1, a, b, - x, x2, 1 + x + x2 - ); - } - template - inline SPROUT_CONSTEXPR Result - iir_bpf_impl(T const& fc1, T const& fc2, A const& a, B const& b) { - return sprout::compost::detail::iir_bpf_impl_1( - fc1, a, b, - sprout::math::two_pi() * (fc2 - fc1), - sprout::math::four_pi() * fc1 * fc2 - ); - } - } // namespace detail - // - // iir_bpf - // - template - inline SPROUT_CONSTEXPR sprout::pair< - typename sprout::fixed::results::algorithm::type, - typename sprout::fixed::results::algorithm::type - > - iir_bpf(T const& fc1, T const& fc2, A const& a, B const& b) { - typedef sprout::pair< - typename sprout::fixed::results::algorithm::type, - typename sprout::fixed::results::algorithm::type - > result_type; - return sprout::compost::detail::iir_bpf_impl( - sprout::compost::detail::iir_fc(fc1), sprout::compost::detail::iir_fc(fc2), - a, b - ); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR Result - iir_bef_impl_2(T const&, A const& a, B const& b, T const& x, T const& x2, T const& y) { - return Result( - sprout::remake( - a, 3, - T(1), - (2 * x2 - 2) / y, - (1 - x + x2) / y - ), - sprout::remake( - b, 3, - (x2 + 1) / y, - (2 * x2 - 2) / y, - (x2 + 1) / y - ) - ); - } - template - inline SPROUT_CONSTEXPR Result - iir_bef_impl_1(T const& fc1, A const& a, B const& b, T const& x, T const& x2) { - return sprout::compost::detail::iir_bef_impl_2( - fc1, a, b, - x, x2, 1 + x + x2 - ); - } - template - inline SPROUT_CONSTEXPR Result - iir_bef_impl(T const& fc1, T const& fc2, A const& a, B const& b) { - return sprout::compost::detail::iir_bef_impl_1( - fc1, a, b, - sprout::math::two_pi() * (fc2 - fc1), - sprout::math::four_pi() * fc1 * fc2 - ); - } - } // namespace detail - // - // iir_bef - // - template - inline SPROUT_CONSTEXPR sprout::pair< - typename sprout::fixed::results::algorithm::type, - typename sprout::fixed::results::algorithm::type - > - iir_bef(T const& fc1, T const& fc2, A const& a, B const& b) { - typedef sprout::pair< - typename sprout::fixed::results::algorithm::type, - typename sprout::fixed::results::algorithm::type - > result_type; - return sprout::compost::detail::iir_bef_impl( - sprout::compost::detail::iir_fc(fc1), sprout::compost::detail::iir_fc(fc2), - a, b - ); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR Result - iir_resonator_impl_2(T const&, T const& q, A const& a, B const& b, T const& x, T const& x2, T const& y) { - return Result( - sprout::remake( - a, 3, - T(1), - (2 * x2 - 2) / y, - (1 - x / q + x2) / y - ), - sprout::remake( - b, 3, - x / q / y, - T(0), - -x / q / y - ) - ); - } - template - inline SPROUT_CONSTEXPR Result - iir_resonator_impl_1(T const& fc, T const& q, A const& a, B const& b, T const& x) { - return sprout::compost::detail::iir_resonator_impl_2( - fc, q, a, b, - x, x * x, 1 + x / q + x * x - ); - } - template - inline SPROUT_CONSTEXPR Result - iir_resonator_impl(T const& fc, T const& q, A const& a, B const& b) { - return sprout::compost::detail::iir_resonator_impl_1( - fc, q, a, b, - sprout::math::two_pi() * fc - ); - } - } // namespace detail - // - // iir_resonator - // - template - inline SPROUT_CONSTEXPR sprout::pair< - typename sprout::fixed::results::algorithm::type, - typename sprout::fixed::results::algorithm::type - > - iir_resonator(T const& fc, T const& q, A const& a, B const& b) { - typedef sprout::pair< - typename sprout::fixed::results::algorithm::type, - typename sprout::fixed::results::algorithm::type - > result_type; - return sprout::compost::detail::iir_resonator_impl(sprout::compost::detail::iir_fc(fc), q, a, b); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR Result - iir_notch_impl_2(T const&, T const& q, A const& a, B const& b, T const& x, T const& x2, T const& y) { - return Result( - sprout::remake( - a, 3, - T(1), - (2 * x2 - 2) / y, - (1 - x / q + x2) / y - ), - sprout::remake( - b, 3, - (x2 + 1) / y, - (2 * x2 + 2) / y, - (x2 + 1) / y - ) - ); - } - template - inline SPROUT_CONSTEXPR Result - iir_notch_impl_1(T const& fc, T const& q, A const& a, B const& b, T const& x) { - return sprout::compost::detail::iir_notch_impl_2( - fc, q, a, b, - x, x * x, 1 + x / q + x * x - ); - } - template - inline SPROUT_CONSTEXPR Result - iir_notch_impl(T const& fc, T const& q, A const& a, B const& b) { - return sprout::compost::detail::iir_notch_impl_1( - fc, q, a, b, - sprout::math::two_pi() * fc - ); - } - } // namespace detail - // - // iir_notch - // - template - inline SPROUT_CONSTEXPR sprout::pair< - typename sprout::fixed::results::algorithm::type, - typename sprout::fixed::results::algorithm::type - > - iir_notch(T const& fc, T const& q, A const& a, B const& b) { - typedef sprout::pair< - typename sprout::fixed::results::algorithm::type, - typename sprout::fixed::results::algorithm::type - > result_type; - return sprout::compost::detail::iir_notch_impl(sprout::compost::detail::iir_fc(fc), q, a, b); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR Result - iir_low_shelving_impl_2(T const&, T const& q, T const& g, A const& a, B const& b, T const& x, T const& x2, T const& y, T const& g_) { - return Result( - sprout::remake( - a, 3, - T(1), - (2 * x2 - 2) / y, - (1 - x / q + x2) / y - ), - sprout::remake( - b, 3, - (1 + g_ * x / q + g * x2) / y, - (2 * g * x2 - 2) / y, - (1 + g_ * x / q + g * x2) / y - ) - ); - } - template - inline SPROUT_CONSTEXPR Result - iir_low_shelving_impl_1(T const& fc, T const& q, T const& g, A const& a, B const& b, T const& x) { - using sprout::sqrt; - return sprout::compost::detail::iir_low_shelving_impl_2( - fc, q, g, a, b, - x, x * x, 1 + x / q + x * x, sqrt(g) - ); - } - template - inline SPROUT_CONSTEXPR Result - iir_low_shelving_impl(T const& fc, T const& q, T const& g, A const& a, B const& b) { - return sprout::compost::detail::iir_low_shelving_impl_1( - fc, q, g, a, b, - sprout::math::two_pi() * fc - ); - } - } // namespace detail - // - // iir_low_shelving - // - template - inline SPROUT_CONSTEXPR sprout::pair< - typename sprout::fixed::results::algorithm::type, - typename sprout::fixed::results::algorithm::type - > - iir_low_shelving(T const& fc, T const& q, T const& g, A const& a, B const& b) { - typedef sprout::pair< - typename sprout::fixed::results::algorithm::type, - typename sprout::fixed::results::algorithm::type - > result_type; - return sprout::compost::detail::iir_low_shelving_impl( - sprout::compost::detail::iir_fc(fc), q, sprout::compost::detail::iir_g(g), - a, b - ); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR Result - iir_high_shelving_impl_2(T const&, T const& q, T const& g, A const& a, B const& b, T const& x, T const& x2, T const& y, T const& g_) { - return Result( - sprout::remake( - a, 3, - T(1), - (2 * x2 - 2) / y, - (1 - x / q + x2) / y - ), - sprout::remake( - b, 3, - (g + g_ * x / q + x2) / y, - (2 * x2 - 2 * g) / y, - (g + g_ * x / q + x2) / y - ) - ); - } - template - inline SPROUT_CONSTEXPR Result - iir_high_shelving_impl_1(T const& fc, T const& q, T const& g, A const& a, B const& b, T const& x) { - using sprout::sqrt; - return sprout::compost::detail::iir_high_shelving_impl_2( - fc, q, g, a, b, - x, x * x, 1 + x / q + x * x, sqrt(g) - ); - } - template - inline SPROUT_CONSTEXPR Result - iir_high_shelving_impl(T const& fc, T const& q, T const& g, A const& a, B const& b) { - return sprout::compost::detail::iir_high_shelving_impl_1( - fc, q, g, a, b, - sprout::math::two_pi() * fc - ); - } - } // namespace detail - // - // iir_high_shelving - // - template - inline SPROUT_CONSTEXPR sprout::pair< - typename sprout::fixed::results::algorithm::type, - typename sprout::fixed::results::algorithm::type - > - iir_high_shelving(T const& fc, T const& q, T const& g, A const& a, B const& b) { - typedef sprout::pair< - typename sprout::fixed::results::algorithm::type, - typename sprout::fixed::results::algorithm::type - > result_type; - return sprout::compost::detail::iir_high_shelving_impl( - sprout::compost::detail::iir_fc(fc), q, sprout::compost::detail::iir_g(g), - a, b - ); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR Result - iir_peaking_impl_2(T const&, T const& q, T const& g, A const& a, B const& b, T const& x, T const& x2, T const& y) { - return Result( - sprout::remake( - a, 3, - T(1), - (2 * x2 - 2) / y, - (1 - x / q + x2) / y - ), - sprout::remake( - b, 3, - (1 + x / q + g + x2) / y, - (2 * x2 - 2) / y, - (1 + x / q + g + x2) / y - ) - ); - } - template - inline SPROUT_CONSTEXPR Result - iir_peaking_impl_1(T const& fc, T const& q, T const& g, A const& a, B const& b, T const& x) { - return sprout::compost::detail::iir_peaking_impl_2( - fc, q, g, a, b, - x, x * x, 1 + x / q + x * x - ); - } - template - inline SPROUT_CONSTEXPR Result - iir_peaking_impl(T const& fc, T const& q, T const& g, A const& a, B const& b) { - return sprout::compost::detail::iir_peaking_impl_1( - fc, q, g, a, b, - sprout::math::two_pi() * fc - ); - } - } // namespace detail - // - // iir_peaking - // - template - inline SPROUT_CONSTEXPR sprout::pair< - typename sprout::fixed::results::algorithm::type, - typename sprout::fixed::results::algorithm::type - > - iir_peaking(T const& fc, T const& q, T const& g, A const& a, B const& b) { - typedef sprout::pair< - typename sprout::fixed::results::algorithm::type, - typename sprout::fixed::results::algorithm::type - > result_type; - return sprout::compost::detail::iir_peaking_impl( - sprout::compost::detail::iir_fc(fc), q, sprout::compost::detail::iir_g(g), - a, b - ); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR Result - apply_iir_impl(T const& base, DelayA const& da, DelayB const& db, T const& sample) { - return Result( - sample, - typename Result::second_type( - sprout::remake(da, 2, sample, sprout::tuples::get<0>(da)), - sprout::remake(db, 2, base, sprout::tuples::get<0>(db)) - ) - ); - } - } // namespace detail - // - // apply_iir - // - template - inline SPROUT_CONSTEXPR sprout::pair< - T, - sprout::pair< - typename sprout::fixed::results::algorithm::type, - typename sprout::fixed::results::algorithm::type - > - > - apply_iir(T const& base, A const& a, B const& b, DelayA const& da, DelayB const& db) { - typedef sprout::pair< - T, - sprout::pair< - typename sprout::fixed::results::algorithm::type, - typename sprout::fixed::results::algorithm::type - > - > result_type; - return sprout::compost::detail::apply_iir_impl( - base, da, db, - sprout::tuples::get<0>(b) * base - + sprout::tuples::get<1>(b) * sprout::tuples::get<0>(db) - + sprout::tuples::get<2>(b) * sprout::tuples::get<1>(db) - - sprout::tuples::get<1>(a) * sprout::tuples::get<0>(da) - - sprout::tuples::get<2>(a) * sprout::tuples::get<1>(da) - ); - } - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_UTILITY_IIR_FILTER_HPP diff --git a/dsp/lib/sprout/sprout/compost/utility/rosenberg.hpp b/dsp/lib/sprout/sprout/compost/utility/rosenberg.hpp deleted file mode 100644 index 4edec75..0000000 --- a/dsp/lib/sprout/sprout/compost/utility/rosenberg.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_UTILITY_ROSENBERG_HPP -#define SPROUT_COMPOST_UTILITY_ROSENBERG_HPP - -#include -#include -#include - -namespace sprout { - namespace compost { - // - // rosenberg_value - // Rosenberg wave is asymmetric waveform, - // expansion period/reduction period of the glottis is 40%/16% of the cycle, - // tau1 is expansion period, tau2 is reduction period - // - template - inline SPROUT_CONSTEXPR typename sprout::float_promote::type - rosenberg_value(T x, T tau1, T tau2) { - typedef typename sprout::float_promote::type type; - return x >= 0 && x <= tau1 - ? 3 * sprout::detail::pow2(x / tau1) - 2 * sprout::detail::pow3(x / tau1) - : x > tau1 && x <= tau1 + tau2 - ? 1 - sprout::detail::pow2((x - tau1) / tau2) - : 0 - ; - } - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_UTILITY_ROSENBERG_HPP diff --git a/dsp/lib/sprout/sprout/compost/waves.hpp b/dsp/lib/sprout/sprout/compost/waves.hpp deleted file mode 100644 index 86e2147..0000000 --- a/dsp/lib/sprout/sprout/compost/waves.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_WAVES_HPP -#define SPROUT_COMPOST_WAVES_HPP - -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_COMPOST_WAVES_HPP diff --git a/dsp/lib/sprout/sprout/compost/waves/blanked.hpp b/dsp/lib/sprout/sprout/compost/waves/blanked.hpp deleted file mode 100644 index 781c7ce..0000000 --- a/dsp/lib/sprout/sprout/compost/waves/blanked.hpp +++ /dev/null @@ -1,50 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_WAVES_BLANKED_HPP -#define SPROUT_COMPOST_WAVES_BLANKED_HPP - -#include -#include - -namespace sprout { - namespace compost { - namespace waves { - // - // blanked_forwarder - // - class blanked_forwarder { - public: - SPROUT_CONSTEXPR sprout::adaptors::blanked_range - operator()() const { - return sprout::adaptors::blanked_range(); - } - template - SPROUT_CONSTEXPR sprout::adaptors::blanked_range - operator()(Difference n) const { - return sprout::adaptors::blanked_range(n); - } - template - SPROUT_CONSTEXPR sprout::adaptors::blanked_range - operator()(Difference n, T const& value) const { - return sprout::adaptors::blanked_range(n, value); - } - }; - - // - // blanked - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::compost::waves::blanked_forwarder blanked = {}; - } // anonymous-namespace - } // namespace waves - - using sprout::compost::waves::blanked; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_WAVES_BLANKED_HPP diff --git a/dsp/lib/sprout/sprout/compost/waves/sawtooth_wave.hpp b/dsp/lib/sprout/sprout/compost/waves/sawtooth_wave.hpp deleted file mode 100644 index d9aa574..0000000 --- a/dsp/lib/sprout/sprout/compost/waves/sawtooth_wave.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_WAVES_SAWTOOTH_WAVE_HPP -#define SPROUT_COMPOST_WAVES_SAWTOOTH_WAVE_HPP - -#include -#include - -namespace sprout { - namespace compost { - namespace waves { - // - // sawtooth_wave - // - using sprout::adaptors::sawtooth_wave; - } // namespace waves - - using sprout::compost::waves::sawtooth_wave; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_WAVES_SAWTOOTH_WAVE_HPP diff --git a/dsp/lib/sprout/sprout/compost/waves/sinusoidal.hpp b/dsp/lib/sprout/sprout/compost/waves/sinusoidal.hpp deleted file mode 100644 index 3f6011c..0000000 --- a/dsp/lib/sprout/sprout/compost/waves/sinusoidal.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_WAVES_SINUSOIDAL_HPP -#define SPROUT_COMPOST_WAVES_SINUSOIDAL_HPP - -#include -#include - -namespace sprout { - namespace compost { - namespace waves { - // - // sinusoidal - // - using sprout::adaptors::sinusoidal; - } // namespace waves - - using sprout::compost::waves::sinusoidal; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_WAVES_SINUSOIDAL_HPP diff --git a/dsp/lib/sprout/sprout/compost/waves/square_wave.hpp b/dsp/lib/sprout/sprout/compost/waves/square_wave.hpp deleted file mode 100644 index f1c8005..0000000 --- a/dsp/lib/sprout/sprout/compost/waves/square_wave.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_WAVES_SQUARE_WAVE_HPP -#define SPROUT_COMPOST_WAVES_SQUARE_WAVE_HPP - -#include -#include - -namespace sprout { - namespace compost { - namespace waves { - // - // square_wave - // - using sprout::adaptors::square_wave; - } // namespace waves - - using sprout::compost::waves::square_wave; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_WAVES_SQUARE_WAVE_HPP diff --git a/dsp/lib/sprout/sprout/compost/waves/triangle_wave.hpp b/dsp/lib/sprout/sprout/compost/waves/triangle_wave.hpp deleted file mode 100644 index a31a455..0000000 --- a/dsp/lib/sprout/sprout/compost/waves/triangle_wave.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_WAVES_TRIANGLE_WAVE_HPP -#define SPROUT_COMPOST_WAVES_TRIANGLE_WAVE_HPP - -#include -#include - -namespace sprout { - namespace compost { - namespace waves { - // - // triangle_wave - // - using sprout::adaptors::triangle_wave; - } // namespace waves - - using sprout::compost::waves::triangle_wave; - } // namespace compost -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_WAVES_TRIANGLE_WAVE_HPP diff --git a/dsp/lib/sprout/sprout/compost/waves/white_noise.hpp b/dsp/lib/sprout/sprout/compost/waves/white_noise.hpp deleted file mode 100644 index 49d0078..0000000 --- a/dsp/lib/sprout/sprout/compost/waves/white_noise.hpp +++ /dev/null @@ -1,167 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPOST_WAVES_WHITE_NOISE_HPP -#define SPROUT_COMPOST_WAVES_WHITE_NOISE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace compost { - namespace waves { - // - // white_noise_range - // - template - class white_noise_range - : public sprout::adaptors::detail::adapted_range_default< - Range, - sprout::generator_iterator< - sprout::random::random_result > - > - > - { - public: - typedef sprout::adaptors::detail::adapted_range_default< - Range, - sprout::generator_iterator< - sprout::random::random_result > - > - > base_type; - typedef typename base_type::range_type range_type; - typedef typename base_type::iterator iterator; - typedef typename base_type::value_type value_type; - typedef typename iterator::generator_type generator_type; - typedef typename generator_type::engine_type engine_type; - typedef typename generator_type::distribution_type distribution_type; - public: - SPROUT_CONSTEXPR white_noise_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - white_noise_range(white_noise_range const&) = default; - explicit SPROUT_CONSTEXPR white_noise_range( - range_type& range, - engine_type const& gen, - value_type const& sigma = 1 - ) - : base_type( - iterator(distribution_type(0, sigma)(gen), sprout::size(range)), - iterator() - ) - {} - SPROUT_CONSTEXPR engine_type engine() const { - return base_type::begin().generator().engine(); - } - SPROUT_CONSTEXPR value_type sigma() const { - return base_type::begin().generator().distribution().sigma(); - } - }; - - template - class white_noise_range - : public sprout::range::range_container< - sprout::generator_iterator< - sprout::random::random_result > - > - > - { - public: - typedef sprout::range::range_container< - sprout::generator_iterator< - sprout::random::random_result > - > - > base_type; - typedef typename base_type::iterator iterator; - typedef typename base_type::value_type value_type; - typedef typename iterator::generator_type generator_type; - typedef typename generator_type::engine_type engine_type; - typedef typename generator_type::distribution_type distribution_type; - public: - SPROUT_CONSTEXPR white_noise_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - white_noise_range(white_noise_range const&) = default; - explicit SPROUT_CONSTEXPR white_noise_range( - engine_type const& gen, - value_type const& sigma = 1 - ) - : base_type( - iterator(distribution_type(0, sigma)(gen)), - iterator() - ) - {} - SPROUT_CONSTEXPR engine_type engine() const { - return base_type::begin().generator().engine(); - } - SPROUT_CONSTEXPR value_type sigma() const { - return base_type::begin().generator().distribution().sigma(); - } - }; - - // - // white_noise_forwarder - // - class white_noise_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::compost::waves::white_noise_range - operator()( - UniformRandomNumberGenerator const& gen, - Value const& sigma = 1 - ) const - { - return sprout::compost::waves::white_noise_range(gen, sigma); - } - }; - - // - // white_noise - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::compost::waves::white_noise_forwarder white_noise = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::compost::waves::white_noise_range< - Value, UniformRandomNumberGenerator, - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::compost::waves::white_noise_range const& rhs) { - return sprout::compost::waves::white_noise_range< - Value, UniformRandomNumberGenerator, - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(lhs), - rhs.engine(), rhs.sigma() - ); - } - } // namespace waves - - using sprout::compost::waves::white_noise; - } // namespace compost - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_COMPOST_WAVES_WHITE_NOISE_HPP diff --git a/dsp/lib/sprout/sprout/compressed_pair.hpp b/dsp/lib/sprout/sprout/compressed_pair.hpp deleted file mode 100644 index 4149531..0000000 --- a/dsp/lib/sprout/sprout/compressed_pair.hpp +++ /dev/null @@ -1,459 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_COMPRESSED_PAIR_HPP -#define SPROUT_COMPRESSED_PAIR_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - struct compressed_pair_switch; - template - struct compressed_pair_switch - : public sprout::integral_constant - {}; - template - struct compressed_pair_switch - : public sprout::integral_constant - {}; - template - struct compressed_pair_switch - : public sprout::integral_constant - {}; - template - struct compressed_pair_switch - : public sprout::integral_constant - {}; - template - struct compressed_pair_switch - : public sprout::integral_constant - {}; - template - struct compressed_pair_switch - : public sprout::integral_constant - {}; - - template - class compressed_pair_impl; - template - class compressed_pair_impl { - public: - typedef T1 first_type; - typedef T2 second_type; - typedef typename sprout::detail::call_traits::param_type first_param_type; - typedef typename sprout::detail::call_traits::param_type second_param_type; - typedef typename sprout::detail::call_traits::reference first_reference; - typedef typename sprout::detail::call_traits::reference second_reference; - typedef typename sprout::detail::call_traits::const_reference first_const_reference; - typedef typename sprout::detail::call_traits::const_reference second_const_reference; - private: - first_type first_; - second_type second_; - public: - SPROUT_CONSTEXPR compressed_pair_impl() - : first_() - , second_() - {} - SPROUT_CONSTEXPR compressed_pair_impl(first_param_type x, second_param_type y) - : first_(x) - , second_(y) - {} - SPROUT_CONSTEXPR compressed_pair_impl(first_param_type x) - : first_(x) - {} - SPROUT_CONSTEXPR compressed_pair_impl(second_param_type y) - : second_(y) - {} - SPROUT_CXX14_CONSTEXPR first_reference first() { - return first_; - } - SPROUT_CONSTEXPR first_const_reference first() const { - return first_; - } - SPROUT_CXX14_CONSTEXPR second_reference second() { - return second_; - } - SPROUT_CONSTEXPR second_const_reference second() const { - return second_; - } - SPROUT_CXX14_CONSTEXPR void swap(compressed_pair_impl& other) - SPROUT_NOEXCEPT_IF( - SPROUT_NOEXCEPT_EXPR(sprout::swap(first_, other.first_)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(second_, other.second_)) - ) - { - sprout::swap(first_, other.first_); - sprout::swap(second_, other.second_); - } - }; - template - class compressed_pair_impl - : protected std::remove_cv::type - { - public: - typedef T1 first_type; - typedef T2 second_type; - typedef typename sprout::detail::call_traits::param_type first_param_type; - typedef typename sprout::detail::call_traits::param_type second_param_type; - typedef typename sprout::detail::call_traits::reference first_reference; - typedef typename sprout::detail::call_traits::reference second_reference; - typedef typename sprout::detail::call_traits::const_reference first_const_reference; - typedef typename sprout::detail::call_traits::const_reference second_const_reference; - private: - second_type second_; - public: - SPROUT_CONSTEXPR compressed_pair_impl() - : second_() - {} - SPROUT_CONSTEXPR compressed_pair_impl(first_param_type x, second_param_type y) - : first_type(x) - , second_(y) - {} - SPROUT_CONSTEXPR compressed_pair_impl(first_param_type x) - : first_type(x) - {} - SPROUT_CONSTEXPR compressed_pair_impl(second_param_type y) - : second_(y) - {} - SPROUT_CXX14_CONSTEXPR first_reference first() { - return *this; - } - SPROUT_CONSTEXPR first_const_reference first() const { - return *this; - } - SPROUT_CXX14_CONSTEXPR second_reference second() { - return second_; - } - SPROUT_CONSTEXPR second_const_reference second() const { - return second_; - } - SPROUT_CXX14_CONSTEXPR void swap(compressed_pair_impl& other) - SPROUT_NOEXCEPT_IF_EXPR(sprout::swap(second_, other.second_)) - { - sprout::swap(second_, other.second_); - } - }; - template - class compressed_pair_impl - : protected std::remove_cv::type - { - public: - typedef T1 first_type; - typedef T2 second_type; - typedef typename sprout::detail::call_traits::param_type first_param_type; - typedef typename sprout::detail::call_traits::param_type second_param_type; - typedef typename sprout::detail::call_traits::reference first_reference; - typedef typename sprout::detail::call_traits::reference second_reference; - typedef typename sprout::detail::call_traits::const_reference first_const_reference; - typedef typename sprout::detail::call_traits::const_reference second_const_reference; - private: - first_type first_; - public: - SPROUT_CONSTEXPR compressed_pair_impl() - : first_() - , second_type() - {} - SPROUT_CONSTEXPR compressed_pair_impl(first_param_type x, second_param_type y) - : first_(x) - , second_type(y) - {} - SPROUT_CONSTEXPR compressed_pair_impl(first_param_type x) - : first_(x) - {} - SPROUT_CONSTEXPR compressed_pair_impl(second_param_type y) - : second_type(y) - {} - SPROUT_CXX14_CONSTEXPR first_reference first() { - return first_; - } - SPROUT_CONSTEXPR first_const_reference first() const { - return first_; - } - SPROUT_CXX14_CONSTEXPR second_reference second() { - return *this; - } - SPROUT_CONSTEXPR second_const_reference second() const { - return *this; - } - SPROUT_CXX14_CONSTEXPR void swap(compressed_pair_impl& other) - SPROUT_NOEXCEPT_IF_EXPR(sprout::swap(first_, other.first_)) - { - sprout::swap(first_, other.first_); - } - }; - template - class compressed_pair_impl - : protected std::remove_cv::type - , protected std::remove_cv::type - { - public: - typedef T1 first_type; - typedef T2 second_type; - typedef typename sprout::detail::call_traits::param_type first_param_type; - typedef typename sprout::detail::call_traits::param_type second_param_type; - typedef typename sprout::detail::call_traits::reference first_reference; - typedef typename sprout::detail::call_traits::reference second_reference; - typedef typename sprout::detail::call_traits::const_reference first_const_reference; - typedef typename sprout::detail::call_traits::const_reference second_const_reference; - public: - SPROUT_CONSTEXPR compressed_pair_impl() - : first_type() - , second_type() - {} - SPROUT_CONSTEXPR compressed_pair_impl(first_param_type x, second_param_type y) - : first_type(x) - , second_type(y) - {} - SPROUT_CONSTEXPR compressed_pair_impl(first_param_type x) - : first_type(x) - {} - SPROUT_CONSTEXPR compressed_pair_impl(second_param_type y) - : second_type(y) - {} - SPROUT_CXX14_CONSTEXPR first_reference first() { - return *this; - } - SPROUT_CONSTEXPR first_const_reference first() const { - return *this; - } - SPROUT_CXX14_CONSTEXPR second_reference second() { - return *this; - } - SPROUT_CONSTEXPR second_const_reference second() const { - return *this; - } - SPROUT_CXX14_CONSTEXPR void swap(compressed_pair_impl&) {} - }; - template - class compressed_pair_impl - : protected std::remove_cv::type - { - public: - typedef T1 first_type; - typedef T2 second_type; - typedef typename sprout::detail::call_traits::param_type first_param_type; - typedef typename sprout::detail::call_traits::param_type second_param_type; - typedef typename sprout::detail::call_traits::reference first_reference; - typedef typename sprout::detail::call_traits::reference second_reference; - typedef typename sprout::detail::call_traits::const_reference first_const_reference; - typedef typename sprout::detail::call_traits::const_reference second_const_reference; - private: - second_type second_; - public: - SPROUT_CONSTEXPR compressed_pair_impl() - : first_type() - , second_() - {} - SPROUT_CONSTEXPR compressed_pair_impl(first_param_type x, second_param_type y) - : first_type(x) - , second_(y) - {} - SPROUT_CONSTEXPR compressed_pair_impl(first_param_type x) - : first_type(x) - , second_(x) - {} - SPROUT_CXX14_CONSTEXPR first_reference first() { - return *this; - } - SPROUT_CONSTEXPR first_const_reference first() const { - return *this; - } - SPROUT_CXX14_CONSTEXPR second_reference second() { - return second_; - } - SPROUT_CONSTEXPR second_const_reference second() const { - return second_; - } - SPROUT_CXX14_CONSTEXPR void swap(compressed_pair_impl&) {} - }; - template - class compressed_pair_impl - { - public: - typedef T1 first_type; - typedef T2 second_type; - typedef typename sprout::detail::call_traits::param_type first_param_type; - typedef typename sprout::detail::call_traits::param_type second_param_type; - typedef typename sprout::detail::call_traits::reference first_reference; - typedef typename sprout::detail::call_traits::reference second_reference; - typedef typename sprout::detail::call_traits::const_reference first_const_reference; - typedef typename sprout::detail::call_traits::const_reference second_const_reference; - private: - first_type first_; - second_type second_; - public: - SPROUT_CONSTEXPR compressed_pair_impl() - : first_() - , second_() - {} - SPROUT_CONSTEXPR compressed_pair_impl(first_param_type x, second_param_type y) - : first_(x) - , second_(y) - {} - SPROUT_CONSTEXPR compressed_pair_impl(first_param_type x) - : first_(x) - , second_(x) - {} - SPROUT_CXX14_CONSTEXPR first_reference first() { - return first_; - } - SPROUT_CONSTEXPR first_const_reference first() const { - return first_; - } - SPROUT_CXX14_CONSTEXPR second_reference second() { - return second_; - } - SPROUT_CONSTEXPR second_const_reference second() const { - return second_; - } - SPROUT_CXX14_CONSTEXPR void swap(compressed_pair_impl& other) - SPROUT_NOEXCEPT_IF( - SPROUT_NOEXCEPT_EXPR(sprout::swap(first_, other.first_)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(second_, other.second_)) - ) - { - sprout::swap(first_, other.first_); - sprout::swap(second_, other.second_); - } - }; - } // namespace detail - - // - // compressed_pair - // - template - class compressed_pair - : private sprout::detail::compressed_pair_impl< - T1, T2, - sprout::detail::compressed_pair_switch< - T1, T2, - std::is_same::type, typename std::remove_cv::type>::value, - std::is_empty::value, std::is_empty::value - >::value - > - { - private: - typedef sprout::detail::compressed_pair_impl< - T1, T2, - sprout::detail::compressed_pair_switch< - T1, T2, - std::is_same::type, typename std::remove_cv::type>::value, - std::is_empty::value, std::is_empty::value - >::value - > base_type; - public: - typedef T1 first_type; - typedef T2 second_type; - typedef typename sprout::detail::call_traits::param_type first_param_type; - typedef typename sprout::detail::call_traits::param_type second_param_type; - typedef typename sprout::detail::call_traits::reference first_reference; - typedef typename sprout::detail::call_traits::reference second_reference; - typedef typename sprout::detail::call_traits::const_reference first_const_reference; - typedef typename sprout::detail::call_traits::const_reference second_const_reference; - public: - SPROUT_CONSTEXPR compressed_pair() - : base_type() - {} - SPROUT_CONSTEXPR compressed_pair(first_param_type x, second_param_type y) - : base_type(x, y) - {} - explicit SPROUT_CONSTEXPR compressed_pair(first_param_type x) - : base_type(x) - {} - explicit SPROUT_CONSTEXPR compressed_pair(second_param_type y) - : base_type(y) - {} - SPROUT_CXX14_CONSTEXPR first_reference first() { - return base_type::first(); - } - SPROUT_CONSTEXPR first_const_reference first() const { - return base_type::first(); - } - SPROUT_CXX14_CONSTEXPR second_reference second() { - return base_type::second(); - } - SPROUT_CONSTEXPR second_const_reference second() const { - return base_type::second(); - } - SPROUT_CXX14_CONSTEXPR void swap(compressed_pair& other) { - base_type::swap(other); - } - }; - template - class compressed_pair - : private sprout::detail::compressed_pair_impl< - T, T, - sprout::detail::compressed_pair_switch< - T, T, - std::is_same::type, typename std::remove_cv::type>::value, - std::is_empty::value, std::is_empty::value - >::value - > - { - private: - typedef sprout::detail::compressed_pair_impl< - T, T, - sprout::detail::compressed_pair_switch< - T, T, - std::is_same::type, typename std::remove_cv::type>::value, - std::is_empty::value, std::is_empty::value - >::value - > base_type; - public: - typedef T first_type; - typedef T second_type; - typedef typename sprout::detail::call_traits::param_type first_param_type; - typedef typename sprout::detail::call_traits::param_type second_param_type; - typedef typename sprout::detail::call_traits::reference first_reference; - typedef typename sprout::detail::call_traits::reference second_reference; - typedef typename sprout::detail::call_traits::const_reference first_const_reference; - typedef typename sprout::detail::call_traits::const_reference second_const_reference; - public: - SPROUT_CONSTEXPR compressed_pair() - : base_type() - {} - SPROUT_CONSTEXPR compressed_pair(first_param_type x, second_param_type y) - : base_type(x, y) - {} - explicit SPROUT_CONSTEXPR compressed_pair(first_param_type x) - : base_type(x) - {} - SPROUT_CXX14_CONSTEXPR first_reference first() { - return base_type::first(); - } - SPROUT_CONSTEXPR first_const_reference first() const { - return base_type::first(); - } - SPROUT_CXX14_CONSTEXPR second_reference second() { - return base_type::second(); - } - SPROUT_CONSTEXPR second_const_reference second() const { - return base_type::second(); - } - SPROUT_CXX14_CONSTEXPR void swap(compressed_pair& other) { - base_type::swap(other); - } - }; - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::compressed_pair& lhs, sprout::compressed_pair& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } -} // namespace sprout - -#endif // #ifndef SPROUT_COMPRESSED_PAIR_HPP diff --git a/dsp/lib/sprout/sprout/config.hpp b/dsp/lib/sprout/sprout/config.hpp deleted file mode 100644 index efd04af..0000000 --- a/dsp/lib/sprout/sprout/config.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_HPP -#define SPROUT_CONFIG_HPP - -#include -#include - -#endif // #ifndef SPROUT_CONFIG_HPP diff --git a/dsp/lib/sprout/sprout/config/auto_config.hpp b/dsp/lib/sprout/sprout/config/auto_config.hpp deleted file mode 100644 index 8dbfe06..0000000 --- a/dsp/lib/sprout/sprout/config/auto_config.hpp +++ /dev/null @@ -1,154 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_AUTO_CONFIG_HPP -#define SPROUT_CONFIG_AUTO_CONFIG_HPP - -#include -#include - -// -// SPROUT_CONFIG_DISABLE_CONSTEXPR -// -#ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR -# if defined(SPROUT_NO_CXX11_CONSTEXPR) && !defined(SPROUT_CONFIG_FORCE_CONSTEXPR) -# define SPROUT_CONFIG_DISABLE_CONSTEXPR -# endif // #ifdef SPROUT_NO_CXX11_CONSTEXPR -#endif // #ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR - -// -// SPROUT_CONFIG_DISABLE_CXX14_CONSTEXPR -// -#ifndef SPROUT_CONFIG_DISABLE_CXX14_CONSTEXPR -# if defined(SPROUT_NO_CXX14_CONSTEXPR) && !defined(SPROUT_CONFIG_FORCE_CXX14_CONSTEXPR) -# define SPROUT_CONFIG_DISABLE_CXX14_CONSTEXPR -# endif // #ifdef SPROUT_NO_CXX14_CONSTEXPR -#endif // #ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR - -// -// SPROUT_CONFIG_DISABLE_DEFAULTED_FUNCTIONS -// -#ifndef SPROUT_CONFIG_DISABLE_DEFAULTED_FUNCTIONS -# if defined(SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(SPROUT_CONFIG_FORCE_DEFAULTED_FUNCTIONS) -# define SPROUT_CONFIG_DISABLE_DEFAULTED_FUNCTIONS -# endif // #ifdef SPROUT_NO_CXX11_CONSTEXPR -#endif // #ifndef SPROUT_CONFIG_DISABLE_DEFAULTED_FUNCTIONS - -// -// SPROUT_CONFIG_DISABLE_DELETED_FUNCTIONS -// -#ifndef SPROUT_CONFIG_DISABLE_DELETED_FUNCTIONS -# if defined(SPROUT_NO_CXX11_DELETED_FUNCTIONS) && !defined(SPROUT_CONFIG_FORCE_DELETED_FUNCTIONS) -# define SPROUT_CONFIG_DISABLE_DELETED_FUNCTIONS -# endif // #ifdef SPROUT_NO_CXX11_CONSTEXPR -#endif // #ifndef SPROUT_CONFIG_DISABLE_DELETED_FUNCTIONS - -// -// SPROUT_CONFIG_DISABLE_EXPLICIT_CONVERSION_OPERATORS -// -#ifndef SPROUT_CONFIG_DISABLE_EXPLICIT_CONVERSION_OPERATORS -# if defined(SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) && !defined(SPROUT_CONFIG_FORCE_EXPLICIT_CONVERSION_OPERATORS) -# define SPROUT_CONFIG_DISABLE_EXPLICIT_CONVERSION_OPERATORS -# endif // #ifdef SPROUT_NO_CXX11_CONSTEXPR -#endif // #ifndef SPROUT_CONFIG_DISABLE_EXPLICIT_CONVERSION_OPERATORS - -// -// SPROUT_CONFIG_DISABLE_NOEXCEPT -// -#ifndef SPROUT_CONFIG_DISABLE_NOEXCEPT -# if defined(SPROUT_NO_CXX11_NOEXCEPT) && !defined(SPROUT_CONFIG_FORCE_NOEXCEPT) -# define SPROUT_CONFIG_DISABLE_NOEXCEPT -# endif // #ifdef SPROUT_NO_CXX11_NOEXCEPT -#endif // #ifndef SPROUT_CONFIG_DISABLE_NOEXCEPT - -// -// SPROUT_CONFIG_DISABLE_TEMPLATE_ALIASES -// -#ifndef SPROUT_CONFIG_DISABLE_TEMPLATE_ALIASES -# if defined(SPROUT_NO_CXX11_TEMPLATE_ALIASES) && !defined(SPROUT_CONFIG_FORCE_TEMPLATE_ALIASES) -# define SPROUT_CONFIG_DISABLE_TEMPLATE_ALIASES -# endif // #ifdef SPROUT_NO_CXX11_TEMPLATE_ALIASES -#endif // #ifndef SPROUT_CONFIG_DISABLE_TEMPLATE_ALIASES - -// -// SPROUT_USE_USER_DEFINED_LITERALS -// -#ifndef SPROUT_USE_USER_DEFINED_LITERALS -# if defined(SPROUT_NO_CXX11_USER_DEFINED_LITERALS) && !defined(SPROUT_CONFIG_FORCE_USER_DEFINED_LITERALS) -# define SPROUT_CONFIG_DISABLE_USER_DEFINED_LITERALS -# endif // #ifdef SPROUT_NO_CXX11_USER_DEFINED_LITERALS -#endif // #ifndef SPROUT_USE_USER_DEFINED_LITERALS - -// -// SPROUT_CONFIG_DISABLE_DELEGATING_CONSTRUCTORS -// -#ifndef SPROUT_CONFIG_DISABLE_DELEGATING_CONSTRUCTORS -# if defined(SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS) && !defined(SPROUT_CONFIG_FORCE_DELEGATING_CONSTRUCTORS) -# define SPROUT_CONFIG_DISABLE_DELEGATING_CONSTRUCTORS -# endif // #ifdef SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS -#endif // #ifndef SPROUT_CONFIG_DISABLE_DELEGATING_CONSTRUCTORS - -// -// SPROUT_CONFIG_DISABLE_UNICODE_LITERALS -// -#ifndef SPROUT_CONFIG_DISABLE_UNICODE_LITERALS -# if defined(SPROUT_NO_CXX11_UNICODE_LITERALS) && !defined(SPROUT_CONFIG_FORCE_UNICODE_LITERALS) -# define SPROUT_CONFIG_DISABLE_UNICODE_LITERALS -# endif // #ifdef SPROUT_NO_CXX11_UNICODE_LITERALS -#endif // #ifndef SPROUT_CONFIG_DISABLE_UNICODE_LITERALS - -// -// SPROUT_CONFIG_DISABLE_VARIABLE_TEMPLATES -// -#ifndef SPROUT_CONFIG_DISABLE_VARIABLE_TEMPLATES -# if defined(SPROUT_NO_CXX14_VARIABLE_TEMPLATES) && !defined(SPROUT_CONFIG_FORCE_VARIABLE_TEMPLATES) -# define SPROUT_CONFIG_DISABLE_VARIABLE_TEMPLATES -# endif // #ifdef SPROUT_NO_CXX14_VARIABLE_TEMPLATES -#endif // #ifndef SPROUT_CONFIG_DISABLE_VARIABLE_TEMPLATES - -// -// SPROUT_CONFIG_USE_SSCRISK_CEL -// - -// -// SPROUT_CONFIG_DISABLE_BUILTIN_CMATH_FUNCTION -// -#ifndef SPROUT_CONFIG_DISABLE_BUILTIN_CMATH_FUNCTION -# ifndef SPROUT_HAS_CONSTEXPR_CMATH_FUNCTION -# define SPROUT_CONFIG_DISABLE_BUILTIN_CMATH_FUNCTION -# endif // #ifdef SPROUT_HAS_CONSTEXPR_CMATH_FUNCTION -#endif // #ifndef SPROUT_CONFIG_DISABLE_BUILTIN_CMATH_FUNCTION - -// -// SPROUT_CONFIG_DISABLE_BUILTIN_COPYSIGN_FUNCTION -// -#ifndef SPROUT_CONFIG_DISABLE_BUILTIN_COPYSIGN_FUNCTION -# ifndef SPROUT_HAS_CONSTEXPR_COPYSIGN_FUNCTION -# define SPROUT_CONFIG_DISABLE_BUILTIN_COPYSIGN_FUNCTION -# endif // #ifdef SPROUT_HAS_CONSTEXPR_COPYSIGN_FUNCTION -#endif // #ifndef SPROUT_CONFIG_DISABLE_BUILTIN_COPYSIGN_FUNCTION - -// -// SPROUT_CONFIG_DISABLE_BUILTIN_BIT_OPERATION -// -#ifndef SPROUT_CONFIG_DISABLE_BUILTIN_BIT_OPERATION -# ifndef SPROUT_HAS_CONSTEXPR_BIT_OPERATION -# define SPROUT_CONFIG_DISABLE_BUILTIN_BIT_OPERATION -# endif // #ifdef SPROUT_HAS_CONSTEXPR_BIT_OPERATION -#endif // #ifndef SPROUT_CONFIG_DISABLE_BUILTIN_BIT_OPERATION - -// -// SPROUT_CONFIG_DISABLE_SUPPORT_TEMPORARY_CONTAINER_ITERATION -// SPROUT_CONFIG_SUPPORT_TEMPORARY_CONTAINER_ITERATION -// -#ifndef SPROUT_CONFIG_DISABLE_SUPPORT_TEMPORARY_CONTAINER_ITERATION -# define SPROUT_CONFIG_SUPPORT_TEMPORARY_CONTAINER_ITERATION -#endif // #ifndef SPROUT_CONFIG_DISABLE_SUPPORT_TEMPORARY_CONTAINER_ITERATION - -#include - -#endif // #ifndef SPROUT_CONFIG_AUTO_CONFIG_HPP diff --git a/dsp/lib/sprout/sprout/config/compiler.hpp b/dsp/lib/sprout/sprout/config/compiler.hpp deleted file mode 100644 index 711a10c..0000000 --- a/dsp/lib/sprout/sprout/config/compiler.hpp +++ /dev/null @@ -1,60 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_COMPILER_HPP -#define SPROUT_CONFIG_COMPILER_HPP - -#if defined(__GCCXML__) -# include -#elif defined(_CRAYC) -# include -#elif defined(__CUDACC__) -# include -#elif defined(__COMO__) -# include -#elif defined(__PATHSCALE__) && (__PATHCC__ >= 4) -# include -#elif defined(__clang__) -# include -#elif defined(__DMC__) -# include -#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) -# include -# elif defined(__GNUC__) -# include -#elif defined(__KCC) -# include -#elif defined(__sgi) -# include -#elif defined(__DECCXX) -# include -#elif defined(__ghs) -# include -#elif defined(__CODEGEARC__) -# include -#elif defined(__BORLANDC__) -# include -#elif defined(__MWERKS__) -# include -#elif defined(__SUNPRO_CC) -# include -#elif defined(__HP_aCC) -# include -#elif defined(__MRC__) || defined(__SC__) -# include -#elif defined(__IBMCPP__) -# include -#elif defined(__PGI) -# include -#elif defined(_MSC_VER) -# include -#endif - -#include -#include - -#endif // #ifndef SPROUT_CONFIG_COMPILER_HPP diff --git a/dsp/lib/sprout/sprout/config/compiler/borland.hpp b/dsp/lib/sprout/sprout/config/compiler/borland.hpp deleted file mode 100644 index 31b098e..0000000 --- a/dsp/lib/sprout/sprout/config/compiler/borland.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_COMPILER_BORLAND_HPP -#define SPROUT_CONFIG_COMPILER_BORLAND_HPP - -#define SPROUT_NO_CXX11_CONSTEXPR -#define SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS -#define SPROUT_NO_CXX11_DELETED_FUNCTIONS -#if !defined(SPROUT_CODEGEAR_0X_SUPPORT) || (__BORLANDC__ < 0x610) -# define SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#endif -#define SPROUT_NO_CXX11_NOEXCEPT -#define SPROUT_NO_CXX11_TEMPLATE_ALIASES -#define SPROUT_NO_CXX11_USER_DEFINED_LITERALS -#define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS -#define SPROUT_NO_CXX11_UNICODE_LITERALS -#define SPROUT_NO_CXX11_ATTRIBUTES - -#define SPROUT_NO_CXX14_CONSTEXPR -#define SPROUT_NO_CXX14_VARIABLE_TEMPLATES - -#endif // #ifndef SPROUT_CONFIG_COMPILER_BORLAND_HPP diff --git a/dsp/lib/sprout/sprout/config/compiler/clang.hpp b/dsp/lib/sprout/sprout/config/compiler/clang.hpp deleted file mode 100644 index e99ce59..0000000 --- a/dsp/lib/sprout/sprout/config/compiler/clang.hpp +++ /dev/null @@ -1,71 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_COMPILER_CLANG_HPP -#define SPROUT_CONFIG_COMPILER_CLANG_HPP - -#if !__has_feature(cxx_constexpr) -# define SPROUT_NO_CXX11_CONSTEXPR -#endif - -#if !__has_feature(cxx_defaulted_functions) -# define SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS -#endif - -#if !__has_feature(cxx_deleted_functions) -# define SPROUT_NO_CXX11_DELETED_FUNCTIONS -#endif - -#if !__has_feature(cxx_explicit_conversions) -# define SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#endif - -#if !__has_feature(cxx_noexcept) -# define SPROUT_NO_CXX11_NOEXCEPT -#endif - -#if !__has_feature(cxx_alias_templates) -# define SPROUT_NO_CXX11_TEMPLATE_ALIASES -#endif - -#if !__has_feature(cxx_user_literals) -# define SPROUT_NO_CXX11_USER_DEFINED_LITERALS -#endif - -#if !__has_feature(cxx_delegating_constructors) -# define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS -#endif - -#if !__has_feature(cxx_unicode_literals) -# define SPROUT_NO_CXX11_UNICODE_LITERALS -#endif - -#if !__has_feature(cxx_attributes) -# define SPROUT_NO_CXX11_ATTRIBUTES -#endif - -#if !__has_feature(cxx_relaxed_constexpr) -# define SPROUT_NO_CXX14_CONSTEXPR -#endif - -#if !__has_feature(cxx_variable_templates) -# define SPROUT_NO_CXX14_VARIABLE_TEMPLATES -#endif - -#if (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 0)) -# define SPROUT_HAS_CONSTEXPR_COPYSIGN_FUNCTION -#endif - -#if !defined(SPROUT_NO_CXX11_CONSTEXPR) -# define SPROUT_WORKAROUND_NOT_TERMINATE_RECURSIVE_CONSTEXPR_FUNCTION_TEMPLATE -#endif - -#if (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 4)) -# define SPROUT_WORKAROUND_NEEDS_EXPLICIT_EMPTY_BASE_CLASS_CONSTRUCT -#endif - -#endif // #ifndef SPROUT_CONFIG_COMPILER_CLANG_HPP diff --git a/dsp/lib/sprout/sprout/config/compiler/codegear.hpp b/dsp/lib/sprout/sprout/config/compiler/codegear.hpp deleted file mode 100644 index ade78f4..0000000 --- a/dsp/lib/sprout/sprout/config/compiler/codegear.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_COMPILER_CODEGEAR_HPP -#define SPROUT_CONFIG_COMPILER_CODEGEAR_HPP - -#define SPROUT_NO_CXX11_CONSTEXPR -#define SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS -#define SPROUT_NO_CXX11_DELETED_FUNCTIONS -#define SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#define SPROUT_NO_CXX11_NOEXCEPT -#define SPROUT_NO_CXX11_TEMPLATE_ALIASES -#define SPROUT_NO_CXX11_USER_DEFINED_LITERALS -#define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS -#define SPROUT_NO_CXX11_UNICODE_LITERALS -#define SPROUT_NO_CXX11_ATTRIBUTES - -#define SPROUT_NO_CXX14_CONSTEXPR -#define SPROUT_NO_CXX14_VARIABLE_TEMPLATES - -#endif // #ifndef SPROUT_CONFIG_COMPILER_CODEGEAR_HPP diff --git a/dsp/lib/sprout/sprout/config/compiler/comeau.hpp b/dsp/lib/sprout/sprout/config/compiler/comeau.hpp deleted file mode 100644 index 4a29d81..0000000 --- a/dsp/lib/sprout/sprout/config/compiler/comeau.hpp +++ /dev/null @@ -1,13 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_COMPILER_COMEAU_HPP -#define SPROUT_CONFIG_COMPILER_COMEAU_HPP - -#include - -#endif // #ifndef SPROUT_CONFIG_COMPILER_COMEAU_HPP diff --git a/dsp/lib/sprout/sprout/config/compiler/common_edg.hpp b/dsp/lib/sprout/sprout/config/compiler/common_edg.hpp deleted file mode 100644 index 0b9ad87..0000000 --- a/dsp/lib/sprout/sprout/config/compiler/common_edg.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_COMPILER_COMMON_EDG_HPP -#define SPROUT_CONFIG_COMPILER_COMMON_EDG_HPP - -#define SPROUT_NO_CXX11_CONSTEXPR -#define SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS -#define SPROUT_NO_CXX11_DELETED_FUNCTIONS -#define SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#define SPROUT_NO_CXX11_NOEXCEPT -#define SPROUT_NO_CXX11_TEMPLATE_ALIASES -#define SPROUT_NO_CXX11_USER_DEFINED_LITERALS -#define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS -#define SPROUT_NO_CXX11_UNICODE_LITERALS -#define SPROUT_NO_CXX11_ATTRIBUTES - -#define SPROUT_NO_CXX14_CONSTEXPR -#define SPROUT_NO_CXX14_VARIABLE_TEMPLATES - -#endif // #ifndef SPROUT_CONFIG_COMPILER_COMMON_EDG_HPP diff --git a/dsp/lib/sprout/sprout/config/compiler/compaq_cxx.hpp b/dsp/lib/sprout/sprout/config/compiler/compaq_cxx.hpp deleted file mode 100644 index 99b71d2..0000000 --- a/dsp/lib/sprout/sprout/config/compiler/compaq_cxx.hpp +++ /dev/null @@ -1,13 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_COMPILER_COMPAQ_CXX_HPP -#define SPROUT_CONFIG_COMPILER_COMPAQ_CXX_HPP - -#include - -#endif // #ifndef SPROUT_CONFIG_COMPILER_COMPAQ_CXX_HPP diff --git a/dsp/lib/sprout/sprout/config/compiler/cray.hpp b/dsp/lib/sprout/sprout/config/compiler/cray.hpp deleted file mode 100644 index 58ecdf5..0000000 --- a/dsp/lib/sprout/sprout/config/compiler/cray.hpp +++ /dev/null @@ -1,13 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_COMPILER_CRAY_HPP -#define SPROUT_CONFIG_COMPILER_CRAY_HPP - -#include - -#endif // #ifndef SPROUT_CONFIG_COMPILER_CRAY_HPP diff --git a/dsp/lib/sprout/sprout/config/compiler/digitalmars.hpp b/dsp/lib/sprout/sprout/config/compiler/digitalmars.hpp deleted file mode 100644 index 0da8f06..0000000 --- a/dsp/lib/sprout/sprout/config/compiler/digitalmars.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_COMPILER_DIGITALMARS_HPP -#define SPROUT_CONFIG_COMPILER_DIGITALMARS_HPP - -#define SPROUT_NO_CXX11_CONSTEXPR -#define SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS -#define SPROUT_NO_CXX11_DELETED_FUNCTIONS -#define SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#define SPROUT_NO_CXX11_NOEXCEPT -#define SPROUT_NO_CXX11_TEMPLATE_ALIASES -#define SPROUT_NO_CXX11_USER_DEFINED_LITERALS -#define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS -#define SPROUT_NO_CXX11_UNICODE_LITERALS -#define SPROUT_NO_CXX11_ATTRIBUTES - -#define SPROUT_NO_CXX14_CONSTEXPR -#define SPROUT_NO_CXX14_VARIABLE_TEMPLATES - -#endif // #ifndef SPROUT_CONFIG_COMPILER_DIGITALMARS_HPP diff --git a/dsp/lib/sprout/sprout/config/compiler/gcc.hpp b/dsp/lib/sprout/sprout/config/compiler/gcc.hpp deleted file mode 100644 index 4bb74b8..0000000 --- a/dsp/lib/sprout/sprout/config/compiler/gcc.hpp +++ /dev/null @@ -1,75 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_COMPILER_GCC_HPP -#define SPROUT_CONFIG_COMPILER_GCC_HPP - -#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L) -# define SPROUT_GCC_CXX11 -#endif - -#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(SPROUT_GCC_CXX11)) -# define SPROUT_NO_CXX11_CONSTEXPR -#endif - -#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(SPROUT_GCC_CXX11)) -# define SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS -#endif - -#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(SPROUT_GCC_CXX11)) -# define SPROUT_NO_CXX11_DELETED_FUNCTIONS -#endif - -#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(SPROUT_GCC_CXX11)) -# define SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#endif - -#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(SPROUT_GCC_CXX11)) -# define SPROUT_NO_CXX11_NOEXCEPT -#endif - -#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(SPROUT_GCC_CXX11)) -# define SPROUT_NO_CXX11_TEMPLATE_ALIASES -#endif - -#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(SPROUT_GCC_CXX11)) -# define SPROUT_NO_CXX11_USER_DEFINED_LITERALS -#endif - -#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(SPROUT_GCC_CXX11)) -# define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS -#endif - -#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(SPROUT_GCC_CXX11)) -# define SPROUT_NO_CXX11_UNICODE_LITERALS -#endif - -#if ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)) && defined(SPROUT_GCC_CXX11)) -# define SPROUT_NO_CXX11_ATTRIBUTES -#endif - -#if ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && defined(SPROUT_GCC_CXX11)) -# define SPROUT_HAS_CONSTEXPR_CMATH_FUNCTION -#endif - -#if ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && defined(SPROUT_GCC_CXX11)) -# define SPROUT_HAS_CONSTEXPR_COPYSIGN_FUNCTION -#endif - -#if ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && defined(SPROUT_GCC_CXX11)) -# define SPROUT_HAS_CONSTEXPR_BIT_OPERATION -#endif - -#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) -# define SPROUT_NO_CXX14_CONSTEXPR -#endif - -#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) -# define SPROUT_NO_CXX14_VARIABLE_TEMPLATES -#endif - -#endif // #ifndef SPROUT_CONFIG_COMPILER_GCC_HPP diff --git a/dsp/lib/sprout/sprout/config/compiler/gcc_xml.hpp b/dsp/lib/sprout/sprout/config/compiler/gcc_xml.hpp deleted file mode 100644 index 2ae890a..0000000 --- a/dsp/lib/sprout/sprout/config/compiler/gcc_xml.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_COMPILER_GCC_XML_HPP -#define SPROUT_CONFIG_COMPILER_GCC_XML_HPP - -#define SPROUT_NO_CXX11_CONSTEXPR -#define SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS -#define SPROUT_NO_CXX11_DELETED_FUNCTIONS -#define SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#define SPROUT_NO_CXX11_NOEXCEPT -#define SPROUT_NO_CXX11_TEMPLATE_ALIASES -#define SPROUT_NO_CXX11_USER_DEFINED_LITERALS -#define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS -#define SPROUT_NO_CXX11_UNICODE_LITERALS -#define SPROUT_NO_CXX11_ATTRIBUTES - -#define SPROUT_NO_CXX14_CONSTEXPR -#define SPROUT_NO_CXX14_VARIABLE_TEMPLATES - -#endif // #ifndef SPROUT_CONFIG_COMPILER_GCC_XML_HPP diff --git a/dsp/lib/sprout/sprout/config/compiler/greenhills.hpp b/dsp/lib/sprout/sprout/config/compiler/greenhills.hpp deleted file mode 100644 index 6a1c700..0000000 --- a/dsp/lib/sprout/sprout/config/compiler/greenhills.hpp +++ /dev/null @@ -1,13 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_COMPILER_GREENHILLS_HPP -#define SPROUT_CONFIG_COMPILER_GREENHILLS_HPP - -#include - -#endif // #ifndef SPROUT_CONFIG_COMPILER_GREENHILLS_HPP diff --git a/dsp/lib/sprout/sprout/config/compiler/has_future.hpp b/dsp/lib/sprout/sprout/config/compiler/has_future.hpp deleted file mode 100644 index c98d404..0000000 --- a/dsp/lib/sprout/sprout/config/compiler/has_future.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_COMPILER_HAS_FUTURE_HPP -#define SPROUT_CONFIG_COMPILER_HAS_FUTURE_HPP - -#ifndef SPROUT_NO_CXX11_CONSTEXPR -# define SPROUT_HAS_CONSTEXPR -#endif -#ifndef SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS -# define SPROUT_HAS_DEFAULTED_FUNCTIONS -#endif -#ifndef SPROUT_NO_CXX11_DELETED_FUNCTIONS -# define SPROUT_HAS_DELETED_FUNCTIONS -#endif -#ifndef SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -# define SPROUT_HAS_EXPLICIT_CONVERSION_OPERATORS -#endif -#ifndef SPROUT_NO_CXX11_NOEXCEPT -# define SPROUT_HAS_NOEXCEPT -#endif -#ifndef SPROUT_NO_CXX11_TEMPLATE_ALIASES -# define SPROUT_HAS_TEMPLATE_ALIASES -#endif -#ifndef SPROUT_NO_CXX11_USER_DEFINED_LITERALS -# define SPROUT_HAS_USER_DEFINED_LITERALS -#endif -#ifndef SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS -# define SPROUT_HAS_DELEGATING_CONSTRUCTORS -#endif -#ifndef SPROUT_NO_CXX11_UNICODE_LITERALS -# define SPROUT_HAS_UNICODE_LITERALS -#endif -#ifndef SPROUT_NO_CXX11_ATTRIBUTES -# define SPROUT_HAS_ATTRIBUTES -#endif - -#ifndef SPROUT_NO_CXX14_VARIABLE_TEMPLATES -# define SPROUT_HAS_VARIABLE_TEMPLATES -#endif - -#endif // #ifndef SPROUT_CONFIG_COMPILER_HAS_FUTURE_HPP diff --git a/dsp/lib/sprout/sprout/config/compiler/hp_acc.hpp b/dsp/lib/sprout/sprout/config/compiler/hp_acc.hpp deleted file mode 100644 index 011ae26..0000000 --- a/dsp/lib/sprout/sprout/config/compiler/hp_acc.hpp +++ /dev/null @@ -1,13 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_COMPILER_HP_ACC_HPP -#define SPROUT_CONFIG_COMPILER_HP_ACC_HPP - -#include - -#endif // #ifndef SPROUT_CONFIG_COMPILER_HP_ACC_HPP diff --git a/dsp/lib/sprout/sprout/config/compiler/intel.hpp b/dsp/lib/sprout/sprout/config/compiler/intel.hpp deleted file mode 100644 index 32062ac..0000000 --- a/dsp/lib/sprout/sprout/config/compiler/intel.hpp +++ /dev/null @@ -1,53 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_COMPILER_INTEL_HPP -#define SPROUT_CONFIG_COMPILER_INTEL_HPP - -#include - -#if defined(__INTEL_COMPILER) -# define SPROUT_INTEL_CXX_VERSION __INTEL_COMPILER -#elif defined(__ICL) -# define SPROUT_INTEL_CXX_VERSION __ICL -#elif defined(__ICC) -# define SPROUT_INTEL_CXX_VERSION __ICC -#elif defined(__ECC) -# define SPROUT_INTEL_CXX_VERSION __ECC -#endif - -#if (!(defined(_WIN32) || defined(_WIN64)) && defined(__STDC_HOSTED__) && (__STDC_HOSTED__ && (SPROUT_INTEL_CXX_VERSION <= 1200))) || defined(__GXX_EXPERIMENTAL_CPP0X__) || defined(__GXX_EXPERIMENTAL_CXX0X__) -# define SPROUT_INTEL_STDCXX11 -#endif -#if defined(_MSC_VER) && (_MSC_VER >= 1600) -# define SPROUT_INTEL_STDCXX11 -#endif - -#if defined(SPROUT_INTEL_STDCXX11) && (SPROUT_INTEL_CXX_VERSION >= 1200) -# undef SPROUT_NO_CXX11_DELETED_FUNCTIONS -# undef SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS -#endif - -#if defined(SPROUT_INTEL_STDCXX11) && (SPROUT_INTEL_CXX_VERSION > 1200) -# undef SPROUT_NO_CXX11_TEMPLATE_ALIASES -#endif - -#if defined(SPROUT_INTEL_STDCXX11) && (SPROUT_INTEL_CXX_VERSION >= 1400) && !defined(_MSC_VER) -# undef SPROUT_NO_CXX11_UNICODE_LITERALS -# undef SPROUT_NO_CXX11_CONSTEXPR -#endif - -#if defined(_MSC_VER) && (_MSC_VER <= 1700) -# define SPROUT_NO_CXX11_DELETED_FUNCTIONS -# define SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS -# define SPROUT_NO_CXX11_TEMPLATE_ALIASES -#endif - -#define SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES -#define SPROUT_WORKAROUND_NO_DEFAULT_TEMPLATE_PARAMETERS_SFINAE_WITH_ARRAY - -#endif // #ifndef SPROUT_CONFIG_COMPILER_INTEL_HPP diff --git a/dsp/lib/sprout/sprout/config/compiler/kai.hpp b/dsp/lib/sprout/sprout/config/compiler/kai.hpp deleted file mode 100644 index bb81ec0..0000000 --- a/dsp/lib/sprout/sprout/config/compiler/kai.hpp +++ /dev/null @@ -1,13 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_COMPILER_KAI_HPP -#define SPROUT_CONFIG_COMPILER_KAI_HPP - -#include - -#endif // #ifndef SPROUT_CONFIG_COMPILER_KAI_HPP diff --git a/dsp/lib/sprout/sprout/config/compiler/metrowerks.hpp b/dsp/lib/sprout/sprout/config/compiler/metrowerks.hpp deleted file mode 100644 index 660d489..0000000 --- a/dsp/lib/sprout/sprout/config/compiler/metrowerks.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_COMPILER_METROWERKS_HPP -#define SPROUT_CONFIG_COMPILER_METROWERKS_HPP - -#define SPROUT_NO_CXX11_CONSTEXPR -#define SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS -#define SPROUT_NO_CXX11_DELETED_FUNCTIONS -#define SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#define SPROUT_NO_CXX11_NOEXCEPT -#define SPROUT_NO_CXX11_TEMPLATE_ALIASES -#define SPROUT_NO_CXX11_USER_DEFINED_LITERALS -#define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS -#define SPROUT_NO_CXX11_UNICODE_LITERALS -#define SPROUT_NO_CXX11_ATTRIBUTES - -#define SPROUT_NO_CXX14_CONSTEXPR -#define SPROUT_NO_CXX14_VARIABLE_TEMPLATES - -#endif // #ifndef SPROUT_CONFIG_COMPILER_METROWERKS_HPP diff --git a/dsp/lib/sprout/sprout/config/compiler/mpw.hpp b/dsp/lib/sprout/sprout/config/compiler/mpw.hpp deleted file mode 100644 index 2d5720f..0000000 --- a/dsp/lib/sprout/sprout/config/compiler/mpw.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_COMPILER_MPW_HPP -#define SPROUT_CONFIG_COMPILER_MPW_HPP - -#define SPROUT_NO_CXX11_CONSTEXPR -#define SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS -#define SPROUT_NO_CXX11_DELETED_FUNCTIONS -#define SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#define SPROUT_NO_CXX11_NOEXCEPT -#define SPROUT_NO_CXX11_TEMPLATE_ALIASES -#define SPROUT_NO_CXX11_USER_DEFINED_LITERALS -#define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS -#define SPROUT_NO_CXX11_UNICODE_LITERALS -#define SPROUT_NO_CXX11_ATTRIBUTES - -#define SPROUT_NO_CXX14_CONSTEXPR -#define SPROUT_NO_CXX14_VARIABLE_TEMPLATES - -#endif // #ifndef SPROUT_CONFIG_COMPILER_MPW_HPP diff --git a/dsp/lib/sprout/sprout/config/compiler/no_future.hpp b/dsp/lib/sprout/sprout/config/compiler/no_future.hpp deleted file mode 100644 index e49f1a3..0000000 --- a/dsp/lib/sprout/sprout/config/compiler/no_future.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_COMPILER_NO_FUTURE_HPP -#define SPROUT_CONFIG_COMPILER_NO_FUTURE_HPP - -#ifdef SPROUT_NO_CXX11_CONSTEXPR -# define SPROUT_NO_CONSTEXPR -#endif -#ifdef SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS -# define SPROUT_NO_DEFAULTED_FUNCTIONS -#endif -#ifdef SPROUT_NO_CXX11_DELETED_FUNCTIONS -# define SPROUT_NO_DELETED_FUNCTIONS -#endif -#ifdef SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -# define SPROUT_NO_EXPLICIT_CONVERSION_OPERATORS -#endif -#ifdef SPROUT_NO_CXX11_NOEXCEPT -# define SPROUT_NO_NOEXCEPT -#endif -#ifdef SPROUT_NO_CXX11_TEMPLATE_ALIASES -# define SPROUT_NO_TEMPLATE_ALIASES -#endif -#ifdef SPROUT_NO_CXX11_USER_DEFINED_LITERALS -# define SPROUT_NO_USER_DEFINED_LITERALS -#endif -#ifdef SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS -# define SPROUT_NO_DELEGATING_CONSTRUCTORS -#endif -#ifdef SPROUT_NO_CXX11_UNICODE_LITERALS -# define SPROUT_NO_UNICODE_LITERALS -#endif -#ifdef SPROUT_NO_CXX11_ATTRIBUTES -# define SPROUT_NO_ATTRIBUTES -#endif - -#ifdef SPROUT_NO_CXX14_VARIABLE_TEMPLATES -# define SPROUT_NO_VARIABLE_TEMPLATES -#endif - -#endif // #ifndef SPROUT_CONFIG_COMPILER_NO_FUTURE_HPP diff --git a/dsp/lib/sprout/sprout/config/compiler/nvcc.hpp b/dsp/lib/sprout/sprout/config/compiler/nvcc.hpp deleted file mode 100644 index 7661f76..0000000 --- a/dsp/lib/sprout/sprout/config/compiler/nvcc.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_COMPILER_NVCC_HPP -#define SPROUT_CONFIG_COMPILER_NVCC_HPP - -#if defined(__GNUC__) -# include -#elif defined(_MSC_VER) -# include -#endif - -#endif // #ifndef SPROUT_CONFIG_COMPILER_NVCC_HPP diff --git a/dsp/lib/sprout/sprout/config/compiler/pathscale.hpp b/dsp/lib/sprout/sprout/config/compiler/pathscale.hpp deleted file mode 100644 index 84f236b..0000000 --- a/dsp/lib/sprout/sprout/config/compiler/pathscale.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_COMPILER_PATHSCALE_HPP -#define SPROUT_CONFIG_COMPILER_PATHSCALE_HPP - -#if __PATHCC__ >= 4 -# define SPROUT_NO_CXX11_CONSTEXPR -# define SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS -# define SPROUT_NO_CXX11_DELETED_FUNCTIONS -# define SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -# define SPROUT_NO_CXX11_NOEXCEPT -# define SPROUT_NO_CXX11_TEMPLATE_ALIASES -# define SPROUT_NO_CXX11_USER_DEFINED_LITERALS -# define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS -# define SPROUT_NO_CXX11_UNICODE_LITERALS -# define SPROUT_NO_CXX11_ATTRIBUTES - -# define SPROUT_NO_CXX14_CONSTEXPR -# define SPROUT_NO_CXX14_VARIABLE_TEMPLATES -#endif - -#endif // #ifndef SPROUT_CONFIG_COMPILER_PATHSCALE_HPP diff --git a/dsp/lib/sprout/sprout/config/compiler/pgi.hpp b/dsp/lib/sprout/sprout/config/compiler/pgi.hpp deleted file mode 100644 index 08a38a5..0000000 --- a/dsp/lib/sprout/sprout/config/compiler/pgi.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_COMPILER_PGI_HPP -#define SPROUT_CONFIG_COMPILER_PGI_HPP - -#define SPROUT_NO_CXX11_CONSTEXPR -#define SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS -#define SPROUT_NO_CXX11_DELETED_FUNCTIONS -#define SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#define SPROUT_NO_CXX11_NOEXCEPT -#define SPROUT_NO_CXX11_TEMPLATE_ALIASES -#define SPROUT_NO_CXX11_USER_DEFINED_LITERALS -#define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS -#define SPROUT_NO_CXX11_UNICODE_LITERALS -#define SPROUT_NO_CXX11_ATTRIBUTES - -#define SPROUT_NO_CXX14_CONSTEXPR -#define SPROUT_NO_CXX14_VARIABLE_TEMPLATES - -#endif // #ifndef SPROUT_CONFIG_COMPILER_PGI_HPP diff --git a/dsp/lib/sprout/sprout/config/compiler/sgi_mipspro.hpp b/dsp/lib/sprout/sprout/config/compiler/sgi_mipspro.hpp deleted file mode 100644 index 4a15699..0000000 --- a/dsp/lib/sprout/sprout/config/compiler/sgi_mipspro.hpp +++ /dev/null @@ -1,13 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_COMPILER_SGI_MIPSPRO_HPP -#define SPROUT_CONFIG_COMPILER_SGI_MIPSPRO_HPP - -#include - -#endif // #ifndef SPROUT_CONFIG_COMPILER_SGI_MIPSPRO_HPP diff --git a/dsp/lib/sprout/sprout/config/compiler/sunpro_cc.hpp b/dsp/lib/sprout/sprout/config/compiler/sunpro_cc.hpp deleted file mode 100644 index 71e3ed5..0000000 --- a/dsp/lib/sprout/sprout/config/compiler/sunpro_cc.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_COMPILER_SUNPRO_CC_HPP -#define SPROUT_CONFIG_COMPILER_SUNPRO_CC_HPP - -#define SPROUT_NO_CXX11_CONSTEXPR -#define SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS -#define SPROUT_NO_CXX11_DELETED_FUNCTIONS -#define SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#define SPROUT_NO_CXX11_NOEXCEPT -#define SPROUT_NO_CXX11_TEMPLATE_ALIASES -#define SPROUT_NO_CXX11_USER_DEFINED_LITERALS -#define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS -#define SPROUT_NO_CXX11_UNICODE_LITERALS -#define SPROUT_NO_CXX11_ATTRIBUTES - -#define SPROUT_NO_CXX14_CONSTEXPR -#define SPROUT_NO_CXX14_VARIABLE_TEMPLATES - -#endif // #ifndef SPROUT_CONFIG_COMPILER_SUNPRO_CC_HPP diff --git a/dsp/lib/sprout/sprout/config/compiler/vacpp.hpp b/dsp/lib/sprout/sprout/config/compiler/vacpp.hpp deleted file mode 100644 index b4d912a..0000000 --- a/dsp/lib/sprout/sprout/config/compiler/vacpp.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_COMPILER_VACPP_HPP -#define SPROUT_CONFIG_COMPILER_VACPP_HPP - -#if !__IBMCPP_CONSTEXPR -# define SPROUT_NO_CXX11_CONSTEXPR -#endif -#define SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS -#define SPROUT_NO_CXX11_DELETED_FUNCTIONS -#if !__IBMCPP_EXPLICIT_CONVERSION_OPERATORS -# define SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#endif -#define SPROUT_NO_CXX11_NOEXCEPT -#define SPROUT_NO_CXX11_TEMPLATE_ALIASES -#define SPROUT_NO_CXX11_USER_DEFINED_LITERALS -#define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS -#define SPROUT_NO_CXX11_UNICODE_LITERALS -#define SPROUT_NO_CXX11_ATTRIBUTES - -#define SPROUT_NO_CXX14_CONSTEXPR -#define SPROUT_NO_CXX14_VARIABLE_TEMPLATES - -#endif // #ifndef SPROUT_CONFIG_COMPILER_VACPP_HPP diff --git a/dsp/lib/sprout/sprout/config/compiler/visualc.hpp b/dsp/lib/sprout/sprout/config/compiler/visualc.hpp deleted file mode 100644 index b486753..0000000 --- a/dsp/lib/sprout/sprout/config/compiler/visualc.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_COMPILER_VISUALC_HPP -#define SPROUT_CONFIG_COMPILER_VISUALC_HPP - -#if _MSC_FULL_VER < 190023026 -# define SPROUT_NO_CXX11_CONSTEXPR -#endif -//#define SPROUT_NO_STATIC_CONSTEXPR_INITIALIZATION - -#if _MSC_FULL_VER < 180020827 -# define SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS -# define SPROUT_NO_CXX11_DELETED_FUNCTIONS -# define SPROUT_NO_CXX11_TEMPLATE_ALIASES -# define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS -#endif -#if _MSC_FULL_VER < 170051025 || !defined(SPROUT_MSVC_ENABLE_2012_NOV_CTP) -# define SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#endif -#if _MSC_FULL_VER < 190023026 -# define SPROUT_NO_CXX11_NOEXCEPT -# define SPROUT_NO_CXX11_USER_DEFINED_LITERALS -# define SPROUT_NO_CXX11_UNICODE_LITERALS -#endif -#define SPROUT_NO_CXX11_ATTRIBUTES - -#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) -# define SPROUT_NO_CXX14_CONSTEXPR -#endif -#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) -# define SPROUT_NO_CXX14_VARIABLE_TEMPLATES -#endif - -#endif // #ifndef SPROUT_CONFIG_COMPILER_VISUALC_HPP diff --git a/dsp/lib/sprout/sprout/config/config.hpp b/dsp/lib/sprout/sprout/config/config.hpp deleted file mode 100644 index 623800b..0000000 --- a/dsp/lib/sprout/sprout/config/config.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_CONFIG_HPP -#define SPROUT_CONFIG_CONFIG_HPP - -#ifndef SPROUT_CONFIG_DISABLE_USER_CONFIG -# include -#endif // #ifndef SPROUT_CONFIG_DISABLE_USER_CONFIG - -#ifndef SPROUT_CONFIG_DISABLE_AUTO_CONFIG -# include -#endif // #ifndef SPROUT_CONFIG_DISABLE_AUTO_CONFIG - -#include -#include -#include - -#endif // #ifndef SPROUT_CONFIG_CONFIG_HPP diff --git a/dsp/lib/sprout/sprout/config/stdlib.hpp b/dsp/lib/sprout/sprout/config/stdlib.hpp deleted file mode 100644 index d6ab261..0000000 --- a/dsp/lib/sprout/sprout/config/stdlib.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_STDLIB_HPP -#define SPROUT_CONFIG_STDLIB_HPP - -// for STLport -// !!! OLD: -//#ifdef __cplusplus -//# include -//#else -//# include -//#endif -#ifdef __cplusplus -# include -#else -# include -#endif - -#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) -# include -#else - -#if !defined(__LIBCOMO__) && !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER) \ - && !defined(_LIBCPP_VERSION) && !defined(__GLIBCPP__) && !defined(__GLIBCXX__) \ - && !defined(__STL_CONFIG_H) && !defined(__MSL_CPP__) && !defined(__IBMCPP__) \ - && !defined(MSIPL_COMPILE_H) && !defined(_YVALS) && !defined(_CPPLIB_VER) -# include -#endif - -# if defined(__LIBCOMO__) -# include -# elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER) -# include -# elif defined(_LIBCPP_VERSION) -# include -# elif defined(__GLIBCPP__) || defined(__GLIBCXX__) -# include -# elif defined(__STL_CONFIG_H) -# include -# elif defined(__MSL_CPP__) -# include -# elif defined(__IBMCPP__) -# include -# elif defined(MSIPL_COMPILE_H) -# include -# elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER) -# include -# endif -#endif - -#endif // #ifndef SPROUT_CONFIG_STDLIB_HPP diff --git a/dsp/lib/sprout/sprout/config/stdlib/dinkumware.hpp b/dsp/lib/sprout/sprout/config/stdlib/dinkumware.hpp deleted file mode 100644 index 4d70362..0000000 --- a/dsp/lib/sprout/sprout/config/stdlib/dinkumware.hpp +++ /dev/null @@ -1,125 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_STDLIB_DINKUMWARE_HPP -#define SPROUT_CONFIG_STDLIB_DINKUMWARE_HPP - -#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 520 -# define SPROUT_NO_CXX11_HDR_ARRAY -# define SPROUT_NO_CXX11_HDR_CODECVT -# define SPROUT_NO_CXX11_HDR_FORWARD_LIST -# define SPROUT_NO_CXX11_HDR_INITIALIZER_LIST -# define SPROUT_NO_CXX11_HDR_RANDOM -# define SPROUT_NO_CXX11_HDR_REGEX -# define SPROUT_NO_CXX11_HDR_SYSTEM_ERROR -# define SPROUT_NO_CXX11_HDR_UNORDERED_MAP -# define SPROUT_NO_CXX11_HDR_UNORDERED_SET -# define SPROUT_NO_CXX11_HDR_TUPLE -# define SPROUT_NO_CXX11_HDR_TYPEINDEX -# define SPROUT_NO_CXX11_HDR_FUNCTIONAL -# define SPROUT_NO_CXX11_CHAR_TRAITS -# define SPROUT_NO_CXX11_NUMERIC_LIMITS -# define SPROUT_NO_CXX11_SMART_PTR -#endif - -#if (!defined(_HAS_TR1_IMPORTS) || (_HAS_TR1_IMPORTS+0 == 0)) && !defined(SPROUT_NO_CXX11_HDR_TUPLE) && (!defined(_CPPLIB_VER) || _CPPLIB_VER < 610) -# define SPROUT_NO_CXX11_HDR_TUPLE -#endif - -#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 540 -# define SPROUT_NO_CXX11_HDR_TYPE_TRAITS -# define SPROUT_NO_CXX11_HDR_CHRONO -# define SPROUT_NO_CXX11_HDR_CONDITION_VARIABLE -# define SPROUT_NO_CXX11_HDR_FUTURE -# define SPROUT_NO_CXX11_HDR_MUTEX -# define SPROUT_NO_CXX11_HDR_RATIO -# define SPROUT_NO_CXX11_HDR_THREAD -# define SPROUT_NO_CXX11_ALLOCATOR -# define SPROUT_NO_CXX11_ATOMIC_SMART_PTR -#endif - -#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 610 -# define SPROUT_NO_CXX11_HDR_INITIALIZER_LIST -# define SPROUT_NO_CXX11_HDR_ATOMIC -# define SPROUT_NO_CXX11_ALLOCATOR -# define SPROUT_NO_CXX11_STD_ALIGN -#endif - -#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 650 -# define SPROUT_NO_CXX11_POINTER_TRAITS -#elif defined(_MSC_VER) && _MSC_VER < 1910 -# define SPROUT_NO_CXX11_POINTER_TRAITS -#endif - -#if defined(__has_include) -#if !__has_include() -# define SPROUT_NO_CXX14_HDR_SHARED_MUTEX -#elif (__cplusplus < 201402) && !defined(_MSC_VER) -# define SPROUT_NO_CXX14_HDR_SHARED_MUTEX -#endif -#elif !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) -# define SPROUT_NO_CXX14_HDR_SHARED_MUTEX -#endif - -#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) -# define SPROUT_NO_CXX14_STD_EXCHANGE -#endif - -#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) || !defined(_MSC_VER) || (_MSC_VER < 1910) || !defined(_HAS_CXX17) || (_HAS_CXX17 == 0) -# define SPROUT_NO_CXX17_STD_APPLY -#endif -#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) -# define SPROUT_NO_CXX17_STD_INVOKE -#endif - -#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 650 -# define SPROUT_NO_CXX11_ADDRESSOF -#endif - -#if defined(_CPPLIB_VER) && (_CPPLIB_VER == 650) -# define SPROUT_NO_CXX11_HDR_CODECVT -#endif - -#if defined(_CPPLIB_VER) && (_CPPLIB_VER >= 650) -# if defined(_HAS_AUTO_PTR_ETC) && (_HAS_AUTO_PTR_ETC == 0) -# define SPROUT_NO_AUTO_PTR -# define SPROUT_NO_CXX98_RANDOM_SHUFFLE -# define SPROUT_NO_CXX98_FUNCTION_BASE -# define SPROUT_NO_CXX98_BINDERS -# endif -#endif - -#ifdef _M_CEE -# ifndef SPROUT_NO_CXX11_HDR_MUTEX -# define SPROUT_NO_CXX11_HDR_MUTEX -# endif -# ifndef SPROUT_NO_CXX11_HDR_ATOMIC -# define SPROUT_NO_CXX11_HDR_ATOMIC -# endif -# ifndef SPROUT_NO_CXX11_HDR_FUTURE -# define SPROUT_NO_CXX11_HDR_FUTURE -# endif -# ifndef SPROUT_NO_CXX11_HDR_CONDITION_VARIABLE -# define SPROUT_NO_CXX11_HDR_CONDITION_VARIABLE -# endif -# ifndef SPROUT_NO_CXX11_HDR_THREAD -# define SPROUT_NO_CXX11_HDR_THREAD -# endif -# ifndef SPROUT_NO_CXX14_HDR_SHARED_MUTEX -# define SPROUT_NO_CXX14_HDR_SHARED_MUTEX -# endif -# ifndef SPROUT_NO_CXX14_STD_EXCHANGE -# define SPROUT_NO_CXX14_STD_EXCHANGE -# endif -# ifndef SPROUT_NO_FENV_H -# define SPROUT_NO_FENV_H -# endif -#endif - -#define SPROUT_NO_CXX14_INITIALIZER_LIST - -#endif // #ifndef SPROUT_CONFIG_STDLIB_DINKUMWARE_HPP diff --git a/dsp/lib/sprout/sprout/config/stdlib/libcomo.hpp b/dsp/lib/sprout/sprout/config/stdlib/libcomo.hpp deleted file mode 100644 index 5b5a3de..0000000 --- a/dsp/lib/sprout/sprout/config/stdlib/libcomo.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_STDLIB_LIBCOMO_HPP -#define SPROUT_CONFIG_STDLIB_LIBCOMO_HPP - -#define SPROUT_NO_CXX11_HDR_ARRAY -#define SPROUT_NO_CXX11_HDR_CHRONO -#define SPROUT_NO_CXX11_HDR_CODECVT -#define SPROUT_NO_CXX11_HDR_CONDITION_VARIABLE -#define SPROUT_NO_CXX11_HDR_FORWARD_LIST -#define SPROUT_NO_CXX11_HDR_FUTURE -#define SPROUT_NO_CXX11_HDR_INITIALIZER_LIST -#define SPROUT_NO_CXX11_HDR_MUTEX -#define SPROUT_NO_CXX11_HDR_RANDOM -#define SPROUT_NO_CXX11_HDR_RATIO -#define SPROUT_NO_CXX11_HDR_REGEX -#define SPROUT_NO_CXX11_HDR_SYSTEM_ERROR -#define SPROUT_NO_CXX11_HDR_THREAD -#define SPROUT_NO_CXX11_HDR_TUPLE -#define SPROUT_NO_CXX11_HDR_TYPE_TRAITS -#define SPROUT_NO_CXX11_HDR_TYPEINDEX -#define SPROUT_NO_CXX11_HDR_UNORDERED_MAP -#define SPROUT_NO_CXX11_HDR_UNORDERED_SET -#define SPROUT_NO_CXX11_CHAR_TRAITS -#define SPROUT_NO_CXX11_NUMERIC_LIMITS -#define SPROUT_NO_CXX11_ALLOCATOR -#define SPROUT_NO_CXX11_ATOMIC_SMART_PTR -#define SPROUT_NO_CXX11_SMART_PTR -#define SPROUT_NO_CXX11_HDR_FUNCTIONAL - -#define SPROUT_NO_CXX14_INITIALIZER_LIST - -#endif // #ifndef SPROUT_CONFIG_STDLIB_LIBCOMO_HPP diff --git a/dsp/lib/sprout/sprout/config/stdlib/libcpp.hpp b/dsp/lib/sprout/sprout/config/stdlib/libcpp.hpp deleted file mode 100644 index d443801..0000000 --- a/dsp/lib/sprout/sprout/config/stdlib/libcpp.hpp +++ /dev/null @@ -1,100 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_STDLIB_LIBCPP_HPP -#define SPROUT_CONFIG_STDLIB_LIBCPP_HPP - -#ifdef _LIBCPP_HAS_NO_VARIADICS -# define SPROUT_NO_CXX11_HDR_TUPLE -#endif - -#if defined(_LIBCPP_HAS_NO_TEMPLATE_ALIASES) -# define SPROUT_NO_CXX11_ALLOCATOR -# define SPROUT_NO_CXX11_POINTER_TRAITS -#endif - -#if __cplusplus < 201103 -# define SPROUT_NO_CXX11_HDR_CODECVT -# define SPROUT_NO_CXX11_HDR_CONDITION_VARIABLE -# define SPROUT_NO_CXX11_HDR_INITIALIZER_LIST -# define SPROUT_NO_CXX11_HDR_MUTEX -# define SPROUT_NO_CXX11_HDR_RANDOM -# define SPROUT_NO_CXX11_HDR_RATIO -# define SPROUT_NO_CXX11_HDR_REGEX -# define SPROUT_NO_CXX11_HDR_SYSTEM_ERROR -# define SPROUT_NO_CXX11_HDR_THREAD -# define SPROUT_NO_CXX11_HDR_TUPLE -# define SPROUT_NO_CXX11_HDR_TYPEINDEX -# define SPROUT_NO_CXX11_HDR_UNORDERED_MAP -# define SPROUT_NO_CXX11_HDR_UNORDERED_SET -# define SPROUT_NO_CXX11_NUMERIC_LIMITS -# define SPROUT_NO_CXX11_ALLOCATOR -# define SPROUT_NO_CXX11_POINTER_TRAITS -# define SPROUT_NO_CXX11_SMART_PTR -# define SPROUT_NO_CXX11_HDR_FUNCTIONAL -# define SPROUT_NO_CXX11_STD_ALIGN -# define SPROUT_NO_CXX11_ADDRESSOF -# define SPROUT_NO_CXX11_HDR_ATOMIC -# define SPROUT_NO_CXX11_ATOMIC_SMART_PTR -# define SPROUT_NO_CXX11_HDR_CHRONO -# define SPROUT_NO_CXX11_HDR_TYPE_TRAITS -# define SPROUT_NO_CXX11_HDR_FUTURE -#elif _LIBCPP_VERSION < 3700 -# define SPROUT_NO_CXX11_HDR_ATOMIC -# define SPROUT_NO_CXX11_ATOMIC_SMART_PTR -# define SPROUT_NO_CXX11_HDR_CHRONO -# define SPROUT_NO_CXX11_HDR_TYPE_TRAITS -# define SPROUT_NO_CXX11_HDR_FUTURE -#endif - -#if _LIBCPP_VERSION < 3700 -# define SPROUT_NO_STD_MESSAGES -#endif - -#if (_LIBCPP_VERSION < 3700) || (__cplusplus <= 201402L) -# define SPROUT_NO_CXX14_STD_EXCHANGE -#endif - -#if (_LIBCPP_VERSION < 3700) || (__cplusplus <= 201402L) -# define SPROUT_NO_CXX17_STD_INVOKE -#endif -#if (_LIBCPP_VERSION < 4000) || (__cplusplus <= 201402L) -# define SPROUT_NO_CXX17_STD_APPLY -#endif -#if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR) -# define SPROUT_NO_AUTO_PTR -#endif -#if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE) -# define SPROUT_NO_CXX98_RANDOM_SHUFFLE -#endif -#if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS) -# define SPROUT_NO_CXX98_BINDERS -#endif - -#if (_LIBCPP_VERSION <= 1101) && !defined(SPROUT_NO_CXX11_THREAD_LOCAL) -# define SPROUT_NO_CXX11_THREAD_LOCAL -#endif - -#if defined(__has_include) -#if !__has_include() -# define SPROUT_NO_CXX14_HDR_SHARED_MUTEX -#elif __cplusplus <= 201103 -# define SPROUT_NO_CXX14_HDR_SHARED_MUTEX -#endif -#elif __cplusplus < 201402 -# define SPROUT_NO_CXX14_HDR_SHARED_MUTEX -#endif - -#include -#if defined(_LIBCPP_VERSION) && (_LIBCPP_VERSION <= 1001) -# define SPROUT_NO_CXX11_CHAR_TRAITS -# define SPROUT_NO_CXX11_NUMERIC_LIMITS -#endif - -#define SPROUT_NO_CXX14_INITIALIZER_LIST - -#endif // #ifndef SPROUT_CONFIG_STDLIB_LIBCPP_HPP diff --git a/dsp/lib/sprout/sprout/config/stdlib/libstdcpp3.hpp b/dsp/lib/sprout/sprout/config/stdlib/libstdcpp3.hpp deleted file mode 100644 index 1a68766..0000000 --- a/dsp/lib/sprout/sprout/config/stdlib/libstdcpp3.hpp +++ /dev/null @@ -1,90 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_STDLIB_LIBSTDCPP3_HPP -#define SPROUT_CONFIG_STDLIB_LIBSTDCPP3_HPP - -#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103) -# define SPROUT_LIBSTDCXX11 -#endif - -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) || !defined(SPROUT_LIBSTDCXX11) -# define SPROUT_NO_CXX11_HDR_ARRAY -# define SPROUT_NO_CXX11_HDR_REGEX -# define SPROUT_NO_CXX11_HDR_TUPLE -# define SPROUT_NO_CXX11_HDR_UNORDERED_MAP -# define SPROUT_NO_CXX11_HDR_UNORDERED_SET -# define SPROUT_NO_CXX11_HDR_FUNCTIONAL -#endif - -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(SPROUT_LIBSTDCXX11) -# define SPROUT_NO_CXX11_HDR_CONDITION_VARIABLE -# define SPROUT_NO_CXX11_HDR_FORWARD_LIST -# define SPROUT_NO_CXX11_HDR_INITIALIZER_LIST -# define SPROUT_NO_CXX11_HDR_MUTEX -# define SPROUT_NO_CXX11_HDR_RATIO -# define SPROUT_NO_CXX11_HDR_SYSTEM_ERROR -# define SPROUT_NO_CXX11_SMART_PTR -#endif - -#if (!defined(_GLIBCXX_HAS_GTHREADS) || !defined(_GLIBCXX_USE_C99_STDINT_TR1)) && (!defined(SPROUT_NO_CXX11_HDR_CONDITION_VARIABLE) || !defined(SPROUT_NO_CXX11_HDR_MUTEX)) -# define SPROUT_NO_CXX11_HDR_CONDITION_VARIABLE -# define SPROUT_NO_CXX11_HDR_MUTEX -#endif - -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(SPROUT_LIBSTDCXX11) -# if defined(__clang__) -# if !__has_feature(cxx_constexpr) || !defined(SPROUT_LIBSTDCXX11) -# define SPROUT_NO_CXX11_CHAR_TRAITS -# define SPROUT_NO_CXX11_NUMERIC_LIMITS -# endif -# else -# define SPROUT_NO_CXX11_CHAR_TRAITS -# define SPROUT_NO_CXX11_NUMERIC_LIMITS -# endif -#endif - -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(SPROUT_LIBSTDCXX11) -# define SPROUT_NO_CXX11_HDR_FUTURE -# define SPROUT_NO_CXX11_HDR_RANDOM -#endif - -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(SPROUT_LIBSTDCXX11) -# define SPROUT_NO_CXX11_HDR_TYPEINDEX -#endif - -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(SPROUT_LIBSTDCXX11) -# define SPROUT_NO_CXX11_HDR_CHRONO -# define SPROUT_NO_CXX11_ALLOCATOR -#endif - -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 8) || !defined(SPROUT_LIBSTDCXX11) -# define SPROUT_NO_CXX11_HDR_ATOMIC -# define SPROUT_NO_CXX11_HDR_THREAD -#endif - -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 9) || !defined(SPROUT_LIBSTDCXX11) -# define SPROUT_NO_CXX11_HDR_REGEX -# define SPROUT_NO_CXX11_HDR_THREAD -#endif - -#if defined(__clang_major__) && ((__clang_major__ < 3) || ((__clang_major__ == 3) && (__clang_minor__ < 7))) -# define SPROUT_NO_CXX11_HDR_ATOMIC -#endif - -#if __GNUC__ < 5 || (__GNUC__ == 5 && __GNUC_MINOR__ < 1) || !defined(SPROUT_LIBSTDCXX11) -# define SPROUT_NO_CXX11_HDR_TYPE_TRAITS -# define SPROUT_NO_CXX11_HDR_CODECVT -# define SPROUT_NO_CXX11_ATOMIC_SMART_PTR -# define SPROUT_NO_CXX11_STD_ALIGN -#endif - -#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(SPROUT_LIBSTDCXX11)) -# define SPROUT_NO_CXX14_INITIALIZER_LIST -#endif - -#endif // #ifndef SPROUT_CONFIG_STDLIB_LIBSTDCPP3_HPP diff --git a/dsp/lib/sprout/sprout/config/stdlib/modena.hpp b/dsp/lib/sprout/sprout/config/stdlib/modena.hpp deleted file mode 100644 index 5484c1a..0000000 --- a/dsp/lib/sprout/sprout/config/stdlib/modena.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_STDLIB_MODENA_HPP -#define SPROUT_CONFIG_STDLIB_MODENA_HPP - -#define SPROUT_NO_CXX11_HDR_ARRAY -#define SPROUT_NO_CXX11_HDR_CHRONO -#define SPROUT_NO_CXX11_HDR_CODECVT -#define SPROUT_NO_CXX11_HDR_CONDITION_VARIABLE -#define SPROUT_NO_CXX11_HDR_FORWARD_LIST -#define SPROUT_NO_CXX11_HDR_FUTURE -#define SPROUT_NO_CXX11_HDR_INITIALIZER_LIST -#define SPROUT_NO_CXX11_HDR_MUTEX -#define SPROUT_NO_CXX11_HDR_RANDOM -#define SPROUT_NO_CXX11_HDR_RATIO -#define SPROUT_NO_CXX11_HDR_REGEX -#define SPROUT_NO_CXX11_HDR_SYSTEM_ERROR -#define SPROUT_NO_CXX11_HDR_THREAD -#define SPROUT_NO_CXX11_HDR_TUPLE -#define SPROUT_NO_CXX11_HDR_TYPE_TRAITS -#define SPROUT_NO_CXX11_HDR_TYPEINDEX -#define SPROUT_NO_CXX11_HDR_UNORDERED_MAP -#define SPROUT_NO_CXX11_HDR_UNORDERED_SET -#define SPROUT_NO_CXX11_CHAR_TRAITS -#define SPROUT_NO_CXX11_NUMERIC_LIMITS -#define SPROUT_NO_CXX11_ALLOCATOR -#define SPROUT_NO_CXX11_ATOMIC_SMART_PTR -#define SPROUT_NO_CXX11_SMART_PTR -#define SPROUT_NO_CXX11_HDR_FUNCTIONAL - -#define SPROUT_NO_CXX14_INITIALIZER_LIST - -#endif // #ifndef SPROUT_CONFIG_STDLIB_MODENA_HPP diff --git a/dsp/lib/sprout/sprout/config/stdlib/msl.hpp b/dsp/lib/sprout/sprout/config/stdlib/msl.hpp deleted file mode 100644 index 37c319d..0000000 --- a/dsp/lib/sprout/sprout/config/stdlib/msl.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_STDLIB_MSL_HPP -#define SPROUT_CONFIG_STDLIB_MSL_HPP - -#define SPROUT_NO_CXX11_HDR_ARRAY -#define SPROUT_NO_CXX11_HDR_CHRONO -#define SPROUT_NO_CXX11_HDR_CODECVT -#define SPROUT_NO_CXX11_HDR_CONDITION_VARIABLE -#define SPROUT_NO_CXX11_HDR_FORWARD_LIST -#define SPROUT_NO_CXX11_HDR_FUTURE -#define SPROUT_NO_CXX11_HDR_INITIALIZER_LIST -#define SPROUT_NO_CXX11_HDR_MUTEX -#define SPROUT_NO_CXX11_HDR_RANDOM -#define SPROUT_NO_CXX11_HDR_RATIO -#define SPROUT_NO_CXX11_HDR_REGEX -#define SPROUT_NO_CXX11_HDR_SYSTEM_ERROR -#define SPROUT_NO_CXX11_HDR_THREAD -#define SPROUT_NO_CXX11_HDR_TUPLE -#define SPROUT_NO_CXX11_HDR_TYPE_TRAITS -#define SPROUT_NO_CXX11_HDR_TYPEINDEX -#define SPROUT_NO_CXX11_HDR_UNORDERED_MAP -#define SPROUT_NO_CXX11_HDR_UNORDERED_SET -#define SPROUT_NO_CXX11_CHAR_TRAITS -#define SPROUT_NO_CXX11_NUMERIC_LIMITS -#define SPROUT_NO_CXX11_ALLOCATOR -#define SPROUT_NO_CXX11_ATOMIC_SMART_PTR -#define SPROUT_NO_CXX11_SMART_PTR -#define SPROUT_NO_CXX11_HDR_FUNCTIONAL - -#define SPROUT_NO_CXX14_INITIALIZER_LIST - -#endif // #ifndef SPROUT_CONFIG_STDLIB_MSL_HPP diff --git a/dsp/lib/sprout/sprout/config/stdlib/roguewave.hpp b/dsp/lib/sprout/sprout/config/stdlib/roguewave.hpp deleted file mode 100644 index 27ccb69..0000000 --- a/dsp/lib/sprout/sprout/config/stdlib/roguewave.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_STDLIB_ROGUEWAVE_HPP -#define SPROUT_CONFIG_STDLIB_ROGUEWAVE_HPP - -#if _RWSTD_VER < 0x05000000 -# define SPROUT_NO_CXX11_HDR_ARRAY -#endif - -#define SPROUT_NO_CXX11_HDR_CHRONO -#define SPROUT_NO_CXX11_HDR_CODECVT -#define SPROUT_NO_CXX11_HDR_CONDITION_VARIABLE -#define SPROUT_NO_CXX11_HDR_FORWARD_LIST -#define SPROUT_NO_CXX11_HDR_FUTURE -#define SPROUT_NO_CXX11_HDR_INITIALIZER_LIST -#define SPROUT_NO_CXX11_HDR_MUTEX -#define SPROUT_NO_CXX11_HDR_RANDOM -#define SPROUT_NO_CXX11_HDR_RATIO -#define SPROUT_NO_CXX11_HDR_REGEX -#define SPROUT_NO_CXX11_HDR_SYSTEM_ERROR -#define SPROUT_NO_CXX11_HDR_THREAD -#define SPROUT_NO_CXX11_HDR_TUPLE -#define SPROUT_NO_CXX11_HDR_TYPE_TRAITS -#define SPROUT_NO_CXX11_HDR_TYPEINDEX -#define SPROUT_NO_CXX11_HDR_UNORDERED_MAP -#define SPROUT_NO_CXX11_HDR_UNORDERED_SET -#define SPROUT_NO_CXX11_CHAR_TRAITS -#define SPROUT_NO_CXX11_NUMERIC_LIMITS -#define SPROUT_NO_CXX11_ALLOCATOR -#define SPROUT_NO_CXX11_ATOMIC_SMART_PTR -#define SPROUT_NO_CXX11_SMART_PTR -#define SPROUT_NO_CXX11_HDR_FUNCTIONAL - -#define SPROUT_NO_CXX14_INITIALIZER_LIST - -#endif // #ifndef SPROUT_CONFIG_STDLIB_ROGUEWAVE_HPP diff --git a/dsp/lib/sprout/sprout/config/stdlib/sgi.hpp b/dsp/lib/sprout/sprout/config/stdlib/sgi.hpp deleted file mode 100644 index 6d4c1d7..0000000 --- a/dsp/lib/sprout/sprout/config/stdlib/sgi.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_STDLIB_SGI_HPP -#define SPROUT_CONFIG_STDLIB_SGI_HPP - -#define SPROUT_NO_CXX11_HDR_ARRAY -#define SPROUT_NO_CXX11_HDR_CHRONO -#define SPROUT_NO_CXX11_HDR_CODECVT -#define SPROUT_NO_CXX11_HDR_CONDITION_VARIABLE -#define SPROUT_NO_CXX11_HDR_FORWARD_LIST -#define SPROUT_NO_CXX11_HDR_FUTURE -#define SPROUT_NO_CXX11_HDR_INITIALIZER_LIST -#define SPROUT_NO_CXX11_HDR_MUTEX -#define SPROUT_NO_CXX11_HDR_RANDOM -#define SPROUT_NO_CXX11_HDR_RATIO -#define SPROUT_NO_CXX11_HDR_REGEX -#define SPROUT_NO_CXX11_HDR_SYSTEM_ERROR -#define SPROUT_NO_CXX11_HDR_THREAD -#define SPROUT_NO_CXX11_HDR_TUPLE -#define SPROUT_NO_CXX11_HDR_TYPE_TRAITS -#define SPROUT_NO_CXX11_HDR_TYPEINDEX -#define SPROUT_NO_CXX11_HDR_UNORDERED_MAP -#define SPROUT_NO_CXX11_HDR_UNORDERED_SET -#define SPROUT_NO_CXX11_CHAR_TRAITS -#define SPROUT_NO_CXX11_NUMERIC_LIMITS -#define SPROUT_NO_CXX11_ALLOCATOR -#define SPROUT_NO_CXX11_ATOMIC_SMART_PTR -#define SPROUT_NO_CXX11_SMART_PTR -#define SPROUT_NO_CXX11_HDR_FUNCTIONAL - -#define SPROUT_NO_CXX14_INITIALIZER_LIST - -#endif // #ifndef SPROUT_CONFIG_STDLIB_SGI_HPP diff --git a/dsp/lib/sprout/sprout/config/stdlib/stlport.hpp b/dsp/lib/sprout/sprout/config/stdlib/stlport.hpp deleted file mode 100644 index 2a4c5e7..0000000 --- a/dsp/lib/sprout/sprout/config/stdlib/stlport.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_STDLIB_STLPORT_HPP -#define SPROUT_CONFIG_STDLIB_STLPORT_HPP - -#define SPROUT_NO_CXX11_HDR_ARRAY -#define SPROUT_NO_CXX11_HDR_CHRONO -#define SPROUT_NO_CXX11_HDR_CODECVT -#define SPROUT_NO_CXX11_HDR_CONDITION_VARIABLE -#define SPROUT_NO_CXX11_HDR_FORWARD_LIST -#define SPROUT_NO_CXX11_HDR_FUTURE -#define SPROUT_NO_CXX11_HDR_INITIALIZER_LIST -#define SPROUT_NO_CXX11_HDR_MUTEX -#define SPROUT_NO_CXX11_HDR_RANDOM -#define SPROUT_NO_CXX11_HDR_RATIO -#define SPROUT_NO_CXX11_HDR_REGEX -#define SPROUT_NO_CXX11_HDR_SYSTEM_ERROR -#define SPROUT_NO_CXX11_HDR_THREAD -#define SPROUT_NO_CXX11_HDR_TUPLE -#define SPROUT_NO_CXX11_HDR_TYPE_TRAITS -#define SPROUT_NO_CXX11_HDR_TYPEINDEX -#define SPROUT_NO_CXX11_HDR_UNORDERED_MAP -#define SPROUT_NO_CXX11_HDR_UNORDERED_SET -#define SPROUT_NO_CXX11_CHAR_TRAITS -#define SPROUT_NO_CXX11_NUMERIC_LIMITS -#define SPROUT_NO_CXX11_ALLOCATOR -#define SPROUT_NO_CXX11_ATOMIC_SMART_PTR -#define SPROUT_NO_CXX11_SMART_PTR -#define SPROUT_NO_CXX11_HDR_FUNCTIONAL - -#define SPROUT_NO_CXX14_INITIALIZER_LIST - -#endif // #ifndef SPROUT_CONFIG_STDLIB_STLPORT_HPP diff --git a/dsp/lib/sprout/sprout/config/stdlib/vacpp.hpp b/dsp/lib/sprout/sprout/config/stdlib/vacpp.hpp deleted file mode 100644 index b18f6dd..0000000 --- a/dsp/lib/sprout/sprout/config/stdlib/vacpp.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_STDLIB_VACPP_HPP -#define SPROUT_CONFIG_STDLIB_VACPP_HPP - -#define SPROUT_NO_CXX11_HDR_ARRAY -#define SPROUT_NO_CXX11_HDR_CHRONO -#define SPROUT_NO_CXX11_HDR_CODECVT -#define SPROUT_NO_CXX11_HDR_CONDITION_VARIABLE -#define SPROUT_NO_CXX11_HDR_FORWARD_LIST -#define SPROUT_NO_CXX11_HDR_FUTURE -#define SPROUT_NO_CXX11_HDR_INITIALIZER_LIST -#define SPROUT_NO_CXX11_HDR_MUTEX -#define SPROUT_NO_CXX11_HDR_RANDOM -#define SPROUT_NO_CXX11_HDR_RATIO -#define SPROUT_NO_CXX11_HDR_REGEX -#define SPROUT_NO_CXX11_HDR_SYSTEM_ERROR -#define SPROUT_NO_CXX11_HDR_THREAD -#define SPROUT_NO_CXX11_HDR_TUPLE -#define SPROUT_NO_CXX11_HDR_TYPE_TRAITS -#define SPROUT_NO_CXX11_HDR_TYPEINDEX -#define SPROUT_NO_CXX11_HDR_UNORDERED_MAP -#define SPROUT_NO_CXX11_HDR_UNORDERED_SET -#define SPROUT_NO_CXX11_CHAR_TRAITS -#define SPROUT_NO_CXX11_NUMERIC_LIMITS -#define SPROUT_NO_CXX11_ALLOCATOR -#define SPROUT_NO_CXX11_ATOMIC_SMART_PTR -#define SPROUT_NO_CXX11_SMART_PTR -#define SPROUT_NO_CXX11_HDR_FUNCTIONAL - -#define SPROUT_NO_CXX14_INITIALIZER_LIST - -#endif // #ifndef SPROUT_CONFIG_STDLIB_VACPP_HPP diff --git a/dsp/lib/sprout/sprout/config/suffix.hpp b/dsp/lib/sprout/sprout/config/suffix.hpp deleted file mode 100644 index 43a6753..0000000 --- a/dsp/lib/sprout/sprout/config/suffix.hpp +++ /dev/null @@ -1,304 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_SUFFIX_HPP -#define SPROUT_CONFIG_SUFFIX_HPP - -// -// SPROUT_CONSTEXPR -// SPROUT_CONSTEXPR_OR_CONST -// SPROUT_STATIC_CONSTEXPR -// SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER -// SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER -// -#ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR -# define SPROUT_CONSTEXPR constexpr -# ifndef SPROUT_NO_STATIC_CONSTEXPR_INITIALIZATION -# define SPROUT_CONSTEXPR_OR_CONST constexpr -# define SPROUT_STATIC_CONSTEXPR static constexpr -# -# define SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(EXPR) = EXPR -# define SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(EXPR) -# else -# define SPROUT_CONSTEXPR_OR_CONST const -# define SPROUT_STATIC_CONSTEXPR static const -# -# define SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(EXPR) -# define SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(EXPR) = EXPR -# endif -#else // #ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR -# define SPROUT_CONSTEXPR -# define SPROUT_CONSTEXPR_OR_CONST const -# define SPROUT_STATIC_CONSTEXPR static const -# -# define SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(EXPR) -# define SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(EXPR) = EXPR -#endif // #ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR - -// -// SPROUT_CXX14_CONSTEXPR -// SPROUT_CXX14_CONSTEXPR_OR_CONST -// SPROUT_CXX14_STATIC_CONSTEXPR -// -#ifndef SPROUT_CONFIG_DISABLE_CXX14_CONSTEXPR -# define SPROUT_CXX14_CONSTEXPR SPROUT_CONSTEXPR -# define SPROUT_CXX14_CONSTEXPR_OR_CONST SPROUT_CONSTEXPR_OR_CONST -# define SPROUT_CXX14_STATIC_CONSTEXPR SPROUT_STATIC_CONSTEXPR -#else // #ifndef SPROUT_CONFIG_DISABLE_CXX14_CONSTEXPR -# define SPROUT_CXX14_CONSTEXPR -# define SPROUT_CXX14_CONSTEXPR_OR_CONST const -# define SPROUT_CXX14_STATIC_CONSTEXPR static const -#endif // #ifndef SPROUT_CONFIG_DISABLE_CXX14_CONSTEXPR - -// -// SPROUT_INITIALIZER_LIST_CONSTEXPR -// -#ifndef SPROUT_NO_CXX14_INITIALIZER_LIST -# define SPROUT_INITIALIZER_LIST_CONSTEXPR SPROUT_CXX14_CONSTEXPR -#else // #ifndef SPROUT_NO_CXX14_INITIALIZER_LIST -# define SPROUT_INITIALIZER_LIST_CONSTEXPR -#endif // #ifndef SPROUT_NO_CXX14_INITIALIZER_LIST - -// -// SPROUT_NON_CONSTEXPR -// -#define SPROUT_NON_CONSTEXPR - -// -// SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL -// SPROUT_DEFAULTED_DESTRUCTOR_DECL -// -#ifndef SPROUT_CONFIG_DISABLE_DEFAULTED_FUNCTIONS -# define SPROUT_DEFAULTED_FUNCTION_DECL = default; -# define SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL SPROUT_DEFAULTED_FUNCTION_DECL -# define SPROUT_DEFAULTED_DESTRUCTOR_DECL SPROUT_DEFAULTED_FUNCTION_DECL -# define SPROUT_DEFAULTED_FUNCTION(FUNC, BODY) FUNC SPROUT_DEFAULTED_FUNCTION_DECL -#else // #ifndef SPROUT_CONFIG_DISABLE_DEFAULTED_FUNCTIONS -# define SPROUT_DEFAULTED_FUNCTION_DECL SPROUT_NOEXCEPT {} -# define SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL SPROUT_DEFAULTED_FUNCTION_DECL -# define SPROUT_DEFAULTED_DESTRUCTOR_DECL SPROUT_DEFAULTED_FUNCTION_DECL -# define SPROUT_DEFAULTED_FUNCTION(FUNC, BODY) FUNC BODY -#endif // #ifndef SPROUT_CONFIG_DISABLE_DEFAULTED_FUNCTIONS - -// -// SPROUT_DELETED_FUNCTION_DECL -// -#ifndef SPROUT_CONFIG_DISABLE_DELETED_FUNCTIONS -# define SPROUT_DELETED_FUNCTION_DECL = delete; -# define SPROUT_DELETED_FUNCTION(FUNC) FUNC SPROUT_DELETED_FUNCTION_DECL -#else // #ifndef SPROUT_CONFIG_DISABLE_DELETED_FUNCTIONS -# define SPROUT_DELETED_FUNCTION_DECL ; -# define SPROUT_DELETED_FUNCTION(FUNC) private: FUNC SPROUT_DELETED_FUNCTION_DECL -#endif // #ifndef SPROUT_CONFIG_DISABLE_DELETED_FUNCTIONS - -// -// SPROUT_DEPRECATED -// -#if defined(__GNUC__) || defined(__clang__) -# define SPROUT_DEPRECATED __attribute__((deprecated)) -#elif defined(_MSC_VER) -# define SPROUT_DEPRECATED __declspec(deprecated) -#else -# define SPROUT_DEPRECATED -#endif - -// -// SPROUT_FORCEINLINE -// -#if defined(_MSC_VER) -# define SPROUT_FORCEINLINE __forceinline -#elif defined(__GNUC__) && (__GNUC__ > 3) -# define SPROUT_FORCEINLINE inline __attribute__ ((__always_inline__)) -#else -# define SPROUT_FORCEINLINE inline -#endif - -// -// SPROUT_NOINLINE -// -#if defined(_MSC_VER) -# define SPROUT_NOINLINE __declspec(noinline) -#elif defined(__GNUC__) && (__GNUC__ > 3) -# if defined(__CUDACC__) -# define SPROUT_NOINLINE __attribute__ ((noinline)) -# else -# define SPROUT_NOINLINE __attribute__ ((__noinline__)) -# endif -#else -# define SPROUT_NOINLINE -#endif - -// -// SPROUT_NORETURN -// -#if defined(_MSC_VER) -# define SPROUT_NORETURN __declspec(noreturn) -#elif defined(__GNUC__) -# define SPROUT_NORETURN __attribute__ ((__noreturn__)) -#else -# define SPROUT_NORETURN -#endif - -// -// SPROUT_USE_EXPLICIT_CONVERSION_OPERATORS -// SPROUT_EXPLICIT_CONVERSION -// -#ifndef SPROUT_CONFIG_DISABLE_EXPLICIT_CONVERSION_OPERATORS -# define SPROUT_USE_EXPLICIT_CONVERSION_OPERATORS 1 -# define SPROUT_EXPLICIT_CONVERSION explicit -#else // #ifndef SPROUT_CONFIG_DISABLE_EXPLICIT_CONVERSION_OPERATORS -# define SPROUT_USE_EXPLICIT_CONVERSION_OPERATORS 0 -# define SPROUT_EXPLICIT_CONVERSION -#endif // #ifndef SPROUT_CONFIG_DISABLE_EXPLICIT_CONVERSION_OPERATORS - -// -// SPROUT_NOEXCEPT -// SPROUT_NOEXCEPT_OR_NOTHROW -// SPROUT_NOEXCEPT_IF -// SPROUT_NOEXCEPT_EXPR -// SPROUT_NOEXCEPT_EXPR_OR_DEFAULT -// SPROUT_NOEXCEPT_IF_EXPR -// -#ifndef SPROUT_CONFIG_DISABLE_NOEXCEPT -# define SPROUT_NOEXCEPT noexcept -# define SPROUT_NOEXCEPT_OR_NOTHROW noexcept -# define SPROUT_NOEXCEPT_IF(COND) noexcept((COND)) -# define SPROUT_NOEXCEPT_EXPR(EXPR) noexcept((EXPR)) -# define SPROUT_NOEXCEPT_EXPR_OR_DEFAULT(EXPR, C) noexcept((EXPR)) -# define SPROUT_NOEXCEPT_IF_EXPR(EXPR) noexcept(noexcept((EXPR))) -#else // #ifndef SPROUT_CONFIG_DISABLE_NOEXCEPT -# define SPROUT_NOEXCEPT -# define SPROUT_NOEXCEPT_OR_NOTHROW throw() -# define SPROUT_NOEXCEPT_IF(COND) -# define SPROUT_NOEXCEPT_EXPR(EXPR) false -# define SPROUT_NOEXCEPT_EXPR_OR_DEFAULT(EXPR, C) C -# define SPROUT_NOEXCEPT_IF_EXPR(EXPR) -#endif // #ifndef SPROUT_CONFIG_DISABLE_NOEXCEPT - -// -// SPROUT_USE_TEMPLATE_ALIASES -// -#ifndef SPROUT_CONFIG_DISABLE_TEMPLATE_ALIASES -# define SPROUT_USE_TEMPLATE_ALIASES 1 -#else // #ifndef SPROUT_CONFIG_DISABLE_TEMPLATE_ALIASES -# define SPROUT_USE_TEMPLATE_ALIASES 0 -#endif // #ifndef SPROUT_CONFIG_DISABLE_TEMPLATE_ALIASES - -// -// SPROUT_USE_USER_DEFINED_LITERALS -// -#ifndef SPROUT_CONFIG_DISABLE_USER_DEFINED_LITERALS -# define SPROUT_USE_USER_DEFINED_LITERALS 1 -#else // #ifndef SPROUT_CONFIG_DISABLE_USER_DEFINED_LITERALS -# define SPROUT_USE_USER_DEFINED_LITERALS 0 -#endif // #ifndef SPROUT_CONFIG_DISABLE_USER_DEFINED_LITERALS - -// -// SPROUT_USE_DELEGATING_CONSTRUCTORS -// -#ifndef SPROUT_CONFIG_DISABLE_DELEGATING_CONSTRUCTORS -# define SPROUT_USE_DELEGATING_CONSTRUCTORS 1 -#else // #ifndef SPROUT_CONFIG_DISABLE_DELEGATING_CONSTRUCTORS -# define SPROUT_USE_DELEGATING_CONSTRUCTORS 0 -#endif // #ifndef SPROUT_CONFIG_DISABLE_DELEGATING_CONSTRUCTORS - -// -// SPROUT_USE_UNICODE_LITERALS -// -#ifndef SPROUT_CONFIG_DISABLE_UNICODE_LITERALS -# define SPROUT_USE_UNICODE_LITERALS 1 -#else // #ifndef SPROUT_CONFIG_DISABLE_UNICODE_LITERALS -# define SPROUT_USE_UNICODE_LITERALS 0 -#endif // #ifndef SPROUT_CONFIG_DISABLE_UNICODE_LITERALS - -// -// SPROUT_USE_VARIABLE_TEMPLATES -// -#ifndef SPROUT_CONFIG_DISABLE_VARIABLE_TEMPLATES -# define SPROUT_USE_VARIABLE_TEMPLATES 1 -#else // #ifndef SPROUT_CONFIG_DISABLE_VARIABLE_TEMPLATES -# define SPROUT_USE_VARIABLE_TEMPLATES 0 -#endif // #ifndef SPROUT_CONFIG_DISABLE_VARIABLE_TEMPLATES - -// -// SPROUT_USE_BUILTIN_CMATH_FUNCTION -// -#ifndef SPROUT_CONFIG_DISABLE_BUILTIN_CMATH_FUNCTION -# define SPROUT_USE_BUILTIN_CMATH_FUNCTION 1 -#else // #ifndef SPROUT_CONFIG_DISABLE_BUILTIN_CMATH_FUNCTION -# define SPROUT_USE_BUILTIN_CMATH_FUNCTION 0 -#endif // #ifndef SPROUT_CONFIG_DISABLE_BUILTIN_CMATH_FUNCTION - -// -// SPROUT_USE_BUILTIN_COPYSIGN_FUNCTION -// -#ifndef SPROUT_CONFIG_DISABLE_BUILTIN_COPYSIGN_FUNCTION -# define SPROUT_USE_BUILTIN_COPYSIGN_FUNCTION 1 -#else // #ifndef SPROUT_CONFIG_DISABLE_BUILTIN_COPYSIGN_FUNCTION -# define SPROUT_USE_BUILTIN_COPYSIGN_FUNCTION 0 -#endif // #ifndef SPROUT_CONFIG_DISABLE_BUILTIN_COPYSIGN_FUNCTION - -// -// SPROUT_USE_BUILTIN_BIT_OPERATION -// -#ifndef SPROUT_CONFIG_DISABLE_BUILTIN_BIT_OPERATION -# define SPROUT_USE_BUILTIN_BIT_OPERATION 1 -#else // #ifndef SPROUT_CONFIG_DISABLE_BUILTIN_BIT_OPERATION -# define SPROUT_USE_BUILTIN_BIT_OPERATION 0 -#endif // #ifndef SPROUT_CONFIG_DISABLE_BUILTIN_BIT_OPERATION - -// -// SPROUT_NOERROR_LARGE_FLOAT_ROUNDING -// -#ifndef SPROUT_CONFIG_DISABLE_LARGE_FLOAT_ROUNDING -# define SPROUT_NOERROR_LARGE_FLOAT_ROUNDING 1 -#else // #ifndef SPROUT_CONFIG_DISABLE_LARGE_FLOAT_ROUNDING -# define SPROUT_NOERROR_LARGE_FLOAT_ROUNDING 0 -#endif // #ifndef SPROUT_CONFIG_DISABLE_LARGE_FLOAT_ROUNDING - -// -// SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION -// -#ifndef SPROUT_CONFIG_DISABLE_SUPPORT_TEMPORARY_CONTAINER_ITERATION -# define SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION 1 -#else // #ifndef SPROUT_CONFIG_DISABLE_SUPPORT_TEMPORARY_CONTAINER_ITERATION -# ifdef SPROUT_CONFIG_SUPPORT_TEMPORARY_CONTAINER_ITERATION -# error config conflict: SPROUT_CONFIG_DISABLE_SUPPORT_TEMPORARY_CONTAINER_ITERATION, SPROUT_CONFIG_DISABLE_SUPPORT_TEMPORARY_CONTAINER_ITERATION -# endif // #ifndef SPROUT_CONFIG_SUPPORT_TEMPORARY_CONTAINER_ITERATION -# define SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION 0 -#endif // #ifndef SPROUT_CONFIG_DISABLE_SUPPORT_TEMPORARY_CONTAINER_ITERATION - -// -// SPROUT_USE_PTR_INDEX_ITERATOR_IMPLEMENTATION -// -#ifndef SPROUT_CONFIG_DISABLE_SUPPORT_EFFICIENT_ARRAY_ITERATION -# define SPROUT_USE_PTR_INDEX_ITERATOR_IMPLEMENTATION 1 -#else // #ifndef SPROUT_CONFIG_DISABLE_SUPPORT_EFFICIENT_ARRAY_ITERATION -# define SPROUT_USE_PTR_INDEX_ITERATOR_IMPLEMENTATION 0 -#endif // #ifndef SPROUT_CONFIG_DISABLE_SUPPORT_EFFICIENT_ARRAY_ITERATION - -// -// HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT -// HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT -// NS_SSCRISK_CEL_OR_SPROUT -// -#ifndef SPROUT_CONFIG_USE_SSCRISK_CEL -# define HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT -# define HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT -# define NS_SSCRISK_CEL_OR_SPROUT sprout -#else // #ifndef SPROUT_CONFIG_USE_SSCRISK_CEL -# define HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT -# define HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT -# define NS_SSCRISK_CEL_OR_SPROUT sscrisk::cel -#endif // #ifndef SPROUT_CONFIG_USE_SSCRISK_CEL - -// -// SPROUT_PREVENT_MACRO_SUBSTITUTION -// -#define SPROUT_PREVENT_MACRO_SUBSTITUTION - -#endif // #ifndef SPROUT_CONFIG_SUFFIX_HPP diff --git a/dsp/lib/sprout/sprout/config/user_config.hpp b/dsp/lib/sprout/sprout/config/user_config.hpp deleted file mode 100644 index 4fb053b..0000000 --- a/dsp/lib/sprout/sprout/config/user_config.hpp +++ /dev/null @@ -1,71 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONFIG_USER_CONFIG_HPP -#define SPROUT_CONFIG_USER_CONFIG_HPP - -// -// Configuration to disable the language features -// -// If the user does not define, automatically defined according to the compiler. -// -#define SPROUT_DISABLE_ASSERTS // this would include iostream which is a huge bloat -//#define SPROUT_CONFIG_DISABLE_CONSTEXPR -//#define SPROUT_CONFIG_DISABLE_CXX14_CONSTEXPR -//#define SPROUT_CONFIG_DISABLE_DEFAULTED_FUNCTIONS -//#define SPROUT_CONFIG_DISABLE_DELETED_FUNCTIONS -//#define SPROUT_CONFIG_DISABLE_EXPLICIT_CONVERSION_OPERATORS -//#define SPROUT_CONFIG_DISABLE_NOEXCEPT -//#define SPROUT_CONFIG_DISABLE_TEMPLATE_ALIASES -//#define SPROUT_CONFIG_DISABLE_USER_DEFINED_LITERALS -//#define SPROUT_CONFIG_DISABLE_DELEGATING_CONSTRUCTORS -#define SPROUT_CONFIG_DISABLE_UNICODE_LITERALS -//#define SPROUT_CONFIG_DISABLE_VARIABLE_TEMPLATES - -// -// Configuration to forcibly enable the language features -// -// Suppress the automatic definition: SPROUT_CONFIG_DISABLE_*** -// If a user definition is, invalidation is priority. (SPROUT_CONFIG_DISABLE_***) -// -#define SPROUT_CONFIG_FORCE_CONSTEXPR -#define SPROUT_CONFIG_FORCE_CXX14_CONSTEXPR -//#define SPROUT_CONFIG_FORCE_DEFAULTED_FUNCTIONS -//#define SPROUT_CONFIG_FORCE_DELETED_FUNCTIONS -//#define SPROUT_CONFIG_FORCE_EXPLICIT_CONVERSION_OPERATORS -//#define SPROUT_CONFIG_FORCE_NOEXCEPT -//#define SPROUT_CONFIG_FORCE_TEMPLATE_ALIASES -//#define SPROUT_CONFIG_FORCE_USER_DEFINED_LITERALS -//#define SPROUT_CONFIG_FORCE_DELEGATING_CONSTRUCTORS -//#define SPROUT_CONFIG_FORCE_UNICODE_LITERALS -//#define SPROUT_CONFIG_FORCE_VARIABLE_TEMPLATES - -// -// Configuration you want to use an external library to implementation -// -//#define SPROUT_CONFIG_USE_SSCRISK_CEL - -// -// Configuration to disable the function of the compiler -// -// If the user does not define, automatically defined according to the compiler. -// -//#define SPROUT_CONFIG_DISABLE_BUILTIN_CMATH_FUNCTION -//#define SPROUT_CONFIG_DISABLE_BUILTIN_COPYSIGN_FUNCTION -//#define SPROUT_CONFIG_DISABLE_BUILTIN_BIT_OPERATION - -// -// Configuration to switch the implementation details -// -//#define SPROUT_CONFIG_DISABLE_LARGE_FLOAT_ROUNDING -#define SPROUT_CONFIG_DISABLE_SUPPORT_TEMPORARY_CONTAINER_ITERATION -#define SPROUT_CONFIG_DISABLE_SUPPORT_EFFICIENT_ARRAY_ITERATION - -//#define SPROUT_CONFIG_DISABLE_USER_CONFIG -//#define SPROUT_CONFIG_DISABLE_AUTO_CONFIG - -#endif // #ifndef SPROUT_CONFIG_USER_CONFIG_HPP diff --git a/dsp/lib/sprout/sprout/container.hpp b/dsp/lib/sprout/sprout/container.hpp deleted file mode 100644 index 9061c12..0000000 --- a/dsp/lib/sprout/sprout/container.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_HPP -#define SPROUT_CONTAINER_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_CONTAINER_HPP diff --git a/dsp/lib/sprout/sprout/container/at.hpp b/dsp/lib/sprout/sprout/container/at.hpp deleted file mode 100644 index 321f38a..0000000 --- a/dsp/lib/sprout/sprout/container/at.hpp +++ /dev/null @@ -1,76 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_AT_HPP -#define SPROUT_CONTAINER_AT_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // at - // - // effect: - // sprout::container_range_traits::range_at(cont, i) - // [default] - // ADL callable range_at(cont, i) -> range_at(cont, i) - // [default] - // Container is T[N] -> cont[sprout::range_index_check(cont, i)] - // otherwise, Container is not const - // && sprout::is_const_reference_cast_convertible - // && (callable sprout::as_const(cont).at(i) - // || callable sprout::as_const(cont)[i] - // || callable sprout::as_const(cont).begin() - // || ADL(without sprout) callable begin(sprout::as_const(cont)) - // ) - // -> sprout::const_reference_cast(sprout::at(sprout::as_const(cont), i)) - // otherwise, callable cont.at(i) -> cont.at(i) - // otherwise, callable cont[i] -> cont[sprout::range_index_check(cont, i)] - // otherwise -> *sprout::next(sprout::begin(cont), sprout::range_index_check(cont, i)) - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::reference - at(Container& cont, typename sprout::container_traits::size_type i) { - return sprout::container_range_traits::range_at(cont, i); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::reference - at(Container const& cont, typename sprout::container_traits::size_type i) { - return sprout::container_range_traits::range_at(cont, i); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::reference - at(T (& arr)[N], typename sprout::container_traits::size_type i) { - return sprout::container_range_traits::range_at(arr, i); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::reference - at(T const (& arr)[N], typename sprout::container_traits::size_type i) { - return sprout::container_range_traits::range_at(arr, i); - } - - // - // cat - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::reference - cat(Container const& cont, typename sprout::container_traits::size_type i) { - return sprout::at(cont, i); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::reference - cat(T const (& arr)[N], typename sprout::container_traits::size_type i) { - return sprout::at(arr, i); - } -} // namespace sprout - -#include - -#endif // #ifndef SPROUT_CONTAINER_AT_HPP diff --git a/dsp/lib/sprout/sprout/container/back.hpp b/dsp/lib/sprout/sprout/container/back.hpp deleted file mode 100644 index 2d759b7..0000000 --- a/dsp/lib/sprout/sprout/container/back.hpp +++ /dev/null @@ -1,74 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_BACK_HPP -#define SPROUT_CONTAINER_BACK_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // back - // - // effect: - // sprout::container_range_traits::range_back(cont) - // [default] - // ADL callable range_back(cont) -> range_back(cont) - // [default] - // Container is T[N] -> cont[N - 1] - // otherwise, Container is not const - // && sprout::is_const_reference_cast_convertible - // && (callable sprout::as_const(cont).back() - // || callable sprout::as_const(cont).begin() - // || ADL(without sprout) callable begin(sprout::as_const(cont)) - // ) - // -> sprout::const_reference_cast(sprout::back(sprout::as_const(cont))) - // otherwise, callable cont.back() -> cont.back() - // otherwise -> *sprout::next(sprout::begin(cont), sprout::size(cont) - 1) - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::reference - back(Container& cont) { - return sprout::container_range_traits::range_back(cont); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::reference - back(Container const& cont) { - return sprout::container_range_traits::range_back(cont); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::reference - back(T (& arr)[N]) { - return sprout::container_range_traits::range_back(arr); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::reference - back(T const (& arr)[N]) { - return sprout::container_range_traits::range_back(arr); - } - - // - // cback - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::reference - cback(Container const& cont) { - return sprout::back(cont); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::reference - cback(T const (& arr)[N]) { - return sprout::back(arr); - } -} // namespace sprout - -#include - -#endif // #ifndef SPROUT_CONTAINER_BACK_HPP diff --git a/dsp/lib/sprout/sprout/container/begin.hpp b/dsp/lib/sprout/sprout/container/begin.hpp deleted file mode 100644 index 2bf4e63..0000000 --- a/dsp/lib/sprout/sprout/container/begin.hpp +++ /dev/null @@ -1,74 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_BEGIN_HPP -#define SPROUT_CONTAINER_BEGIN_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // begin - // - // effect: - // sprout::container_range_traits::range_begin(cont) - // [default] - // ADL callable range_begin(cont) -> range_begin(cont) - // [default] - // Container is T[N] -> iterator(cont) - // otherwise, Container is not const - // && sprout::is_const_iterator_cast_convertible - // && (callable sprout::as_const(cont).begin() - // || ADL(without sprout) callable begin(sprout::as_const(cont)) - // ) - // -> sprout::const_iterator_cast(sprout::begin(sprout::as_const(cont))) - // otherwise, callable cont.begin() -> cont.begin() - // otherwise, ADL(without sprout) callable begin(cont) -> begin(cont) - // otherwise -> std::begin(cont) - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::iterator - begin(Container& cont) { - return sprout::container_range_traits::range_begin(cont); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::iterator - begin(Container const& cont) { - return sprout::container_range_traits::range_begin(cont); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::iterator - begin(T (& arr)[N]) { - return sprout::container_range_traits::range_begin(arr); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::iterator - begin(T const (& arr)[N]) { - return sprout::container_range_traits::range_begin(arr); - } - - // - // cbegin - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::iterator - cbegin(Container const& cont) { - return sprout::begin(cont); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::iterator - cbegin(T const (& arr)[N]) { - return sprout::begin(arr); - } -} // namespace sprout - -#include - -#endif // #ifndef SPROUT_CONTAINER_BEGIN_HPP diff --git a/dsp/lib/sprout/sprout/container/boost/array.hpp b/dsp/lib/sprout/sprout/container/boost/array.hpp deleted file mode 100644 index a18e745..0000000 --- a/dsp/lib/sprout/sprout/container/boost/array.hpp +++ /dev/null @@ -1,131 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_BOOST_ARRAY_HPP -#define SPROUT_CONTAINER_BOOST_ARRAY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - struct elems_subscript; - template<> - struct elems_subscript - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval().elems[std::declval()]) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval().elems[std::declval()]) - { - return SPROUT_FORWARD(T, x).elems[SPROUT_FORWARD(U, y)]; - } - }; - } // namespace detail - - // - // container_traits - // - template - struct container_traits > - : public sprout::container_traits_default > - { - public: - typedef sprout::index_iterator&, true, sprout::detail::elems_subscript<> > iterator; - typedef sprout::index_iterator const&, true, sprout::detail::elems_subscript<> > const_iterator; - }; - - // - // container_range_traits - // - template - struct container_range_traits > - : public sprout::container_range_traits_default > - { - public: - // iterators: - static SPROUT_CONSTEXPR typename sprout::container_traits >::iterator - range_begin(boost::array& cont) { - return typename sprout::container_traits >::iterator(cont, 0); - } - static SPROUT_CONSTEXPR typename sprout::container_traits const>::iterator - range_begin(boost::array const& cont) { - return typename sprout::container_traits const>::iterator(cont, 0); - } - static SPROUT_CONSTEXPR typename sprout::container_traits >::iterator - range_end(boost::array& cont) { - return typename sprout::container_traits >::iterator(cont, cont.size()); - } - static SPROUT_CONSTEXPR typename sprout::container_traits const>::iterator - range_end(boost::array const& cont) { - return typename sprout::container_traits const>::iterator(cont, cont.size()); - } - // capacity: - static SPROUT_CONSTEXPR typename sprout::container_traits const>::size_type - range_size(boost::array const& cont) { - return N; - } - static SPROUT_CONSTEXPR typename sprout::container_traits const>::size_type - range_empty(boost::array const& cont) { - return N != 0; - } - // element access: - static SPROUT_CONSTEXPR typename sprout::container_traits >::reference - range_front(boost::array& cont) { - return cont.elems[0]; - } - static SPROUT_CONSTEXPR typename sprout::container_traits const>::reference - range_front(boost::array const& cont) { - return cont.elems[0]; - } - static SPROUT_CONSTEXPR typename sprout::container_traits >::reference - range_back(boost::array& cont) { - return cont.elems[N - 1]; - } - static SPROUT_CONSTEXPR typename sprout::container_traits const>::reference - range_back(boost::array const& cont) { - return cont.elems[N - 1]; - } - static SPROUT_CONSTEXPR typename sprout::container_traits >::reference - range_subscript_at(boost::array& cont, typename sprout::container_traits >::size_type i) { - return cont.elems[i]; - } - static SPROUT_CONSTEXPR typename sprout::container_traits const>::reference - range_subscript_at(boost::array const& cont, typename sprout::container_traits const>::size_type i) { - return cont.elems[i]; - } - static SPROUT_CONSTEXPR typename sprout::container_traits >::reference - range_at(boost::array& cont, typename sprout::container_traits >::size_type i) { - return cont.elems[sprout::range_index_check(cont, i)]; - } - static SPROUT_CONSTEXPR typename sprout::container_traits const>::reference - range_at(boost::array const& cont, typename sprout::container_traits const>::size_type i) { - return cont.elems[sprout::range_index_check(cont, i)]; - } - // data access: - static SPROUT_CONSTEXPR typename sprout::container_traits >::pointer - range_data(boost::array& cont) { - return cont.elems; - } - static SPROUT_CONSTEXPR typename sprout::container_traits const>::pointer - range_data(boost::array const& cont) { - return cont.elems; - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_BOOST_ARRAY_HPP diff --git a/dsp/lib/sprout/sprout/container/const_iterator.hpp b/dsp/lib/sprout/sprout/container/const_iterator.hpp deleted file mode 100644 index e620b5a..0000000 --- a/dsp/lib/sprout/sprout/container/const_iterator.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_CONST_ITERATOR_HPP -#define SPROUT_CONTAINER_CONST_ITERATOR_HPP - -#include -#include - -namespace sprout { - namespace containers { - // - // const_iterator - // - template - struct const_iterator { - public: - typedef typename sprout::container_traits::const_iterator type; - }; - } // namespace containers -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_CONST_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/container/const_pointer.hpp b/dsp/lib/sprout/sprout/container/const_pointer.hpp deleted file mode 100644 index 0f7da03..0000000 --- a/dsp/lib/sprout/sprout/container/const_pointer.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_CONST_POINTER_HPP -#define SPROUT_CONTAINER_CONST_POINTER_HPP - -#include -#include - -namespace sprout { - namespace containers { - // - // const_pointer - // - template - struct const_pointer { - public: - typedef typename sprout::container_traits::const_pointer type; - }; - } // namespace containers -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_CONST_POINTER_HPP diff --git a/dsp/lib/sprout/sprout/container/const_reference.hpp b/dsp/lib/sprout/sprout/container/const_reference.hpp deleted file mode 100644 index 372dd64..0000000 --- a/dsp/lib/sprout/sprout/container/const_reference.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_CONST_REFERENCE_HPP -#define SPROUT_CONTAINER_CONST_REFERENCE_HPP - -#include -#include - -namespace sprout { - namespace containers { - // - // const_reference - // - template - struct const_reference { - public: - typedef typename sprout::container_traits::const_reference type; - }; - } // namespace containers -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_CONST_REFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/container/construct_functions.hpp b/dsp/lib/sprout/sprout/container/construct_functions.hpp deleted file mode 100644 index de51465..0000000 --- a/dsp/lib/sprout/sprout/container/construct_functions.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_CONSTRUCT_FUNCTIONS_HPP -#define SPROUT_CONTAINER_CONSTRUCT_FUNCTIONS_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_CONTAINER_CONSTRUCT_FUNCTIONS_HPP diff --git a/dsp/lib/sprout/sprout/container/container_construct_traits.hpp b/dsp/lib/sprout/sprout/container/container_construct_traits.hpp deleted file mode 100644 index 8c19798..0000000 --- a/dsp/lib/sprout/sprout/container/container_construct_traits.hpp +++ /dev/null @@ -1,120 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_CONTAINER_TRAITS_CONSTRUCT_TRAITS_HPP -#define SPROUT_CONTAINER_CONTAINER_TRAITS_CONSTRUCT_TRAITS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_fixed_container::value, - typename sprout::container_construct_traits::copied_type - >::type - default_make_container(Args&&... args) { - typedef typename sprout::container_construct_traits::copied_type copied_type; - return copied_type{{SPROUT_FORWARD(Args, args)...}}; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_fixed_container::value, - typename sprout::container_construct_traits::copied_type - >::type - default_make_container(Args&&... args) { - typedef typename sprout::container_construct_traits::copied_type copied_type; - return copied_type{SPROUT_FORWARD(Args, args)...}; - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_fixed_container::value, - typename sprout::container_construct_traits::copied_type - >::type - default_remake_container(Cont&&, typename sprout::container_traits::difference_type, Args&&... args) { - return sprout::container_construct_traits::make(SPROUT_FORWARD(Args, args)...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_fixed_container::value - && !(sizeof...(Args) == 2 && sprout::tpp::all_of::type>...>::value) - , - typename sprout::container_construct_traits::copied_type - >::type - default_remake_container(Cont&&, typename sprout::container_traits::difference_type, Args&&... args) { - return sprout::container_construct_traits::make(SPROUT_FORWARD(Args, args)...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_fixed_container::value, - typename sprout::container_construct_traits::copied_type - >::type - default_remake_container(Cont&& cont, typename sprout::container_traits::difference_type, InputIterator first, InputIterator last) { - typedef typename sprout::container_construct_traits::copied_type copied_type; - return copied_type( - sprout::make_remake_iterator( - sprout::internal_begin(cont), first, - first, last, - sprout::internal_begin_offset(cont), sprout::internal_end_offset(cont) - ), - sprout::make_remake_iterator( - sprout::internal_end(cont), last, - first, last, - sprout::internal_begin_offset_backward(cont), sprout::internal_end_offset_backward(cont) - ) - ); - } - } // namespace detail - - // - // container_construct_traits - // - template - struct container_construct_traits { - public: - typedef Container copied_type; - public: - template - static SPROUT_CONSTEXPR copied_type - deep_copy(Cont&& cont) { - return SPROUT_FORWARD(Cont, cont); - } - template - static SPROUT_CONSTEXPR copied_type - make(Args&&... args) { - return sprout::detail::default_make_container(SPROUT_FORWARD(Args, args)...); - } - template - static SPROUT_CONSTEXPR copied_type - remake(Cont&& cont, typename sprout::container_traits::difference_type size, Args&&... args) { - return sprout::detail::default_remake_container( - SPROUT_FORWARD(Cont, cont), size, - SPROUT_FORWARD(Args, args)... - ); - } - }; - template - struct container_construct_traits - : public sprout::container_construct_traits - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_CONTAINER_CONSTRUCT_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/container/container_fitness_traits.hpp b/dsp/lib/sprout/sprout/container/container_fitness_traits.hpp deleted file mode 100644 index 7eca078..0000000 --- a/dsp/lib/sprout/sprout/container/container_fitness_traits.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_CONTAINER_FITNESS_TRAITS_HPP -#define SPROUT_CONTAINER_CONTAINER_FITNESS_TRAITS_HPP - -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - // - // container_fitness_traits - // - template - struct container_fitness_traits { - public: - template - static SPROUT_CONSTEXPR typename sprout::container_traits::difference_type - fit_size(Cont&& cont, typename sprout::container_traits::size_type size) { - return NS_SSCRISK_CEL_OR_SPROUT::min(size, sprout::size(SPROUT_FORWARD(Cont, cont))); - } - }; - template - struct container_fitness_traits - : public sprout::container_fitness_traits - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_CONTAINER_FITNESS_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/container/container_holder.hpp b/dsp/lib/sprout/sprout/container/container_holder.hpp deleted file mode 100644 index be5b9b6..0000000 --- a/dsp/lib/sprout/sprout/container/container_holder.hpp +++ /dev/null @@ -1,189 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_CONTAINER_HOLDER_HPP -#define SPROUT_CONTAINER_CONTAINER_HOLDER_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // container_holder - // - template - class container_holder - : public sprout::container_traits_facade - { - private: - typedef sprout::container_traits_facade facade_type; - public: - typedef Container container_type; - typedef container_type internal_type; - typedef typename facade_type::iterator iterator; - typedef typename facade_type::const_iterator const_iterator; - typedef typename facade_type::reference reference; - typedef typename facade_type::const_reference const_reference; - typedef typename facade_type::size_type size_type; - typedef typename facade_type::difference_type difference_type; - typedef typename facade_type::pointer pointer; - typedef typename facade_type::const_pointer const_pointer; - typedef internal_type& param_type; - typedef internal_type const& const_param_type; - typedef sprout::value_holder holder_type; - protected: - holder_type container; - public: - SPROUT_CONSTEXPR container_holder() - : container() - {} - explicit SPROUT_CONSTEXPR container_holder(param_type x) - : container(x) - {} - container_holder(container_holder const&) = default; - - SPROUT_CXX14_CONSTEXPR void swap(container_holder& other) - SPROUT_NOEXCEPT_IF_EXPR(sprout::swap(other.container, container)) - { - sprout::swap(other.container, container); - } - // iterators: - SPROUT_CXX14_CONSTEXPR iterator begin() { - return sprout::begin(*container); - } - SPROUT_CONSTEXPR const_iterator begin() const { - return sprout::begin(*container); - } - SPROUT_CXX14_CONSTEXPR iterator end() { - return sprout::end(*container); - } - SPROUT_CONSTEXPR const_iterator end() const { - return sprout::end(*container); - } - SPROUT_CONSTEXPR const_iterator cbegin() const { - return sprout::begin(*container); - } - SPROUT_CONSTEXPR const_iterator cend() const { - return sprout::end(*container); - } - // capacity: - SPROUT_CONSTEXPR size_type size() const SPROUT_NOEXCEPT { - return sprout::size(*container); - } - SPROUT_CONSTEXPR bool empty() const SPROUT_NOEXCEPT { - return sprout::empty(*container); - } - - SPROUT_CXX14_CONSTEXPR param_type get_internal() { - return *container; - } - SPROUT_CONSTEXPR const_param_type get_internal() const { - return *container; - } - // element access: - SPROUT_CXX14_CONSTEXPR reference operator[](size_type i) { - return *sprout::next(begin(), i); - } - SPROUT_CONSTEXPR const_reference operator[](size_type i) const { - return *sprout::next(begin(), i); - } - SPROUT_CXX14_CONSTEXPR reference at(size_type i) { - return i < size() ? (*this)[i] - : (throw std::out_of_range("container_holder<>: index out of range"), (*this)[i]) - ; - } - SPROUT_CONSTEXPR const_reference at(size_type i) const { - return i < size() ? (*this)[i] - : (throw std::out_of_range("container_holder<>: index out of range"), (*this)[i]) - ; - } - SPROUT_CXX14_CONSTEXPR reference front() { - return *begin(); - } - SPROUT_CONSTEXPR const_reference front() const { - return *begin(); - } - SPROUT_CXX14_CONSTEXPR reference back() { - return *sprout::next(begin(), size() - 1); - } - SPROUT_CONSTEXPR const_reference back() const { - return *sprout::next(begin(), size() - 1); - } - }; - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::container_holder& lhs, sprout::container_holder& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // container_construct_traits - // - template - struct container_construct_traits > { - public: - typedef typename sprout::container_construct_traits::copied_type copied_type; - public: - template - static SPROUT_CONSTEXPR copied_type - deep_copy(Cont&& cont) { - return sprout::deep_copy(sprout::get_internal(SPROUT_FORWARD(Cont, cont))); - } - template - static SPROUT_CONSTEXPR copied_type - make(Args&&... args) { - return sprout::make(SPROUT_FORWARD(Args, args)...); - } - template - static SPROUT_CONSTEXPR copied_type - remake(Cont&& cont, typename sprout::container_traits::difference_type size, Args&&... args) { - return sprout::remake(sprout::get_internal(SPROUT_FORWARD(Cont, cont)), size, SPROUT_FORWARD(Args, args)...); - } - }; - - // - // sub_container_traits - // - template - struct sub_container_traits > { - private: - static typename sprout::container_holder::param_type - call(sprout::container_holder& cont) { - return cont.get_internal(); - } - static SPROUT_CONSTEXPR typename sprout::container_holder::const_param_type - call(sprout::container_holder const& cont) { - return cont.get_internal(); - } - public: - template - struct internal { - public: - typedef decltype(call(std::declval())) type; - }; - public: - template - static SPROUT_CONSTEXPR typename internal::type - get_internal(Cont&& cont) { - return call(SPROUT_FORWARD(Cont, cont)); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_CONTAINER_HOLDER_HPP diff --git a/dsp/lib/sprout/sprout/container/container_range_traits.hpp b/dsp/lib/sprout/sprout/container/container_range_traits.hpp deleted file mode 100644 index 7b18d98..0000000 --- a/dsp/lib/sprout/sprout/container/container_range_traits.hpp +++ /dev/null @@ -1,431 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_CONTAINER_RANGE_TRAITS_HPP -#define SPROUT_CONTAINER_CONTAINER_RANGE_TRAITS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - // - // container_range_traits_const_default - // - template - struct container_range_traits_const_default { - public: - // iterators: - static SPROUT_CONSTEXPR typename sprout::container_traits::iterator - range_begin(Container const& cont) { - return sprout::container_range_traits::range_begin(cont); - } - static SPROUT_CONSTEXPR typename sprout::container_traits::iterator - range_end(Container const& cont) { - return sprout::container_range_traits::range_end(cont); - } - // capacity: - static SPROUT_CONSTEXPR typename sprout::container_traits::size_type - range_size(Container const& cont) { - return sprout::container_range_traits::range_size(cont); - } - static SPROUT_CONSTEXPR bool - range_empty(Container const& cont) { - return sprout::container_range_traits::range_empty(cont); - } - // element access: - static SPROUT_CONSTEXPR typename sprout::container_traits::reference - range_front(Container const& cont) { - return sprout::container_range_traits::range_front(cont); - } - static SPROUT_CONSTEXPR typename sprout::container_traits::reference - range_back(Container const& cont) { - return sprout::container_range_traits::range_back(cont); - } - static SPROUT_CONSTEXPR typename sprout::container_traits::reference - range_subscript_at(Container const& cont, typename sprout::container_traits::size_type i) { - return sprout::container_range_traits::range_subscript_at(cont, i); - } - static SPROUT_CONSTEXPR typename sprout::container_traits::reference - range_at(Container const& cont, typename sprout::container_traits::size_type i) { - return sprout::container_range_traits::range_at(cont, i); - } - static SPROUT_CONSTEXPR typename sprout::container_traits::iterator - range_nth(Container const& cont, typename sprout::container_traits::size_type i) { - return sprout::container_range_traits::range_nth(cont, i); - } - static SPROUT_CONSTEXPR typename sprout::container_traits::size_type - range_index_of(Container const& cont, typename sprout::container_traits::iterator p) { - return sprout::container_range_traits::range_index_of(cont, p); - } - // data access: - static SPROUT_CONSTEXPR typename sprout::container_traits::pointer - range_data(Container const& cont) { - return sprout::container_range_traits::range_data(cont); - } - }; - } // namespace detail - - // - // container_range_begin_default - // - template - struct container_range_begin_default { - public: - static SPROUT_CONSTEXPR typename sprout::container_traits::iterator - range_begin(Container& cont) { - using sprout_container_range_detail::range_begin; - using sprout_adl::range_begin; - return range_begin(cont); - } - static SPROUT_CONSTEXPR typename sprout::container_traits::iterator - range_begin(Container const& cont) { - using sprout_container_range_detail::range_begin; - using sprout_adl::range_begin; - return range_begin(cont); - } - }; - // - // container_range_end_default - // - template - struct container_range_end_default { - public: - static SPROUT_CONSTEXPR typename sprout::container_traits::iterator - range_end(Container& cont) { - using sprout_container_range_detail::range_end; - using sprout_adl::range_end; - return range_end(cont); - } - static SPROUT_CONSTEXPR typename sprout::container_traits::iterator - range_end(Container const& cont) { - using sprout_container_range_detail::range_end; - using sprout_adl::range_end; - return range_end(cont); - } - }; - // - // container_range_size_default - // - template - struct container_range_size_default { - public: - static SPROUT_CONSTEXPR typename sprout::container_traits::size_type - range_size(Container const& cont) { - using sprout_container_range_detail::range_size; - using sprout_adl::range_size; - return range_size(cont); - } - }; - // - // container_range_empty_default - // - template - struct container_range_empty_default { - public: - static SPROUT_CONSTEXPR typename sprout::container_traits::size_type - range_empty(Container const& cont) { - using sprout_container_range_detail::range_empty; - using sprout_adl::range_empty; - return range_empty(cont); - } - }; - // - // container_range_front_default - // - template - struct container_range_front_default { - public: - static SPROUT_CONSTEXPR typename sprout::container_traits::reference - range_front(Container& cont) { - using sprout_container_range_detail::range_front; - using sprout_adl::range_front; - return range_front(cont); - } - static SPROUT_CONSTEXPR typename sprout::container_traits::reference - range_front(Container const& cont) { - using sprout_container_range_detail::range_front; - using sprout_adl::range_front; - return range_front(cont); - } - }; - // - // container_range_back_default - // - template - struct container_range_back_default { - public: - static SPROUT_CONSTEXPR typename sprout::container_traits::reference - range_back(Container& cont) { - using sprout_container_range_detail::range_back; - using sprout_adl::range_back; - return range_back(cont); - } - static SPROUT_CONSTEXPR typename sprout::container_traits::reference - range_back(Container const& cont) { - using sprout_container_range_detail::range_back; - using sprout_adl::range_back; - return range_back(cont); - } - }; - // - // container_range_subscript_at_default - // - template - struct container_range_subscript_at_default { - public: - static SPROUT_CONSTEXPR typename sprout::container_traits::reference - range_subscript_at(Container& cont, typename sprout::container_traits::size_type i) { - using sprout_container_range_detail::range_subscript_at; - using sprout_adl::range_subscript_at; - return range_subscript_at(cont, i); - } - static SPROUT_CONSTEXPR typename sprout::container_traits::reference - range_subscript_at(Container const& cont, typename sprout::container_traits::size_type i) { - using sprout_container_range_detail::range_subscript_at; - using sprout_adl::range_subscript_at; - return range_subscript_at(cont, i); - } - }; - // - // container_range_at_default - // - template - struct container_range_at_default { - public: - static SPROUT_CONSTEXPR typename sprout::container_traits::reference - range_at(Container& cont, typename sprout::container_traits::size_type i) { - using sprout_container_range_detail::range_at; - using sprout_adl::range_at; - return range_at(cont, i); - } - static SPROUT_CONSTEXPR typename sprout::container_traits::reference - range_at(Container const& cont, typename sprout::container_traits::size_type i) { - using sprout_container_range_detail::range_at; - using sprout_adl::range_at; - return range_at(cont, i); - } - }; - // - // container_range_nth_default - // - template - struct container_range_nth_default { - public: - static SPROUT_CONSTEXPR typename sprout::container_traits::iterator - range_nth(Container& cont, typename sprout::container_traits::size_type i) { - using sprout_container_range_detail::range_nth; - using sprout_adl::range_nth; - return range_nth(cont, i); - } - static SPROUT_CONSTEXPR typename sprout::container_traits::iterator - range_nth(Container const& cont, typename sprout::container_traits::size_type i) { - using sprout_container_range_detail::range_nth; - using sprout_adl::range_nth; - return range_nth(cont, i); - } - }; - // - // container_range_index_of_default - // - template - struct container_range_index_of_default { - public: - static SPROUT_CONSTEXPR typename sprout::container_traits::size_type - range_index_of(Container& cont, typename sprout::container_traits::iterator p) { - using sprout_container_range_detail::range_index_of; - using sprout_adl::range_index_of; - return range_index_of(cont, p); - } - static SPROUT_CONSTEXPR typename sprout::container_traits::size_type - range_index_of(Container const& cont, typename sprout::container_traits::iterator p) { - using sprout_container_range_detail::range_index_of; - using sprout_adl::range_index_of; - return range_index_of(cont, p); - } - }; - // - // container_range_data_default - // - template - struct container_range_data_default { - public: - static SPROUT_CONSTEXPR typename sprout::container_traits::pointer - range_data(Container& cont) { - using sprout_container_range_detail::range_data; - using sprout_adl::range_data; - return range_data(cont); - } - static SPROUT_CONSTEXPR typename sprout::container_traits::pointer - range_data(Container const& cont) { - using sprout_container_range_detail::range_data; - using sprout_adl::range_data; - return range_data(cont); - } - }; - - // - // container_range_traits_default - // - template - struct container_range_traits_default - : public sprout::container_range_begin_default - , public sprout::container_range_end_default - , public sprout::container_range_size_default - , public sprout::container_range_front_default - , public sprout::container_range_back_default - , public sprout::container_range_subscript_at_default - , public sprout::container_range_at_default - , public sprout::container_range_nth_default - , public sprout::container_range_index_of_default - , public sprout::container_range_data_default - {}; - - // - // container_range_traits - // - template - struct container_range_traits - : public sprout::container_range_traits_default - {}; - template - struct container_range_traits - : public sprout::detail::container_range_traits_const_default - {}; - - template - struct container_range_traits { - public: - // iterators: - static SPROUT_CONSTEXPR typename sprout::container_traits::iterator - range_begin(T (& arr)[N]) { - typedef typename sprout::container_traits::iterator type; - return type(arr); - } - static SPROUT_CONSTEXPR typename sprout::container_traits::iterator - range_begin(T const (& arr)[N]) { - typedef typename sprout::container_traits::iterator type; - return type(arr); - } - static SPROUT_CONSTEXPR typename sprout::container_traits::iterator - range_end(T (& arr)[N]) { - typedef typename sprout::container_traits::iterator type; - return type(arr) + N; - } - static SPROUT_CONSTEXPR typename sprout::container_traits::iterator - range_end(T const (& arr)[N]) { - typedef typename sprout::container_traits::iterator type; - return type(arr) + N; - } - // capacity: - static SPROUT_CONSTEXPR typename sprout::container_traits::size_type - range_size(T const (&)[N]) { - return N; - } - static SPROUT_CONSTEXPR bool - range_empty(T const (&)[N]) { - return false; - } - // element access: - static SPROUT_CONSTEXPR typename sprout::container_traits::reference - range_front(T (& arr)[N]) { - return arr[0]; - } - static SPROUT_CONSTEXPR typename sprout::container_traits::reference - range_front(T const (& arr)[N]) { - return arr[0]; - } - static SPROUT_CONSTEXPR typename sprout::container_traits::reference - range_back(T (& arr)[N]) { - return arr[N - 1]; - } - static SPROUT_CONSTEXPR typename sprout::container_traits::reference - range_back(T const (& arr)[N]) { - return arr[N - 1]; - } - static SPROUT_CONSTEXPR typename sprout::container_traits::reference - range_subscript_at(T (& arr)[N], typename sprout::container_traits::size_type i) { - return arr[i]; - } - static SPROUT_CONSTEXPR typename sprout::container_traits::reference - range_subscript_at(T const (& arr)[N], typename sprout::container_traits::size_type i) { - return arr[i]; - } - static SPROUT_CONSTEXPR typename sprout::container_traits::reference - range_at(T (& arr)[N], typename sprout::container_traits::size_type i) { - return arr[sprout::range_index_check(arr, i)]; - } - static SPROUT_CONSTEXPR typename sprout::container_traits::reference - range_at(T const (& arr)[N], typename sprout::container_traits::size_type i) { - return arr[sprout::range_index_check(arr, i)]; - } - static SPROUT_CONSTEXPR typename sprout::container_traits::iterator - range_nth(T (& arr)[N], typename sprout::container_traits::size_type i) { - typedef typename sprout::container_traits::iterator type; - return type(arr) + i; - } - static SPROUT_CONSTEXPR typename sprout::container_traits::iterator - range_nth(T const (& arr)[N], typename sprout::container_traits::size_type i) { - typedef typename sprout::container_traits::iterator type; - return type(arr) + i; - } - static SPROUT_CONSTEXPR typename sprout::container_traits::size_type - range_index_of(T (& arr)[N], typename sprout::container_traits::iterator p) { - typedef typename sprout::container_traits::iterator type; - return sprout::distance(type(arr), p); - } - static SPROUT_CONSTEXPR typename sprout::container_traits::size_type - range_index_of(T const (& arr)[N], typename sprout::container_traits::iterator p) { - typedef typename sprout::container_traits::iterator type; - return sprout::distance(type(arr), p); - } - // data access: - static SPROUT_CONSTEXPR typename sprout::container_traits::pointer - range_data(T (& arr)[N]) { - typedef typename sprout::container_traits::pointer type; - return type(arr); - } - static SPROUT_CONSTEXPR typename sprout::container_traits::pointer - range_data(T const (& arr)[N]) { - typedef typename sprout::container_traits::pointer type; - return type(arr); - } - }; - template - struct container_range_traits - : public sprout::detail::container_range_traits_const_default - {}; -} // namespace sprout - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_CONTAINER_CONTAINER_RANGE_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/container/container_traits.hpp b/dsp/lib/sprout/sprout/container/container_traits.hpp deleted file mode 100644 index 564ea21..0000000 --- a/dsp/lib/sprout/sprout/container/container_traits.hpp +++ /dev/null @@ -1,627 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_CONTAINER_TRAITS_HPP -#define SPROUT_CONTAINER_CONTAINER_TRAITS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#if SPROUT_USE_PTR_INDEX_ITERATOR_IMPLEMENTATION -# include -#endif -#include - -namespace sprout { - namespace detail { - // - // has_value_type - // has_iterator - // has_const_iterator - // has_reference - // has_const_reference - // has_size_type - // has_difference_type - // has_pointer - // has_const_pointer - // has_static_size - // - SPROUT_HAS_XXX_TYPE_DEF_LAZY(value_type); - SPROUT_HAS_XXX_TYPE_DEF_LAZY(iterator); - SPROUT_HAS_XXX_TYPE_DEF_LAZY(const_iterator); - SPROUT_HAS_XXX_TYPE_DEF_LAZY(reference); - SPROUT_HAS_XXX_TYPE_DEF_LAZY(const_reference); - SPROUT_HAS_XXX_TYPE_DEF_LAZY(size_type); - SPROUT_HAS_XXX_TYPE_DEF_LAZY(difference_type); - SPROUT_HAS_XXX_TYPE_DEF_LAZY(pointer); - SPROUT_HAS_XXX_TYPE_DEF_LAZY(const_pointer); - SPROUT_HAS_XXX_VALUE_DEF_LAZY(static_size); - - // - // inherit_if_value_type - // inherit_if_iterator - // inherit_if_const_iterator - // inherit_if_reference - // inherit_if_const_reference - // inherit_if_size_type - // inherit_if_difference_type - // inherit_if_pointer - // inherit_if_const_pointer - // inherit_if_static_size - // - SPROUT_INHERIT_IF_XXX_TYPE_DEF_LAZY(value_type); - SPROUT_INHERIT_IF_XXX_TYPE_DEF_LAZY(iterator); - SPROUT_INHERIT_IF_XXX_TYPE_DEF_LAZY(const_iterator); - SPROUT_INHERIT_IF_XXX_TYPE_DEF_LAZY(reference); - SPROUT_INHERIT_IF_XXX_TYPE_DEF_LAZY(const_reference); - SPROUT_INHERIT_IF_XXX_TYPE_DEF_LAZY(size_type); - SPROUT_INHERIT_IF_XXX_TYPE_DEF_LAZY(difference_type); - SPROUT_INHERIT_IF_XXX_TYPE_DEF_LAZY(pointer); - SPROUT_INHERIT_IF_XXX_TYPE_DEF_LAZY(const_pointer); - SPROUT_INHERIT_IF_XXX_CONSTANT_DEF_LAZY(static_size); - - // - // inherit_iterator_if_const_iterator - // inherit_const_iterator_if_iterator - // inherit_reference_if_const_reference - // inherit_const_reference_if_reference - // inherit_pointer_if_const_pointer - // inherit_const_pointer_if_pointer - // - SPROUT_INHERIT_ALIAS_IF_XXX_TYPE_DEF_LAZY(iterator, const_iterator); - SPROUT_INHERIT_ALIAS_IF_XXX_TYPE_DEF_LAZY(const_iterator, iterator); - SPROUT_INHERIT_ALIAS_IF_XXX_TYPE_DEF_LAZY(reference, const_reference); - SPROUT_INHERIT_ALIAS_IF_XXX_TYPE_DEF_LAZY(const_reference, reference); - SPROUT_INHERIT_ALIAS_IF_XXX_TYPE_DEF_LAZY(pointer, const_pointer); - SPROUT_INHERIT_ALIAS_IF_XXX_TYPE_DEF_LAZY(const_pointer, pointer); - - // - // has_container_nosy_iterator - // - template - struct has_container_nosy_iterator - : public sprout::bool_constant< - sprout::detail::has_iterator::value - || sprout::detail::has_const_iterator::value - > - {}; - // - // has_container_nosy_value_type - // - template - struct has_container_nosy_value_type - : public sprout::bool_constant< - sprout::detail::has_value_type::value - || sprout::detail::has_container_nosy_iterator::value - > - {}; - // - // has_container_nosy_static_size - // - template - struct has_container_nosy_static_size - : public sprout::bool_constant< - sprout::detail::has_static_size::value - || sprout::detail::is_array_like::value - > - {}; - - // - // container_nosy_iterator - // - template - struct container_nosy_iterator_impl {}; - template - struct container_nosy_iterator_impl - : public sprout::detail::inherit_if_iterator - {}; - template - struct container_nosy_iterator_impl - : public sprout::detail::inherit_iterator_if_const_iterator - {}; - template - struct container_nosy_iterator - : public sprout::detail::container_nosy_iterator_impl< - Container, - sprout::detail::has_iterator::value, - sprout::detail::has_const_iterator::value - > - {}; - // - // container_nosy_const_iterator - // - template - struct container_nosy_const_iterator_impl {}; - template - struct container_nosy_const_iterator_impl - : public sprout::detail::inherit_if_const_iterator - {}; - template - struct container_nosy_const_iterator_impl - : public sprout::detail::inherit_const_iterator_if_iterator - {}; - template - struct container_nosy_const_iterator - : public sprout::detail::container_nosy_const_iterator_impl< - Container, - sprout::detail::has_const_iterator::value, - sprout::detail::has_iterator::value - > - {}; - // - // container_nosy_value_type - // - template - struct container_nosy_value_type_impl {}; - template - struct container_nosy_value_type_impl { - public: - typedef typename Container::value_type value_type; - }; - template - struct container_nosy_value_type_impl { - public: - typedef typename std::iterator_traits< - typename sprout::detail::container_nosy_iterator::iterator - >::value_type value_type; - }; - template - struct container_nosy_value_type - : public sprout::detail::container_nosy_value_type_impl< - Container, - sprout::detail::has_value_type::value, - sprout::detail::has_container_nosy_iterator::value - > - {}; - // - // container_nosy_reference - // - template - struct container_nosy_reference_impl {}; - template - struct container_nosy_reference_impl { - public: - typedef typename Container::reference reference; - }; - template - struct container_nosy_reference_impl { - public: - typedef typename Container::const_reference reference; - }; - template - struct container_nosy_reference_impl { - public: - typedef typename std::iterator_traits< - typename sprout::detail::container_nosy_iterator::iterator - >::reference reference; - }; - template - struct container_nosy_reference - : public sprout::detail::container_nosy_reference_impl< - Container, - sprout::detail::has_reference::value, - sprout::detail::has_const_reference::value, - sprout::detail::has_container_nosy_iterator::value - > - {}; - // - // container_nosy_const_reference - // - template - struct container_nosy_const_reference_impl {}; - template - struct container_nosy_const_reference_impl { - public: - typedef typename Container::const_reference const_reference; - }; - template - struct container_nosy_const_reference_impl { - public: - typedef typename Container::reference const_reference; - }; - template - struct container_nosy_const_reference_impl { - public: - typedef typename std::iterator_traits< - typename sprout::detail::container_nosy_const_iterator::const_iterator - >::reference const_reference; - }; - template - struct container_nosy_const_reference - : public sprout::detail::container_nosy_const_reference_impl< - Container, - sprout::detail::has_const_reference::value, - sprout::detail::has_reference::value, - sprout::detail::has_container_nosy_iterator::value - > - {}; - // - // container_nosy_difference_type - // - template - struct container_nosy_difference_type_impl { - public: - typedef std::ptrdiff_t difference_type; - }; - template - struct container_nosy_difference_type_impl { - public: - typedef typename Container::difference_type difference_type; - }; - template - struct container_nosy_difference_type_impl { - public: - typedef typename std::iterator_traits< - typename sprout::detail::container_nosy_iterator::iterator - >::difference_type difference_type; - }; - template - struct container_nosy_difference_type - : public sprout::detail::container_nosy_difference_type_impl< - Container, - sprout::detail::has_difference_type::value, - sprout::detail::has_container_nosy_iterator::value - > - {}; - // - // container_nosy_size_type - // - template - struct container_nosy_size_type_impl { - public: - typedef std::size_t size_type; - }; - template - struct container_nosy_size_type_impl { - public: - typedef typename Container::size_type size_type; - }; - template - struct container_nosy_size_type_impl { - public: - typedef typename std::make_unsigned< - typename std::iterator_traits< - typename sprout::detail::container_nosy_iterator::iterator - >::difference_type - >::type size_type; - }; - template - struct container_nosy_size_type - : public sprout::detail::container_nosy_size_type_impl< - Container, - sprout::detail::has_size_type::value, - sprout::detail::has_container_nosy_iterator::value - > - {}; - // - // container_nosy_pointer - // - template - struct container_nosy_pointer_impl {}; - template - struct container_nosy_pointer_impl { - public: - typedef typename Container::pointer pointer; - }; - template - struct container_nosy_pointer_impl { - public: - typedef typename Container::const_pointer pointer; - }; - template - struct container_nosy_pointer_impl { - public: - typedef typename sprout::detail::container_nosy_value_type::value_type* pointer; - }; - template - struct container_nosy_pointer - : public sprout::detail::container_nosy_pointer_impl< - Container, - sprout::detail::has_pointer::value, - sprout::detail::has_const_pointer::value, - sprout::detail::has_container_nosy_value_type::value - > - {}; - // - // container_nosy_const_pointer - // - template - struct container_nosy_const_pointer_impl {}; - template - struct container_nosy_const_pointer_impl { - public: - typedef typename Container::const_pointer const_pointer; - }; - template - struct container_nosy_const_pointer_impl { - public: - typedef typename Container::pointer const_pointer; - }; - template - struct container_nosy_const_pointer_impl { - public: - typedef typename sprout::detail::container_nosy_value_type::value_type const* const_pointer; - }; - template - struct container_nosy_const_pointer - : public sprout::detail::container_nosy_const_pointer_impl< - Container, - sprout::detail::has_const_pointer::value, - sprout::detail::has_pointer::value, - sprout::detail::has_container_nosy_value_type::value - > - {}; - // - // container_nosy_static_size - // - template - struct container_nosy_static_size_impl {}; - template - struct container_nosy_static_size_impl - : public sprout::detail::inherit_if_static_size - {}; - template - struct container_nosy_static_size_impl - : public sprout::detail::inherit_if_static_size - { - public: - SPROUT_STATIC_CONSTEXPR typename sprout::detail::array_like_static_size::value_type static_size - = sprout::detail::array_like_static_size::value - ; - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::detail::array_like_static_size::value_type - sprout::detail::container_nosy_static_size_impl::static_size - ; - template - struct container_nosy_static_size - : public sprout::detail::container_nosy_static_size_impl< - Container, - sprout::detail::has_static_size::value, - sprout::detail::is_array_like::value - > - {}; - // - // container_nosy_fixed_size - // - template - struct container_nosy_fixed_size_impl {}; - template - struct container_nosy_fixed_size_impl { - public: - static SPROUT_CONSTEXPR decltype(sprout::detail::container_nosy_static_size::static_size) - fixed_size() SPROUT_NOEXCEPT { - return sprout::detail::container_nosy_static_size::static_size; - } - }; - template - struct container_nosy_fixed_size - : public sprout::detail::container_nosy_fixed_size_impl< - Container, - sprout::detail::has_container_nosy_static_size::value - > - {}; - - // - // container_traits_const_default - // - template - struct container_traits_const_default - : public sprout::detail::inherit_if_value_type > - , public sprout::detail::inherit_if_const_iterator > - , public sprout::detail::inherit_if_const_reference > - , public sprout::detail::inherit_if_size_type > - , public sprout::detail::inherit_if_difference_type > - , public sprout::detail::inherit_if_const_pointer > - , public sprout::detail::inherit_if_static_size > - , public sprout::detail::container_nosy_fixed_size > - , public sprout::detail::inherit_iterator_if_const_iterator > - , public sprout::detail::inherit_reference_if_const_reference > - , public sprout::detail::inherit_pointer_if_const_pointer > - {}; - } // namespace detail - - // - // container_value_type_default - // container_iterator_default - // container_const_iterator_default - // container_reference_default - // container_const_reference_default - // container_size_type_default - // container_difference_type_default - // container_pointer_default - // container_const_pointer_default - // container_static_size_default - // container_fixed_size_default - // - template - struct container_value_type_default - : public sprout::detail::container_nosy_value_type - {}; - template - struct container_iterator_default - : public sprout::detail::container_nosy_iterator - {}; - template - struct container_const_iterator_default - : public sprout::detail::container_nosy_const_iterator - {}; - template - struct container_reference_default - : public sprout::detail::container_nosy_reference - {}; - template - struct container_const_reference_default - : public sprout::detail::container_nosy_const_reference - {}; - template - struct container_size_type_default - : public sprout::detail::container_nosy_size_type - {}; - template - struct container_difference_type_default - : public sprout::detail::container_nosy_difference_type - {}; - template - struct container_pointer_default - : public sprout::detail::container_nosy_pointer - {}; - template - struct container_const_pointer_default - : public sprout::detail::container_nosy_const_pointer - {}; - template - struct container_static_size_default - : public sprout::detail::container_nosy_static_size - {}; - template - struct container_fixed_size_default - : public sprout::detail::container_nosy_fixed_size - {}; - // - // container_traits_default - // - template - struct container_traits_default - : public sprout::container_value_type_default - , public sprout::container_iterator_default - , public sprout::container_const_iterator_default - , public sprout::container_reference_default - , public sprout::container_const_reference_default - , public sprout::container_size_type_default - , public sprout::container_difference_type_default - , public sprout::container_pointer_default - , public sprout::container_const_pointer_default - , public sprout::container_static_size_default - , public sprout::container_fixed_size_default - {}; - - // - // container_traits - // - template - struct container_traits - : public sprout::container_traits_default - {}; - template - struct container_traits - : public sprout::detail::container_traits_const_default - {}; - - template - struct container_traits { - public: - typedef T value_type; -#if SPROUT_USE_PTR_INDEX_ITERATOR_IMPLEMENTATION - typedef sprout::ptr_index_iterator iterator; - typedef sprout::ptr_index_iterator const_iterator; -#else - typedef T* iterator; - typedef T const* const_iterator; -#endif - typedef T& reference; - typedef T const& const_reference; - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - typedef T* pointer; - typedef T const* const_pointer; - public: - SPROUT_STATIC_CONSTEXPR size_type static_size = N; - public: - static SPROUT_CONSTEXPR size_type - fixed_size() SPROUT_NOEXCEPT { - return static_size; - } - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::container_traits::size_type - sprout::container_traits::static_size; - template - struct container_traits - : public sprout::detail::container_traits_const_default - {}; - - // - // container_traits_facade - // - template - struct container_traits_facade - : public sprout::detail::inherit_if_value_type > - , public sprout::detail::inherit_if_iterator > - , public sprout::detail::inherit_if_const_iterator > - , public sprout::detail::inherit_if_reference > - , public sprout::detail::inherit_if_const_reference > - , public sprout::detail::inherit_if_size_type > - , public sprout::detail::inherit_if_difference_type > - , public sprout::detail::inherit_if_pointer > - , public sprout::detail::inherit_if_const_pointer > - , public sprout::detail::inherit_if_static_size > - , public sprout::detail::container_nosy_fixed_size > - { -#ifdef SPROUT_WORKAROUND_NEEDS_EXPLICIT_EMPTY_BASE_CLASS_CONSTRUCT - public: - SPROUT_CONSTEXPR container_traits_facade() - SPROUT_EXPLICIT_EMPTY_BASE_CLASS_CONSTRUCT(sprout::detail::inherit_if_value_type >) - SPROUT_EXPLICIT_EMPTY_BASE_CLASS_CONSTRUCT_TRAIL(sprout::detail::inherit_if_iterator >) - SPROUT_EXPLICIT_EMPTY_BASE_CLASS_CONSTRUCT_TRAIL(sprout::detail::inherit_if_const_iterator >) - SPROUT_EXPLICIT_EMPTY_BASE_CLASS_CONSTRUCT_TRAIL(sprout::detail::inherit_if_reference >) - SPROUT_EXPLICIT_EMPTY_BASE_CLASS_CONSTRUCT_TRAIL(sprout::detail::inherit_if_const_reference >) - SPROUT_EXPLICIT_EMPTY_BASE_CLASS_CONSTRUCT_TRAIL(sprout::detail::inherit_if_size_type >) - SPROUT_EXPLICIT_EMPTY_BASE_CLASS_CONSTRUCT_TRAIL(sprout::detail::inherit_if_difference_type >) - SPROUT_EXPLICIT_EMPTY_BASE_CLASS_CONSTRUCT_TRAIL(sprout::detail::inherit_if_pointer >) - SPROUT_EXPLICIT_EMPTY_BASE_CLASS_CONSTRUCT_TRAIL(sprout::detail::inherit_if_const_pointer >) - SPROUT_EXPLICIT_EMPTY_BASE_CLASS_CONSTRUCT_TRAIL(sprout::detail::inherit_if_static_size >) - SPROUT_EXPLICIT_EMPTY_BASE_CLASS_CONSTRUCT_TRAIL(sprout::detail::container_nosy_fixed_size >) - SPROUT_EXPLICIT_EMPTY_BASE_CLASS_CONSTRUCT_BODY -#endif - }; - - // - // is_fixed_container - // - template - struct is_fixed_container - : public sprout::detail::has_static_size > - {}; - - namespace detail { - // - // static_size_or_zero - // - template - struct static_size_or_zero; - template - struct static_size_or_zero< - Container, - typename std::enable_if >::value>::type - > - : public sprout::integral_constant< - typename sprout::container_traits::size_type, - sprout::container_traits::static_size - > - {}; - template - struct static_size_or_zero< - Container, - typename std::enable_if >::value>::type - > - : public sprout::integral_constant< - typename sprout::container_traits::size_type, - 0 - > - {}; - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_CONTAINER_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/container/container_transform_traits.hpp b/dsp/lib/sprout/sprout/container/container_transform_traits.hpp deleted file mode 100644 index 1f7e441..0000000 --- a/dsp/lib/sprout/sprout/container/container_transform_traits.hpp +++ /dev/null @@ -1,126 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_CONTAINER_TRANSFORM_TRAITS_HPP -#define SPROUT_CONTAINER_CONTAINER_TRANSFORM_TRAITS_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // container_transform_traits - // - namespace detail { - template::size_type Size> - struct default_array_rebind_size; - template< - template class Array, - typename T, - std::size_t N, - typename sprout::container_traits >::size_type Size - > - struct default_array_rebind_size, Size> { - public: - typedef Array type; - }; - - template - struct default_array_rebind_type; - template< - template class Array, - typename T, - std::size_t N, - typename Type - > - struct default_array_rebind_type, Type> { - public: - typedef Array type; - }; - - template - struct inherit_default_rebind_size {}; - template - struct inherit_default_rebind_size< - Container, - typename std::enable_if::value>::type - > { - public: - template::size_type Size> - struct rebind_size - : public sprout::detail::default_array_rebind_size - {}; - }; - - template - struct inherit_default_rebind_type {}; - template - struct inherit_default_rebind_type< - Container, - typename std::enable_if::value>::type - > { - public: - template - struct rebind_type - : public sprout::detail::default_array_rebind_type - {}; - }; - } // namespace detail - - template - struct container_transform_traits - : public sprout::detail::inherit_default_rebind_size - , public sprout::detail::inherit_default_rebind_type - {}; - template - struct container_transform_traits { - public: - template::size_type Size> - struct rebind_size { - typedef typename sprout::container_transform_traits::template rebind_size::type const type; - }; - template - struct rebind_type { - typedef typename sprout::container_transform_traits::template rebind_type::type const type; - }; - }; - - template - struct container_transform_traits { - public: - template::size_type Size> - struct rebind_size { - public: - typedef T type[Size]; - }; - template - struct rebind_type { - public: - typedef Type type[N]; - }; - }; - template - struct container_transform_traits { - public: - template::size_type Size> - struct rebind_size { - public: - typedef T const type[Size]; - }; - template - struct rebind_type { - public: - typedef Type type[N]; - }; - }; -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_CONTAINER_TRANSFORM_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/container/copied_type.hpp b/dsp/lib/sprout/sprout/container/copied_type.hpp deleted file mode 100644 index 931497a..0000000 --- a/dsp/lib/sprout/sprout/container/copied_type.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_COPIED_TYPE_HPP -#define SPROUT_CONTAINER_COPIED_TYPE_HPP - -#include -#include - -namespace sprout { - namespace containers { - // - // copied_type - // - template - struct copied_type { - public: - typedef typename sprout::container_construct_traits::copied_type type; - }; - } // namespace containers -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_COPIED_TYPE_HPP diff --git a/dsp/lib/sprout/sprout/container/data.hpp b/dsp/lib/sprout/sprout/container/data.hpp deleted file mode 100644 index c8cb785..0000000 --- a/dsp/lib/sprout/sprout/container/data.hpp +++ /dev/null @@ -1,70 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_DATA_HPP -#define SPROUT_CONTAINER_DATA_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // data - // - // effect: - // sprout::container_range_traits::range_data(cont) - // [default] - // ADL callable range_data(cont) -> range_data(cont) - // [default] - // Container is T[N] -> pointer(cont) - // otherwise, Container is not const - // && sprout::is_const_cast_convertible - // && callable sprout::as_const(cont).data() - // -> const_cast(sprout::data(sprout::as_const(cont))) - // cont.data() - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::pointer - data(Container& cont) { - return sprout::container_range_traits::range_data(cont); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::pointer - data(Container const& cont) { - return sprout::container_range_traits::range_data(cont); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::pointer - data(T (& arr)[N]) { - return sprout::container_range_traits::range_data(arr); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::pointer - data(T const (& arr)[N]) { - return sprout::container_range_traits::range_data(arr); - } - - // - // cdata - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::pointer - cdata(Container const& cont) { - return sprout::data(cont); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::pointer - cdata(T const (& arr)[N]) { - return sprout::data(arr); - } -} // namespace sprout - -#include - -#endif // #ifndef SPROUT_CONTAINER_DATA_HPP diff --git a/dsp/lib/sprout/sprout/container/deep_copy.hpp b/dsp/lib/sprout/sprout/container/deep_copy.hpp deleted file mode 100644 index 619c7e7..0000000 --- a/dsp/lib/sprout/sprout/container/deep_copy.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_DEEP_COPY_HPP -#define SPROUT_CONTAINER_DEEP_COPY_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // deep_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::container_construct_traits< - typename std::remove_reference::type - >::copied_type - deep_copy(Container&& cont) { - typedef typename std::remove_reference::type container_type; - return sprout::container_construct_traits::deep_copy(SPROUT_FORWARD(Container, cont)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_DEEP_COPY_HPP diff --git a/dsp/lib/sprout/sprout/container/deep_internal.hpp b/dsp/lib/sprout/sprout/container/deep_internal.hpp deleted file mode 100644 index 10d06d9..0000000 --- a/dsp/lib/sprout/sprout/container/deep_internal.hpp +++ /dev/null @@ -1,50 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_DEEP_INTERNAL_HPP -#define SPROUT_CONTAINER_DEEP_INTERNAL_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace containers { - namespace detail { - template - struct deep_internal_impl; - template - struct deep_internal_impl< - Container, Prev, - typename std::enable_if::value>::type - > - : public sprout::containers::detail::deep_internal_impl< - typename sprout::containers::internal::type, Container - > - {}; - template - struct deep_internal_impl< - Container, Prev, - typename std::enable_if::value>::type - > - : public sprout::identity - {}; - } // namespace detail - // - // deep_internal - // - template - struct deep_internal - : public sprout::containers::detail::deep_internal_impl< - typename sprout::containers::internal::type, Container - > - {}; - } // namespace containers -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_DEEP_INTERNAL_HPP diff --git a/dsp/lib/sprout/sprout/container/detail/array_like.hpp b/dsp/lib/sprout/sprout/container/detail/array_like.hpp deleted file mode 100644 index 1145f87..0000000 --- a/dsp/lib/sprout/sprout/container/detail/array_like.hpp +++ /dev/null @@ -1,59 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_DETAIL_ARRAY_LIKE_HPP -#define SPROUT_CONTAINER_DETAIL_ARRAY_LIKE_HPP - -#include -#include -#include - -namespace sprout { - namespace detail { - template - struct is_array_like - : public sprout::false_type - {}; - template class Array, typename T, std::size_t N> - struct is_array_like > - : public sprout::true_type - {}; - template - struct is_array_like - : public sprout::detail::is_array_like - {}; - template - struct is_array_like - : public sprout::detail::is_array_like - {}; - template - struct is_array_like - : public sprout::detail::is_array_like - {}; - - template - struct array_like_static_size {}; - template class Array, typename T, std::size_t N> - struct array_like_static_size > - : public sprout::integral_constant - {}; - template - struct array_like_static_size - : public sprout::detail::array_like_static_size - {}; - template - struct array_like_static_size - : public sprout::detail::array_like_static_size - {}; - template - struct array_like_static_size - : public sprout::detail::array_like_static_size - {}; - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_DETAIL_ARRAY_LIKE_HPP diff --git a/dsp/lib/sprout/sprout/container/detail/range_at.hpp b/dsp/lib/sprout/sprout/container/detail/range_at.hpp deleted file mode 100644 index 4ff6dd0..0000000 --- a/dsp/lib/sprout/sprout/container/detail/range_at.hpp +++ /dev/null @@ -1,154 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_DETAIL_RANGE_AT_HPP -#define SPROUT_CONTAINER_DETAIL_RANGE_AT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout_adl { - sprout::not_found_via_adl range_at(...); -} // namespace sprout_adl - -namespace sprout { - namespace detail { - template - struct has_mem_at_test { - public: - template< - typename U = T, - typename = typename sprout::identity().at(std::declval::size_type>()))>::type - > - static sprout::true_type test(int); - static sprout::false_type test(...); - }; -#if defined(_MSC_VER) && (_MSC_VER > 1900) - template::test(0))>::type> - struct has_mem_at - : public Base_ - {}; -#else - template - struct has_mem_at - : public sprout::identity::test(0))>::type - {}; -#endif - - template - struct is_substitutable_const_at - : public sprout::bool_constant< - sprout::is_const_reference_cast_convertible< - typename sprout::container_traits::reference, - typename sprout::container_traits::reference - >::value - && ( - sprout::detail::has_mem_at::value - || sprout::detail::has_mem_subscript::value - || sprout::detail::has_mem_begin::value - || sprout::detail::has_adl_begin_without_sprout::value - ) - > - {}; - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::detail::is_substitutable_const_at::value, - typename sprout::container_traits::reference - >::type - range_at_impl(Container& cont, typename sprout::container_traits::size_type i) { - typedef typename sprout::container_traits::reference type; - return sprout::const_reference_cast(sprout::at(sprout::as_const(cont), i)); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::is_substitutable_const_at::value - && sprout::detail::has_mem_at::value - , - typename sprout::container_traits::reference - >::type - range_at_impl(Container& cont, typename sprout::container_traits::size_type i) { - return cont.at(i); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::is_substitutable_const_at::value - && !sprout::detail::has_mem_at::value - && sprout::detail::has_mem_subscript::value - , - typename sprout::container_traits::reference - >::type - range_at_impl(Container& cont, typename sprout::container_traits::size_type i) { - return cont[sprout::range_index_check(cont, i)]; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::is_substitutable_const_at::value - && !sprout::detail::has_mem_at::value - && !sprout::detail::has_mem_subscript::value - , - typename sprout::container_traits::reference - >::type - range_at_impl(Container& cont, typename sprout::container_traits::size_type i) { - return *sprout::next(sprout::begin(cont), sprout::range_index_check(cont, i)); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::detail::has_mem_at::value, - typename sprout::container_traits::reference - >::type - range_at_impl(Container const& cont, typename sprout::container_traits::size_type i) { - return cont.at(i); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::has_mem_at::value - && sprout::detail::has_mem_subscript::value - , - typename sprout::container_traits::reference - >::type - range_at_impl(Container const& cont, typename sprout::container_traits::size_type i) { - return cont[sprout::range_index_check(cont, i)]; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::has_mem_at::value - && !sprout::detail::has_mem_subscript::value - , - typename sprout::container_traits::reference - >::type - range_at_impl(Container const& cont, typename sprout::container_traits::size_type i) { - return *sprout::next(sprout::begin(cont), sprout::range_index_check(cont, i)); - } - } // namespace detail -} // namespace sprout - -namespace sprout_container_range_detail { - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::reference - range_at(Container& cont, typename sprout::container_traits::size_type i) { - return sprout::detail::range_at_impl(cont, i); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::reference - range_at(Container const& cont, typename sprout::container_traits::size_type i) { - return sprout::detail::range_at_impl(cont, i); - } -} // namespace sprout_container_range_detail - -#endif // #ifndef SPROUT_CONTAINER_DETAIL_RANGE_AT_HPP diff --git a/dsp/lib/sprout/sprout/container/detail/range_back.hpp b/dsp/lib/sprout/sprout/container/detail/range_back.hpp deleted file mode 100644 index ba1af66..0000000 --- a/dsp/lib/sprout/sprout/container/detail/range_back.hpp +++ /dev/null @@ -1,128 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_DETAIL_RANGE_BACK_HPP -#define SPROUT_CONTAINER_DETAIL_RANGE_BACK_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout_adl { - sprout::not_found_via_adl range_back(...); -} // namespace sprout_adl - -namespace sprout { - namespace detail { - template - struct has_mem_back_test { - public: - template< - typename U = T, - typename = typename sprout::identity().back())>::type - > - static sprout::true_type test(int); - static sprout::false_type test(...); - }; -#if defined(_MSC_VER) && (_MSC_VER > 1900) - template::test(0))>::type> - struct has_mem_back - : public Base_ - {}; -#else - template - struct has_mem_back - : public sprout::identity::test(0))>::type - {}; -#endif - - template - struct is_substitutable_const_back - : public sprout::bool_constant< - sprout::is_const_reference_cast_convertible< - typename sprout::container_traits::reference, - typename sprout::container_traits::reference - >::value - && ( - sprout::detail::has_mem_back::value - || sprout::detail::has_mem_begin::value - || sprout::detail::has_adl_begin_without_sprout::value - ) - > - {}; - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::detail::is_substitutable_const_back::value, - typename sprout::container_traits::reference - >::type - range_back_impl(Container& cont) { - typedef typename sprout::container_traits::reference type; - return sprout::const_reference_cast(sprout::back(sprout::as_const(cont))); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::is_substitutable_const_back::value - && sprout::detail::has_mem_back::value - , - typename sprout::container_traits::reference - >::type - range_back_impl(Container& cont) { - return cont.back(); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::is_substitutable_const_back::value - && !sprout::detail::has_mem_back::value - , - typename sprout::container_traits::reference - >::type - range_back_impl(Container& cont) { - return *sprout::begin(cont); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::detail::has_mem_back::value, - typename sprout::container_traits::reference - >::type - range_back_impl(Container const& cont) { - return cont.back(); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::has_mem_back::value, - typename sprout::container_traits::reference - >::type - range_back_impl(Container const& cont) { - return *sprout::next(sprout::begin(cont), sprout::size(cont) - 1); - } - } // namespace detail -} // namespace sprout - -namespace sprout_container_range_detail { - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::reference - range_back(Container& cont) { - return sprout::detail::range_back_impl(cont); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::reference - range_back(Container const& cont) { - return sprout::detail::range_back_impl(cont); - } -} // namespace sprout_container_range_detail - -#endif // #ifndef SPROUT_CONTAINER_DETAIL_RANGE_BACK_HPP diff --git a/dsp/lib/sprout/sprout/container/detail/range_begin.hpp b/dsp/lib/sprout/sprout/container/detail/range_begin.hpp deleted file mode 100644 index 2e886d0..0000000 --- a/dsp/lib/sprout/sprout/container/detail/range_begin.hpp +++ /dev/null @@ -1,199 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_DETAIL_RANGE_BEGIN_HPP -#define SPROUT_CONTAINER_DETAIL_RANGE_BEGIN_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout_adl { - sprout::not_found_via_adl begin(...); - sprout::not_found_via_adl range_begin(...); -} // namespace sprout_adl - -namespace sprout_container_range_detail { - using sprout_adl::begin; - - template - struct has_adl_begin_test { - public: - template< - typename U = T, - typename R = typename sprout::identity()))>::type - > - static sprout::is_found_via_adl test(int); - static sprout::false_type test(...); - }; - - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::iterator - range_adl_begin(Container& cont) { - return begin(cont); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::iterator - range_adl_begin(Container const& cont) { - return begin(cont); - } -} // namespace sprout_container_range_detail - -namespace sprout { - namespace detail { -#if defined(_MSC_VER) && (_MSC_VER > 1900) - template::test(0))>::type> - struct has_adl_begin - : public Base_ - {}; -#else - template - struct has_adl_begin - : public sprout::identity::test(0))>::type - {}; -#endif - template::value> - struct has_adl_begin_without_sprout - : public sprout::false_type - {}; - template - struct has_adl_begin_without_sprout - : public sprout::detail::has_adl_begin - {}; - - template - struct has_mem_begin_test { - public: - template< - typename U = T, - typename = typename sprout::identity().begin())>::type - > - static sprout::true_type test(int); - static sprout::false_type test(...); - }; -#if defined(_MSC_VER) && (_MSC_VER > 1900) - template::test(0))>::type> - struct has_mem_begin - : public Base_ - {}; -#else - template - struct has_mem_begin - : public sprout::identity::test(0))>::type - {}; -#endif - - template - struct is_substitutable_const_begin - : public sprout::bool_constant< - sprout::is_const_iterator_cast_convertible< - typename sprout::container_traits::iterator, - typename sprout::container_traits::iterator - >::value - && ( - sprout::detail::has_mem_begin::value - || sprout::detail::has_adl_begin_without_sprout::value - ) - > - {}; - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::detail::is_substitutable_const_begin::value, - typename sprout::container_traits::iterator - >::type - range_begin_impl(Container& cont) { - typedef typename sprout::container_traits::iterator type; - return sprout::const_iterator_cast(sprout::begin(sprout::as_const(cont))); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::is_substitutable_const_begin::value - && sprout::detail::has_mem_begin::value - , - typename sprout::container_traits::iterator - >::type - range_begin_impl(Container& cont) { - return cont.begin(); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::is_substitutable_const_begin::value - && !sprout::detail::has_mem_begin::value - && sprout::detail::has_adl_begin_without_sprout::value - , - typename sprout::container_traits::iterator - >::type - range_begin_impl(Container& cont) { - return sprout_container_range_detail::range_adl_begin(cont); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::is_substitutable_const_begin::value - && !sprout::detail::has_mem_begin::value - && !sprout::detail::has_adl_begin_without_sprout::value - , - typename sprout::container_traits::iterator - >::type - range_begin_impl(Container& cont) { - return std::begin(cont); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::detail::has_mem_begin::value, - typename sprout::container_traits::iterator - >::type - range_begin_impl(Container const& cont) { - return cont.begin(); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::has_mem_begin::value - && sprout::detail::has_adl_begin_without_sprout::value - , - typename sprout::container_traits::iterator - >::type - range_begin_impl(Container const& cont) { - return sprout_container_range_detail::range_adl_begin(cont); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::has_mem_begin::value - && !sprout::detail::has_adl_begin_without_sprout::value - , - typename sprout::container_traits::iterator - >::type - range_begin_impl(Container const& cont) { - return std::begin(cont); - } - } // namespace detail -} // namespace sprout - -namespace sprout_container_range_detail { - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::iterator - range_begin(Container& cont) { - return sprout::detail::range_begin_impl(cont); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::iterator - range_begin(Container const& cont) { - return sprout::detail::range_begin_impl(cont); - } -} // namespace sprout_container_range_detail - -#endif // #ifndef SPROUT_CONTAINER_DETAIL_RANGE_BEGIN_HPP diff --git a/dsp/lib/sprout/sprout/container/detail/range_data.hpp b/dsp/lib/sprout/sprout/container/detail/range_data.hpp deleted file mode 100644 index 6850892..0000000 --- a/dsp/lib/sprout/sprout/container/detail/range_data.hpp +++ /dev/null @@ -1,99 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_DETAIL_RANGE_DATA_HPP -#define SPROUT_CONTAINER_DETAIL_RANGE_DATA_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout_adl { - sprout::not_found_via_adl range_data(...); -} // namespace sprout_adl - -namespace sprout { - namespace detail { - template - struct has_mem_data_test { - public: - template< - typename U = T, - typename = typename sprout::identity().data())>::type - > - static sprout::true_type test(int); - static sprout::false_type test(...); - }; -#if defined(_MSC_VER) && (_MSC_VER > 1900) - template::test(0))>::type> - struct has_mem_data - : public Base_ - {}; -#else - template - struct has_mem_data - : public sprout::identity::test(0))>::type - {}; -#endif - - template - struct is_substitutable_const_data - : public sprout::bool_constant< - sprout::is_const_cast_convertible< - typename sprout::container_traits::pointer, - typename sprout::container_traits::pointer - >::value - && sprout::detail::has_mem_data::value - > - {}; - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::detail::is_substitutable_const_data::value, - typename sprout::container_traits::pointer - >::type - range_data_impl(Container& cont) { - typedef typename sprout::container_traits::pointer type; - return const_cast(sprout::data(sprout::as_const(cont))); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::is_substitutable_const_data::value, - typename sprout::container_traits::pointer - >::type - range_data_impl(Container& cont) { - return cont.data(); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::pointer - range_data_impl(Container const& cont) { - return cont.data(); - } - } // namespace detail -} // namespace sprout - -namespace sprout_container_range_detail { - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::pointer - range_data(Container& cont) { - return sprout::detail::range_data_impl(cont); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::pointer - range_data(Container const& cont) { - return sprout::detail::range_data_impl(cont); - } -} // namespace sprout_container_range_detail - -#endif // #ifndef SPROUT_CONTAINER_DETAIL_RANGE_DATA_HPP diff --git a/dsp/lib/sprout/sprout/container/detail/range_empty.hpp b/dsp/lib/sprout/sprout/container/detail/range_empty.hpp deleted file mode 100644 index 00407fa..0000000 --- a/dsp/lib/sprout/sprout/container/detail/range_empty.hpp +++ /dev/null @@ -1,76 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_DETAIL_RANGE_EMPTY_HPP -#define SPROUT_CONTAINER_DETAIL_RANGE_EMPTY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout_adl { - sprout::not_found_via_adl range_empty(...); -} // namespace sprout_adl - -namespace sprout { - namespace detail { - template - struct has_mem_empty_test { - public: - template< - typename U = T, - typename = typename sprout::identity().empty())>::type - > - static sprout::true_type test(int); - static sprout::false_type test(...); - }; -#if defined(_MSC_VER) && (_MSC_VER > 1900) - template::test(0))>::type> - struct has_mem_empty - : public Base_ - {}; -#else - template - struct has_mem_empty - : public sprout::identity::test(0))>::type - {}; -#endif - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::detail::has_mem_empty::value, - bool - >::type - range_empty_impl(Container const& cont) { - return cont.empty(); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::has_mem_empty::value, - bool - >::type - range_empty_impl(Container const& cont) { - return sprout::size(cont) == 0; - } - } // namespace detail -} // namespace sprout - -namespace sprout_container_range_detail { - template - inline SPROUT_CONSTEXPR bool - range_empty(Container const& cont) { - return sprout::detail::range_empty_impl(cont); - } -} // namespace sprout_container_range_detail - -#endif // #ifndef SPROUT_CONTAINER_DETAIL_RANGE_EMPTY_HPP diff --git a/dsp/lib/sprout/sprout/container/detail/range_end.hpp b/dsp/lib/sprout/sprout/container/detail/range_end.hpp deleted file mode 100644 index e959166..0000000 --- a/dsp/lib/sprout/sprout/container/detail/range_end.hpp +++ /dev/null @@ -1,199 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_DETAIL_RANGE_END_HPP -#define SPROUT_CONTAINER_DETAIL_RANGE_END_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout_adl { - sprout::not_found_via_adl end(...); - sprout::not_found_via_adl range_end(...); -} // namespace sprout_adl - -namespace sprout_container_range_detail { - using sprout_adl::end; - - template - struct has_adl_end_test { - public: - template< - typename U = T, - typename R = typename sprout::identity()))>::type - > - static sprout::is_found_via_adl test(int); - static sprout::false_type test(...); - }; - - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::iterator - range_adl_end(Container& cont) { - return end(cont); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::iterator - range_adl_end(Container const& cont) { - return end(cont); - } -} // namespace sprout_container_range_detail - -namespace sprout { - namespace detail { -#if defined(_MSC_VER) && (_MSC_VER > 1900) - template::test(0))>::type> - struct has_adl_end - : public Base_ - {}; -#else - template - struct has_adl_end - : public sprout::identity::test(0))>::type - {}; -#endif - template::value> - struct has_adl_end_without_sprout - : public sprout::false_type - {}; - template - struct has_adl_end_without_sprout - : public sprout::detail::has_adl_end - {}; - - template - struct has_mem_end_test { - public: - template< - typename U = T, - typename = typename sprout::identity().end())>::type - > - static sprout::true_type test(int); - static sprout::false_type test(...); - }; -#if defined(_MSC_VER) && (_MSC_VER > 1900) - template::test(0))>::type> - struct has_mem_end - : public Base_ - {}; -#else - template - struct has_mem_end - : public sprout::identity::test(0))>::type - {}; -#endif - - template - struct is_substitutable_const_end - : public sprout::bool_constant< - sprout::is_const_iterator_cast_convertible< - typename sprout::container_traits::iterator, - typename sprout::container_traits::iterator - >::value - && ( - sprout::detail::has_mem_end::value - || sprout::detail::has_adl_end_without_sprout::value - ) - > - {}; - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::detail::is_substitutable_const_end::value, - typename sprout::container_traits::iterator - >::type - range_end_impl(Container& cont) { - typedef typename sprout::container_traits::iterator type; - return sprout::const_iterator_cast(sprout::end(sprout::as_const(cont))); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::is_substitutable_const_end::value - && sprout::detail::has_mem_end::value - , - typename sprout::container_traits::iterator - >::type - range_end_impl(Container& cont) { - return cont.end(); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::is_substitutable_const_end::value - && !sprout::detail::has_mem_end::value - && sprout::detail::has_adl_end_without_sprout::value - , - typename sprout::container_traits::iterator - >::type - range_end_impl(Container& cont) { - return sprout_container_range_detail::range_adl_end(cont); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::is_substitutable_const_end::value - && !sprout::detail::has_mem_end::value - && !sprout::detail::has_adl_end_without_sprout::value - , - typename sprout::container_traits::iterator - >::type - range_end_impl(Container& cont) { - return std::end(cont); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::detail::has_mem_end::value, - typename sprout::container_traits::iterator - >::type - range_end_impl(Container const& cont) { - return cont.end(); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::has_mem_end::value - && sprout::detail::has_adl_end_without_sprout::value - , - typename sprout::container_traits::iterator - >::type - range_end_impl(Container const& cont) { - return sprout_container_range_detail::range_adl_end(cont); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::has_mem_end::value - && !sprout::detail::has_adl_end_without_sprout::value - , - typename sprout::container_traits::iterator - >::type - range_end_impl(Container const& cont) { - return std::end(cont); - } - } // namespace detail -} // namespace sprout - -namespace sprout_container_range_detail { - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::iterator - range_end(Container& cont) { - return sprout::detail::range_end_impl(cont); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::iterator - range_end(Container const& cont) { - return sprout::detail::range_end_impl(cont); - } -} // namespace sprout_container_range_detail - -#endif // #ifndef SPROUT_CONTAINER_DETAIL_RANGE_END_HPP diff --git a/dsp/lib/sprout/sprout/container/detail/range_front.hpp b/dsp/lib/sprout/sprout/container/detail/range_front.hpp deleted file mode 100644 index 8959f2a..0000000 --- a/dsp/lib/sprout/sprout/container/detail/range_front.hpp +++ /dev/null @@ -1,128 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_DETAIL_RANGE_FRONT_HPP -#define SPROUT_CONTAINER_DETAIL_RANGE_FRONT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout_adl { - sprout::not_found_via_adl range_front(...); -} // namespace sprout_adl - -namespace sprout { - namespace detail { - template - struct has_mem_front_test { - public: - template< - typename U = T, - typename = typename sprout::identity().front())>::type - > - static sprout::true_type test(int); - static sprout::false_type test(...); - }; -#if defined(_MSC_VER) && (_MSC_VER > 1900) - template::test(0))>::type> - struct has_mem_front - : public Base_ - {}; -#else - template - struct has_mem_front - : public sprout::identity::test(0))>::type - {}; -#endif - - template - struct is_substitutable_const_front - : public sprout::bool_constant< - sprout::is_const_reference_cast_convertible< - typename sprout::container_traits::reference, - typename sprout::container_traits::reference - >::value - && ( - sprout::detail::has_mem_front::value - || sprout::detail::has_mem_begin::value - || sprout::detail::has_adl_begin_without_sprout::value - ) - > - {}; - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::detail::is_substitutable_const_front::value, - typename sprout::container_traits::reference - >::type - range_front_impl(Container& cont) { - typedef typename sprout::container_traits::reference type; - return sprout::const_reference_cast(sprout::front(sprout::as_const(cont))); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::is_substitutable_const_front::value - && sprout::detail::has_mem_front::value - , - typename sprout::container_traits::reference - >::type - range_front_impl(Container& cont) { - return cont.front(); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::is_substitutable_const_front::value - && !sprout::detail::has_mem_front::value - , - typename sprout::container_traits::reference - >::type - range_front_impl(Container& cont) { - return *sprout::begin(cont); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::detail::has_mem_front::value, - typename sprout::container_traits::reference - >::type - range_front_impl(Container const& cont) { - return cont.front(); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::has_mem_front::value, - typename sprout::container_traits::reference - >::type - range_front_impl(Container const& cont) { - return *sprout::begin(cont); - } - } // namespace detail -} // namespace sprout - -namespace sprout_container_range_detail { - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::reference - range_front(Container& cont) { - return sprout::detail::range_front_impl(cont); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::reference - range_front(Container const& cont) { - return sprout::detail::range_front_impl(cont); - } -} // namespace sprout_container_range_detail - -#endif // #ifndef SPROUT_CONTAINER_DETAIL_RANGE_FRONT_HPP diff --git a/dsp/lib/sprout/sprout/container/detail/range_index_of.hpp b/dsp/lib/sprout/sprout/container/detail/range_index_of.hpp deleted file mode 100644 index cc92302..0000000 --- a/dsp/lib/sprout/sprout/container/detail/range_index_of.hpp +++ /dev/null @@ -1,129 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_DETAIL_RANGE_INDEX_OF_HPP -#define SPROUT_CONTAINER_DETAIL_RANGE_INDEX_OF_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout_adl { - sprout::not_found_via_adl range_index_of(...); -} // namespace sprout_adl - -namespace sprout { - namespace detail { - template - struct has_mem_index_of_test { - public: - template< - typename U = T, - typename = typename sprout::identity().index_of(std::declval::iterator>()))>::type - > - static sprout::true_type test(int); - static sprout::false_type test(...); - }; -#if defined(_MSC_VER) && (_MSC_VER > 1900) - template::test(0))>::type> - struct has_mem_index_of - : public Base_ - {}; -#else - template - struct has_mem_index_of - : public sprout::identity::test(0))>::type - {}; -#endif - - template - struct is_substitutable_const_index_of - : public sprout::bool_constant< - sprout::is_const_iterator_cast_convertible< - typename sprout::container_traits::iterator, - typename sprout::container_traits::iterator - >::value - && ( - sprout::detail::has_mem_index_of::value - || sprout::detail::has_mem_begin::value - || sprout::detail::has_adl_begin_without_sprout::value - ) - > - {}; - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::detail::is_substitutable_const_index_of::value, - typename sprout::container_traits::size_type - >::type - range_index_of_impl(Container& cont, typename sprout::container_traits::iterator p) { - typedef typename sprout::container_traits::iterator type; - return sprout::index_of(sprout::as_const(cont), sprout::const_iterator_cast(p)); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::is_substitutable_const_index_of::value - && sprout::detail::has_mem_index_of::value - , - typename sprout::container_traits::size_type - >::type - range_index_of_impl(Container& cont, typename sprout::container_traits::iterator p) { - return cont.index_of(p); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::is_substitutable_const_index_of::value - && !sprout::detail::has_mem_index_of::value - , - typename sprout::container_traits::size_type - >::type - range_index_of_impl(Container& cont, typename sprout::container_traits::iterator p) { - return sprout::distance(sprout::begin(cont), p); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::detail::has_mem_index_of::value, - typename sprout::container_traits::size_type - >::type - range_index_of_impl(Container const& cont, typename sprout::container_traits::iterator p) { - return cont.index_of(p); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::has_mem_index_of::value, - typename sprout::container_traits::size_type - >::type - range_index_of_impl(Container const& cont, typename sprout::container_traits::iterator p) { - return sprout::distance(sprout::begin(cont), p); - } - } // namespace detail -} // namespace sprout - -namespace sprout_container_range_detail { - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::size_type - range_index_of(Container& cont, typename sprout::container_traits::iterator p) { - return sprout::detail::range_index_of_impl(cont, p); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::size_type - range_index_of(Container const& cont, typename sprout::container_traits::iterator p) { - return sprout::detail::range_index_of_impl(cont, p); - } -} // namespace sprout_container_range_detail - -#endif // #ifndef SPROUT_CONTAINER_DETAIL_RANGE_INDEX_OF_HPP diff --git a/dsp/lib/sprout/sprout/container/detail/range_nth.hpp b/dsp/lib/sprout/sprout/container/detail/range_nth.hpp deleted file mode 100644 index f4766b0..0000000 --- a/dsp/lib/sprout/sprout/container/detail/range_nth.hpp +++ /dev/null @@ -1,129 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_DETAIL_RANGE_NTH_HPP -#define SPROUT_CONTAINER_DETAIL_RANGE_NTH_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout_adl { - sprout::not_found_via_adl range_nth(...); -} // namespace sprout_adl - -namespace sprout { - namespace detail { - template - struct has_mem_nth_test { - public: - template< - typename U = T, - typename = typename sprout::identity().nth(std::declval::size_type>()))>::type - > - static sprout::true_type test(int); - static sprout::false_type test(...); - }; -#if defined(_MSC_VER) && (_MSC_VER > 1900) - template::test(0))>::type> - struct has_mem_nth - : public Base_ - {}; -#else - template - struct has_mem_nth - : public sprout::identity::test(0))>::type - {}; -#endif - - template - struct is_substitutable_const_nth - : public sprout::bool_constant< - sprout::is_const_iterator_cast_convertible< - typename sprout::container_traits::iterator, - typename sprout::container_traits::iterator - >::value - && ( - sprout::detail::has_mem_nth::value - || sprout::detail::has_mem_begin::value - || sprout::detail::has_adl_begin_without_sprout::value - ) - > - {}; - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::detail::is_substitutable_const_nth::value, - typename sprout::container_traits::iterator - >::type - range_nth_impl(Container& cont, typename sprout::container_traits::size_type i) { - typedef typename sprout::container_traits::iterator type; - return sprout::const_iterator_cast(sprout::nth(sprout::as_const(cont), i)); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::is_substitutable_const_nth::value - && sprout::detail::has_mem_nth::value - , - typename sprout::container_traits::iterator - >::type - range_nth_impl(Container& cont, typename sprout::container_traits::size_type i) { - return cont.nth(i); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::is_substitutable_const_nth::value - && !sprout::detail::has_mem_nth::value - , - typename sprout::container_traits::iterator - >::type - range_nth_impl(Container& cont, typename sprout::container_traits::size_type i) { - return sprout::next(sprout::begin(cont), i); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::detail::has_mem_nth::value, - typename sprout::container_traits::iterator - >::type - range_nth_impl(Container const& cont, typename sprout::container_traits::size_type i) { - return cont.nth(i); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::has_mem_nth::value, - typename sprout::container_traits::iterator - >::type - range_nth_impl(Container const& cont, typename sprout::container_traits::size_type i) { - return sprout::next(sprout::begin(cont), i); - } - } // namespace detail -} // namespace sprout - -namespace sprout_container_range_detail { - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::iterator - range_nth(Container& cont, typename sprout::container_traits::size_type i) { - return sprout::detail::range_nth_impl(cont, i); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::iterator - range_nth(Container const& cont, typename sprout::container_traits::size_type i) { - return sprout::detail::range_nth_impl(cont, i); - } -} // namespace sprout_container_range_detail - -#endif // #ifndef SPROUT_CONTAINER_DETAIL_RANGE_NTH_HPP diff --git a/dsp/lib/sprout/sprout/container/detail/range_size.hpp b/dsp/lib/sprout/sprout/container/detail/range_size.hpp deleted file mode 100644 index 6e022f3..0000000 --- a/dsp/lib/sprout/sprout/container/detail/range_size.hpp +++ /dev/null @@ -1,77 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_DETAIL_RANGE_SIZE_HPP -#define SPROUT_CONTAINER_DETAIL_RANGE_SIZE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout_adl { - sprout::not_found_via_adl range_size(...); -} // namespace sprout_adl - -namespace sprout { - namespace detail { - template - struct has_mem_size_test { - public: - template< - typename U = T, - typename = typename sprout::identity().size())>::type - > - static sprout::true_type test(int); - static sprout::false_type test(...); - }; -#if defined(_MSC_VER) && (_MSC_VER > 1900) - template::test(0))>::type> - struct has_mem_size - : public Base_ - {}; -#else - template - struct has_mem_size - : public sprout::identity::test(0))>::type - {}; -#endif - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::detail::has_mem_size::value, - typename sprout::container_traits::size_type - >::type - range_size_impl(Container const& cont) { - return cont.size(); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::has_mem_size::value, - typename sprout::container_traits::size_type - >::type - range_size_impl(Container const& cont) { - return sprout::distance(sprout::begin(cont), sprout::end(cont)); - } - } // namespace detail -} // namespace sprout - -namespace sprout_container_range_detail { - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::size_type - range_size(Container const& cont) { - return sprout::detail::range_size_impl(cont); - } -} // namespace sprout_container_range_detail - -#endif // #ifndef SPROUT_CONTAINER_DETAIL_RANGE_SIZE_HPP diff --git a/dsp/lib/sprout/sprout/container/detail/range_subscript_at.hpp b/dsp/lib/sprout/sprout/container/detail/range_subscript_at.hpp deleted file mode 100644 index 37f70a0..0000000 --- a/dsp/lib/sprout/sprout/container/detail/range_subscript_at.hpp +++ /dev/null @@ -1,128 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_DETAIL_RANGE_SUBSCRIPT_AT_HPP -#define SPROUT_CONTAINER_DETAIL_RANGE_SUBSCRIPT_AT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout_adl { - sprout::not_found_via_adl range_subscript_at(...); -} // namespace sprout_adl - -namespace sprout { - namespace detail { - template - struct has_mem_subscript_test { - public: - template< - typename U = T, - typename = typename sprout::identity()[std::declval::size_type>()])>::type - > - static sprout::true_type test(int); - static sprout::false_type test(...); - }; -#if defined(_MSC_VER) && (_MSC_VER > 1900) - template::test(0))>::type> - struct has_mem_subscript - : public Base_ - {}; -#else - template - struct has_mem_subscript - : public sprout::identity::test(0))>::type - {}; -#endif - - template - struct is_substitutable_const_subscript_at - : public sprout::bool_constant< - sprout::is_const_reference_cast_convertible< - typename sprout::container_traits::reference, - typename sprout::container_traits::reference - >::value - && ( - sprout::detail::has_mem_subscript::value - || sprout::detail::has_mem_begin::value - || sprout::detail::has_adl_begin_without_sprout::value - ) - > - {}; - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::detail::is_substitutable_const_subscript_at::value, - typename sprout::container_traits::reference - >::type - range_subscript_at_impl(Container& cont, typename sprout::container_traits::size_type i) { - typedef typename sprout::container_traits::reference type; - return sprout::const_reference_cast(sprout::subscript_at(sprout::as_const(cont), i)); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::is_substitutable_const_subscript_at::value - && sprout::detail::has_mem_subscript::value - , - typename sprout::container_traits::reference - >::type - range_subscript_at_impl(Container& cont, typename sprout::container_traits::size_type i) { - return cont[i]; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::is_substitutable_const_subscript_at::value - && !sprout::detail::has_mem_subscript::value - , - typename sprout::container_traits::reference - >::type - range_subscript_at_impl(Container& cont, typename sprout::container_traits::size_type i) { - return *sprout::next(sprout::begin(cont), i); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::detail::has_mem_subscript::value, - typename sprout::container_traits::reference - >::type - range_subscript_at_impl(Container const& cont, typename sprout::container_traits::size_type i) { - return cont[i]; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::has_mem_subscript::value, - typename sprout::container_traits::reference - >::type - range_subscript_at_impl(Container const& cont, typename sprout::container_traits::size_type i) { - return *sprout::next(sprout::begin(cont), i); - } - } // namespace detail -} // namespace sprout - -namespace sprout_container_range_detail { - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::reference - range_subscript_at(Container& cont, typename sprout::container_traits::size_type i) { - return sprout::detail::range_subscript_at_impl(cont, i); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::reference - range_subscript_at(Container const& cont, typename sprout::container_traits::size_type i) { - return sprout::detail::range_subscript_at_impl(cont, i); - } -} // namespace sprout_container_range_detail - -#endif // #ifndef SPROUT_CONTAINER_DETAIL_RANGE_SUBSCRIPT_AT_HPP diff --git a/dsp/lib/sprout/sprout/container/difference_type.hpp b/dsp/lib/sprout/sprout/container/difference_type.hpp deleted file mode 100644 index 91959f5..0000000 --- a/dsp/lib/sprout/sprout/container/difference_type.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_DIFFERENCE_TYPE_HPP -#define SPROUT_CONTAINER_DIFFERENCE_TYPE_HPP - -#include -#include - -namespace sprout { - namespace containers { - // - // difference_type - // - template - struct difference_type { - public: - typedef typename sprout::container_traits::difference_type type; - }; - } // namespace containers -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_DIFFERENCE_TYPE_HPP diff --git a/dsp/lib/sprout/sprout/container/empty.hpp b/dsp/lib/sprout/sprout/container/empty.hpp deleted file mode 100644 index b68cb56..0000000 --- a/dsp/lib/sprout/sprout/container/empty.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_EMPTY_HPP -#define SPROUT_CONTAINER_EMPTY_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // empty - // - // effect: - // sprout::container_range_traits::range_empty(cont) - // [default] - // ADL callable range_empty(cont) -> range_empty(cont) - // [default] - // Container is T[N] -> false - // otherwise, callable cont.empty() -> cont.empty() - // otherwise -> sprout::size(cont) == 0 - // - template - inline SPROUT_CONSTEXPR bool - empty(Container const& cont) { - return sprout::container_range_traits::range_empty(cont); - } - template - inline SPROUT_CONSTEXPR bool - empty(T const (& arr)[N]) { - return sprout::container_range_traits::range_empty(arr); - } -} // namespace sprout - -#include - -#endif // #ifndef SPROUT_CONTAINER_EMPTY_HPP diff --git a/dsp/lib/sprout/sprout/container/end.hpp b/dsp/lib/sprout/sprout/container/end.hpp deleted file mode 100644 index 6ce97f6..0000000 --- a/dsp/lib/sprout/sprout/container/end.hpp +++ /dev/null @@ -1,74 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_END_HPP -#define SPROUT_CONTAINER_END_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // end - // - // effect: - // sprout::container_range_traits::range_end(cont) - // [default] - // ADL callable range_end(cont) -> range_end(cont) - // [default] - // Container is T[N] -> iterator(cont) - // otherwise, Container is not const - // && sprout::is_const_iterator_cast_convertible - // && (callable sprout::as_const(cont).end() - // || ADL(without sprout) callable end(sprout::as_const(cont)) - // ) - // -> sprout::const_iterator_cast(sprout::end(sprout::as_const(cont))) - // otherwise, callable cont.end() -> cont.end() - // otherwise, ADL(without sprout) callable end(cont) -> end(cont) - // otherwise -> std::end(cont) - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::iterator - end(Container& cont) { - return sprout::container_range_traits::range_end(cont); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::iterator - end(Container const& cont) { - return sprout::container_range_traits::range_end(cont); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::iterator - end(T (& arr)[N]) { - return sprout::container_range_traits::range_end(arr); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::iterator - end(T const (& arr)[N]) { - return sprout::container_range_traits::range_end(arr); - } - - // - // cend - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::iterator - cend(Container const& cont) { - return sprout::end(cont); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::iterator - cend(T const (& arr)[N]) { - return sprout::end(arr); - } -} // namespace sprout - -#include - -#endif // #ifndef SPROUT_CONTAINER_END_HPP diff --git a/dsp/lib/sprout/sprout/container/fit_size.hpp b/dsp/lib/sprout/sprout/container/fit_size.hpp deleted file mode 100644 index 87a174f..0000000 --- a/dsp/lib/sprout/sprout/container/fit_size.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FIXED_CONTAINER_FIT_SIZE_HPP -#define SPROUT_FIXED_CONTAINER_FIT_SIZE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // fit_size - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::type>::difference_type - fit_size(Container&& cont, typename sprout::container_traits::type>::difference_type size) { - typedef typename std::remove_reference::type container_type; - return sprout::container_fitness_traits::fit_size(SPROUT_FORWARD(Container, cont), size); - } -} // namespace sprout - -#endif // #ifndef SPROUT_FIXED_CONTAINER_FIT_SIZE_HPP diff --git a/dsp/lib/sprout/sprout/container/fitness_functions.hpp b/dsp/lib/sprout/sprout/container/fitness_functions.hpp deleted file mode 100644 index 621990b..0000000 --- a/dsp/lib/sprout/sprout/container/fitness_functions.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_FITNESS_FUNCTIONS_HPP -#define SPROUT_CONTAINER_FITNESS_FUNCTIONS_HPP - -#include -#include - -#endif // #ifndef SPROUT_CONTAINER_FITNESS_FUNCTIONS_HPP diff --git a/dsp/lib/sprout/sprout/container/fixed_size.hpp b/dsp/lib/sprout/sprout/container/fixed_size.hpp deleted file mode 100644 index be17494..0000000 --- a/dsp/lib/sprout/sprout/container/fixed_size.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_FIXED_SIZE_HPP -#define SPROUT_CONTAINER_FIXED_SIZE_HPP - -#include -#include - -namespace sprout { - // - // fixed_size - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::size_type - fixed_size() { - return sprout::container_traits::fixed_size(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_FIXED_SIZE_HPP diff --git a/dsp/lib/sprout/sprout/container/front.hpp b/dsp/lib/sprout/sprout/container/front.hpp deleted file mode 100644 index 907a0bd..0000000 --- a/dsp/lib/sprout/sprout/container/front.hpp +++ /dev/null @@ -1,74 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_FRONT_HPP -#define SPROUT_CONTAINER_FRONT_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // front - // - // effect: - // sprout::container_range_traits::range_front(cont) - // [default] - // ADL callable range_front(cont) -> range_front(cont) - // [default] - // Container is T[N] -> cont[0] - // otherwise, Container is not const - // && sprout::is_const_reference_cast_convertible - // && (callable sprout::as_const(cont).front() - // || callable sprout::as_const(cont).begin() - // || ADL(without sprout) callable begin(sprout::as_const(cont)) - // ) - // -> sprout::const_reference_cast(sprout::front(sprout::as_const(cont))) - // otherwise, callable cont.front() -> cont.front() - // otherwise -> *sprout::begin(cont) - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::reference - front(Container& cont) { - return sprout::container_range_traits::range_front(cont); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::reference - front(Container const& cont) { - return sprout::container_range_traits::range_front(cont); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::reference - front(T (& arr)[N]) { - return sprout::container_range_traits::range_front(arr); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::reference - front(T const (& arr)[N]) { - return sprout::container_range_traits::range_front(arr); - } - - // - // cfront - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::reference - cfront(Container const& cont) { - return sprout::front(cont); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::reference - cfront(T const (& arr)[N]) { - return sprout::front(arr); - } -} // namespace sprout - -#include - -#endif // #ifndef SPROUT_CONTAINER_FRONT_HPP diff --git a/dsp/lib/sprout/sprout/container/functions.hpp b/dsp/lib/sprout/sprout/container/functions.hpp deleted file mode 100644 index 2caf4ef..0000000 --- a/dsp/lib/sprout/sprout/container/functions.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_FUNCTIONS_HPP -#define SPROUT_CONTAINER_FUNCTIONS_HPP - -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_CONTAINER_FUNCTIONS_HPP diff --git a/dsp/lib/sprout/sprout/container/get_deep_internal.hpp b/dsp/lib/sprout/sprout/container/get_deep_internal.hpp deleted file mode 100644 index b2def98..0000000 --- a/dsp/lib/sprout/sprout/container/get_deep_internal.hpp +++ /dev/null @@ -1,50 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FIXED_CONTAINER_GET_DEEP_INTERNAL_HPP -#define SPROUT_FIXED_CONTAINER_GET_DEEP_INTERNAL_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template< - typename Container, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::containers::deep_internal::type - get_deep_internal_impl(Container&& cont) { - return SPROUT_FORWARD(Container, cont); - } - template< - typename Container, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::containers::deep_internal::type - get_deep_internal_impl(Container&& cont) { - return sprout::detail::get_deep_internal_impl( - sprout::get_internal(SPROUT_FORWARD(Container, cont)) - ); - } - } // namespace detail - // - // get_deep_internal - // - template - inline SPROUT_CONSTEXPR typename sprout::containers::deep_internal::type - get_deep_internal(Container&& cont) { - return sprout::detail::get_deep_internal_impl(SPROUT_FORWARD(Container, cont)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_FIXED_CONTAINER_GET_DEEP_INTERNAL_HPP diff --git a/dsp/lib/sprout/sprout/container/get_internal.hpp b/dsp/lib/sprout/sprout/container/get_internal.hpp deleted file mode 100644 index ea9802e..0000000 --- a/dsp/lib/sprout/sprout/container/get_internal.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FIXED_CONTAINER_GET_INTERNAL_HPP -#define SPROUT_FIXED_CONTAINER_GET_INTERNAL_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // get_internal - // - template - inline SPROUT_CONSTEXPR typename sprout::containers::internal::type - get_internal(Container&& cont) { - typedef typename std::remove_reference::type container_type; - return sprout::sub_container_traits::get_internal(SPROUT_FORWARD(Container, cont)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_FIXED_CONTAINER_GET_INTERNAL_HPP diff --git a/dsp/lib/sprout/sprout/container/has_sprout_begin.hpp b/dsp/lib/sprout/sprout/container/has_sprout_begin.hpp deleted file mode 100644 index b728608..0000000 --- a/dsp/lib/sprout/sprout/container/has_sprout_begin.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_HAS_SPROUT_BEGIN_HPP -#define SPROUT_CONTAINER_HAS_SPROUT_BEGIN_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // has_sprout_begin - // - namespace detail { - template - struct has_sprout_begin_test { - public: - template< - typename U = T, - typename = typename sprout::identity()))>::type - > - static sprout::true_type test(int); - static sprout::false_type test(...); - }; -#if defined(_MSC_VER) && (_MSC_VER > 1900) - template::test(0))>::type> - struct has_sprout_begin - : public Base_ - {}; -#else - template - struct has_sprout_begin - : public sprout::identity::test(0))>::type - {}; -#endif - } // namespace detail - - template - struct has_sprout_begin - : public sprout::detail::has_sprout_begin - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_sprout_begin_v = sprout::has_sprout_begin::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_HAS_SPROUT_BEGIN_HPP diff --git a/dsp/lib/sprout/sprout/container/has_sprout_end.hpp b/dsp/lib/sprout/sprout/container/has_sprout_end.hpp deleted file mode 100644 index 8ffa5e9..0000000 --- a/dsp/lib/sprout/sprout/container/has_sprout_end.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_HAS_SPROUT_END_HPP -#define SPROUT_CONTAINER_HAS_SPROUT_END_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // has_sprout_end - // - namespace detail { - template - struct has_sprout_end_test { - public: - template< - typename U = T, - typename = typename sprout::identity()))>::type - > - static sprout::true_type test(int); - static sprout::false_type test(...); - }; -#if defined(_MSC_VER) && (_MSC_VER > 1900) - template::test(0))>::type> - struct has_sprout_end - : public Base_ - {}; -#else - template - struct has_sprout_end - : public sprout::identity::test(0))>::type - {}; -#endif - } // namespace detail - - template - struct has_sprout_end - : public sprout::detail::has_sprout_end - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_sprout_end_v = sprout::has_sprout_end::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_HAS_SPROUT_END_HPP diff --git a/dsp/lib/sprout/sprout/container/index_of.hpp b/dsp/lib/sprout/sprout/container/index_of.hpp deleted file mode 100644 index 3b938e0..0000000 --- a/dsp/lib/sprout/sprout/container/index_of.hpp +++ /dev/null @@ -1,74 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_INDEX_OF_HPP -#define SPROUT_CONTAINER_INDEX_OF_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // index_of - // - // effect: - // sprout::container_range_traits::range_index_of(cont, p) - // [default] - // ADL callable range_index_of(cont, p) -> range_index_of(cont, p) - // [default] - // Container is T[N] -> p - iterator(cont) - // otherwise, Container is not const - // && sprout::is_const_iterator_cast_convertible - // && (callable sprout::as_const(cont).index_of(p) - // || callable sprout::as_const(cont).begin() - // || ADL(without sprout) callable begin(sprout::as_const(cont)) - // ) - // -> sprout::index_of(sprout::as_const(cont), sprout::const_iterator_cast(p)) - // otherwise, callable cont.index_of(p) -> cont.index_of(p) - // otherwise -> sprout::distance(sprout::begin(cont), p) - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::size_type - index_of(Container& cont, typename sprout::container_traits::iterator p) { - return sprout::container_range_traits::range_index_of(cont, p); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::size_type - index_of(Container const& cont, typename sprout::container_traits::iterator p) { - return sprout::container_range_traits::range_index_of(cont, p); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::size_type - index_of(T (& arr)[N], typename sprout::container_traits::iterator p) { - return sprout::container_range_traits::range_index_of(arr, p); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::size_type - index_of(T const (& arr)[N], typename sprout::container_traits::iterator p) { - return sprout::container_range_traits::range_index_of(arr, p); - } - - // - // cindex_of - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::size_type - cindex_of(Container const& cont, typename sprout::container_traits::iterator p) { - return sprout::index_of(cont, p); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::size_type - cindex_of(T const (& arr)[N], typename sprout::container_traits::iterator p) { - return sprout::index_of(arr, p); - } -} // namespace sprout - -#include - -#endif // #ifndef SPROUT_CONTAINER_INDEX_OF_HPP diff --git a/dsp/lib/sprout/sprout/container/indexes.hpp b/dsp/lib/sprout/sprout/container/indexes.hpp deleted file mode 100644 index eac1866..0000000 --- a/dsp/lib/sprout/sprout/container/indexes.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_INDEXES_HPP -#define SPROUT_CONTAINER_INDEXES_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace containers { - // - // container_indexes - // - template - struct container_indexes - : public sprout::enable_make_indexes< - sprout::make_index_tuple::static_size> - > - {}; - } // namespace containers - - // - // container_indexes - // - template - struct container_indexes - : public sprout::containers::container_indexes - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_INDEXES_HPP diff --git a/dsp/lib/sprout/sprout/container/internal.hpp b/dsp/lib/sprout/sprout/container/internal.hpp deleted file mode 100644 index a822151..0000000 --- a/dsp/lib/sprout/sprout/container/internal.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_INTERNAL_HPP -#define SPROUT_CONTAINER_INTERNAL_HPP - -#include -#include -#include - -namespace sprout { - namespace containers { - // - // internal - // - template - struct internal - : public sprout::sub_container_traits< - typename std::remove_reference::type - >::template internal - {}; - } // namespace containers -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_INTERNAL_HPP diff --git a/dsp/lib/sprout/sprout/container/internal_begin.hpp b/dsp/lib/sprout/sprout/container/internal_begin.hpp deleted file mode 100644 index c6963ef..0000000 --- a/dsp/lib/sprout/sprout/container/internal_begin.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_INTERNAL_BEGIN_HPP -#define SPROUT_CONTAINER_INTERNAL_BEGIN_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // internal_begin - // - template - typename sprout::container_traits< - typename std::remove_reference< - typename sprout::containers::deep_internal::type - >::type - >::iterator - internal_begin(Container& cont) { - return sprout::begin(sprout::get_deep_internal(cont)); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits< - typename std::remove_reference< - typename sprout::containers::deep_internal::type - >::type - >::const_iterator - internal_begin(Container const& cont) { - return sprout::begin(sprout::get_deep_internal(cont)); - } - - // - // internal_cbegin - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits< - typename std::remove_reference< - typename sprout::containers::deep_internal::type - >::type - >::const_iterator - internal_cbegin(Container const& cont) { - return sprout::begin(sprout::get_deep_internal(cont)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_INTERNAL_BEGIN_HPP diff --git a/dsp/lib/sprout/sprout/container/internal_begin_offset.hpp b/dsp/lib/sprout/sprout/container/internal_begin_offset.hpp deleted file mode 100644 index 0cb1e84..0000000 --- a/dsp/lib/sprout/sprout/container/internal_begin_offset.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_INTERNAL_BEGIN_OFFSET_HPP -#define SPROUT_CONTAINER_INTERNAL_BEGIN_OFFSET_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // internal_begin_offset - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::difference_type - internal_begin_offset(Container const& cont) { - return sprout::distance(sprout::internal_begin(cont), sprout::begin(cont)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_INTERNAL_BEGIN_OFFSET_HPP diff --git a/dsp/lib/sprout/sprout/container/internal_begin_offset_backward.hpp b/dsp/lib/sprout/sprout/container/internal_begin_offset_backward.hpp deleted file mode 100644 index 5c4c334..0000000 --- a/dsp/lib/sprout/sprout/container/internal_begin_offset_backward.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_INTERNAL_BEGIN_OFFSET_BACKWARD_HPP -#define SPROUT_CONTAINER_INTERNAL_BEGIN_OFFSET_BACKWARD_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // internal_begin_offset_backward - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::difference_type - internal_begin_offset_backward(Container const& cont) { - return sprout::distance(sprout::begin(cont), sprout::internal_end(cont)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_INTERNAL_BEGIN_OFFSET_BACKWARD_HPP diff --git a/dsp/lib/sprout/sprout/container/internal_deep_copy.hpp b/dsp/lib/sprout/sprout/container/internal_deep_copy.hpp deleted file mode 100644 index b95acaf..0000000 --- a/dsp/lib/sprout/sprout/container/internal_deep_copy.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FIXED_CONTAINER_INTERNAL_DEEP_COPY_HPP -#define SPROUT_FIXED_CONTAINER_INTERNAL_DEEP_COPY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // internal_deep_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::container_construct_traits< - typename std::remove_reference< - typename sprout::containers::deep_internal::type - >::type - >::copied_type - internal_deep_copy(Container&& cont) { - return sprout::deep_copy( - sprout::get_deep_internal(SPROUT_FORWARD(Container, cont)) - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_FIXED_CONTAINER_INTERNAL_DEEP_COPY_HPP diff --git a/dsp/lib/sprout/sprout/container/internal_end.hpp b/dsp/lib/sprout/sprout/container/internal_end.hpp deleted file mode 100644 index d436feb..0000000 --- a/dsp/lib/sprout/sprout/container/internal_end.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_INTERNAL_END_HPP -#define SPROUT_CONTAINER_INTERNAL_END_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // internal_end - // - template - typename sprout::container_traits< - typename std::remove_reference< - typename sprout::containers::deep_internal::type - >::type - >::iterator - internal_end(Container& cont) { - return sprout::end(sprout::get_deep_internal(cont)); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits< - typename std::remove_reference< - typename sprout::containers::deep_internal::type - >::type - >::const_iterator - internal_end(Container const& cont) { - return sprout::end(sprout::get_deep_internal(cont)); - } - - // - // internal_cend - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits< - typename std::remove_reference< - typename sprout::containers::deep_internal::type - >::type - >::const_iterator - internal_cend(Container const& cont) { - return sprout::end(sprout::get_deep_internal(cont)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_INTERNAL_END_HPP diff --git a/dsp/lib/sprout/sprout/container/internal_end_offset.hpp b/dsp/lib/sprout/sprout/container/internal_end_offset.hpp deleted file mode 100644 index 8dc2cba..0000000 --- a/dsp/lib/sprout/sprout/container/internal_end_offset.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_INTERNAL_END_OFFSET_HPP -#define SPROUT_CONTAINER_INTERNAL_END_OFFSET_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // internal_end_offset - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::difference_type - internal_end_offset(Container const& cont) { - return sprout::distance(sprout::internal_begin(cont), sprout::end(cont)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_INTERNAL_END_OFFSET_HPP diff --git a/dsp/lib/sprout/sprout/container/internal_end_offset_backward.hpp b/dsp/lib/sprout/sprout/container/internal_end_offset_backward.hpp deleted file mode 100644 index ebf345e..0000000 --- a/dsp/lib/sprout/sprout/container/internal_end_offset_backward.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_INTERNAL_END_OFFSET_BACKWARD_HPP -#define SPROUT_CONTAINER_INTERNAL_END_OFFSET_BACKWARD_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // internal_end_offset_backward - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::difference_type - internal_end_offset_backward(Container const& cont) { - return sprout::distance(sprout::end(cont), sprout::internal_end(cont)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_INTERNAL_END_OFFSET_BACKWARD_HPP diff --git a/dsp/lib/sprout/sprout/container/internal_size.hpp b/dsp/lib/sprout/sprout/container/internal_size.hpp deleted file mode 100644 index 2280608..0000000 --- a/dsp/lib/sprout/sprout/container/internal_size.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_INTERNAL_SIZE_HPP -#define SPROUT_CONTAINER_INTERNAL_SIZE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // internal_size - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::difference_type - internal_size(Container const& cont) { - return sprout::distance(sprout::internal_begin(cont), sprout::internal_end(cont)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_INTERNAL_SIZE_HPP diff --git a/dsp/lib/sprout/sprout/container/is_sub_container.hpp b/dsp/lib/sprout/sprout/container/is_sub_container.hpp deleted file mode 100644 index 8a1eded..0000000 --- a/dsp/lib/sprout/sprout/container/is_sub_container.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_IS_SUB_CONTAINER_HPP -#define SPROUT_CONTAINER_IS_SUB_CONTAINER_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace containers { - // - // is_sub_container - // - template - struct is_sub_container - : public sprout::bool_constant< - !std::is_same::type, Container&&>::value - > - {}; - } // namespace containers -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_IS_SUB_CONTAINER_HPP diff --git a/dsp/lib/sprout/sprout/container/iterator.hpp b/dsp/lib/sprout/sprout/container/iterator.hpp deleted file mode 100644 index 338922b..0000000 --- a/dsp/lib/sprout/sprout/container/iterator.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_ITERATOR_HPP -#define SPROUT_CONTAINER_ITERATOR_HPP - -#include -#include - -namespace sprout { - namespace containers { - // - // iterator - // - template - struct iterator { - public: - typedef typename sprout::container_traits::iterator type; - }; - } // namespace containers -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/container/make.hpp b/dsp/lib/sprout/sprout/container/make.hpp deleted file mode 100644 index a2f256e..0000000 --- a/dsp/lib/sprout/sprout/container/make.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_MAKE_HPP -#define SPROUT_CONTAINER_MAKE_HPP - -#include -#include -#include - -namespace sprout { - // - // make - // - template - inline SPROUT_CONSTEXPR typename sprout::container_construct_traits::copied_type - make(Args&&... args) { - return sprout::container_construct_traits::make(SPROUT_FORWARD(Args, args)...); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_MAKE_HPP diff --git a/dsp/lib/sprout/sprout/container/metafunctions.hpp b/dsp/lib/sprout/sprout/container/metafunctions.hpp deleted file mode 100644 index 2e736ec..0000000 --- a/dsp/lib/sprout/sprout/container/metafunctions.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_METAFUNCTIONS_HPP -#define SPROUT_CONTAINER_METAFUNCTIONS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_CONTAINER_METAFUNCTIONS_HPP diff --git a/dsp/lib/sprout/sprout/container/nth.hpp b/dsp/lib/sprout/sprout/container/nth.hpp deleted file mode 100644 index c6b6009..0000000 --- a/dsp/lib/sprout/sprout/container/nth.hpp +++ /dev/null @@ -1,74 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_NTH_HPP -#define SPROUT_CONTAINER_NTH_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // nth - // - // effect: - // sprout::container_range_traits::range_nth(cont, i) - // [default] - // ADL callable range_nth(cont, i) -> range_nth(cont, i) - // [default] - // Container is T[N] -> iterator(cont) + i - // otherwise, Container is not const - // && sprout::is_const_iterator_cast_convertible - // && (callable sprout::as_const(cont).nth(i) - // || callable sprout::as_const(cont).begin() - // || ADL(without sprout) callable begin(sprout::as_const(cont)) - // ) - // -> sprout::const_iterator_cast(sprout::nth(sprout::as_const(cont), i)) - // otherwise, callable cont.nth(i) -> cont.nth(i) - // otherwise -> sprout::next(sprout::begin(cont), i) - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::iterator - nth(Container& cont, typename sprout::container_traits::size_type i) { - return sprout::container_range_traits::range_nth(cont, i); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::iterator - nth(Container const& cont, typename sprout::container_traits::size_type i) { - return sprout::container_range_traits::range_nth(cont, i); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::iterator - nth(T (& arr)[N], typename sprout::container_traits::size_type i) { - return sprout::container_range_traits::range_nth(arr, i); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::iterator - nth(T const (& arr)[N], typename sprout::container_traits::size_type i) { - return sprout::container_range_traits::range_nth(arr, i); - } - - // - // cnth - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::iterator - cnth(Container const& cont, typename sprout::container_traits::size_type i) { - return sprout::nth(cont, i); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::iterator - cnth(T const (& arr)[N], typename sprout::container_traits::size_type i) { - return sprout::nth(arr, i); - } -} // namespace sprout - -#include - -#endif // #ifndef SPROUT_CONTAINER_NTH_HPP diff --git a/dsp/lib/sprout/sprout/container/pointer.hpp b/dsp/lib/sprout/sprout/container/pointer.hpp deleted file mode 100644 index 7d9828c..0000000 --- a/dsp/lib/sprout/sprout/container/pointer.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_POINTER_HPP -#define SPROUT_CONTAINER_POINTER_HPP - -#include -#include - -namespace sprout { - namespace containers { - // - // pointer - // - template - struct pointer { - public: - typedef typename sprout::container_traits::pointer type; - }; - } // namespace containers -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_POINTER_HPP diff --git a/dsp/lib/sprout/sprout/container/range_functions.hpp b/dsp/lib/sprout/sprout/container/range_functions.hpp deleted file mode 100644 index 5cc23c2..0000000 --- a/dsp/lib/sprout/sprout/container/range_functions.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_RANGE_FUNCTIONS_HPP -#define SPROUT_CONTAINER_RANGE_FUNCTIONS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_CONTAINER_RANGE_FUNCTIONS_HPP diff --git a/dsp/lib/sprout/sprout/container/range_functions_fwd.hpp b/dsp/lib/sprout/sprout/container/range_functions_fwd.hpp deleted file mode 100644 index f6538fe..0000000 --- a/dsp/lib/sprout/sprout/container/range_functions_fwd.hpp +++ /dev/null @@ -1,134 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_RANGE_FUNCTIONS_FWD_HPP -#define SPROUT_CONTAINER_RANGE_FUNCTIONS_FWD_HPP - -#include -#include - -namespace sprout { - // - // begin - // - template - SPROUT_CONSTEXPR typename sprout::container_traits::iterator - begin(Container& cont); - template - SPROUT_CONSTEXPR typename sprout::container_traits::iterator - begin(Container const& cont); - - // - // end - // - template - SPROUT_CONSTEXPR typename sprout::container_traits::iterator - end(Container& cont); - template - SPROUT_CONSTEXPR typename sprout::container_traits::iterator - end(Container const& cont); - - // - // size - // - template - SPROUT_CONSTEXPR typename sprout::container_traits::size_type - size(Container const& cont); - - // - // empty - // - template - SPROUT_CONSTEXPR bool - empty(Container const& cont); - - // - // front - // - template - SPROUT_CONSTEXPR typename sprout::container_traits::reference - front(Container& cont); - template - SPROUT_CONSTEXPR typename sprout::container_traits::reference - front(Container const& cont); - - // - // back - // - template - SPROUT_CONSTEXPR typename sprout::container_traits::reference - back(Container& cont); - template - SPROUT_CONSTEXPR typename sprout::container_traits::reference - back(Container const& cont); - - // - // subscript_at - // - template - SPROUT_CONSTEXPR typename sprout::container_traits::reference - subscript_at(Container& cont, typename sprout::container_traits::size_type i); - template - SPROUT_CONSTEXPR typename sprout::container_traits::reference - subscript_at(Container const& cont, typename sprout::container_traits::size_type i); - - // - // at - // - template - SPROUT_CONSTEXPR typename sprout::container_traits::reference - at(Container& cont, typename sprout::container_traits::size_type i); - template - SPROUT_CONSTEXPR typename sprout::container_traits::reference - at(Container const& cont, typename sprout::container_traits::size_type i); - - // - // nth - // - template - SPROUT_CONSTEXPR typename sprout::container_traits::iterator - nth(Container& cont, typename sprout::container_traits::size_type i); - template - SPROUT_CONSTEXPR typename sprout::container_traits::iterator - nth(Container const& cont, typename sprout::container_traits::size_type i); - - // - // index_of - // - template - SPROUT_CONSTEXPR typename sprout::container_traits::size_type - index_of(Container& cont, typename sprout::container_traits::iterator p); - template - SPROUT_CONSTEXPR typename sprout::container_traits::size_type - index_of(Container const& cont, typename sprout::container_traits::iterator p); - - // - // data - // - template - SPROUT_CONSTEXPR typename sprout::container_traits::pointer - data(Container& cont); - template - SPROUT_CONSTEXPR typename sprout::container_traits::pointer - data(Container const& cont); - - // - // range_index_check - // - template - SPROUT_CONSTEXPR typename sprout::container_traits::size_type - range_index_check(Container const& cont, typename sprout::container_traits::size_type i); - - // - // shrink_to_fit - // - template - SPROUT_CXX14_CONSTEXPR void - shrink_to_fit(Container&& cont); -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_RANGE_FUNCTIONS_FWD_HPP diff --git a/dsp/lib/sprout/sprout/container/range_index_check.hpp b/dsp/lib/sprout/sprout/container/range_index_check.hpp deleted file mode 100644 index 29051e4..0000000 --- a/dsp/lib/sprout/sprout/container/range_index_check.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_RANGE_INDEX_CHECK_HPP -#define SPROUT_CONTAINER_RANGE_INDEX_CHECK_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // range_index_check - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::size_type - range_index_check(Container const& cont, typename sprout::container_traits::size_type i) { - return i < sprout::size(cont) ? i - : throw std::out_of_range("range_index_check: index out of range") - ; - } -} // namespace sprout - -#include - -#endif // #ifndef SPROUT_CONTAINER_RANGE_INDEX_CHECK_HPP diff --git a/dsp/lib/sprout/sprout/container/rebind_size.hpp b/dsp/lib/sprout/sprout/container/rebind_size.hpp deleted file mode 100644 index 42ef90b..0000000 --- a/dsp/lib/sprout/sprout/container/rebind_size.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_REBIND_SIZE_HPP -#define SPROUT_CONTAINER_REBIND_SIZE_HPP - -#include -#include - -namespace sprout { - namespace containers { - // - // rebind_size - // - template::size_type Size> - struct rebind_size - : public sprout::container_transform_traits::template rebind_size - {}; - } // namespace containers -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_REBIND_SIZE_HPP diff --git a/dsp/lib/sprout/sprout/container/rebind_type.hpp b/dsp/lib/sprout/sprout/container/rebind_type.hpp deleted file mode 100644 index 68ad748..0000000 --- a/dsp/lib/sprout/sprout/container/rebind_type.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_REBIND_TYPE_HPP -#define SPROUT_CONTAINER_REBIND_TYPE_HPP - -#include -#include - -namespace sprout { - namespace containers { - // - // rebind_type - // - template - struct rebind_type - : public sprout::container_transform_traits::template rebind_type - {}; - } // namespace containers -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_REBIND_TYPE_HPP diff --git a/dsp/lib/sprout/sprout/container/reference.hpp b/dsp/lib/sprout/sprout/container/reference.hpp deleted file mode 100644 index f8e7b3b..0000000 --- a/dsp/lib/sprout/sprout/container/reference.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_REFERENCE_HPP -#define SPROUT_CONTAINER_REFERENCE_HPP - -#include -#include - -namespace sprout { - namespace containers { - // - // reference - // - template - struct reference { - public: - typedef typename sprout::container_traits::reference type; - }; - } // namespace containers -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_REFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/container/remake.hpp b/dsp/lib/sprout/sprout/container/remake.hpp deleted file mode 100644 index 0eab2ab..0000000 --- a/dsp/lib/sprout/sprout/container/remake.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_REMAKE_HPP -#define SPROUT_CONTAINER_REMAKE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // remake - // - template - inline SPROUT_CONSTEXPR typename sprout::container_construct_traits::copied_type - remake(Cont&& cont, typename sprout::container_traits::difference_type size, Args&&... args) { - return sprout::container_construct_traits::remake( - SPROUT_FORWARD(Cont, cont), - size, - SPROUT_FORWARD(Args, args)... - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_REMAKE_HPP diff --git a/dsp/lib/sprout/sprout/container/shrink_to_fit.hpp b/dsp/lib/sprout/sprout/container/shrink_to_fit.hpp deleted file mode 100644 index 4581b72..0000000 --- a/dsp/lib/sprout/sprout/container/shrink_to_fit.hpp +++ /dev/null @@ -1,91 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_SHRINK_TO_FIT_HPP -#define SPROUT_CONTAINER_SHRINK_TO_FIT_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout_adl { - sprout::not_found_via_adl container_shrink_to_fit(...); -} // namespace sprout_adl - -namespace sprout { - namespace detail { - template - struct has_mem_shrink_to_fit_test { - public: - template< - typename U = T, - typename = typename sprout::identity().shrink_to_fit())>::type - > - static sprout::true_type test(int); - static sprout::false_type test(...); - }; -#if defined(_MSC_VER) && (_MSC_VER > 1900) - template::test(0))>::type> - struct has_mem_shrink_to_fit - : public Base_ - {}; -#else - template - struct has_mem_shrink_to_fit - : public sprout::identity::test(0))>::type - {}; -#endif - - template - inline SPROUT_CXX14_CONSTEXPR typename std::enable_if< - sprout::detail::has_mem_shrink_to_fit::value - >::type - container_shrink_to_fit_default(Container&& cont) { - return SPROUT_FORWARD(Container, cont).shrink_to_fit(); - } - template - inline SPROUT_CXX14_CONSTEXPR typename std::enable_if< - !sprout::detail::has_mem_shrink_to_fit::value - >::type - container_shrink_to_fit_default(Container&&) { - return ; - } - } // namespace detail - - namespace container_detail { - template - inline SPROUT_CXX14_CONSTEXPR void - container_shrink_to_fit(Container&& cont) { - return sprout::detail::container_shrink_to_fit_default(SPROUT_FORWARD(Container, cont)); - } - } // namespace container_detail - - // - // shrink_to_fit - // - // effect: - // ADL callable container_shrink_to_fit(cont) -> container_shrink_to_fit(cont) - // [default] - // callable cont.shrink_to_fit() -> cont.shrink_to_fit() - // otherwise -> no effects - // - template - inline SPROUT_CXX14_CONSTEXPR void - shrink_to_fit(Container&& cont) { - using sprout::container_detail::container_shrink_to_fit; - using sprout_adl::container_shrink_to_fit; - return container_shrink_to_fit(SPROUT_FORWARD(Container, cont)); - } -} // namespace sprout - -#include - -#endif // #ifndef SPROUT_CONTAINER_SHRINK_TO_FIT_HPP diff --git a/dsp/lib/sprout/sprout/container/size.hpp b/dsp/lib/sprout/sprout/container/size.hpp deleted file mode 100644 index e4f659c..0000000 --- a/dsp/lib/sprout/sprout/container/size.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_SIZE_HPP -#define SPROUT_CONTAINER_SIZE_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // size - // - // effect: - // sprout::container_range_traits::range_size(cont) - // [default] - // ADL callable range_size(cont) -> range_size(cont) - // [default] - // Container is T[N] -> N - // otherwise, callable cont.size() -> cont.size() - // otherwise -> distance(begin(cont), end(cont)) - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::size_type - size(Container const& cont) { - return sprout::container_range_traits::range_size(cont); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::size_type - size(T const (& arr)[N]) { - return sprout::container_range_traits::range_size(arr); - } -} // namespace sprout - -#include - -#endif // #ifndef SPROUT_CONTAINER_SIZE_HPP diff --git a/dsp/lib/sprout/sprout/container/size_type.hpp b/dsp/lib/sprout/sprout/container/size_type.hpp deleted file mode 100644 index 01e0875..0000000 --- a/dsp/lib/sprout/sprout/container/size_type.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_SIZE_TYPE_HPP -#define SPROUT_CONTAINER_SIZE_TYPE_HPP - -#include -#include - -namespace sprout { - namespace containers { - // - // size_type - // - template - struct size_type { - public: - typedef typename sprout::container_traits::size_type type; - }; - } // namespace containers -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_SIZE_TYPE_HPP diff --git a/dsp/lib/sprout/sprout/container/sscrisk/cel/array.hpp b/dsp/lib/sprout/sprout/container/sscrisk/cel/array.hpp deleted file mode 100644 index 97b8427..0000000 --- a/dsp/lib/sprout/sprout/container/sscrisk/cel/array.hpp +++ /dev/null @@ -1,62 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_SSCRISK_CEL_ARRAY_HPP -#define SPROUT_CONTAINER_SSCRISK_CEL_ARRAY_HPP - -#include -#include -#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION -# include -# include -# include -# include -# include -#endif - -#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION -namespace sprout { - // - // container_traits - // - template - struct container_traits > - : public sprout::container_traits_default > - { - public: - typedef sprout::index_iterator&, true, sprout::detail::const_subscript<> > iterator; - typedef sprout::index_iterator const&, true, sprout::detail::const_subscript<> > const_iterator; - }; - - // - // container_range_traits - // - template - struct container_range_traits > { - public: - static SPROUT_CONSTEXPR typename sprout::container_traits >::iterator - range_begin(sscrisk::cel::array& cont) { - return typename sprout::container_traits >::iterator(cont, 0); - } - static SPROUT_CONSTEXPR typename sprout::container_traits const>::iterator - range_begin(sscrisk::cel::array const& cont) { - return typename sprout::container_traits const>::iterator(cont, 0); - } - - static SPROUT_CONSTEXPR typename sprout::container_traits >::iterator - range_end(sscrisk::cel::array& cont) { - return typename sprout::container_traits >::iterator(cont, cont.size()); - } - static SPROUT_CONSTEXPR typename sprout::container_traits const>::iterator - range_end(sscrisk::cel::array const& cont) { - return typename sprout::container_traits const>::iterator(cont, cont.size()); - } - }; -} // namespace sprout -#endif - -#endif // #ifndef SPROUT_CONTAINER_SSCRISK_CEL_ARRAY_HPP diff --git a/dsp/lib/sprout/sprout/container/static_size.hpp b/dsp/lib/sprout/sprout/container/static_size.hpp deleted file mode 100644 index a347cd1..0000000 --- a/dsp/lib/sprout/sprout/container/static_size.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_STATIC_SIZE_HPP -#define SPROUT_CONTAINER_STATIC_SIZE_HPP - -#include -#include -#include - -namespace sprout { - namespace containers { - // - // static_size - // - template - struct static_size - : public sprout::integral_constant< - typename sprout::container_traits::size_type, - sprout::container_traits::static_size - > - {}; - } // namespace containers -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_STATIC_SIZE_HPP diff --git a/dsp/lib/sprout/sprout/container/std/array.hpp b/dsp/lib/sprout/sprout/container/std/array.hpp deleted file mode 100644 index 7551d4e..0000000 --- a/dsp/lib/sprout/sprout/container/std/array.hpp +++ /dev/null @@ -1,69 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_STD_ARRAY_HPP -#define SPROUT_CONTAINER_STD_ARRAY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // container_traits - // - template - struct container_traits > - : public sprout::container_traits_default > - { - public: - typedef sprout::index_iterator&, true, sprout::detail::const_subscript<> > iterator; - typedef sprout::index_iterator const&, true, sprout::detail::const_subscript<> > const_iterator; - }; - - // - // container_range_traits - // - template - struct container_range_traits > - : public sprout::container_range_traits_default > - { - public: - // iterators: - static SPROUT_CONSTEXPR typename sprout::container_traits >::iterator - range_begin(std::array& cont) { - return typename sprout::container_traits >::iterator(cont, 0); - } - static SPROUT_CONSTEXPR typename sprout::container_traits const>::iterator - range_begin(std::array const& cont) { - return typename sprout::container_traits const>::iterator(cont, 0); - } - static SPROUT_CONSTEXPR typename sprout::container_traits >::iterator - range_end(std::array& cont) { - return typename sprout::container_traits >::iterator(cont, cont.size()); - } - static SPROUT_CONSTEXPR typename sprout::container_traits const>::iterator - range_end(std::array const& cont) { - return typename sprout::container_traits const>::iterator(cont, cont.size()); - } - // data access: - static SPROUT_CONSTEXPR typename sprout::container_traits const>::pointer - range_data(std::array const& cont) { - return sprout::addressof(range_front(cont)); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_STD_ARRAY_HPP diff --git a/dsp/lib/sprout/sprout/container/std/complex.hpp b/dsp/lib/sprout/sprout/container/std/complex.hpp deleted file mode 100644 index 141205c..0000000 --- a/dsp/lib/sprout/sprout/container/std/complex.hpp +++ /dev/null @@ -1,126 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_STD_COMPLEX_HPP -#define SPROUT_CONTAINER_STD_COMPLEX_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - struct std_complex_at { - public: - template - SPROUT_CONSTEXPR typename Complex::value_type - operator()(Complex const& c, Index i) const { - return i == 0 ? c.real() - : i == 1 ? c.imag() - : throw std::out_of_range("std_complex_at: index out of range") - ; - } - }; - } // namespace detail - - // - // container_traits - // - template - struct container_traits > { - public: - typedef T value_type; - typedef sprout::index_iterator&, true, sprout::detail::std_complex_at> iterator; - typedef sprout::index_iterator const&, true, sprout::detail::std_complex_at> const_iterator; - typedef T reference; - typedef T const_reference; - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - typedef T* pointer; - typedef T const* const_pointer; - public: - SPROUT_STATIC_CONSTEXPR size_type static_size = 2; - public: - static SPROUT_CONSTEXPR size_type - fixed_size() SPROUT_NOEXCEPT { - return static_size; - } - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::container_traits >::size_type - sprout::container_traits >::static_size; - - // - // container_range_traits - // - template - struct container_range_traits > - : public sprout::container_range_traits_default > - { - public: - static SPROUT_CONSTEXPR typename sprout::container_traits >::iterator - range_begin(std::complex& cont) { - return typename sprout::container_traits >::iterator(cont, 0); - } - static SPROUT_CONSTEXPR typename sprout::container_traits const>::iterator - range_begin(std::complex const& cont) { - return typename sprout::container_traits const>::iterator(cont, 0); - } - static SPROUT_CONSTEXPR typename sprout::container_traits >::iterator - range_end(std::complex& cont) { - return typename sprout::container_traits >::iterator(cont, 2); - } - static SPROUT_CONSTEXPR typename sprout::container_traits const>::iterator - range_end(std::complex const& cont) { - return typename sprout::container_traits const>::iterator(cont, 2); - } - }; - - // - // container_construct_traits - // - template - struct container_construct_traits > { - public: - typedef std::complex copied_type; - public: - template - static SPROUT_CONSTEXPR copied_type - deep_copy(Cont&& cont) { - return SPROUT_FORWARD(Cont, cont); - } - template - static SPROUT_CONSTEXPR copied_type - make(Args&&... args) { - return copied_type(SPROUT_FORWARD(Args, args)...); - } - template - static SPROUT_CONSTEXPR copied_type - remake(Cont&&, typename sprout::container_traits >::difference_type, Args&&... args) { - return copied_type(SPROUT_FORWARD(Args, args)...); - } - }; - - // - // container_transform_traits - // - template - struct container_transform_traits > { - public: - template - struct rebind_type { - public: - typedef std::complex type; - }; - }; -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_STD_COMPLEX_HPP diff --git a/dsp/lib/sprout/sprout/container/sub_container_traits.hpp b/dsp/lib/sprout/sprout/container/sub_container_traits.hpp deleted file mode 100644 index 187212f..0000000 --- a/dsp/lib/sprout/sprout/container/sub_container_traits.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_SUB_CONTAINER_TRAITS_HPP -#define SPROUT_CONTAINER_SUB_CONTAINER_TRAITS_HPP - -#include -#include -#include - -namespace sprout { - // - // sub_container_traits - // - template - struct sub_container_traits { - public: - template - struct internal { - public: - typedef Cont&& type; - }; - public: - template - static SPROUT_CONSTEXPR typename internal::type - get_internal(Cont&& cont) { - return SPROUT_FORWARD(Cont, cont); - } - }; - template - struct sub_container_traits - : public sprout::sub_container_traits - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_SUB_CONTAINER_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/container/sub_functions.hpp b/dsp/lib/sprout/sprout/container/sub_functions.hpp deleted file mode 100644 index 6940b4d..0000000 --- a/dsp/lib/sprout/sprout/container/sub_functions.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_SUB_FUNCTIONS_HPP -#define SPROUT_CONTAINER_SUB_FUNCTIONS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_CONTAINER_SUB_FUNCTIONS_HPP diff --git a/dsp/lib/sprout/sprout/container/subscript_at.hpp b/dsp/lib/sprout/sprout/container/subscript_at.hpp deleted file mode 100644 index 8ffbee9..0000000 --- a/dsp/lib/sprout/sprout/container/subscript_at.hpp +++ /dev/null @@ -1,74 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_SUBSCRIPT_AT_HPP -#define SPROUT_CONTAINER_SUBSCRIPT_AT_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // subscript_at - // - // effect: - // sprout::container_range_traits::range_subscript_at(cont, i) - // [default] - // ADL callable range_subscript_at(cont, i) -> range_subscript_at(cont, i) - // [default] - // Container is T[N] -> cont[i] - // otherwise, Container is not const - // && sprout::is_const_reference_cast_convertible - // && (callable sprout::as_const(cont)[i] - // || callable sprout::as_const(cont).begin() - // || ADL(without sprout) callable begin(sprout::as_const(cont)) - // ) - // -> sprout::const_reference_cast(sprout::subscript_at(sprout::as_const(cont), i)) - // otherwise, callable cont[i] -> cont[i] - // otherwise -> *sprout::next(sprout::begin(cont), i) - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::reference - subscript_at(Container& cont, typename sprout::container_traits::size_type i) { - return sprout::container_range_traits::range_subscript_at(cont, i); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::reference - subscript_at(Container const& cont, typename sprout::container_traits::size_type i) { - return sprout::container_range_traits::range_subscript_at(cont, i); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::reference - subscript_at(T (& arr)[N], typename sprout::container_traits::size_type i) { - return sprout::container_range_traits::range_subscript_at(arr, i); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::reference - subscript_at(T const (& arr)[N], typename sprout::container_traits::size_type i) { - return sprout::container_range_traits::range_subscript_at(arr, i); - } - - // - // csubscript_at - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::reference - csubscript_at(Container const& cont, typename sprout::container_traits::size_type i) { - return sprout::subscript_at(cont, i); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::reference - csubscript_at(T const (& arr)[N], typename sprout::container_traits::size_type i) { - return sprout::subscript_at(arr, i); - } -} // namespace sprout - -#include - -#endif // #ifndef SPROUT_CONTAINER_SUBSCRIPT_AT_HPP diff --git a/dsp/lib/sprout/sprout/container/traits.hpp b/dsp/lib/sprout/sprout/container/traits.hpp deleted file mode 100644 index 3abdb12..0000000 --- a/dsp/lib/sprout/sprout/container/traits.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_TRAITS_HPP -#define SPROUT_CONTAINER_TRAITS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_CONTAINER_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/container/traits_functions.hpp b/dsp/lib/sprout/sprout/container/traits_functions.hpp deleted file mode 100644 index 020b862..0000000 --- a/dsp/lib/sprout/sprout/container/traits_functions.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_TRAITS_FUNCTIONS_HPP -#define SPROUT_CONTAINER_TRAITS_FUNCTIONS_HPP - -#include -#include - -#endif // #ifndef SPROUT_CONTAINER_TRAITS_FUNCTIONS_HPP diff --git a/dsp/lib/sprout/sprout/container/traits_fwd.hpp b/dsp/lib/sprout/sprout/container/traits_fwd.hpp deleted file mode 100644 index 321ea6f..0000000 --- a/dsp/lib/sprout/sprout/container/traits_fwd.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_TRAITS_FWD_HPP -#define SPROUT_CONTAINER_TRAITS_FWD_HPP - -#include - -namespace sprout { - // - // container_traits - // - template - struct container_traits; - - // - // container_range_traits - // - template - struct container_range_traits; - - // - // container_construct_traits - // - template - struct container_construct_traits; - - // - // container_transform_traits - // - template - struct container_transform_traits; - - // - // container_fitness_traits - // - template - struct container_fitness_traits; - - // - // sub_container_traits - // - template - struct sub_container_traits; -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_TRAITS_FWD_HPP diff --git a/dsp/lib/sprout/sprout/container/utility.hpp b/dsp/lib/sprout/sprout/container/utility.hpp deleted file mode 100644 index ec4684d..0000000 --- a/dsp/lib/sprout/sprout/container/utility.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_UTILITY_HPP -#define SPROUT_CONTAINER_UTILITY_HPP - -#include -#include - -#endif // #ifndef SPROUT_CONTAINER_UTILITY_HPP diff --git a/dsp/lib/sprout/sprout/container/value_type.hpp b/dsp/lib/sprout/sprout/container/value_type.hpp deleted file mode 100644 index 2e12485..0000000 --- a/dsp/lib/sprout/sprout/container/value_type.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_VALUE_TYPE_HPP -#define SPROUT_CONTAINER_VALUE_TYPE_HPP - -#include -#include - -namespace sprout { - namespace containers { - // - // value_type - // - template - struct value_type { - public: - typedef typename sprout::container_traits::value_type type; - }; - } // namespace containers -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_VALUE_TYPE_HPP diff --git a/dsp/lib/sprout/sprout/container/weak_rebind_size.hpp b/dsp/lib/sprout/sprout/container/weak_rebind_size.hpp deleted file mode 100644 index a1f1acd..0000000 --- a/dsp/lib/sprout/sprout/container/weak_rebind_size.hpp +++ /dev/null @@ -1,90 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CONTAINER_WEAK_REBIND_SIZE_HPP -#define SPROUT_CONTAINER_WEAK_REBIND_SIZE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace containers { - namespace detail { - template< - typename T, - template::size_type> class = T::template rebind_size - > - sprout::true_type sprout_has_xxx_impl_check_template_rebind_size(int); - template - sprout::false_type sprout_has_xxx_impl_check_template_rebind_size(long); -#if defined(_MSC_VER) && (_MSC_VER > 1900) - template(0))> - struct has_rebind_size - : public Base_ - {}; -#else - template - struct has_rebind_size - : public sprout::identity(0))>::type - {}; -#endif - } // namespace detail - // - // is_rebindable_size - // - template - struct is_rebindable_size - : public sprout::containers::detail::has_rebind_size< - sprout::container_transform_traits - > - {}; - template - struct is_rebindable_size - : public sprout::containers::is_rebindable_size - {}; - template - struct is_rebindable_size - : public sprout::containers::is_rebindable_size - {}; - template - struct is_rebindable_size - : public sprout::containers::is_rebindable_size - {}; - - namespace detail { - template::size_type Size, typename = void> - struct weak_rebind_size_impl; - template::size_type Size> - struct weak_rebind_size_impl< - Container, Size, - typename std::enable_if::value>::type - > - : public sprout::container_transform_traits::template rebind_size - {}; - template::size_type Size> - struct weak_rebind_size_impl< - Container, Size, - typename std::enable_if::value>::type - > { - public: - typedef Container type; - }; - } // namespace detail - // - // weak_rebind_size - // - template::size_type Size> - struct weak_rebind_size - : public sprout::containers::detail::weak_rebind_size_impl - {}; - } // namespace containers -} // namespace sprout - -#endif // #ifndef SPROUT_CONTAINER_WEAK_REBIND_SIZE_HPP diff --git a/dsp/lib/sprout/sprout/cstddef.hpp b/dsp/lib/sprout/sprout/cstddef.hpp deleted file mode 100644 index b2f493f..0000000 --- a/dsp/lib/sprout/sprout/cstddef.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTDDEF_HPP -#define SPROUT_CSTDDEF_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_CSTDDEF_HPP diff --git a/dsp/lib/sprout/sprout/cstddef/literals.hpp b/dsp/lib/sprout/sprout/cstddef/literals.hpp deleted file mode 100644 index 1fba4e4..0000000 --- a/dsp/lib/sprout/sprout/cstddef/literals.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTDDEF_LITERALS_HPP -#define SPROUT_CSTDDEF_LITERALS_HPP - -#include -#include -#include - -#if SPROUT_USE_USER_DEFINED_LITERALS - -namespace sprout { - namespace literals { - namespace support_literals { - // - // operator"" _zu - // - SPROUT_CONSTEXPR std::size_t operator"" _zu(unsigned long long t) { - return static_cast(t); - } - } // namespace support_literals - - using sprout::literals::support_literals::operator"" _zu; - } // namespace literals -} // namespace sprout - -#endif // #if SPROUT_USE_USER_DEFINED_LITERALS - -#endif // #ifndef SPROUT_CSTDDEF_LITERALS_HPP diff --git a/dsp/lib/sprout/sprout/cstdint.hpp b/dsp/lib/sprout/sprout/cstdint.hpp deleted file mode 100644 index f3aec92..0000000 --- a/dsp/lib/sprout/sprout/cstdint.hpp +++ /dev/null @@ -1,76 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTDINT_HPP -#define SPROUT_CSTDINT_HPP - -#include -#include -#include - -// -// SPROUT_INT[N]_C -// SPROUT_UINT[N]_C -// -#ifndef INT8_C -# define SPROUT_INT8_C(n) n -#else -# define SPROUT_INT8_C(n) INT8_C(n) -#endif -#ifndef UINT8_C -# define SPROUT_UINT8_C(n) n -#else -# define SPROUT_UINT8_C(n) UINT8_C(n) -#endif -#ifndef INT16_C -# define SPROUT_INT16_C(n) n -#else -# define SPROUT_INT16_C(n) INT16_C(n) -#endif -#ifndef UINT16_C -# define SPROUT_UINT16_C(n) n -#else -# define SPROUT_UINT16_C(n) UINT16_C(n) -#endif -#ifndef INT32_C -# if LONG_MAX == LLONG_MAX -# define SPROUT_INT32_C(n) n -# else -# define SPROUT_INT32_C(n) n ## L -# endif -#else -# define SPROUT_INT32_C(n) INT32_C(n) -#endif -#ifndef UINT32_C -# if LONG_MAX == LLONG_MAX -# define SPROUT_UINT32_C(n) n ## U -# else -# define SPROUT_UINT32_C(n) n ## UL -# endif -#else -# define SPROUT_UINT32_C(n) UINT32_C(n) -#endif -#ifndef INT64_C -# if LONG_MAX == LLONG_MAX -# define SPROUT_INT64_C(n) n ## L -# else -# define SPROUT_INT64_C(n) n ## LL -# endif -#else -# define SPROUT_INT64_C(n) INT64_C(n) -#endif -#ifndef UINT64_C -# if LONG_MAX == LLONG_MAX -# define SPROUT_UINT64_C(n) n ## UL -# else -# define SPROUT_UINT64_C(n) n ## ULL -# endif -#else -# define SPROUT_UINT64_C(n) UINT64_C(n) -#endif - -#endif // #ifndef SPROUT_CSTDINT_HPP diff --git a/dsp/lib/sprout/sprout/cstdlib.hpp b/dsp/lib/sprout/sprout/cstdlib.hpp deleted file mode 100644 index a2d4969..0000000 --- a/dsp/lib/sprout/sprout/cstdlib.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTDLIB_HPP -#define SPROUT_CSTDLIB_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_CSTDLIB_HPP diff --git a/dsp/lib/sprout/sprout/cstdlib/abs.hpp b/dsp/lib/sprout/sprout/cstdlib/abs.hpp deleted file mode 100644 index a585f28..0000000 --- a/dsp/lib/sprout/sprout/cstdlib/abs.hpp +++ /dev/null @@ -1,68 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTDLIB_ABS_HPP -#define SPROUT_CSTDLIB_ABS_HPP - -#include -#include -#include -#include - -namespace sprout { - - // 7.20.6.1 abs, labs, and llabs function - inline SPROUT_CONSTEXPR int - abs(int j) { - return j < 0 ? -j : j; - } - - inline SPROUT_CONSTEXPR long - labs(long j) { - return j < 0 ? -j : j; - } - - inline SPROUT_CONSTEXPR long long - llabs(long long j) { - return j < 0 ? -j : j; - } - - inline SPROUT_CONSTEXPR long - abs(long j) { - return sprout::labs(j); - } - - inline SPROUT_CONSTEXPR long long - abs(long long j) { - return sprout::llabs(j); - } - - namespace { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value && sprout::is_signed::value, - IntType - >::type - abs(IntType j) { - return j < 0 ? -j : j; - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value && sprout::is_unsigned::value, - IntType - >::type - abs(IntType j) { - return j; - } - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_CSTDLIB_ABS_HPP diff --git a/dsp/lib/sprout/sprout/cstdlib/arithmetic.hpp b/dsp/lib/sprout/sprout/cstdlib/arithmetic.hpp deleted file mode 100644 index 24cabfe..0000000 --- a/dsp/lib/sprout/sprout/cstdlib/arithmetic.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTDLIB_ARITHMETIC_HPP -#define SPROUT_CSTDLIB_ARITHMETIC_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_CSTDLIB_ARITHMETIC_HPP diff --git a/dsp/lib/sprout/sprout/cstdlib/ascii_to_int.hpp b/dsp/lib/sprout/sprout/cstdlib/ascii_to_int.hpp deleted file mode 100644 index 5beba20..0000000 --- a/dsp/lib/sprout/sprout/cstdlib/ascii_to_int.hpp +++ /dev/null @@ -1,88 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTDLIB_DECIMAL_TO_INT_HPP -#define SPROUT_CSTDLIB_DECIMAL_TO_INT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - // Copyright (c) 2011 osyo-manga : http://d.hatena.ne.jp/osyo-manga/ - - template - inline SPROUT_CONSTEXPR IntType - ascii_to_int_impl(NullTerminatedIterator const& str, IntType val, bool negative) { - typedef typename std::iterator_traits::value_type value_type; - SPROUT_STATIC_ASSERT(sprout::detail::is_char_type_of_consecutive_digits::value); - return !sprout::ascii::isdigit(*str) - ? negative ? -val : val - : val > (sprout::numeric_limits::max() - (*str - SPROUT_CHAR_LITERAL('0', value_type)) - (negative ? 1 : 0)) / 10 - ? (negative ? sprout::numeric_limits::min() : sprout::numeric_limits::max()) - : sprout::detail::ascii_to_int_impl( - sprout::next(str), - val * 10 + (*str - SPROUT_CHAR_LITERAL('0', value_type)), - negative - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_unsigned::value, - IntType - >::type - ascii_to_int(NullTerminatedIterator const& str) { - typedef typename std::iterator_traits::value_type value_type; - return sprout::ascii::isspace(*str) - ? sprout::detail::ascii_to_int(sprout::next(str)) - : *str == SPROUT_CHAR_LITERAL('+', value_type) - ? sprout::detail::ascii_to_int_impl(sprout::next(str), IntType(), false) - : sprout::detail::ascii_to_int_impl(str, IntType(), false) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_signed::value, - IntType - >::type - ascii_to_int(NullTerminatedIterator const& str) { - typedef typename std::iterator_traits::value_type value_type; - return sprout::ascii::isspace(*str) - ? sprout::detail::ascii_to_int(sprout::next(str)) - : *str == SPROUT_CHAR_LITERAL('-', value_type) - ? sprout::detail::ascii_to_int_impl(sprout::next(str), IntType(), true) - : *str == SPROUT_CHAR_LITERAL('+', value_type) - ? sprout::detail::ascii_to_int_impl(sprout::next(str), IntType(), false) - : sprout::detail::ascii_to_int_impl(str, IntType(), false) - ; - } - } // namespace detail - - // - // ascii_to_int - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - IntType - >::type - ascii_to_int(Char const* str) { - return sprout::detail::ascii_to_int(str); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTDLIB_DECIMAL_TO_INT_HPP diff --git a/dsp/lib/sprout/sprout/cstdlib/atof.hpp b/dsp/lib/sprout/sprout/cstdlib/atof.hpp deleted file mode 100644 index 7e565f1..0000000 --- a/dsp/lib/sprout/sprout/cstdlib/atof.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTDLIB_ATOF_HPP -#define SPROUT_CSTDLIB_ATOF_HPP - -#include -#include - -namespace sprout { - // - // atof - // - template - inline SPROUT_CONSTEXPR double - atof(Char const* str) { - return sprout::str_to_float(str); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTDLIB_ATOF_HPP diff --git a/dsp/lib/sprout/sprout/cstdlib/atoi.hpp b/dsp/lib/sprout/sprout/cstdlib/atoi.hpp deleted file mode 100644 index b22e166..0000000 --- a/dsp/lib/sprout/sprout/cstdlib/atoi.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTDLIB_ATOI_HPP -#define SPROUT_CSTDLIB_ATOI_HPP - -#include -#include - -namespace sprout { - // - // atoi - // - inline SPROUT_CONSTEXPR int - atoi(char const* str) { - return sprout::ascii_to_int(str); - } - template - inline SPROUT_CONSTEXPR int - atoi(Char const* str) { - return sprout::ascii_to_int(str); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTDLIB_ATOI_HPP diff --git a/dsp/lib/sprout/sprout/cstdlib/atol.hpp b/dsp/lib/sprout/sprout/cstdlib/atol.hpp deleted file mode 100644 index 4a63251..0000000 --- a/dsp/lib/sprout/sprout/cstdlib/atol.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTDLIB_ATOL_HPP -#define SPROUT_CSTDLIB_ATOL_HPP - -#include -#include - -namespace sprout { - // - // atol - // - inline SPROUT_CONSTEXPR long - atol(char const* str) { - return sprout::ascii_to_int(str); - } - template - inline SPROUT_CONSTEXPR long - atol(Char const* str) { - return sprout::ascii_to_int(str); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTDLIB_ATOL_HPP diff --git a/dsp/lib/sprout/sprout/cstdlib/atoll.hpp b/dsp/lib/sprout/sprout/cstdlib/atoll.hpp deleted file mode 100644 index 213a571..0000000 --- a/dsp/lib/sprout/sprout/cstdlib/atoll.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTDLIB_ATOLL_HPP -#define SPROUT_CSTDLIB_ATOLL_HPP - -#include -#include - -namespace sprout { - // - // atoll - // - inline SPROUT_CONSTEXPR long long - atoll(char const* str) { - return sprout::ascii_to_int(str); - } - template - inline SPROUT_CONSTEXPR long long - atoll(Char const* str) { - return sprout::ascii_to_int(str); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTDLIB_ATOLL_HPP diff --git a/dsp/lib/sprout/sprout/cstdlib/conversion.hpp b/dsp/lib/sprout/sprout/cstdlib/conversion.hpp deleted file mode 100644 index 7ecda44..0000000 --- a/dsp/lib/sprout/sprout/cstdlib/conversion.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTDLIB_CONVERSION_HPP -#define SPROUT_CSTDLIB_CONVERSION_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_CSTDLIB_CONVERSION_HPP diff --git a/dsp/lib/sprout/sprout/cstdlib/div.hpp b/dsp/lib/sprout/sprout/cstdlib/div.hpp deleted file mode 100644 index 772b726..0000000 --- a/dsp/lib/sprout/sprout/cstdlib/div.hpp +++ /dev/null @@ -1,540 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTDLIB_DIV_HPP -#define SPROUT_CSTDLIB_DIV_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // div_t - // ldiv_t - // lldiv_t - // - typedef std::div_t div_t; - typedef std::ldiv_t ldiv_t; - typedef std::lldiv_t lldiv_t; - - namespace detail { - template - struct div_t_traits {}; - -# define SPROUT_DETAIL_DIV_T_TRAITS_IMPL(INT_T, DIV_T) \ - template<> \ - struct div_t_traits { \ - public: \ - typedef DIV_T type; \ - SPROUT_STATIC_CONSTEXPR std::size_t offsetof_quot = offsetof(DIV_T, quot); \ - SPROUT_STATIC_CONSTEXPR std::size_t offsetof_rem = offsetof(DIV_T, rem); \ - } - - SPROUT_DETAIL_DIV_T_TRAITS_IMPL(int, sprout::div_t); - SPROUT_DETAIL_DIV_T_TRAITS_IMPL(long, sprout::ldiv_t); - SPROUT_DETAIL_DIV_T_TRAITS_IMPL(long long, sprout::lldiv_t); -# undef SPROUT_DETAIL_DIV_T_TRAITS_IMPL - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::detail::div_t_traits::offsetof_quot == 0, - typename sprout::detail::div_t_traits::type - >::type - div_impl(T const& numer, T const& denom) { -#if defined(_MSC_VER) && (_MSC_VER > 1900) - typename sprout::detail::div_t_traits::type result = {numer / denom, numer % denom}; - return result; -#else - return {numer / denom, numer % denom}; -#endif - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::detail::div_t_traits::offsetof_rem == 0, - typename sprout::detail::div_t_traits::type - >::type - div_impl(T const& numer, T const& denom) { -#if defined(_MSC_VER) - typename sprout::detail::div_t_traits::type result = {numer % denom, numer / denom}; - return result; -#else - return {numer % denom, numer / denom}; -#endif - } - } // namespace detail - - // 7.20.6.2 div, ldiv, and lldiv function - inline SPROUT_CONSTEXPR sprout::div_t - div(int numer, int denom) { - return sprout::detail::div_impl(numer, denom); - } - - inline SPROUT_CONSTEXPR sprout::ldiv_t - ldiv(long numer, long denom) { - return sprout::detail::div_impl(numer, denom); - } - - inline SPROUT_CONSTEXPR sprout::lldiv_t - lldiv(long long numer, long long denom) { - return sprout::detail::div_impl(numer, denom); - } - - inline SPROUT_CONSTEXPR sprout::ldiv_t - div(long numer, long denom) { - return sprout::ldiv(numer, denom); - } - - inline SPROUT_CONSTEXPR sprout::lldiv_t - div(long long numer, long long denom) { - return sprout::lldiv(numer, denom); - } -} // namespace sprout - -namespace sprout { - // - // hash_value - // - inline SPROUT_CONSTEXPR std::size_t - hash_value(sprout::div_t const& v) { - return sprout::hash_values(v.quot, v.rem); - } - inline SPROUT_CONSTEXPR std::size_t - hash_value(sprout::ldiv_t const& v) { - return sprout::hash_values(v.quot, v.rem); - } - inline SPROUT_CONSTEXPR std::size_t - hash_value(sprout::lldiv_t const& v) { - return sprout::hash_values(v.quot, v.rem); - } -} // namespace sprout - -namespace sprout { - namespace tuples { - namespace detail { - template - struct tuple_element_impl; - template - struct tuple_element_impl - : public sprout::detail::nil_base - {}; - template<> - struct tuple_element_impl<0, sprout::div_t> - : public sprout::identity - {}; - template<> - struct tuple_element_impl<1, sprout::div_t> - : public sprout::identity - {}; - template - struct tuple_element_impl - : public sprout::detail::nil_base - {}; - template<> - struct tuple_element_impl<0, sprout::ldiv_t> - : public sprout::identity - {}; - template<> - struct tuple_element_impl<1, sprout::ldiv_t> - : public sprout::identity - {}; - template - struct tuple_element_impl - : public sprout::detail::nil_base - {}; - template<> - struct tuple_element_impl<0, sprout::lldiv_t> - : public sprout::identity - {}; - template<> - struct tuple_element_impl<1, sprout::lldiv_t> - : public sprout::identity - {}; - - template - struct get_impl; - template<> - struct get_impl<0, sprout::div_t> { - public: - SPROUT_CONSTEXPR int& operator()(sprout::div_t& t) const { - return t.quot; - } - SPROUT_CONSTEXPR int const& operator()(sprout::div_t const& t) const { - return t.quot; - } - }; - template<> - struct get_impl<1, sprout::div_t> { - public: - SPROUT_CONSTEXPR int& operator()(sprout::div_t& t) const { - return t.rem; - } - SPROUT_CONSTEXPR int const& operator()(sprout::div_t const& t) const { - return t.rem; - } - }; - template<> - struct get_impl<0, sprout::ldiv_t> { - public: - SPROUT_CONSTEXPR long& operator()(sprout::ldiv_t& t) const { - return t.quot; - } - SPROUT_CONSTEXPR long const& operator()(sprout::ldiv_t const& t) const { - return t.quot; - } - }; - template<> - struct get_impl<1, sprout::ldiv_t> { - public: - SPROUT_CONSTEXPR long& operator()(sprout::ldiv_t& t) const { - return t.rem; - } - SPROUT_CONSTEXPR long const& operator()(sprout::ldiv_t const& t) const { - return t.rem; - } - }; - template<> - struct get_impl<0, sprout::lldiv_t> { - public: - SPROUT_CONSTEXPR long long& operator()(sprout::lldiv_t& t) const { - return t.quot; - } - SPROUT_CONSTEXPR long long const& operator()(sprout::lldiv_t const& t) const { - return t.quot; - } - }; - template<> - struct get_impl<1, sprout::lldiv_t> { - public: - SPROUT_CONSTEXPR long long& operator()(sprout::lldiv_t& t) const { - return t.rem; - } - SPROUT_CONSTEXPR long long const& operator()(sprout::lldiv_t const& t) const { - return t.rem; - } - }; - } // namespace detail - } // namespace tuples -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // tuple_size - // - template<> - struct tuple_size - : public sprout::integral_constant - {}; - template<> - struct tuple_size - : public sprout::integral_constant - {}; - template<> - struct tuple_size - : public sprout::integral_constant - {}; - - // - // tuple_element - // - template - struct tuple_element - : public sprout::tuples::detail::tuple_element_impl - {}; - template - struct tuple_element - : public sprout::tuples::detail::tuple_element_impl - {}; - template - struct tuple_element - : public sprout::tuples::detail::tuple_element_impl - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -namespace sprout { - // - // tuple_get - // - template - inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element::type& - tuple_get(sprout::div_t& t) SPROUT_NOEXCEPT { - static_assert(I < 2, "tuple_get: index out of range"); - return sprout::tuples::detail::get_impl()(t); - } - template - inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element::type const& - tuple_get(sprout::div_t const& t) SPROUT_NOEXCEPT { - static_assert(I < 2, "tuple_get: index out of range"); - return sprout::tuples::detail::get_impl()(t); - } - template - inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element::type&& - tuple_get(sprout::div_t&& t) SPROUT_NOEXCEPT { - return sprout::move(sprout::tuples::get(t)); - } - template - inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element::type& - tuple_get(sprout::ldiv_t& t) SPROUT_NOEXCEPT { - static_assert(I < 2, "tuple_get: index out of range"); - return sprout::tuples::detail::get_impl()(t); - } - template - inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element::type const& - tuple_get(sprout::ldiv_t const& t) SPROUT_NOEXCEPT { - static_assert(I < 2, "tuple_get: index out of range"); - return sprout::tuples::detail::get_impl()(t); - } - template - inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element::type&& - tuple_get(sprout::ldiv_t&& t) SPROUT_NOEXCEPT { - return sprout::move(sprout::tuples::get(t)); - } - template - inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element::type& - tuple_get(sprout::lldiv_t& t) SPROUT_NOEXCEPT { - static_assert(I < 2, "tuple_get: index out of range"); - return sprout::tuples::detail::get_impl()(t); - } - template - inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element::type const& - tuple_get(sprout::lldiv_t const& t) SPROUT_NOEXCEPT { - static_assert(I < 2, "tuple_get: index out of range"); - return sprout::tuples::detail::get_impl()(t); - } - template - inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element::type&& - tuple_get(sprout::lldiv_t&& t) SPROUT_NOEXCEPT { - return sprout::move(sprout::tuples::get(t)); - } -} // namespace sprout - -namespace sprout { - namespace detail { - template - SPROUT_CONSTEXPR typename std::remove_reference().quot)>::type& - div_at(Div& d, std::size_t i) { - return i == 0 ? d.quot - : i == 1 ? d.rem - : (throw std::out_of_range("div_at: index out of range"), d.quot) - ; - } - template - SPROUT_CONSTEXPR typename std::remove_reference().quot)>::type const& - div_at(Div const& d, std::size_t i) { - return i == 0 ? d.quot - : i == 1 ? d.rem - : (throw std::out_of_range("div_at: index out of range"), d.quot) - ; - } - - template - struct div_at_f; - template<> - struct div_at_f - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(sprout::detail::div_at(std::declval(), std::declval())) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(sprout::detail::div_at(std::declval(), std::declval())) - { - return sprout::detail::div_at(SPROUT_FORWARD(T, x), SPROUT_FORWARD(U, y)); - } - }; - } // namespace detail - - // - // container_traits - // -# define SPROUT_DETAIL_DIV_T_CONTAINER_TRAITS_IMPL(INT_T, DIV_T) \ - template<> \ - struct container_traits \ - : public sprout::detail::base_static_size \ - { \ - public: \ - typedef INT_T value_type; \ - typedef sprout::index_iterator > iterator; \ - typedef sprout::index_iterator > const_iterator; \ - typedef INT_T& reference; \ - typedef INT_T const& const_reference; \ - typedef std::size_t size_type; \ - typedef std::ptrdiff_t difference_type; \ - typedef INT_T* pointer; \ - typedef INT_T const* const_pointer; \ - typedef sprout::reverse_iterator reverse_iterator; \ - typedef sprout::reverse_iterator const_reverse_iterator; \ - } - - SPROUT_DETAIL_DIV_T_CONTAINER_TRAITS_IMPL(int, sprout::div_t); - SPROUT_DETAIL_DIV_T_CONTAINER_TRAITS_IMPL(long, sprout::ldiv_t); - SPROUT_DETAIL_DIV_T_CONTAINER_TRAITS_IMPL(long long, sprout::lldiv_t); - - // - // container_range_traits - // -# define SPROUT_DETAIL_DIV_T_CONTAINER_RANGE_TRAITS_IMPL(INT_T, DIV_T) \ - template<> \ - struct container_range_traits { \ - public: \ - static SPROUT_CONSTEXPR typename sprout::container_traits::iterator \ - range_begin(DIV_T& t) { \ - typedef typename sprout::container_traits::iterator type; \ - return type(t, 0); \ - } \ - static SPROUT_CONSTEXPR typename sprout::container_traits::iterator \ - range_begin(DIV_T const& t) { \ - typedef typename sprout::container_traits::iterator type; \ - return type(t, 0); \ - } \ - static SPROUT_CONSTEXPR typename sprout::container_traits::iterator \ - range_end(DIV_T& t) { \ - typedef typename sprout::container_traits::iterator type; \ - return type(t, 2); \ - } \ - static SPROUT_CONSTEXPR typename sprout::container_traits::iterator \ - range_end(DIV_T const& t) { \ - typedef typename sprout::container_traits::iterator type; \ - return type(t, 2); \ - } \ - \ - static SPROUT_CONSTEXPR typename sprout::container_traits::size_type \ - range_size(DIV_T const&) { \ - return 2; \ - } \ - static SPROUT_CONSTEXPR bool \ - range_empty(DIV_T const&) { \ - return false; \ - } \ - \ - static SPROUT_CONSTEXPR typename sprout::container_traits::reference \ - range_front(DIV_T& t) { \ - return sprout::detail::div_at(t, 0); \ - } \ - static SPROUT_CONSTEXPR typename sprout::container_traits::reference \ - range_front(DIV_T const& t) { \ - return sprout::detail::div_at(t, 0); \ - } \ - static SPROUT_CONSTEXPR typename sprout::container_traits::reference \ - range_back(DIV_T& t) { \ - return sprout::detail::div_at(t, 1); \ - } \ - static SPROUT_CONSTEXPR typename sprout::container_traits::reference \ - range_back(DIV_T const& t) { \ - return sprout::detail::div_at(t, 1); \ - } \ - static SPROUT_CONSTEXPR typename sprout::container_traits::reference \ - range_at(DIV_T& t, typename sprout::container_traits::size_type i) { \ - return sprout::detail::div_at(t, i); \ - } \ - static SPROUT_CONSTEXPR typename sprout::container_traits::reference \ - range_at(DIV_T const& t, typename sprout::container_traits::size_type i) { \ - return sprout::detail::div_at(t, i); \ - } \ - static SPROUT_CONSTEXPR typename sprout::container_traits::iterator \ - range_nth(DIV_T& t, typename sprout::container_traits::size_type i) { \ - typedef typename sprout::container_traits::iterator type; \ - return type(t, 0) + i; \ - } \ - static SPROUT_CONSTEXPR typename sprout::container_traits::iterator \ - range_nth(DIV_T const& t, typename sprout::container_traits::size_type i) { \ - typedef typename sprout::container_traits::iterator type; \ - return type(t, 0) + i; \ - } \ - static SPROUT_CONSTEXPR typename sprout::container_traits::size_type \ - range_index_of(DIV_T& t, typename sprout::container_traits::iterator p) { \ - typedef typename sprout::container_traits::iterator type; \ - return sprout::distance(type(t, 0), p); \ - } \ - static SPROUT_CONSTEXPR typename sprout::container_traits::size_type \ - range_index_of(DIV_T const& t, typename sprout::container_traits::iterator p) { \ - typedef typename sprout::container_traits::iterator type; \ - return sprout::distance(type(t, 0), p); \ - } \ - } - - SPROUT_DETAIL_DIV_T_CONTAINER_RANGE_TRAITS_IMPL(int, sprout::div_t); - SPROUT_DETAIL_DIV_T_CONTAINER_RANGE_TRAITS_IMPL(long, sprout::ldiv_t); - SPROUT_DETAIL_DIV_T_CONTAINER_RANGE_TRAITS_IMPL(long long, sprout::lldiv_t); - - // - // container_construct_traits - // -# define SPROUT_DETAIL_DIV_T_CONTAINER_CONSTRUCT_TRAITS_IMPL(INT_T, DIV_T) \ - template<> \ - struct container_construct_traits { \ - public: \ - typedef DIV_T copied_type; \ - public: \ - template \ - static SPROUT_CONSTEXPR copied_type \ - deep_copy(Cont&& cont) { \ - return SPROUT_FORWARD(Cont, cont); \ - } \ - template \ - static SPROUT_CONSTEXPR copied_type \ - make(Args&&... args) { \ - return sprout::detail::div_impl(SPROUT_FORWARD(Args, args)...); \ - } \ - template \ - static SPROUT_CONSTEXPR copied_type \ - remake(Cont&&, typename sprout::container_traits::difference_type size, Args&&... args) { \ - return sprout::detail::div_impl(SPROUT_FORWARD(Args, args)...); \ - } \ - } - - SPROUT_DETAIL_DIV_T_CONTAINER_CONSTRUCT_TRAITS_IMPL(int, sprout::div_t); - SPROUT_DETAIL_DIV_T_CONTAINER_CONSTRUCT_TRAITS_IMPL(long, sprout::ldiv_t); - SPROUT_DETAIL_DIV_T_CONTAINER_CONSTRUCT_TRAITS_IMPL(long long, sprout::lldiv_t); - - // - // container_transform_traits - // -# define SPROUT_DETAIL_DIV_T_CONTAINER_TRANSFORM_TRAITS_IMPL(INT_T, DIV_T) \ - template<> \ - struct container_transform_traits { \ - public: \ - template \ - struct rebind_type { \ - public: \ - typedef typename sprout::detail::div_t_traits::type type; \ - }; \ - } - - SPROUT_DETAIL_DIV_T_CONTAINER_TRANSFORM_TRAITS_IMPL(int, sprout::div_t); - SPROUT_DETAIL_DIV_T_CONTAINER_TRANSFORM_TRAITS_IMPL(long, sprout::ldiv_t); - SPROUT_DETAIL_DIV_T_CONTAINER_TRANSFORM_TRAITS_IMPL(long long, sprout::lldiv_t); -} // namespace sprout - -#endif // #ifndef SPROUT_CSTDLIB_DIV_HPP diff --git a/dsp/lib/sprout/sprout/cstdlib/str_to_float.hpp b/dsp/lib/sprout/sprout/cstdlib/str_to_float.hpp deleted file mode 100644 index 9c56ca8..0000000 --- a/dsp/lib/sprout/sprout/cstdlib/str_to_float.hpp +++ /dev/null @@ -1,294 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTDLIB_STR_TO_FLOAT_HPP -#define SPROUT_CSTDLIB_STR_TO_FLOAT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR FloatType - str_to_float_impl_scale( - NullTerminatedIterator const& str, - bool negative, - FloatType number = FloatType(), - std::size_t num_digits = 0, - std::size_t num_decimals = 0, - long exponent = 0, - long n = 0, - FloatType p10 = FloatType(10) - ) - { - return n ? sprout::detail::str_to_float_impl_scale( - str, - negative, - n & 1 ? (exponent < 0 ? number / p10 : number * p10) : number, - num_digits, - num_decimals, - exponent, - n >> 1, - p10 * p10 - ) - : number - ; - } - template - inline SPROUT_CONSTEXPR FloatType - str_to_float_impl_exponent_2( - NullTerminatedIterator const& str, - bool negative, - FloatType number = FloatType(), - std::size_t num_digits = 0, - std::size_t num_decimals = 0, - long exponent = 0 - ) - { - return exponent >= sprout::numeric_limits::min_exponent - && exponent <= sprout::numeric_limits::max_exponent - ? sprout::detail::str_to_float_impl_scale( - str, - negative, - number, - num_digits, - num_decimals, - exponent, - exponent < 0 ? -exponent : exponent - ) - : HUGE_VAL - ; - } - template - inline SPROUT_CONSTEXPR FloatType - str_to_float_impl_exponent_1( - NullTerminatedIterator const& str, - bool negative, - FloatType number = FloatType(), - std::size_t num_digits = 0, - std::size_t num_decimals = 0, - long exponent = 0, - long n = 0 - ) - { - typedef typename std::iterator_traits::value_type char_type; - SPROUT_STATIC_ASSERT(sprout::detail::is_char_type_of_consecutive_digits::value); - return sprout::ascii::isdigit(*str) ? sprout::detail::str_to_float_impl_exponent_1( - sprout::next(str), - negative, - number, - num_digits, - num_decimals, - exponent, - n * 10 + (*str - SPROUT_CHAR_LITERAL('0', char_type)) - ) - : sprout::detail::str_to_float_impl_exponent_2( - str, - negative, - number, - num_digits, - num_decimals, - negative ? exponent + n : exponent - n - ) - ; - } - template - inline SPROUT_CONSTEXPR FloatType - str_to_float_impl_exponent( - NullTerminatedIterator const& str, - bool negative, - FloatType number = FloatType(), - std::size_t num_digits = 0, - std::size_t num_decimals = 0, - long exponent = 0 - ) - { - typedef typename std::iterator_traits::value_type char_type; - return (*str == SPROUT_CHAR_LITERAL('e', char_type) || *str == SPROUT_CHAR_LITERAL('E', char_type)) - ? *sprout::next(str) == SPROUT_CHAR_LITERAL('-', char_type) - ? sprout::detail::str_to_float_impl_exponent_1( - sprout::next(str, 2), - true, - number, - num_digits, - num_decimals, - exponent - ) - : sprout::detail::str_to_float_impl_exponent_1( - sprout::next(str, 2), - false, - number, - num_digits, - num_decimals, - exponent - ) - : sprout::detail::str_to_float_impl_exponent_2( - str, - negative, - number, - num_digits, - num_decimals, - exponent - ) - ; - } - template - inline SPROUT_CONSTEXPR FloatType - str_to_float_impl_decimal_1( - NullTerminatedIterator const& str, - bool negative, - FloatType number = FloatType(), - std::size_t num_digits = 0, - std::size_t num_decimals = 0, - long exponent = 0 - ) - { - return num_digits == 0 ? FloatType() - : sprout::detail::str_to_float_impl_exponent( - str, - negative, - negative ? -number : number, - num_digits, - num_decimals, - exponent - ) - ; - } - template - inline SPROUT_CONSTEXPR FloatType - str_to_float_impl_decimal( - NullTerminatedIterator const& str, - bool negative, - FloatType number = FloatType(), - std::size_t num_digits = 0, - std::size_t num_decimals = 0, - long exponent = 0 - ) - { - typedef typename std::iterator_traits::value_type char_type; - SPROUT_STATIC_ASSERT(sprout::detail::is_char_type_of_consecutive_digits::value); - return sprout::ascii::isdigit(*str) ? sprout::detail::str_to_float_impl_decimal( - sprout::next(str), - negative, - number * 10 + (*str - SPROUT_CHAR_LITERAL('0', char_type)), - num_digits + 1, - num_decimals + 1, - exponent - ) - : sprout::detail::str_to_float_impl_decimal_1( - str, - negative, - number, - num_digits, - num_decimals, - exponent - num_decimals - ) - ; - } - - template - inline SPROUT_CONSTEXPR FloatType - str_to_float_impl( - NullTerminatedIterator const& str, - bool negative, - FloatType number = FloatType(), - std::size_t num_digits = 0 - ) - { - typedef typename std::iterator_traits::value_type char_type; - SPROUT_STATIC_ASSERT(sprout::detail::is_char_type_of_consecutive_digits::value); - return sprout::ascii::isdigit(*str) ? sprout::detail::str_to_float_impl( - sprout::next(str), - negative, - number * 10 + (*str - SPROUT_CHAR_LITERAL('0', char_type)), - num_digits + 1 - ) - : *str == SPROUT_CHAR_LITERAL('.', char_type) ? sprout::detail::str_to_float_impl_decimal( - sprout::next(str), - negative, - number, - num_digits - ) - : sprout::detail::str_to_float_impl_decimal_1( - str, - negative, - number, - num_digits - ) - ; - } - template - inline SPROUT_CONSTEXPR FloatType - str_to_float(NullTerminatedIterator const& str) { - typedef typename std::iterator_traits::value_type char_type; - return sprout::ascii::isspace(*str) - ? sprout::detail::str_to_float(sprout::next(str)) - : *str == SPROUT_CHAR_LITERAL('-', char_type) - ? sprout::detail::str_to_float_impl(sprout::next(str), true) - : *str == SPROUT_CHAR_LITERAL('+', char_type) - ? sprout::detail::str_to_float_impl(sprout::next(str), false) - : sprout::detail::str_to_float_impl(str, false) - ; - } - template - inline SPROUT_CONSTEXPR FloatType - str_to_float(NullTerminatedIterator const& str, CharPtr* endptr) { - return !endptr ? sprout::detail::str_to_float(str) -#if defined(__MINGW32__) - : std::is_same::type, float>::value ? ::strtof(&*str, endptr) - : std::is_same::type, double>::value ? std::strtod(&*str, endptr) - : ::strtold(&*str, endptr) -#else - : std::is_same::type, float>::value ? std::strtof(&*str, endptr) - : std::is_same::type, double>::value ? std::strtod(&*str, endptr) - : std::strtold(&*str, endptr) -#endif - ; - } - } // namespace detail - - // - // str_to_float - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_floating_point::value, - FloatType - >::type - str_to_float(Char const* str, Char** endptr) { - return sprout::detail::str_to_float(str, endptr); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_floating_point::value, - FloatType - >::type - str_to_float(Char const* str, std::nullptr_t) { - return sprout::detail::str_to_float(str); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_floating_point::value, - FloatType - >::type - str_to_float(Char const* str) { - return sprout::detail::str_to_float(str); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTDLIB_STR_TO_FLOAT_HPP diff --git a/dsp/lib/sprout/sprout/cstdlib/str_to_int.hpp b/dsp/lib/sprout/sprout/cstdlib/str_to_int.hpp deleted file mode 100644 index 9c9a919..0000000 --- a/dsp/lib/sprout/sprout/cstdlib/str_to_int.hpp +++ /dev/null @@ -1,165 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTDLIB_STR_TO_INT_HPP -#define SPROUT_CSTDLIB_STR_TO_INT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#if !defined(_MSC_VER) -# include -#endif - -namespace sprout { - namespace detail { - // Copyright (c) 2011 osyo-manga : http://d.hatena.ne.jp/osyo-manga/ - - template - inline SPROUT_CONSTEXPR IntType - str_to_int_impl_1(NullTerminatedIterator const& str, int base, IntType val, IntType x, bool negative) { - return x == static_cast(-1) ? (negative ? -1 * val : val) - : val > (sprout::numeric_limits::max() - x - (negative ? 1 : 0)) / base - ? (negative ? sprout::numeric_limits::min() : sprout::numeric_limits::max()) - : sprout::detail::str_to_int_impl_1( - sprout::next(str), - base, - val * base + x, - sprout::detail::char_to_int(*sprout::next(str), base), - negative - ) - ; - } - template - inline SPROUT_CONSTEXPR IntType - str_to_int_impl(NullTerminatedIterator const& str, int base, bool negative) { - typedef typename std::iterator_traits::value_type char_type; - return *str == SPROUT_CHAR_LITERAL('0', char_type) - ? *sprout::next(str) == SPROUT_CHAR_LITERAL('x', char_type) - || *sprout::next(str) == SPROUT_CHAR_LITERAL('X', char_type) - ? sprout::detail::str_to_int_impl_1( - sprout::next(str, 2), - base ? base : 16, - IntType(), - sprout::detail::char_to_int(*sprout::next(str, 2), base ? base : 16), - negative - ) - : sprout::detail::str_to_int_impl_1( - sprout::next(str), - base ? base : 8, - IntType(), - sprout::detail::char_to_int(*sprout::next(str), base ? base : 8), - negative - ) - : sprout::detail::str_to_int_impl_1( - str, - base ? base : 10, - IntType(), - sprout::detail::char_to_int(*str, base ? base : 10), - negative - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_unsigned::value, - IntType - >::type - str_to_int(NullTerminatedIterator const& str, int base) { - typedef typename std::iterator_traits::value_type char_type; - return sprout::ascii::isspace(*str) - ? sprout::detail::str_to_int(sprout::next(str), base) - : *str == SPROUT_CHAR_LITERAL('+', char_type) - ? sprout::detail::str_to_int_impl(sprout::next(str), base, false) - : sprout::detail::str_to_int_impl(str, base, false) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_signed::value, - IntType - >::type - str_to_int(NullTerminatedIterator const& str, int base) { - typedef typename std::iterator_traits::value_type char_type; - return sprout::ascii::isspace(*str) - ? sprout::detail::str_to_int(sprout::next(str), base) - : *str == SPROUT_CHAR_LITERAL('-', char_type) - ? sprout::detail::str_to_int_impl(sprout::next(str), base, true) - : *str == SPROUT_CHAR_LITERAL('+', char_type) - ? sprout::detail::str_to_int_impl(sprout::next(str), base, false) - : sprout::detail::str_to_int_impl(str, base, false) - ; - } - template - inline SPROUT_CONSTEXPR IntType - str_to_int(NullTerminatedIterator const& str, CharPtr* endptr, int base) { - return !endptr ? sprout::detail::str_to_int(str, base) -#if defined(_MSC_VER) - : sprout::is_signed::value - ? static_cast(std::strtol(&*str, endptr, base)) - : static_cast(std::strtoul(&*str, endptr, base)) -#elif defined(__MINGW32__) - : sprout::is_signed::value - ? sizeof(IntType) <= sizeof(long) ? static_cast(std::strtol(&*str, endptr, base)) - : sizeof(IntType) <= sizeof(long long) ? static_cast(::strtoll(&*str, endptr, base)) - : static_cast(std::strtoimax(&*str, endptr, base)) - : sizeof(IntType) <= sizeof(unsigned long) ? static_cast(std::strtoul(&*str, endptr, base)) - : sizeof(IntType) <= sizeof(unsigned long long) ? static_cast(::strtoull(&*str, endptr, base)) - : static_cast(std::strtoumax(&*str, endptr, base)) -#else - : sprout::is_signed::value - ? sizeof(IntType) <= sizeof(long) ? static_cast(std::strtol(&*str, endptr, base)) - : sizeof(IntType) <= sizeof(long long) ? static_cast(std::strtoll(&*str, endptr, base)) - : static_cast(std::strtoimax(&*str, endptr, base)) - : sizeof(IntType) <= sizeof(unsigned long) ? static_cast(std::strtoul(&*str, endptr, base)) - : sizeof(IntType) <= sizeof(unsigned long long) ? static_cast(std::strtoull(&*str, endptr, base)) - : static_cast(std::strtoumax(&*str, endptr, base)) -#endif - ; - } - } // namespace detail - - // - // str_to_int - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - IntType - >::type - str_to_int(Char const* str, Char** endptr, int base = 10) { - return sprout::detail::str_to_int(str, endptr, base); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - IntType - >::type - str_to_int(Char const* str, std::nullptr_t, int base = 10) { - return sprout::detail::str_to_int(str, base); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - IntType - >::type - str_to_int(Char const* str, int base = 10) { - return sprout::detail::str_to_int(str, base); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTDLIB_STR_TO_INT_HPP diff --git a/dsp/lib/sprout/sprout/cstdlib/strtod.hpp b/dsp/lib/sprout/sprout/cstdlib/strtod.hpp deleted file mode 100644 index 18308e9..0000000 --- a/dsp/lib/sprout/sprout/cstdlib/strtod.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTDLIB_STRTOD_HPP -#define SPROUT_CSTDLIB_STRTOD_HPP - -#include -#include -#include - -namespace sprout { - // - // strtod - // - template - inline SPROUT_CONSTEXPR double - strtod(Char const* str, Char** endptr) { - return sprout::str_to_float(str, endptr); - } - template - inline SPROUT_CONSTEXPR double - strtod(Char const* str, std::nullptr_t) { - return sprout::str_to_float(str); - } - template - inline SPROUT_CONSTEXPR double - strtod(Char const* str) { - return sprout::str_to_float(str); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTDLIB_STRTOD_HPP diff --git a/dsp/lib/sprout/sprout/cstdlib/strtof.hpp b/dsp/lib/sprout/sprout/cstdlib/strtof.hpp deleted file mode 100644 index fad3239..0000000 --- a/dsp/lib/sprout/sprout/cstdlib/strtof.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTDLIB_STRTOF_HPP -#define SPROUT_CSTDLIB_STRTOF_HPP - -#include -#include -#include - -namespace sprout { - // - // strtof - // - template - inline SPROUT_CONSTEXPR float - strtof(Char const* str, Char** endptr) { - return sprout::str_to_float(str, endptr); - } - template - inline SPROUT_CONSTEXPR float - strtof(Char const* str, std::nullptr_t) { - return sprout::str_to_float(str); - } - template - inline SPROUT_CONSTEXPR float - strtof(Char const* str) { - return sprout::str_to_float(str); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTDLIB_STRTOF_HPP diff --git a/dsp/lib/sprout/sprout/cstdlib/strtol.hpp b/dsp/lib/sprout/sprout/cstdlib/strtol.hpp deleted file mode 100644 index b70a9ce..0000000 --- a/dsp/lib/sprout/sprout/cstdlib/strtol.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTDLIB_STRTOL_HPP -#define SPROUT_CSTDLIB_STRTOL_HPP - -#include -#include -#include - -namespace sprout { - // - // strtol - // - inline SPROUT_CONSTEXPR long - strtol(char const* str, char** endptr, int base = 10) { - return sprout::str_to_int(str, endptr, base); - } - template - inline SPROUT_CONSTEXPR long - strtol(Char const* str, Char** endptr, int base = 10) { - return sprout::str_to_int(str, endptr, base); - } - template - inline SPROUT_CONSTEXPR long - strtol(Char const* str, std::nullptr_t, int base = 10) { - return sprout::str_to_int(str, base); - } - template - inline SPROUT_CONSTEXPR long - strtol(Char const* str, int base = 10) { - return sprout::str_to_int(str, base); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTDLIB_STRTOL_HPP diff --git a/dsp/lib/sprout/sprout/cstdlib/strtold.hpp b/dsp/lib/sprout/sprout/cstdlib/strtold.hpp deleted file mode 100644 index 3531706..0000000 --- a/dsp/lib/sprout/sprout/cstdlib/strtold.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTDLIB_STRTOLD_HPP -#define SPROUT_CSTDLIB_STRTOLD_HPP - -#include -#include -#include - -namespace sprout { - // - // strtold - // - template - inline SPROUT_CONSTEXPR long double - strtold(Char const* str, Char** endptr) { - return sprout::str_to_float(str, endptr); - } - template - inline SPROUT_CONSTEXPR long double - strtold(Char const* str, std::nullptr_t) { - return sprout::str_to_float(str); - } - template - inline SPROUT_CONSTEXPR long double - strtold(Char const* str) { - return sprout::str_to_float(str); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTDLIB_STRTOLD_HPP diff --git a/dsp/lib/sprout/sprout/cstdlib/strtoll.hpp b/dsp/lib/sprout/sprout/cstdlib/strtoll.hpp deleted file mode 100644 index 89b46a6..0000000 --- a/dsp/lib/sprout/sprout/cstdlib/strtoll.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTDLIB_STRTOLL_HPP -#define SPROUT_CSTDLIB_STRTOLL_HPP - -#include -#include -#include - -namespace sprout { - // - // strtol - // - inline SPROUT_CONSTEXPR long long - strtoll(char const* str, char** endptr, int base = 10) { - return sprout::str_to_int(str, endptr, base); - } - template - inline SPROUT_CONSTEXPR long long - strtoll(Char const* str, Char** endptr, int base = 10) { - return sprout::str_to_int(str, endptr, base); - } - template - inline SPROUT_CONSTEXPR long long - strtoll(Char const* str, std::nullptr_t, int base = 10) { - return sprout::str_to_int(str, base); - } - template - inline SPROUT_CONSTEXPR long long - strtoll(Char const* str, int base = 10) { - return sprout::str_to_int(str, base); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTDLIB_STRTOLL_HPP diff --git a/dsp/lib/sprout/sprout/cstdlib/strtoul.hpp b/dsp/lib/sprout/sprout/cstdlib/strtoul.hpp deleted file mode 100644 index 2bc0e63..0000000 --- a/dsp/lib/sprout/sprout/cstdlib/strtoul.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTDLIB_STRTOUL_HPP -#define SPROUT_CSTDLIB_STRTOUL_HPP - -#include -#include -#include - -namespace sprout { - // - // strtoul - // - inline SPROUT_CONSTEXPR unsigned long - strtoul(char const* str, char** endptr, int base = 10) { - return sprout::str_to_int(str, endptr, base); - } - template - inline SPROUT_CONSTEXPR unsigned long - strtoul(Char const* str, Char** endptr, int base = 10) { - return sprout::str_to_int(str, endptr, base); - } - template - inline SPROUT_CONSTEXPR unsigned long - strtoul(Char const* str, std::nullptr_t, int base = 10) { - return sprout::str_to_int(str, base); - } - template - inline SPROUT_CONSTEXPR unsigned long - strtoul(Char const* str, int base = 10) { - return sprout::str_to_int(str, base); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTDLIB_STRTOUL_HPP diff --git a/dsp/lib/sprout/sprout/cstdlib/strtoull.hpp b/dsp/lib/sprout/sprout/cstdlib/strtoull.hpp deleted file mode 100644 index bc54531..0000000 --- a/dsp/lib/sprout/sprout/cstdlib/strtoull.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTDLIB_STRTTOULL_HPP -#define SPROUT_CSTDLIB_STRTTOULL_HPP - -#include -#include -#include - -namespace sprout { - // - // strtoul - // - inline SPROUT_CONSTEXPR unsigned long long - strtoull(char const* str, char** endptr, int base = 10) { - return sprout::str_to_int(str, endptr, base); - } - template - inline SPROUT_CONSTEXPR unsigned long long - strtoull(Char const* str, Char** endptr, int base = 10) { - return sprout::str_to_int(str, endptr, base); - } - template - inline SPROUT_CONSTEXPR unsigned long long - strtoull(Char const* str, std::nullptr_t, int base = 10) { - return sprout::str_to_int(str, base); - } - template - inline SPROUT_CONSTEXPR unsigned long long - strtoull(Char const* str, int base = 10) { - return sprout::str_to_int(str, base); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTDLIB_STRTTOULL_HPP diff --git a/dsp/lib/sprout/sprout/cstring.hpp b/dsp/lib/sprout/sprout/cstring.hpp deleted file mode 100644 index bfd93cc..0000000 --- a/dsp/lib/sprout/sprout/cstring.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTRING_HPP -#define SPROUT_CSTRING_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_CSTRING_HPP diff --git a/dsp/lib/sprout/sprout/cstring/memchr.hpp b/dsp/lib/sprout/sprout/cstring/memchr.hpp deleted file mode 100644 index 1a9345b..0000000 --- a/dsp/lib/sprout/sprout/cstring/memchr.hpp +++ /dev/null @@ -1,88 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTRING_MEMCHR_HPP -#define SPROUT_CSTRING_MEMCHR_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - struct memchr_result { - private: - static void const* test(void const*); - static void* test(void*); - static void test(...); - public: - typedef decltype(test(std::declval())) type; - }; - - template - inline SPROUT_CONSTEXPR PtrIterator - memchr_impl(PtrIterator found, PtrIterator last) { - return found == last ? nullptr - : found - ; - } - template - inline SPROUT_CONSTEXPR PtrIterator - memchr(PtrIterator s, T c, std::size_t n) { - return sprout::detail::memchr_impl( - sprout::ptr_unindex( - sprout::find( - sprout::ptr_index(s), sprout::ptr_index(s, n), - c - ) - ), - s + n - ); - } - } // namespace detail - - // 7.21.5.1 memchr function - // - // recursion depth: - // O(log N) - // -#if 0 - inline SPROUT_CONSTEXPR void const* - memchr(void const* s, int c, std::size_t n) { - return sprout::detail::memchr(static_cast(s), static_cast(c), n); - } - - inline SPROUT_CONSTEXPR void* - memchr(void* s, int c, std::size_t n) { - return sprout::detail::memchr(static_cast(s), static_cast(c), n); - } -#endif - template< - typename T, - typename sprout::enabler_if::type, void const*>::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR void const* - memchr(T s, int c, std::size_t n) { - return sprout::detail::memchr(static_cast(s), static_cast(c), n); - } - - template< - typename T, - typename sprout::enabler_if::type, void*>::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR void* - memchr(T s, int c, std::size_t n) { - return sprout::detail::memchr(static_cast(s), static_cast(c), n); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTRING_MEMCHR_HPP diff --git a/dsp/lib/sprout/sprout/cstring/memcmp.hpp b/dsp/lib/sprout/sprout/cstring/memcmp.hpp deleted file mode 100644 index 692a698..0000000 --- a/dsp/lib/sprout/sprout/cstring/memcmp.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTRING_MEMCMP_HPP -#define SPROUT_CSTRING_MEMCMP_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR int - memcmp(PtrIterator s1, PtrIterator s2, std::size_t n) { - return sprout::tristate_lexicographical_compare( - sprout::ptr_index(s1), sprout::ptr_index(s1, n), - sprout::ptr_index(s2), sprout::ptr_index(s2, n) - ); - } - } // namespace detail - - // 7.21.4.1 memcmp function - // - // recursion depth: - // O(log(N1+N2)) - // -#if 0 - inline SPROUT_CONSTEXPR int - memcmp(void const* s1, void const* s2, std::size_t n) { - return sprout::detail::memcmp(static_cast(s1), static_cast(s2), n); - } -#endif - template< - typename T, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR int - memcmp(T s1, T s2, std::size_t n) { - return sprout::detail::memcmp(static_cast(s1), static_cast(s2), n); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTRING_MEMCMP_HPP diff --git a/dsp/lib/sprout/sprout/cstring/memcpy.hpp b/dsp/lib/sprout/sprout/cstring/memcpy.hpp deleted file mode 100644 index 46d7bd0..0000000 --- a/dsp/lib/sprout/sprout/cstring/memcpy.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTRING_MEMCPY_HPP -#define SPROUT_CSTRING_MEMCPY_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CXX14_CONSTEXPR PtrIterator - memcpy(PtrIterator s1, ConstPtrIterator s2, std::size_t n) { - sprout::copy(s2, s2 + n, s1); - return s1; - } - } // namespace detail - - // 7.21.2.1 The memcpy function - // - template< - typename T, typename CT, - typename sprout::enabler_if::value && std::is_convertible::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR void* - memcpy(T s1, CT s2, std::size_t n) { - return sprout::detail::memcpy(static_cast(s1), static_cast(s2), n); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTRING_MEMCPY_HPP diff --git a/dsp/lib/sprout/sprout/cstring/memmove.hpp b/dsp/lib/sprout/sprout/cstring/memmove.hpp deleted file mode 100644 index b301041..0000000 --- a/dsp/lib/sprout/sprout/cstring/memmove.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTRING_MEMMOVE_HPP -#define SPROUT_CSTRING_MEMMOVE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CXX14_CONSTEXPR PtrIterator - memmove(PtrIterator s1, ConstPtrIterator s2, std::size_t n) { - sprout::copy_backward(s2, s2 + n, s1); - return s1; - } - } // namespace detail - - // 7.21.2.2 The memmove function - // - template< - typename T, typename CT, - typename sprout::enabler_if::value && std::is_convertible::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR void* - memmove(T s1, CT s2, std::size_t n) { - return sprout::detail::memmove(static_cast(s1), static_cast(s2), n); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTRING_MEMMOVE_HPP diff --git a/dsp/lib/sprout/sprout/cstring/memset.hpp b/dsp/lib/sprout/sprout/cstring/memset.hpp deleted file mode 100644 index e3273a7..0000000 --- a/dsp/lib/sprout/sprout/cstring/memset.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTRING_MEMSET_HPP -#define SPROUT_CSTRING_MEMSET_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CXX14_CONSTEXPR PtrIterator - memset(PtrIterator s, T c, std::size_t n) { - sprout::fill(s, s + n, c); - return s; - } - } // namespace detail - - // 7.21.6.1 The memset function - // - template< - typename T, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR void* - memset(T s, int c, std::size_t n) { - return sprout::detail::memset(static_cast(s), static_cast(c), n); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTRING_MEMSET_HPP diff --git a/dsp/lib/sprout/sprout/cstring/strcat.hpp b/dsp/lib/sprout/sprout/cstring/strcat.hpp deleted file mode 100644 index 8005545..0000000 --- a/dsp/lib/sprout/sprout/cstring/strcat.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTRING_STRCAT_HPP -#define SPROUT_CSTRING_STRCAT_HPP - -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CXX14_CONSTEXPR OutputNullTerminatedIterator - strcat(OutputNullTerminatedIterator s1, NullTerminatedIterator s2) { - OutputNullTerminatedIterator result = s1; - while (*s1++) - ; - while ((*s1++ = *s2++)) - ; - return result; - } - } // namespace detail - - // 7.21.3.1 The strcat function - // - inline SPROUT_CXX14_CONSTEXPR char* - strcat(char* s1, char const* s2) { - return sprout::detail::strcat(s1, s2); - } - - template - inline SPROUT_CXX14_CONSTEXPR Elem* - strcat(Elem* s1, Elem const* s2) { - return sprout::detail::strcat(s1, s2); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTRING_STRCAT_HPP diff --git a/dsp/lib/sprout/sprout/cstring/strchr.hpp b/dsp/lib/sprout/sprout/cstring/strchr.hpp deleted file mode 100644 index 20d350b..0000000 --- a/dsp/lib/sprout/sprout/cstring/strchr.hpp +++ /dev/null @@ -1,99 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTRING_STRCHR_HPP -#define SPROUT_CSTRING_STRCHR_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::pair - strchr_impl_1( - sprout::pair const& current, - T const& value, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair type; - return current.second || !*current.first ? current - : n == 1 ? *current.first == value ? type(current.first, true) : type(sprout::next(current.first), false) - : sprout::detail::strchr_impl_1( - sprout::detail::strchr_impl_1( - current, - value, n / 2 - ), - value, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - strchr_impl( - sprout::pair const& current, - T const& value, typename std::iterator_traits::difference_type n - ) - { - return current.second || !*current.first ? current - : sprout::detail::strchr_impl( - sprout::detail::strchr_impl_1( - current, - value, n - ), - value, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR InputIterator - strchr(InputIterator first, T const& value) { - typedef sprout::pair type; - return sprout::detail::strchr_impl(type(first, false), value, 1).first; - } - - } // namespace detail - - // 7.21.5.2 strchr function - // - // recursion depth: - // O(log N) - // - inline SPROUT_CONSTEXPR char const* - strchr(char const* s, int c) { - return sprout::detail::str_find_check( - sprout::detail::strchr(s, static_cast(c)), - static_cast(c) - ); - } - inline SPROUT_CONSTEXPR char* - strchr(char* s, int c) { - return sprout::detail::str_find_check( - sprout::detail::strchr(s, static_cast(c)), - static_cast(c) - ); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_char_type::value, - Elem* - >::type - strchr(Elem* s, typename std::decay::type c) { - return sprout::detail::str_find_check( - sprout::detail::strchr(s, c), - c - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTRING_STRCHR_HPP diff --git a/dsp/lib/sprout/sprout/cstring/strcmp.hpp b/dsp/lib/sprout/sprout/cstring/strcmp.hpp deleted file mode 100644 index 3784890..0000000 --- a/dsp/lib/sprout/sprout/cstring/strcmp.hpp +++ /dev/null @@ -1,99 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTRING_STRCMP_HPP -#define SPROUT_CSTRING_STRCMP_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR int - strcmp_impl_check(sprout::tuples::tuple const& found) { - return !*sprout::tuples::get<1>(found) ? (!*sprout::tuples::get<0>(found) ? 0 : 1) - : !*sprout::tuples::get<0>(found) ? -1 - : sprout::tuples::get<2>(found) - ; - } - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - strcmp_impl_1( - sprout::tuples::tuple const& current, - typename std::iterator_traits::difference_type n - ) - { - typedef sprout::tuples::tuple type; - return sprout::tuples::get<2>(current) || !*sprout::tuples::get<1>(current) || !*sprout::tuples::get<0>(current) ? current - : n == 1 ? (*sprout::tuples::get<0>(current)) < (*sprout::tuples::get<1>(current)) ? type(sprout::tuples::get<0>(current), sprout::tuples::get<1>(current), -1) - : (*sprout::tuples::get<1>(current)) < (*sprout::tuples::get<0>(current)) ? type(sprout::tuples::get<0>(current), sprout::tuples::get<1>(current), 1) - : type(sprout::next(sprout::tuples::get<0>(current)), sprout::next(sprout::tuples::get<1>(current)), 0) - : sprout::detail::strcmp_impl_1( - sprout::detail::strcmp_impl_1( - current, - n / 2 - ), - n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - strcmp_impl( - sprout::tuples::tuple const& current, - typename std::iterator_traits::difference_type n - ) - { - return sprout::tuples::get<2>(current) || !*sprout::tuples::get<1>(current) || !*sprout::tuples::get<0>(current) ? current - : sprout::detail::strcmp_impl( - sprout::detail::strcmp_impl_1( - current, - n - ), - n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR int - strcmp(InputIterator1 first1, InputIterator2 first2) - { - typedef sprout::tuples::tuple type; - return sprout::detail::strcmp_impl_check( - sprout::detail::strcmp_impl(type(first1, first2, 0), 1) - ); - } - } // namespace detail - - // 7.21.4.2 strcmp function - // - // recursion depth: - // O(log(N1+N2)) - // - inline SPROUT_CONSTEXPR int - strcmp(char const* s1, char const* s2) { - return sprout::detail::strcmp(s1, s2); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_char_type::value, - int - >::type - strcmp(Elem* s1, Elem* s2) { - return sprout::detail::strcmp(s1, s2); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTRING_STRCMP_HPP diff --git a/dsp/lib/sprout/sprout/cstring/strcoll.hpp b/dsp/lib/sprout/sprout/cstring/strcoll.hpp deleted file mode 100644 index 188276b..0000000 --- a/dsp/lib/sprout/sprout/cstring/strcoll.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTRING_STRCOLL_HPP -#define SPROUT_CSTRING_STRCOLL_HPP - -#include -#include -#include -#include - -namespace sprout { - - // 7.21.4.3 strcoll function - // - // recursion depth: - // O(log(N1+N2)) - // - inline SPROUT_CONSTEXPR int - strcoll(char const* s1, char const* s2) { - return sprout::strcmp(s1, s2); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_char_type::value, - int - >::type - strcoll(Elem* s1, Elem* s2) { - return sprout::strcmp(s1, s2); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTRING_STRCOLL_HPP diff --git a/dsp/lib/sprout/sprout/cstring/strcpy.hpp b/dsp/lib/sprout/sprout/cstring/strcpy.hpp deleted file mode 100644 index 038b897..0000000 --- a/dsp/lib/sprout/sprout/cstring/strcpy.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTRING_STRCPY_HPP -#define SPROUT_CSTRING_STRCPY_HPP - -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CXX14_CONSTEXPR OutputNullTerminatedIterator - strcpy(OutputNullTerminatedIterator s1, NullTerminatedIterator s2) { - OutputNullTerminatedIterator result = s1; - while ((*s1++ = *s2++)) - ; - return result; - } - } // namespace detail - - // 7.21.2.3 The strcpy function - // - inline SPROUT_CXX14_CONSTEXPR char* - strcpy(char* s1, char const* s2) { - return sprout::detail::strcpy(s1, s2); - } - - template - inline SPROUT_CXX14_CONSTEXPR Elem* - strcpy(Elem* s1, Elem const* s2) { - return sprout::detail::strcpy(s1, s2); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTRING_STRCPY_HPP diff --git a/dsp/lib/sprout/sprout/cstring/strcspn.hpp b/dsp/lib/sprout/sprout/cstring/strcspn.hpp deleted file mode 100644 index 59835d3..0000000 --- a/dsp/lib/sprout/sprout/cstring/strcspn.hpp +++ /dev/null @@ -1,89 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTRING_STRCSPN_HPP -#define SPROUT_CSTRING_STRCSPN_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - strcspn_impl_1( - sprout::tuples::tuple const& current, - ForwardIterator2 first2, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::tuples::tuple type; - return sprout::tuples::get<2>(current) || !*sprout::tuples::get<0>(current) ? current - : n == 1 ? !*sprout::detail::strchr(first2, *sprout::tuples::get<0>(current)) - ? type(sprout::next(sprout::tuples::get<0>(current)), sprout::tuples::get<1>(current) + 1, false) - : type(sprout::tuples::get<0>(current), sprout::tuples::get<1>(current), true) - : sprout::detail::strcspn_impl_1( - sprout::detail::strcspn_impl_1( - current, - first2, n / 2 - ), - first2, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - strcspn_impl( - sprout::tuples::tuple const& current, - ForwardIterator2 first2, typename std::iterator_traits::difference_type n - ) - { - return sprout::tuples::get<2>(current) || !*sprout::tuples::get<0>(current) ? current - : sprout::detail::strcspn_impl( - sprout::detail::strcspn_impl_1( - current, - first2, n - ), - first2, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR std::size_t - strcspn(InputIterator1 first1, ForwardIterator2 first2) { - typedef sprout::tuples::tuple type; - return sprout::tuples::get<1>(sprout::detail::strcspn_impl(type(first1, 0, false), first2, 1)); - } - } // namespace detail - - // 7.21.5.3 strcspn function - // - // recursion depth: - // O(log(N1+N2)) - // - inline SPROUT_CONSTEXPR std::size_t - strcspn(char const* s1, char const* s2) { - return sprout::detail::strcspn(s1, s2); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_char_type::value, - std::size_t - >::type - strcspn(Elem* s1, Elem* s2) { - return sprout::detail::strcspn(s1, s2); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTRING_STRCSPN_HPP diff --git a/dsp/lib/sprout/sprout/cstring/strlen.hpp b/dsp/lib/sprout/sprout/cstring/strlen.hpp deleted file mode 100644 index 1562188..0000000 --- a/dsp/lib/sprout/sprout/cstring/strlen.hpp +++ /dev/null @@ -1,106 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTRING_STRLEN_HPP -#define SPROUT_CSTRING_STRLEN_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::pair - strlen_impl_1( - sprout::pair const& current, - typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair type; - return !*current.first ? current - : n == 1 ? type(sprout::next(current.first), current.second + 1) - : sprout::detail::strlen_impl_1( - sprout::detail::strlen_impl_1( - current, - n / 2 - ), - n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - strlen_impl( - sprout::pair const& current, - typename std::iterator_traits::difference_type n - ) - { - return !*current.first ? current - : sprout::detail::strlen_impl( - sprout::detail::strlen_impl_1( - current, - n - ), - n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR std::size_t - strlen(InputIterator first) { - typedef sprout::pair type; - return sprout::detail::strlen_impl(type(first, 0), 1).second; - } - } // namespace detail - - // 7.21.6.3 strlen function - // - // recursion depth: - // O(log N) - // - inline SPROUT_CONSTEXPR std::size_t - strlen(char const* s) { - return sprout::detail::strlen(s); - } - inline SPROUT_CONSTEXPR std::size_t - strlen(char const* s, std::size_t n) { - return sprout::distance( - sprout::ptr_index(s), - sprout::find(sprout::ptr_index(s), sprout::ptr_index(s, n), '\0') - ); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_char_type::value, - std::size_t - >::type - strlen(Elem* s) { - return sprout::detail::strlen(s); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_char_type::value, - std::size_t - >::type - strlen(Elem* s, std::size_t n) { - typedef typename std::decay::type type; - return sprout::distance( - sprout::ptr_index(s), - sprout::find(sprout::ptr_index(s), sprout::ptr_index(s, n), type()) - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTRING_STRLEN_HPP diff --git a/dsp/lib/sprout/sprout/cstring/strncat.hpp b/dsp/lib/sprout/sprout/cstring/strncat.hpp deleted file mode 100644 index e714b58..0000000 --- a/dsp/lib/sprout/sprout/cstring/strncat.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTRING_STRNCAT_HPP -#define SPROUT_CSTRING_STRNCAT_HPP - -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CXX14_CONSTEXPR OutputNullTerminatedIterator - strncat(OutputNullTerminatedIterator s1, NullTerminatedIterator s2, std::size_t n) { - typedef typename std::iterator_traits::value_type value_type; - OutputNullTerminatedIterator result = s1; - while (*s1) { - ++s1; - } - while (n) { - --n; - if (!(*s1++ = *s2++)) { - break; - } - } - *s1 = value_type(); - return result; - } - } // namespace detail - - // 7.21.3.2 The strncat function - // - inline SPROUT_CXX14_CONSTEXPR char* - strncat(char* s1, char const* s2, std::size_t n) { - return sprout::detail::strncat(s1, s2, n); - } - - template - inline SPROUT_CXX14_CONSTEXPR Elem* - strncat(Elem* s1, Elem const* s2, std::size_t n) { - return sprout::detail::strncat(s1, s2, n); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTRING_STRNCAT_HPP diff --git a/dsp/lib/sprout/sprout/cstring/strncmp.hpp b/dsp/lib/sprout/sprout/cstring/strncmp.hpp deleted file mode 100644 index f3c9c78..0000000 --- a/dsp/lib/sprout/sprout/cstring/strncmp.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTRING_STRNCMP_HPP -#define SPROUT_CSTRING_STRNCMP_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - - // 7.21.4.4 strncmp function - // - // recursion depth: - // O(log(N1+N2)) - // - inline SPROUT_CONSTEXPR int - strncmp(char const* s1, char const* s2, std::size_t n) { - return sprout::tristate_lexicographical_compare( - sprout::ptr_index(s1), sprout::ptr_index(s1, n), '\0', - sprout::ptr_index(s2), sprout::ptr_index(s2, n), '\0' - ); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_char_type::value, - int - >::type - strncmp(Elem* s1, Elem* s2, std::size_t n) { - typedef typename std::decay::type type; - return sprout::tristate_lexicographical_compare( - sprout::ptr_index(s1), sprout::ptr_index(s1, n), type(), - sprout::ptr_index(s2), sprout::ptr_index(s2, n), type() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTRING_STRNCMP_HPP diff --git a/dsp/lib/sprout/sprout/cstring/strncpy.hpp b/dsp/lib/sprout/sprout/cstring/strncpy.hpp deleted file mode 100644 index 295eec1..0000000 --- a/dsp/lib/sprout/sprout/cstring/strncpy.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTRING_STRNCPY_HPP -#define SPROUT_CSTRING_STRNCPY_HPP - -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CXX14_CONSTEXPR OutputNullTerminatedIterator - strncpy(OutputNullTerminatedIterator s1, NullTerminatedIterator s2, std::size_t n) { - typedef typename std::iterator_traits::value_type value_type; - OutputNullTerminatedIterator result = s1; - while (n) { - --n; - if (!(*s1++ = *s2++)) { - break; - } - } - while (n) { - --n; - *s1++ = value_type(); - } - return result; - } - } // namespace detail - - // 7.21.2.4 The strncpy function - // - inline SPROUT_CXX14_CONSTEXPR char* - strncpy(char* s1, char const* s2, std::size_t n) { - return sprout::detail::strncpy(s1, s2, n); - } - - template - inline SPROUT_CXX14_CONSTEXPR Elem* - strncpy(Elem* s1, Elem const* s2, std::size_t n) { - return sprout::detail::strncpy(s1, s2, n); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTRING_STRNCPY_HPP diff --git a/dsp/lib/sprout/sprout/cstring/strpbrk.hpp b/dsp/lib/sprout/sprout/cstring/strpbrk.hpp deleted file mode 100644 index 97d2b72..0000000 --- a/dsp/lib/sprout/sprout/cstring/strpbrk.hpp +++ /dev/null @@ -1,100 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTRING_STRPBRK_HPP -#define SPROUT_CSTRING_STRPBRK_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::pair - strpbrk_impl_1( - sprout::pair current, - ForwardIterator2 first2, - typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair type; - return current.second || !*current.first ? current - : n == 1 ? sprout::strchr(first2, *current.first) - ? type(current.first, true) - : type(sprout::next(current.first), false) - : sprout::detail::strpbrk_impl_1( - sprout::detail::strpbrk_impl_1( - current, - first2, n / 2 - ), - first2, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - strpbrk_impl( - sprout::pair current, - ForwardIterator2 first2, - typename std::iterator_traits::difference_type n - ) - { - return current.second || !*current.first ? current - : sprout::detail::strpbrk_impl( - sprout::detail::strpbrk_impl_1( - current, - first2, n - ), - first2, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR InputIterator1 - strpbrk(InputIterator1 first1, ForwardIterator2 first2) { - typedef sprout::pair type; - return sprout::detail::strpbrk_impl(type(first1, false), first2, 1).first; - } - } // namespace detail - - // 7.21.5.4 strpbrk function - // - // recursion depth: - // O(log(N1+N2)) - // - inline SPROUT_CONSTEXPR char const* - strpbrk(char const* s1, char const* s2) { - return sprout::detail::str_find_check( - sprout::detail::strpbrk(s1, s2) - ); - } - inline SPROUT_CONSTEXPR char* - strpbrk(char* s1, char const* s2) { - return sprout::detail::str_find_check( - sprout::detail::strpbrk(s1, s2) - ); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_char_type::value, - Elem* - >::type - strpbrk(Elem* s1, typename std::remove_const::type const* s2) { - return sprout::detail::str_find_check( - sprout::detail::strpbrk(s1, s2) - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTRING_STRPBRK_HPP diff --git a/dsp/lib/sprout/sprout/cstring/strrchr.hpp b/dsp/lib/sprout/sprout/cstring/strrchr.hpp deleted file mode 100644 index 438a91a..0000000 --- a/dsp/lib/sprout/sprout/cstring/strrchr.hpp +++ /dev/null @@ -1,101 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTRING_STRRCHR_HPP -#define SPROUT_CSTRING_STRRCHR_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR ForwardIterator - strrchr_impl_check(sprout::pair const& found, T const& value) { - return *found.second == value ? found.second - : !value ? found.first - : ForwardIterator() - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - strrchr_impl_1( - sprout::pair const& current, - T const& value, - typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair type; - return !*current.first ? current - : n == 1 ? *current.first == value ? type(sprout::next(current.first), current.first) : type(sprout::next(current.first), current.second) - : sprout::detail::strrchr_impl_1( - sprout::detail::strrchr_impl_1( - current, - value, n / 2 - ), - value, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - strrchr_impl( - sprout::pair const& current, - T const& value, - typename std::iterator_traits::difference_type n - ) - { - return !*current.first ? current - : sprout::detail::strrchr_impl( - sprout::detail::strrchr_impl_1( - current, - value, n - ), - value, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR ForwardIterator - strrchr(ForwardIterator first, T const& value) { - typedef sprout::pair type; - return sprout::detail::strrchr_impl_check( - sprout::detail::strrchr_impl(type(first, first), value, 1), - value - ); - } - } // namespace detail - - // 7.21.5.5 strrchr function - // - // recursion depth: - // O(log N) - // - inline SPROUT_CONSTEXPR char const* - strrchr(char const* s, int c) { - return sprout::detail::strrchr(s, static_cast(c)); - } - inline SPROUT_CONSTEXPR char* - strrchr(char* s, int c) { - return sprout::detail::strrchr(s, static_cast(c)); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_char_type::value, - Elem* - >::type - strrchr(Elem* s, typename std::decay::type c) { - return sprout::detail::strrchr(s, c); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTRING_STRRCHR_HPP diff --git a/dsp/lib/sprout/sprout/cstring/strspn.hpp b/dsp/lib/sprout/sprout/cstring/strspn.hpp deleted file mode 100644 index c5e8b1b..0000000 --- a/dsp/lib/sprout/sprout/cstring/strspn.hpp +++ /dev/null @@ -1,89 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTRING_STRSPN_HPP -#define SPROUT_CSTRING_STRSPN_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - strspn_impl_1( - sprout::tuples::tuple const& current, - ForwardIterator2 first2, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::tuples::tuple type; - return sprout::tuples::get<2>(current) || !*sprout::tuples::get<0>(current) ? current - : n == 1 ? *sprout::detail::strchr(first2, *sprout::tuples::get<0>(current)) - ? type(sprout::next(sprout::tuples::get<0>(current)), sprout::tuples::get<1>(current) + 1, false) - : type(sprout::tuples::get<0>(current), sprout::tuples::get<1>(current), true) - : sprout::detail::strspn_impl_1( - sprout::detail::strspn_impl_1( - current, - first2, n / 2 - ), - first2, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - strspn_impl( - sprout::tuples::tuple const& current, - ForwardIterator2 first2, typename std::iterator_traits::difference_type n - ) - { - return sprout::tuples::get<2>(current) || !*sprout::tuples::get<0>(current) ? current - : sprout::detail::strspn_impl( - sprout::detail::strspn_impl_1( - current, - first2, n - ), - first2, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR std::size_t - strspn(InputIterator1 first1, ForwardIterator2 first2) { - typedef sprout::tuples::tuple type; - return sprout::tuples::get<1>(sprout::detail::strspn_impl(type(first1, 0, false), first2, 1)); - } - } // namespace detail - - // 7.21.5.6 strspn function - // - // recursion depth: - // O(log(N1+N2)) - // - inline SPROUT_CONSTEXPR std::size_t - strspn(char const* s1, char const* s2) { - return sprout::detail::strspn(s1, s2); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_char_type::value, - std::size_t - >::type - strspn(Elem* s1, Elem* s2) { - return sprout::detail::strspn(s1, s2); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTRING_STRSPN_HPP diff --git a/dsp/lib/sprout/sprout/cstring/strstr.hpp b/dsp/lib/sprout/sprout/cstring/strstr.hpp deleted file mode 100644 index 4bdda26..0000000 --- a/dsp/lib/sprout/sprout/cstring/strstr.hpp +++ /dev/null @@ -1,161 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTRING_STRSTR_HPP -#define SPROUT_CSTRING_STRSTR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - strstr_one_impl_1( - sprout::tuples::tuple const& current, - ForwardIterator1 first1_, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::tuples::tuple type; - return sprout::tuples::get<2>(current) ? current - : !*sprout::tuples::get<1>(current) ? type(first1_, sprout::tuples::get<1>(current), true) - : !*sprout::tuples::get<0>(current) ? type(sprout::tuples::get<0>(current), sprout::tuples::get<1>(current), true) - : n == 1 ? !(*sprout::tuples::get<0>(current) == *sprout::tuples::get<1>(current)) - ? type(sprout::next(sprout::tuples::get<0>(current)), sprout::tuples::get<1>(current), true) - : type(sprout::next(sprout::tuples::get<0>(current)), sprout::next(sprout::tuples::get<1>(current)), false) - : sprout::detail::strstr_one_impl_1( - sprout::detail::strstr_one_impl_1( - current, - first1_, n / 2 - ), - first1_, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - strstr_one_impl( - sprout::tuples::tuple const& current, - ForwardIterator1 first1_, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::tuples::tuple type; - return sprout::tuples::get<2>(current) ? current - : !*sprout::tuples::get<1>(current) ? type(first1_, sprout::tuples::get<1>(current), true) - : !*sprout::tuples::get<0>(current) ? type(sprout::tuples::get<0>(current), sprout::tuples::get<1>(current), true) - : sprout::detail::strstr_one_impl( - sprout::detail::strstr_one_impl_1( - current, - first1_, n - ), - first1_, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR ForwardIterator1 - strstr_one(ForwardIterator1 first1, ForwardIterator2 first2) { - typedef sprout::tuples::tuple type; - return sprout::tuples::get<0>(sprout::detail::strstr_one_impl(type(first1, first2, false), first1, 1)); - } - - template - inline SPROUT_CONSTEXPR sprout::pair - strstr_impl_fork(sprout::pair const& current, ForwardIterator searched) { - typedef sprout::pair type; - return searched == current.first || !*searched ? type(searched, true) - : type(sprout::next(current.first), false) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - strstr_impl_1( - sprout::pair const& current, - ForwardIterator2 first2, - typename std::iterator_traits::difference_type n - ) - { - return current.second || !*current.first ? current - : n == 1 ? sprout::detail::strstr_impl_fork( - current, - sprout::detail::strstr_one(current.first, first2) - ) - : sprout::detail::strstr_impl_1( - sprout::detail::strstr_impl_1( - current, - first2, n / 2 - ), - first2, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - strstr_impl( - sprout::pair const& current, - ForwardIterator2 first2, - typename std::iterator_traits::difference_type n - ) - { - return current.second || !*current.first ? current - : sprout::detail::strstr_impl( - sprout::detail::strstr_impl_1( - current, - first2, n - ), - first2, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR ForwardIterator1 - strstr(ForwardIterator1 first1, ForwardIterator2 first2) { - typedef sprout::pair type; - return !*first2 ? first1 - : sprout::detail::strstr_impl(type(first1, false), first2, 1).first - ; - } - } // namespace detail - - // 7.21.5.7 strstr function - // - // recursion depth: - // O(log(N1+N2)) - // - inline SPROUT_CONSTEXPR char const* - strstr(char const* s1, char const* s2) { - return sprout::detail::str_find_check( - sprout::detail::strstr(s1, s2) - ); - } - inline SPROUT_CONSTEXPR char* - strstr(char* s1, char const* s2) { - return sprout::detail::str_find_check( - sprout::detail::strstr(s1, s2) - ); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_char_type::value, - Elem* - >::type - strstr(Elem* s1, typename std::remove_const::type const* s2) { - return sprout::detail::str_find_check( - sprout::detail::strstr(s1, s2) - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTRING_STRSTR_HPP diff --git a/dsp/lib/sprout/sprout/ctime.hpp b/dsp/lib/sprout/sprout/ctime.hpp deleted file mode 100644 index 1d1dfdb..0000000 --- a/dsp/lib/sprout/sprout/ctime.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CTIME_HPP -#define SPROUT_CTIME_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_CTIME_HPP diff --git a/dsp/lib/sprout/sprout/ctime/difftime.hpp b/dsp/lib/sprout/sprout/ctime/difftime.hpp deleted file mode 100644 index f1d7855..0000000 --- a/dsp/lib/sprout/sprout/ctime/difftime.hpp +++ /dev/null @@ -1,24 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CTIME_DIFFTIME_HPP -#define SPROUT_CTIME_DIFFTIME_HPP - -#include -#include - -namespace sprout { - // - // 7.23.2.2 The difftime function - // - inline SPROUT_CONSTEXPR double - difftime(std::time_t time1, std::time_t time0) { - return static_cast(time1) - static_cast(time0); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CTIME_DIFFTIME_HPP diff --git a/dsp/lib/sprout/sprout/ctime/to_time_t.hpp b/dsp/lib/sprout/sprout/ctime/to_time_t.hpp deleted file mode 100644 index 96778c4..0000000 --- a/dsp/lib/sprout/sprout/ctime/to_time_t.hpp +++ /dev/null @@ -1,112 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CTIME_TO_TIME_T_HPP -#define SPROUT_CTIME_TO_TIME_T_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - inline SPROUT_CONSTEXPR std::time_t - to_time_t_impl(int year, int mon, int day, int hour, int min, int sec) { - return ((( - std::time_t(year / 4 - year / 100 + year / 400 + 367 * mon / 12 + day) + year * 365 - 719499 - ) * 24 + hour - ) * 60 + min - ) * 60 + sec - ; - } - } // namespace detail - // - // to_time_t - // - inline SPROUT_CONSTEXPR std::time_t - to_time_t(int year, int mon, int day, int hour, int min, int sec) { - return mon <= 2 - ? sprout::detail::to_time_t_impl(year - 1, mon + 10, day, hour, min, sec) - : sprout::detail::to_time_t_impl(year, mon - 2, day, hour, min, sec) - ; - } - inline SPROUT_CONSTEXPR std::time_t - to_time_t(std::tm const& t) { - return sprout::to_time_t(t.tm_year + 1900, t.tm_mon + 1, t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR int - get_num(Elem c) { - return !sprout::isdigit(c) ? 0 - : sprout::detail::char_to_int(c) - ; - } - template - inline SPROUT_CONSTEXPR int - get_month(InputIterator const& date) { - return sprout::equal(sprout::ptr_index(date), sprout::ptr_index(date, 3), sprout::ptr_index("Jan")) ? 1 - : sprout::equal(sprout::ptr_index(date), sprout::ptr_index(date, 3), sprout::ptr_index("Feb")) ? 2 - : sprout::equal(sprout::ptr_index(date), sprout::ptr_index(date, 3), sprout::ptr_index("Mar")) ? 3 - : sprout::equal(sprout::ptr_index(date), sprout::ptr_index(date, 3), sprout::ptr_index("Apr")) ? 4 - : sprout::equal(sprout::ptr_index(date), sprout::ptr_index(date, 3), sprout::ptr_index("May")) ? 5 - : sprout::equal(sprout::ptr_index(date), sprout::ptr_index(date, 3), sprout::ptr_index("Jun")) ? 6 - : sprout::equal(sprout::ptr_index(date), sprout::ptr_index(date, 3), sprout::ptr_index("Jul")) ? 7 - : sprout::equal(sprout::ptr_index(date), sprout::ptr_index(date, 3), sprout::ptr_index("Aug")) ? 8 - : sprout::equal(sprout::ptr_index(date), sprout::ptr_index(date, 3), sprout::ptr_index("Sep")) ? 9 - : sprout::equal(sprout::ptr_index(date), sprout::ptr_index(date, 3), sprout::ptr_index("Oct")) ? 10 - : sprout::equal(sprout::ptr_index(date), sprout::ptr_index(date, 3), sprout::ptr_index("Nov")) ? 11 - : sprout::equal(sprout::ptr_index(date), sprout::ptr_index(date, 3), sprout::ptr_index("Dec")) ? 12 - : 0 - ; - } - template - inline SPROUT_CONSTEXPR int - get_day(RandomAccessIterator const& date) { - return sprout::detail::get_num(date[0]) * 10 - + sprout::detail::get_num(date[1]) - ; - } - template - inline SPROUT_CONSTEXPR int - get_year(RandomAccessIterator const& date) { - return sprout::detail::get_num(date[0]) * 1000 - + sprout::detail::get_num(date[1]) * 100 - + sprout::detail::get_num(date[2]) * 10 - + sprout::detail::get_num(date[3]) - ; - } - template - inline SPROUT_CONSTEXPR int - get_time(RandomAccessIterator const& time) { - return sprout::detail::get_num(time[0]) * 10 - + sprout::detail::get_num(time[1]) - ; - } - } // namespace detail - // - // to_time_t - // - template - inline SPROUT_CONSTEXPR std::time_t - to_time_t(RandomAccessIterator1 const& date, RandomAccessIterator2 const& time) { - return sprout::to_time_t( - sprout::detail::get_year(date + 7), - sprout::detail::get_month(date + 0), - sprout::detail::get_day(date + 4), - sprout::detail::get_time(time + 0), - sprout::detail::get_time(time + 3), - sprout::detail::get_time(time + 6) - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CTIME_TO_TIME_T_HPP diff --git a/dsp/lib/sprout/sprout/ctype.hpp b/dsp/lib/sprout/sprout/ctype.hpp deleted file mode 100644 index 47faf16..0000000 --- a/dsp/lib/sprout/sprout/ctype.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CTYPE_HPP -#define SPROUT_CTYPE_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_CTYPE_HPP diff --git a/dsp/lib/sprout/sprout/ctype/ascii.hpp b/dsp/lib/sprout/sprout/ctype/ascii.hpp deleted file mode 100644 index 89e5959..0000000 --- a/dsp/lib/sprout/sprout/ctype/ascii.hpp +++ /dev/null @@ -1,310 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CTYPE_ASCII_HPP -#define SPROUT_CTYPE_ASCII_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace ascii { - - namespace detail { - SPROUT_STATIC_CONSTEXPR std::size_t alpha = 1 << 0; - SPROUT_STATIC_CONSTEXPR std::size_t blank = 1 << 1; - SPROUT_STATIC_CONSTEXPR std::size_t cntrl = 1 << 2; - SPROUT_STATIC_CONSTEXPR std::size_t digit = 1 << 3; - SPROUT_STATIC_CONSTEXPR std::size_t graph = 1 << 4; - SPROUT_STATIC_CONSTEXPR std::size_t lower = 1 << 5; - SPROUT_STATIC_CONSTEXPR std::size_t print = 1 << 6; - SPROUT_STATIC_CONSTEXPR std::size_t punct = 1 << 7; - SPROUT_STATIC_CONSTEXPR std::size_t space = 1 << 8; - SPROUT_STATIC_CONSTEXPR std::size_t upper = 1 << 9; - SPROUT_STATIC_CONSTEXPR std::size_t xdigit = 1 << 10; - SPROUT_STATIC_CONSTEXPR std::size_t table_size = 0x80; - SPROUT_STATIC_CONSTEXPR std::size_t table[sprout::ascii::detail::table_size] = { - /* 0x00 NUL */ sprout::ascii::detail::cntrl, - /* 0x01 SOH */ sprout::ascii::detail::cntrl, - /* 0x02 STX */ sprout::ascii::detail::cntrl, - /* 0x03 ETX */ sprout::ascii::detail::cntrl, - /* 0x04 EOT */ sprout::ascii::detail::cntrl, - /* 0x05 ENQ */ sprout::ascii::detail::cntrl, - /* 0x06 ACK */ sprout::ascii::detail::cntrl, - /* 0x07 BEL */ sprout::ascii::detail::cntrl, - /* 0x08 BS */ sprout::ascii::detail::cntrl, - /* 0x09 HT */ sprout::ascii::detail::blank | sprout::ascii::detail::cntrl | sprout::ascii::detail::space, - /* 0x0A LF */ sprout::ascii::detail::cntrl | sprout::ascii::detail::space, - /* 0x0B VT */ sprout::ascii::detail::cntrl | sprout::ascii::detail::space, - /* 0x0C FF */ sprout::ascii::detail::cntrl | sprout::ascii::detail::space, - /* 0x0D CR */ sprout::ascii::detail::cntrl | sprout::ascii::detail::space, - /* 0x0E SO */ sprout::ascii::detail::cntrl, - /* 0x0F SI */ sprout::ascii::detail::cntrl, - /* 0x10 DLE */ sprout::ascii::detail::cntrl, - /* 0x11 DC1 */ sprout::ascii::detail::cntrl, - /* 0x12 DC2 */ sprout::ascii::detail::cntrl, - /* 0x13 DC3 */ sprout::ascii::detail::cntrl, - /* 0x14 DC4 */ sprout::ascii::detail::cntrl, - /* 0x15 NAK */ sprout::ascii::detail::cntrl, - /* 0x16 SYN */ sprout::ascii::detail::cntrl, - /* 0x17 ETB */ sprout::ascii::detail::cntrl, - /* 0x18 CAN */ sprout::ascii::detail::cntrl, - /* 0x19 EM */ sprout::ascii::detail::cntrl, - /* 0x1A SUB */ sprout::ascii::detail::cntrl, - /* 0x1B ESC */ sprout::ascii::detail::cntrl, - /* 0x1C FS */ sprout::ascii::detail::cntrl, - /* 0x1D GS */ sprout::ascii::detail::cntrl, - /* 0x1E RS */ sprout::ascii::detail::cntrl, - /* 0x1F US */ sprout::ascii::detail::cntrl, - /* 0x20 ' ' */ sprout::ascii::detail::blank | sprout::ascii::detail::print | sprout::ascii::detail::space, - /* 0x21 '!' */ sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::punct, - /* 0x22 '"' */ sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::punct, - /* 0x23 '#' */ sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::punct, - /* 0x24 '$' */ sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::punct, - /* 0x25 '%' */ sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::punct, - /* 0x26 '&' */ sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::punct, - /* 0x27 ''' */ sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::punct, - /* 0x28 '(' */ sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::punct, - /* 0x29 ')' */ sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::punct, - /* 0x2A '*' */ sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::punct, - /* 0x2B '+' */ sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::punct, - /* 0x2C ',' */ sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::punct, - /* 0x2D '-' */ sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::punct, - /* 0x2E '.' */ sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::punct, - /* 0x2F '/' */ sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::punct, - /* 0x30 '0' */ sprout::ascii::detail::digit | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::xdigit, - /* 0x31 '1' */ sprout::ascii::detail::digit | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::xdigit, - /* 0x32 '2' */ sprout::ascii::detail::digit | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::xdigit, - /* 0x33 '3' */ sprout::ascii::detail::digit | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::xdigit, - /* 0x34 '4' */ sprout::ascii::detail::digit | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::xdigit, - /* 0x35 '5' */ sprout::ascii::detail::digit | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::xdigit, - /* 0x36 '6' */ sprout::ascii::detail::digit | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::xdigit, - /* 0x37 '7' */ sprout::ascii::detail::digit | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::xdigit, - /* 0x38 '8' */ sprout::ascii::detail::digit | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::xdigit, - /* 0x39 '9' */ sprout::ascii::detail::digit | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::xdigit, - /* 0x3A ':' */ sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::punct, - /* 0x3B ';' */ sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::punct, - /* 0x3C '<' */ sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::punct, - /* 0x3D '=' */ sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::punct, - /* 0x3E '>' */ sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::punct, - /* 0x3F '?' */ sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::punct, - /* 0x40 '@' */ sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::punct, - /* 0x41 'A' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::upper | sprout::ascii::detail::xdigit, - /* 0x42 'B' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::upper | sprout::ascii::detail::xdigit, - /* 0x43 'C' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::upper | sprout::ascii::detail::xdigit, - /* 0x44 'D' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::upper | sprout::ascii::detail::xdigit, - /* 0x45 'E' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::upper | sprout::ascii::detail::xdigit, - /* 0x46 'F' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::upper | sprout::ascii::detail::xdigit, - /* 0x47 'G' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::upper, - /* 0x48 'H' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::upper, - /* 0x49 'I' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::upper, - /* 0x4A 'J' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::upper, - /* 0x4B 'K' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::upper, - /* 0x4C 'L' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::upper, - /* 0x4D 'M' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::upper, - /* 0x4E 'N' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::upper, - /* 0x4F 'O' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::upper, - /* 0x50 'P' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::upper, - /* 0x51 'Q' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::upper, - /* 0x52 'R' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::upper, - /* 0x53 'S' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::upper, - /* 0x54 'T' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::upper, - /* 0x55 'U' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::upper, - /* 0x56 'V' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::upper, - /* 0x57 'W' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::upper, - /* 0x58 'X' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::upper, - /* 0x59 'Y' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::upper, - /* 0x5A 'Z' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::upper, - /* 0x5B '[' */ sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::punct, - /* 0x5C '\' */ sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::punct, - /* 0x5D ']' */ sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::punct, - /* 0x5E '^' */ sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::punct, - /* 0x5F '_' */ sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::punct, - /* 0x60 '`' */ sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::punct, - /* 0x61 'a' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::lower | sprout::ascii::detail::print | sprout::ascii::detail::xdigit, - /* 0x62 'b' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::lower | sprout::ascii::detail::print | sprout::ascii::detail::xdigit, - /* 0x63 'c' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::lower | sprout::ascii::detail::print | sprout::ascii::detail::xdigit, - /* 0x64 'd' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::lower | sprout::ascii::detail::print | sprout::ascii::detail::xdigit, - /* 0x65 'e' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::lower | sprout::ascii::detail::print | sprout::ascii::detail::xdigit, - /* 0x66 'f' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::lower | sprout::ascii::detail::print | sprout::ascii::detail::xdigit, - /* 0x67 'g' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::lower | sprout::ascii::detail::print, - /* 0x68 'h' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::lower | sprout::ascii::detail::print, - /* 0x69 'i' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::lower | sprout::ascii::detail::print, - /* 0x6A 'j' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::lower | sprout::ascii::detail::print, - /* 0x6B 'k' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::lower | sprout::ascii::detail::print, - /* 0x6C 'l' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::lower | sprout::ascii::detail::print, - /* 0x6D 'm' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::lower | sprout::ascii::detail::print, - /* 0x6E 'n' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::lower | sprout::ascii::detail::print, - /* 0x6F 'o' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::lower | sprout::ascii::detail::print, - /* 0x70 'p' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::lower | sprout::ascii::detail::print, - /* 0x71 'q' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::lower | sprout::ascii::detail::print, - /* 0x72 'r' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::lower | sprout::ascii::detail::print, - /* 0x73 's' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::lower | sprout::ascii::detail::print, - /* 0x74 't' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::lower | sprout::ascii::detail::print, - /* 0x75 'u' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::lower | sprout::ascii::detail::print, - /* 0x76 'v' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::lower | sprout::ascii::detail::print, - /* 0x77 'w' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::lower | sprout::ascii::detail::print, - /* 0x78 'x' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::lower | sprout::ascii::detail::print, - /* 0x79 'y' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::lower | sprout::ascii::detail::print, - /* 0x7A 'z' */ sprout::ascii::detail::alpha | sprout::ascii::detail::graph | sprout::ascii::detail::lower | sprout::ascii::detail::print, - /* 0x7B '{' */ sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::punct, - /* 0x7C '|' */ sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::punct, - /* 0x7D '}' */ sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::punct, - /* 0x7E '~' */ sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::punct, - /* 0x7F DEL */ sprout::ascii::detail::cntrl - }; - inline SPROUT_CONSTEXPR std::size_t get_value(char c) { - return static_cast(c) < sprout::ascii::detail::table_size - ? sprout::ascii::detail::table[static_cast(c)] - : 0 - ; - } - inline SPROUT_CONSTEXPR std::size_t get_value(wchar_t c) { - return static_cast(c) < sprout::ascii::detail::table_size - ? sprout::ascii::detail::table[static_cast(c)] - : 0 - ; - } -#if SPROUT_USE_UNICODE_LITERALS - inline SPROUT_CONSTEXPR std::size_t get_value(char16_t c) { - return static_cast(c) < sprout::ascii::detail::table_size - ? sprout::ascii::detail::table[static_cast(c)] - : 0 - ; - } - inline SPROUT_CONSTEXPR std::size_t get_value(char32_t c) { - return static_cast(c) < sprout::ascii::detail::table_size - ? sprout::ascii::detail::table[static_cast(c)] - : 0 - ; - } -#endif - } // namespace detail - -#define SPROUT_CTYPE_ASCII_DECL(CHAR_TYPE, PREFIX) \ - inline SPROUT_CONSTEXPR bool \ - SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, alnum))(CHAR_TYPE c) { \ - return (sprout::ascii::detail::get_value(c) & (sprout::ascii::detail::alpha | sprout::ascii::detail::digit)) != 0; \ - } \ - inline SPROUT_CONSTEXPR bool \ - SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, alpha))(CHAR_TYPE c) { \ - return (sprout::ascii::detail::get_value(c) & sprout::ascii::detail::alpha) != 0; \ - } \ - inline SPROUT_CONSTEXPR bool \ - SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, blank))(CHAR_TYPE c) { \ - return (sprout::ascii::detail::get_value(c) & sprout::ascii::detail::blank) != 0; \ - } \ - inline SPROUT_CONSTEXPR bool \ - SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, cntrl))(CHAR_TYPE c) { \ - return (sprout::ascii::detail::get_value(c) & sprout::ascii::detail::cntrl) != 0; \ - } \ - inline SPROUT_CONSTEXPR bool \ - SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, digit))(CHAR_TYPE c) { \ - return (sprout::ascii::detail::get_value(c) & sprout::ascii::detail::digit) != 0; \ - } \ - inline SPROUT_CONSTEXPR bool \ - SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, graph))(CHAR_TYPE c) { \ - return (sprout::ascii::detail::get_value(c) & sprout::ascii::detail::graph) != 0; \ - } \ - inline SPROUT_CONSTEXPR bool \ - SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, lower))(CHAR_TYPE c) { \ - return (sprout::ascii::detail::get_value(c) & sprout::ascii::detail::lower) != 0; \ - } \ - inline SPROUT_CONSTEXPR bool \ - SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, print))(CHAR_TYPE c) { \ - return (sprout::ascii::detail::get_value(c) & sprout::ascii::detail::print) != 0; \ - } \ - inline SPROUT_CONSTEXPR bool \ - SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, punct))(CHAR_TYPE c) { \ - return (sprout::ascii::detail::get_value(c) & sprout::ascii::detail::punct) != 0; \ - } \ - inline SPROUT_CONSTEXPR bool \ - SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, space))(CHAR_TYPE c) { \ - return (sprout::ascii::detail::get_value(c) & sprout::ascii::detail::space) != 0; \ - } \ - inline SPROUT_CONSTEXPR bool \ - SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, upper))(CHAR_TYPE c) { \ - return (sprout::ascii::detail::get_value(c) & sprout::ascii::detail::upper) != 0; \ - } \ - inline SPROUT_CONSTEXPR bool \ - SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, xdigit))(CHAR_TYPE c) { \ - return (sprout::ascii::detail::get_value(c) & sprout::ascii::detail::xdigit) != 0; \ - } \ - inline SPROUT_CONSTEXPR CHAR_TYPE \ - SPROUT_PP_CAT(to, SPROUT_PP_CAT(PREFIX, lower))(CHAR_TYPE c) { \ - return sprout::ascii::detail::get_value(c) & sprout::ascii::detail::upper ? c + (0x61 - 0x41) : c; \ - } \ - inline SPROUT_CONSTEXPR CHAR_TYPE \ - SPROUT_PP_CAT(to, SPROUT_PP_CAT(PREFIX, upper))(CHAR_TYPE c) { \ - return sprout::ascii::detail::get_value(c) & sprout::ascii::detail::lower ? c - (0x61 - 0x41) : c; \ - } \ - inline SPROUT_CONSTEXPR bool \ - SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, classified))(sprout::ctypes::mask m, CHAR_TYPE c) { \ - return (m | sprout::ctypes::alnum && (sprout::ascii::detail::get_value(c) & (sprout::ascii::detail::alpha | sprout::ascii::detail::digit))) \ - || (m | sprout::ctypes::alpha && (sprout::ascii::detail::get_value(c) & sprout::ascii::detail::alpha)) \ - || (m | sprout::ctypes::blank && (sprout::ascii::detail::get_value(c) & sprout::ascii::detail::blank)) \ - || (m | sprout::ctypes::cntrl && (sprout::ascii::detail::get_value(c) & sprout::ascii::detail::cntrl)) \ - || (m | sprout::ctypes::digit && (sprout::ascii::detail::get_value(c) & sprout::ascii::detail::digit)) \ - || (m | sprout::ctypes::graph && (sprout::ascii::detail::get_value(c) & sprout::ascii::detail::graph)) \ - || (m | sprout::ctypes::lower && (sprout::ascii::detail::get_value(c) & sprout::ascii::detail::lower)) \ - || (m | sprout::ctypes::print && (sprout::ascii::detail::get_value(c) & sprout::ascii::detail::print)) \ - || (m | sprout::ctypes::punct && (sprout::ascii::detail::get_value(c) & sprout::ascii::detail::punct)) \ - || (m | sprout::ctypes::space && (sprout::ascii::detail::get_value(c) & sprout::ascii::detail::space)) \ - || (m | sprout::ctypes::upper && (sprout::ascii::detail::get_value(c) & sprout::ascii::detail::upper)) \ - || (m | sprout::ctypes::xdigit && (sprout::ascii::detail::get_value(c) & sprout::ascii::detail::xdigit)) \ - ; \ - } - - // - // isalnum - // isalpha - // isblank - // iscntrl - // isdigit - // isgraph - // islower - // isprint - // ispunct - // isspace - // isupper - // isxdigit - // tolower - // toupper - // isclassified - // - SPROUT_CTYPE_ASCII_DECL(char, SPROUT_PP_EMPTY()) - SPROUT_CTYPE_ASCII_DECL(wchar_t, SPROUT_PP_EMPTY()) -#if SPROUT_USE_UNICODE_LITERALS - SPROUT_CTYPE_ASCII_DECL(char16_t, SPROUT_PP_EMPTY()) - SPROUT_CTYPE_ASCII_DECL(char32_t, SPROUT_PP_EMPTY()) -#endif - } // namespace ascii - - using sprout::ascii::isalnum; - using sprout::ascii::isalpha; - using sprout::ascii::isblank; - using sprout::ascii::iscntrl; - using sprout::ascii::isdigit; - using sprout::ascii::isgraph; - using sprout::ascii::islower; - using sprout::ascii::isprint; - using sprout::ascii::ispunct; - using sprout::ascii::isspace; - using sprout::ascii::isupper; - using sprout::ascii::isxdigit; - using sprout::ascii::tolower; - using sprout::ascii::toupper; - using sprout::ascii::isclassified; -} // namespace sprout - -#endif // #ifndef SPROUT_CTYPE_ASCII_HPP diff --git a/dsp/lib/sprout/sprout/ctype/functor.hpp b/dsp/lib/sprout/sprout/ctype/functor.hpp deleted file mode 100644 index 79bc0e2..0000000 --- a/dsp/lib/sprout/sprout/ctype/functor.hpp +++ /dev/null @@ -1,468 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CTYPE_FUNCTOR_HPP -#define SPROUT_CTYPE_FUNCTOR_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace ctypes { - // - // is_alnum - // - template - struct is_alnum { - public: - typedef T argument_type; - typedef bool result_type; - public: - SPROUT_CONSTEXPR bool - operator()(T const& x) const { - return sprout::isalnum(x); - } - }; - template<> - struct is_alnum { - public: - typedef bool result_type; - public: - template - SPROUT_CONSTEXPR bool - operator()(T const& x) const { - return sprout::ctypes::is_alnum()(x); - } - }; - - // - // is_alpha - // - template - struct is_alpha { - public: - typedef T argument_type; - typedef bool result_type; - public: - SPROUT_CONSTEXPR bool - operator()(T const& x) const { - return sprout::isalpha(x); - } - }; - template<> - struct is_alpha { - public: - typedef bool result_type; - public: - template - SPROUT_CONSTEXPR bool - operator()(T const& x) const { - return sprout::ctypes::is_alpha()(x); - } - }; - - // - // is_blank - // - template - struct is_blank { - public: - typedef T argument_type; - typedef bool result_type; - public: - SPROUT_CONSTEXPR bool - operator()(T const& x) const { - return sprout::isblank(x); - } - }; - template<> - struct is_blank { - public: - typedef bool result_type; - public: - template - SPROUT_CONSTEXPR bool - operator()(T const& x) const { - return sprout::ctypes::is_blank()(x); - } - }; - - // - // is_cntrl - // - template - struct is_cntrl { - public: - typedef T argument_type; - typedef bool result_type; - public: - SPROUT_CONSTEXPR bool - operator()(T const& x) const { - return sprout::iscntrl(x); - } - }; - template<> - struct is_cntrl { - public: - typedef bool result_type; - public: - template - SPROUT_CONSTEXPR bool - operator()(T const& x) const { - return sprout::ctypes::is_cntrl()(x); - } - }; - - // - // is_digit - // - template - struct is_digit { - public: - typedef T argument_type; - typedef bool result_type; - public: - SPROUT_CONSTEXPR bool - operator()(T const& x) const { - return sprout::isdigit(x); - } - }; - template<> - struct is_digit { - public: - typedef bool result_type; - public: - template - SPROUT_CONSTEXPR bool - operator()(T const& x) const { - return sprout::ctypes::is_digit()(x); - } - }; - - // - // is_graph - // - template - struct is_graph { - public: - typedef T argument_type; - typedef bool result_type; - public: - SPROUT_CONSTEXPR bool - operator()(T const& x) const { - return sprout::isgraph(x); - } - }; - template<> - struct is_graph { - public: - typedef bool result_type; - public: - template - SPROUT_CONSTEXPR bool - operator()(T const& x) const { - return sprout::ctypes::is_graph()(x); - } - }; - - // - // is_lower - // - template - struct is_lower { - public: - typedef T argument_type; - typedef bool result_type; - public: - SPROUT_CONSTEXPR bool - operator()(T const& x) const { - return sprout::islower(x); - } - }; - template<> - struct is_lower { - public: - typedef bool result_type; - public: - template - SPROUT_CONSTEXPR bool - operator()(T const& x) const { - return sprout::ctypes::is_lower()(x); - } - }; - - // - // is_print - // - template - struct is_print { - public: - typedef T argument_type; - typedef bool result_type; - public: - SPROUT_CONSTEXPR bool - operator()(T const& x) const { - return sprout::isprint(x); - } - }; - template<> - struct is_print { - public: - typedef bool result_type; - public: - template - SPROUT_CONSTEXPR bool - operator()(T const& x) const { - return sprout::ctypes::is_print()(x); - } - }; - - // - // is_punct - // - template - struct is_punct { - public: - typedef T argument_type; - typedef bool result_type; - public: - SPROUT_CONSTEXPR bool - operator()(T const& x) const { - return sprout::ispunct(x); - } - }; - template<> - struct is_punct { - public: - typedef bool result_type; - public: - template - SPROUT_CONSTEXPR bool - operator()(T const& x) const { - return sprout::ctypes::is_punct()(x); - } - }; - - // - // is_space - // - template - struct is_space { - public: - typedef T argument_type; - typedef bool result_type; - public: - SPROUT_CONSTEXPR bool - operator()(T const& x) const { - return sprout::isspace(x); - } - }; - template<> - struct is_space { - public: - typedef bool result_type; - public: - template - SPROUT_CONSTEXPR bool - operator()(T const& x) const { - return sprout::ctypes::is_space()(x); - } - }; - - // - // is_upper - // - template - struct is_upper { - public: - typedef T argument_type; - typedef bool result_type; - public: - SPROUT_CONSTEXPR bool - operator()(T const& x) const { - return sprout::isupper(x); - } - }; - template<> - struct is_upper { - public: - typedef bool result_type; - public: - template - SPROUT_CONSTEXPR bool - operator()(T const& x) const { - return sprout::ctypes::is_upper()(x); - } - }; - - // - // is_xdigit - // - template - struct is_xdigit { - public: - typedef T argument_type; - typedef bool result_type; - public: - SPROUT_CONSTEXPR bool - operator()(T const& x) const { - return sprout::isxdigit(x); - } - }; - template<> - struct is_xdigit { - public: - typedef bool result_type; - public: - template - SPROUT_CONSTEXPR bool - operator()(T const& x) const { - return sprout::ctypes::is_xdigit()(x); - } - }; - - // - // to_lower - // - template - struct to_lower { - public: - typedef T argument_type; - typedef T result_type; - public: - SPROUT_CONSTEXPR T - operator()(T const& x) const { - return sprout::tolower(x); - } - }; - template<> - struct to_lower { - public: - template - SPROUT_CONSTEXPR T - operator()(T const& x) const { - return sprout::ctypes::to_lower()(x); - } - }; - - // - // to_upper - // - template - struct to_upper { - public: - typedef T argument_type; - typedef T result_type; - public: - SPROUT_CONSTEXPR T - operator()(T const& x) const { - return sprout::toupper(x); - } - }; - template<> - struct to_upper { - public: - template - SPROUT_CONSTEXPR T - operator()(T const& x) const { - return sprout::ctypes::to_upper()(x); - } - }; - - // - // is_classified - // - template - struct is_classified { - public: - typedef T argument_type; - typedef bool result_type; - private: - sprout::ctypes::mask m_; - public: - explicit SPROUT_CONSTEXPR is_classified(sprout::ctypes::mask m) - : m_(m) - {} - SPROUT_CONSTEXPR bool - operator()(T const& x) const { - return sprout::isclassified(m_, x); - } - }; - template<> - struct is_classified { - public: - typedef bool result_type; - private: - sprout::ctypes::mask m_; - public: - explicit SPROUT_CONSTEXPR is_classified(sprout::ctypes::mask m) - : m_(m) - {} - template - SPROUT_CONSTEXPR bool - operator()(T const& x) const { - return sprout::ctypes::is_classified(m_)(x); - } - }; - - // - // nocase_equal_to - // - template - struct nocase_equal_to { - public: - typedef T first_argument_type; - typedef T second_argument_type; - typedef bool result_type; - public: - SPROUT_CONSTEXPR bool operator()(T const& x, T const& y) const { - return sprout::tolower(x) == sprout::tolower(y); - } - }; - template<> - struct nocase_equal_to { - public: - template - SPROUT_CONSTEXPR decltype(sprout::tolower(std::declval()) == sprout::tolower(std::declval())) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(sprout::tolower(std::declval()) == sprout::tolower(std::declval())) - { - return sprout::tolower(SPROUT_FORWARD(T, x)) == sprout::tolower(SPROUT_FORWARD(U, y)); - } - }; - - // - // nocase_not_equal_to - // - template - struct nocase_not_equal_to { - public: - typedef T first_argument_type; - typedef T second_argument_type; - typedef bool result_type; - public: - SPROUT_CONSTEXPR bool operator()(T const& x, T const& y) const { - return sprout::tolower(x) != sprout::tolower(y); - } - }; - template<> - struct nocase_not_equal_to { - public: - template - SPROUT_CONSTEXPR decltype(sprout::tolower(std::declval()) != sprout::tolower(std::declval())) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(sprout::tolower(std::declval()) != sprout::tolower(std::declval())) - { - return sprout::tolower(SPROUT_FORWARD(T, x)) != sprout::tolower(SPROUT_FORWARD(U, y)); - } - }; - } // namespace ctypes -} // namespace sprout - -#endif // #ifndef SPROUT_CTYPE_FUNCTOR_HPP diff --git a/dsp/lib/sprout/sprout/ctype/mask.hpp b/dsp/lib/sprout/sprout/ctype/mask.hpp deleted file mode 100644 index c7a6f10..0000000 --- a/dsp/lib/sprout/sprout/ctype/mask.hpp +++ /dev/null @@ -1,69 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CTYPE_MASK_HPP -#define SPROUT_CTYPE_MASK_HPP - -#include -#include -#include - -namespace sprout { - namespace ctypes { - // - // mask - // - enum mask { - space = std::ctype_base::space, - print = std::ctype_base::print, - cntrl = std::ctype_base::cntrl, - upper = std::ctype_base::upper, - lower = std::ctype_base::lower, - alpha = std::ctype_base::alpha, - digit = std::ctype_base::digit, - punct = std::ctype_base::punct, - xdigit = std::ctype_base::xdigit, -#if SPROUT_GCC_EARLIER(5, 0, 0) - blank = 0x0001, -#else // #if SPROUT_GCC_EARLIER(5, 0, 0) - blank = std::ctype_base::blank, -#endif // #if SPROUT_GCC_EARLIER(5, 0, 0) - alnum = std::ctype_base::alnum, - graph = std::ctype_base::graph - }; - inline SPROUT_CONSTEXPR sprout::ctypes::mask - operator&(sprout::ctypes::mask x, sprout::ctypes::mask y) { - return sprout::ctypes::mask(static_cast(x) & static_cast(y)); - } - inline SPROUT_CONSTEXPR sprout::ctypes::mask - operator|(sprout::ctypes::mask x, sprout::ctypes::mask y) { - return sprout::ctypes::mask(static_cast(x) | static_cast(y)); - } - inline SPROUT_CONSTEXPR sprout::ctypes::mask - operator^(sprout::ctypes::mask x, sprout::ctypes::mask y) { - return sprout::ctypes::mask(static_cast(x) ^ static_cast(y)); - } - inline SPROUT_CONSTEXPR sprout::ctypes::mask - operator~(sprout::ctypes::mask x) { - return sprout::ctypes::mask(~static_cast(x)); - } - inline SPROUT_CXX14_CONSTEXPR sprout::ctypes::mask& - operator&=(sprout::ctypes::mask& x, sprout::ctypes::mask y) { - return x = x & y; - } - inline SPROUT_CXX14_CONSTEXPR sprout::ctypes::mask& - operator|=(sprout::ctypes::mask& x, sprout::ctypes::mask y) { - return x = x | y; - } - inline SPROUT_CXX14_CONSTEXPR sprout::ctypes::mask& - operator^=(sprout::ctypes::mask& x, sprout::ctypes::mask y) { - return x = x ^ y; - } - } // namespace ctypes -} // namespace sprout - -#endif // #ifndef SPROUT_CTYPE_MASK_HPP diff --git a/dsp/lib/sprout/sprout/ctype/wascii.hpp b/dsp/lib/sprout/sprout/ctype/wascii.hpp deleted file mode 100644 index f034881..0000000 --- a/dsp/lib/sprout/sprout/ctype/wascii.hpp +++ /dev/null @@ -1,53 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CTYPE_WASCII_HPP -#define SPROUT_CTYPE_WASCII_HPP - -#include -#include - -namespace sprout { - namespace ascii { - // - // iswalnum - // iswalpha - // iswblank - // iswcntrl - // iswdigit - // iswgraph - // iswlower - // iswprint - // iswpunct - // iswspace - // iswupper - // iswxdigit - // towlower - // towupper - // iswclassified - // - SPROUT_CTYPE_ASCII_DECL(wchar_t, w) - } // namespace ascii - - using sprout::ascii::iswalnum; - using sprout::ascii::iswalpha; - using sprout::ascii::iswblank; - using sprout::ascii::iswcntrl; - using sprout::ascii::iswdigit; - using sprout::ascii::iswgraph; - using sprout::ascii::iswlower; - using sprout::ascii::iswprint; - using sprout::ascii::iswpunct; - using sprout::ascii::iswspace; - using sprout::ascii::iswupper; - using sprout::ascii::iswxdigit; - using sprout::ascii::towlower; - using sprout::ascii::towupper; - using sprout::ascii::iswclassified; -} // namespace sprout - -#endif // #ifndef SPROUT_CTYPE_WASCII_HPP diff --git a/dsp/lib/sprout/sprout/current_function.hpp b/dsp/lib/sprout/sprout/current_function.hpp deleted file mode 100644 index 892b1c0..0000000 --- a/dsp/lib/sprout/sprout/current_function.hpp +++ /dev/null @@ -1,50 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CURRENT_FUNCTION_HPP -#define SPROUT_CURRENT_FUNCTION_HPP - -#include - -namespace sprout { - namespace detail { - inline void - current_function_helper() { -#if defined(__GNUC__) || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) || (defined(__ICC) && (__ICC >= 600)) || defined(__ghs__) - -# define SPROUT_CURRENT_FUNCTION __PRETTY_FUNCTION__ - -#elif defined(__DMC__) && (__DMC__ >= 0x810) - -# define SPROUT_CURRENT_FUNCTION __PRETTY_FUNCTION__ - -#elif defined(__FUNCSIG__) - -# define SPROUT_CURRENT_FUNCTION __FUNCSIG__ - -#elif (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 600)) || (defined(__IBMCPP__) && (__IBMCPP__ >= 500)) - -# define SPROUT_CURRENT_FUNCTION __FUNCTION__ - -#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x550) - -# define SPROUT_CURRENT_FUNCTION __FUNC__ - -#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901) - -# define SPROUT_CURRENT_FUNCTION __func__ - -#else - -# define SPROUT_CURRENT_FUNCTION "(unknown)" - -#endif - } - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_CURRENT_FUNCTION_HPP diff --git a/dsp/lib/sprout/sprout/cwchar.hpp b/dsp/lib/sprout/sprout/cwchar.hpp deleted file mode 100644 index efd44d4..0000000 --- a/dsp/lib/sprout/sprout/cwchar.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CWCHER_HPP -#define SPROUT_CWCHER_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_CWCHER_HPP diff --git a/dsp/lib/sprout/sprout/cwchar/wcscat.hpp b/dsp/lib/sprout/sprout/cwchar/wcscat.hpp deleted file mode 100644 index a0aa28d..0000000 --- a/dsp/lib/sprout/sprout/cwchar/wcscat.hpp +++ /dev/null @@ -1,24 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTRING_WCSCAT_HPP -#define SPROUT_CSTRING_WCSCAT_HPP - -#include -#include - -namespace sprout { - - // 7.24.4.3.1 The wcscat function - // - inline SPROUT_CXX14_CONSTEXPR wchar_t* - wcscat(wchar_t* s1, wchar_t const* s2) { - return sprout::strcat(s1, s2); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTRING_WCSCAT_HPP diff --git a/dsp/lib/sprout/sprout/cwchar/wcschr.hpp b/dsp/lib/sprout/sprout/cwchar/wcschr.hpp deleted file mode 100644 index 1e74bcb..0000000 --- a/dsp/lib/sprout/sprout/cwchar/wcschr.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CWCHAR_WCSCHR_HPP -#define SPROUT_CWCHAR_WCSCHR_HPP - -#include -#include -#include - -namespace sprout { - // - // wcschr - // - // recursion depth: - // O(log N) - // - inline SPROUT_CONSTEXPR wchar_t const* - wcschr(wchar_t const* s, wchar_t c) { - return sprout::strchr(s, c); - } - inline SPROUT_CONSTEXPR wchar_t* - wcschr(wchar_t* s, wchar_t c) { - return sprout::strchr(s, c); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CWCHAR_WCSCHR_HPP diff --git a/dsp/lib/sprout/sprout/cwchar/wcscmp.hpp b/dsp/lib/sprout/sprout/cwchar/wcscmp.hpp deleted file mode 100644 index f99a950..0000000 --- a/dsp/lib/sprout/sprout/cwchar/wcscmp.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CWCHAR_WCSCMP_HPP -#define SPROUT_CWCHAR_WCSCMP_HPP - -#include -#include - -namespace sprout { - // - // wcscmp - // - // recursion depth: - // O(log(N1+N2)) - // - inline SPROUT_CONSTEXPR int - wcscmp(wchar_t const* s1, wchar_t const* s2) { - return sprout::strcmp(s1, s2); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CWCHAR_WCSCMP_HPP diff --git a/dsp/lib/sprout/sprout/cwchar/wcscoll.hpp b/dsp/lib/sprout/sprout/cwchar/wcscoll.hpp deleted file mode 100644 index 51649f4..0000000 --- a/dsp/lib/sprout/sprout/cwchar/wcscoll.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CWCHAR_WCSCOLL_HPP -#define SPROUT_CWCHAR_WCSCOLL_HPP - -#include -#include - -namespace sprout { - // - // wcscoll - // - // recursion depth: - // O(log(N1+N2)) - // - inline SPROUT_CONSTEXPR int - wcscoll(wchar_t const* s1, wchar_t const* s2) { - return sprout::strcoll(s1, s2); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CWCHAR_WCSCOLL_HPP diff --git a/dsp/lib/sprout/sprout/cwchar/wcscpy.hpp b/dsp/lib/sprout/sprout/cwchar/wcscpy.hpp deleted file mode 100644 index 6bde630..0000000 --- a/dsp/lib/sprout/sprout/cwchar/wcscpy.hpp +++ /dev/null @@ -1,24 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTRING_WCSCPY_HPP -#define SPROUT_CSTRING_WCSCPY_HPP - -#include -#include - -namespace sprout { - - // 7.24.4.2.1 The wcscpy function - // - inline SPROUT_CXX14_CONSTEXPR wchar_t* - wcscpy(wchar_t* s1, wchar_t const* s2) { - return sprout::strcpy(s1, s2); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTRING_WCSCPY_HPP diff --git a/dsp/lib/sprout/sprout/cwchar/wcscspn.hpp b/dsp/lib/sprout/sprout/cwchar/wcscspn.hpp deleted file mode 100644 index c322587..0000000 --- a/dsp/lib/sprout/sprout/cwchar/wcscspn.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CWCHAR_WCSCSPN_HPP -#define SPROUT_CWCHAR_WCSCSPN_HPP - -#include -#include -#include - -namespace sprout { - // - // wcscspn - // - // recursion depth: - // O(log(N1+N2)) - // - inline SPROUT_CONSTEXPR std::size_t - wcscspn(wchar_t const* s1, wchar_t const* s2) { - return sprout::strcspn(s1, s2); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CWCHAR_WCSCSPN_HPP diff --git a/dsp/lib/sprout/sprout/cwchar/wcslen.hpp b/dsp/lib/sprout/sprout/cwchar/wcslen.hpp deleted file mode 100644 index 6518da5..0000000 --- a/dsp/lib/sprout/sprout/cwchar/wcslen.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CWCHAR_WCSLEN_HPP -#define SPROUT_CWCHAR_WCSLEN_HPP - -#include -#include -#include - -namespace sprout { - // - // wcslen - // - // recursion depth: - // O(log N) - // - inline SPROUT_CONSTEXPR std::size_t - wcslen(wchar_t const* s) { - return sprout::strlen(s); - } - inline SPROUT_CONSTEXPR std::size_t - wcslen(wchar_t const* s, std::size_t n) { - return sprout::strlen(s, n); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CWCHAR_WCSLEN_HPP diff --git a/dsp/lib/sprout/sprout/cwchar/wcsncat.hpp b/dsp/lib/sprout/sprout/cwchar/wcsncat.hpp deleted file mode 100644 index a2e51d8..0000000 --- a/dsp/lib/sprout/sprout/cwchar/wcsncat.hpp +++ /dev/null @@ -1,24 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CSTRING_WCSNCAT_HPP -#define SPROUT_CSTRING_WCSNCAT_HPP - -#include -#include - -namespace sprout { - - // 7.24.4.3.2 The wcsncat function - // - inline SPROUT_CXX14_CONSTEXPR wchar_t* - wcsncat(wchar_t* s1, wchar_t const* s2, std::size_t n) { - return sprout::strncat(s1, s2, n); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CSTRING_WCSNCAT_HPP diff --git a/dsp/lib/sprout/sprout/cwchar/wcsncmp.hpp b/dsp/lib/sprout/sprout/cwchar/wcsncmp.hpp deleted file mode 100644 index 9870f39..0000000 --- a/dsp/lib/sprout/sprout/cwchar/wcsncmp.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CWCHAR_WCSNCMP_HPP -#define SPROUT_CWCHAR_WCSNCMP_HPP - -#include -#include -#include - -namespace sprout { - // - // wcsncmp - // - // recursion depth: - // O(log(N1+N2)) - // - inline SPROUT_CONSTEXPR int - wcsncmp(wchar_t const* s1, wchar_t const* s2, std::size_t n) { - return sprout::strncmp(s1, s2, n); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CWCHAR_WCSNCMP_HPP diff --git a/dsp/lib/sprout/sprout/cwchar/wcsncpy.hpp b/dsp/lib/sprout/sprout/cwchar/wcsncpy.hpp deleted file mode 100644 index 999d146..0000000 --- a/dsp/lib/sprout/sprout/cwchar/wcsncpy.hpp +++ /dev/null @@ -1,24 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CWCHAR_WCS_HPP -#define SPROUT_CWCHAR_WCS_HPP - -#include -#include - -namespace sprout { - - // 7.24.4.2.2 The wcsncpy function - // - inline SPROUT_CXX14_CONSTEXPR wchar_t* - wcsncpy(wchar_t* s1, wchar_t const* s2, std::size_t n) { - return sprout::strncpy(s1, s2, n); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CWCHAR_WCS_HPP diff --git a/dsp/lib/sprout/sprout/cwchar/wcspbrk.hpp b/dsp/lib/sprout/sprout/cwchar/wcspbrk.hpp deleted file mode 100644 index 9b77b47..0000000 --- a/dsp/lib/sprout/sprout/cwchar/wcspbrk.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CWCHAR_WCSPBRK_HPP -#define SPROUT_CWCHAR_WCSPBRK_HPP - -#include -#include -#include - -namespace sprout { - // - // wcspbrk - // - // recursion depth: - // O(log(N1+N2)) - // - inline SPROUT_CONSTEXPR wchar_t const* - wcspbrk(wchar_t const* s1, wchar_t const* s2) { - return sprout::strpbrk(s1, s2); - } - inline SPROUT_CONSTEXPR wchar_t* - wcspbrk(wchar_t* s1, wchar_t const* s2) { - return sprout::strpbrk(s1, s2); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CWCHAR_WCSPBRK_HPP diff --git a/dsp/lib/sprout/sprout/cwchar/wcsrchr.hpp b/dsp/lib/sprout/sprout/cwchar/wcsrchr.hpp deleted file mode 100644 index e82ce91..0000000 --- a/dsp/lib/sprout/sprout/cwchar/wcsrchr.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CWCHAR_WCSRCHR_HPP -#define SPROUT_CWCHAR_WCSRCHR_HPP - -#include -#include -#include - -namespace sprout { - // - // wcsrchr - // - // recursion depth: - // O(log N) - // - inline SPROUT_CONSTEXPR wchar_t const* - wcsrchr(wchar_t const* s, wchar_t c) { - return sprout::strrchr(s, c); - } - inline SPROUT_CONSTEXPR wchar_t* - wcsrchr(wchar_t* s, wchar_t c) { - return sprout::strrchr(s, c); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CWCHAR_WCSRCHR_HPP diff --git a/dsp/lib/sprout/sprout/cwchar/wcsspn.hpp b/dsp/lib/sprout/sprout/cwchar/wcsspn.hpp deleted file mode 100644 index 057e056..0000000 --- a/dsp/lib/sprout/sprout/cwchar/wcsspn.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CWCHAR_WCSSPN_HPP -#define SPROUT_CWCHAR_WCSSPN_HPP - -#include -#include -#include - -namespace sprout { - // - // wcsspn - // - // recursion depth: - // O(log(N1+N2)) - // - inline SPROUT_CONSTEXPR std::size_t - wcsspn(wchar_t const* s1, wchar_t const* s2) { - return sprout::strspn(s1, s2); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CWCHAR_WCSSPN_HPP diff --git a/dsp/lib/sprout/sprout/cwchar/wcsstr.hpp b/dsp/lib/sprout/sprout/cwchar/wcsstr.hpp deleted file mode 100644 index 0cb723b..0000000 --- a/dsp/lib/sprout/sprout/cwchar/wcsstr.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CWCHAR_WCSSTR_HPP -#define SPROUT_CWCHAR_WCSSTR_HPP - -#include -#include - -namespace sprout { - // - // wcsstr - // - // recursion depth: - // O(log(N1+N2)) - // - inline SPROUT_CONSTEXPR wchar_t const* - wcsstr(wchar_t const* s1, wchar_t const* s2) { - return sprout::strstr(s1, s2); - } - inline SPROUT_CONSTEXPR wchar_t* - wcsstr(wchar_t* s1, wchar_t const* s2) { - return sprout::strstr(s1, s2); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CWCHAR_WCSSTR_HPP diff --git a/dsp/lib/sprout/sprout/cwchar/wmemchr.hpp b/dsp/lib/sprout/sprout/cwchar/wmemchr.hpp deleted file mode 100644 index dc16908..0000000 --- a/dsp/lib/sprout/sprout/cwchar/wmemchr.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CWCHAR_WMEMCHR_HPP -#define SPROUT_CWCHAR_WMEMCHR_HPP - -#include -#include - -namespace sprout { - // - // wmemchr - // - // recursion depth: - // O(log N) - // - inline SPROUT_CONSTEXPR wchar_t const* - wmemchr(wchar_t const* s, wchar_t c, size_t n) { - return sprout::detail::memchr(s, c, n); - } - - inline SPROUT_CONSTEXPR wchar_t* - wmemchr(wchar_t* s, wchar_t c, size_t n) { - return sprout::detail::memchr(s, c, n); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CWCHAR_WMEMCHR_HPP diff --git a/dsp/lib/sprout/sprout/cwchar/wmemcmp.hpp b/dsp/lib/sprout/sprout/cwchar/wmemcmp.hpp deleted file mode 100644 index c7952fc..0000000 --- a/dsp/lib/sprout/sprout/cwchar/wmemcmp.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CWCHAR_WMEMCMP_HPP -#define SPROUT_CWCHAR_WMEMCMP_HPP - -#include -#include - -namespace sprout { - // - // wmemcmp - // - // recursion depth: - // O(log(N1+N2)) - // - inline SPROUT_CONSTEXPR int - wmemcmp(wchar_t const* s1, wchar_t const* s2, std::size_t n) { - return sprout::detail::memcmp(s1, s2, n); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CWCHAR_WMEMCMP_HPP diff --git a/dsp/lib/sprout/sprout/cwchar/wmemcpy.hpp b/dsp/lib/sprout/sprout/cwchar/wmemcpy.hpp deleted file mode 100644 index 772b591..0000000 --- a/dsp/lib/sprout/sprout/cwchar/wmemcpy.hpp +++ /dev/null @@ -1,24 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CWCHAR_WMEMCPY_HPP -#define SPROUT_CWCHAR_WMEMCPY_HPP - -#include -#include - -namespace sprout { - - // 7.24.4.2.3 The wmemcpy function - // - inline SPROUT_CXX14_CONSTEXPR wchar_t* - wmemcpy(wchar_t* s1, wchar_t const* s2, std::size_t n) { - return sprout::detail::memcpy(s1, s2, n); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CWCHAR_WMEMCPY_HPP diff --git a/dsp/lib/sprout/sprout/cwchar/wmemmove.hpp b/dsp/lib/sprout/sprout/cwchar/wmemmove.hpp deleted file mode 100644 index bdd58a0..0000000 --- a/dsp/lib/sprout/sprout/cwchar/wmemmove.hpp +++ /dev/null @@ -1,24 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CWCHAR_WMEMMOVE_HPP -#define SPROUT_CWCHAR_WMEMMOVE_HPP - -#include -#include - -namespace sprout { - - // 7.24.4.2.4 The wmemmove function - // - inline SPROUT_CXX14_CONSTEXPR wchar_t* - wmemmove(wchar_t* s1, wchar_t const* s2, std::size_t n) { - return sprout::detail::memmove(s1, s2, n); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CWCHAR_WMEMMOVE_HPP diff --git a/dsp/lib/sprout/sprout/cwchar/wmemset.hpp b/dsp/lib/sprout/sprout/cwchar/wmemset.hpp deleted file mode 100644 index d228b79..0000000 --- a/dsp/lib/sprout/sprout/cwchar/wmemset.hpp +++ /dev/null @@ -1,24 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CWCHAR_WMEMSET_HPP -#define SPROUT_CWCHAR_WMEMSET_HPP - -#include -#include - -namespace sprout { - - // 7.24.4.6.2 The wmemset function - // - inline SPROUT_CXX14_CONSTEXPR wchar_t* - wmemset(wchar_t* s, wchar_t c, std::size_t n) { - return sprout::detail::memset(s, c, n); - } -} // namespace sprout - -#endif // #ifndef SPROUT_CWCHAR_WMEMSET_HPP diff --git a/dsp/lib/sprout/sprout/cwctype.hpp b/dsp/lib/sprout/sprout/cwctype.hpp deleted file mode 100644 index b05d9fa..0000000 --- a/dsp/lib/sprout/sprout/cwctype.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_CCTYPE_HPP -#define SPROUT_CCTYPE_HPP - -#include -#include - -#endif // #ifndef SPROUT_CCTYPE_HPP diff --git a/dsp/lib/sprout/sprout/darkroom.hpp b/dsp/lib/sprout/sprout/darkroom.hpp deleted file mode 100644 index 1664832..0000000 --- a/dsp/lib/sprout/sprout/darkroom.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_HPP -#define SPROUT_DARKROOM_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_DARKROOM_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/access.hpp b/dsp/lib/sprout/sprout/darkroom/access.hpp deleted file mode 100644 index 7df5f44..0000000 --- a/dsp/lib/sprout/sprout/darkroom/access.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_ACCESS_HPP -#define SPROUT_DARKROOM_ACCESS_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_DARKROOM_ACCESS_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/access/access.hpp b/dsp/lib/sprout/sprout/darkroom/access/access.hpp deleted file mode 100644 index ecf17de..0000000 --- a/dsp/lib/sprout/sprout/darkroom/access/access.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_ACCESS_ACCESS_HPP -#define SPROUT_DARKROOM_ACCESS_ACCESS_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace darkroom { - namespace access { - // - // element - // - template - struct element - : public sprout::tuples::tuple_element - {}; - // - // size - // - template - struct size - : public sprout::tuples::tuple_size - {}; - // - // unit - // - template - struct unit - : public sprout::darkroom::access::element<0, T> - {}; - // - // get - // - template - inline SPROUT_CONSTEXPR auto - get(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::tuples::get(SPROUT_FORWARD(T, t))) - -> decltype(sprout::tuples::get(SPROUT_FORWARD(T, t))) - { - return sprout::tuples::get(SPROUT_FORWARD(T, t)); - } - } // namespace access - } // namespace darkroom -} // namespace sprout - -#endif // #ifndef SPROUT_DARKROOM_ACCESS_ACCESS_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/access/traits.hpp b/dsp/lib/sprout/sprout/darkroom/access/traits.hpp deleted file mode 100644 index 7988f09..0000000 --- a/dsp/lib/sprout/sprout/darkroom/access/traits.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_ACCESS_TRAITS_HPP -#define SPROUT_DARKROOM_ACCESS_TRAITS_HPP - -#include -#include -#include - -namespace sprout { - namespace darkroom { - namespace access { - // - // is_tuple - // - template - struct is_tuple - : public sprout::false_type - {}; - template - struct is_tuple - : public sprout::darkroom::access::is_tuple - {}; - template - struct is_tuple - : public sprout::darkroom::access::is_tuple - {}; - template - struct is_tuple - : public sprout::darkroom::access::is_tuple - {}; - template - struct is_tuple > - : public sprout::true_type - {}; - } // namespace access - } // namespace darkroom -} // namespace sprout - -#endif // #ifndef SPROUT_DARKROOM_ACCESS_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/cameras.hpp b/dsp/lib/sprout/sprout/darkroom/cameras.hpp deleted file mode 100644 index 31efbed..0000000 --- a/dsp/lib/sprout/sprout/darkroom/cameras.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_CAMERAS_HPP -#define SPROUT_DARKROOM_CAMERAS_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_DARKROOM_CAMERAS_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/cameras/angle_of_view.hpp b/dsp/lib/sprout/sprout/darkroom/cameras/angle_of_view.hpp deleted file mode 100644 index a9c75e7..0000000 --- a/dsp/lib/sprout/sprout/darkroom/cameras/angle_of_view.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_CAMERAS_ANGLE_OF_VIEW_HPP -#define SPROUT_DARKROOM_CAMERAS_ANGLE_OF_VIEW_HPP - -#include -#include -#include - -namespace sprout { - namespace darkroom { - namespace cameras { - // - // angle_of_view_reference - // - struct angle_of_view_reference { - public: - enum values { - long_side, - short_side, - width, - height - }; - }; - } // namespace cameras - } // namespace darkroom -} // namespace sprout - -#endif // #ifndef SPROUT_DARKROOM_CAMERAS_ANGLE_OF_VIEW_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/cameras/calculate.hpp b/dsp/lib/sprout/sprout/darkroom/cameras/calculate.hpp deleted file mode 100644 index f32a377..0000000 --- a/dsp/lib/sprout/sprout/darkroom/cameras/calculate.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_CAMERAS_CALCULATE_HPP -#define SPROUT_DARKROOM_CAMERAS_CALCULATE_HPP - -#include -#include - -namespace sprout { - namespace darkroom { - namespace cameras { - // - // calculate_result - // - template - struct calculate_result - : public sprout::identity - {}; - template - struct calculate_result - : public sprout::darkroom::cameras::calculate_result - {}; - template - struct calculate_result - : public sprout::darkroom::cameras::calculate_result - {}; - template - struct calculate_result - : public sprout::darkroom::cameras::calculate_result - {}; - - // - // calculate - // - template - inline SPROUT_CONSTEXPR typename sprout::darkroom::cameras::calculate_result::type - calculate(Camera const& camera, Unit2D const& x, Unit2D const& y, Unit2D const& width, Unit2D const& height) { - return camera(x, y, width, height); - } - } // namespace cameras - } // namespace darkroom -} // namespace sprout - -#endif // #ifndef SPROUT_DARKROOM_CAMERAS_CALCULATE_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/cameras/simple_camera.hpp b/dsp/lib/sprout/sprout/darkroom/cameras/simple_camera.hpp deleted file mode 100644 index 8155f43..0000000 --- a/dsp/lib/sprout/sprout/darkroom/cameras/simple_camera.hpp +++ /dev/null @@ -1,153 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_CAMERAS_SIMPLE_CAMERA_HPP -#define SPROUT_DARKROOM_CAMERAS_SIMPLE_CAMERA_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace darkroom { - namespace cameras { - // - // basic_simple_camera - // - template > - class basic_simple_camera { - public: - typedef Unit unit_type; - typedef Position position_type; - typedef sprout::tuples::tuple ray_type; - typedef sprout::darkroom::cameras::angle_of_view_reference angle_of_view_reference; - private: - unit_type far_plane_; - angle_of_view_reference::values reference_value_; - position_type position_; - position_type fixation_point_; - unit_type rotate_; - private: - SPROUT_CONSTEXPR position_type - transform_1(position_type const& c, unit_type const& u, unit_type const& v, unit_type const& l) const { - return sprout::darkroom::coords::add( - c, - position_type( - sprout::darkroom::coords::z(c) * u / l, - v, - -sprout::darkroom::coords::x(c) * u / l - ) - ); - } - SPROUT_CONSTEXPR position_type - transform(position_type const& c, unit_type const& u, unit_type const& v) const { - return transform_1( - c, - u * sprout::cos(rotate_) - v * sprout::sin(rotate_), - u * sprout::sin(rotate_) + v * sprout::cos(rotate_), - sprout::sqrt( - sprout::darkroom::coords::x(c) * sprout::darkroom::coords::x(c) - + sprout::darkroom::coords::z(c) * sprout::darkroom::coords::z(c) - ) - ); - } - template - SPROUT_CONSTEXPR position_type - reference_width( - Unit2D const& x, Unit2D const& y, - Unit2D const& width, Unit2D const& height, - unit_type const& rate - ) const - { - return transform( - sprout::darkroom::coords::resize( - sprout::darkroom::coords::sub(fixation_point_, position_), - far_plane_ - ), - static_cast(x) / width - 0.5, - -((static_cast(y) / height - 0.5) * rate) - ); - } - template - SPROUT_CONSTEXPR position_type - reference_height( - Unit2D const& x, Unit2D const& y, - Unit2D const& width, Unit2D const& height, - unit_type const& rate - ) const - { - return transform( - sprout::darkroom::coords::resize( - sprout::darkroom::coords::sub(fixation_point_, position_), - far_plane_ - ), - (static_cast(x) / width - 0.5) * rate, - -(static_cast(y) / height - 0.5) - ); - } - public: - explicit SPROUT_CONSTEXPR basic_simple_camera( - unit_type const& far_plane, - angle_of_view_reference::values reference_value = angle_of_view_reference::long_side, - position_type const& position = position_type(0, 0, -1), - position_type const& fixation_point = position_type(0, 0, 0), - unit_type const& rotate = 0 - ) - : far_plane_(far_plane) - , reference_value_(reference_value) - , position_(position) - , fixation_point_(fixation_point) - , rotate_(rotate) - {} - template - SPROUT_CONSTEXPR ray_type - operator()(Unit2D const& x, Unit2D const& y, Unit2D const& width, Unit2D const& height) const { - return ray_type( - position_, - sprout::darkroom::coords::normalize( - (reference_value_ == angle_of_view_reference::long_side && width >= height) - || (reference_value_ == angle_of_view_reference::short_side && width < height) - || reference_value_ == angle_of_view_reference::width - ? reference_width(x, y, width, height, static_cast(height) / width) - : reference_height(x, y, width, height, static_cast(width) / height) - ) - ); - } - }; - // - // make_simple_camera - // - template - inline SPROUT_CONSTEXPR sprout::darkroom::cameras::basic_simple_camera - make_simple_camera( - Unit const& far_plane, - typename sprout::darkroom::cameras::basic_simple_camera::angle_of_view_reference::values reference_value - = sprout::darkroom::cameras::basic_simple_camera::angle_of_view_reference::long_side, - typename sprout::darkroom::cameras::basic_simple_camera::position_type const& position - = typename sprout::darkroom::cameras::basic_simple_camera::position_type(0, 0, -1), - typename sprout::darkroom::cameras::basic_simple_camera::position_type const& fixation_point - = typename sprout::darkroom::cameras::basic_simple_camera::position_type(0, 0, 0), - Unit const& rotate = 0 - ) - { - return sprout::darkroom::cameras::basic_simple_camera( - far_plane, - reference_value, - position, - fixation_point, - rotate - ); - } - } // namespace cameras - } // namespace darkroom -} // namespace sprout - -#endif // #ifndef SPROUT_DARKROOM_CAMERAS_SIMPLE_CAMERA_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/colors.hpp b/dsp/lib/sprout/sprout/darkroom/colors.hpp deleted file mode 100644 index da6b9f3..0000000 --- a/dsp/lib/sprout/sprout/darkroom/colors.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_COLORS_HPP -#define SPROUT_DARKROOM_COLORS_HPP - -#include -#include - -#endif // #ifndef SPROUT_DARKROOM_COLORS_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/colors/rgb.hpp b/dsp/lib/sprout/sprout/darkroom/colors/rgb.hpp deleted file mode 100644 index b766aa9..0000000 --- a/dsp/lib/sprout/sprout/darkroom/colors/rgb.hpp +++ /dev/null @@ -1,196 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_COLORS_RGB_HPP -#define SPROUT_DARKROOM_COLORS_RGB_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace darkroom { - namespace colors { - // - // has_alpha - // - template - struct has_alpha - : public sprout::bool_constant<(sprout::darkroom::access::size::value >= 4)> - {}; - - // - // r - // g - // b - // a - // - template - inline SPROUT_CONSTEXPR auto - r(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::darkroom::access::get<0>(SPROUT_FORWARD(T, t))) - -> decltype(sprout::darkroom::access::get<0>(SPROUT_FORWARD(T, t))) - { - return sprout::darkroom::access::get<0>(SPROUT_FORWARD(T, t)); - } - template - inline SPROUT_CONSTEXPR auto - g(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::darkroom::access::get<1>(SPROUT_FORWARD(T, t))) - -> decltype(sprout::darkroom::access::get<1>(SPROUT_FORWARD(T, t))) - { - return sprout::darkroom::access::get<1>(SPROUT_FORWARD(T, t)); - } - template - inline SPROUT_CONSTEXPR auto - b(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::darkroom::access::get<2>(SPROUT_FORWARD(T, t))) - -> decltype(sprout::darkroom::access::get<2>(SPROUT_FORWARD(T, t))) - { - return sprout::darkroom::access::get<2>(SPROUT_FORWARD(T, t)); - } - // - // a - // - template< - typename T, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR auto - a(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::darkroom::access::get<3>(SPROUT_FORWARD(T, t))) - -> decltype(sprout::darkroom::access::get<3>(SPROUT_FORWARD(T, t))) - { - return sprout::darkroom::access::get<3>(SPROUT_FORWARD(T, t)); - } - template< - typename T, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::darkroom::access::unit::type - a(T&&) - SPROUT_NOEXCEPT_IF_EXPR(typename sprout::darkroom::access::unit::type()) - { - return typename sprout::darkroom::access::unit::type(); - } - - // - // rgb_t - // rgb - // - typedef sprout::tuples::tuple rgb_t; - inline SPROUT_CONSTEXPR sprout::darkroom::colors::rgb_t - rgb(std::uint8_t r = 0, std::uint8_t g = 0, std::uint8_t b = 0) { - return sprout::darkroom::colors::rgb_t(r, g, b); - } - - // - // rgb_f_t - // rgb_f - // - typedef sprout::tuples::tuple rgb_f_t; - inline SPROUT_CONSTEXPR sprout::darkroom::colors::rgb_f_t - rgb_f(double r = 0, double g = 0, double b = 0) { - return sprout::darkroom::colors::rgb_f_t(r, g, b); - } - - // - // mul - // - template - inline SPROUT_CONSTEXPR Color - mul(Color const& lhs, Fac const& rhs) { - return sprout::tuples::remake( - lhs, - sprout::darkroom::colors::r(lhs) * rhs, - sprout::darkroom::colors::g(lhs) * rhs, - sprout::darkroom::colors::b(lhs) * rhs - ); - } - template - inline SPROUT_CONSTEXPR Color - mul(Color const& lhs, Fac const& rhs, Tail const&... tail) { - return sprout::darkroom::colors::mul( - sprout::darkroom::colors::mul(lhs, rhs), - tail... - ); - } - // - // add - // - template - inline SPROUT_CONSTEXPR Color1 - add(Color1 const& lhs, Color2 const& rhs) { - return sprout::tuples::remake( - lhs, - sprout::darkroom::colors::r(lhs) + sprout::darkroom::colors::r(rhs), - sprout::darkroom::colors::g(lhs) + sprout::darkroom::colors::g(rhs), - sprout::darkroom::colors::b(lhs) + sprout::darkroom::colors::b(rhs) - ); - } - template - inline SPROUT_CONSTEXPR Color1 - add(Color1 const& lhs, Color2 const& rhs, Tail const&... tail) { - return sprout::darkroom::colors::add( - sprout::darkroom::colors::add(lhs, rhs), - tail... - ); - } - // - // filter - // - template - inline SPROUT_CONSTEXPR Color1 - filter(Color1 const& lhs, Color2 const& rhs) { - return sprout::tuples::remake( - lhs, - sprout::darkroom::colors::r(lhs) * sprout::darkroom::colors::r(rhs), - sprout::darkroom::colors::g(lhs) * sprout::darkroom::colors::g(rhs), - sprout::darkroom::colors::b(lhs) * sprout::darkroom::colors::b(rhs) - ); - } - template - inline SPROUT_CONSTEXPR Color1 - filter(Color1 const& lhs, Color2 const& rhs, Tail const&... tail) { - return sprout::darkroom::colors::filter( - sprout::darkroom::colors::filter(lhs, rhs), - tail... - ); - } - - // - // rgb_f_to_rgb - // - template - inline SPROUT_CONSTEXPR RGB - rgb_f_to_rgb(RGB_F const& col) { - typedef typename sprout::darkroom::access::unit::type unit_type; - return sprout::tuples::make( - sprout::darkroom::colors::r(col) < 0 ? sprout::numeric_limits::min() - : sprout::darkroom::colors::r(col) > 1 ? sprout::numeric_limits::max() - : sprout::darkroom::colors::r(col) * sprout::numeric_limits::max() - , - sprout::darkroom::colors::g(col) < 0 ? sprout::numeric_limits::min() - : sprout::darkroom::colors::g(col) > 1 ? sprout::numeric_limits::max() - : sprout::darkroom::colors::g(col) * sprout::numeric_limits::max() - , - sprout::darkroom::colors::b(col) < 0 ? sprout::numeric_limits::min() - : sprout::darkroom::colors::b(col) > 1 ? sprout::numeric_limits::max() - : sprout::darkroom::colors::b(col) * sprout::numeric_limits::max() - ); - } - } // namespace colors - } // namespace darkroom -} // namespace sprout - -#endif // #ifndef SPROUT_DARKROOM_COLORS_RGB_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/coords.hpp b/dsp/lib/sprout/sprout/darkroom/coords.hpp deleted file mode 100644 index c835c63..0000000 --- a/dsp/lib/sprout/sprout/darkroom/coords.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_COORDS_HPP -#define SPROUT_DARKROOM_COORDS_HPP - -#include -#include - -#endif // #ifndef SPROUT_DARKROOM_COORDS_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/coords/vector.hpp b/dsp/lib/sprout/sprout/darkroom/coords/vector.hpp deleted file mode 100644 index b6bcbb4..0000000 --- a/dsp/lib/sprout/sprout/darkroom/coords/vector.hpp +++ /dev/null @@ -1,253 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_COORDS_VECTOR_HPP -#define SPROUT_DARKROOM_COORDS_VECTOR_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace darkroom { - namespace coords { - // - // x - // y - // z - // - template - inline SPROUT_CONSTEXPR auto - x(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::darkroom::access::get<0>(SPROUT_FORWARD(T, t))) - -> decltype(sprout::darkroom::access::get<0>(SPROUT_FORWARD(T, t))) - { - return sprout::darkroom::access::get<0>(SPROUT_FORWARD(T, t)); - } - template - inline SPROUT_CONSTEXPR auto - y(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::darkroom::access::get<1>(SPROUT_FORWARD(T, t))) - -> decltype(sprout::darkroom::access::get<1>(SPROUT_FORWARD(T, t))) - { - return sprout::darkroom::access::get<1>(SPROUT_FORWARD(T, t)); - } - template - inline SPROUT_CONSTEXPR auto - z(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::darkroom::access::get<2>(SPROUT_FORWARD(T, t))) - -> decltype(sprout::darkroom::access::get<2>(SPROUT_FORWARD(T, t))) - { - return sprout::darkroom::access::get<2>(SPROUT_FORWARD(T, t)); - } - - // - // vector3d_t - // vector3d - // - typedef sprout::tuples::tuple vector3d_t; - - inline SPROUT_CONSTEXPR sprout::darkroom::coords::vector3d_t - vector3d(double x = 0, double y = 0, double z = 0) { - return sprout::darkroom::coords::vector3d_t(x, y, z); - } - - // - // is_zero - // - template - inline SPROUT_CONSTEXPR bool - is_zero(Vector const& vec) { - return sprout::darkroom::coords::x(vec) == 0 - && sprout::darkroom::coords::y(vec) == 0 - && sprout::darkroom::coords::z(vec) == 0 - ; - } - // - // length_sq - // - template - inline SPROUT_CONSTEXPR typename sprout::darkroom::access::unit::type - length_sq(Vector const& vec) { - return sprout::darkroom::coords::x(vec) * sprout::darkroom::coords::x(vec) - + sprout::darkroom::coords::y(vec) * sprout::darkroom::coords::y(vec) - + sprout::darkroom::coords::z(vec) * sprout::darkroom::coords::z(vec) - ; - } - // - // length - // - template - inline SPROUT_CONSTEXPR typename sprout::darkroom::access::unit::type - length(Vector const& vec) { - return sprout::sqrt(sprout::darkroom::coords::length_sq(vec)); - } - // - // add - // - template - inline SPROUT_CONSTEXPR Vector1 - add(Vector1 const& lhs, Vector2 const& rhs) { - return sprout::tuples::remake( - lhs, - sprout::darkroom::coords::x(lhs) + sprout::darkroom::coords::x(rhs), - sprout::darkroom::coords::y(lhs) + sprout::darkroom::coords::y(rhs), - sprout::darkroom::coords::z(lhs) + sprout::darkroom::coords::z(rhs) - ); - } - // - // sub - // - template - inline SPROUT_CONSTEXPR Vector1 - sub(Vector1 const& lhs, Vector2 const& rhs) { - return sprout::tuples::remake( - lhs, - sprout::darkroom::coords::x(lhs) - sprout::darkroom::coords::x(rhs), - sprout::darkroom::coords::y(lhs) - sprout::darkroom::coords::y(rhs), - sprout::darkroom::coords::z(lhs) - sprout::darkroom::coords::z(rhs) - ); - } - // - // scale - // - template - inline SPROUT_CONSTEXPR Vector - scale(Vector const& lhs, Fac const& rhs) { - return sprout::tuples::remake( - lhs, - sprout::darkroom::coords::x(lhs) * rhs, - sprout::darkroom::coords::y(lhs) * rhs, - sprout::darkroom::coords::z(lhs) * rhs - ); - } - // - // negate - // - template - inline SPROUT_CONSTEXPR Vector - negate(Vector const& vec) { - return sprout::tuples::remake( - vec, - -sprout::darkroom::coords::x(vec), - -sprout::darkroom::coords::y(vec), - -sprout::darkroom::coords::z(vec) - ); - } - // - // dot - // - template - inline SPROUT_CONSTEXPR typename sprout::darkroom::access::unit::type - dot(Vector const& lhs, Vector const& rhs) { - return sprout::darkroom::coords::x(lhs) * sprout::darkroom::coords::x(rhs) - + sprout::darkroom::coords::y(lhs) * sprout::darkroom::coords::y(rhs) - + sprout::darkroom::coords::z(lhs) * sprout::darkroom::coords::z(rhs) - ; - } - // - // cross - // - template - inline SPROUT_CONSTEXPR Vector1 - cross(Vector1 const& lhs, Vector2 const& rhs) { - return sprout::tuples::remake( - lhs, - sprout::darkroom::coords::y(lhs) * sprout::darkroom::coords::z(rhs) - - sprout::darkroom::coords::z(lhs) * sprout::darkroom::coords::y(rhs) - , - sprout::darkroom::coords::y(lhs) * sprout::darkroom::coords::x(rhs) - - sprout::darkroom::coords::x(lhs) * sprout::darkroom::coords::y(rhs) - , - sprout::darkroom::coords::x(lhs) * sprout::darkroom::coords::y(rhs) - - sprout::darkroom::coords::y(lhs) * sprout::darkroom::coords::x(rhs) - ); - } - // - // normalize - // - namespace detail { - template - inline SPROUT_CONSTEXPR Vector - normalize_impl(Vector const& vec, typename sprout::darkroom::access::unit::type const& len) { - return sprout::tuples::remake( - vec, - sprout::darkroom::coords::x(vec) / len, - sprout::darkroom::coords::y(vec) / len, - sprout::darkroom::coords::z(vec) / len - ); - } - } // namespace detail - template - inline SPROUT_CONSTEXPR Vector - normalize(Vector const& vec) { - return sprout::darkroom::coords::detail::normalize_impl( - vec, - sprout::darkroom::coords::length(vec) - ); - } - // - // resize - // - template - inline SPROUT_CONSTEXPR Vector - resize(Vector const& lhs, Fac const& rhs) { - return sprout::darkroom::coords::detail::normalize_impl( - lhs, - sprout::darkroom::coords::length(lhs) / rhs - ); - } - // - // reflect - // - template - inline SPROUT_CONSTEXPR Incident - reflect(Incident const& incid, Normal const& nor) { - return sprout::darkroom::coords::sub( - incid, - sprout::darkroom::coords::scale(nor, sprout::darkroom::coords::dot(incid, nor) * 2) - ); - } - // - // refract - // - namespace detail { - template - inline SPROUT_CONSTEXPR Incident - refract_impl_1(Incident const& incid, Normal const& nor, Refraction const& eta, InNor const& t, K const& k) { - return k < 0 ? sprout::tuples::remake(incid, 0, 0, 0) - : sprout::darkroom::coords::scale( - sprout::darkroom::coords::add(incid, sprout::darkroom::coords::scale(nor, t - sprout::math::sqrt(k))), - 1 / eta - ) - ; - } - template - inline SPROUT_CONSTEXPR Incident - refract_impl(Incident const& incid, Normal const& nor, Refraction const& eta, InNor const& t) { - return sprout::darkroom::coords::detail::refract_impl_1( - incid, nor, eta, - t, eta * eta + t * t - 1 - ); - } - } // namespace detail - template - inline SPROUT_CONSTEXPR Incident - refract(Incident const& incid, Normal const& nor, Refraction const& eta) { - return sprout::darkroom::coords::detail::refract_impl( - incid, nor, eta, - -sprout::darkroom::coords::dot(incid, nor) - ); - } - } // namespace coords - } // namespace darkroom -} // namespace sprout - -#endif // #ifndef SPROUT_DARKROOM_COORDS_VECTOR_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/intersects.hpp b/dsp/lib/sprout/sprout/darkroom/intersects.hpp deleted file mode 100644 index ebf72db..0000000 --- a/dsp/lib/sprout/sprout/darkroom/intersects.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_INTERSECTS_HPP -#define SPROUT_DARKROOM_INTERSECTS_HPP - -#include -#include - -#endif // #ifndef SPROUT_DARKROOM_INTERSECTS_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/intersects/intersection.hpp b/dsp/lib/sprout/sprout/darkroom/intersects/intersection.hpp deleted file mode 100644 index ad51e5a..0000000 --- a/dsp/lib/sprout/sprout/darkroom/intersects/intersection.hpp +++ /dev/null @@ -1,125 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_INTERSECTS_INTERSECTION_HPP -#define SPROUT_DARKROOM_INTERSECTS_INTERSECTION_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace darkroom { - namespace intersects { - // - // intersection - // - typedef sprout::tuples::tuple< - bool, - double, - sprout::darkroom::coords::vector3d_t, - sprout::darkroom::coords::vector3d_t, - sprout::darkroom::materials::material, - bool - > intersection; - - // - // has_is_from_inside - // - template - struct has_is_from_inside - : public sprout::bool_constant<(sprout::darkroom::access::size::value >= 6)> - {}; - - // - // does_intersect - // distance - // point_of_intersection - // normal - // material - // is_from_inside - // - template - inline SPROUT_CONSTEXPR auto - does_intersect(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::darkroom::access::get<0>(SPROUT_FORWARD(T, t))) - -> decltype(sprout::darkroom::access::get<0>(SPROUT_FORWARD(T, t))) - { - return sprout::darkroom::access::get<0>(SPROUT_FORWARD(T, t)); - } - template - inline SPROUT_CONSTEXPR auto - distance(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::darkroom::access::get<1>(SPROUT_FORWARD(T, t))) - -> decltype(sprout::darkroom::access::get<1>(SPROUT_FORWARD(T, t))) - { - return sprout::darkroom::access::get<1>(SPROUT_FORWARD(T, t)); - } - template - inline SPROUT_CONSTEXPR auto - point_of_intersection(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::darkroom::access::get<2>(SPROUT_FORWARD(T, t))) - -> decltype(sprout::darkroom::access::get<2>(SPROUT_FORWARD(T, t))) - { - return sprout::darkroom::access::get<2>(SPROUT_FORWARD(T, t)); - } - template - inline SPROUT_CONSTEXPR auto - normal(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::darkroom::access::get<3>(SPROUT_FORWARD(T, t))) - -> decltype(sprout::darkroom::access::get<3>(SPROUT_FORWARD(T, t))) - { - return sprout::darkroom::access::get<3>(SPROUT_FORWARD(T, t)); - } - template - inline SPROUT_CONSTEXPR auto - material(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::darkroom::access::get<4>(SPROUT_FORWARD(T, t))) - -> decltype(sprout::darkroom::access::get<4>(SPROUT_FORWARD(T, t))) - { - return sprout::darkroom::access::get<4>(SPROUT_FORWARD(T, t)); - } - template< - typename T, - typename sprout::enabler_if::type>::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR auto - is_from_inside(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::darkroom::access::get<5>(SPROUT_FORWARD(T, t))) - -> decltype(sprout::darkroom::access::get<5>(SPROUT_FORWARD(T, t))) - { - return sprout::darkroom::access::get<5>(SPROUT_FORWARD(T, t)); - } - template< - typename T, - typename sprout::enabler_if::type>::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::darkroom::access::element<5, sprout::darkroom::intersects::intersection>::type - is_from_inside(T&&) - SPROUT_NOEXCEPT_IF_EXPR((typename sprout::darkroom::access::element<5, sprout::darkroom::intersects::intersection>::type())) - { - return typename sprout::darkroom::access::element<5, sprout::darkroom::intersects::intersection>::type(); - } - - // - // make_intersection - // - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - make_intersection(Elements const&... elems) { - return sprout::tuples::make_tuple(elems...); - } - } // namespace intersects - } // namespace darkroom -} // namespace sprout - -#endif // #ifndef SPROUT_DARKROOM_INTERSECTS_INTERSECTION_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/lights.hpp b/dsp/lib/sprout/sprout/darkroom/lights.hpp deleted file mode 100644 index 60b5438..0000000 --- a/dsp/lib/sprout/sprout/darkroom/lights.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_LIGHTS_HPP -#define SPROUT_DARKROOM_LIGHTS_HPP - -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_DARKROOM_LIGHTS_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/lights/ambient_light.hpp b/dsp/lib/sprout/sprout/darkroom/lights/ambient_light.hpp deleted file mode 100644 index 1acb014..0000000 --- a/dsp/lib/sprout/sprout/darkroom/lights/ambient_light.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_LIGHTS_AMBIENT_LIGHT_HPP -#define SPROUT_DARKROOM_LIGHTS_AMBIENT_LIGHT_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace darkroom { - namespace lights { - // - // basic_ambient_light - // - template - class basic_ambient_light { - public: - typedef Color color_type; - private: - color_type col_; - public: - explicit SPROUT_CONSTEXPR basic_ambient_light(color_type const& col) - : col_(col) - {} - template - SPROUT_CONSTEXPR color_type - operator()(Intersection const& inter, Objects const&) const { - return sprout::darkroom::colors::filter( - col_, - sprout::darkroom::materials::color(sprout::darkroom::intersects::material(inter)) - ); - } - }; - // - // make_ambient_light - // - template - inline SPROUT_CONSTEXPR sprout::darkroom::lights::basic_ambient_light - make_ambient_light(Color const& col) { - return sprout::darkroom::lights::basic_ambient_light(col); - } - } // namespace lights - } // namespace darkroom -} // namespace sprout - -#endif // #ifndef SPROUT_DARKROOM_LIGHTS_AMBIENT_LIGHT_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/lights/calculate.hpp b/dsp/lib/sprout/sprout/darkroom/lights/calculate.hpp deleted file mode 100644 index f139da4..0000000 --- a/dsp/lib/sprout/sprout/darkroom/lights/calculate.hpp +++ /dev/null @@ -1,138 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_LIGHTS_CALCULATE_HPP -#define SPROUT_DARKROOM_LIGHTS_CALCULATE_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace darkroom { - namespace lights { - template - struct calculate_result; - - namespace detail { - template - struct calculate_result; - - template - struct calculate_result - : public sprout::identity - {}; - template - struct calculate_result - : public sprout::darkroom::lights::calculate_result::type, Intersection, Objects> - {}; - } // namespace detail - - // - // calculate_result - // - template - struct calculate_result - : public sprout::darkroom::lights::detail::calculate_result< - Light, Intersection, Objects, - sprout::darkroom::access::is_tuple::value - > - {}; - template - struct calculate_result - : public sprout::darkroom::lights::calculate_result - {}; - template - struct calculate_result - : public sprout::darkroom::lights::calculate_result - {}; - template - struct calculate_result - : public sprout::darkroom::lights::calculate_result - {}; - - // - // calculate - // - template< - typename Light, typename Intersection, typename Objects, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::darkroom::lights::calculate_result::type - calculate(Light const& light, Intersection const& inter, Objects const& objs); - template< - typename Light, typename Intersection, typename Objects, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::darkroom::lights::calculate_result::type - calculate(Light const& light, Intersection const& inter, Objects const& objs); - - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::darkroom::lights::calculate_result::type - calculate_2(Color const& col) { - return col; - } - template - inline SPROUT_CONSTEXPR typename sprout::darkroom::lights::calculate_result::type - calculate_2(Color1 const& col1, Color2 const& col2, Tail const&... tail) { - return sprout::darkroom::lights::detail::calculate_2( - sprout::darkroom::colors::add(col1, col2), - tail... - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::darkroom::lights::calculate_result::type - calculate_1( - Lights const& lights, Intersection const& inter, Objects const& objs, - sprout::index_tuple - ) - { - return sprout::darkroom::lights::detail::calculate_2( - sprout::darkroom::lights::calculate(sprout::darkroom::access::get(lights), inter, objs)... - ); - } - } // namespace detail - // - // calculate_list - // - template - inline SPROUT_CONSTEXPR typename sprout::darkroom::lights::calculate_result::type - calculate_list(Lights const& lights, Intersection const& inter, Objects const& objs) { - return sprout::darkroom::lights::detail::calculate_1( - lights, inter, objs, - sprout::tuple_indexes::make() - ); - } - - // - // calculate - // - template< - typename Light, typename Intersection, typename Objects, - typename sprout::enabler_if::value>::type - > - inline SPROUT_CONSTEXPR typename sprout::darkroom::lights::calculate_result::type - calculate(Light const& light, Intersection const& inter, Objects const& objs) { - return light(inter, objs); - } - template< - typename Light, typename Intersection, typename Objects, - typename sprout::enabler_if::value>::type - > - inline SPROUT_CONSTEXPR typename sprout::darkroom::lights::calculate_result::type - calculate(Light const& light, Intersection const& inter, Objects const& objs) { - return sprout::darkroom::lights::calculate_list(light, inter, objs); - } - } // namespace lights - } // namespace darkroom -} // namespace sprout - -#endif // #ifndef SPROUT_DARKROOM_LIGHTS_CALCULATE_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/lights/light_list.hpp b/dsp/lib/sprout/sprout/darkroom/lights/light_list.hpp deleted file mode 100644 index 9e2f6cf..0000000 --- a/dsp/lib/sprout/sprout/darkroom/lights/light_list.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_LIGHTS_LIGHT_LIST_HPP -#define SPROUT_DARKROOM_LIGHTS_LIGHT_LIST_HPP - -#include -#include -#include - -namespace sprout { - namespace darkroom { - namespace lights { - // - // make_object_list - // - template - inline SPROUT_CONSTEXPR auto - make_light_list(Lights&&... lights) - -> decltype(sprout::make_tuple(SPROUT_FORWARD(Lights, lights)...)) - { - return sprout::make_tuple(SPROUT_FORWARD(Lights, lights)...); - } - } // namespace lights - } // namespace darkroom -} // namespace sprout - -#endif // #ifndef SPROUT_DARKROOM_LIGHTS_LIGHT_LIST_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/lights/parallel_light.hpp b/dsp/lib/sprout/sprout/darkroom/lights/parallel_light.hpp deleted file mode 100644 index 528c605..0000000 --- a/dsp/lib/sprout/sprout/darkroom/lights/parallel_light.hpp +++ /dev/null @@ -1,102 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_LIGHTS_PARALLEL_LIGHT_HPP -#define SPROUT_DARKROOM_LIGHTS_PARALLEL_LIGHT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace darkroom { - namespace lights { - // - // basic_parallel_light - // - template< - typename Position = sprout::darkroom::coords::vector3d_t, - typename Color = sprout::darkroom::colors::rgb_f_t - > - class basic_parallel_light { - public: - typedef Position position_type; - typedef typename sprout::darkroom::access::unit::type unit_type; - typedef Color color_type; - private: - position_type dir_; - color_type col_; - private: - template - SPROUT_CONSTEXPR color_type - shade_2(Intersection const& inter, unit_type const& intensity) const { - return sprout::darkroom::colors::mul( - sprout::darkroom::colors::filter( - col_, - sprout::darkroom::materials::color(sprout::darkroom::intersects::material(inter)) - ), - intensity - ); - } - template - SPROUT_CONSTEXPR color_type - shade_1(Intersection const& inter, LightRayIntersection const& light_ray_inter) const { - return shade_2( - inter, - !sprout::darkroom::intersects::does_intersect(light_ray_inter) - || sprout::darkroom::intersects::distance(light_ray_inter) - < sprout::numeric_limits::epsilon() - ? NS_SSCRISK_CEL_OR_SPROUT::max( - sprout::numeric_limits::epsilon(), - sprout::darkroom::coords::dot( - dir_, - sprout::darkroom::intersects::normal(inter) - ) - ) - : 0 - ); - } - public: - SPROUT_CONSTEXPR basic_parallel_light(position_type const& dir, color_type const& col) - : dir_(sprout::darkroom::coords::normalize(dir)) - , col_(col) - {} - template - SPROUT_CONSTEXPR color_type - operator()(Intersection const& inter, Objects const& objs) const { - return shade_1( - inter, - sprout::darkroom::objects::intersect( - objs, - sprout::darkroom::rays::make_detached_ray( - sprout::darkroom::intersects::point_of_intersection(inter), - dir_ - ) - ) - ); - } - }; - // - // make_parallel_light - // - template - inline SPROUT_CONSTEXPR sprout::darkroom::lights::basic_parallel_light - make_parallel_light(Position const& pos, Color const& col) { - return sprout::darkroom::lights::basic_parallel_light(pos, col); - } - } // namespace lights - } // namespace darkroom -} // namespace sprout - -#endif // #ifndef SPROUT_DARKROOM_LIGHTS_PARALLEL_LIGHT_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/lights/point_light.hpp b/dsp/lib/sprout/sprout/darkroom/lights/point_light.hpp deleted file mode 100644 index 074b909..0000000 --- a/dsp/lib/sprout/sprout/darkroom/lights/point_light.hpp +++ /dev/null @@ -1,133 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_LIGHTS_POINT_LIGHT_HPP -#define SPROUT_DARKROOM_LIGHTS_POINT_LIGHT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace darkroom { - namespace lights { - // - // basic_point_light - // - template< - typename Position = sprout::darkroom::coords::vector3d_t, - typename Color = sprout::darkroom::colors::rgb_f_t - > - class basic_point_light { - public: - typedef Position position_type; - typedef typename sprout::darkroom::access::unit::type unit_type; - typedef Color color_type; - private: - position_type pos_; - color_type col_; - private: - template - SPROUT_CONSTEXPR color_type - shade_4(Intersection const& inter, unit_type const& intensity) const { - return sprout::darkroom::colors::mul( - sprout::darkroom::colors::filter( - col_, - sprout::darkroom::materials::color(sprout::darkroom::intersects::material(inter)) - ), - intensity - ); - } - template - SPROUT_CONSTEXPR color_type - shade_3( - Intersection const& inter, position_type const& diff, position_type const& direction, - LightRayIntersection const& light_ray_inter - ) const - { - return shade_4( - inter, - !sprout::darkroom::intersects::does_intersect(light_ray_inter) - || sprout::darkroom::intersects::distance(light_ray_inter) - > sprout::darkroom::coords::length(diff) - || sprout::darkroom::intersects::distance(light_ray_inter) - < sprout::numeric_limits::epsilon() - ? NS_SSCRISK_CEL_OR_SPROUT::max( - sprout::numeric_limits::epsilon(), - sprout::darkroom::coords::dot( - direction, - sprout::darkroom::intersects::normal(inter) - ) - / (sprout::darkroom::coords::length(diff) + 1) - ) - : 0 - ); - } - template - SPROUT_CONSTEXPR color_type - shade_2(Intersection const& inter, Objects const& objs, position_type const& diff, position_type const& direction) const { - return shade_3( - inter, - diff, - direction, - sprout::darkroom::objects::intersect( - objs, - sprout::darkroom::rays::make_detached_ray( - sprout::darkroom::intersects::point_of_intersection(inter), - direction - ) - ) - ); - } - template - SPROUT_CONSTEXPR color_type - shade_1(Intersection const& inter, Objects const& objs, position_type const& diff) const { - return shade_2( - inter, - objs, - diff, - sprout::darkroom::coords::normalize(diff) - ); - } - public: - SPROUT_CONSTEXPR basic_point_light(position_type const& pos, color_type const& col) - : pos_(pos) - , col_(col) - {} - template - SPROUT_CONSTEXPR color_type - operator()(Intersection const& inter, Objects const& objs) const { - return shade_1( - inter, - objs, - sprout::darkroom::coords::sub( - pos_, - sprout::darkroom::intersects::point_of_intersection(inter) - ) - ); - } - }; - // - // make_point_light - // - template - inline SPROUT_CONSTEXPR sprout::darkroom::lights::basic_point_light - make_point_light(Position const& pos, Color const& col) { - return sprout::darkroom::lights::basic_point_light(pos, col); - } - } // namespace lights - } // namespace darkroom -} // namespace sprout - -#endif // #ifndef SPROUT_DARKROOM_LIGHTS_POINT_LIGHT_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/load/texture.hpp b/dsp/lib/sprout/sprout/darkroom/load/texture.hpp deleted file mode 100644 index 3bb286b..0000000 --- a/dsp/lib/sprout/sprout/darkroom/load/texture.hpp +++ /dev/null @@ -1,63 +0,0 @@ - -#ifndef DARKROOM_DEF_LOAD_TEXTURE_IDENTIFIER -# error should define DARKROOM_DEF_LOAD_TEXTURE_IDENTIFIER. -#endif - -#ifndef DARKROOM_DEF_LOAD_TEXTURE_FILE -# error should define DARKROOM_DEF_LOAD_TEXTURE_FILE. -#endif - -#define DARKROOM_LOAD_IDENTIFIER_DETAIL_CAT(id, suffix) DARKROOM_LOAD_IDENTIFIER_DETAIL_CAT_I(id, suffix) -#define DARKROOM_LOAD_IDENTIFIER_DETAIL_CAT_I(id, suffix) DARKROOM_LOAD_IDENTIFIER_DETAIL_CAT_II(id ## suffix) -#define DARKROOM_LOAD_IDENTIFIER_DETAIL_CAT_II(res) res - -#define DARKROOM_LOAD_DETAIL_IDENTIFIER(id) DARKROOM_LOAD_IDENTIFIER_DETAIL_CAT( \ - DARKROOM_LOAD_IDENTIFIER_DETAIL_CAT(DARKROOM_DEF_LOAD_TEXTURE_IDENTIFIER, id), \ - _darkroom_load_texture_detail \ - ) - -#define DARKROOM_LOAD_IDENTIFIER DARKROOM_DEF_LOAD_TEXTURE_IDENTIFIER -#ifdef DARKROOM_DEF_LOAD_INFO_IDENTIFIER -# define DARKROOM_LOAD_INFO_IDENTIFIER DARKROOM_DEF_LOAD_INFO_IDENTIFIER -#else -# define DARKROOM_LOAD_INFO_IDENTIFIER DARKROOM_LOAD_DETAIL_IDENTIFIER(info) -#endif - -SPROUT_STATIC_CONSTEXPR sprout::darkroom::textures::version_type DARKROOM_LOAD_DETAIL_IDENTIFIER(version) = -# define DARKROOM_LOADING_TEXTURE_VERSION -# include DARKROOM_DEF_LOAD_TEXTURE_FILE -# undef DARKROOM_LOADING_TEXTURE_VERSION - ; - -static_assert(DARKROOM_LOAD_DETAIL_IDENTIFIER(version) <= 0, "Unsupported darkroom tex version"); - -SPROUT_STATIC_CONSTEXPR sprout::darkroom::textures::info_type DARKROOM_LOAD_INFO_IDENTIFIER = { -# define DARKROOM_LOADING_TEXTURE_INFO -# include DARKROOM_DEF_LOAD_TEXTURE_FILE -# undef DARKROOM_LOADING_TEXTURE_INFO - }; - -SPROUT_STATIC_CONSTEXPR sprout::darkroom::textures::image_type< - DARKROOM_LOAD_INFO_IDENTIFIER.width, - DARKROOM_LOAD_INFO_IDENTIFIER.height -> DARKROOM_LOAD_IDENTIFIER( - DARKROOM_LOAD_INFO_IDENTIFIER, -# define DARKROOM_LOADING_TEXTURE_PIXEL -# include DARKROOM_DEF_LOAD_TEXTURE_FILE -# undef DARKROOM_LOADING_TEXTURE_PIXEL - ); - -#undef DARKROOM_LOAD_IDENTIFIER -#undef DARKROOM_LOAD_INFO_IDENTIFIER - -#undef DARKROOM_LOAD_DETAIL_IDENTIFIER - -#undef DARKROOM_LOAD_IDENTIFIER_DETAIL_CAT -#undef DARKROOM_LOAD_IDENTIFIER_DETAIL_CAT_I -#undef DARKROOM_LOAD_IDENTIFIER_DETAIL_CAT_II - -#undef DARKROOM_DEF_LOAD_TEXTURE_IDENTIFIER -#undef DARKROOM_DEF_LOAD_TEXTURE_FILE -#ifdef DARKROOM_DEF_LOAD_INFO_IDENTIFIER -# undef DARKROOM_DEF_LOAD_INFO_IDENTIFIER -#endif diff --git a/dsp/lib/sprout/sprout/darkroom/materials.hpp b/dsp/lib/sprout/sprout/darkroom/materials.hpp deleted file mode 100644 index d5f7ac9..0000000 --- a/dsp/lib/sprout/sprout/darkroom/materials.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_MATERIALS_HPP -#define SPROUT_DARKROOM_MATERIALS_HPP - -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_DARKROOM_MATERIALS_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/materials/calculate.hpp b/dsp/lib/sprout/sprout/darkroom/materials/calculate.hpp deleted file mode 100644 index a68619b..0000000 --- a/dsp/lib/sprout/sprout/darkroom/materials/calculate.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_MATERIALS_CALCULATE_HPP -#define SPROUT_DARKROOM_MATERIALS_CALCULATE_HPP - -#include -#include - -namespace sprout { - namespace darkroom { - namespace materials { - // - // calculate_result - // - template - struct calculate_result - : public sprout::identity - {}; - template - struct calculate_result - : public sprout::darkroom::materials::calculate_result - {}; - template - struct calculate_result - : public sprout::darkroom::materials::calculate_result - {}; - template - struct calculate_result - : public sprout::darkroom::materials::calculate_result - {}; - - // - // calculate - // - template - inline SPROUT_CONSTEXPR typename sprout::darkroom::materials::calculate_result::type - calculate(Image const& image, Unit const& u, Unit const& v) { - return image(u, v); - } - } // namespace materials - } // namespace darkroom -} // namespace sprout - -#endif // #ifndef SPROUT_DARKROOM_MATERIALS_CALCULATE_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/materials/interpolation.hpp b/dsp/lib/sprout/sprout/darkroom/materials/interpolation.hpp deleted file mode 100644 index 025ac7e..0000000 --- a/dsp/lib/sprout/sprout/darkroom/materials/interpolation.hpp +++ /dev/null @@ -1,61 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_MATERIALS_INTERPOLATION_HPP -#define SPROUT_DARKROOM_MATERIALS_INTERPOLATION_HPP - -#include -#include -#include - -namespace sprout { - namespace darkroom { - namespace materials { - // - // interpolation_type - // - struct interpolation_type { - public: - enum values { - nearest_neighbor, - bilinear, - bicubic - }; - }; - - // - // bilinear_interpolate - // - template - inline SPROUT_CONSTEXPR Color - bilinear_interpolate( - Color const& c00, Color const& c01, Color const& c10, Color const& c11, - Unit const& u, Unit const& v - ) - { - return sprout::darkroom::colors::add( - sprout::darkroom::colors::mul( - sprout::darkroom::colors::add( - sprout::darkroom::colors::mul(c00, 1 - u), - sprout::darkroom::colors::mul(c01, u) - ), - 1 - v - ), - sprout::darkroom::colors::mul( - sprout::darkroom::colors::add( - sprout::darkroom::colors::mul(c10, 1 - u), - sprout::darkroom::colors::mul(c11, u) - ), - v - ) - ); - } - } // namespace materials - } // namespace darkroom -} // namespace sprout - -#endif // #ifndef SPROUT_DARKROOM_MATERIALS_INTERPOLATION_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/materials/material.hpp b/dsp/lib/sprout/sprout/darkroom/materials/material.hpp deleted file mode 100644 index 33ed0ce..0000000 --- a/dsp/lib/sprout/sprout/darkroom/materials/material.hpp +++ /dev/null @@ -1,185 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_MATERIALS_MATERIAL_HPP -#define SPROUT_DARKROOM_MATERIALS_MATERIAL_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace darkroom { - namespace materials { - // - // material - // - typedef sprout::tuples::tuple material; - - // - // has_color - // has_reflection - // has_alpha - // has_refraction - // - template - struct has_color - : public sprout::bool_constant<(sprout::darkroom::access::size::value >= 1)> - {}; - template - struct has_reflection - : public sprout::bool_constant<(sprout::darkroom::access::size::value >= 2)> - {}; - template - struct has_alpha - : public sprout::bool_constant<(sprout::darkroom::access::size::value >= 3)> - {}; - template - struct has_refraction - : public sprout::bool_constant<(sprout::darkroom::access::size::value >= 4)> - {}; - - // - // color - // - template< - typename T, - typename sprout::enabler_if::type>::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR auto - color(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::darkroom::access::get<0>(SPROUT_FORWARD(T, t))) - -> decltype(sprout::darkroom::access::get<0>(SPROUT_FORWARD(T, t))) - { - return sprout::darkroom::access::get<0>(SPROUT_FORWARD(T, t)); - } - template< - typename T, - typename sprout::enabler_if::type>::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::darkroom::access::element<0, sprout::darkroom::materials::material>::type - color(T&&) - SPROUT_NOEXCEPT_IF_EXPR((typename sprout::darkroom::access::element<0, sprout::darkroom::materials::material>::type())) - { - return typename sprout::darkroom::access::element<0, sprout::darkroom::materials::material>::type(); - } - // - // reflection - // - template< - typename T, - typename sprout::enabler_if::type>::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR auto - reflection(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::darkroom::access::get<1>(SPROUT_FORWARD(T, t))) - -> decltype(sprout::darkroom::access::get<1>(SPROUT_FORWARD(T, t))) - { - return sprout::darkroom::access::get<1>(SPROUT_FORWARD(T, t)); - } - template< - typename T, - typename sprout::enabler_if::type>::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::darkroom::access::element<1, sprout::darkroom::materials::material>::type - reflection(T&&) - SPROUT_NOEXCEPT_IF_EXPR((typename sprout::darkroom::access::element<1, sprout::darkroom::materials::material>::type())) - { - return typename sprout::darkroom::access::element<1, sprout::darkroom::materials::material>::type(); - } - // - // alpha - // - template< - typename T, - typename sprout::enabler_if::type>::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR auto - alpha(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::darkroom::access::get<2>(SPROUT_FORWARD(T, t))) - -> decltype(sprout::darkroom::access::get<2>(SPROUT_FORWARD(T, t))) - { - return sprout::darkroom::access::get<2>(SPROUT_FORWARD(T, t)); - } - template< - typename T, - typename sprout::enabler_if::type>::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::darkroom::access::element<2, sprout::darkroom::materials::material>::type - alpha(T&&) - SPROUT_NOEXCEPT_IF_EXPR((typename sprout::darkroom::access::element<2, sprout::darkroom::materials::material>::type())) - { - return typename sprout::darkroom::access::element<2, sprout::darkroom::materials::material>::type(); - } - // - // refraction - // - template< - typename T, - typename sprout::enabler_if::type>::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR auto - refraction(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::darkroom::access::get<3>(SPROUT_FORWARD(T, t))) - -> decltype(sprout::darkroom::access::get<3>(SPROUT_FORWARD(T, t))) - { - return sprout::darkroom::access::get<3>(SPROUT_FORWARD(T, t)); - } - template< - typename T, - typename sprout::enabler_if::type>::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::darkroom::access::element<3, sprout::darkroom::materials::material>::type - refraction(T&&) - SPROUT_NOEXCEPT_IF_EXPR((typename sprout::darkroom::access::element<3, sprout::darkroom::materials::material>::type())) - { - return typename sprout::darkroom::access::element<3, sprout::darkroom::materials::material>::type(); - } - - // - // calculate_material - // - namespace detail { - template - inline SPROUT_CONSTEXPR auto - calculate_material_impl(Material const& mat, Unit const& u, Unit const& v, sprout::index_tuple) - -> decltype(sprout::tuples::make_tuple( - sprout::darkroom::materials::calculate(sprout::darkroom::access::get(mat), u, v)... - )) - { - return sprout::tuples::make_tuple( - sprout::darkroom::materials::calculate(sprout::darkroom::access::get(mat), u, v)... - ); - } - } // namespace detail - template - inline SPROUT_CONSTEXPR auto - calculate_material(Material const& mat, Unit const& u, Unit const& v) - -> decltype(sprout::darkroom::materials::detail::calculate_material_impl(mat, u, v, sprout::tuples::tuple_indexes::make())) - { - return sprout::darkroom::materials::detail::calculate_material_impl(mat, u, v, sprout::tuples::tuple_indexes::make()); - } - - // - // make_material_image - // - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - make_material_image(Images const&... images) { - return sprout::tuples::make_tuple(images...); - } - } // namespace materials - } // namespace darkroom -} // namespace sprout - -#endif // #ifndef SPROUT_DARKROOM_MATERIALS_MATERIAL_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/materials/plaid.hpp b/dsp/lib/sprout/sprout/darkroom/materials/plaid.hpp deleted file mode 100644 index a2c4b64..0000000 --- a/dsp/lib/sprout/sprout/darkroom/materials/plaid.hpp +++ /dev/null @@ -1,135 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_MATERIALS_PLAID_HPP -#define SPROUT_DARKROOM_MATERIALS_PLAID_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace darkroom { - namespace materials { - // - // plaid_element - // - template - class plaid_element { - public: - typedef Element result_type; - typedef Scale unit_type; - private: - result_type elem1_; - result_type elem2_; - unit_type scale_; - private: - template - SPROUT_CONSTEXPR result_type - calculate_1(Unit const& u, Unit const& v) const { - return (u >= 0 && v >= 0) || (u < 0 && v < 0) ? elem1_ : elem2_; - } - public: - SPROUT_CONSTEXPR plaid_element(result_type const& elem1, result_type const& elem2, unit_type const& scale = 1) - : elem1_(elem1) - , elem2_(elem2) - , scale_(scale) - {} - template - SPROUT_CONSTEXPR result_type - operator()(Unit const& u, Unit const& v) const { - return calculate_1( - (u < 0 - ? scale_ + sprout::fmod(u, scale_) - : sprout::fmod(u, scale_) - ) - - scale_ / 2 - , - (v < 0 - ? scale_ + sprout::fmod(v, scale_) - : sprout::fmod(v, scale_) - ) - - scale_ / 2 - ); - } - }; - // - // make_plaid - // - template - inline SPROUT_CONSTEXPR sprout::darkroom::materials::plaid_element - make_plaid(Element const& elem1, Element const& elem2) { - return sprout::darkroom::materials::plaid_element(elem1, elem2); - } - template - inline SPROUT_CONSTEXPR sprout::darkroom::materials::plaid_element - make_plaid(Element const& elem1, Element const& elem2, Unit const& scale) { - return sprout::darkroom::materials::plaid_element(elem1, elem2, scale); - } - // - // make_plaid_material_image - // - namespace detail { - template - inline SPROUT_CONSTEXPR auto - make_plaid_material_image_impl( - sprout::index_tuple, - Elements const&... elems - ) - -> decltype(sprout::tuples::make_tuple( - sprout::darkroom::materials::make_plaid(sprout::pack_get(elems...), sprout::pack_get(elems...))... - )) - { - return sprout::tuples::make_tuple( - sprout::darkroom::materials::make_plaid(sprout::pack_get(elems...), sprout::pack_get(elems...))... - ); - } - template - inline SPROUT_CONSTEXPR auto - make_plaid_material_image_impl( - Unit const& scale, - sprout::index_tuple, - Elements const&... elems - ) - -> decltype(sprout::tuples::make_tuple( - sprout::darkroom::materials::make_plaid(sprout::pack_get(elems...), sprout::pack_get(elems...), scale)... - )) - { - return sprout::tuples::make_tuple( - sprout::darkroom::materials::make_plaid(sprout::pack_get(elems...), sprout::pack_get(elems...), scale)... - ); - } - } // namespace detail - template< - typename... Elements, - typename sprout::enabler_if::type = sprout::enabler - > - inline SPROUT_CONSTEXPR auto - make_plaid_material_image(Elements const&... elems) - -> decltype(sprout::darkroom::materials::detail::make_plaid_material_image_impl(sprout::make_index_tuple::make(), elems...)) - { - return sprout::darkroom::materials::detail::make_plaid_material_image_impl(sprout::make_index_tuple::make(), elems...); - } - template< - typename Unit, typename... Elements, - typename sprout::enabler_if::type = sprout::enabler - > - inline SPROUT_CONSTEXPR auto - make_plaid_material_image(Unit const& scale, Elements const&... elems) - -> decltype(sprout::darkroom::materials::detail::make_plaid_material_image_impl(scale, sprout::make_index_tuple::make(), elems...)) - { - return sprout::darkroom::materials::detail::make_plaid_material_image_impl(scale, sprout::make_index_tuple::make(), elems...); - } - } // namespace materials - } // namespace darkroom -} // namespace sprout - -#endif // #ifndef SPROUT_DARKROOM_MATERIALS_PLAID_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/materials/texture_map.hpp b/dsp/lib/sprout/sprout/darkroom/materials/texture_map.hpp deleted file mode 100644 index 49bbb2d..0000000 --- a/dsp/lib/sprout/sprout/darkroom/materials/texture_map.hpp +++ /dev/null @@ -1,186 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_MATERIALS_TEXTURE_MAP_HPP -#define SPROUT_DARKROOM_MATERIALS_TEXTURE_MAP_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace darkroom { - namespace materials { - // - // texture_map_interpolation - // - typedef sprout::darkroom::materials::interpolation_type texture_map_interpolation; - // - // texture_map_placement - // - struct texture_map_placement { - public: - enum values { - tile, - once - }; - }; - // - // texture_map - // - template - class texture_map { - public: - typedef Texture texture_type; - typedef typename texture_type::value_type result_type; - typedef Scale unit_type; - typedef sprout::darkroom::materials::interpolation_type interpolation_type; - typedef sprout::darkroom::materials::texture_map_placement texture_map_placement; - private: - sprout::value_holder texture_; - unit_type scale_; - unit_type offset_u_; - unit_type offset_v_; - result_type default_color_; - interpolation_type::values interpolation_value_; - texture_map_placement::values placement_value_; - private: - SPROUT_CONSTEXPR bool - is_nearest() const { - return interpolation_value_ == interpolation_type::nearest_neighbor; - } - SPROUT_CONSTEXPR bool - is_bilinear() const { - return interpolation_value_ == interpolation_type::bilinear; - } - SPROUT_CONSTEXPR bool - is_bicubic() const { - return interpolation_value_ == interpolation_type::bicubic; - } - SPROUT_CONSTEXPR bool - is_tile() const { - return placement_value_ == texture_map_placement::tile; - } - SPROUT_CONSTEXPR bool - is_once() const { - return placement_value_ == texture_map_placement::once; - } - SPROUT_CONSTEXPR result_type - get_color(unit_type const& x, unit_type const& y) const { - return is_tile() - ? texture_.get()( - x < 0 - ? texture_.get().width() - 1 - static_cast(-x) % texture_.get().width() - : static_cast(x) % texture_.get().width() - , - y < 0 - ? texture_.get().height() - 1 - static_cast(-y) % texture_.get().height() - : static_cast(y) % texture_.get().height() - ) - : x < 0 || x >= texture_.get().width() - || y < 0 || y >= texture_.get().height() - ? default_color_ - : texture_.get()(static_cast(x), static_cast(y)) - ; - } - template - SPROUT_CONSTEXPR result_type - calculate_nearest(Unit const& x, Unit const& y) const { - return get_color(x, y); - } - template - SPROUT_CONSTEXPR result_type - calculate_bilinear_1( - Unit const& x, Unit const& x0, - Unit const& y, Unit const& y0 - ) const - { - return sprout::darkroom::materials::bilinear_interpolate( - get_color(x0, y0), get_color(x0 + 1, y0), - get_color(x0, y0 + 1), get_color(x0 + 1, y0 + 1), - x - x0, y - y0 - ); - } - template - SPROUT_CONSTEXPR result_type - calculate_bilinear(Unit const& x, Unit const& y) const { - return calculate_bilinear_1( - x, sprout::floor(x), - y, sprout::floor(y) - ); - } - template - SPROUT_CONSTEXPR result_type - calc(Unit const& x, Unit const& y) const { - return is_nearest() ? calculate_nearest(x, y) - : calculate_bilinear(x, y) - ; - } - public: - explicit SPROUT_CONSTEXPR texture_map( - texture_type const& texture, unit_type const& scale = 1, - unit_type const& offset_u = 0, unit_type const& offset_v = 0, - result_type const& default_color = result_type(), - interpolation_type::values interpolation_value = interpolation_type::nearest_neighbor, - texture_map_placement::values placement_value = texture_map_placement::tile - ) - : texture_(texture) - , scale_(scale) - , offset_u_(offset_u) - , offset_v_(offset_v) - , default_color_(default_color) - , interpolation_value_(interpolation_value) - , placement_value_(placement_value) - {} - template - SPROUT_CONSTEXPR result_type - operator()(Unit const& u, Unit const& v) const { - return calc( - (u - offset_u_ + scale_ / 2) / scale_ * texture_.get().width(), - (-(v - offset_v_) + scale_ / 2) / scale_ * texture_.get().height() - ); - } - }; - // - // make_texture_map - // - template - inline SPROUT_CONSTEXPR sprout::darkroom::materials::texture_map - make_texture_map(Texture const& texture) { - return sprout::darkroom::materials::texture_map(texture); - } - template - inline SPROUT_CONSTEXPR sprout::darkroom::materials::texture_map - make_texture_map( - Texture const& texture, Unit const& scale, - Unit const& offset_u = 0, Unit const& offset_v = 0, - typename sprout::darkroom::materials::texture_map::result_type const& default_color - = typename sprout::darkroom::materials::texture_map::result_typ(), - sprout::darkroom::materials::interpolation_type::values interpolation_value - = sprout::darkroom::materials::interpolation_type::nearest_neighbor, - sprout::darkroom::materials::texture_map_placement::values placement_value - = sprout::darkroom::materials::texture_map_placement::tile - ) - { - return sprout::darkroom::materials::texture_map( - texture, - scale, - offset_u, - offset_v, - default_color, - interpolation_value, - placement_value - ); - } - } // namespace materials - } // namespace darkroom -} // namespace sprout - -#endif // #ifndef SPROUT_DARKROOM_MATERIALS_TEXTURE_MAP_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/materials/uniform.hpp b/dsp/lib/sprout/sprout/darkroom/materials/uniform.hpp deleted file mode 100644 index 781ceb9..0000000 --- a/dsp/lib/sprout/sprout/darkroom/materials/uniform.hpp +++ /dev/null @@ -1,60 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_MATERIALS_UNIFORM_HPP -#define SPROUT_DARKROOM_MATERIALS_UNIFORM_HPP - -#include -#include - -namespace sprout { - namespace darkroom { - namespace materials { - // - // uniform_element - // - template - class uniform_element { - public: - typedef Element result_type; - private: - result_type elem_; - public: - explicit SPROUT_CONSTEXPR uniform_element(result_type const& elem) - : elem_(elem) - {} - template - SPROUT_CONSTEXPR result_type - operator()(Unit const&, Unit const&) const { - return elem_; - } - }; - // - // make_uniform - // - template - inline SPROUT_CONSTEXPR sprout::darkroom::materials::uniform_element - make_uniform(Element const& elem) { - return sprout::darkroom::materials::uniform_element(elem); - } - // - // make_uniform_material_image - // - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple< - sprout::darkroom::materials::uniform_element... - > - make_uniform_material_image(Elements const&... elems) { - return sprout::tuples::make_tuple( - sprout::darkroom::materials::make_uniform(elems)... - ); - } - } // namespace materials - } // namespace darkroom -} // namespace sprout - -#endif // #ifndef SPROUT_DARKROOM_MATERIALS_UNIFORM_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/objects.hpp b/dsp/lib/sprout/sprout/darkroom/objects.hpp deleted file mode 100644 index e764e3a..0000000 --- a/dsp/lib/sprout/sprout/darkroom/objects.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_OBJECTS_HPP -#define SPROUT_DARKROOM_OBJECTS_HPP - -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_DARKROOM_OBJECTS_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/objects/aa_plane.hpp b/dsp/lib/sprout/sprout/darkroom/objects/aa_plane.hpp deleted file mode 100644 index 09b753b..0000000 --- a/dsp/lib/sprout/sprout/darkroom/objects/aa_plane.hpp +++ /dev/null @@ -1,214 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_OBJECTS_AA_PLANE_HPP -#define SPROUT_DARKROOM_OBJECTS_AA_PLANE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace darkroom { - namespace objects { - // - // aa_plane_direction - // - struct aa_plane_direction { - public: - enum values { - x, - y, - z - }; - }; - // - // aa_plane_face - // - struct aa_plane_face { - public: - enum values { - both, - negative, - positive, - same_as_direction - }; - }; - // - // basic_aa_plane - // - template - class basic_aa_plane { - public: - typedef Material material_type; - typedef Position position_type; - typedef typename sprout::darkroom::access::unit::type unit_type; - typedef sprout::darkroom::objects::aa_plane_direction aa_plane_direction; - typedef sprout::darkroom::objects::aa_plane_face aa_plane_face; - public: - template - struct intersection { - typedef sprout::tuples::tuple< - bool, - unit_type, - position_type, - position_type, - decltype(sprout::darkroom::materials::calculate_material( - std::declval(), - std::declval(), - std::declval() - )), - bool - > type; - }; - private: - aa_plane_direction::values direction_value_; - unit_type val_; - material_type mat_; - aa_plane_face::values face_; - private: - SPROUT_CONSTEXPR bool - is_x() const { - return direction_value_ == aa_plane_direction::x; - } - SPROUT_CONSTEXPR bool - is_y() const { - return direction_value_ == aa_plane_direction::y; - } - SPROUT_CONSTEXPR bool - is_z() const { - return direction_value_ == aa_plane_direction::z; - } - template - SPROUT_CONSTEXPR typename intersection::type - intersect_5(int hit_side, bool is_from_inside, bool does_intersect, unit_type distance, position_type const& point_of_intersection) const { - return typename intersection::type( - does_intersect, - distance, - point_of_intersection, - is_x() ? position_type(hit_side > 0 ? 1 : -1, 0, 0) - : is_y() ? position_type(0, hit_side > 0 ? 1 : -1, 0) - : position_type(0, 0, hit_side > 0 ? 1 : -1) - , - is_x() ? sprout::darkroom::materials::calculate_material( - mat_, - sprout::darkroom::coords::z(point_of_intersection), - sprout::darkroom::coords::y(point_of_intersection) - ) - : is_y() ? sprout::darkroom::materials::calculate_material( - mat_, - sprout::darkroom::coords::x(point_of_intersection), - sprout::darkroom::coords::z(point_of_intersection) - ) - : sprout::darkroom::materials::calculate_material( - mat_, - sprout::darkroom::coords::x(point_of_intersection), - sprout::darkroom::coords::y(point_of_intersection) - ) - , - is_from_inside - ); - } - template - SPROUT_CONSTEXPR typename intersection::type - intersect_4(Ray const& ray, int hit_side, bool is_from_inside, bool does_intersect, unit_type distance) const { - return intersect_5( - hit_side, - is_from_inside, - does_intersect, - distance, - does_intersect - ? sprout::darkroom::rays::point_of_intersection(ray, distance) - : position_type(0, 0, 0) - ); - } - template - SPROUT_CONSTEXPR typename intersection::type - intersect_3(Ray const& ray, unit_type pos_v, unit_type dir_v, int hit_side, bool is_from_inside, bool does_intersect) const { - return intersect_4( - ray, - hit_side, - is_from_inside, - does_intersect, - does_intersect - ? (pos_v - val_) / -dir_v - : unit_type(-1) - ); - } - template - SPROUT_CONSTEXPR typename intersection::type - intersect_2(Ray const& ray, unit_type pos_v, unit_type dir_v, int hit_side, bool is_from_inside) const { - return intersect_3( - ray, - pos_v, - dir_v, - hit_side, - is_from_inside, - (hit_side > 0 && dir_v < 0) || (hit_side < 0 && dir_v > 0) - ); - } - template - SPROUT_CONSTEXPR typename intersection::type - intersect_1(Ray const& ray, unit_type pos_v, unit_type dir_v) const { - return intersect_2( - ray, - pos_v, - dir_v, - pos_v > val_ ? 1 : -1, - face_ == aa_plane_face::both ? false - : face_ == aa_plane_face::negative ? dir_v > 0 - : face_ == aa_plane_face::positive ? dir_v < 0 - : (val_ > 0 && dir_v < 0) || (val_ < 0 && dir_v > 0) - ); - } - public: - SPROUT_CONSTEXPR basic_aa_plane(aa_plane_direction::values direction_value, unit_type val, material_type const& mat, aa_plane_face::values face = aa_plane_face::both) - : direction_value_(direction_value) - , val_(val) - , mat_(mat) - , face_(face) - {} - template - SPROUT_CONSTEXPR typename intersection::type - intersect(Ray const& ray) const { - return intersect_1( - ray, - (is_x() ? sprout::darkroom::coords::x(sprout::darkroom::rays::position(ray)) - : is_y() ? sprout::darkroom::coords::y(sprout::darkroom::rays::position(ray)) - : sprout::darkroom::coords::z(sprout::darkroom::rays::position(ray)) - ), - (is_x() ? sprout::darkroom::coords::x(sprout::darkroom::rays::direction(ray)) - : is_y() ? sprout::darkroom::coords::y(sprout::darkroom::rays::direction(ray)) - : sprout::darkroom::coords::z(sprout::darkroom::rays::direction(ray)) - ) - ); - } - }; - // - // make_aa_plane - // - template - inline SPROUT_CONSTEXPR sprout::darkroom::objects::basic_aa_plane - make_aa_plane( - sprout::darkroom::objects::aa_plane_direction::values dir_val, - Unit const& val, - Material const& mat, - sprout::darkroom::objects::aa_plane_face::values face_val = sprout::darkroom::objects::aa_plane_face::both - ) - { - return sprout::darkroom::objects::basic_aa_plane(dir_val, val, mat, face_val); - } - } // namespace objects - } // namespace darkroom -} // namespace sprout - -#endif // #ifndef SPROUT_DARKROOM_OBJECTS_AA_PLANE_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/objects/intersect.hpp b/dsp/lib/sprout/sprout/darkroom/objects/intersect.hpp deleted file mode 100644 index 59ec02b..0000000 --- a/dsp/lib/sprout/sprout/darkroom/objects/intersect.hpp +++ /dev/null @@ -1,163 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_OBJECTS_INTERSECT_HPP -#define SPROUT_DARKROOM_OBJECTS_INTERSECT_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace darkroom { - namespace objects { - template - struct intersection_result; - - namespace detail { - template - struct intersection_result_impl; - template - struct intersection_result_impl > - : public sprout::tuples::common_recursive_flex_type< - typename sprout::darkroom::objects::intersection_result::type, Ray>::type... - > - {}; - - template - struct intersection_result; - template - struct intersection_result - : public Object::template intersection - {}; - template - struct intersection_result - : public sprout::darkroom::objects::detail::intersection_result_impl< - Object, Ray, - typename sprout::make_index_tuple::value>::type - > - {}; - } // namespace detail - - // - // intersection_result - // - template - struct intersection_result - : public sprout::darkroom::objects::detail::intersection_result< - Object, Ray, - sprout::darkroom::access::is_tuple::value - > - {}; - template - struct intersection_result - : public sprout::darkroom::objects::intersection_result - {}; - template - struct intersection_result - : public sprout::darkroom::objects::intersection_result - {}; - template - struct intersection_result - : public sprout::darkroom::objects::intersection_result - {}; - - // - // intersect - // - template< - typename Object, typename Ray, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::darkroom::objects::intersection_result::type - intersect(Object const& obj, Ray const& ray); - template< - typename Object, typename Ray, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::darkroom::objects::intersection_result::type - intersect(Object const& obj, Ray const& ray); - - namespace detail { - template - struct intersect_list_impl { - private: - template - SPROUT_CONSTEXPR typename sprout::darkroom::objects::intersection_result::type - comp(A const& a, B const& b) const { - typedef typename sprout::darkroom::objects::intersection_result::type type; - return sprout::darkroom::intersects::does_intersect(a) - && sprout::darkroom::intersects::does_intersect(b) - ? sprout::darkroom::intersects::distance(a) < sprout::darkroom::intersects::distance(b) - ? sprout::tuples::recursive_flex(a) - : sprout::tuples::recursive_flex(b) - : sprout::darkroom::intersects::does_intersect(a) - ? sprout::tuples::recursive_flex(a) - : sprout::tuples::recursive_flex(b) - ; - } - public: - template - SPROUT_CONSTEXPR typename sprout::darkroom::objects::intersection_result::type - operator()(Objects const& objs, Ray const& ray) const { - return comp( - sprout::darkroom::objects::intersect(sprout::darkroom::access::get(objs), ray), - intersect_list_impl()(objs, ray) - ); - } - }; - template<> - struct intersect_list_impl<0> { - public: - template - SPROUT_CONSTEXPR typename sprout::darkroom::objects::intersection_result::type - operator()(Objects const& objs, Ray const& ray) const { - return sprout::tuples::recursive_flex( - sprout::darkroom::objects::intersect(sprout::darkroom::access::get<0>(objs), ray) - ); - } - }; - } // namespace detail - // - // intersect_list - // - template - inline SPROUT_CONSTEXPR typename sprout::darkroom::objects::intersection_result::type - intersect_list(Objects const& objs, Ray const& ray) { - return sprout::darkroom::objects::detail::intersect_list_impl< - sprout::darkroom::access::size::value - 1 - >()(objs, ray); - } - - // - // intersect - // - template< - typename Object, typename Ray, - typename sprout::enabler_if::value>::type - > - inline SPROUT_CONSTEXPR typename sprout::darkroom::objects::intersection_result::type - intersect(Object const& obj, Ray const& ray) { - return obj.intersect(ray); - } - template< - typename Object, typename Ray, - typename sprout::enabler_if::value>::type - > - inline SPROUT_CONSTEXPR typename sprout::darkroom::objects::intersection_result::type - intersect(Object const& obj, Ray const& ray) { - return sprout::darkroom::objects::intersect_list(obj, ray); - } - } // namespace objects - } // namespace darkroom -} // namespace sprout - -#endif // #ifndef SPROUT_DARKROOM_OBJECTS_INTERSECT_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/objects/object_list.hpp b/dsp/lib/sprout/sprout/darkroom/objects/object_list.hpp deleted file mode 100644 index 91d409b..0000000 --- a/dsp/lib/sprout/sprout/darkroom/objects/object_list.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_OBJECTS_OBJECT_LIST_HPP -#define SPROUT_DARKROOM_OBJECTS_OBJECT_LIST_HPP - -#include -#include -#include - -namespace sprout { - namespace darkroom { - namespace objects { - // - // make_object_list - // - template - inline SPROUT_CONSTEXPR auto - make_object_list(Objects&&... objs) - -> decltype(sprout::make_tuple(SPROUT_FORWARD(Objects, objs)...)) - { - return sprout::make_tuple(SPROUT_FORWARD(Objects, objs)...); - } - } // namespace objects - } // namespace darkroom -} // namespace sprout - -#endif // #ifndef SPROUT_DARKROOM_OBJECTS_OBJECT_LIST_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/objects/polygon.hpp b/dsp/lib/sprout/sprout/darkroom/objects/polygon.hpp deleted file mode 100644 index aceade4..0000000 --- a/dsp/lib/sprout/sprout/darkroom/objects/polygon.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_OBJECTS_POLYGON_HPP -#define SPROUT_DARKROOM_OBJECTS_POLYGON_HPP - -#include -#include - -#endif // #ifndef SPROUT_DARKROOM_OBJECTS_POLYGON_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/objects/polygon/triangle.hpp b/dsp/lib/sprout/sprout/darkroom/objects/polygon/triangle.hpp deleted file mode 100644 index 5efeac7..0000000 --- a/dsp/lib/sprout/sprout/darkroom/objects/polygon/triangle.hpp +++ /dev/null @@ -1,180 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_OBJECTS_POLYGON_TRIANGLE_HPP -#define SPROUT_DARKROOM_OBJECTS_POLYGON_TRIANGLE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace darkroom { - namespace objects { - // - // basic_triangle - // - template - class basic_triangle { - public: - typedef Material material_type; - typedef Vertex position_type; - typedef typename sprout::darkroom::access::unit::type unit_type; - typedef sprout::array vertices_type; - public: - template - struct intersection { - typedef sprout::tuples::tuple< - bool, - unit_type, - position_type, - position_type, - decltype(sprout::darkroom::materials::calculate_material( - std::declval(), - std::declval(), - std::declval() - )), - bool - > type; - }; - private: - material_type mat_; - vertices_type vertices_; - position_type normal_; - private: - template - SPROUT_CONSTEXPR bool - within_test(Vector const& d0, Vector const& d1) const { - return sprout::darkroom::coords::dot( - sprout::darkroom::coords::cross(d0, d1), - normal_ - ) - >= 0 - ; - } - template - SPROUT_CONSTEXPR typename intersection::type - intersect_5(Ray const& ray, int /*hit_side*/, bool does_intersect, unit_type distance) const { - return typename intersection::type( - does_intersect, - distance, - does_intersect - ? sprout::darkroom::rays::point_of_intersection(ray, distance) - : position_type(0, 0, 0) - , - normal_,// !!! TEMP: hit_side > 0 ? normal_ : sprout::darkroom::coords::negate(normal_), - sprout::darkroom::materials::calculate_material(mat_, unit_type(0), unit_type(0)), // ??? - false // !!! TEMP: is_from_inside - ); - } - template - SPROUT_CONSTEXPR typename intersection::type - intersect_4(Ray const& ray, position_type const& v, int hit_side, bool does_intersect) const { - return intersect_5( - ray, - hit_side, - does_intersect, - does_intersect - ? sprout::darkroom::coords::length(v) - : unit_type(-1) - ); - } - template - SPROUT_CONSTEXPR typename intersection::type - intersect_3(Ray const& ray, position_type const& v, position_type const& p, int hit_side, bool exist_forward) const { - return intersect_4( - ray, - v, - hit_side, - exist_forward - && within_test( - sprout::darkroom::coords::sub(p, vertices_[0]), - sprout::darkroom::coords::sub(vertices_[1], vertices_[0]) - ) - && within_test( - sprout::darkroom::coords::sub(p, vertices_[1]), - sprout::darkroom::coords::sub(vertices_[2], vertices_[1]) - ) - && within_test( - sprout::darkroom::coords::sub(p, vertices_[2]), - sprout::darkroom::coords::sub(vertices_[0], vertices_[2]) - ) - ); - } - template - SPROUT_CONSTEXPR typename intersection::type - intersect_2(Ray const& ray, unit_type const& t, int hit_side) const { - return intersect_3( - ray, - sprout::darkroom::coords::scale(sprout::darkroom::rays::direction(ray), t), - sprout::darkroom::coords::add( - sprout::darkroom::rays::position(ray), - sprout::darkroom::coords::scale(sprout::darkroom::rays::direction(ray), t) - ), - hit_side, - // ??? -// hit_side > 0 && t >= 0 - t >= 0 - ); - } - template - SPROUT_CONSTEXPR typename intersection::type - intersect_1(Ray const& ray, unit_type const& xpn, unit_type const& vn) const { - return intersect_2( - ray, - xpn / vn, - vn >= 0 ? 1 : -1 - ); - } - public: - SPROUT_CONSTEXPR basic_triangle(material_type const& mat, position_type const& v0, position_type const& v1, position_type const& v2) - : mat_(mat) - , vertices_{{v0, v1, v2}} - , normal_( - sprout::darkroom::coords::normalize( - sprout::darkroom::coords::cross( - sprout::darkroom::coords::sub(v2, v0), - sprout::darkroom::coords::sub(v1, v0) - ) - ) - ) - {} - template - SPROUT_CONSTEXPR typename intersection::type - intersect(Ray const& ray) const { - return intersect_1( - ray, - sprout::darkroom::coords::dot( - sprout::darkroom::coords::sub(vertices_[0], sprout::darkroom::rays::position(ray)), - normal_ - ), - sprout::darkroom::coords::dot( - sprout::darkroom::rays::direction(ray), - normal_ - ) - ); - } - }; - // - // make_triangle - // - template - inline SPROUT_CONSTEXPR sprout::darkroom::objects::basic_triangle - make_triangle(Material const& mat, Vertex const& v0, Vertex const& v1, Vertex const& v2) { - return sprout::darkroom::objects::basic_triangle(mat, v0, v1, v2); - } - } // namespace objects - } // namespace darkroom -} // namespace sprout - -#endif // #ifndef SPROUT_DARKROOM_OBJECTS_POLYGON_TRIANGLE_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/objects/sphere.hpp b/dsp/lib/sprout/sprout/darkroom/objects/sphere.hpp deleted file mode 100644 index 82ce3c5..0000000 --- a/dsp/lib/sprout/sprout/darkroom/objects/sphere.hpp +++ /dev/null @@ -1,222 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_OBJECTS_SPHERE_HPP -#define SPROUT_DARKROOM_OBJECTS_SPHERE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace darkroom { - namespace objects { - // - // basic_sphere - // - template - class basic_sphere { - public: - typedef Material material_type; - typedef Position position_type; - typedef typename sprout::darkroom::access::unit::type unit_type; - typedef unit_type radius_type; - public: - template - struct intersection { - typedef sprout::tuples::tuple< - bool, - unit_type, - position_type, - position_type, - decltype(sprout::darkroom::materials::calculate_material( - std::declval(), - std::declval(), - std::declval() - )), - bool - > type; - }; - private: - typedef sprout::tuples::tuple zwo_type; - typedef sprout::tuples::tuple drei_type; - struct zw { - SPROUT_STATIC_CONSTEXPR std::size_t hit_side = 0; - SPROUT_STATIC_CONSTEXPR std::size_t does_intersect = 1; - SPROUT_STATIC_CONSTEXPR std::size_t distance = 2; - }; - struct dr { - SPROUT_STATIC_CONSTEXPR std::size_t point_of_intersection = 0; - SPROUT_STATIC_CONSTEXPR std::size_t normal = 1; - }; - private: - position_type pos_; - radius_type rad_; - material_type mat_; - private: - SPROUT_STATIC_CONSTEXPR zwo_type - zweitens_1(unit_type const& i1, unit_type const& i2) { - return zwo_type( - i2 > 0 - ? i1 < 0 ? -1 : 1 - : 0 - , - i2 > 0, - i2 > 0 - ? i1 < 0 ? i2 : i1 - : -1 - ); - } - SPROUT_STATIC_CONSTEXPR zwo_type - zweitens(bool neg, unit_type const& b, unit_type const& det) { - return neg - ? zweitens_1(b - det, b + det) - : zwo_type(0, false, -1) - ; - } - template - SPROUT_CONSTEXPR drei_type - drittens_1(typename sprout::darkroom::access::unit::type point_of_intersection) const { - return drei_type( - point_of_intersection, - sprout::darkroom::coords::normalize( - sprout::darkroom::coords::sub(point_of_intersection, pos_) - ) - ); - } - template - SPROUT_CONSTEXPR drei_type - drittens(Ray const& ray, bool neg, unit_type const& distance) const { - return neg - ? drittens_1(sprout::darkroom::rays::point_of_intersection(ray, distance)) - : drei_type( - sprout::tuples::make(0, 0, 0), - sprout::tuples::make(1, 1, 1) - ) - ; - } - template - SPROUT_CONSTEXPR typename intersection::type - intersect_6(zwo_type const& zwo, drei_type const& drei,bool is_from_inside, Vec const& normal) const { - return typename intersection::type( - sprout::tuples::get(zwo), - sprout::tuples::get(zwo), - sprout::tuples::get(drei), - is_from_inside - ? sprout::darkroom::coords::negate(normal) - : normal - , - sprout::darkroom::materials::calculate_material( // ! Spherical - mat_, - sprout::atan2( - sprout::darkroom::coords::z(normal), - sprout::darkroom::coords::x(normal) - ) - / sprout::math::pi() - , - sprout::atan2( - sprout::darkroom::coords::y(normal), - sprout::sqrt( - sprout::darkroom::coords::x(normal) * sprout::darkroom::coords::x(normal) - + sprout::darkroom::coords::z(normal) * sprout::darkroom::coords::z(normal) - ) - ) - / sprout::math::half_pi() - ), - is_from_inside - ); - } - template - SPROUT_CONSTEXPR typename intersection::type - intersect_5(Ray const& ray, zwo_type const& zwo, drei_type const& drei) const { - return intersect_6( - zwo, - drei, - sprout::darkroom::coords::dot(sprout::tuples::get(drei), sprout::darkroom::rays::direction(ray)) > 0, - sprout::tuples::get(drei) - ); - } - template - SPROUT_CONSTEXPR typename intersection::type - intersect_4(Ray const& ray, zwo_type const& zwo) const { - return intersect_5( - ray, - zwo, - drittens( - ray, - sprout::tuples::get(zwo), - sprout::tuples::get(zwo) - ) - ); - } - template - SPROUT_CONSTEXPR typename intersection::type - intersect_3(Ray const& ray, unit_type const& b, unit_type const& det_sq) const { - return intersect_4( - ray, - zweitens( - det_sq > 0, - b, - det_sq > 0 ? sprout::sqrt(det_sq) : unit_type(0) - ) - ); - } - template - SPROUT_CONSTEXPR typename intersection::type - intersect_2(Ray const& ray, position_type const& v, unit_type const& b) const { - return intersect_3( - ray, - b, - b * b - sprout::darkroom::coords::length_sq(v) + rad_ * rad_ - ); - } - template - SPROUT_CONSTEXPR typename intersection::type - intersect_1(Ray const& ray, position_type const& v) const { - return intersect_2( - ray, - v, - -sprout::darkroom::coords::dot(v, sprout::darkroom::rays::direction(ray)) - ); - } - public: - SPROUT_CONSTEXPR basic_sphere(position_type const& pos, radius_type rad, material_type const& mat) - : pos_(pos) - , rad_(rad) - , mat_(mat) - {} - template - SPROUT_CONSTEXPR typename intersection::type - intersect(Ray const& ray) const { - return intersect_1( - ray, - sprout::darkroom::coords::sub(sprout::darkroom::rays::position(ray), pos_) - ); - } - }; - // - // make_sphere - // - template - inline SPROUT_CONSTEXPR sprout::darkroom::objects::basic_sphere - make_sphere(Position const& pos, Radius const& rad, Material const& mat) { - return sprout::darkroom::objects::basic_sphere(pos, rad, mat); - } - } // namespace objects - } // namespace darkroom -} // namespace sprout - -#endif // #ifndef SPROUT_DARKROOM_OBJECTS_SPHERE_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/pixels.hpp b/dsp/lib/sprout/sprout/darkroom/pixels.hpp deleted file mode 100644 index ff2c93d..0000000 --- a/dsp/lib/sprout/sprout/darkroom/pixels.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_PIXELS_HPP -#define SPROUT_DARKROOM_PIXELS_HPP - -#include -#include - -#endif // #ifndef SPROUT_DARKROOM_PIXELS_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/pixels/generate.hpp b/dsp/lib/sprout/sprout/darkroom/pixels/generate.hpp deleted file mode 100644 index 96a44d5..0000000 --- a/dsp/lib/sprout/sprout/darkroom/pixels/generate.hpp +++ /dev/null @@ -1,140 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_PIXELS_GENERATE_HPP -#define SPROUT_DARKROOM_PIXELS_GENERATE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace darkroom { - namespace pixels { - // - // generate - // - namespace detail { - template< - typename Pixels, - typename RayTracer, typename Renderer, typename Camera, - typename Objects, typename Lights, - sprout::index_t... XIndexes - > - inline SPROUT_CONSTEXPR typename sprout::container_traits::value_type - generate_impl_line( - RayTracer const& raytracer, Renderer const& renderer, Camera const& camera, - Objects const& objs, Lights const& lights, - typename sprout::container_traits< - typename sprout::container_traits::value_type - >::size_type x, - typename sprout::container_traits::size_type y, - typename sprout::container_traits< - typename sprout::container_traits::value_type - >::size_type width, - typename sprout::container_traits::size_type height, - std::size_t depth_max, - sprout::index_tuple - ) - { - typedef typename sprout::container_traits::value_type pixel_line_type; - typedef typename sprout::container_traits::value_type pixel_type; - return sprout::make( - sprout::darkroom::colors::rgb_f_to_rgb( - sprout::darkroom::tracers::calculate( - raytracer, - renderer, camera, objs, lights, - x + XIndexes, y, width, height, depth_max - ) - )... - ); - } - template< - typename Pixels, - typename RayTracer, typename Renderer, typename Camera, - typename Objects, typename Lights, - sprout::index_t... YIndexes - > - inline SPROUT_CONSTEXPR Pixels - generate_impl( - RayTracer const& raytracer, Renderer const& renderer, Camera const& camera, - Objects const& objs, Lights const& lights, - typename sprout::container_traits< - typename sprout::container_traits::value_type - >::size_type x - , - typename sprout::container_traits::size_type y, - typename sprout::container_traits< - typename sprout::container_traits::value_type - >::size_type width - , - typename sprout::container_traits::size_type height, - std::size_t depth_max, - sprout::index_tuple - ) - { - return sprout::make( - sprout::darkroom::pixels::detail::generate_impl_line( - raytracer, renderer, camera, objs, lights, - x, y + YIndexes, width, height, depth_max, - sprout::container_indexes::value_type>::make() - )... - ); - } - } // namespace detail - template< - typename Pixels, - typename RayTracer, typename Renderer, typename Camera, - typename Objects, typename Lights - > - inline SPROUT_CONSTEXPR Pixels generate( - RayTracer const& raytracer, Renderer const& renderer, Camera const& camera, - Objects const& objs, Lights const& lights, - typename sprout::container_traits< - typename sprout::container_traits::value_type - >::size_type x - = 0, - typename sprout::container_traits::size_type y - = 0, - typename sprout::container_traits< - typename sprout::container_traits::value_type - >::size_type width - = sprout::container_traits< - typename sprout::container_traits::value_type - >::static_size, - typename sprout::container_traits::size_type height - = sprout::container_traits::static_size, - std::size_t depth_max = sprout::darkroom::renderers::default_depth - ) - { - return sprout::darkroom::pixels::detail::generate_impl( - raytracer, renderer, camera, objs, lights, - x, y, width, height, depth_max, - sprout::container_indexes::make() - ); - } - - // - // color_pixels - // - template - struct color_pixels { - public: - typedef sprout::array, Height> type; - }; - } // namespace pixels - } // namespace darkroom -} // namespace sprout - -#endif // #ifndef SPROUT_DARKROOM_PIXELS_GENERATE_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/rays.hpp b/dsp/lib/sprout/sprout/darkroom/rays.hpp deleted file mode 100644 index 2ad8c39..0000000 --- a/dsp/lib/sprout/sprout/darkroom/rays.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_RAYS_HPP -#define SPROUT_DARKROOM_RAYS_HPP - -#include -#include - -#endif // #ifndef SPROUT_DARKROOM_RAYS_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/rays/ray.hpp b/dsp/lib/sprout/sprout/darkroom/rays/ray.hpp deleted file mode 100644 index 9d70c7e..0000000 --- a/dsp/lib/sprout/sprout/darkroom/rays/ray.hpp +++ /dev/null @@ -1,97 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_RAYS_RAY_HPP -#define SPROUT_DARKROOM_RAYS_RAY_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace darkroom { - namespace rays { - // - // position - // direction - // - template - inline SPROUT_CONSTEXPR auto - position(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::darkroom::access::get<0>(SPROUT_FORWARD(T, t))) - -> decltype(sprout::darkroom::access::get<0>(SPROUT_FORWARD(T, t))) - { - return sprout::darkroom::access::get<0>(SPROUT_FORWARD(T, t)); - } - template - inline SPROUT_CONSTEXPR auto - direction(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::darkroom::access::get<1>(SPROUT_FORWARD(T, t))) - -> decltype(sprout::darkroom::access::get<1>(SPROUT_FORWARD(T, t))) - { - return sprout::darkroom::access::get<1>(SPROUT_FORWARD(T, t)); - } - - // - // make_ray - // - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - make_ray(Position const& pos, Direction const& dir) { - return sprout::tuples::make_tuple(pos, dir); - } - - // - // ray - // - typedef sprout::tuples::tuple ray; - - // - // point_of_intersection - // - template - inline SPROUT_CONSTEXPR typename sprout::darkroom::access::unit::type - point_of_intersection(Ray const& ray, Distance const& dist) { - return sprout::darkroom::coords::add( - sprout::darkroom::rays::position(ray), - sprout::darkroom::coords::scale(sprout::darkroom::rays::direction(ray), dist) - ); - } - - // - // detach_position - // - template - inline SPROUT_CONSTEXPR Position - detach_position(Position const& pos, Direction const& dir) { - return sprout::darkroom::coords::add( - pos, - sprout::darkroom::coords::resize( - dir, - sprout::numeric_limits::type>::epsilon() * 256 - ) - ); - } - // - // make_detached_ray - // - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - make_detached_ray(Position const& pos, Direction const& dir) { - return sprout::darkroom::rays::make_ray( - sprout::darkroom::rays::detach_position(pos, dir), - dir - ); - } - } // namespace rays - } // namespace darkroom -} // namespace sprout - -#endif // #ifndef SPROUT_DARKROOM_RAYS_RAY_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/renderers.hpp b/dsp/lib/sprout/sprout/darkroom/renderers.hpp deleted file mode 100644 index 54b463e..0000000 --- a/dsp/lib/sprout/sprout/darkroom/renderers.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_RENDERERS_HPP -#define SPROUT_DARKROOM_RENDERERS_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_DARKROOM_RENDERERS_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/renderers/calculate.hpp b/dsp/lib/sprout/sprout/darkroom/renderers/calculate.hpp deleted file mode 100644 index 3c33750..0000000 --- a/dsp/lib/sprout/sprout/darkroom/renderers/calculate.hpp +++ /dev/null @@ -1,70 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_RENDERERS_CALCULATE_HPP -#define SPROUT_DARKROOM_RENDERERS_CALCULATE_HPP - -#include -#include -#include - -namespace sprout { - namespace darkroom { - namespace renderers { - // - // default_depth - // - SPROUT_STATIC_CONSTEXPR std::size_t default_depth = 4; - - // - // calculate_result - // - template - struct calculate_result - : public sprout::identity - {}; - template - struct calculate_result - : public sprout::darkroom::renderers::calculate_result - {}; - template - struct calculate_result - : public sprout::darkroom::renderers::calculate_result - {}; - template - struct calculate_result - : public sprout::darkroom::renderers::calculate_result - {}; - - // - // calculate - // - template - inline SPROUT_CONSTEXPR typename sprout::darkroom::renderers::calculate_result::type - calculate( - Renderer const& renderer, - Camera const& camera, Objects const& objs, Lights const& lights, - Ray const& ray, std::size_t depth_max, Refractions const& refracs - ) - { - return renderer.template operator()(camera, objs, lights, ray, depth_max, refracs); - } - template - inline SPROUT_CONSTEXPR typename sprout::darkroom::renderers::calculate_result::type - calculate( - Renderer const& renderer, - Camera const& camera, Objects const& objs, Lights const& lights, - Ray const& ray, std::size_t depth_max - ) - { - return renderer.template operator()(camera, objs, lights, ray, depth_max); - } - } // namespace renderers - } // namespace darkroom -} // namespace sprout - -#endif // #ifndef SPROUT_DARKROOM_RENDERERS_CALCULATE_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/renderers/infinity.hpp b/dsp/lib/sprout/sprout/darkroom/renderers/infinity.hpp deleted file mode 100644 index b7681f0..0000000 --- a/dsp/lib/sprout/sprout/darkroom/renderers/infinity.hpp +++ /dev/null @@ -1,120 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_RENDERERS_INFINITY_HPP -#define SPROUT_DARKROOM_RENDERERS_INFINITY_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace darkroom { - namespace renderers { - // - // normal_to_color - // - template - inline SPROUT_CONSTEXPR Color - normal_to_color(Normal const& nor) { - return sprout::tuples::make( - 0.5 + sprout::darkroom::coords::x(nor) * 0.5, - 0.5 + sprout::darkroom::coords::y(nor) * 0.5, - 0.5 + sprout::darkroom::coords::z(nor) * 0.5 - ); - } - - // - // direction_gradation - // - class direction_gradation { - public: - template - SPROUT_CONSTEXPR TargetColor - operator()(Vector const& dir) const { - return sprout::darkroom::renderers::normal_to_color(dir); - } - }; - // - // make_direction_gradation - // - inline SPROUT_CONSTEXPR sprout::darkroom::renderers::direction_gradation - make_direction_gradation() { - return sprout::darkroom::renderers::direction_gradation(); - } - - // - // uniform_color - // - template - class uniform_color { - public: - typedef Color color_type; - private: - color_type color_; - public: - SPROUT_CONSTEXPR uniform_color() - : color_() - {} - uniform_color(uniform_color const&) = default; - explicit SPROUT_CONSTEXPR uniform_color(color_type const& color) - : color_(color) - {} - template - SPROUT_CONSTEXPR TargetColor - operator()(Vector const&) const { - return color_; - } - }; - // - // make_uniform_color - // - inline SPROUT_CONSTEXPR sprout::darkroom::renderers::uniform_color<> - make_uniform_color() { - return sprout::darkroom::renderers::uniform_color<>(); - } - template - inline SPROUT_CONSTEXPR sprout::darkroom::renderers::uniform_color - make_uniform_color(Color const& color) { - return sprout::darkroom::renderers::uniform_color(color); - } - - // - // infinity_result - // - template - struct infinity_result - : public sprout::identity - {}; - template - struct infinity_result - : public sprout::darkroom::renderers::infinity_result - {}; - template - struct infinity_result - : public sprout::darkroom::renderers::infinity_result - {}; - template - struct infinity_result - : public sprout::darkroom::renderers::infinity_result - {}; - - // - // calculate_infinity - // - template - inline SPROUT_CONSTEXPR typename sprout::darkroom::renderers::infinity_result::type - calculate_infinity(InfinityColor const& infinity_color, Vector const& dir) { - return infinity_color.template operator()(dir); - } - } // namespace renderers - } // namespace darkroom -} // namespace sprout - -#endif // #ifndef SPROUT_DARKROOM_RENDERERS_INFINITY_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/renderers/whitted_style.hpp b/dsp/lib/sprout/sprout/darkroom/renderers/whitted_style.hpp deleted file mode 100644 index 8259cb3..0000000 --- a/dsp/lib/sprout/sprout/darkroom/renderers/whitted_style.hpp +++ /dev/null @@ -1,349 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_RENDERERS_WHITTED_STYLE_HPP -#define SPROUT_DARKROOM_RENDERERS_WHITTED_STYLE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace darkroom { - namespace renderers { - // - // whitted_mirror - // - class whitted_mirror { - private: - template< - typename Color, - typename Camera, typename Objects, typename Lights, - typename Ray, typename Refractions, typename Intersection, typename Renderer, - typename Direction - > - SPROUT_CONSTEXPR Color - color_1( - Camera const& camera, Objects const& objs, Lights const& lights, - Ray const& ray, Intersection const& inter, Renderer const& renderer, - std::size_t depth_max, Refractions const& refracs, - Direction const& new_dir - ) const - { - return sprout::darkroom::renderers::calculate( - renderer, - camera, objs, lights, - sprout::tuples::remake( - ray, - sprout::darkroom::rays::detach_position(sprout::darkroom::intersects::point_of_intersection(inter), new_dir), - new_dir - ), - depth_max - 1, - refracs - ); - } - public: - template< - typename Color, - typename Camera, typename Objects, typename Lights, - typename Ray, typename Refractions, typename Intersection, typename Renderer - > - SPROUT_CONSTEXPR Color - operator()( - Camera const& camera, Objects const& objs, Lights const& lights, - Ray const& ray, Intersection const& inter, Renderer const& renderer, - std::size_t depth_max, Refractions const& refracs - ) const - { - typedef typename std::decay< - decltype(sprout::darkroom::materials::reflection(sprout::darkroom::intersects::material(inter))) - >::type reflection_type; - return depth_max > 0 - && sprout::darkroom::intersects::does_intersect(inter) - && sprout::darkroom::materials::reflection(sprout::darkroom::intersects::material(inter)) - > sprout::numeric_limits::epsilon() - ? color_1( - camera, objs, lights, - ray, inter, renderer, - depth_max, refracs, - sprout::darkroom::coords::reflect( - sprout::darkroom::rays::direction(ray), - sprout::darkroom::intersects::normal(inter) - ) - ) - : sprout::tuples::make(0, 0, 0) - ; - } - }; - // - // whitted_transmit - // - class whitted_transmit { - private: - template< - typename Color, - typename Camera, typename Objects, typename Lights, - typename Ray, typename Refractions, typename Intersection, typename Renderer, - typename Direction - > - SPROUT_CONSTEXPR sprout::pair - color_1( - Camera const& camera, Objects const& objs, Lights const& lights, - Ray const& ray, Intersection const& inter, Renderer const& renderer, - std::size_t depth_max, Refractions const& refracs, - Direction const& new_dir - ) const - { - return sprout::darkroom::coords::is_zero(new_dir) ? sprout::pair(sprout::tuples::make(0, 0, 0), true) - : sprout::darkroom::intersects::is_from_inside(inter) ? sprout::pair( - sprout::darkroom::renderers::calculate( - renderer, - camera, objs, lights, - sprout::tuples::remake( - ray, - sprout::darkroom::rays::detach_position(sprout::darkroom::intersects::point_of_intersection(inter), new_dir), - new_dir - ), - depth_max - 1, - sprout::tuples::remake(refracs, 1.0) - //sprout::tuples::pop_back(refracs) - ), - false - ) - : sprout::pair( - sprout::darkroom::renderers::calculate( - renderer, - camera, objs, lights, - sprout::tuples::remake( - ray, - sprout::darkroom::rays::detach_position(sprout::darkroom::intersects::point_of_intersection(inter), new_dir), - new_dir - ), - depth_max - 1, - sprout::tuples::remake(refracs, sprout::darkroom::materials::refraction(sprout::darkroom::intersects::material(inter))) - //sprout::tuples::push_back(refracs, sprout::darkroom::materials::refraction(sprout::darkroom::intersects::material(inter))) - ), - false - ) - ; - } - public: - template< - typename Color, - typename Camera, typename Objects, typename Lights, - typename Ray, typename Refractions, typename Intersection, typename Renderer - > - SPROUT_CONSTEXPR sprout::pair - operator()( - Camera const& camera, Objects const& objs, Lights const& lights, - Ray const& ray, Intersection const& inter, Renderer const& renderer, - std::size_t depth_max, Refractions const& refracs - ) const - { - typedef typename std::decay< - decltype(sprout::darkroom::materials::alpha(sprout::darkroom::intersects::material(inter))) - >::type alpha_type; - typedef typename std::decay< - decltype(sprout::darkroom::materials::refraction(sprout::darkroom::intersects::material(inter))) - >::type refraction_type; - return depth_max > 0 - && sprout::darkroom::intersects::does_intersect(inter) - && sprout::darkroom::materials::alpha(sprout::darkroom::intersects::material(inter)) - > sprout::numeric_limits::epsilon() - && sprout::darkroom::materials::refraction(sprout::darkroom::intersects::material(inter)) - > sprout::numeric_limits::epsilon() - ? color_1( - camera, objs, lights, - ray, inter, renderer, - depth_max, refracs, - sprout::darkroom::coords::refract( - sprout::darkroom::rays::direction(ray), - sprout::darkroom::intersects::normal(inter), - sprout::darkroom::intersects::is_from_inside(inter) - ? sprout::tuples::get::value - 1>(refracs) - / sprout::darkroom::materials::refraction(sprout::darkroom::intersects::material(inter)) - : sprout::darkroom::materials::refraction(sprout::darkroom::intersects::material(inter)) - / sprout::tuples::get::value - 1>(refracs) - ) - ) - : sprout::pair(sprout::tuples::make(0, 0, 0), false) - ; - } - }; - // - // whitted_style - // - template - class whitted_style { - public: - typedef InfinityColor infinity_color_type; - private: - infinity_color_type infinity_color_; - private: - template - SPROUT_CONSTEXPR Color - color_3( - Ray const& ray, Intersection const& inter, - DiffuseColor const& diffuse_color, MirrorColor const& mirror_color, TransparentColors const& transmit_colors - ) const - { - return sprout::darkroom::intersects::does_intersect(inter) - ? sprout::darkroom::colors::add( - sprout::darkroom::colors::mul( - diffuse_color, - 1 - - sprout::darkroom::materials::reflection(sprout::darkroom::intersects::material(inter)) - - sprout::darkroom::materials::alpha(sprout::darkroom::intersects::material(inter)) - ), - sprout::darkroom::colors::mul( - mirror_color, - !transmit_colors.second - ? sprout::darkroom::materials::reflection(sprout::darkroom::intersects::material(inter)) - : sprout::darkroom::materials::reflection(sprout::darkroom::intersects::material(inter)) - + sprout::darkroom::materials::alpha(sprout::darkroom::intersects::material(inter)) - ), - sprout::darkroom::colors::mul( - transmit_colors.first, - !transmit_colors.second - ? sprout::darkroom::materials::alpha(sprout::darkroom::intersects::material(inter)) - : 0 - ) - ) - : sprout::darkroom::renderers::calculate_infinity(infinity_color_, sprout::darkroom::rays::direction(ray)) - ; - } - template< - typename Color, - typename Camera, typename Objects, typename Lights, - typename Ray, typename Refractions, typename Intersection - > - SPROUT_CONSTEXPR Color - color_2( - Camera const& camera, Objects const& objs, Lights const& lights, - Ray const& ray, std::size_t depth_max, Refractions const& refracs, Intersection const& inter, - Color const& diffuse_color - ) const - { - return color_3( - ray, inter, - diffuse_color, - sprout::darkroom::renderers::whitted_mirror().template operator()( - camera, objs, lights, - ray, inter, *this, - depth_max, refracs - ), - sprout::darkroom::renderers::whitted_transmit().template operator()( - camera, objs, lights, - ray, inter, *this, - depth_max, refracs - ) - ); - } - template< - typename Color, - typename Camera, typename Objects, typename Lights, - typename Ray, typename Refractions, typename Intersection - > - SPROUT_CONSTEXPR Color - color_1( - Camera const& camera, Objects const& objs, Lights const& lights, - Ray const& ray, std::size_t depth_max, Refractions const& refracs, Intersection const& inter - ) const - { - return color_2( - camera, objs, lights, - ray, depth_max, refracs, inter, - sprout::darkroom::lights::calculate(lights, inter, objs) - ); - } - public: - SPROUT_CONSTEXPR whitted_style() - : infinity_color_() - {} - whitted_style(whitted_style const&) = default; - explicit SPROUT_CONSTEXPR whitted_style(infinity_color_type const& infinity_color) - : infinity_color_(infinity_color) - {} - template< - typename Color, typename Camera, typename Objects, typename Lights, typename Ray, typename Refractions, - typename sprout::enabler_if::value>::type = sprout::enabler - > - SPROUT_CONSTEXPR Color - operator()( - Camera const& camera, Objects const& objs, Lights const& lights, - Ray const& ray, std::size_t depth_max, Refractions const& refracs - ) const - { - return color_1( - camera, objs, lights, - ray, depth_max, refracs, - sprout::darkroom::objects::intersect(objs, ray) - ); - } - template< - typename Color, typename Camera, typename Objects, typename Lights, typename Ray, typename Refractions, - typename sprout::enabler_if::value>::type = sprout::enabler - > - SPROUT_CONSTEXPR Color - operator()( - Camera const& camera, Objects const& objs, Lights const& lights, - Ray const& ray, std::size_t depth_max, Refractions const& refracs - ) const - { - return operator()( - camera, objs, lights, - ray, depth_max, sprout::tuples::make_tuple(refracs) - ); - } - template - SPROUT_CONSTEXPR Color - operator()( - Camera const& camera, Objects const& objs, Lights const& lights, - Ray const& ray, std::size_t depth_max - ) const - { - return operator()( - camera, objs, lights, - ray, depth_max, sprout::tuples::make_tuple(1.0) - ); - } - }; - // - // make_whitted_style - // - inline SPROUT_CONSTEXPR sprout::darkroom::renderers::whitted_style<> - make_whitted_style() { - return sprout::darkroom::renderers::whitted_style<>(); - } - template - inline SPROUT_CONSTEXPR sprout::darkroom::renderers::whitted_style - make_whitted_style(InfinityColor const& infinity_color) { - return sprout::darkroom::renderers::whitted_style(infinity_color); - } - } // namespace renderers - } // namespace darkroom -} // namespace sprout - -#endif // #ifndef SPROUT_DARKROOM_RENDERERS_WHITTED_STYLE_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/textures.hpp b/dsp/lib/sprout/sprout/darkroom/textures.hpp deleted file mode 100644 index 8f9ae0f..0000000 --- a/dsp/lib/sprout/sprout/darkroom/textures.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_TEXTURES_HPP -#define SPROUT_DARKROOM_TEXTURES_HPP - -#include -#include - -#endif // #ifndef SPROUT_DARKROOM_TEXTURES_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/textures/texture.hpp b/dsp/lib/sprout/sprout/darkroom/textures/texture.hpp deleted file mode 100644 index 52928bd..0000000 --- a/dsp/lib/sprout/sprout/darkroom/textures/texture.hpp +++ /dev/null @@ -1,109 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_TEXTURES_TEXTURE_HPP -#define SPROUT_DARKROOM_TEXTURES_TEXTURE_HPP - -#include -#include -#include -#include -#include - -// -// DARKROOM_LOAD_TEXTURE -// -#define DARKROOM_LOAD_TEXTURE - -// -// DARKROOM_TEX_VERSION -// -#define DARKROOM_TEX_VERSION(NUM) NUM - -// -// DARKROOM_TEX_IMAGE_DEFAULT -// -#define DARKROOM_TEX_IMAGE_DEFAULT 0 - -// -// DARKROOM_TEX_PIXEL_INT_R8G8B8 -// -#define DARKROOM_TEX_PIXEL_INT_R8G8B8 0 - -namespace sprout { - namespace darkroom { - namespace textures { - // - // version_type - // - typedef unsigned long version_type; - // - // info_type - // - struct info_type { - public: - unsigned long image_format; - unsigned long pixel_format; - std::size_t width; - std::size_t height; - }; - // - // image_type - // - template - struct image_type { - public: - typedef Color color_type; - typedef color_type value_type; - typedef std::size_t size_type; - SPROUT_STATIC_CONSTEXPR size_type static_width = Width; - SPROUT_STATIC_CONSTEXPR size_type static_height = Height; - typedef sprout::array pixels_type; - typedef typename sprout::darkroom::access::unit::type color_component_type; - private: - pixels_type pixels_; - public: - template - SPROUT_CONSTEXPR image_type(info_type const&, Elems const&... elems) - : pixels_{{ - color_type( - static_cast((elems >> 16) & 0xFF) / 0xFF, - static_cast((elems >> 8) & 0xFF) / 0xFF, - static_cast(elems & 0xFF) / 0xFF - )... - }} - { - static_assert(sizeof...(Elems) == static_width * static_height, "image_type<>: unmatch image size"); - } - SPROUT_CONSTEXPR value_type const& - operator()(size_type x, size_type y) const { - return pixels_[y * static_width + x]; - } - SPROUT_CONSTEXPR size_type - width() const { - return static_width; - } - SPROUT_CONSTEXPR size_type - height() const { - return static_height; - } - SPROUT_CONSTEXPR pixels_type const& - pixels() const { - return pixels_; - } - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::darkroom::textures::image_type::size_type - sprout::darkroom::textures::image_type::static_width; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::darkroom::textures::image_type::size_type - sprout::darkroom::textures::image_type::static_height; - } // namespace textures - } // namespace darkroom -} // namespace sprout - -#endif // #ifndef SPROUT_DARKROOM_TEXTURES_TEXTURE_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/tracers.hpp b/dsp/lib/sprout/sprout/darkroom/tracers.hpp deleted file mode 100644 index 9906952..0000000 --- a/dsp/lib/sprout/sprout/darkroom/tracers.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_TRACERS_HPP -#define SPROUT_DARKROOM_TRACERS_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_DARKROOM_TRACERS_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/tracers/calculate.hpp b/dsp/lib/sprout/sprout/darkroom/tracers/calculate.hpp deleted file mode 100644 index bb76fd5..0000000 --- a/dsp/lib/sprout/sprout/darkroom/tracers/calculate.hpp +++ /dev/null @@ -1,68 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_TRACERS_CALCULATE_HPP -#define SPROUT_DARKROOM_TRACERS_CALCULATE_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace darkroom { - namespace tracers { - // - // calculate_result - // - template - struct calculate_result - : public sprout::identity - {}; - template - struct calculate_result - : public sprout::darkroom::tracers::calculate_result - {}; - template - struct calculate_result - : public sprout::darkroom::tracers::calculate_result - {}; - template - struct calculate_result - : public sprout::darkroom::tracers::calculate_result - {}; - - // - // calculate - // - template - inline SPROUT_CONSTEXPR typename sprout::darkroom::tracers::calculate_result::type - calculate( - Tracer const& tracer, - Renderer const& renderer, Camera const& camera, Objects const& objs, Lights const& lights, - Unit2D const& x, Unit2D const& y, Unit2D const& width, Unit2D const& height, - std::size_t depth_max, Refractions const& refracs - ) - { - return tracer(renderer, camera, objs, lights, x, y, width, height, depth_max, refracs); - } - template - inline SPROUT_CONSTEXPR typename sprout::darkroom::tracers::calculate_result::type - calculate( - Tracer const& tracer, - Renderer const& renderer, Camera const& camera, Objects const& objs, Lights const& lights, - Unit2D const& x, Unit2D const& y, Unit2D const& width, Unit2D const& height, - std::size_t depth_max = sprout::darkroom::renderers::default_depth - ) - { - return tracer(renderer, camera, objs, lights, x, y, width, height, depth_max); - } - } // namespace tracers - } // namespace darkroom -} // namespace sprout - -#endif // #ifndef SPROUT_DARKROOM_TRACERS_CALCULATE_HPP diff --git a/dsp/lib/sprout/sprout/darkroom/tracers/raytracer.hpp b/dsp/lib/sprout/sprout/darkroom/tracers/raytracer.hpp deleted file mode 100644 index 8166659..0000000 --- a/dsp/lib/sprout/sprout/darkroom/tracers/raytracer.hpp +++ /dev/null @@ -1,73 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DARKROOM_TRACERS_RAYTRACER_HPP -#define SPROUT_DARKROOM_TRACERS_RAYTRACER_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace darkroom { - namespace tracers { - // - // raytracer - // - template - class raytracer { - public: - typedef Color color_type; - public: - template - SPROUT_CONSTEXPR color_type operator()( - Renderer const& renderer, Camera const& camera, Objects const& objs, Lights const& lights, - Unit2D const& x, Unit2D const& y, Unit2D const& width, Unit2D const& height, - std::size_t depth_max, Refractions const& refracs - ) const - { - return sprout::darkroom::renderers::calculate( - renderer, - camera, objs, lights, - sprout::darkroom::cameras::calculate(camera, x, y, width, height), - depth_max, refracs - ); - } - template - SPROUT_CONSTEXPR color_type operator()( - Renderer const& renderer, Camera const& camera, Objects const& objs, Lights const& lights, - Unit2D const& x, Unit2D const& y, Unit2D const& width, Unit2D const& height, - std::size_t depth_max = sprout::darkroom::renderers::default_depth - ) const - { - return sprout::darkroom::renderers::calculate( - renderer, - camera, objs, lights, - sprout::darkroom::cameras::calculate(camera, x, y, width, height), - depth_max - ); - } - }; - // - // make_raytracer - // - inline SPROUT_CONSTEXPR sprout::darkroom::tracers::raytracer<> - make_raytracer() { - return sprout::darkroom::tracers::raytracer<>(); - } - template - inline SPROUT_CONSTEXPR sprout::darkroom::tracers::raytracer - make_raytracer() { - return sprout::darkroom::tracers::raytracer(); - } - } // namespace tracers - } // namespace darkroom -} // namespace sprout - -#endif // #ifndef SPROUT_DARKROOM_TRACERS_RAYTRACER_HPP diff --git a/dsp/lib/sprout/sprout/detail/algorithm/count_n.hpp b/dsp/lib/sprout/sprout/detail/algorithm/count_n.hpp deleted file mode 100644 index 0bd0870..0000000 --- a/dsp/lib/sprout/sprout/detail/algorithm/count_n.hpp +++ /dev/null @@ -1,80 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_ALGORITHM_COUNT_N_HPP -#define SPROUT_DETAIL_ALGORITHM_COUNT_N_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - typename std::iterator_traits::difference_type - >::type - count_n( - RandomAccessIterator const& first, typename std::iterator_traits::difference_type n, T const& value, - std::random_access_iterator_tag* - ) - { - return sprout::count(first, sprout::next(first, n), value); - } - - template - inline SPROUT_CONSTEXPR sprout::pair::difference_type> - count_n_impl( - sprout::pair::difference_type> const& current, - T const& value, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair::difference_type> type; - return n == 1 ? type(sprout::next(current.first), current.second + (*current.first == value ? 1 : 0)) - : sprout::detail::count_n_impl( - sprout::detail::count_n_impl( - current, - value, n / 2 - ), - value, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type - count_n( - InputIterator const& first, typename std::iterator_traits::difference_type n, T const& value, - std::input_iterator_tag* - ) - { - typedef sprout::pair::difference_type> type; - return n == 0 ? 0 - : sprout::detail::count_n_impl(type(first, 0), value, n).second - ; - } - - // - // count_n - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type - count_n(InputIterator const& first, typename std::iterator_traits::difference_type n, T const& value) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::detail::count_n(first, n, value, category()); - } - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_DETAIL_ALGORITHM_COUNT_N_HPP diff --git a/dsp/lib/sprout/sprout/detail/algorithm/count_n_if.hpp b/dsp/lib/sprout/sprout/detail/algorithm/count_n_if.hpp deleted file mode 100644 index 3c9e0f6..0000000 --- a/dsp/lib/sprout/sprout/detail/algorithm/count_n_if.hpp +++ /dev/null @@ -1,82 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_ALGORITHM_COUNT_N_IF_HPP -#define SPROUT_DETAIL_ALGORITHM_COUNT_N_IF_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::pred, - typename std::iterator_traits::difference_type - >::type - count_n_if( - RandomAccessIterator const& first, typename std::iterator_traits::difference_type n, Predicate pred, - std::random_access_iterator_tag* - ) - { - return sprout::count(first, sprout::next(first, n), pred); - } - - template - inline SPROUT_CONSTEXPR sprout::pair::difference_type> - count_n_if_impl( - sprout::pair::difference_type> const& current, - Predicate pred, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair::difference_type> type; - return n == 1 ? type(sprout::next(current.first), current.second + (pred(*current.first) ? 1 : 0)) - : sprout::detail::count_n_if_impl( - sprout::detail::count_n_if_impl( - current, - pred, n / 2 - ), - pred, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type - count_n_if( - InputIterator const& first, typename std::iterator_traits::difference_type n, Predicate pred, - std::input_iterator_tag* - ) - { - typedef sprout::pair::difference_type> type; - return n == 0 ? 0 - : sprout::detail::count_n_if_impl(type(first, 0), pred, n).second - ; - } - - // - // count_n_if - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type - count_n_if(InputIterator const& first, typename std::iterator_traits::difference_type n, Predicate pred) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::detail::count_n_if(first, n, pred, category()); - - } - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_DETAIL_ALGORITHM_COUNT_N_IF_HPP diff --git a/dsp/lib/sprout/sprout/detail/algorithm/lexicographical_compare.hpp b/dsp/lib/sprout/sprout/detail/algorithm/lexicographical_compare.hpp deleted file mode 100644 index c9eb38d..0000000 --- a/dsp/lib/sprout/sprout/detail/algorithm/lexicographical_compare.hpp +++ /dev/null @@ -1,73 +0,0 @@ -#ifndef SPROUT_DETAIL_ALGORITHM_LEXICOGRAPHICAL_COMPARE_HPP -#define SPROUT_DETAIL_ALGORITHM_LEXICOGRAPHICAL_COMPARE_HPP - -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR int - lexicographical_compare_impl_ra( - RandomAccessIterator1 first1, RandomAccessIterator2 first2, Compare comp, - typename std::iterator_traits::difference_type size, - int found - ) - { - return found != 2 ? found - : size == 1 ? comp(*first1, *first2) ? -1 : comp(*first2, *first1) ? 1 : 2 - : sprout::detail::lexicographical_compare_impl_ra( - sprout::next(first1, size / 2), sprout::next(first2, size / 2), comp, size - size / 2, - sprout::detail::lexicographical_compare_impl_ra( - first1, first2, comp, size / 2, - 2 - ) - ) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::pair - lexicographical_compare_impl_1( - sprout::pair const& current, - InputIterator1 last1, InputIterator2 last2, Compare comp, - typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair type; - return current.second == last2 || current.first == last1 ? current - : n == 1 ? comp(*current.first, *current.second) ? type(last1, current.second) - : comp(*current.second, *current.first) ? type(current.first, last2) - : type(sprout::next(current.first), sprout::next(current.second)) - : sprout::detail::lexicographical_compare_impl_1( - sprout::detail::lexicographical_compare_impl_1( - current, - last1, last2, comp, n / 2 - ), - last1, last2, comp, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - lexicographical_compare_impl( - sprout::pair const& current, - InputIterator1 last1, InputIterator2 last2, Compare comp, - typename std::iterator_traits::difference_type n - ) - { - return current.second == last2 || current.first == last1 ? current - : sprout::detail::lexicographical_compare_impl( - sprout::detail::lexicographical_compare_impl_1( - current, - last1, last2, comp, n - ), - last1, last2, comp, n * 2 - ) - ; - } - } // namespace detail -} // namespace sprout - -#endif /* #ifndef SPROUT_DETAIL_ALGORITHM_LEXICOGRAPHICAL_COMPARE_HPP */ diff --git a/dsp/lib/sprout/sprout/detail/algorithm/mask_index.hpp b/dsp/lib/sprout/sprout/detail/algorithm/mask_index.hpp deleted file mode 100644 index 1bfdb87..0000000 --- a/dsp/lib/sprout/sprout/detail/algorithm/mask_index.hpp +++ /dev/null @@ -1,85 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_ALGORITHM_MASK_INDEX_HPP -#define SPROUT_DETAIL_ALGORITHM_MASK_INDEX_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::results::algorithm::type - >::type - mask_index_impl(InputIterator const&, InputIterator const&, Result const& result, - typename sprout::container_traits::size_type, - typename sprout::container_traits::difference_type, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::results::algorithm::type - >::type - mask_index_impl( - InputIterator const& first, InputIterator const& last, Result const& result, - typename sprout::container_traits::size_type size, - typename sprout::container_traits::difference_type n, - Args const&... args - ) - { - return first != last && sizeof...(Args) < size - ? *first - ? sprout::detail::mask_index_impl(sprout::next(first), last, result, size, n + 1, args..., n) - : sprout::detail::mask_index_impl(sprout::next(first), last, result, size, n + 1, args...) - : sprout::detail::container_complate(result, args...) - ; - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_fixed_container::value, - typename sprout::results::algorithm::type - >::type - mask_index_(InputIterator const& first, InputIterator const& last, Result const& result) { - return sprout::detail::mask_index_impl(first, last, result, sprout::size(result), 0); - } - - // - // mask_index - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR typename sprout::results::algorithm::type - mask_index(InputIterator first, InputIterator last, Result const& result) { - return sprout::detail::mask_index_(first, last, result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::results::algorithm::type - mask_index(InputIterator first, InputIterator last) { - return sprout::detail::mask_index(first, last, sprout::pit()); - } - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_DETAIL_ALGORITHM_MASK_INDEX_HPP diff --git a/dsp/lib/sprout/sprout/detail/algorithm/overlap_count.hpp b/dsp/lib/sprout/sprout/detail/algorithm/overlap_count.hpp deleted file mode 100644 index 4494772..0000000 --- a/dsp/lib/sprout/sprout/detail/algorithm/overlap_count.hpp +++ /dev/null @@ -1,135 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_ALGORITHM_OVERLAP_COUNT_HPP -#define SPROUT_DETAIL_ALGORITHM_OVERLAP_COUNT_HPP - -#include -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type - overlap_count_impl_ra( - RandomAccessIterator const& first, RandomAccessIterator const& last, BinaryPredicate pred, - typename std::iterator_traits::difference_type pivot - ) - { - return pivot == 0 ? (pred(*first, *last) ? 1 : 0) - : sprout::detail::overlap_count_impl_ra( - first, sprout::next(first, pivot), pred, - pivot / 2 - ) - + sprout::detail::overlap_count_impl_ra( - sprout::next(first, pivot), last, pred, - (sprout::distance(first, last) - pivot) / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - typename std::iterator_traits::difference_type - >::type - overlap_count( - RandomAccessIterator const& first, RandomAccessIterator const& last, BinaryPredicate pred, - std::random_access_iterator_tag* - ) - { - return first == last || sprout::distance(first, last) == 1 ? 0 - : sprout::detail::overlap_count_impl_ra( - first, sprout::next(first, sprout::distance(first, last) - 1), pred, - (sprout::distance(first, last) - 1) / 2 - ) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple::value_type, typename std::iterator_traits::difference_type> - overlap_count_impl_1( - sprout::tuples::tuple::value_type, typename std::iterator_traits::difference_type> const& current, - InputIterator const& last, BinaryPredicate pred, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::tuples::tuple::value_type, typename std::iterator_traits::difference_type> type; - return sprout::tuples::get<0>(current) == last ? current - : n == 1 ? type( - sprout::next(sprout::tuples::get<0>(current)), *sprout::tuples::get<0>(current), - sprout::tuples::get<2>(current) + (pred(*sprout::tuples::get<0>(current), sprout::tuples::get<1>(current)) ? 1 : 0) - ) - : sprout::detail::overlap_count_impl_1( - sprout::detail::overlap_count_impl_1( - current, - last, pred, n / 2 - ), - last, pred, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple::value_type, typename std::iterator_traits::difference_type> - overlap_count_impl( - sprout::tuples::tuple::value_type, typename std::iterator_traits::difference_type> const& current, - InputIterator const& last, BinaryPredicate pred, typename std::iterator_traits::difference_type n - ) - { - return sprout::tuples::get<0>(current) == last ? current - : sprout::detail::overlap_count_impl( - sprout::detail::overlap_count_impl_1( - current, - last, pred, n - ), - last, pred, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type - overlap_count( - InputIterator const& first, InputIterator const& last, BinaryPredicate pred, - std::input_iterator_tag* - ) - { - typedef sprout::tuples::tuple::value_type, typename std::iterator_traits::difference_type> type; - return first == last ? 0 - : sprout::tuples::get<2>( - sprout::detail::overlap_count_impl(type(sprout::next(first), *first, 0), last, pred, 1) - ) - ; - } - - // - // overlap_count - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type - overlap_count(InputIterator const& first, InputIterator const& last, BinaryPredicate pred) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::detail::overlap_count(first, last, pred, category()); - } - - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type - overlap_count(InputIterator const& first, InputIterator const& last) { - return sprout::detail::overlap_count( - first, last, - NS_SSCRISK_CEL_OR_SPROUT::equal_to::value_type>() - ); - } - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_DETAIL_ALGORITHM_OVERLAP_COUNT_HPP diff --git a/dsp/lib/sprout/sprout/detail/algorithm/search_one.hpp b/dsp/lib/sprout/sprout/detail/algorithm/search_one.hpp deleted file mode 100644 index 837762a..0000000 --- a/dsp/lib/sprout/sprout/detail/algorithm/search_one.hpp +++ /dev/null @@ -1,126 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_ALGORITHM_SEARCH_ONE_HPP -#define SPROUT_DETAIL_ALGORITHM_SEARCH_ONE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR RandomAccessIterator1 - search_one_impl_ra( - RandomAccessIterator1 first1, RandomAccessIterator1 last1, RandomAccessIterator2 first2, RandomAccessIterator2, BinaryPredicate pred - ) - { - return sprout::mismatch(first1, last1, first2, pred).first == last1 ? first1 - : last1 - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value && sprout::is_constant_distance_iterator::value, - RandomAccessIterator1 - >::type - search_one( - RandomAccessIterator1 first1, RandomAccessIterator1 last1, RandomAccessIterator2 first2, RandomAccessIterator2 last2, BinaryPredicate pred, - std::random_access_iterator_tag* - ) - { - return sprout::distance(first1, last1) < sprout::distance(first2, last2) ? last1 - : first1 == last1 ? first1 - : sprout::detail::search_one_impl_ra( - first1, sprout::next(first1, sprout::distance(first2, last2)), first2, last2, pred - ) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - search_one_impl_1( - sprout::tuples::tuple const& current, - ForwardIterator1 last1, ForwardIterator2 last2, BinaryPredicate pred, - ForwardIterator1 first1_, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::tuples::tuple type; - return sprout::tuples::get<2>(current) ? current - : sprout::tuples::get<1>(current) == last2 ? type(first1_, last2, true) - : sprout::tuples::get<0>(current) == last1 ? type(last1, last2, true) - : n == 1 ? !pred(*sprout::tuples::get<0>(current), *sprout::tuples::get<1>(current)) - ? type(sprout::next(sprout::tuples::get<0>(current)), last2, true) - : type(sprout::next(sprout::tuples::get<0>(current)), sprout::next(sprout::tuples::get<1>(current)), false) - : sprout::detail::search_one_impl_1( - sprout::detail::search_one_impl_1( - current, - last1, last2, pred, first1_, n / 2 - ), - last1, last2, pred, first1_, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - search_one_impl( - sprout::tuples::tuple const& current, - ForwardIterator1 last1, ForwardIterator2 last2, BinaryPredicate pred, - ForwardIterator1 first1_, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::tuples::tuple type; - return sprout::tuples::get<2>(current) ? current - : sprout::tuples::get<1>(current) == last2 ? type(first1_, last2, true) - : sprout::tuples::get<0>(current) == last1 ? type(last1, last2, true) - : sprout::detail::search_one_impl( - sprout::detail::search_one_impl_1( - current, - last1, last2, pred, first1_, n - ), - last1, last2, pred, first1_, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR ForwardIterator1 - search_one( - ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred, - std::forward_iterator_tag* - ) - { - typedef sprout::tuples::tuple type; - return sprout::tuples::get<0>(sprout::detail::search_one_impl(type(first1, first2, false), last1, last2, pred, first1, 1)); - } - - // - // search_one - // - // recursion depth: - // O(log(N1+N2)) - // - template - inline SPROUT_CONSTEXPR ForwardIterator1 - search_one(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred) { - typedef typename sprout::common_iterator_category::type* category; - return sprout::detail::search_one(first1, last1, first2, last2, pred, category()); - } - template - inline SPROUT_CONSTEXPR ForwardIterator1 - search_one(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2, ForwardIterator2 last2) { - return sprout::detail::search_one(first1, last1, first2, last2, sprout::equal_to<>()); - } - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_DETAIL_ALGORITHM_SEARCH_ONE_HPP diff --git a/dsp/lib/sprout/sprout/detail/algorithm/search_one_rev.hpp b/dsp/lib/sprout/sprout/detail/algorithm/search_one_rev.hpp deleted file mode 100644 index d1c6231..0000000 --- a/dsp/lib/sprout/sprout/detail/algorithm/search_one_rev.hpp +++ /dev/null @@ -1,109 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_ALGORITHM_SEARCH_ONE_REV_HPP -#define SPROUT_DETAIL_ALGORITHM_SEARCH_ONE_REV_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - search_one_rev_impl_1( - sprout::tuples::tuple const& current, - BidirectionalIterator1 first1, BidirectionalIterator2 first2, BinaryPredicate pred, - typename std::iterator_traits::difference_type n - ) - { - typedef sprout::tuples::tuple type; - return sprout::tuples::get<2>(current) ? current - : sprout::tuples::get<1>(current) == first2 ? type(sprout::tuples::get<0>(current), first2, true) - : sprout::tuples::get<0>(current) == first1 ? type(first1, sprout::tuples::get<1>(current), true) - : n == 1 ? pred(*sprout::prev(sprout::tuples::get<0>(current)), *sprout::prev(sprout::tuples::get<1>(current))) - ? type(sprout::prev(sprout::tuples::get<0>(current)), sprout::prev(sprout::tuples::get<1>(current)), false) - : type(sprout::tuples::get<0>(current), sprout::tuples::get<1>(current), true) - : sprout::detail::search_one_rev_impl_1( - sprout::detail::search_one_rev_impl_1( - current, - first1, first2, pred, n / 2 - ), - first1, first2, pred, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - search_one_rev_impl( - sprout::tuples::tuple const& current, - BidirectionalIterator1 first1, BidirectionalIterator2 first2, BinaryPredicate pred, - typename std::iterator_traits::difference_type n - ) - { - typedef sprout::tuples::tuple type; - return sprout::tuples::get<2>(current) ? current - : sprout::tuples::get<1>(current) == first2 ? type(sprout::tuples::get<0>(current), first2, true) - : sprout::tuples::get<0>(current) == first1 ? type(first1, sprout::tuples::get<1>(current), true) - : sprout::detail::search_one_rev_impl( - sprout::detail::search_one_rev_impl_1( - current, - first1, first2, pred, n - ), - first1, first2, pred, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - search_one_rev_check( - sprout::tuples::tuple const& result, - BidirectionalIterator1 first1, BidirectionalIterator1 last1, BidirectionalIterator2 first2 - ) - { - typedef sprout::pair type; - return sprout::tuples::get<1>(result) == first2 ? type(sprout::tuples::get<0>(result), false) - : type(last1, sprout::tuples::get<0>(result) == first1) - ; - } - - // - // search_one_rev - // - // recursion depth: - // O(log(N1+N2)) - // - template - inline SPROUT_CONSTEXPR sprout::pair - search_one_rev( - BidirectionalIterator1 first1, BidirectionalIterator1 last1, - BidirectionalIterator2 first2, BidirectionalIterator2 last2, BinaryPredicate pred - ) - { - typedef sprout::tuples::tuple type; - return sprout::detail::search_one_rev_check( - sprout::detail::search_one_rev_impl(type(last1, last2, false), first1, first2, pred, 1), - first1, last1, first2); - } - template - inline SPROUT_CONSTEXPR sprout::pair - search_one_rev( - BidirectionalIterator1 first1, BidirectionalIterator1 last1, - BidirectionalIterator2 first2, BidirectionalIterator2 last2 - ) - { - return sprout::detail::search_one_rev(first1, last1, first2, last2, sprout::equal_to<>()); - } - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_DETAIL_ALGORITHM_SEARCH_ONE_REV_HPP diff --git a/dsp/lib/sprout/sprout/detail/algorithm/set_overlap_count.hpp b/dsp/lib/sprout/sprout/detail/algorithm/set_overlap_count.hpp deleted file mode 100644 index 6324999..0000000 --- a/dsp/lib/sprout/sprout/detail/algorithm/set_overlap_count.hpp +++ /dev/null @@ -1,102 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_ALGORITHM_SET_OVERLAP_COUNT_HPP -#define SPROUT_DETAIL_ALGORITHM_SET_OVERLAP_COUNT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple::difference_type> - set_overlap_count_impl_1( - sprout::tuples::tuple::difference_type> const& current, - InputIterator1 last1, InputIterator2 last2, Compare comp, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::tuples::tuple::difference_type> type; - return sprout::tuples::get<0>(current) == last1 || sprout::tuples::get<1>(current) == last2 ? current - : n == 1 ? comp(*sprout::tuples::get<0>(current), *sprout::tuples::get<1>(current)) ? type( - sprout::next(sprout::tuples::get<0>(current)), sprout::tuples::get<1>(current), - sprout::tuples::get<2>(current) - ) - : comp(*sprout::tuples::get<1>(current), *sprout::tuples::get<0>(current)) ? type( - sprout::tuples::get<0>(current), sprout::next(sprout::tuples::get<1>(current)), - sprout::tuples::get<2>(current) - ) - : type( - sprout::next(sprout::tuples::get<0>(current)), sprout::next(sprout::tuples::get<1>(current)), - sprout::tuples::get<2>(current) + 1 - ) - : sprout::detail::set_overlap_count_impl_1( - sprout::detail::set_overlap_count_impl_1( - current, - last1, last2, comp, n / 2 - ), - last1, last2, comp, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple::difference_type> - set_overlap_count_impl( - sprout::tuples::tuple::difference_type> const& current, - InputIterator1 last1, InputIterator2 last2, Compare comp, typename std::iterator_traits::difference_type n - ) - { - return sprout::tuples::get<0>(current) == last1 || sprout::tuples::get<1>(current) == last2 ? current - : sprout::detail::set_overlap_count_impl( - sprout::detail::set_overlap_count_impl_1( - current, - last1, last2, comp, n - ), - last1, last2, comp, n * 2 - ) - ; - } - - // - // set_overlap_count - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type - set_overlap_count( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Compare comp - ) - { - typedef sprout::tuples::tuple::difference_type> type; - return sprout::tuples::get<2>( - sprout::detail::set_overlap_count_impl(type(first1, first2, 0), last1, last2, comp, 1) - ); - } - - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type - set_overlap_count( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2 - ) - { - return sprout::detail::set_overlap_count(first1, last1, first2, last2, sprout::less<>()); - } - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_DETAIL_ALGORITHM_SET_OVERLAP_COUNT_HPP diff --git a/dsp/lib/sprout/sprout/detail/algorithm_min_max.hpp b/dsp/lib/sprout/sprout/detail/algorithm_min_max.hpp deleted file mode 100644 index 0def4b8..0000000 --- a/dsp/lib/sprout/sprout/detail/algorithm_min_max.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_ALGORITHM_MIN_MAX_HPP -#define SPROUT_DETAIL_ALGORITHM_MIN_MAX_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_DETAIL_ALGORITHM_MIN_MAX_HPP diff --git a/dsp/lib/sprout/sprout/detail/call_traits.hpp b/dsp/lib/sprout/sprout/detail/call_traits.hpp deleted file mode 100644 index 50fd248..0000000 --- a/dsp/lib/sprout/sprout/detail/call_traits.hpp +++ /dev/null @@ -1,65 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_CALL_TRAITS_HPP -#define SPROUT_DETAIL_CALL_TRAITS_HPP - -#include -#include - -namespace sprout { - namespace detail { - template - struct ct_impl_1 { - public: - typedef T const& param_type; - }; - template - struct ct_impl_1 { - public: - typedef T const param_type; - }; - - template - struct ct_impl { - public: - typedef T const& param_type; - }; - template - struct ct_impl { - public: - typedef typename sprout::detail::ct_impl_1::param_type param_type; - }; - template - struct ct_impl { - public: - typedef T const param_type; - }; - - template - struct call_traits { - public: - typedef T value_type; - typedef T& reference; - typedef T const& const_reference; - typedef typename sprout::detail::ct_impl< - T, - std::is_pointer::value, - std::is_arithmetic::value - >::param_type param_type; - }; - template - struct call_traits { - typedef T& value_type; - typedef T& reference; - typedef T const& const_reference; - typedef T& param_type; - }; - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_DETAIL_CALL_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/detail/char_conversion.hpp b/dsp/lib/sprout/sprout/detail/char_conversion.hpp deleted file mode 100644 index 4d01f45..0000000 --- a/dsp/lib/sprout/sprout/detail/char_conversion.hpp +++ /dev/null @@ -1,64 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_CHAR_CONVERSION_HPP -#define SPROUT_DETAIL_CHAR_CONVERSION_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR Elem - int_to_char(IntType val, int base) { - SPROUT_STATIC_ASSERT(sprout::detail::is_char_type_of_consecutive_digits::value); - SPROUT_STATIC_ASSERT(sprout::detail::is_char_type_of_consecutive_lower_alphabet::value); - return SPROUT_ASSERT(2 <= base && base <= 36), SPROUT_ASSERT(IntType(0) <= val && val < static_cast(base)), - val < 10 ? SPROUT_CHAR_LITERAL('0', Elem) + val - : SPROUT_CHAR_LITERAL('a', Elem) + (val - 10) - ; - } - template - inline SPROUT_CONSTEXPR Elem - int_to_char(IntType val) { - SPROUT_STATIC_ASSERT(sprout::detail::is_char_type_of_consecutive_digits::value); - return SPROUT_ASSERT(IntType(0) <= val && val < IntType(10)), - SPROUT_CHAR_LITERAL('0', Elem) + val - ; - } - - template - inline SPROUT_CONSTEXPR IntType - char_to_int(Elem c, int base) { - SPROUT_STATIC_ASSERT(sprout::detail::is_char_type_of_consecutive_digits::value); - SPROUT_STATIC_ASSERT(sprout::detail::is_char_type_of_consecutive_lower_alphabet::value); - SPROUT_STATIC_ASSERT(sprout::detail::is_char_type_of_consecutive_upper_alphabet::value); - return sprout::ascii::isdigit(c) && c - SPROUT_CHAR_LITERAL('0', Elem) < base ? c - SPROUT_CHAR_LITERAL('0', Elem) - : sprout::ascii::islower(c) && c - SPROUT_CHAR_LITERAL('a', Elem) + 10 < base ? c - SPROUT_CHAR_LITERAL('a', Elem) + 10 - : sprout::ascii::isupper(c) && c - SPROUT_CHAR_LITERAL('A', Elem) + 10 < base ? c - SPROUT_CHAR_LITERAL('A', Elem) + 10 - : static_cast(-1) - ; - } - template - inline SPROUT_CONSTEXPR IntType - char_to_int(Elem c) { - SPROUT_STATIC_ASSERT(sprout::detail::is_char_type_of_consecutive_digits::value); - return sprout::ascii::isdigit(c) ? c - SPROUT_CHAR_LITERAL('0', Elem) - : static_cast(-1) - ; - } - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_DETAIL_CHAR_CONVERSION_HPP diff --git a/dsp/lib/sprout/sprout/detail/char_literal.hpp b/dsp/lib/sprout/sprout/detail/char_literal.hpp deleted file mode 100644 index 26ace0f..0000000 --- a/dsp/lib/sprout/sprout/detail/char_literal.hpp +++ /dev/null @@ -1,62 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_CHAR_LITERAL_HPP -#define SPROUT_DETAIL_CHAR_LITERAL_HPP - -#include -#include -#include - -namespace sprout { - namespace detail { -#if SPROUT_USE_UNICODE_LITERALS - template - struct char_literal_of; - template - struct char_literal_of - : public sprout::integral_constant - {}; - template - struct char_literal_of - : public sprout::integral_constant - {}; - template - struct char_literal_of - : public sprout::integral_constant - {}; - template - struct char_literal_of - : public sprout::integral_constant - {}; -#else - template - struct char_literal_of; - template - struct char_literal_of - : public sprout::integral_constant - {}; - template - struct char_literal_of - : public sprout::integral_constant - {}; -#endif - } // namespace detail -} // namespace sprout - -// -// SPROUT_CHAR_LITERAL -// -#if SPROUT_USE_UNICODE_LITERALS -# define SPROUT_CHAR_LITERAL(CHAR, TYPE) \ - (sprout::detail::char_literal_of::value) -#else -# define SPROUT_CHAR_LITERAL(CHAR, TYPE) \ - (sprout::detail::char_literal_of::value) -#endif - -#endif // #ifndef SPROUT_DETAIL_CHAR_LITERAL_HPP diff --git a/dsp/lib/sprout/sprout/detail/char_type_of_consecutive.hpp b/dsp/lib/sprout/sprout/detail/char_type_of_consecutive.hpp deleted file mode 100644 index 8bd54d9..0000000 --- a/dsp/lib/sprout/sprout/detail/char_type_of_consecutive.hpp +++ /dev/null @@ -1,132 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_CHAR_TYPE_OF_CONSECUTIVE_HPP -#define SPROUT_DETAIL_CHAR_TYPE_OF_CONSECUTIVE_HPP - -#include -#include -#include - -namespace sprout { - namespace detail { - template - struct is_char_type_of_consecutive_digits - : public sprout::bool_constant< - SPROUT_CHAR_LITERAL('0', CharType) + 1 == SPROUT_CHAR_LITERAL('1', CharType) - && SPROUT_CHAR_LITERAL('1', CharType) + 1 == SPROUT_CHAR_LITERAL('2', CharType) - && SPROUT_CHAR_LITERAL('2', CharType) + 1 == SPROUT_CHAR_LITERAL('3', CharType) - && SPROUT_CHAR_LITERAL('3', CharType) + 1 == SPROUT_CHAR_LITERAL('4', CharType) - && SPROUT_CHAR_LITERAL('4', CharType) + 1 == SPROUT_CHAR_LITERAL('5', CharType) - && SPROUT_CHAR_LITERAL('5', CharType) + 1 == SPROUT_CHAR_LITERAL('6', CharType) - && SPROUT_CHAR_LITERAL('6', CharType) + 1 == SPROUT_CHAR_LITERAL('7', CharType) - && SPROUT_CHAR_LITERAL('7', CharType) + 1 == SPROUT_CHAR_LITERAL('8', CharType) - && SPROUT_CHAR_LITERAL('8', CharType) + 1 == SPROUT_CHAR_LITERAL('9', CharType) - > - {}; - template - struct is_char_type_of_consecutive_digits - : public sprout::detail::is_char_type_of_consecutive_digits - {}; - template - struct is_char_type_of_consecutive_digits - : public sprout::detail::is_char_type_of_consecutive_digits - {}; - template - struct is_char_type_of_consecutive_digits - : public sprout::detail::is_char_type_of_consecutive_digits - {}; - - template - struct is_char_type_of_consecutive_lower_alphabet - : public sprout::bool_constant< - SPROUT_CHAR_LITERAL('a', CharType) + 1 == SPROUT_CHAR_LITERAL('b', CharType) - && SPROUT_CHAR_LITERAL('b', CharType) + 1 == SPROUT_CHAR_LITERAL('c', CharType) - && SPROUT_CHAR_LITERAL('c', CharType) + 1 == SPROUT_CHAR_LITERAL('d', CharType) - && SPROUT_CHAR_LITERAL('d', CharType) + 1 == SPROUT_CHAR_LITERAL('e', CharType) - && SPROUT_CHAR_LITERAL('e', CharType) + 1 == SPROUT_CHAR_LITERAL('f', CharType) - && SPROUT_CHAR_LITERAL('f', CharType) + 1 == SPROUT_CHAR_LITERAL('g', CharType) - && SPROUT_CHAR_LITERAL('g', CharType) + 1 == SPROUT_CHAR_LITERAL('h', CharType) - && SPROUT_CHAR_LITERAL('h', CharType) + 1 == SPROUT_CHAR_LITERAL('i', CharType) - && SPROUT_CHAR_LITERAL('i', CharType) + 1 == SPROUT_CHAR_LITERAL('j', CharType) - && SPROUT_CHAR_LITERAL('j', CharType) + 1 == SPROUT_CHAR_LITERAL('k', CharType) - && SPROUT_CHAR_LITERAL('k', CharType) + 1 == SPROUT_CHAR_LITERAL('l', CharType) - && SPROUT_CHAR_LITERAL('l', CharType) + 1 == SPROUT_CHAR_LITERAL('m', CharType) - && SPROUT_CHAR_LITERAL('m', CharType) + 1 == SPROUT_CHAR_LITERAL('n', CharType) - && SPROUT_CHAR_LITERAL('n', CharType) + 1 == SPROUT_CHAR_LITERAL('o', CharType) - && SPROUT_CHAR_LITERAL('o', CharType) + 1 == SPROUT_CHAR_LITERAL('p', CharType) - && SPROUT_CHAR_LITERAL('p', CharType) + 1 == SPROUT_CHAR_LITERAL('q', CharType) - && SPROUT_CHAR_LITERAL('q', CharType) + 1 == SPROUT_CHAR_LITERAL('r', CharType) - && SPROUT_CHAR_LITERAL('r', CharType) + 1 == SPROUT_CHAR_LITERAL('s', CharType) - && SPROUT_CHAR_LITERAL('s', CharType) + 1 == SPROUT_CHAR_LITERAL('t', CharType) - && SPROUT_CHAR_LITERAL('t', CharType) + 1 == SPROUT_CHAR_LITERAL('u', CharType) - && SPROUT_CHAR_LITERAL('u', CharType) + 1 == SPROUT_CHAR_LITERAL('v', CharType) - && SPROUT_CHAR_LITERAL('v', CharType) + 1 == SPROUT_CHAR_LITERAL('w', CharType) - && SPROUT_CHAR_LITERAL('w', CharType) + 1 == SPROUT_CHAR_LITERAL('x', CharType) - && SPROUT_CHAR_LITERAL('x', CharType) + 1 == SPROUT_CHAR_LITERAL('y', CharType) - && SPROUT_CHAR_LITERAL('y', CharType) + 1 == SPROUT_CHAR_LITERAL('z', CharType) - > - {}; - template - struct is_char_type_of_consecutive_lower_alphabet - : public sprout::detail::is_char_type_of_consecutive_lower_alphabet - {}; - template - struct is_char_type_of_consecutive_lower_alphabet - : public sprout::detail::is_char_type_of_consecutive_lower_alphabet - {}; - template - struct is_char_type_of_consecutive_lower_alphabet - : public sprout::detail::is_char_type_of_consecutive_lower_alphabet - {}; - - template - struct is_char_type_of_consecutive_upper_alphabet - : public sprout::bool_constant< - SPROUT_CHAR_LITERAL('A', CharType) + 1 == SPROUT_CHAR_LITERAL('B', CharType) - && SPROUT_CHAR_LITERAL('B', CharType) + 1 == SPROUT_CHAR_LITERAL('C', CharType) - && SPROUT_CHAR_LITERAL('C', CharType) + 1 == SPROUT_CHAR_LITERAL('D', CharType) - && SPROUT_CHAR_LITERAL('D', CharType) + 1 == SPROUT_CHAR_LITERAL('E', CharType) - && SPROUT_CHAR_LITERAL('E', CharType) + 1 == SPROUT_CHAR_LITERAL('F', CharType) - && SPROUT_CHAR_LITERAL('F', CharType) + 1 == SPROUT_CHAR_LITERAL('G', CharType) - && SPROUT_CHAR_LITERAL('G', CharType) + 1 == SPROUT_CHAR_LITERAL('H', CharType) - && SPROUT_CHAR_LITERAL('H', CharType) + 1 == SPROUT_CHAR_LITERAL('I', CharType) - && SPROUT_CHAR_LITERAL('I', CharType) + 1 == SPROUT_CHAR_LITERAL('J', CharType) - && SPROUT_CHAR_LITERAL('J', CharType) + 1 == SPROUT_CHAR_LITERAL('K', CharType) - && SPROUT_CHAR_LITERAL('K', CharType) + 1 == SPROUT_CHAR_LITERAL('L', CharType) - && SPROUT_CHAR_LITERAL('L', CharType) + 1 == SPROUT_CHAR_LITERAL('M', CharType) - && SPROUT_CHAR_LITERAL('M', CharType) + 1 == SPROUT_CHAR_LITERAL('N', CharType) - && SPROUT_CHAR_LITERAL('N', CharType) + 1 == SPROUT_CHAR_LITERAL('O', CharType) - && SPROUT_CHAR_LITERAL('O', CharType) + 1 == SPROUT_CHAR_LITERAL('P', CharType) - && SPROUT_CHAR_LITERAL('P', CharType) + 1 == SPROUT_CHAR_LITERAL('Q', CharType) - && SPROUT_CHAR_LITERAL('Q', CharType) + 1 == SPROUT_CHAR_LITERAL('R', CharType) - && SPROUT_CHAR_LITERAL('R', CharType) + 1 == SPROUT_CHAR_LITERAL('S', CharType) - && SPROUT_CHAR_LITERAL('S', CharType) + 1 == SPROUT_CHAR_LITERAL('T', CharType) - && SPROUT_CHAR_LITERAL('T', CharType) + 1 == SPROUT_CHAR_LITERAL('U', CharType) - && SPROUT_CHAR_LITERAL('U', CharType) + 1 == SPROUT_CHAR_LITERAL('V', CharType) - && SPROUT_CHAR_LITERAL('V', CharType) + 1 == SPROUT_CHAR_LITERAL('W', CharType) - && SPROUT_CHAR_LITERAL('W', CharType) + 1 == SPROUT_CHAR_LITERAL('X', CharType) - && SPROUT_CHAR_LITERAL('X', CharType) + 1 == SPROUT_CHAR_LITERAL('Y', CharType) - && SPROUT_CHAR_LITERAL('Y', CharType) + 1 == SPROUT_CHAR_LITERAL('Z', CharType) - > - {}; - template - struct is_char_type_of_consecutive_upper_alphabet - : public sprout::detail::is_char_type_of_consecutive_upper_alphabet - {}; - template - struct is_char_type_of_consecutive_upper_alphabet - : public sprout::detail::is_char_type_of_consecutive_upper_alphabet - {}; - template - struct is_char_type_of_consecutive_upper_alphabet - : public sprout::detail::is_char_type_of_consecutive_upper_alphabet - {}; - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_DETAIL_CHAR_TYPE_OF_CONSECUTIVE_HPP diff --git a/dsp/lib/sprout/sprout/detail/container_complate.hpp b/dsp/lib/sprout/sprout/detail/container_complate.hpp deleted file mode 100644 index da5810c..0000000 --- a/dsp/lib/sprout/sprout/detail/container_complate.hpp +++ /dev/null @@ -1,84 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_CONTAINER_COMPLATE_HPP -#define SPROUT_DETAIL_CONTAINER_COMPLATE_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - container_complate_2(Result const& result, Args const&... args) { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - container_complate_2(Result const& result, Args const&... args) { - return sprout::detail::container_complate_2(result, args..., *sprout::next(sprout::internal_begin(result), sizeof...(Args))); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - container_complate_1( - Result const& result, - typename sprout::container_traits::difference_type, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - container_complate_1( - Result const& result, - typename sprout::container_traits::difference_type remain, - Args const&... args - ) - { - return remain != 0 - ? sprout::detail::container_complate_1(result, remain - 1, *sprout::next(sprout::internal_begin(result), remain - 1), args...) - : sprout::detail::container_complate_2(result, args...) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - container_complate(Result const& result, Args const&... args) { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - container_complate(Result const& result, Args const&... args) { - return sprout::detail::container_complate_1(result, sprout::internal_begin_offset(result), args...); - } - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_DETAIL_CONTAINER_COMPLATE_HPP diff --git a/dsp/lib/sprout/sprout/detail/container_complate_backward.hpp b/dsp/lib/sprout/sprout/detail/container_complate_backward.hpp deleted file mode 100644 index ae1fb3c..0000000 --- a/dsp/lib/sprout/sprout/detail/container_complate_backward.hpp +++ /dev/null @@ -1,84 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_CONTAINER_COMPLATE_BACKWARD_HPP -#define SPROUT_DETAIL_CONTAINER_COMPLATE_BACKWARD_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - container_complate_backward_2(Result const& result, Args const&... args) { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - container_complate_backward_2(Result const& result, Args const&... args) { - return sprout::detail::container_complate_backward_2(result, *sprout::prev(sprout::internal_end(result), sizeof...(Args) + 1), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - container_complate_backward_1( - Result const& result, - typename sprout::container_traits::difference_type, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - container_complate_backward_1( - Result const& result, - typename sprout::container_traits::difference_type remain, - Args const&... args - ) - { - return remain != 0 - ? sprout::detail::container_complate_backward_1(result, remain - 1, args..., *sprout::prev(sprout::internal_end(result), remain)) - : sprout::detail::container_complate_backward_2(result, args...) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - container_complate_backward(Result const& result, Args const&... args) { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - container_complate_backward(Result const& result, Args const&... args) { - return sprout::detail::container_complate_backward_1(result, sprout::internal_end_offset_backward(result), args...); - } - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_DETAIL_CONTAINER_COMPLATE_BACKWARD_HPP diff --git a/dsp/lib/sprout/sprout/detail/digits_to_int.hpp b/dsp/lib/sprout/sprout/detail/digits_to_int.hpp deleted file mode 100644 index 235ae22..0000000 --- a/dsp/lib/sprout/sprout/detail/digits_to_int.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_DIGITS_TO_INT_HPP -#define SPROUT_DETAIL_DIGITS_TO_INT_HPP - -#include -#include - -namespace sprout { - namespace detail { - template - struct digits_to_int; - template - struct digits_to_int - : public sprout::integral_constant - {}; - template - struct digits_to_int - : public sprout::integral_constant::value> - {}; - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_DETAIL_DIGITS_TO_INT_HPP diff --git a/dsp/lib/sprout/sprout/detail/do_nothing_statement.hpp b/dsp/lib/sprout/sprout/detail/do_nothing_statement.hpp deleted file mode 100644 index f91d69c..0000000 --- a/dsp/lib/sprout/sprout/detail/do_nothing_statement.hpp +++ /dev/null @@ -1,21 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_DO_NOTHING_STATEMENT_WITHIN_NAMESPACE_HPP -#define SPROUT_DETAIL_DO_NOTHING_STATEMENT_WITHIN_NAMESPACE_HPP - -#include - -namespace sprout_detail_do_nothing_statement {} - -// -// SPROUT_DETAIL_DO_NOTHING_STATEMENT_WITHIN_NAMESPACE -// -#define SPROUT_DETAIL_DO_NOTHING_STATEMENT_WITHIN_NAMESPACE \ - using namespace sprout_detail_do_nothing_statement - -#endif // #ifndef SPROUT_DETAIL_DO_NOTHING_STATEMENT_WITHIN_NAMESPACE_HPP diff --git a/dsp/lib/sprout/sprout/detail/functional/const_subscript.hpp b/dsp/lib/sprout/sprout/detail/functional/const_subscript.hpp deleted file mode 100644 index 72d8c6a..0000000 --- a/dsp/lib/sprout/sprout/detail/functional/const_subscript.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_FUNCTIONAL_CONST_SUBSCRIPT_HPP -#define SPROUT_DETAIL_FUNCTIONAL_CONST_SUBSCRIPT_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - struct const_subscript; - template<> - struct const_subscript - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval()[std::declval()]) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(const_cast()[std::declval()])>(sprout::as_const(std::declval())[std::declval()])) - { - return const_cast()[std::declval()])>(sprout::as_const(x)[SPROUT_FORWARD(U, y)]); - } - }; - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_DETAIL_FUNCTIONAL_CONST_SUBSCRIPT_HPP diff --git a/dsp/lib/sprout/sprout/detail/integer.hpp b/dsp/lib/sprout/sprout/detail/integer.hpp deleted file mode 100644 index b6d56b1..0000000 --- a/dsp/lib/sprout/sprout/detail/integer.hpp +++ /dev/null @@ -1,189 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_INTEGER_HPP -#define SPROUT_DETAIL_INTEGER_HPP - -#include -#include -#include - -namespace sprout { - namespace detail { - template - struct int_fast_t { - typedef LeastInt fast; - typedef fast type; - }; - - template - struct int_least_helper {}; - template<> - struct int_least_helper<1> { - typedef long long least; - }; - template<> - struct int_least_helper<2> { - typedef long least; - }; - template<> - struct int_least_helper<3> { - typedef int least; - }; - template<> - struct int_least_helper<4> { - typedef short least; - }; - template<> - struct int_least_helper<5> { - typedef signed char least; - }; - template<> - struct int_least_helper<6> { - typedef unsigned long long least; - }; - template<> - struct int_least_helper<7> { - typedef unsigned long least; - }; - template<> - struct int_least_helper<8> { - typedef unsigned int least; - }; - template<> - struct int_least_helper<9> { - typedef unsigned short least; - }; - template<> - struct int_least_helper<10> { - typedef unsigned char least; - }; - - template - struct exact_signed_base_helper {}; - template - struct exact_unsigned_base_helper {}; - - template<> - struct exact_signed_base_helper { - typedef signed char exact; - }; - template<> - struct exact_unsigned_base_helper { - typedef unsigned char exact; - }; -#if USHRT_MAX != UCHAR_MAX - template<> - struct exact_signed_base_helper { - typedef short exact; - }; - template<> - struct exact_unsigned_base_helper { - typedef unsigned short exact; - }; -#endif -#if UINT_MAX != USHRT_MAX - template<> - struct exact_signed_base_helper { - typedef int exact; - }; - template<> - struct exact_unsigned_base_helper { - typedef unsigned int exact; - }; -#endif -#if ULONG_MAX != UINT_MAX - template<> - struct exact_signed_base_helper { - typedef long exact; - }; - template<> - struct exact_unsigned_base_helper { - typedef unsigned long exact; - }; -#endif -#if ULLONG_MAX != ULONG_MAX - template<> - struct exact_signed_base_helper { - typedef long long exact; - }; - template<> - struct exact_unsigned_base_helper { - typedef unsigned long long exact; - }; -#endif - - template - struct int_t - : public sprout::detail::exact_signed_base_helper - { - typedef typename sprout::detail::int_least_helper< - 0 - + (Bits - 1 <= sprout::numeric_limits::digits) - + (Bits - 1 <= sprout::numeric_limits::digits) - + (Bits - 1 <= sprout::numeric_limits::digits) - + (Bits - 1 <= sprout::numeric_limits::digits) - + (Bits - 1 <= sprout::numeric_limits::digits) - >::least least; - typedef typename sprout::detail::int_fast_t::type fast; - }; - template - struct uint_t - : public sprout::detail::exact_unsigned_base_helper - { - typedef typename sprout::detail::int_least_helper< - 5 - + (Bits <= sprout::numeric_limits::digits) - + (Bits <= sprout::numeric_limits::digits) - + (Bits <= sprout::numeric_limits::digits) - + (Bits <= sprout::numeric_limits::digits) - + (Bits <= sprout::numeric_limits::digits) - >::least least; - typedef typename sprout::detail::int_fast_t::type fast; - }; - - template - struct int_max_value_t { - typedef typename sprout::detail::int_least_helper< - 0 - + (MaxValue <= sprout::numeric_limits::max()) - + (MaxValue <= sprout::numeric_limits::max()) - + (MaxValue <= sprout::numeric_limits::max()) - + (MaxValue <= sprout::numeric_limits::max()) - + (MaxValue <= sprout::numeric_limits::max()) - >::least least; - typedef typename sprout::detail::int_fast_t::type fast; - }; - template - struct int_min_value_t { - typedef typename sprout::detail::int_least_helper< - 0 - + (MinValue >= sprout::numeric_limits::min()) - + (MinValue >= sprout::numeric_limits::min()) - + (MinValue >= sprout::numeric_limits::min()) - + (MinValue >= sprout::numeric_limits::min()) - + (MinValue >= sprout::numeric_limits::min()) - >::least least; - typedef typename sprout::detail::int_fast_t::type fast; - }; - - template - struct uint_value_t { - typedef typename sprout::detail::int_least_helper< - 5 - + (MaxValue <= static_cast(sprout::numeric_limits::max())) - + (MaxValue <= static_cast(sprout::numeric_limits::max())) - + (MaxValue <= static_cast(sprout::numeric_limits::max())) - + (MaxValue <= static_cast(sprout::numeric_limits::max())) - + (MaxValue <= static_cast(sprout::numeric_limits::max())) - >::least least; - typedef typename sprout::detail::int_fast_t::type fast; - }; - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_DETAIL_INTEGER_HPP diff --git a/dsp/lib/sprout/sprout/detail/integer/integer_mask.hpp b/dsp/lib/sprout/sprout/detail/integer/integer_mask.hpp deleted file mode 100644 index 6901f3e..0000000 --- a/dsp/lib/sprout/sprout/detail/integer/integer_mask.hpp +++ /dev/null @@ -1,72 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_INTEGER_INTEGER_MASK_HPP -#define SPROUT_DETAIL_INTEGER_INTEGER_MASK_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - struct high_bit_mask_t { - public: - typedef typename sprout::detail::uint_t<(Bits + 1)>::least least; - typedef typename sprout::detail::uint_t<(Bits + 1)>::fast fast; - public: - SPROUT_STATIC_CONSTEXPR least high_bit = least(1u) << Bits; - SPROUT_STATIC_CONSTEXPR fast high_bit_fast = fast(1u) << Bits; - SPROUT_STATIC_CONSTEXPR std::size_t bit_position = Bits; - }; - - template - struct low_bits_mask_t { - public: - typedef typename sprout::detail::uint_t::least least; - typedef typename sprout::detail::uint_t::fast fast; - public: - SPROUT_STATIC_CONSTEXPR least sig_bits = ~(~(least(0u)) << Bits); - SPROUT_STATIC_CONSTEXPR fast sig_bits_fast = fast(sig_bits); - SPROUT_STATIC_CONSTEXPR std::size_t bit_count = Bits; - }; - -#define SPROUT_LOW_BITS_MASK_SPECIALIZE(TYPE) \ - template<> \ - struct low_bits_mask_t::digits> { \ - public: \ - typedef sprout::numeric_limits limits_type; \ - typedef sprout::detail::uint_t::least least; \ - typedef sprout::detail::uint_t::fast fast; \ - public: \ - SPROUT_STATIC_CONSTEXPR least sig_bits = ~(least(0u)); \ - SPROUT_STATIC_CONSTEXPR fast sig_bits_fast = fast(sig_bits); \ - SPROUT_STATIC_CONSTEXPR std::size_t bit_count = limits_type::digits; \ - } - - SPROUT_LOW_BITS_MASK_SPECIALIZE(unsigned char); -#if USHRT_MAX > UCHAR_MAX - SPROUT_LOW_BITS_MASK_SPECIALIZE(unsigned short); -#endif -#if UINT_MAX > USHRT_MAX - SPROUT_LOW_BITS_MASK_SPECIALIZE(unsigned int); -#endif -#if ULONG_MAX > UINT_MAX - SPROUT_LOW_BITS_MASK_SPECIALIZE(unsigned long); -#endif -#if ULLONG_MAX > ULONG_MAX - SPROUT_LOW_BITS_MASK_SPECIALIZE(unsigned long long); -#endif - -#undef SPROUT_LOW_BITS_MASK_SPECIALIZE - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_DETAIL_INTEGER_INTEGER_MASK_HPP diff --git a/dsp/lib/sprout/sprout/detail/integer/static_log2.hpp b/dsp/lib/sprout/sprout/detail/integer/static_log2.hpp deleted file mode 100644 index 62ab120..0000000 --- a/dsp/lib/sprout/sprout/detail/integer/static_log2.hpp +++ /dev/null @@ -1,71 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_INTEGER_STATIC_LOG2_HPP -#define SPROUT_DETAIL_INTEGER_STATIC_LOG2_HPP - -#include -#include -#include - -namespace sprout { - namespace detail { - typedef std::uintmax_t static_log2_argument_type; - typedef int static_log2_result_type; - - namespace static_log2_impl { - typedef sprout::detail::static_log2_argument_type argument_type; - typedef sprout::detail::static_log2_result_type result_type; - - template - struct choose_initial_n { - SPROUT_STATIC_CONSTEXPR bool c - = (sprout::detail::static_log2_impl::argument_type(1) << n << n) != 0 - ; - SPROUT_STATIC_CONSTEXPR sprout::detail::static_log2_impl::result_type value - = !c * n + choose_initial_n<2 * c * n>::value - ; - }; - template<> - struct choose_initial_n<0> { - SPROUT_STATIC_CONSTEXPR sprout::detail::static_log2_impl::result_type value = 0; - }; - - SPROUT_STATIC_CONSTEXPR sprout::detail::static_log2_impl::result_type n_zero = 16; - SPROUT_STATIC_CONSTEXPR sprout::detail::static_log2_impl::result_type initial_n - = sprout::detail::static_log2_impl::choose_initial_n::value - ; - - template< - sprout::detail::static_log2_impl::argument_type x, - sprout::detail::static_log2_impl::result_type n = sprout::detail::static_log2_impl::initial_n - > - struct static_log2_impl { - SPROUT_STATIC_CONSTEXPR bool c = (x >> n) > 0; - SPROUT_STATIC_CONSTEXPR sprout::detail::static_log2_impl::result_type value - = c * n + (static_log2_impl<(x >> c * n), n / 2>::value) - ; - }; - template<> - struct static_log2_impl<1, 0> { - SPROUT_STATIC_CONSTEXPR sprout::detail::static_log2_impl::result_type value = 0; - }; - } // namespace static_log2_impl - - template - struct static_log2 - : public sprout::integral_constant< - sprout::detail::static_log2_result_type, - sprout::detail::static_log2_impl::static_log2_impl::value - > - {}; - template<> - struct static_log2<0> {}; - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_DETAIL_INTEGER_STATIC_LOG2_HPP diff --git a/dsp/lib/sprout/sprout/detail/io/ios_state.hpp b/dsp/lib/sprout/sprout/detail/io/ios_state.hpp deleted file mode 100644 index 00ed197..0000000 --- a/dsp/lib/sprout/sprout/detail/io/ios_state.hpp +++ /dev/null @@ -1,433 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_IO_IOS_STATE_HPP -#define SPROUT_DETAIL_IO_IOS_STATE_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - namespace io { - class ios_flags_saver { - public: - typedef std::ios_base state_type; - typedef std::ios_base::fmtflags aspect_type; - private: - state_type& s_save_; - aspect_type const a_save_; - private: - ios_flags_saver& operator=(ios_flags_saver const&) SPROUT_DELETED_FUNCTION_DECL - public: - explicit SPROUT_NON_CONSTEXPR ios_flags_saver(state_type& s) - : s_save_(s) - , a_save_(s.flags()) - {} - SPROUT_NON_CONSTEXPR ios_flags_saver(state_type& s, aspect_type const& a) - : s_save_(s) - , a_save_(s.flags(a)) - {} - SPROUT_NON_CONSTEXPR ~ios_flags_saver() { - this->restore(); - } - SPROUT_NON_CONSTEXPR void restore() { - s_save_.flags(a_save_); - } - }; - - class ios_precision_saver { - public: - typedef std::ios_base state_type; - typedef std::streamsize aspect_type; - private: - state_type& s_save_; - aspect_type const a_save_; - private: - ios_precision_saver& operator=(ios_precision_saver const&) SPROUT_DELETED_FUNCTION_DECL - public: - explicit SPROUT_NON_CONSTEXPR ios_precision_saver(state_type& s) - : s_save_(s) - , a_save_(s.precision()) - {} - SPROUT_NON_CONSTEXPR ios_precision_saver(state_type& s, aspect_type const& a) - : s_save_(s) - , a_save_(s.precision(a)) - {} - SPROUT_NON_CONSTEXPR ~ios_precision_saver() { - this->restore(); - } - SPROUT_NON_CONSTEXPR void restore() { - s_save_.precision(a_save_); - } - }; - - class ios_width_saver { - public: - typedef std::ios_base state_type; - typedef std::streamsize aspect_type; - private: - state_type& s_save_; - aspect_type const a_save_; - private: - ios_width_saver& operator=(ios_width_saver const&) SPROUT_DELETED_FUNCTION_DECL - public: - explicit SPROUT_NON_CONSTEXPR ios_width_saver(state_type& s) - : s_save_(s) - , a_save_(s.width()) - {} - SPROUT_NON_CONSTEXPR ios_width_saver(state_type& s, aspect_type const& a) - : s_save_(s) - , a_save_(s.width(a)) - {} - SPROUT_NON_CONSTEXPR ~ios_width_saver() { - this->restore(); - } - SPROUT_NON_CONSTEXPR void restore() { - s_save_.width(a_save_); - } - }; - - template - class basic_ios_iostate_saver { - public: - typedef std::basic_ios state_type; - typedef std::ios_base::iostate aspect_type; - private: - state_type& s_save_; - aspect_type const a_save_; - private: - basic_ios_iostate_saver& operator=(basic_ios_iostate_saver const&) SPROUT_DELETED_FUNCTION_DECL - public: - explicit SPROUT_NON_CONSTEXPR basic_ios_iostate_saver(state_type& s) - : s_save_(s) - , a_save_(s.rdstate()) - {} - SPROUT_NON_CONSTEXPR basic_ios_iostate_saver(state_type& s, aspect_type const& a) - : s_save_(s) - , a_save_(s.rdstate()) - { - s.clear(a); - } - SPROUT_NON_CONSTEXPR ~basic_ios_iostate_saver() { - this->restore(); - } - SPROUT_NON_CONSTEXPR void restore() { - s_save_.clear(a_save_); - } - }; - - template - class basic_ios_exception_saver { - public: - typedef std::basic_ios state_type; - typedef std::ios_base::iostate aspect_type; - private: - state_type& s_save_; - aspect_type const a_save_; - private: - basic_ios_exception_saver& operator=(basic_ios_exception_saver const&) SPROUT_DELETED_FUNCTION_DECL - public: - explicit SPROUT_NON_CONSTEXPR basic_ios_exception_saver(state_type& s) - : s_save_(s) - , a_save_(s.exceptions()) - {} - SPROUT_NON_CONSTEXPR basic_ios_exception_saver(state_type& s, aspect_type const& a) - : s_save_(s) - , a_save_(s.exceptions()) - { - s.exceptions(a); - } - SPROUT_NON_CONSTEXPR ~basic_ios_exception_saver() { - this->restore(); - } - SPROUT_NON_CONSTEXPR void restore() { - s_save_.exceptions(a_save_); - } - }; - - template - class basic_ios_tie_saver { - public: - typedef std::basic_ios state_type; - typedef std::basic_ostream* aspect_type; - private: - state_type& s_save_; - aspect_type const a_save_; - private: - basic_ios_tie_saver& operator=(basic_ios_tie_saver const&) SPROUT_DELETED_FUNCTION_DECL - public: - explicit SPROUT_NON_CONSTEXPR basic_ios_tie_saver(state_type& s) - : s_save_(s) - , a_save_(s.tie()) - {} - SPROUT_NON_CONSTEXPR basic_ios_tie_saver(state_type& s, aspect_type const& a) - : s_save_(s) - , a_save_(s.tie(a)) - {} - SPROUT_NON_CONSTEXPR ~basic_ios_tie_saver() { - this->restore(); - } - SPROUT_NON_CONSTEXPR void restore() { - s_save_.tie(a_save_); - } - }; - - template - class basic_ios_rdbuf_saver { - public: - typedef std::basic_ios state_type; - typedef std::basic_streambuf* aspect_type; - private: - state_type& s_save_; - aspect_type const a_save_; - private: - basic_ios_rdbuf_saver& operator=(basic_ios_rdbuf_saver const&) SPROUT_DELETED_FUNCTION_DECL - public: - explicit SPROUT_NON_CONSTEXPR basic_ios_rdbuf_saver(state_type& s) - : s_save_(s) - , a_save_(s.rdbuf()) - {} - SPROUT_NON_CONSTEXPR basic_ios_rdbuf_saver(state_type& s, aspect_type const& a) - : s_save_(s) - , a_save_(s.rdbuf(a)) - {} - SPROUT_NON_CONSTEXPR ~basic_ios_rdbuf_saver() { - this->restore(); - } - SPROUT_NON_CONSTEXPR void restore() { - s_save_.rdbuf(a_save_); - } - }; - - template - class basic_ios_fill_saver { - public: - typedef std::basic_ios state_type; - typedef typename state_type::char_type aspect_type; - private: - state_type& s_save_; - aspect_type const a_save_; - private: - basic_ios_fill_saver& operator=(basic_ios_fill_saver const&) SPROUT_DELETED_FUNCTION_DECL - public: - explicit SPROUT_NON_CONSTEXPR basic_ios_fill_saver(state_type& s) - : s_save_(s) - , a_save_(s.fill()) - {} - SPROUT_NON_CONSTEXPR basic_ios_fill_saver(state_type& s, aspect_type const& a) - : s_save_(s) - , a_save_(s.fill(a)) - {} - SPROUT_NON_CONSTEXPR ~basic_ios_fill_saver() { - this->restore(); - } - SPROUT_NON_CONSTEXPR void restore() { - s_save_.fill(a_save_); - } - }; - - template - class basic_ios_locale_saver { - public: - typedef std::basic_ios state_type; - typedef std::locale aspect_type; - private: - state_type& s_save_; - aspect_type const a_save_; - private: - basic_ios_locale_saver& operator=(basic_ios_locale_saver const&) SPROUT_DELETED_FUNCTION_DECL - public: - explicit SPROUT_NON_CONSTEXPR basic_ios_locale_saver(state_type& s) - : s_save_(s) - , a_save_(s.getloc()) - {} - SPROUT_NON_CONSTEXPR basic_ios_locale_saver(state_type& s, aspect_type const& a) - : s_save_(s) - , a_save_(s.imbue(a)) - {} - SPROUT_NON_CONSTEXPR ~basic_ios_locale_saver() { - this->restore(); - } - SPROUT_NON_CONSTEXPR void restore() { - s_save_.imbue(a_save_); - } - }; - - class ios_iword_saver { - public: - typedef std::ios_base state_type; - typedef int index_type; - typedef long aspect_type; - private: - state_type& s_save_; - aspect_type const a_save_; - index_type const i_save_; - private: - ios_iword_saver& operator=(ios_iword_saver const&) SPROUT_DELETED_FUNCTION_DECL - public: - explicit SPROUT_NON_CONSTEXPR ios_iword_saver(state_type& s, index_type i) - : s_save_(s) - , a_save_(s.iword(i)) - , i_save_(i) - {} - SPROUT_NON_CONSTEXPR ios_iword_saver(state_type& s, index_type i, aspect_type const& a) - : s_save_(s) - , a_save_(s.iword(i)) - , i_save_(i) - { - s.iword(i) = a; - } - SPROUT_NON_CONSTEXPR ~ios_iword_saver() { - this->restore(); - } - SPROUT_NON_CONSTEXPR void restore() { - s_save_.iword(i_save_) = a_save_; - } - }; - - class ios_pword_saver { - public: - typedef std::ios_base state_type; - typedef int index_type; - typedef void* aspect_type; - private: - state_type& s_save_; - aspect_type const a_save_; - index_type const i_save_; - private: - ios_pword_saver& operator=(ios_pword_saver const&) SPROUT_DELETED_FUNCTION_DECL - public: - explicit SPROUT_NON_CONSTEXPR ios_pword_saver(state_type& s, index_type i) - : s_save_(s) - , a_save_(s.pword(i)) - , i_save_(i) - {} - SPROUT_NON_CONSTEXPR ios_pword_saver(state_type& s, index_type i, aspect_type const& a) - : s_save_(s) - , a_save_(s.pword(i)) - , i_save_(i) - { - s.pword(i) = a; - } - SPROUT_NON_CONSTEXPR ~ios_pword_saver() { - this->restore(); - } - SPROUT_NON_CONSTEXPR void restore() { - s_save_.pword(i_save_) = a_save_; - } - }; - - class ios_base_all_saver { - public: - typedef std::ios_base state_type; - private: - state_type& s_save_; - state_type::fmtflags const a1_save_; - std::streamsize const a2_save_; - std::streamsize const a3_save_; - private: - ios_base_all_saver& operator=(ios_base_all_saver const&) SPROUT_DELETED_FUNCTION_DECL - public: - explicit SPROUT_NON_CONSTEXPR ios_base_all_saver(state_type& s) - : s_save_(s) - , a1_save_(s.flags()) - , a2_save_(s.precision()) - , a3_save_(s.width()) - {} - SPROUT_NON_CONSTEXPR ~ios_base_all_saver() { - this->restore(); - } - SPROUT_NON_CONSTEXPR void restore() { - s_save_.width(a3_save_); - s_save_.precision(a2_save_); - s_save_.flags(a1_save_); - } - }; - - template - class basic_ios_all_saver { - public: - typedef std::basic_ios state_type; - private: - state_type& s_save_; - typename state_type::fmtflags const a1_save_; - std::streamsize const a2_save_; - std::streamsize const a3_save_; - typename state_type::iostate const a4_save_; - typename state_type::iostate const a5_save_; - std::basic_ostream* const a6_save_; - std::basic_streambuf* const a7_save_; - typename state_type::char_type const a8_save_; - std::locale const a9_save_; - private: - basic_ios_all_saver& operator=(basic_ios_all_saver const&) SPROUT_DELETED_FUNCTION_DECL - public: - explicit SPROUT_NON_CONSTEXPR basic_ios_all_saver(state_type& s) - : s_save_(s) - , a1_save_(s.flags()) - , a2_save_(s.precision()) - , a3_save_(s.width()) - , a4_save_(s.rdstate()) - , a5_save_(s.exceptions()) - , a6_save_(s.tie()) - , a7_save_(s.rdbuf()) - , a8_save_(s.fill()) - , a9_save_(s.getloc()) - {} - SPROUT_NON_CONSTEXPR ~basic_ios_all_saver() { - this->restore(); - } - SPROUT_NON_CONSTEXPR void restore() { - s_save_.imbue(a9_save_); - s_save_.fill(a8_save_); - s_save_.rdbuf(a7_save_); - s_save_.tie(a6_save_); - s_save_.exceptions(a5_save_); - s_save_.clear(a4_save_); - s_save_.width(a3_save_); - s_save_.precision(a2_save_); - s_save_.flags(a1_save_); - } - }; - - class ios_all_word_saver { - public: - typedef std::ios_base state_type; - typedef int index_type; - private: - state_type& s_save_; - index_type const i_save_; - long const a1_save_; - void* const a2_save_; - private: - ios_all_word_saver& operator=(ios_all_word_saver const&) SPROUT_DELETED_FUNCTION_DECL - public: - SPROUT_NON_CONSTEXPR ios_all_word_saver(state_type& s, index_type i) - : s_save_(s) - , i_save_(i) - , a1_save_(s.iword(i)) - , a2_save_(s.pword(i)) - {} - SPROUT_NON_CONSTEXPR ~ios_all_word_saver() { - this->restore(); - } - SPROUT_NON_CONSTEXPR void restore() { - s_save_.pword(i_save_) = a2_save_; - s_save_.iword(i_save_) = a1_save_; - } - }; - } // namespace io - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_DETAIL_IO_IOS_STATE_HPP diff --git a/dsp/lib/sprout/sprout/detail/io_fwd.hpp b/dsp/lib/sprout/sprout/detail/io_fwd.hpp deleted file mode 100644 index 73ca4a5..0000000 --- a/dsp/lib/sprout/sprout/detail/io_fwd.hpp +++ /dev/null @@ -1,92 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_IO_FWD_HPP -#define SPROUT_DETAIL_IO_FWD_HPP - -#include - -namespace sprout { - namespace detail { - namespace io { - class ios_flags_saver; - class ios_precision_saver; - class ios_width_saver; - class ios_base_all_saver; - - template > - class basic_ios_iostate_saver; - template > - class basic_ios_exception_saver; - template > - class basic_ios_tie_saver; - template > - class basic_ios_rdbuf_saver; - template > - class basic_ios_fill_saver; - template > - class basic_ios_locale_saver; - template > - class basic_ios_all_saver; - - typedef sprout::detail::io::basic_ios_iostate_saver ios_iostate_saver; - typedef sprout::detail::io::basic_ios_iostate_saver wios_iostate_saver; -#if SPROUT_USE_UNICODE_LITERALS - typedef sprout::detail::io::basic_ios_iostate_saver u16ios_iostate_saver; - typedef sprout::detail::io::basic_ios_iostate_saver u32ios_iostate_saver; -#endif - - typedef sprout::detail::io::basic_ios_exception_saver ios_exception_saver; - typedef sprout::detail::io::basic_ios_exception_saver wios_exception_saver; -#if SPROUT_USE_UNICODE_LITERALS - typedef sprout::detail::io::basic_ios_exception_saver u16ios_exception_saver; - typedef sprout::detail::io::basic_ios_exception_saver u32ios_exception_saver; -#endif - - typedef sprout::detail::io::basic_ios_tie_saver ios_tie_saver; - typedef sprout::detail::io::basic_ios_tie_saver wios_tie_saver; -#if SPROUT_USE_UNICODE_LITERALS - typedef sprout::detail::io::basic_ios_tie_saver u16ios_tie_saver; - typedef sprout::detail::io::basic_ios_tie_saver u32ios_tie_saver; -#endif - - typedef sprout::detail::io::basic_ios_rdbuf_saver ios_rdbuf_saver; - typedef sprout::detail::io::basic_ios_rdbuf_saver wios_rdbuf_saver; -#if SPROUT_USE_UNICODE_LITERALS - typedef sprout::detail::io::basic_ios_rdbuf_saver u16ios_rdbuf_saver; - typedef sprout::detail::io::basic_ios_rdbuf_saver u32ios_rdbuf_saver; -#endif - - typedef sprout::detail::io::basic_ios_fill_saver ios_fill_saver; - typedef sprout::detail::io::basic_ios_fill_saver wios_fill_saver; -#if SPROUT_USE_UNICODE_LITERALS - typedef sprout::detail::io::basic_ios_fill_saver u16ios_fill_saver; - typedef sprout::detail::io::basic_ios_fill_saver u32ios_fill_saver; -#endif - - typedef sprout::detail::io::basic_ios_locale_saver ios_locale_saver; - typedef sprout::detail::io::basic_ios_locale_saver wios_locale_saver; -#if SPROUT_USE_UNICODE_LITERALS - typedef sprout::detail::io::basic_ios_locale_saver u16ios_locale_saver; - typedef sprout::detail::io::basic_ios_locale_saver u32ios_locale_saver; -#endif - - typedef sprout::detail::io::basic_ios_all_saver ios_all_saver; - typedef sprout::detail::io::basic_ios_all_saver wios_all_saver; -#if SPROUT_USE_UNICODE_LITERALS - typedef sprout::detail::io::basic_ios_all_saver u16ios_all_saver; - typedef sprout::detail::io::basic_ios_all_saver u32ios_all_saver; -#endif - - class ios_iword_saver; - class ios_pword_saver; - class ios_all_word_saver; - } // namespace io - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_DETAIL_IO_FWD_HPP diff --git a/dsp/lib/sprout/sprout/detail/literal_def.hpp b/dsp/lib/sprout/sprout/detail/literal_def.hpp deleted file mode 100644 index c862d56..0000000 --- a/dsp/lib/sprout/sprout/detail/literal_def.hpp +++ /dev/null @@ -1,78 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_LITERAL_DEF_HPP -#define SPROUT_DETAIL_LITERAL_DEF_HPP - -#include -#include -#include -#include - -// -// SPROUT_LITERAL_STRING_DEF -// -#if SPROUT_USE_UNICODE_LITERALS -# define SPROUT_LITERAL_STRING_DEF(NAME, STRING, LENGTH) \ - template \ - struct NAME; \ - SPROUT_LITERAL_STRING_DEF_IMPL(NAME, STRING, LENGTH, char); \ - SPROUT_LITERAL_STRING_DEF_IMPL(NAME, SPROUT_PP_CAT(L, STRING), LENGTH, wchar_t); \ - SPROUT_LITERAL_STRING_DEF_IMPL(NAME, SPROUT_PP_CAT(u, STRING), LENGTH, char16_t); \ - SPROUT_LITERAL_STRING_DEF_IMPL(NAME, SPROUT_PP_CAT(U, STRING), LENGTH, char32_t); \ - template \ - struct NAME {} -#else -# define SPROUT_LITERAL_STRING_DEF(NAME, STRING, LENGTH) \ - template \ - struct NAME; \ - SPROUT_LITERAL_STRING_DEF_IMPL(NAME, STRING, LENGTH, char); \ - SPROUT_LITERAL_STRING_DEF_IMPL(NAME, SPROUT_PP_CAT(L, STRING), LENGTH, wchar_t); \ - template \ - struct NAME {} -#endif -#define SPROUT_LITERAL_STRING_DEF_IMPL(NAME, STRING, LENGTH, ELEM) \ - template \ - struct NAME { \ - public: \ - SPROUT_STATIC_CONSTEXPR sprout::basic_string value \ - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(sprout::to_string(STRING)) \ - ; \ - }; \ - template \ - SPROUT_CONSTEXPR_OR_CONST sprout::basic_string NAME::value \ - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(sprout::to_string(STRING)) - -// -// SPROUT_LITERAL_CHAR_DEF -// -#if SPROUT_USE_UNICODE_LITERALS -# define SPROUT_LITERAL_CHAR_DEF(NAME, CHAR) \ - template \ - struct NAME; \ - SPROUT_LITERAL_CHAR_DEF_IMPL(NAME, CHAR, char); \ - SPROUT_LITERAL_CHAR_DEF_IMPL(NAME, SPROUT_PP_CAT(L, CHAR), wchar_t); \ - SPROUT_LITERAL_CHAR_DEF_IMPL(NAME, SPROUT_PP_CAT(u, CHAR), char16_t); \ - SPROUT_LITERAL_CHAR_DEF_IMPL(NAME, SPROUT_PP_CAT(U, CHAR), char32_t); \ - template \ - struct NAME {} -#else -# define SPROUT_LITERAL_CHAR_DEF(NAME, CHAR) \ - template \ - struct NAME; \ - SPROUT_LITERAL_CHAR_DEF_IMPL(NAME, CHAR, char); \ - SPROUT_LITERAL_CHAR_DEF_IMPL(NAME, SPROUT_PP_CAT(L, CHAR), wchar_t); \ - template \ - struct NAME {} -#endif -#define SPROUT_LITERAL_CHAR_DEF_IMPL(NAME, CHAR, ELEM) \ - template<> \ - struct NAME \ - : public sprout::integral_constant \ - {} - -#endif // #ifndef SPROUT_DETAIL_LITERAL_DEF_HPP diff --git a/dsp/lib/sprout/sprout/detail/math/float.hpp b/dsp/lib/sprout/sprout/detail/math/float.hpp deleted file mode 100644 index 11540c6..0000000 --- a/dsp/lib/sprout/sprout/detail/math/float.hpp +++ /dev/null @@ -1,235 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_FLOAT_HPP -#define SPROUT_DETAIL_FLOAT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - // - // float_pow10 - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - float_pow10(int exponent) { - return sprout::detail::pow_n(FloatType(10), exponent); - } - - // - // float_exponent10 - // - template - inline SPROUT_CONSTEXPR sprout::pair - float_exponent10_positive_1(sprout::pair const& current, int n) { - typedef sprout::pair type; - return (current.second) < 10 ? current - : n == 1 ? type(current.first + 1, current.second / 10) - : sprout::detail::float_exponent10_positive_1( - sprout::detail::float_exponent10_positive_1( - current, - n / 2 - ), - n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - float_exponent10_positive_0(sprout::pair const& current, int n) { - return (current.second) < 10 ? current - : sprout::detail::float_exponent10_positive_0( - sprout::detail::float_exponent10_positive_1( - current, - n - ), - n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR int - float_exponent10_positive(FloatType val) { - typedef sprout::pair type; - return float_exponent10_positive_0(type(val, 0), 1).first; - } - template - inline SPROUT_CONSTEXPR sprout::pair - float_exponent10_negative_1(sprout::pair const& current, int n) { - typedef sprout::pair type; - return !((current.second) < 1) ? current - : n == 1 ? type(current.first + 1, current.second * 10) - : sprout::detail::float_exponent10_negative_1( - sprout::detail::float_exponent10_negative_1( - current, - n / 2 - ), - n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - float_exponent10_negative_0(sprout::pair const& current, int n) { - return !((current.second) < 1) ? current - : sprout::detail::float_exponent10_negative_0( - sprout::detail::float_exponent10_negative_1( - current, - n - ), - n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR int - float_exponent10_negative(FloatType val) { - typedef sprout::pair type; - return float_exponent10_negative_0(type(val, 0), 1).first; - } - // !!! OLD: -// template -// inline SPROUT_CONSTEXPR int -// float_exponent10_positive(FloatType val) { -// return val < 10 ? 0 -// : 1 + sprout::detail::float_exponent10_positive(val / 10) -// ; -// } -// template -// inline SPROUT_CONSTEXPR int -// float_exponent10_negative(FloatType val) { -// return val < 1 ? 1 + sprout::detail::float_exponent10_negative(val * 10) -// : 0 -// ; -// } - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR int - float_exponent10(FloatType val) { - return val < 0 - ? val > -1 - ? sprout::detail::float_exponent10_negative(-val) - : sprout::detail::float_exponent10_positive(-val) - : val < 1 - ? sprout::detail::float_exponent10_negative(val) - : sprout::detail::float_exponent10_positive(val) - ; - } - - // - // float_digit_at - // - template - inline SPROUT_CONSTEXPR int - float_digit_of_impl(FloatType val) { - return static_cast((val - sprout::math::floor(val)) * 10); - } - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR int - float_digit_at(FloatType val, int digits) { - return sprout::detail::float_digit_of_impl(val / sprout::detail::float_pow10(digits + 1)); - } - - // - // float_digits - // - template - inline SPROUT_CONSTEXPR sprout::pair - float_digits_impl_1(sprout::pair const& current, FloatType val, int n) { - typedef sprout::pair type; - return (val / current.second) < 1 ? current - : n == 1 ? type(current.first + 1, current.second * FloatType(10)) - : sprout::detail::float_digits_impl_1( - sprout::detail::float_digits_impl_1( - current, - val, n / 2 - ), - val, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - float_digits_impl(sprout::pair const& current, FloatType val, int n) { - return (val / current.second) < 1 ? current - : sprout::detail::float_digits_impl( - sprout::detail::float_digits_impl_1( - current, - val, n - ), - val, n * 2 - ) - ; - } - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR int - float_digits(FloatType val) { - typedef sprout::pair type; - return val < 0 - ? val > -1 ? 1 : sprout::detail::float_digits_impl(type(1, FloatType(10)), -val, 1).first - : val < 1 ? 1 : sprout::detail::float_digits_impl(type(1, FloatType(10)), val, 1).first - ; - } - - // - // float_digits_checked - // - template - inline SPROUT_CONSTEXPR int - float_digits_checked_impl(FloatType val, int digits) { - return val == 0 ? digits - : sprout::detail::float_digit_at(val, digits - 1) == 0 ? digits - 1 : digits - ; - } - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR int - float_digits_checked(FloatType val) { - return sprout::detail::float_digits_checked_impl(val, sprout::detail::float_digits(val)); - } - - // - // float_round_at - // - template - inline SPROUT_CONSTEXPR FloatType - float_round_impl(FloatType val, FloatType p10) { - return sprout::math::round(val * p10) / p10; - } - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - float_round_at(FloatType val, int digits) { - return sprout::detail::float_round_impl(val, sprout::detail::float_pow10(digits)); - } - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_DETAIL_FLOAT_HPP diff --git a/dsp/lib/sprout/sprout/detail/math/int.hpp b/dsp/lib/sprout/sprout/detail/math/int.hpp deleted file mode 100644 index 2cd7130..0000000 --- a/dsp/lib/sprout/sprout/detail/math/int.hpp +++ /dev/null @@ -1,102 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_INT_HPP -#define SPROUT_DETAIL_INT_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - // - // int_digits_mf - // - template - struct int_digits_mf_impl; - template - struct int_digits_mf_impl - : public sprout::integral_constant - {}; - template - struct int_digits_mf_impl - : public sprout::integral_constant::value> - {}; - template - struct int_digits_mf; - template - struct int_digits_mf - : public sprout::integral_constant - {}; - template - struct int_digits_mf - : public sprout::integral_constant::value> - {}; - - // - // int_pow - // - template< - typename IntType, int Base = 10, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR IntType - int_pow(int exponent) { - return exponent ? Base * sprout::detail::int_pow(exponent - 1) - : 1 - ; - } - - // - // int_digits - // - template - inline SPROUT_CONSTEXPR int - int_digits_impl(IntType val) { - return val ? 1 + sprout::detail::int_digits_impl(val / Base) - : 0 - ; - } - template< - int Base = 10, typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR int - int_digits(IntType val) { - return val ? 1 + sprout::detail::int_digits_impl(val / Base) - : 1 - ; - } - - // - // int_digit_at - // - template< - int Base = 10, typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR int - int_digit_at(IntType val, int digits) { - return val < 0 ? -((val / sprout::detail::int_pow(digits)) % Base) - : (val / sprout::detail::int_pow(digits)) % Base - ; - } - template< - int Base = 10, typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR int - int_digit_at(IntType val, int digits) { - return (val / sprout::detail::int_pow(digits)) % Base; - } - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_DETAIL_INT_HPP diff --git a/dsp/lib/sprout/sprout/detail/nil_base.hpp b/dsp/lib/sprout/sprout/detail/nil_base.hpp deleted file mode 100644 index 659f95a..0000000 --- a/dsp/lib/sprout/sprout/detail/nil_base.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_NIL_BASE_HPP -#define SPROUT_DETAIL_NIL_BASE_HPP - -#include - -namespace sprout { - namespace detail { - struct nil_base {}; - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_DETAIL_NIL_BASE_HPP diff --git a/dsp/lib/sprout/sprout/detail/one_type.hpp b/dsp/lib/sprout/sprout/detail/one_type.hpp deleted file mode 100644 index 022e56b..0000000 --- a/dsp/lib/sprout/sprout/detail/one_type.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_ONE_TYPE_HPP -#define SPROUT_DETAIL_ONE_TYPE_HPP - -#include - -namespace sprout { - namespace detail { - // - // one_type - // - typedef char one_type; - - // - // not_one_type - // - struct not_one_type { - public: - char padding[8]; - }; - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_DETAIL_ONE_TYPE_HPP diff --git a/dsp/lib/sprout/sprout/detail/param_at.hpp b/dsp/lib/sprout/sprout/detail/param_at.hpp deleted file mode 100644 index 80eb616..0000000 --- a/dsp/lib/sprout/sprout/detail/param_at.hpp +++ /dev/null @@ -1,53 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_PARAM_AT_HPP -#define SPROUT_DETAIL_PARAM_AT_HPP - -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Values) == 0, - R - >::type - param_at(std::size_t, T const& v, Values const&...) { - return v; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Values) != 0, - R - >::type - param_at(std::size_t n, T const& v, Values const&... values) { - return n == 0 ? v : sprout::detail::param_at(n - 1, values...); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Values) == 0, - R - >::type - param_seq_at(std::size_t, std::size_t m, T const& v, Values const&...) { - return v[m]; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Values) != 0, - R - >::type - param_seq_at(std::size_t n, std::size_t m, T const& v, Values const&... values) { - return n == 0 ? v[m] : sprout::detail::param_seq_at(n - 1, m, values...); - } - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_DETAIL_PARAM_AT_HPP diff --git a/dsp/lib/sprout/sprout/detail/pow.hpp b/dsp/lib/sprout/sprout/detail/pow.hpp deleted file mode 100644 index db18bc8..0000000 --- a/dsp/lib/sprout/sprout/detail/pow.hpp +++ /dev/null @@ -1,72 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_POW_HPP -#define SPROUT_DETAIL_POW_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR T - pow2(T const& x) { - return x * x; - } - template - inline SPROUT_CONSTEXPR T - pow3(T const& x) { - return x * x * x; - } - template - inline SPROUT_CONSTEXPR T - pow4(T const& x) { - return x * x * x * x; - } - template - inline SPROUT_CONSTEXPR T - pow5(T const& x) { - return x * x * x * x * x; - } - - template - inline SPROUT_CONSTEXPR T - pow_n_impl(T const& x, IntType n) { - return n == 1 ? x - : n % 2 ? x * sprout::detail::pow2(sprout::detail::pow_n_impl(x, n / 2)) - : sprout::detail::pow2(sprout::detail::pow_n_impl(x, n / 2)) - ; - } - template< - typename T, typename UIntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR T - pow_n(T const& x, UIntType n) { - return n == 0 ? T(1) - : sprout::detail::pow_n_impl(x, n) - ; - } - template< - typename T, typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR T - pow_n(T const& x, IntType n) { - return n == 0 ? T(1) - : n > 0 ? sprout::detail::pow_n_impl(x, n) - : T(1) / sprout::detail::pow_n_impl(x, -n) - ; - } - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_DETAIL_POW_HPP diff --git a/dsp/lib/sprout/sprout/detail/predef.hpp b/dsp/lib/sprout/sprout/detail/predef.hpp deleted file mode 100644 index a4b277f..0000000 --- a/dsp/lib/sprout/sprout/detail/predef.hpp +++ /dev/null @@ -1,106 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_PREDEF_HPP -#define SPROUT_DETAIL_PREDEF_HPP - -#include -#include - -// -// SPROUT_AVAILABLE_GCC -// -#if defined(__GNUC__) -# define SPROUT_AVAILABLE_GCC (1) -#else -# define SPROUT_AVAILABLE_GCC (0) -#endif -// -// SPROUT_VERSION_GCC -// -#if SPROUT_AVAILABLE_GCC -# define SPROUT_VERSION_GCC SPROUT_VERSION_NUMBER(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__) -#else -# define SPROUT_VERSION_GCC SPROUT_VERSION_NUMBER_ZERO -#endif -// -// SPROUT_GCC_EARLIER -// SPROUT_GCC_OR_LATER -// -#if SPROUT_AVAILABLE_GCC -# define SPROUT_GCC_EARLIER(MAJOR, MINOR, PATCH) \ - (SPROUT_VERSION_GCC < SPROUT_VERSION_NUMBER(MAJOR, MINOR, PATCH)) -# define SPROUT_GCC_OR_LATER(MAJOR, MINOR, PATCH) \ - (SPROUT_VERSION_GCC >= SPROUT_VERSION_NUMBER(MAJOR, MINOR, PATCH)) -#else -# define SPROUT_GCC_EARLIER(MAJOR, MINOR, PATCH) \ - (0) -# define SPROUT_GCC_OR_LATER(MAJOR, MINOR, PATCH) \ - (0) -#endif -// -// SPROUT_GCC_IN_RANGE -// -#if SPROUT_AVAILABLE_GCC -# define SPROUT_GCC_IN_RANGE(first_version, last_version) \ - (SPROUT_GCC_OR_LATER first_version && SPROUT_GCC_EARLIER last_version) -#else -# define SPROUT_GCC_IN_RANGE(first_version, last_version) \ - (0) -#endif - -// -// SPROUT_AVAILABLE_CLANG -// -#if defined(__clang__) -# define SPROUT_AVAILABLE_CLANG (1) -#else -# define SPROUT_AVAILABLE_CLANG (0) -#endif -// -// SPROUT_VERSION_CLANG -// -#if SPROUT_AVAILABLE_CLANG -# define SPROUT_VERSION_CLANG SPROUT_VERSION_NUMBER(__clang_major__, __clang_minor__, __clang_patchlevel__) -#else -# define SPROUT_VERSION_CLANG SPROUT_VERSION_NUMBER_ZERO -#endif -// -// SPROUT_CLANG_HAS_FUTURE -// -#if SPROUT_AVAILABLE_CLANG -# define SPROUT_CLANG_HAS_FUTURE(future) (__has_feature(future)) -#else -# define SPROUT_CLANG_HAS_FUTURE(future) (0) -#endif -// -// SPROUT_CLANG_EARLIER -// SPROUT_CLANG_OR_LATER -// -#if SPROUT_AVAILABLE_CLANG -# define SPROUT_CLANG_EARLIER(MAJOR, MINOR, PATCH) \ - (SPROUT_VERSION_CLANG < SPROUT_VERSION_NUMBER(MAJOR, MINOR, PATCH)) -# define SPROUT_CLANG_OR_LATER(MAJOR, MINOR, PATCH) \ - (SPROUT_VERSION_CLANG >= SPROUT_VERSION_NUMBER(MAJOR, MINOR, PATCH)) -#else -# define SPROUT_CLANG_EARLIER(MAJOR, MINOR, PATCH) \ - (0) -# define SPROUT_CLANG_OR_LATER(MAJOR, MINOR, PATCH) \ - (0) -#endif -// -// SPROUT_CLANG_IN_RANGE -// -#if SPROUT_AVAILABLE_CLANG -# define SPROUT_CLANG_IN_RANGE(first_version, last_version) \ - (SPROUT_CLANG_OR_LATER first_version && SPROUT_CLANG_EARLIER last_version) -#else -# define SPROUT_CLANG_IN_RANGE(first_version, last_version) \ - (0) -#endif - -#endif // #ifndef SPROUT_DETAIL_PREDEF_HPP diff --git a/dsp/lib/sprout/sprout/detail/sizeof.hpp b/dsp/lib/sprout/sprout/detail/sizeof.hpp deleted file mode 100644 index 9b9cdfc..0000000 --- a/dsp/lib/sprout/sprout/detail/sizeof.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_SIZEOF_HPP -#define SPROUT_DETAIL_SIZEOF_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - struct sizeof_ - : public sprout::integral_constant - {}; - - template - struct sizeof_pack - : public sprout::integral_constant - {}; - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_DETAIL_SIZEOF_HPP diff --git a/dsp/lib/sprout/sprout/detail/static_size.hpp b/dsp/lib/sprout/sprout/detail/static_size.hpp deleted file mode 100644 index c51e4c0..0000000 --- a/dsp/lib/sprout/sprout/detail/static_size.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_STATIC_SIZE_HPP -#define SPROUT_DETAIL_STATIC_SIZE_HPP - -#include - -namespace sprout { - namespace detail { - template - struct base_static_size { - public: - SPROUT_STATIC_CONSTEXPR T static_size = V; - public: - static SPROUT_CONSTEXPR T - fixed_size() SPROUT_NOEXCEPT { - return static_size; - } - }; - template - SPROUT_CONSTEXPR_OR_CONST T sprout::detail::base_static_size::static_size; - - template - struct inherit_static_size - : public sprout::detail::base_static_size - {}; - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_DETAIL_STATIC_SIZE_HPP diff --git a/dsp/lib/sprout/sprout/detail/str.hpp b/dsp/lib/sprout/sprout/detail/str.hpp deleted file mode 100644 index 28bc54d..0000000 --- a/dsp/lib/sprout/sprout/detail/str.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_STR_HPP -#define SPROUT_DETAIL_STR_HPP - -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR InputIterator - str_find_check(InputIterator const& found) { - return !*found ? InputIterator() - : found - ; - } - - template - inline SPROUT_CONSTEXPR InputIterator - str_find_check(InputIterator const& found, T const& value) { - return !(*found == value) && !*found ? InputIterator() - : found - ; - } - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_DETAIL_STR_HPP diff --git a/dsp/lib/sprout/sprout/detail/udl_namespace.hpp b/dsp/lib/sprout/sprout/detail/udl_namespace.hpp deleted file mode 100644 index 959725f..0000000 --- a/dsp/lib/sprout/sprout/detail/udl_namespace.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_DETAIL_UDL_NAMESPACE_HPP -#define SPROUT_DETAIL_UDL_NAMESPACE_HPP - -#include - -namespace sprout { - namespace literals { - } // namespace literals - - namespace udl = sprout::literals; -} // namespace sprout - -#endif // #ifndef SPROUT_DETAIL_UDL_NAMESPACE_HPP diff --git a/dsp/lib/sprout/sprout/endian_traits.hpp b/dsp/lib/sprout/sprout/endian_traits.hpp deleted file mode 100644 index a747c6c..0000000 --- a/dsp/lib/sprout/sprout/endian_traits.hpp +++ /dev/null @@ -1,138 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ENDIAN_TRAITS_HPP -#define SPROUT_ENDIAN_TRAITS_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - class default_big_endian_traits; - template - class default_big_endian_traits< - T, - typename std::enable_if::value && sizeof(T) == 1>::type - > { - public: - typedef T type; - public: - static SPROUT_CONSTEXPR std::size_t - size() { - return sizeof(type); - } - static SPROUT_CONSTEXPR unsigned char - get_byte(type const& t, std::size_t) { - return static_cast(t); - } - static SPROUT_CXX14_CONSTEXPR void - set_byte(type& t, std::size_t, unsigned char value) { - t = static_cast(value); - } - }; - template - class default_big_endian_traits< - T, - typename std::enable_if::value && !(sizeof(T) == 1)>::type - > { - public: - typedef T type; - public: - static SPROUT_CONSTEXPR std::size_t - size() { - return sizeof(type); - } - static SPROUT_CONSTEXPR unsigned char - get_byte(type const& t, std::size_t i) { - return static_cast( - (t & (UCHAR_MAX << CHAR_BIT * ((size() - 1) - i))) - >> CHAR_BIT * ((size() - 1) - i) - ); - } - static SPROUT_CXX14_CONSTEXPR void - set_byte(type& t, std::size_t i, unsigned char value) { - t &= ~(UCHAR_MAX << CHAR_BIT * ((size() - 1) - i)); - t |= (value << CHAR_BIT * ((size() - 1) - i)); - } - }; - - template - class default_little_endian_traits; - template - class default_little_endian_traits< - T, - typename std::enable_if::value && sizeof(T) == 1>::type - > { - public: - typedef T type; - public: - static SPROUT_CONSTEXPR std::size_t size() { - return sizeof(type); - } - static SPROUT_CONSTEXPR unsigned char get_byte(type const& t, std::size_t) { - return static_cast(t); - } - static SPROUT_CXX14_CONSTEXPR void - set_byte(type& t, std::size_t, unsigned char value) { - t = static_cast(value); - } - }; - template - class default_little_endian_traits< - T, - typename std::enable_if::value && !(sizeof(T) == 1)>::type - > { - public: - typedef T type; - public: - static SPROUT_CONSTEXPR std::size_t size() { - return sizeof(type); - } - static SPROUT_CONSTEXPR unsigned char get_byte(type const& t, std::size_t i) { - return static_cast( - (t & (UCHAR_MAX << CHAR_BIT * i)) - >> CHAR_BIT * i - ); - } - static SPROUT_CXX14_CONSTEXPR void - set_byte(type& t, std::size_t i, unsigned char value) { - t &= ~(UCHAR_MAX << CHAR_BIT * i); - t |= (value << CHAR_BIT * i); - } - }; - } // namespace detail - - // - // big_endian_traits - // - template - class big_endian_traits - : public sprout::detail::default_big_endian_traits - {}; - - // - // little_endian_traits - // - template - class little_endian_traits - : public sprout::detail::default_little_endian_traits - {}; - - // - // endian_traits - // - template - class endian_traits - : public sprout::big_endian_traits - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_ENDIAN_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/forward_clist.hpp b/dsp/lib/sprout/sprout/forward_clist.hpp deleted file mode 100644 index d4ae477..0000000 --- a/dsp/lib/sprout/sprout/forward_clist.hpp +++ /dev/null @@ -1,522 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FORWARD_CLIST_HPP -#define SPROUT_FORWARD_CLIST_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // forward_clist - // - template - class forward_clist; - - namespace detail { - template - class forward_item_iterator - : public sprout::iterator< - std::forward_iterator_tag, - typename List::value_type, - typename List::difference_type, - typename std::conditional< - std::is_const::type>::value, - typename List::const_pointer, - typename List::pointer - >::type, - typename std::conditional< - std::is_const::type>::value, - typename List::const_reference, - typename List::reference - >::type - > - { - template - friend class sprout::forward_clist; - template - friend class sprout::detail::forward_item_iterator; - public: - typedef List list_type; - typedef typename std::conditional< - std::is_reference::value, - typename std::remove_reference::type const&, - typename std::remove_reference::type const - >::type const_list_type; - private: - typedef sprout::iterator< - std::forward_iterator_tag, - typename List::value_type, - typename List::difference_type, - typename std::conditional< - std::is_const::type>::value, - typename List::const_pointer, - typename List::pointer - >::type, - typename std::conditional< - std::is_const::type>::value, - typename List::const_reference, - typename List::reference - >::type - > base_type; - typedef typename std::remove_reference::type::item_holder_type item_holder_type; - public: - typedef typename base_type::iterator_category iterator_category; - typedef typename base_type::value_type value_type; - typedef typename base_type::difference_type difference_type; - typedef typename base_type::pointer pointer; - typedef typename base_type::reference reference; - private: - item_holder_type item; - private: - explicit SPROUT_CONSTEXPR forward_item_iterator(item_holder_type const& p) - : item(p) - {} - public: - SPROUT_CONSTEXPR forward_item_iterator() - : item() - {} - forward_item_iterator(forward_item_iterator const&) = default; - SPROUT_CONSTEXPR operator forward_item_iterator() const { - return forward_item_iterator(item); - } - SPROUT_CONSTEXPR forward_item_iterator next() const { - return forward_item_iterator(item->next); - } - SPROUT_CXX14_CONSTEXPR void swap(forward_item_iterator& other) - SPROUT_NOEXCEPT_IF_EXPR(sprout::swap(item, other.item)) - { - sprout::swap(item, other.item); - } - SPROUT_CONSTEXPR reference operator*() const { - return item->get(); - } - SPROUT_CONSTEXPR pointer operator->() const { - return item->get_pointer(); - } - SPROUT_CXX14_CONSTEXPR forward_item_iterator& operator++() { - forward_item_iterator temp(next()); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR forward_item_iterator operator++(int) { - forward_item_iterator result(*this); - ++*this; - return result; - } - SPROUT_CONSTEXPR bool is_initialized() const SPROUT_NOEXCEPT { - return item.is_initialized(); - } - }; - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_same::type, typename std::decay::type>::value, - bool - >::type - operator==(sprout::detail::forward_item_iterator const& lhs, sprout::detail::forward_item_iterator const& rhs) { - return !lhs.is_initialized() ? !rhs.is_initialized() - : rhs.is_initialized() && sprout::addressof(*lhs) == sprout::addressof(*rhs) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_same::type, typename std::decay::type>::value, - bool - >::type - operator!=(sprout::detail::forward_item_iterator const& lhs, sprout::detail::forward_item_iterator const& rhs) { - return !(lhs == rhs); - } - - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::detail::forward_item_iterator& lhs, sprout::detail::forward_item_iterator& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - template - inline SPROUT_CONSTEXPR sprout::detail::forward_item_iterator - iterator_next(sprout::detail::forward_item_iterator const& it) { - return it.next(); - } - } // namespace detail - - // - // forward_clist - // - template - class forward_clist { - template - friend class sprout::detail::forward_item_iterator; - public: - // types: - typedef T value_type; - typedef value_type& reference; - typedef value_type const& const_reference; - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - typedef value_type* pointer; - typedef value_type const* const_pointer; - typedef sprout::detail::forward_item_iterator iterator; - typedef sprout::detail::forward_item_iterator const_iterator; - public: - class item; - private: - typedef sprout::value_holder item_holder_type; - public: - // - // item - // - class item { - friend class forward_clist; - template - friend class sprout::detail::forward_item_iterator; - private: - typedef sprout::value_holder holder_type; - typedef sprout::value_holder item_holder_type; - public: - typedef typename holder_type::value_type value_type; - typedef typename holder_type::lvalue_reference lvalue_reference; - typedef typename holder_type::rvalue_reference rvalue_reference; - typedef typename holder_type::reference reference; - typedef typename holder_type::const_lvalue_reference const_lvalue_reference; - typedef typename holder_type::const_rvalue_reference const_rvalue_reference; - typedef typename holder_type::const_reference const_reference; - typedef typename holder_type::pointer pointer; - typedef typename holder_type::const_pointer const_pointer; - typedef typename holder_type::lvalue_reference_type lvalue_reference_type; - typedef typename holder_type::rvalue_reference_type rvalue_reference_type; - typedef typename holder_type::reference_type reference_type; - typedef typename holder_type::reference_const_type reference_const_type; - typedef typename holder_type::pointer_type pointer_type; - typedef typename holder_type::pointer_const_type pointer_const_type; - public: - static SPROUT_CONSTEXPR reference_type get(item& t) SPROUT_NOEXCEPT { - return sprout::get(t.val); - } - static SPROUT_CONSTEXPR rvalue_reference_type get(item&& t) SPROUT_NOEXCEPT { - return static_cast(get(t)); - } - static SPROUT_CONSTEXPR reference_const_type get(item const& t) SPROUT_NOEXCEPT { - return sprout::get(t.val); - } - static SPROUT_CONSTEXPR pointer_type get_pointer(item& t) SPROUT_NOEXCEPT { - return sprout::get_pointer(t.val); - } - static SPROUT_CONSTEXPR pointer_type get_pointer(item&& t) SPROUT_NOEXCEPT { - return get_pointer(t); - } - static SPROUT_CONSTEXPR pointer_const_type get_pointer(item const& t) SPROUT_NOEXCEPT { - return sprout::get_pointer(t.val); - } - private: - holder_type val; - item_holder_type next; - private: - item& operator=(item const&) SPROUT_DELETED_FUNCTION_DECL - item& operator=(item&&) SPROUT_DELETED_FUNCTION_DECL - private: - SPROUT_CONSTEXPR item(typename holder_type::argument_type p, item_holder_type const& n) - : val(p) - , next(n) - {} - SPROUT_CONSTEXPR item(typename holder_type::movable_argument_type p, item_holder_type const& n) - : val(sprout::move(p)) - , next(n) - {} - - SPROUT_CXX14_CONSTEXPR void swap(item& other) - SPROUT_NOEXCEPT_IF( - SPROUT_NOEXCEPT_EXPR(sprout::swap(val, other.val)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(next, other.next)) - ) - { - sprout::swap(val, other.val); - sprout::swap(next, other.next); - } - - SPROUT_CXX14_CONSTEXPR void unlink_all() { - if (next.is_initialized()) { - next->unlink_all(); - { - item_holder_type temp = item_holder_type(); - temp.swap(next); - } - } - } - SPROUT_CXX14_CONSTEXPR void unlink() { - item_holder_type temp = item_holder_type(); - temp.swap(next); - } - public: - SPROUT_CONSTEXPR item() SPROUT_NOEXCEPT - : val(), next() - {} - item(item const&) = default; - SPROUT_CONSTEXPR item(typename holder_type::argument_type p) - : val(p), next() - {} - SPROUT_CONSTEXPR item(typename holder_type::movable_argument_type p) - : val(sprout::move(p)), next() - {} - - SPROUT_CXX14_CONSTEXPR item& operator=(typename holder_type::argument_type p) { - item temp(p, next); - temp.swap(p); - return *this; - } - SPROUT_CXX14_CONSTEXPR item& operator=(typename holder_type::movable_argument_type p) { - item temp(sprout::move(p), next); - temp.swap(p); - return *this; - } - - SPROUT_CXX14_CONSTEXPR pointer_type operator->() { - return get_pointer(); - } - SPROUT_CONSTEXPR pointer_const_type operator->() const { - return get_pointer(); - } - SPROUT_CXX14_CONSTEXPR pointer_type get_pointer() { - return val.get_pointer(); - } - SPROUT_CONSTEXPR pointer_const_type get_pointer() const { - return val.get_pointer(); - } - SPROUT_CXX14_CONSTEXPR reference_type operator*() { - return get(); - } - SPROUT_CONSTEXPR reference_const_type operator*() const { - return get(); - } - SPROUT_CXX14_CONSTEXPR reference_type get() { - return val.get(); - } - SPROUT_CONSTEXPR reference_const_type get() const { - return val.get(); - } - SPROUT_CONSTEXPR bool is_linked() const { - return next.is_initialized(); - } - }; - private: - item fst; - public: - // construct/copy/destroy: - SPROUT_CONSTEXPR forward_clist() - : fst() - {} - template - SPROUT_CXX14_CONSTEXPR forward_clist(InputIterator first, InputIterator last) - : fst() - { - item_holder_type* p = sprout::addressof(fst.next); - for (; first != last; ++first) { - *p = *first; - p = sprout::addressof(*p)->next; - } - } - SPROUT_CXX14_CONSTEXPR forward_clist(forward_clist&& x) - : fst(sprout::move(x.fst)) - {} - SPROUT_CXX14_CONSTEXPR forward_clist& operator=(forward_clist&& x) { - fst = sprout::move(x.fst); - return *this; - } - template - SPROUT_CXX14_CONSTEXPR void assign(InputIterator first, InputIterator last) { - forward_clist temp(first, last); - temp.swap(*this); - temp.clear(); - } - // iterators: - SPROUT_CXX14_CONSTEXPR iterator before_begin() SPROUT_NOEXCEPT { - return iterator(item_holder_type(fst)); - } - SPROUT_CONSTEXPR const_iterator before_begin() const SPROUT_NOEXCEPT { - return const_iterator(item_holder_type(fst)); - } - SPROUT_CXX14_CONSTEXPR iterator begin() SPROUT_NOEXCEPT { - return iterator(fst.next); - } - SPROUT_CONSTEXPR const_iterator begin() const SPROUT_NOEXCEPT { - return const_iterator(fst.next); - } - SPROUT_CXX14_CONSTEXPR iterator end() SPROUT_NOEXCEPT { - return iterator(); - } - SPROUT_CONSTEXPR const_iterator end() const SPROUT_NOEXCEPT { - return const_iterator(); - } - SPROUT_CONSTEXPR const_iterator cbegin() const SPROUT_NOEXCEPT { - return const_iterator(fst.next); - } - SPROUT_CONSTEXPR const_iterator cbefore_begin() const SPROUT_NOEXCEPT{ - return const_iterator(fst.next); - } - SPROUT_CONSTEXPR const_iterator cend() const SPROUT_NOEXCEPT { - return const_iterator(); - } - // capacity: - SPROUT_CONSTEXPR bool empty() const SPROUT_NOEXCEPT { - return !!fst.next; - } - SPROUT_CONSTEXPR size_type max_size() const SPROUT_NOEXCEPT { - return sprout::numeric_limits::max(); - } - // element access: - SPROUT_CXX14_CONSTEXPR reference front() { - return fst.next->get(); - } - SPROUT_CONSTEXPR const_reference front() const { - return fst.next->get(); - } - // modifiers: - SPROUT_CXX14_CONSTEXPR void push_front(item& x) { - item_holder_type nxt(x); - nxt->next = fst.next; - fst.next = nxt; - } - template - SPROUT_CXX14_CONSTEXPR void push_front(InputIterator first, InputIterator last) { - item_holder_type nxt(fst.next); - item_holder_type* p = sprout::addressof(fst.next); - for (; first != last; ++first) { - *p = *first; - p = sprout::addressof(*p)->next; - } - *p = nxt; - } - SPROUT_CXX14_CONSTEXPR void pop_front() { - item_holder_type nxt(fst.next); - fst.next = fst.next->next; - nxt->unlink(); - } - - SPROUT_CXX14_CONSTEXPR iterator insert_after(const_iterator position, item& x) { - item_holder_type nxt(x); - nxt->next = position.item->next; - position.item->next = nxt; - return iterator(nxt); - } - template - SPROUT_CXX14_CONSTEXPR iterator insert_after(const_iterator position, InputIterator first, InputIterator last) { - item_holder_type nxt(position.item->next); - item_holder_type pos(position.item); - item_holder_type* p = sprout::addressof(pos); - for (; first != last; ++first) { - (*p)->next = *first; - p = sprout::addressof(*p)->next; - } - (*p)->next = nxt; - return iterator(*p); - } - - SPROUT_CXX14_CONSTEXPR iterator erase_after(const_iterator position) { - const_iterator first(position.next()); - position.item->next = first.item->next; - first.item->unlink(); - return iterator(position.item->next); - } - SPROUT_CXX14_CONSTEXPR iterator erase_after(const_iterator position, const_iterator last) { - const_iterator first(position.next()); - position.item->next = last.item; - while (first != last) { - const_iterator nxt(first.next()); - first.item->unlink(); - first = nxt; - } - return iterator(last.item); - } - - SPROUT_CXX14_CONSTEXPR void swap(forward_clist& other) { - sprout::swap(fst, other.fst); - } - SPROUT_CXX14_CONSTEXPR void clear() SPROUT_NOEXCEPT { - fst.unlink_all(); - } - - SPROUT_CXX14_CONSTEXPR void unlink(item& x) { - for (iterator first = before_begin(), last = end(); first != last; ++first) { - iterator nxt = first.next(); - if (nxt.item.get_pointer() == sprout::addressof(x)) { - first.item->next = sprout::move(nxt.item->next); - nxt.item->unlink(); - break; - } - } - } - template - SPROUT_CXX14_CONSTEXPR void unlink(InputIterator first, InputIterator last) { - for (; first != last; ++first) { - unlink(*first); - } - } - }; - - // - // get - // - template - inline SPROUT_CONSTEXPR typename sprout::forward_clist::item::reference_type - get(typename sprout::forward_clist::item& x) { - return sprout::forward_clist::item::get(x); - } - template - inline SPROUT_CONSTEXPR typename sprout::forward_clist::item::rvalue_reference - get(typename sprout::forward_clist::item&& x) { - return sprout::forward_clist::item::get(sprout::move(x)); - } - template - inline SPROUT_CONSTEXPR typename sprout::forward_clist::item::reference_const_type - get(typename sprout::forward_clist::item const& x) { - return sprout::forward_clist::item::get(x); - } - template - inline SPROUT_CONSTEXPR typename sprout::forward_clist::item::pointer_type - get(typename sprout::forward_clist::item* x) { - return sprout::forward_clist::item::get_pointer(*x); - } - template - inline SPROUT_CONSTEXPR typename sprout::forward_clist::item::pointer_const_type - get(typename sprout::forward_clist::item const* x) { - return sprout::forward_clist::item::get_pointer(*x); - } - - // - // get_pointer - // - template - inline SPROUT_CONSTEXPR typename sprout::forward_clist::item::pointer_type - get_pointer(typename sprout::forward_clist::item& x) { - return sprout::forward_clist::item::get_pointer(x); - } - template - inline SPROUT_CONSTEXPR typename sprout::forward_clist::item::pointer_type - get_pointer(typename sprout::forward_clist::item&& x) { - return sprout::forward_clist::item::get_pointer(sprout::move(x)); - } - template - inline SPROUT_CONSTEXPR typename sprout::forward_clist::item::pointer_const_type - get_pointer(typename sprout::forward_clist::item const& x) { - return sprout::forward_clist::item::get_pointer(x); - } -} // namespace sprout - -#endif // #ifndef SPROUT_FORWARD_CLIST_HPP diff --git a/dsp/lib/sprout/sprout/functional.hpp b/dsp/lib/sprout/sprout/functional.hpp deleted file mode 100644 index 8150d68..0000000 --- a/dsp/lib/sprout/sprout/functional.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_HPP -#define SPROUT_FUNCTIONAL_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_HPP diff --git a/dsp/lib/sprout/sprout/functional/adaptor.hpp b/dsp/lib/sprout/sprout/functional/adaptor.hpp deleted file mode 100644 index 70076db..0000000 --- a/dsp/lib/sprout/sprout/functional/adaptor.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_ADAPTOR_HPP -#define SPROUT_FUNCTIONAL_ADAPTOR_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_ADAPTOR_HPP diff --git a/dsp/lib/sprout/sprout/functional/address_of.hpp b/dsp/lib/sprout/sprout/functional/address_of.hpp deleted file mode 100644 index cc3ffd6..0000000 --- a/dsp/lib/sprout/sprout/functional/address_of.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_ADDRESS_OF_HPP -#define SPROUT_FUNCTIONAL_ADDRESS_OF_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // address_of - // - template - struct address_of; - template<> - struct address_of - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(&std::declval()) - operator()(T&& x) - const SPROUT_NOEXCEPT_IF_EXPR(&std::declval()) - { - return &SPROUT_FORWARD(T, x); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_ADDRESS_OF_HPP diff --git a/dsp/lib/sprout/sprout/functional/arithmetic.hpp b/dsp/lib/sprout/sprout/functional/arithmetic.hpp deleted file mode 100644 index bd07289..0000000 --- a/dsp/lib/sprout/sprout/functional/arithmetic.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_ARITHMETIC_HPP -#define SPROUT_FUNCTIONAL_ARITHMETIC_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_ARITHMETIC_HPP diff --git a/dsp/lib/sprout/sprout/functional/assign.hpp b/dsp/lib/sprout/sprout/functional/assign.hpp deleted file mode 100644 index 476ab41..0000000 --- a/dsp/lib/sprout/sprout/functional/assign.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_ASSIGN_HPP -#define SPROUT_FUNCTIONAL_ASSIGN_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // assign - // - template - struct assign; - template<> - struct assign - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval() = std::declval()) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval() = std::declval()) - { - return SPROUT_FORWARD(T, x) = SPROUT_FORWARD(U, y); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/functional/assignment.hpp b/dsp/lib/sprout/sprout/functional/assignment.hpp deleted file mode 100644 index c2515c2..0000000 --- a/dsp/lib/sprout/sprout/functional/assignment.hpp +++ /dev/null @@ -1,24 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_ASSIGNMENT_HPP -#define SPROUT_FUNCTIONAL_ASSIGNMENT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_ASSIGNMENT_HPP diff --git a/dsp/lib/sprout/sprout/functional/base.hpp b/dsp/lib/sprout/sprout/functional/base.hpp deleted file mode 100644 index 598622c..0000000 --- a/dsp/lib/sprout/sprout/functional/base.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_BASE_HPP -#define SPROUT_FUNCTIONAL_BASE_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_BASE_HPP diff --git a/dsp/lib/sprout/sprout/functional/binary_function.hpp b/dsp/lib/sprout/sprout/functional/binary_function.hpp deleted file mode 100644 index 3a8fe8c..0000000 --- a/dsp/lib/sprout/sprout/functional/binary_function.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_BINARY_FUNCTION_HPP -#define SPROUT_FUNCTIONAL_BINARY_FUNCTION_HPP - -#include - -namespace sprout { - // - // binary_function - // - template - struct binary_function { - public: - typedef Arg1 first_argument_type; - typedef Arg2 second_argument_type; - typedef Result result_type; - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_BINARY_FUNCTION_HPP diff --git a/dsp/lib/sprout/sprout/functional/bind.hpp b/dsp/lib/sprout/sprout/functional/bind.hpp deleted file mode 100644 index 1c3f7d1..0000000 --- a/dsp/lib/sprout/sprout/functional/bind.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_BIND_HPP -#define SPROUT_FUNCTIONAL_BIND_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_BIND_HPP diff --git a/dsp/lib/sprout/sprout/functional/bind/bind.hpp b/dsp/lib/sprout/sprout/functional/bind/bind.hpp deleted file mode 100644 index 35bcbbd..0000000 --- a/dsp/lib/sprout/sprout/functional/bind/bind.hpp +++ /dev/null @@ -1,1036 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_BIND_BIND_HPP -#define SPROUT_FUNCTIONAL_BIND_BIND_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // 20.8.9 bind - - // - // is_bind_expression - // - template - struct is_bind_expression - : public sprout::false_type - {}; - template - struct is_bind_expression - : public sprout::is_bind_expression - {}; - template - struct is_bind_expression - : public sprout::is_bind_expression - {}; - template - struct is_bind_expression - : public sprout::is_bind_expression - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_bind_expression_v = sprout::is_bind_expression::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - - namespace detail { - struct no_tuple_element; - - template - struct safe_tuple_element_impl - : tuple_element - {}; - template - struct safe_tuple_element_impl { - public: - typedef sprout::detail::no_tuple_element type; - }; - template - struct safe_tuple_element - : public sprout::detail::safe_tuple_element_impl::value)> - {}; - - template< - typename Arg, - bool IsBindExp = sprout::is_bind_expression::value, - bool IsPlaceholder = (sprout::is_placeholder::value > 0) - > - class mu; - template - class mu, false, false> { - public: - typedef T& result_type; - public: - template - SPROUT_CONSTEXPR result_type operator()(CVRef& arg, Tuple&) const volatile { - return const_cast::type>::type&>(arg).get(); - } - }; - template - class mu, false, false> { - public: - typedef T& result_type; - public: - template - SPROUT_CONSTEXPR result_type operator()(CVRef& arg, Tuple&) const volatile { - return const_cast::type>::type&>(arg).get(); - } - }; - template - class mu { - private: - template - SPROUT_CONSTEXPR auto call( - CVArg& arg, - sprout::tuples::tuple& tuple, - sprout::index_tuple - ) const volatile - -> decltype(arg(std::declval()...)) - { - return arg(SPROUT_FORWARD(Args, sprout::tuples::get(tuple))...); - } - public: - template - SPROUT_CONSTEXPR auto operator()(CVArg& arg, sprout::tuples::tuple& tuple) const volatile - -> decltype(arg(std::declval()...)) - { - return call(arg, tuple, sprout::index_pack::make()); - } - }; - template - class mu { - public: - template - class result; - template - class result { - private: - typedef typename sprout::detail::safe_tuple_element< - (sprout::is_placeholder::value - 1), - Tuple - >::type base_type; - public: - typedef typename std::add_rvalue_reference::type type; - }; - public: - template - typename result::type - SPROUT_CONSTEXPR operator()(Arg /*const volatile&*/, Tuple& tuple) const volatile { - typedef typename result::type type; - return SPROUT_FORWARD(type, sprout::tuples::get<(sprout::is_placeholder::value - 1)>(tuple)); - } - }; - template - class mu { - public: - template - struct result; - template - struct result { - public: - typedef typename std::add_lvalue_reference::type type; - }; - public: - template - SPROUT_CONSTEXPR CVArg&& operator()(CVArg&& arg, Tuple&) const volatile { - return SPROUT_FORWARD(CVArg, arg); - } - }; - - template - struct maybe_wrap_member_pointer { - public: - typedef T type; - public: - static SPROUT_CONSTEXPR T const& do_wrap(T const& x) { - return x; - } - static SPROUT_CONSTEXPR T&& do_wrap(T&& x) { - return static_cast(x); - } - }; - template - struct maybe_wrap_member_pointer { - public: - typedef sprout::mem_fn_adaptor type; - public: - static SPROUT_CONSTEXPR type do_wrap(T Class::* pm) { - return type(pm); - } - }; - template<> - struct maybe_wrap_member_pointer { - public: - typedef void type; - }; - - template - inline SPROUT_CONSTEXPR auto volget(sprout::tuples::tuple volatile& tuple) - -> typename sprout::tuples::tuple_element >::type volatile& - { - return sprout::tuples::get(const_cast&>(tuple)); - } - template - inline SPROUT_CONSTEXPR auto volget(sprout::tuples::tuple const volatile& tuple) - -> typename sprout::tuples::tuple_element >::type const volatile& - { - return sprout::tuples::get(const_cast const&>(tuple)); - } - - struct is_variadic_placeholder_pred { - public: - template - struct apply - : public sprout::bool_constant< - (sprout::is_variadic_placeholder::value > 0) - > - {}; - }; - template - struct is_variadic_bounds - : public sprout::bool_constant< - sprout::types::contains_if::value - > - {}; - - template - struct tail_place - : public sprout::integral_constant::value - 1> - {}; - - template - struct bound_size - : public sprout::integral_constant - {}; - template - struct bound_size< - T, ArgSize, - typename std::enable_if<(sprout::is_variadic_placeholder::value > 0)>::type - > - : public sprout::integral_constant< - std::size_t, - (ArgSize - sprout::detail::tail_place::value) - > - {}; - - template - struct bounds_size_impl - : public sprout::integral_constant - {}; - template - struct bounds_size_impl< - I, Bounds, ArgSize, - typename std::enable_if<(I < sprout::tuples::tuple_size::value)>::type - > - : public sprout::integral_constant< - std::size_t, - (sprout::detail::bound_size::type, ArgSize>::value - + sprout::detail::bounds_size_impl::value - ) - > - {}; - template - struct bounds_size - : public sprout::detail::bounds_size_impl<0, Bounds, ArgSize> - {}; - - template - struct bounds_partial_size_impl { - public: - typedef Seq type; - }; - template - struct bounds_partial_size_impl< - I, Bounds, ArgSize, Current, sprout::types::integral_array, - typename std::enable_if<(I < sprout::tuples::tuple_size::value)>::type - > - : public sprout::detail::bounds_partial_size_impl< - I + 1, Bounds, ArgSize, - Current + sprout::detail::bound_size::type, ArgSize>::value, - sprout::types::integral_array - > - {}; - template - struct bounds_partial_size - : public sprout::detail::bounds_partial_size_impl<0, Bounds, ArgSize, 0, sprout::types::integral_array > - {}; - - template - struct bound_indexes - : public sprout::make_index_tuple::value> - {}; - - template - struct bound_position - : public sprout::integral_constant< - sprout::index_t, - (sprout::types::lower_bound_index< - typename sprout::detail::bounds_partial_size::type, - sprout::integral_constant - >::type::value - 1 - ) - > - {}; - - template - struct is_variadic_part - : public sprout::bool_constant< - (sprout::is_variadic_placeholder< - typename sprout::tuples::tuple_element< - sprout::detail::bound_position::value, - Bounds - >::type - >::value > 0 - ) - > - {}; - - template - struct bound_element_impl - : public sprout::tuples::tuple_element - {}; - template - struct bound_element_impl< - I, Bounds, ArgSize, BoundPos, SizeSeq, - typename std::enable_if::value>::type - > { - public: - typedef sprout::placeholder< - (I + 1 - - sprout::tuples::tuple_element::type::value - + sprout::detail::tail_place::type>::value - ) - > type; - }; - template - struct bound_element - : public sprout::detail::bound_element_impl< - I, Bounds, ArgSize, sprout::detail::bound_position::value, - typename sprout::detail::bounds_partial_size::type - > - {}; - - struct get_bound_helper { - public: - template< - sprout::index_t I, typename Bounds, - typename sprout::enabler_if::value && !std::is_volatile::value>::type = sprout::enabler - > - static SPROUT_CONSTEXPR auto - get_bound(Bounds& bound_args) - -> decltype(sprout::tuples::get(bound_args)) - { - return sprout::tuples::get(bound_args); - } - template< - sprout::index_t I, typename Bounds, - typename sprout::enabler_if::value && !std::is_volatile::value>::type = sprout::enabler - > - static SPROUT_CONSTEXPR auto - get_bound(Bounds const& bound_args) - -> decltype(sprout::tuples::get(bound_args)) - { - return sprout::tuples::get(bound_args); - } - template< - sprout::index_t I, typename Bounds, - typename sprout::enabler_if::value && std::is_volatile::value>::type = sprout::enabler - > - static SPROUT_CONSTEXPR auto - get_bound(Bounds volatile& bound_args) - -> decltype(sprout::detail::volget(bound_args)) - { - return sprout::detail::volget(bound_args); - } - template< - sprout::index_t I, typename Bounds, - typename sprout::enabler_if::value && std::is_volatile::value>::type = sprout::enabler - > - static SPROUT_CONSTEXPR auto - get_bound(Bounds const volatile& bound_args) - -> decltype(sprout::detail::volget(bound_args)) - { - return sprout::detail::volget(bound_args); - } - }; - template< - sprout::index_t I, std::size_t ArgSize, typename Bounds, - typename sprout::enabler_if::type, ArgSize>::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::detail::bound_element::type, ArgSize>::type - get_bound(Bounds&&) { - typedef typename sprout::detail::bound_element::type, ArgSize>::type type; - return type(); - } - template< - sprout::index_t I, std::size_t ArgSize, typename Bounds, - typename sprout::enabler_if::type, ArgSize>::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR auto - get_bound(Bounds&& bound_args) - -> decltype( - sprout::detail::get_bound_helper::get_bound< - sprout::detail::bound_position::type, ArgSize>::value - >(SPROUT_FORWARD(Bounds, bound_args)) - ) - { - return sprout::detail::get_bound_helper::get_bound< - sprout::detail::bound_position::type, ArgSize>::value - >(SPROUT_FORWARD(Bounds, bound_args)); - } - } // namespace detail - - namespace detail { - template - class binder_impl; - template - class binder_impl - : public sprout::weak_result_type - { - protected: - typedef sprout::tuples::tuple bounds_type; - private: - Functor f_; - bounds_type bound_args_; - protected: - template - Result call(sprout::tuples::tuple&& args, sprout::index_tuple) { - return f_( - sprout::detail::mu::type>() - (sprout::detail::get_bound(bound_args_), args)... - ); - } - template - SPROUT_CONSTEXPR Result call_c(sprout::tuples::tuple&& args, sprout::index_tuple) const { - return f_( - sprout::detail::mu::type const>() - (sprout::detail::get_bound(bound_args_), args)... - ); - } - template - Result call_v(sprout::tuples::tuple&& args, sprout::index_tuple) volatile { - return f_( - sprout::detail::mu::type volatile>() - (sprout::detail::get_bound(bound_args_), args)... - ); - } - template - SPROUT_CONSTEXPR Result call_cv(sprout::tuples::tuple&& args, sprout::index_tuple) const volatile { - return f_( - sprout::detail::mu::type const volatile>() - (sprout::detail::get_bound(bound_args_), args)... - ); - } - public: - template< - typename... Args, sprout::index_t... Indexes - > - static decltype( - std::declval()( - sprout::detail::mu::type>() - (sprout::detail::get_bound(std::declval()), std::declval&>())... - ) - ) - call_(sprout::tuples::tuple&& args, sprout::index_tuple); - template< - typename... Args, sprout::index_t... Indexes - > - static decltype( - std::declval= 0), typename std::add_const::type>::type&>()( - sprout::detail::mu::type const>() - (sprout::detail::get_bound(std::declval()), std::declval&>())... - ) - ) - call_c_(sprout::tuples::tuple&& args, sprout::index_tuple); - template< - typename... Args, sprout::index_t... Indexes - > - static decltype( - std::declval= 0), typename std::add_volatile::type>::type&>()( - sprout::detail::mu::type volatile>() - (sprout::detail::get_bound(std::declval()), std::declval&>())... - ) - ) - call_v_(sprout::tuples::tuple&& args, sprout::index_tuple); - template< - typename... Args, sprout::index_t... Indexes - > - static decltype( - std::declval= 0), typename std::add_cv::type>::type&>()( - sprout::detail::mu::type const volatile>() - (sprout::detail::get_bound(std::declval()), std::declval&>())... - ) - ) - call_cv_(sprout::tuples::tuple&& args, sprout::index_tuple); - public: - template - explicit SPROUT_CONSTEXPR binder_impl(Functor const& f, Args&&... args) - : f_(f) - , bound_args_(SPROUT_FORWARD(Args, args)...) - {} - binder_impl(binder_impl const&) = default; - }; - } // namespace detail - // - // binder - // - template - class binder; - template - class binder - : private sprout::detail::binder_impl - { - private: - typedef sprout::detail::binder_impl impl_type; - typedef typename impl_type::bounds_type bounds_type; - public: - template - explicit SPROUT_CONSTEXPR binder(Functor const& f, Args&&... args) - : impl_type(f, SPROUT_FORWARD(Args, args)...) - {} - binder(binder const&) = default; - template< - typename... Args, - typename Result = typename sprout::identity >(), sprout::detail::bound_indexes::make()) - )>::type - > - Result operator()(Args&&... args) { - return impl_type::template call( - sprout::tuples::forward_as_tuple(SPROUT_FORWARD(Args, args)...), - sprout::detail::bound_indexes::make() - ); - } - template< - typename... Args, - typename Result = typename sprout::identity >(), sprout::detail::bound_indexes::make()) - )>::type - > - SPROUT_CONSTEXPR Result operator()(Args&&... args) const { - return impl_type::template call_c( - sprout::tuples::forward_as_tuple(SPROUT_FORWARD(Args, args)...), - sprout::detail::bound_indexes::make() - ); - } - template< - typename... Args, - typename Result = typename sprout::identity >(), sprout::detail::bound_indexes::make()) - )>::type - > - Result operator()(Args&&... args) volatile { - return impl_type::template call_v( - sprout::tuples::forward_as_tuple(SPROUT_FORWARD(Args, args)...), - sprout::detail::bound_indexes::make() - ); - } - template< - typename... Args, - typename Result = typename sprout::identity >(), sprout::detail::bound_indexes::make()) - )>::type - > - SPROUT_CONSTEXPR Result operator()(Args&&... args) const volatile { - return impl_type::template call_cv( - sprout::tuples::forward_as_tuple(SPROUT_FORWARD(Args, args)...), - sprout::detail::bound_indexes::make() - ); - } - }; - // - // cbinder - // - template - class cbinder; - template - class cbinder - : private sprout::detail::binder_impl - { - private: - typedef sprout::detail::binder_impl impl_type; - typedef typename impl_type::bounds_type bounds_type; - public: - template - explicit SPROUT_CONSTEXPR cbinder(Functor const& f, Args&&... args) - : impl_type(f, SPROUT_FORWARD(Args, args)...) - {} - cbinder(cbinder const&) = default; - template< - typename... Args, - typename Result = typename sprout::identity >(), sprout::detail::bound_indexes::make()) - )>::type - > - SPROUT_CONSTEXPR Result operator()(Args&&... args) const { - return impl_type::template call_c( - sprout::tuples::forward_as_tuple(SPROUT_FORWARD(Args, args)...), - sprout::detail::bound_indexes::make() - ); - } - template< - typename... Args, - typename Result = typename sprout::identity >(), sprout::detail::bound_indexes::make()) - )>::type - > - SPROUT_CONSTEXPR Result operator()(Args&&... args) const volatile { - return impl_type::template call_cv( - sprout::tuples::forward_as_tuple(SPROUT_FORWARD(Args, args)...), - sprout::detail::bound_indexes::make() - ); - } - }; - - namespace detail { - template - class res_binder_impl; - template - class res_binder_impl { - public: - typedef Result result_type; - protected: - typedef sprout::tuples::tuple bounds_type; - private: - template - struct enable_if_void - : public std::enable_if::value, int> - {}; - template - struct disable_if_void - : public std::enable_if::value, int> - {}; - private: - Functor f_; - sprout::tuples::tuple bound_args_; - protected: - template - Result call( - sprout::tuples::tuple&& args, - sprout::index_tuple, - typename disable_if_void::type = 0 - ) - { - return f_(sprout::detail::mu()(sprout::detail::get_bound(bound_args_), args)...); - } - template - Result call( - sprout::tuples::tuple&& args, - sprout::index_tuple, - typename enable_if_void::type = 0 - ) - { - f_(sprout::detail::mu()(sprout::detail::get_bound(bound_args_), args)...); - } - template - SPROUT_CONSTEXPR Result call( - sprout::tuples::tuple&& args, - sprout::index_tuple, - typename disable_if_void::type = 0 - ) const - { - return f_(sprout::detail::mu()(sprout::detail::get_bound(bound_args_), args)...); - } - template - Result call( - sprout::tuples::tuple&& args, - sprout::index_tuple, - typename enable_if_void::type = 0 - ) const - { - f_(sprout::detail::mu()(sprout::detail::get_bound(bound_args_), args)...); - } - template - Result call( - sprout::tuples::tuple&& args, - sprout::index_tuple, - typename disable_if_void::type = 0 - ) volatile - { - return f_(sprout::detail::mu()(sprout::detail::get_bound(bound_args_), args)...); - } - template - Result call( - sprout::tuples::tuple&& args, - sprout::index_tuple, - typename enable_if_void::type = 0 - ) volatile - { - f_(sprout::detail::mu()(sprout::detail::get_bound(bound_args_), args)...); - } - template - SPROUT_CONSTEXPR Result call( - sprout::tuples::tuple&& args, - sprout::index_tuple, - typename disable_if_void::type = 0 - ) const volatile - { - return f_(sprout::detail::mu()(sprout::detail::get_bound(bound_args_), args)...); - } - template - Result call( - sprout::tuples::tuple&& args, - sprout::index_tuple, - typename enable_if_void::type = 0 - ) const volatile - { - f_(sprout::detail::mu()(sprout::detail::get_bound(bound_args_), args)...); - } - public: - template - explicit SPROUT_CONSTEXPR res_binder_impl(Functor const& f, Args&&... args) - : f_(f) - , bound_args_(SPROUT_FORWARD(Args, args)...) - {} - res_binder_impl(res_binder_impl const&) = default; - }; - } // namespace detail - // - // res_binder - // - template - class res_binder; - template - class res_binder - : private sprout::detail::res_binder_impl - { - public: - typedef Result result_type; - private: - typedef sprout::detail::res_binder_impl impl_type; - typedef typename impl_type::bounds_type bounds_type; - public: - template - explicit res_binder(Functor const& f, Args&&... args) - : impl_type(f, SPROUT_FORWARD(Args, args)...) - {} - res_binder(res_binder const&) = default; - template - result_type operator()(Args&&... args) { - return impl_type::template call( - sprout::tuples::forward_as_tuple(SPROUT_FORWARD(Args, args)...), - sprout::detail::bound_indexes::make() - ); - } - template - SPROUT_CONSTEXPR result_type operator()(Args&&... args) const { - return impl_type::template call( - sprout::tuples::forward_as_tuple(SPROUT_FORWARD(Args, args)...), - sprout::detail::bound_indexes::make() - ); - } - template - result_type operator()(Args&&... args) volatile { - return impl_type::template call( - sprout::tuples::forward_as_tuple(SPROUT_FORWARD(Args, args)...), - sprout::detail::bound_indexes::make() - ); - } - template - SPROUT_CONSTEXPR result_type operator()(Args&&... args) const volatile { - return impl_type::template call( - sprout::tuples::forward_as_tuple(SPROUT_FORWARD(Args, args)...), - sprout::detail::bound_indexes::make() - ); - } - }; - // - // res_cbinder - // - template - class res_cbinder; - template - class res_cbinder - : private sprout::detail::res_binder_impl - { - public: - typedef Result result_type; - private: - typedef sprout::detail::res_binder_impl impl_type; - typedef typename impl_type::bounds_type bounds_type; - public: - template - explicit SPROUT_CONSTEXPR res_cbinder(Functor const& f, Args&&... args) - : impl_type(f, SPROUT_FORWARD(Args, args)...) - {} - res_cbinder(res_cbinder const&) = default; - template - SPROUT_CONSTEXPR result_type operator()(Args&&... args) const { - return impl_type::template call( - sprout::tuples::forward_as_tuple(SPROUT_FORWARD(Args, args)...), - sprout::detail::bound_indexes::make() - ); - } - template - SPROUT_CONSTEXPR result_type operator()(Args&&... args) const volatile { - return impl_type::template call( - sprout::tuples::forward_as_tuple(SPROUT_FORWARD(Args, args)...), - sprout::detail::bound_indexes::make() - ); - } - }; - - // - // is_bind_expression - // - template - struct is_bind_expression > - : public sprout::true_type - {}; - template - struct is_bind_expression > - : public sprout::true_type - {}; - template - struct is_bind_expression > - : public sprout::true_type - {}; - template - struct is_bind_expression > - : public sprout::true_type - {}; - - namespace detail { - template - struct complete_placeholder { - public: - typedef BoundArg type; - }; - template - struct complete_placeholder< - N, BoundArg, - typename std::enable_if::value>::type - > { - public: - typedef sprout::placeholder type; - }; - - template - struct binder_complete_placeholders_impl { - public: - typedef Binder type; - }; - template - struct binder_complete_placeholders_impl< - I, N, Bounds, sprout::binder, - typename std::enable_if<(I < sprout::tuples::tuple_size::value)>::type - > - : public std::conditional< - sprout::is_positional_placeholder::type>::value, - sprout::detail::binder_complete_placeholders_impl< - I + 1, N + 1, Bounds, - sprout::binder)> - >, - sprout::detail::binder_complete_placeholders_impl< - I + 1, N, Bounds, - sprout::binder::type)> - > - >::type - {}; - template - struct binder_complete_placeholders_impl< - I, N, Bounds, sprout::cbinder, - typename std::enable_if<(I < sprout::tuples::tuple_size::value)>::type - > - : public std::conditional< - sprout::is_positional_placeholder::type>::value, - sprout::detail::binder_complete_placeholders_impl< - I + 1, N + 1, Bounds, - sprout::cbinder)> - >, - sprout::detail::binder_complete_placeholders_impl< - I + 1, N, Bounds, - sprout::cbinder::type)> - > - >::type - {}; - template - struct binder_complete_placeholders; - template - struct binder_complete_placeholders< - false, Func, BoundArgs... - > - : public sprout::detail::binder_complete_placeholders_impl< - 0, 0, sprout::types::type_tuple, sprout::binder - > - {}; - template - struct binder_complete_placeholders< - true, Func, BoundArgs... - > - : public sprout::detail::binder_complete_placeholders_impl< - 0, 0, sprout::types::type_tuple, sprout::cbinder - > - {}; - - template - struct res_binder_complete_placeholders_impl { - public: - typedef Binder type; - }; - template - struct res_binder_complete_placeholders_impl< - I, N, Bounds, sprout::res_binder, - typename std::enable_if<(I < sprout::tuples::tuple_size::value)>::type - > - : public std::conditional< - sprout::is_positional_placeholder::type>::value, - sprout::detail::res_binder_complete_placeholders_impl< - I + 1, N + 1, Bounds, - sprout::res_binder)> - >, - sprout::detail::res_binder_complete_placeholders_impl< - I + 1, N, Bounds, - sprout::res_binder::type)> - > - >::type - {}; - template - struct res_binder_complete_placeholders_impl< - I, N, Bounds, sprout::res_cbinder, - typename std::enable_if<(I < sprout::tuples::tuple_size::value)>::type - > - : public std::conditional< - sprout::is_positional_placeholder::type>::value, - sprout::detail::res_binder_complete_placeholders_impl< - I + 1, N + 1, Bounds, - sprout::res_cbinder)> - >, - sprout::detail::res_binder_complete_placeholders_impl< - I + 1, N, Bounds, - sprout::res_cbinder::type)> - > - >::type - {}; - template - struct res_binder_complete_placeholders; - template - struct res_binder_complete_placeholders< - false, Result, Func, BoundArgs... - > - : public sprout::detail::res_binder_complete_placeholders_impl< - 0, 0, sprout::types::type_tuple, sprout::res_binder - > - {}; - template - struct res_binder_complete_placeholders< - true, Result, Func, BoundArgs... - > - : public sprout::detail::res_binder_complete_placeholders_impl< - 0, 0, sprout::types::type_tuple, sprout::res_cbinder - > - {}; - - template - struct bind_helper { - public: - typedef sprout::detail::maybe_wrap_member_pointer::type> maybe_type; - typedef typename maybe_type::type func_type; - typedef typename sprout::detail::binder_complete_placeholders::type...>::type type; - }; - template - struct res_bind_helper { - public: - typedef sprout::detail::maybe_wrap_member_pointer::type> maybe_type; - typedef typename maybe_type::type functor_type; - typedef typename sprout::detail::res_binder_complete_placeholders::type...>::type type; - }; - } // namespace detail - - // - // bind_result - // cbind_result - // - template - struct bind_result { - public: - typedef typename sprout::detail::bind_helper::type type; - }; - template - struct cbind_result { - public: - typedef typename sprout::detail::bind_helper::type type; - }; - // - // res_bind_result - // res_cbind_result - // - template - struct res_bind_result { - public: - typedef typename sprout::detail::res_bind_helper::type type; - }; - template - struct res_cbind_result { - public: - typedef typename sprout::detail::res_bind_helper::type type; - }; - - // - // bind - // - template - inline SPROUT_CONSTEXPR typename sprout::bind_result::type - bind(F&& f, BoundArgs&&... args) { - typedef sprout::detail::bind_helper helper_type; - typedef typename helper_type::maybe_type maybe_type; - typedef typename helper_type::type result_type; - return result_type(maybe_type::do_wrap(SPROUT_FORWARD(F, f)), SPROUT_FORWARD(BoundArgs, args)...); - } - template - inline SPROUT_CONSTEXPR typename sprout::res_bind_result::type - bind(F&& f, BoundArgs&&... args) { - typedef sprout::detail::res_bind_helper helper_type; - typedef typename helper_type::maybe_type maybe_type; - typedef typename helper_type::type result_type; - return result_type(maybe_type::do_wrap(SPROUT_FORWARD(F, f)), SPROUT_FORWARD(BoundArgs, args)...); - } - - // - // cbind - // - template - inline SPROUT_CONSTEXPR typename sprout::cbind_result::type - cbind(F&& f, BoundArgs&&... args) { - typedef sprout::detail::bind_helper helper_type; - typedef typename helper_type::maybe_type maybe_type; - typedef typename helper_type::type result_type; - return result_type(maybe_type::do_wrap(SPROUT_FORWARD(F, f)), SPROUT_FORWARD(BoundArgs, args)...); - } - template - inline SPROUT_CONSTEXPR typename sprout::res_cbind_result::type - cbind(F&& f, BoundArgs&&... args) { - typedef sprout::detail::res_bind_helper helper_type; - typedef typename helper_type::maybe_type maybe_type; - typedef typename helper_type::type result_type; - return result_type(maybe_type::do_wrap(SPROUT_FORWARD(F, f)), SPROUT_FORWARD(BoundArgs, args)...); - } -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_BIND_BIND_HPP diff --git a/dsp/lib/sprout/sprout/functional/bind/literals.hpp b/dsp/lib/sprout/sprout/functional/bind/literals.hpp deleted file mode 100644 index ae1c394..0000000 --- a/dsp/lib/sprout/sprout/functional/bind/literals.hpp +++ /dev/null @@ -1,65 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_BIND_LITERALS_HPP -#define SPROUT_FUNCTIONAL_BIND_LITERALS_HPP - -#include -#include -#include - -#if SPROUT_USE_USER_DEFINED_LITERALS - -#include -#include - -namespace sprout { - // - // placeholders_result - // variadic_placeholders_result - // - template - struct placeholders_result - : public sprout::identity< - sprout::placeholder::value> - > - {}; - template - struct variadic_placeholders_result - : public sprout::identity< - sprout::placeholder::value - sprout::detail::digits_to_int::value> - > - {}; - - namespace literals { - namespace placeholders { - // - // _ - // _tail - // - template - SPROUT_CONSTEXPR typename sprout::placeholders_result::type - operator"" _() { - typedef typename sprout::placeholders_result::type type; - return type(); - } - template - SPROUT_CONSTEXPR typename sprout::variadic_placeholders_result::type - operator"" _tail() { - typedef typename sprout::variadic_placeholders_result::type type; - return type(); - } - } // namespace placeholders - - using sprout::literals::placeholders::operator"" _; - using sprout::literals::placeholders::operator"" _tail; - } // namespace literals -} // namespace sprout - -#endif // #if SPROUT_USE_USER_DEFINED_LITERALS - -#endif // #ifndef SPROUT_FUNCTIONAL_BIND_LITERALS_HPP diff --git a/dsp/lib/sprout/sprout/functional/bind/placeholder.hpp b/dsp/lib/sprout/sprout/functional/bind/placeholder.hpp deleted file mode 100644 index 9866c10..0000000 --- a/dsp/lib/sprout/sprout/functional/bind/placeholder.hpp +++ /dev/null @@ -1,257 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_BIND_PLACEHOLDER_HPP -#define SPROUT_FUNCTIONAL_BIND_PLACEHOLDER_HPP - -#include -#include - -namespace sprout { - // - // placeholder - // - template - struct placeholder {}; - // - // positional_placeholder - // - struct positional_placeholder { - public: - template - SPROUT_CONSTEXPR operator sprout::placeholder() const { - return sprout::placeholder(); - } - }; - // - // variadic_placeholder - // - template - struct variadic_placeholder {}; - - namespace placeholders { - namespace { - SPROUT_STATIC_CONSTEXPR sprout::placeholder<1> _1 = {}; - SPROUT_STATIC_CONSTEXPR sprout::placeholder<2> _2 = {}; - SPROUT_STATIC_CONSTEXPR sprout::placeholder<3> _3 = {}; - SPROUT_STATIC_CONSTEXPR sprout::placeholder<4> _4 = {}; - SPROUT_STATIC_CONSTEXPR sprout::placeholder<5> _5 = {}; - SPROUT_STATIC_CONSTEXPR sprout::placeholder<6> _6 = {}; - SPROUT_STATIC_CONSTEXPR sprout::placeholder<7> _7 = {}; - SPROUT_STATIC_CONSTEXPR sprout::placeholder<8> _8 = {}; - SPROUT_STATIC_CONSTEXPR sprout::placeholder<9> _9 = {}; - SPROUT_STATIC_CONSTEXPR sprout::placeholder<10> _10 = {}; - SPROUT_STATIC_CONSTEXPR sprout::placeholder<11> _11 = {}; - SPROUT_STATIC_CONSTEXPR sprout::placeholder<12> _12 = {}; - SPROUT_STATIC_CONSTEXPR sprout::placeholder<13> _13 = {}; - SPROUT_STATIC_CONSTEXPR sprout::placeholder<14> _14 = {}; - SPROUT_STATIC_CONSTEXPR sprout::placeholder<15> _15 = {}; - SPROUT_STATIC_CONSTEXPR sprout::placeholder<16> _16 = {}; - SPROUT_STATIC_CONSTEXPR sprout::placeholder<17> _17 = {}; - SPROUT_STATIC_CONSTEXPR sprout::placeholder<18> _18 = {}; - SPROUT_STATIC_CONSTEXPR sprout::placeholder<19> _19 = {}; - SPROUT_STATIC_CONSTEXPR sprout::placeholder<20> _20 = {}; - SPROUT_STATIC_CONSTEXPR sprout::placeholder<21> _21 = {}; - SPROUT_STATIC_CONSTEXPR sprout::placeholder<22> _22 = {}; - SPROUT_STATIC_CONSTEXPR sprout::placeholder<23> _23 = {}; - SPROUT_STATIC_CONSTEXPR sprout::placeholder<24> _24 = {}; - SPROUT_STATIC_CONSTEXPR sprout::placeholder<25> _25 = {}; - SPROUT_STATIC_CONSTEXPR sprout::placeholder<26> _26 = {}; - SPROUT_STATIC_CONSTEXPR sprout::placeholder<27> _27 = {}; - SPROUT_STATIC_CONSTEXPR sprout::placeholder<28> _28 = {}; - SPROUT_STATIC_CONSTEXPR sprout::placeholder<29> _29 = {}; - SPROUT_STATIC_CONSTEXPR sprout::placeholder<30> _30 = {}; - - SPROUT_STATIC_CONSTEXPR sprout::positional_placeholder _ = {}; - - SPROUT_STATIC_CONSTEXPR sprout::variadic_placeholder<0> _va = {}; - SPROUT_STATIC_CONSTEXPR sprout::variadic_placeholder<1> _1tail = {}; - SPROUT_STATIC_CONSTEXPR sprout::variadic_placeholder<2> _2tail = {}; - SPROUT_STATIC_CONSTEXPR sprout::variadic_placeholder<3> _3tail = {}; - SPROUT_STATIC_CONSTEXPR sprout::variadic_placeholder<4> _4tail = {}; - SPROUT_STATIC_CONSTEXPR sprout::variadic_placeholder<5> _5tail = {}; - SPROUT_STATIC_CONSTEXPR sprout::variadic_placeholder<6> _6tail = {}; - SPROUT_STATIC_CONSTEXPR sprout::variadic_placeholder<7> _7tail = {}; - SPROUT_STATIC_CONSTEXPR sprout::variadic_placeholder<8> _8tail = {}; - SPROUT_STATIC_CONSTEXPR sprout::variadic_placeholder<9> _9tail = {}; - SPROUT_STATIC_CONSTEXPR sprout::variadic_placeholder<10> _10tail = {}; - SPROUT_STATIC_CONSTEXPR sprout::variadic_placeholder<11> _11tail = {}; - SPROUT_STATIC_CONSTEXPR sprout::variadic_placeholder<12> _12tail = {}; - SPROUT_STATIC_CONSTEXPR sprout::variadic_placeholder<13> _13tail = {}; - SPROUT_STATIC_CONSTEXPR sprout::variadic_placeholder<14> _14tail = {}; - SPROUT_STATIC_CONSTEXPR sprout::variadic_placeholder<15> _15tail = {}; - SPROUT_STATIC_CONSTEXPR sprout::variadic_placeholder<16> _16tail = {}; - SPROUT_STATIC_CONSTEXPR sprout::variadic_placeholder<17> _17tail = {}; - SPROUT_STATIC_CONSTEXPR sprout::variadic_placeholder<18> _18tail = {}; - SPROUT_STATIC_CONSTEXPR sprout::variadic_placeholder<19> _19tail = {}; - SPROUT_STATIC_CONSTEXPR sprout::variadic_placeholder<20> _20tail = {}; - SPROUT_STATIC_CONSTEXPR sprout::variadic_placeholder<21> _21tail = {}; - SPROUT_STATIC_CONSTEXPR sprout::variadic_placeholder<22> _22tail = {}; - SPROUT_STATIC_CONSTEXPR sprout::variadic_placeholder<23> _23tail = {}; - SPROUT_STATIC_CONSTEXPR sprout::variadic_placeholder<24> _24tail = {}; - SPROUT_STATIC_CONSTEXPR sprout::variadic_placeholder<25> _25tail = {}; - SPROUT_STATIC_CONSTEXPR sprout::variadic_placeholder<26> _26tail = {}; - SPROUT_STATIC_CONSTEXPR sprout::variadic_placeholder<27> _27tail = {}; - SPROUT_STATIC_CONSTEXPR sprout::variadic_placeholder<28> _28tail = {}; - SPROUT_STATIC_CONSTEXPR sprout::variadic_placeholder<29> _29tail = {}; - SPROUT_STATIC_CONSTEXPR sprout::variadic_placeholder<30> _30tail = {}; - } // anonymous-namespace - } // namespace placeholders - using sprout::placeholders::_1; - using sprout::placeholders::_2; - using sprout::placeholders::_3; - using sprout::placeholders::_4; - using sprout::placeholders::_5; - using sprout::placeholders::_6; - using sprout::placeholders::_7; - using sprout::placeholders::_8; - using sprout::placeholders::_9; - using sprout::placeholders::_10; - using sprout::placeholders::_11; - using sprout::placeholders::_12; - using sprout::placeholders::_13; - using sprout::placeholders::_14; - using sprout::placeholders::_15; - using sprout::placeholders::_16; - using sprout::placeholders::_17; - using sprout::placeholders::_18; - using sprout::placeholders::_19; - using sprout::placeholders::_20; - using sprout::placeholders::_21; - using sprout::placeholders::_22; - using sprout::placeholders::_23; - using sprout::placeholders::_24; - using sprout::placeholders::_25; - using sprout::placeholders::_26; - using sprout::placeholders::_27; - using sprout::placeholders::_28; - using sprout::placeholders::_29; - using sprout::placeholders::_30; - - using sprout::placeholders::_; - - using sprout::placeholders::_va; - using sprout::placeholders::_1tail; - using sprout::placeholders::_2tail; - using sprout::placeholders::_3tail; - using sprout::placeholders::_4tail; - using sprout::placeholders::_5tail; - using sprout::placeholders::_6tail; - using sprout::placeholders::_7tail; - using sprout::placeholders::_8tail; - using sprout::placeholders::_9tail; - using sprout::placeholders::_10tail; - using sprout::placeholders::_11tail; - using sprout::placeholders::_12tail; - using sprout::placeholders::_13tail; - using sprout::placeholders::_14tail; - using sprout::placeholders::_15tail; - using sprout::placeholders::_16tail; - using sprout::placeholders::_17tail; - using sprout::placeholders::_18tail; - using sprout::placeholders::_19tail; - using sprout::placeholders::_20tail; - using sprout::placeholders::_21tail; - using sprout::placeholders::_22tail; - using sprout::placeholders::_23tail; - using sprout::placeholders::_24tail; - using sprout::placeholders::_25tail; - using sprout::placeholders::_26tail; - using sprout::placeholders::_27tail; - using sprout::placeholders::_28tail; - using sprout::placeholders::_29tail; - using sprout::placeholders::_30tail; - - // - // is_placeholder - // - template - struct is_placeholder - : public sprout::integral_constant - {}; - template - struct is_placeholder - : public sprout::is_placeholder - {}; - template - struct is_placeholder - : public sprout::is_placeholder - {}; - template - struct is_placeholder - : public sprout::is_placeholder - {}; - template - struct is_placeholder > - : public sprout::integral_constant - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_placeholder_v = sprout::is_placeholder::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - - // - // is_positional_placeholder - // - template - struct is_positional_placeholder - : public sprout::integral_constant - {}; - template - struct is_positional_placeholder - : public sprout::is_positional_placeholder - {}; - template - struct is_positional_placeholder - : public sprout::is_positional_placeholder - {}; - template - struct is_positional_placeholder - : public sprout::is_positional_placeholder - {}; - template<> - struct is_positional_placeholder - : public sprout::integral_constant - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_positional_placeholder_v = sprout::is_positional_placeholder::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - - // - // is_variadic_placeholder - // - template - struct is_variadic_placeholder - : public sprout::integral_constant - {}; - template - struct is_variadic_placeholder - : public sprout::is_variadic_placeholder - {}; - template - struct is_variadic_placeholder - : public sprout::is_variadic_placeholder - {}; - template - struct is_variadic_placeholder - : public sprout::is_variadic_placeholder - {}; - template - struct is_variadic_placeholder > - : public sprout::integral_constant - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_variadic_placeholder_v = sprout::is_variadic_placeholder::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_BIND_PLACEHOLDER_HPP diff --git a/dsp/lib/sprout/sprout/functional/bind1st.hpp b/dsp/lib/sprout/sprout/functional/bind1st.hpp deleted file mode 100644 index 57642fd..0000000 --- a/dsp/lib/sprout/sprout/functional/bind1st.hpp +++ /dev/null @@ -1,92 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_BIND1ST_HPP -#define SPROUT_FUNCTIONAL_BIND1ST_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - - // D.9.1 Class template binder1st - namespace detail { - template - class binder1st; - template - class binder1st< - Fn, T, - typename std::enable_if::value>::type - > - : public sprout::unary_function - { - public: - typedef typename std::conditional< - std::is_void::value, - typename Fn::first_argument_type, - T - >::type value_type; - protected: - Fn op; - value_type value; - public: - SPROUT_CONSTEXPR binder1st(Fn const& x, value_type const& y) - : op(x), value(y) - {} - SPROUT_CONSTEXPR typename Fn::result_type - operator()(typename Fn::second_argument_type const& x) const { - return op(value, x); - } - }; - template - class binder1st< - Fn, T, - typename std::enable_if::value>::type - > { - public: - typedef T value_type; - protected: - Fn op; - value_type value; - public: - SPROUT_CONSTEXPR binder1st(Fn const& x, value_type const& y) - : op(x), value(y) - {} - template - SPROUT_CONSTEXPR decltype(std::declval()(std::declval(), std::declval())) - operator()(U const& x) const { - return op(value, x); - } - }; - } // namespace detail - template - class binder1st - : public sprout::detail::binder1st - { - public: - typedef typename sprout::detail::binder1st::value_type value_type; - public: - SPROUT_CONSTEXPR binder1st(Fn const& x, value_type const& y) - : sprout::detail::binder1st(x, y) - {} - }; - - // D.9.2 bind1st - template - inline SPROUT_CONSTEXPR sprout::binder1st - bind1st(Fn const& fn, T const& x) { - return sprout::binder1st(fn, typename sprout::binder1st::value_type(x)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_BIND1ST_HPP diff --git a/dsp/lib/sprout/sprout/functional/bind2nd.hpp b/dsp/lib/sprout/sprout/functional/bind2nd.hpp deleted file mode 100644 index 6f244d3..0000000 --- a/dsp/lib/sprout/sprout/functional/bind2nd.hpp +++ /dev/null @@ -1,92 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_BIND2ND_HPP -#define SPROUT_FUNCTIONAL_BIND2ND_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - - // D.9.3 Class template binder2nd - namespace detail { - template - class binder2nd; - template - class binder2nd< - Fn, T, - typename std::enable_if::value>::type - > - : public sprout::unary_function - { - public: - typedef typename std::conditional< - std::is_void::value, - typename Fn::second_argument_type, - T - >::type value_type; - protected: - Fn op; - value_type value; - public: - SPROUT_CONSTEXPR binder2nd(Fn const& x, value_type const& y) - : op(x), value(y) - {} - SPROUT_CONSTEXPR typename Fn::result_type - operator()(typename Fn::first_argument_type const& x) const { - return op(x, value); - } - }; - template - class binder2nd< - Fn, T, - typename std::enable_if::value>::type - > { - public: - typedef T value_type; - protected: - Fn op; - value_type value; - public: - SPROUT_CONSTEXPR binder2nd(Fn const& x, value_type const& y) - : op(x), value(y) - {} - template - SPROUT_CONSTEXPR decltype(std::declval()(std::declval(), std::declval())) - operator()(U const& x) const { - return op(x, value); - } - }; - } // namespace detail - template - class binder2nd - : public sprout::detail::binder2nd - { - public: - typedef typename sprout::detail::binder2nd::value_type value_type; - public: - SPROUT_CONSTEXPR binder2nd(Fn const& x, value_type const& y) - : sprout::detail::binder2nd(x, y) - {} - }; - - // D.9.3 bind2nd - template - inline SPROUT_CONSTEXPR sprout::binder2nd - bind2nd(Fn const& fn, T const& x) { - return sprout::binder2nd(fn, typename sprout::binder2nd::value_type(x)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_BIND2ND_HPP diff --git a/dsp/lib/sprout/sprout/functional/binder.hpp b/dsp/lib/sprout/sprout/functional/binder.hpp deleted file mode 100644 index 1fe70e3..0000000 --- a/dsp/lib/sprout/sprout/functional/binder.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_BINDER_HPP -#define SPROUT_FUNCTIONAL_BINDER_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_BINDER_HPP diff --git a/dsp/lib/sprout/sprout/functional/bit_and.hpp b/dsp/lib/sprout/sprout/functional/bit_and.hpp deleted file mode 100644 index adfdb8b..0000000 --- a/dsp/lib/sprout/sprout/functional/bit_and.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_BIT_AND_HPP -#define SPROUT_FUNCTIONAL_BIT_AND_HPP - -#include -#include -#include -#include - -namespace sprout { - // 20.8.7 bitwise operations - template - struct bit_and { - public: - typedef T first_argument_type; - typedef T second_argument_type; - typedef T result_type; - public: - SPROUT_CONSTEXPR T operator()(T const& x, T const& y) const { - return x & y; - } - }; - - template<> - struct bit_and - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval() & std::declval()) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval() & std::declval()) - { - return SPROUT_FORWARD(T, x) & SPROUT_FORWARD(U, y); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_BIT_AND_HPP diff --git a/dsp/lib/sprout/sprout/functional/bit_and_assign.hpp b/dsp/lib/sprout/sprout/functional/bit_and_assign.hpp deleted file mode 100644 index 8773d65..0000000 --- a/dsp/lib/sprout/sprout/functional/bit_and_assign.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_BIT_AND_ASSIGN_HPP -#define SPROUT_FUNCTIONAL_BIT_AND_ASSIGN_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // bit_and_assign - // - template - struct bit_and_assign; - template<> - struct bit_and_assign - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval() &= std::declval()) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval() &= std::declval()) - { - return SPROUT_FORWARD(T, x) &= SPROUT_FORWARD(U, y); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_BIT_AND_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/functional/bit_not.hpp b/dsp/lib/sprout/sprout/functional/bit_not.hpp deleted file mode 100644 index 7965d7e..0000000 --- a/dsp/lib/sprout/sprout/functional/bit_not.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_BIT_NOT_HPP -#define SPROUT_FUNCTIONAL_BIT_NOT_HPP - -#include -#include -#include -#include - -namespace sprout { - // 20.8.7 bitwise operations - template - struct bit_not { - public: - typedef T argument_type; - typedef T result_type; - public: - SPROUT_CONSTEXPR T operator()(T const& x) const { - return ~x; - } - }; - - template<> - struct bit_not - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(~std::declval()) - operator()(T&& x) - const SPROUT_NOEXCEPT_IF_EXPR(~std::declval()) - { - return ~SPROUT_FORWARD(T, x); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_BIT_NOT_HPP diff --git a/dsp/lib/sprout/sprout/functional/bit_or.hpp b/dsp/lib/sprout/sprout/functional/bit_or.hpp deleted file mode 100644 index b714be3..0000000 --- a/dsp/lib/sprout/sprout/functional/bit_or.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_BIT_OR_HPP -#define SPROUT_FUNCTIONAL_BIT_OR_HPP - -#include -#include -#include -#include - -namespace sprout { - // 20.8.7 bitwise operations - template - struct bit_or { - public: - typedef T first_argument_type; - typedef T second_argument_type; - typedef T result_type; - public: - SPROUT_CONSTEXPR T operator()(T const& x, T const& y) const { - return x | y; - } - }; - - template<> - struct bit_or - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval() | std::declval()) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval() | std::declval()) - { - return SPROUT_FORWARD(T, x) | SPROUT_FORWARD(U, y); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_BIT_OR_HPP diff --git a/dsp/lib/sprout/sprout/functional/bit_or_assign.hpp b/dsp/lib/sprout/sprout/functional/bit_or_assign.hpp deleted file mode 100644 index a5084ee..0000000 --- a/dsp/lib/sprout/sprout/functional/bit_or_assign.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_BIT_OR_ASSIGN_HPP -#define SPROUT_FUNCTIONAL_BIT_OR_ASSIGN_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // bit_or_assign - // - template - struct bit_or_assign; - template<> - struct bit_or_assign - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval() |= std::declval()) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval() |= std::declval()) - { - return SPROUT_FORWARD(T, x) |= SPROUT_FORWARD(U, y); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_BIT_OR_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/functional/bit_xor.hpp b/dsp/lib/sprout/sprout/functional/bit_xor.hpp deleted file mode 100644 index 5eedc1f..0000000 --- a/dsp/lib/sprout/sprout/functional/bit_xor.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_BIT_XOR_HPP -#define SPROUT_FUNCTIONAL_BIT_XOR_HPP - -#include -#include -#include -#include - -namespace sprout { - // 20.8.7 bitwise operations - template - struct bit_xor { - public: - typedef T first_argument_type; - typedef T second_argument_type; - typedef T result_type; - public: - SPROUT_CONSTEXPR T operator()(T const& x, T const& y) const { - return x ^ y; - } - }; - - template<> - struct bit_xor - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval() ^ std::declval()) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval() ^ std::declval()) - { - return SPROUT_FORWARD(T, x) ^ SPROUT_FORWARD(U, y); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_BIT_XOR_HPP diff --git a/dsp/lib/sprout/sprout/functional/bit_xor_assign.hpp b/dsp/lib/sprout/sprout/functional/bit_xor_assign.hpp deleted file mode 100644 index a657956..0000000 --- a/dsp/lib/sprout/sprout/functional/bit_xor_assign.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_BIT_XOR_ASSIGN_HPP -#define SPROUT_FUNCTIONAL_BIT_XOR_ASSIGN_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // bit_xor_assign - // - template - struct bit_xor_assign; - template<> - struct bit_xor_assign - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval() ^= std::declval()) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval() ^= std::declval()) - { - return SPROUT_FORWARD(T, x) ^= SPROUT_FORWARD(U, y); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_BIT_XOR_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/functional/bitwise.hpp b/dsp/lib/sprout/sprout/functional/bitwise.hpp deleted file mode 100644 index fad628a..0000000 --- a/dsp/lib/sprout/sprout/functional/bitwise.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_BITWISE_HPP -#define SPROUT_FUNCTIONAL_BITWISE_HPP - -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_BITWISE_HPP diff --git a/dsp/lib/sprout/sprout/functional/call_fun.hpp b/dsp/lib/sprout/sprout/functional/call_fun.hpp deleted file mode 100644 index c08314b..0000000 --- a/dsp/lib/sprout/sprout/functional/call_fun.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_CALL_FUN_HPP -#define SPROUT_FUNCTIONAL_CALL_FUN_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // call_fun - // - template - struct call_fun; - template<> - struct call_fun - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval()(std::declval()...)) - operator()(F&& f, As&&... as) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval()(std::declval()...)) - { - return SPROUT_FORWARD(F, f)(SPROUT_FORWARD(As, as)...); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_CALL_FUN_HPP diff --git a/dsp/lib/sprout/sprout/functional/comma.hpp b/dsp/lib/sprout/sprout/functional/comma.hpp deleted file mode 100644 index 9e12012..0000000 --- a/dsp/lib/sprout/sprout/functional/comma.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_COMMA_HPP -#define SPROUT_FUNCTIONAL_COMMA_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // comma - // - template - struct comma; - template<> - struct comma - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval(), std::declval()) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR((std::declval(), std::declval())) - { - return SPROUT_FORWARD(T, x), SPROUT_FORWARD(U, y); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_COMMA_HPP diff --git a/dsp/lib/sprout/sprout/functional/comparison.hpp b/dsp/lib/sprout/sprout/functional/comparison.hpp deleted file mode 100644 index 18d10d0..0000000 --- a/dsp/lib/sprout/sprout/functional/comparison.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_COMPARISON_HPP -#define SPROUT_FUNCTIONAL_COMPARISON_HPP - -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_COMPARISON_HPP diff --git a/dsp/lib/sprout/sprout/functional/cond.hpp b/dsp/lib/sprout/sprout/functional/cond.hpp deleted file mode 100644 index 22ec9f8..0000000 --- a/dsp/lib/sprout/sprout/functional/cond.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_COND_HPP -#define SPROUT_FUNCTIONAL_COND_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // cond - // - template - struct cond; - template<> - struct cond - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval() ? std::declval() : std::declval()) - operator()(T&& x, U&& y, V&& z) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval() ? std::declval() : std::declval()) - { - return SPROUT_FORWARD(T, x) ? SPROUT_FORWARD(U, y) : SPROUT_FORWARD(V, z); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_COND_HPP diff --git a/dsp/lib/sprout/sprout/functional/dereference.hpp b/dsp/lib/sprout/sprout/functional/dereference.hpp deleted file mode 100644 index d9ef8e4..0000000 --- a/dsp/lib/sprout/sprout/functional/dereference.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_DEREFERENCE_HPP -#define SPROUT_FUNCTIONAL_DEREFERENCE_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // dereference - // - template - struct dereference; - template<> - struct dereference - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(*std::declval()) - operator()(T&& x) - const SPROUT_NOEXCEPT_IF_EXPR(*std::declval()) - { - return *SPROUT_FORWARD(T, x); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_DEREFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/functional/divides.hpp b/dsp/lib/sprout/sprout/functional/divides.hpp deleted file mode 100644 index e924a5e..0000000 --- a/dsp/lib/sprout/sprout/functional/divides.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_DEVIDES_HPP -#define SPROUT_FUNCTIONAL_DEVIDES_HPP - -#include -#include -#include -#include - -namespace sprout { - - // 20.8.4 Arithmetic operations - template - struct divides { - public: - typedef T first_argument_type; - typedef T second_argument_type; - typedef T result_type; - public: - SPROUT_CONSTEXPR T operator()(T const& x, T const& y) const { - return x / y; - } - }; - - template<> - struct divides - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval() / std::declval()) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval() / std::declval()) - { - return SPROUT_FORWARD(T, x) / SPROUT_FORWARD(U, y); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_DEVIDES_HPP diff --git a/dsp/lib/sprout/sprout/functional/divides_assign.hpp b/dsp/lib/sprout/sprout/functional/divides_assign.hpp deleted file mode 100644 index 4806b9e..0000000 --- a/dsp/lib/sprout/sprout/functional/divides_assign.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_DEVIDES_ASSIGN_HPP -#define SPROUT_FUNCTIONAL_DEVIDES_ASSIGN_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // divides_assign - // - template - struct divides_assign; - template<> - struct divides_assign - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval() /= std::declval()) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval() /= std::declval()) - { - return SPROUT_FORWARD(T, x) /= SPROUT_FORWARD(U, y); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_DEVIDES_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/functional/equal_to.hpp b/dsp/lib/sprout/sprout/functional/equal_to.hpp deleted file mode 100644 index 6f8dcad..0000000 --- a/dsp/lib/sprout/sprout/functional/equal_to.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_EQUAL_TO_HPP -#define SPROUT_FUNCTIONAL_EQUAL_TO_HPP - -#include -#include -#include -#include - -namespace sprout { - - // 20.8.5 Comparisons - template - struct equal_to { - public: - typedef T first_argument_type; - typedef T second_argument_type; - typedef bool result_type; - public: - SPROUT_CONSTEXPR bool operator()(T const& x, T const& y) const { - return x == y; - } - }; - - template<> - struct equal_to - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval() == std::declval()) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval() == std::declval()) - { - return SPROUT_FORWARD(T, x) == SPROUT_FORWARD(U, y); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_EQUAL_TO_HPP diff --git a/dsp/lib/sprout/sprout/functional/equiv.hpp b/dsp/lib/sprout/sprout/functional/equiv.hpp deleted file mode 100644 index eb74fa5..0000000 --- a/dsp/lib/sprout/sprout/functional/equiv.hpp +++ /dev/null @@ -1,95 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_EQUIV_HPP -#define SPROUT_FUNCTIONAL_EQUIV_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template::value> - class equiv_adaptor_impl; - - template - class equiv_adaptor_impl { - public: - typedef typename Compare::first_argument_type first_argument_type; - typedef typename Compare::second_argument_type second_argument_type; - typedef bool result_type; - protected: - Compare fn; - public: - explicit SPROUT_CONSTEXPR equiv_adaptor_impl(Compare const& comp) - : fn(comp) - {} - SPROUT_CONSTEXPR bool operator()(typename Compare::first_argument_type const& x, typename Compare::second_argument_type const& y) const { - return !fn(x, y) && !fn(y, x); - } - }; - - template - class equiv_adaptor_impl { - protected: - Compare fn; - public: - explicit SPROUT_CONSTEXPR equiv_adaptor_impl(Compare const& comp) - : fn(comp) - {} - template - SPROUT_CONSTEXPR decltype(!std::declval()(std::declval(), std::declval()) && !std::declval()(std::declval(), std::declval())) - operator()(T&& x, U&& y) const { - return !fn(SPROUT_FORWARD(T, x), SPROUT_FORWARD(U, y)) && !fn(SPROUT_FORWARD(U, y), SPROUT_FORWARD(T, x)); - } - }; - } // namespace detail - - // - // equiv_adaptor - // - template - class equiv_adaptor - : public sprout::detail::equiv_adaptor_impl - { - public: - explicit SPROUT_CONSTEXPR equiv_adaptor(Compare const& comp) - : sprout::detail::equiv_adaptor_impl(comp) - {} - }; - template<> - class equiv_adaptor - : public sprout::detail::equiv_adaptor_impl > - { - public: - SPROUT_CONSTEXPR equiv_adaptor() - : sprout::detail::equiv_adaptor_impl >(sprout::less<>()) - {} - explicit SPROUT_CONSTEXPR equiv_adaptor(sprout::less<> const& comp) - : sprout::detail::equiv_adaptor_impl >(comp) - {} - }; - - // - // equiv - // - template - inline SPROUT_CONSTEXPR sprout::equiv_adaptor - equiv(Compare const& comp) { - return sprout::equiv_adaptor(comp); - } - inline SPROUT_CONSTEXPR sprout::equiv_adaptor<> - equiv() { - return sprout::equiv_adaptor<>(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_EQUIV_HPP diff --git a/dsp/lib/sprout/sprout/functional/functor.hpp b/dsp/lib/sprout/sprout/functional/functor.hpp deleted file mode 100644 index d5fbd25..0000000 --- a/dsp/lib/sprout/sprout/functional/functor.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_FUNCTOR_HPP -#define SPROUT_FUNCTIONAL_FUNCTOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_FUNCTOR_HPP diff --git a/dsp/lib/sprout/sprout/functional/greater.hpp b/dsp/lib/sprout/sprout/functional/greater.hpp deleted file mode 100644 index f940526..0000000 --- a/dsp/lib/sprout/sprout/functional/greater.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_GREATER_HPP -#define SPROUT_FUNCTIONAL_GREATER_HPP - -#include -#include -#include -#include - -namespace sprout { - - // 20.8.5 Comparisons - template - struct greater { - public: - typedef T first_argument_type; - typedef T second_argument_type; - typedef bool result_type; - public: - SPROUT_CONSTEXPR bool operator()(T const& x, T const& y) const { - return x > y; - } - }; - - template<> - struct greater - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval() > std::declval()) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval() > std::declval()) - { - return SPROUT_FORWARD(T, x) > SPROUT_FORWARD(U, y); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_GREATER_HPP diff --git a/dsp/lib/sprout/sprout/functional/greater_equal.hpp b/dsp/lib/sprout/sprout/functional/greater_equal.hpp deleted file mode 100644 index 2fba19b..0000000 --- a/dsp/lib/sprout/sprout/functional/greater_equal.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_GREATER_EQUAL_HPP -#define SPROUT_FUNCTIONAL_GREATER_EQUAL_HPP - -#include -#include -#include -#include - -namespace sprout { - - // 20.8.5 Comparisons - template - struct greater_equal { - public: - typedef T first_argument_type; - typedef T second_argument_type; - typedef bool result_type; - public: - SPROUT_CONSTEXPR bool operator()(T const& x, T const& y) const { - return x >= y; - } - }; - - template<> - struct greater_equal - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval() >= std::declval()) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval() >= std::declval()) - { - return SPROUT_FORWARD(T, x) >= SPROUT_FORWARD(U, y); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_GREATER_EQUAL_HPP diff --git a/dsp/lib/sprout/sprout/functional/hash.hpp b/dsp/lib/sprout/sprout/functional/hash.hpp deleted file mode 100644 index 5635eed..0000000 --- a/dsp/lib/sprout/sprout/functional/hash.hpp +++ /dev/null @@ -1,21 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_HASH_HPP -#define SPROUT_FUNCTIONAL_HASH_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_HASH_HPP diff --git a/dsp/lib/sprout/sprout/functional/hash/boost/array.hpp b/dsp/lib/sprout/sprout/functional/hash/boost/array.hpp deleted file mode 100644 index 3f60b15..0000000 --- a/dsp/lib/sprout/sprout/functional/hash/boost/array.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_HASH_BOOST_ARRAY_HPP -#define SPROUT_FUNCTIONAL_HASH_BOOST_ARRAY_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // hash_value_traits - // - template - struct hash_value_traits > { - public: - static SPROUT_CONSTEXPR std::size_t - hash_value(boost::array const& v) { - return sprout::hash_range(v); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_HASH_BOOST_ARRAY_HPP diff --git a/dsp/lib/sprout/sprout/functional/hash/detail/hash_float.hpp b/dsp/lib/sprout/sprout/functional/hash/detail/hash_float.hpp deleted file mode 100644 index 874bfe4..0000000 --- a/dsp/lib/sprout/sprout/functional/hash/detail/hash_float.hpp +++ /dev/null @@ -1,85 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_HASH_DETAIL_HASH_FLOAT_HPP -#define SPROUT_FUNCTIONAL_HASH_DETAIL_HASH_FLOAT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - inline SPROUT_CONSTEXPR std::size_t - hash_float_combine(std::size_t seed, std::size_t value) { - return seed ^ (value + (seed << 6) + (seed >> 2)); - } - - template - inline SPROUT_CONSTEXPR std::size_t - float_hash_value_impl_4(T v, int exp, std::size_t seed, std::size_t length, std::size_t i = 0) { - return i != length ? sprout::detail::float_hash_value_impl_4( - sprout::ldexp(v - static_cast(static_cast(v)), sprout::numeric_limits::digits), - exp, sprout::detail::hash_float_combine(seed, static_cast(v)), - length, i + 1 - ) - : sprout::detail::hash_float_combine(seed, exp) - ; - } - template - inline SPROUT_CONSTEXPR std::size_t - float_hash_value_impl_3(T v, int exp) { - return sprout::detail::float_hash_value_impl_4( - sprout::ldexp(v - static_cast(static_cast(v)), sprout::numeric_limits::digits), - exp, static_cast(v), - (sprout::numeric_limits::digits * sprout::detail::static_log2::radix>::value + sprout::numeric_limits::digits - 1) - / sprout::numeric_limits::digits - ); - } - template - inline SPROUT_CONSTEXPR std::size_t - float_hash_value_impl_2(T v, int exp) { - return sprout::detail::float_hash_value_impl_3(sprout::ldexp(v, sprout::numeric_limits::digits), exp); - } - template - inline SPROUT_CONSTEXPR std::size_t - float_hash_value_impl_1(P const& p) { - return ((p.first) < 0) ? sprout::detail::float_hash_value_impl_2( - -p.first, p.second + (sprout::numeric_limits::max_exponent - sprout::numeric_limits::min_exponent) - ) - : sprout::detail::float_hash_value_impl_2(p.first, p.second) - ; - } - template - inline SPROUT_CONSTEXPR std::size_t - float_hash_value_impl(T v) { - return sprout::detail::float_hash_value_impl_1(sprout::math::float2_sig_exp(v)); - } - - template - inline SPROUT_CONSTEXPR std::size_t - float_hash_value_1(T v, int fp) { - return fp == FP_ZERO ? 0 - : fp == FP_INFINITE ? std::size_t(v > 0 ? -1 : -2) - : fp == FP_NAN ? std::size_t(-3) - : sprout::detail::float_hash_value_impl(v) - ; - } - template - inline SPROUT_CONSTEXPR std::size_t - float_hash_value(T v) { - return sprout::detail::float_hash_value_1(v, sprout::fpclassify(v)); - } - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_HASH_DETAIL_HASH_FLOAT_HPP diff --git a/dsp/lib/sprout/sprout/functional/hash/hash.hpp b/dsp/lib/sprout/sprout/functional/hash/hash.hpp deleted file mode 100644 index 7f42f88..0000000 --- a/dsp/lib/sprout/sprout/functional/hash/hash.hpp +++ /dev/null @@ -1,113 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_HASH_HASH_HPP -#define SPROUT_FUNCTIONAL_HASH_HASH_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // hash - // - template - struct hash { - public: - typedef T argument_type; - typedef std::size_t result_type; - public: - SPROUT_CONSTEXPR std::size_t operator()(T const& v) const { - return sprout::to_hash(v); - } - }; - template - struct hash - : public sprout::hash - {}; - template - struct hash - : public sprout::hash - {}; - template - struct hash - : public sprout::hash - {}; - template<> - struct hash { - public: - typedef std::size_t result_type; - public: - template - SPROUT_CONSTEXPR std::size_t - operator()(T&& v) - const SPROUT_NOEXCEPT_IF_EXPR(sprout::to_hash(SPROUT_FORWARD(T, v))) - { - return sprout::to_hash(SPROUT_FORWARD(T, v)); - } - }; - -#define SPROUT_HASH_SPECIALIZE(TYPE) \ - template<> \ - struct hash { \ - public: \ - typedef TYPE argument_type; \ - typedef std::size_t result_type; \ - public: \ - SPROUT_CONSTEXPR std::size_t operator()(TYPE v) const { \ - return sprout::to_hash(v); \ - } \ - } -#define SPROUT_HASH_SPECIALIZE_REF(TYPE) \ - template<> \ - struct hash { \ - public: \ - typedef TYPE argument_type; \ - typedef std::size_t result_type; \ - public: \ - SPROUT_CONSTEXPR std::size_t operator()(TYPE const& v) const { \ - return sprout::to_hash(v); \ - } \ - } - - SPROUT_HASH_SPECIALIZE(bool); - SPROUT_HASH_SPECIALIZE(char); - SPROUT_HASH_SPECIALIZE(signed char); - SPROUT_HASH_SPECIALIZE(unsigned char); -#if SPROUT_USE_UNICODE_LITERALS - SPROUT_HASH_SPECIALIZE(char16_t); - SPROUT_HASH_SPECIALIZE(char32_t); -#endif - SPROUT_HASH_SPECIALIZE(wchar_t); - SPROUT_HASH_SPECIALIZE(short); - SPROUT_HASH_SPECIALIZE(unsigned short); - SPROUT_HASH_SPECIALIZE(int); - SPROUT_HASH_SPECIALIZE(unsigned int); - SPROUT_HASH_SPECIALIZE(long); - SPROUT_HASH_SPECIALIZE(unsigned long); - SPROUT_HASH_SPECIALIZE(long long); - SPROUT_HASH_SPECIALIZE(unsigned long long); - -#undef SPROUT_HASH_SPECIALIZE -#undef SPROUT_HASH_SPECIALIZE_REF - - template - struct hash { - public: - typedef T* argument_type; - typedef std::size_t result_type; - public: - std::size_t operator()(T* v) const { - return sprout::to_hash(v); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_HASH_HASH_HPP diff --git a/dsp/lib/sprout/sprout/functional/hash/hash_combine.hpp b/dsp/lib/sprout/sprout/functional/hash/hash_combine.hpp deleted file mode 100644 index 3987432..0000000 --- a/dsp/lib/sprout/sprout/functional/hash/hash_combine.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_HASH_HASH_COMBINE_HPP -#define SPROUT_FUNCTIONAL_HASH_HASH_COMBINE_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR std::size_t - hash_combine_impl(std::size_t seed) { - return seed; - } - template - inline SPROUT_CONSTEXPR std::size_t - hash_combine_impl(std::size_t seed, T const& v) { - return seed ^ (sprout::to_hash(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2)); - } - template - inline SPROUT_CONSTEXPR std::size_t - hash_combine_impl(std::size_t seed, Head const& head, Tail const&... tail) { - return sprout::detail::hash_combine_impl(sprout::detail::hash_combine_impl(seed, head), tail...); - } - } // namespace detail - // - // hash_combine - // - template - inline SPROUT_CONSTEXPR std::size_t - hash_combine(std::size_t seed, Args const&... args) { - return sprout::detail::hash_combine_impl(seed, args...); - } -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_HASH_HASH_COMBINE_HPP diff --git a/dsp/lib/sprout/sprout/functional/hash/hash_fwd.hpp b/dsp/lib/sprout/sprout/functional/hash/hash_fwd.hpp deleted file mode 100644 index 935f6c7..0000000 --- a/dsp/lib/sprout/sprout/functional/hash/hash_fwd.hpp +++ /dev/null @@ -1,67 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_HASH_HASH_FWD_HPP -#define SPROUT_FUNCTIONAL_HASH_HASH_FWD_HPP - -#include -#include - -namespace sprout { - // - // hash - // - template - struct hash; - - // - // to_hash - // - template - SPROUT_CONSTEXPR std::size_t to_hash(T&& v); - - // - // hash_value - // - template - inline SPROUT_CONSTEXPR std::size_t - hash_value(T const& v); - - // - // hash_combine - // - template - inline SPROUT_CONSTEXPR std::size_t - hash_combine(std::size_t seed, Args const&... args); - - // - // hash_values - // - template - inline SPROUT_CONSTEXPR std::size_t - hash_values(Args const&... args); - - // - // hash_range - // - template - SPROUT_CONSTEXPR std::size_t hash_range(std::size_t seed, InputIterator first, InputIterator last); - template - SPROUT_CONSTEXPR std::size_t hash_range(InputIterator first, InputIterator last); - template - SPROUT_CONSTEXPR std::size_t hash_range(std::size_t seed, InputRange const& rng); - template - SPROUT_CONSTEXPR std::size_t hash_range(InputRange const& rng); - - // - // hash_value_traits - // - template - struct hash_value_traits; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_HASH_HASH_FWD_HPP diff --git a/dsp/lib/sprout/sprout/functional/hash/hash_range.hpp b/dsp/lib/sprout/sprout/functional/hash/hash_range.hpp deleted file mode 100644 index 36f73cb..0000000 --- a/dsp/lib/sprout/sprout/functional/hash/hash_range.hpp +++ /dev/null @@ -1,61 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_HASH_HASH_RANGE_HPP -#define SPROUT_FUNCTIONAL_HASH_HASH_RANGE_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // hash_combine_accumulator - // - template - struct hash_combine_accumulator { - public: - typedef T first_argument_type; - typedef T result_type; - public: - template - SPROUT_CONSTEXPR T operator()(T const& seed, U const& v) const { - return sprout::hash_combine(seed, v); - } - }; - - // - // hash_range - // - template - inline SPROUT_CONSTEXPR std::size_t - hash_range(std::size_t seed, InputIterator first, InputIterator last) { - return sprout::accumulate(first, last, seed, sprout::hash_combine_accumulator<>()); - } - template - inline SPROUT_CONSTEXPR std::size_t - hash_range(InputIterator first, InputIterator last) { - return sprout::hash_range(0, first, last); - } - - template - inline SPROUT_CONSTEXPR std::size_t - hash_range(std::size_t seed, InputRange const& rng) { - return sprout::hash_range(seed, sprout::begin(rng), sprout::end(rng)); - } - template - inline SPROUT_CONSTEXPR std::size_t - hash_range(InputRange const& rng) { - return sprout::hash_range(0, rng); - } -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_HASH_HASH_RANGE_HPP diff --git a/dsp/lib/sprout/sprout/functional/hash/hash_value.hpp b/dsp/lib/sprout/sprout/functional/hash/hash_value.hpp deleted file mode 100644 index 299a15d..0000000 --- a/dsp/lib/sprout/sprout/functional/hash/hash_value.hpp +++ /dev/null @@ -1,173 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_HASH_HASH_VALUE_HPP -#define SPROUT_FUNCTIONAL_HASH_HASH_VALUE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace hash_detail { - template - struct is_basic_number - : public sprout::bool_constant< - std::is_integral::value - && (sizeof(T) <= sizeof(std::size_t)) - > - {}; - template - struct is_long_number - : public sprout::bool_constant< - std::is_integral::value - && (sizeof(T) > sizeof(std::size_t)) - && sprout::is_signed::value - > - {}; - template - struct is_ulong_number - : public sprout::bool_constant< - std::is_integral::value - && (sizeof(T) > sizeof(std::size_t)) - && sprout::is_unsigned::value - > - {}; - - template - inline SPROUT_CONSTEXPR std::size_t - hash_value_signed_2(T val, int length, std::size_t seed, T positive, std::size_t i) { - return i > 0 - ? hash_value_signed_2( - val, - length, - seed ^ static_cast((positive >> i) + (seed << 6) + (seed >> 2)), - positive, - i - sprout::numeric_limits::digits - ) - : seed ^ static_cast(val + (seed << 6) + (seed >> 2)) - ; - } - template - inline SPROUT_CONSTEXPR std::size_t - hash_value_signed_1(T val, int length, std::size_t seed, T positive) { - return hash_value_signed_2(val, length, seed, positive, length * sprout::numeric_limits::digits); - } - template - inline SPROUT_CONSTEXPR std::size_t - hash_value_signed(T val) { - return sprout::hash_detail::hash_value_signed_1( - val, - (sprout::numeric_limits::digits - 1) / sprout::numeric_limits::digits, - 0, - val < 0 ? -1 - val : val - ); - } - - template - inline SPROUT_CONSTEXPR std::size_t - hash_value_unsigned_2(T val, int length, std::size_t seed, std::size_t i) { - return i > 0 - ? hash_value_unsigned_2( - val, - length, - seed ^ static_cast((val >> i) + (seed << 6) + (seed >> 2)), - i - sprout::numeric_limits::digits - ) - : seed ^ static_cast(val + (seed << 6) + (seed >> 2)) - ; - } - template - inline SPROUT_CONSTEXPR std::size_t - hash_value_unsigned_1(T val, int length, std::size_t seed) { - return hash_value_unsigned_2(val, length, seed, length * sprout::numeric_limits::digits); - } - template - inline SPROUT_CONSTEXPR std::size_t - hash_value_unsigned(T val) { - return sprout::hash_detail::hash_value_unsigned_1( - val, - (sprout::numeric_limits::digits - 1) / sprout::numeric_limits::digits, - 0 - ); - } - - inline std::size_t - hash_value_pointer_1(std::size_t x) { - return x + (x >> 3); - } - template - std::size_t - hash_value_pointer(T const* v) { - return sprout::hash_detail::hash_value_pointer_1(static_cast(reinterpret_cast(v))); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, std::size_t>::type - hash_value_impl(T v) { - return static_cast(v); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, std::size_t>::type - hash_value_impl(T v) { - return sprout::hash_detail::hash_value_signed(v); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, std::size_t>::type - hash_value_impl(T v) { - return sprout::hash_detail::hash_value_unsigned(v); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, std::size_t>::type - hash_value_impl(T v) { - return sprout::hash_detail::hash_value_impl(static_cast::type>(v)); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, std::size_t>::type - hash_value_impl(T v) { - return sprout::detail::float_hash_value(v); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::type>::value, std::size_t>::type - hash_value_impl(T&& v) { - return sprout::hash_detail::hash_value_pointer(v); - } - template - inline SPROUT_CONSTEXPR std::size_t - hash_value_impl(T const (& v)[N]) { - return sprout::hash_range(v); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !std::is_arithmetic::value && !std::is_enum::value && !std::is_pointer::value, - std::size_t - >::type - hash_value_impl(T const& v) { - return std::hash::type>()(v); - } - } // namespace hash_detail - - // - // hash_value - // - template - inline SPROUT_CONSTEXPR std::size_t - hash_value(T const& v) { - return sprout::hash_detail::hash_value_impl(v); - } -} // namespace sprout - -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_HASH_HASH_VALUE_HPP diff --git a/dsp/lib/sprout/sprout/functional/hash/hash_value_traits.hpp b/dsp/lib/sprout/sprout/functional/hash/hash_value_traits.hpp deleted file mode 100644 index ce9561f..0000000 --- a/dsp/lib/sprout/sprout/functional/hash/hash_value_traits.hpp +++ /dev/null @@ -1,59 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_HASH_HASH_VALUE_TRAITS_HPP -#define SPROUT_FUNCTIONAL_HASH_HASH_VALUE_TRAITS_HPP - -#include -#include -#include -#include - -namespace sprout_adl { - sprout::not_found_via_adl hash_value(...); -} // namespace sprout_adl - -namespace sprout_hash_detail { - template - inline SPROUT_CONSTEXPR std::size_t - call_hash_value(T const& v) { - using sprout::hash_value; - using sprout_adl::hash_value; - return hash_value(v); - } -} // namespace sprout_hash_detail - -namespace sprout { - // - // hash_value_traits - // - template - struct hash_value_traits { - public: - static SPROUT_CONSTEXPR std::size_t - hash_value(T const& v) { - return sprout_hash_detail::call_hash_value(v); - } - }; - template - struct hash_value_traits - : public sprout::hash_value_traits - {}; - template - struct hash_value_traits - : public sprout::hash_value_traits - {}; - template - struct hash_value_traits - : public sprout::hash_value_traits - {}; -} // namespace sprout - -#include -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_HASH_HASH_VALUE_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/functional/hash/hash_values.hpp b/dsp/lib/sprout/sprout/functional/hash/hash_values.hpp deleted file mode 100644 index 080f230..0000000 --- a/dsp/lib/sprout/sprout/functional/hash/hash_values.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_HASH_HASH_VALUES_HPP -#define SPROUT_FUNCTIONAL_HASH_HASH_VALUES_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // hash_values - // - template - inline SPROUT_CONSTEXPR std::size_t - hash_values(Args const&... args) { - return sprout::hash_combine(0, args...); - } -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_HASH_HASH_VALUES_HPP diff --git a/dsp/lib/sprout/sprout/functional/hash/sscrisk/cel/array.hpp b/dsp/lib/sprout/sprout/functional/hash/sscrisk/cel/array.hpp deleted file mode 100644 index ca2cf7d..0000000 --- a/dsp/lib/sprout/sprout/functional/hash/sscrisk/cel/array.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_HASH_SSCRISK_CEL_ARRAY_HPP -#define SPROUT_FUNCTIONAL_HASH_SSCRISK_CEL_ARRAY_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // hash_value_traits - // - template - struct hash_value_traits > { - public: - static SPROUT_CONSTEXPR std::size_t - hash_value(sscrisk::cel::array const& v) { - return sprout::hash_range(v); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_HASH_SSCRISK_CEL_ARRAY_HPP diff --git a/dsp/lib/sprout/sprout/functional/hash/sscrisk/cel/utility.hpp b/dsp/lib/sprout/sprout/functional/hash/sscrisk/cel/utility.hpp deleted file mode 100644 index d02b838..0000000 --- a/dsp/lib/sprout/sprout/functional/hash/sscrisk/cel/utility.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_HASH_SSCRISK_CEL_UTILITY_HPP -#define SPROUT_FUNCTIONAL_HASH_SSCRISK_CEL_UTILITY_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // hash_value_traits - // - template - struct hash_value_traits > { - public: - static SPROUT_CONSTEXPR std::size_t - hash_value(sscrisk::cel::pair const& v) { - return sprout::hash_values(v.first, v.second); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_HASH_SSCRISK_CEL_UTILITY_HPP diff --git a/dsp/lib/sprout/sprout/functional/hash/std/array.hpp b/dsp/lib/sprout/sprout/functional/hash/std/array.hpp deleted file mode 100644 index ae9f0ce..0000000 --- a/dsp/lib/sprout/sprout/functional/hash/std/array.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_HASH_STD_ARRAY_HPP -#define SPROUT_FUNCTIONAL_HASH_STD_ARRAY_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // hash_value_traits - // - template - struct hash_value_traits > { - public: - static SPROUT_CONSTEXPR std::size_t - hash_value(std::array const& v) { - return sprout::hash_range(v); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_HASH_STD_ARRAY_HPP diff --git a/dsp/lib/sprout/sprout/functional/hash/std/complex.hpp b/dsp/lib/sprout/sprout/functional/hash/std/complex.hpp deleted file mode 100644 index a5c460a..0000000 --- a/dsp/lib/sprout/sprout/functional/hash/std/complex.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_HASH_STD_COMPLEX_HPP -#define SPROUT_FUNCTIONAL_HASH_STD_COMPLEX_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // hash_value - // - template - inline SPROUT_CONSTEXPR std::size_t - hash_value(std::complex const& v) { - return sprout::hash_values(v.real(), v.imag()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_HASH_STD_COMPLEX_HPP diff --git a/dsp/lib/sprout/sprout/functional/hash/std/utility.hpp b/dsp/lib/sprout/sprout/functional/hash/std/utility.hpp deleted file mode 100644 index 2f81f8c..0000000 --- a/dsp/lib/sprout/sprout/functional/hash/std/utility.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_HASH_STD_UTILITY_HPP -#define SPROUT_FUNCTIONAL_HASH_STD_UTILITY_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // hash_value_traits - // - template - struct hash_value_traits > { - public: - static SPROUT_CONSTEXPR std::size_t - hash_value(std::pair const& v) { - return sprout::hash_values(v.first, v.second); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_HASH_STD_UTILITY_HPP diff --git a/dsp/lib/sprout/sprout/functional/hash/to_hash.hpp b/dsp/lib/sprout/sprout/functional/hash/to_hash.hpp deleted file mode 100644 index 463979d..0000000 --- a/dsp/lib/sprout/sprout/functional/hash/to_hash.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_HASH_TO_HASH_HPP -#define SPROUT_FUNCTIONAL_HASH_TO_HASH_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // to_hash - // - // effect: - // sprout::hash_value_traits::type>::hash_value(v) - // [default] - // ADL callable hash_value(v) -> hash_value(v) - // [default] - // T is Arithmetic || Enum || Pointer || Array -> implementation-defined - // otherwise -> std::hash()(v) - // - template - inline SPROUT_CONSTEXPR std::size_t - to_hash(T&& v) { - return sprout::hash_value_traits::type>::hash_value(v); - } -} // namespace sprout - -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_HASH_TO_HASH_HPP diff --git a/dsp/lib/sprout/sprout/functional/hash_fwd.hpp b/dsp/lib/sprout/sprout/functional/hash_fwd.hpp deleted file mode 100644 index 61f0bd2..0000000 --- a/dsp/lib/sprout/sprout/functional/hash_fwd.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_HASH_FWD_HPP -#define SPROUT_FUNCTIONAL_HASH_FWD_HPP - -#include -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_HASH_FWD_HPP diff --git a/dsp/lib/sprout/sprout/functional/inc_dec.hpp b/dsp/lib/sprout/sprout/functional/inc_dec.hpp deleted file mode 100644 index 484f0c0..0000000 --- a/dsp/lib/sprout/sprout/functional/inc_dec.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_INC_DEC_HPP -#define SPROUT_FUNCTIONAL_INC_DEC_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_INC_DEC_HPP diff --git a/dsp/lib/sprout/sprout/functional/invoke.hpp b/dsp/lib/sprout/sprout/functional/invoke.hpp deleted file mode 100644 index 54f2937..0000000 --- a/dsp/lib/sprout/sprout/functional/invoke.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_INVOKE_HPP -#define SPROUT_FUNCTIONAL_INVOKE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // invoke - // - template - inline SPROUT_CONSTEXPR typename sprout::invoke_result::type - invoke(F&& f, Args&&... args) SPROUT_NOEXCEPT_IF((sprout::is_nothrow_invocable::value)) { - return sprout::detail::invoke(SPROUT_FORWARD(F, f), SPROUT_FORWARD(Args, args)...); - } -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_INVOKE_HPP diff --git a/dsp/lib/sprout/sprout/functional/less.hpp b/dsp/lib/sprout/sprout/functional/less.hpp deleted file mode 100644 index 329e1c0..0000000 --- a/dsp/lib/sprout/sprout/functional/less.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_LESS_HPP -#define SPROUT_FUNCTIONAL_LESS_HPP - -#include -#include -#include -#include - -namespace sprout { - - // 20.8.5 Comparisons - template - struct less { - public: - typedef T first_argument_type; - typedef T second_argument_type; - typedef bool result_type; - public: - SPROUT_CONSTEXPR bool operator()(T const& x, T const& y) const { - return x < y; - } - }; - - template<> - struct less - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval() < std::declval()) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval() < std::declval()) - { - return SPROUT_FORWARD(T, x) < SPROUT_FORWARD(U, y); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_LESS_HPP diff --git a/dsp/lib/sprout/sprout/functional/less_equal.hpp b/dsp/lib/sprout/sprout/functional/less_equal.hpp deleted file mode 100644 index b586897..0000000 --- a/dsp/lib/sprout/sprout/functional/less_equal.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_LESS_EQUAL_HPP -#define SPROUT_FUNCTIONAL_LESS_EQUAL_HPP - -#include -#include -#include -#include - -namespace sprout { - - // 20.8.5 Comparisons - template - struct less_equal { - public: - typedef T first_argument_type; - typedef T second_argument_type; - typedef bool result_type; - public: - SPROUT_CONSTEXPR bool operator()(T const& x, T const& y) const { - return x <= y; - } - }; - - template<> - struct less_equal - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval() <= std::declval()) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval() <= std::declval()) - { - return SPROUT_FORWARD(T, x) <= SPROUT_FORWARD(U, y); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_LESS_EQUAL_HPP diff --git a/dsp/lib/sprout/sprout/functional/logical.hpp b/dsp/lib/sprout/sprout/functional/logical.hpp deleted file mode 100644 index 32ac079..0000000 --- a/dsp/lib/sprout/sprout/functional/logical.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_LOGICAL_HPP -#define SPROUT_FUNCTIONAL_LOGICAL_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_LOGICAL_HPP diff --git a/dsp/lib/sprout/sprout/functional/logical_and.hpp b/dsp/lib/sprout/sprout/functional/logical_and.hpp deleted file mode 100644 index 7663030..0000000 --- a/dsp/lib/sprout/sprout/functional/logical_and.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_LOGICAL_AND_HPP -#define SPROUT_FUNCTIONAL_LOGICAL_AND_HPP - -#include -#include -#include -#include - -namespace sprout { - // 20.8.6 logical operations - template - struct logical_and { - public: - typedef T first_argument_type; - typedef T second_argument_type; - typedef bool result_type; - public: - SPROUT_CONSTEXPR bool operator()(T const& x, T const& y) const { - return x && y; - } - }; - - template<> - struct logical_and - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval() && std::declval()) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval() && std::declval()) - { - return SPROUT_FORWARD(T, x) && SPROUT_FORWARD(U, y); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_LOGICAL_AND_HPP diff --git a/dsp/lib/sprout/sprout/functional/logical_not.hpp b/dsp/lib/sprout/sprout/functional/logical_not.hpp deleted file mode 100644 index 731f94b..0000000 --- a/dsp/lib/sprout/sprout/functional/logical_not.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_LOGICAL_NOT_HPP -#define SPROUT_FUNCTIONAL_LOGICAL_NOT_HPP - -#include -#include -#include -#include - -namespace sprout { - // 20.8.6 logical operations - template - struct logical_not { - public: - typedef T argument_type; - typedef bool result_type; - public: - SPROUT_CONSTEXPR bool operator()(T const& x) const { - return !x; - } - }; - - template<> - struct logical_not - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(!std::declval()) - operator()(T&& x) - const SPROUT_NOEXCEPT_IF_EXPR(!std::declval()) - { - return !SPROUT_FORWARD(T, x); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_LOGICAL_NOT_HPP diff --git a/dsp/lib/sprout/sprout/functional/logical_or.hpp b/dsp/lib/sprout/sprout/functional/logical_or.hpp deleted file mode 100644 index 2ccad67..0000000 --- a/dsp/lib/sprout/sprout/functional/logical_or.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_LOGICAL_OR_HPP -#define SPROUT_FUNCTIONAL_LOGICAL_OR_HPP - -#include -#include -#include -#include - -namespace sprout { - // 20.8.6 logical operations - template - struct logical_or { - public: - typedef T first_argument_type; - typedef T second_argument_type; - typedef bool result_type; - public: - SPROUT_CONSTEXPR bool operator()(T const& x, T const& y) const { - return x || y; - } - }; - - template<> - struct logical_or - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval() || std::declval()) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval() || std::declval()) - { - return SPROUT_FORWARD(T, x) || SPROUT_FORWARD(U, y); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_LOGICAL_OR_HPP diff --git a/dsp/lib/sprout/sprout/functional/mem_fn.hpp b/dsp/lib/sprout/sprout/functional/mem_fn.hpp deleted file mode 100644 index 76abc1c..0000000 --- a/dsp/lib/sprout/sprout/functional/mem_fn.hpp +++ /dev/null @@ -1,278 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_MEM_FN_HPP -#define SPROUT_FUNCTIONAL_MEM_FN_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - // 20.8.10 member function adaptors - - namespace detail { - template - struct maybe_unary_or_binary_function {}; - template - struct maybe_unary_or_binary_function - : public sprout::unary_function - {}; - template - struct maybe_unary_or_binary_function - : public sprout::binary_function - {}; - - template - struct mem_fn_const_or_non { - public: - typedef T const& type; - }; - template - struct mem_fn_const_or_non { - public: - typedef T& type; - }; - } // namespace detail - - // - // mem_fn_adaptor - // - template - class mem_fn_adaptor; - template - class mem_fn_adaptor - : public sprout::detail::maybe_unary_or_binary_function - { - public: - typedef Res result_type; - private: - typedef Res (Class::*functor)(Args...); - private: - Res (Class::*pmf_)(Args...); - private: - template - Res call(T& object, Class const volatile*, Args... args) const { - return (object.*pmf_)(SPROUT_FORWARD(Args, args)...); - } - template - Res call(T& ptr, void const volatile*, Args... args) const { - return ((*ptr).*pmf_)(SPROUT_FORWARD(Args, args)...); - } - public: - explicit SPROUT_CONSTEXPR mem_fn_adaptor(Res (Class::*pmf)(Args...)) - : pmf_(pmf) - {} - Res operator()(Class& object, Args... args) const { - return (object.*pmf_)(SPROUT_FORWARD(Args, args)...); - } - Res operator()(Class* object, Args... args) const { - return (object->*pmf_)(SPROUT_FORWARD(Args, args)...); - } - template - Res operator()(T& object, Args... args) const { - return call(object, &object, SPROUT_FORWARD(Args, args)...); - } - }; - template - class mem_fn_adaptor - : public sprout::detail::maybe_unary_or_binary_function - { - public: - typedef Res result_type; - private: - typedef Res (Class::*functor)(Args...) const; - private: - Res (Class::*pmf_)(Args...) const; - private: - template - SPROUT_CONSTEXPR Res call(T const& object, Class const volatile*, Args... args) const { - return (object.*pmf_)(SPROUT_FORWARD(Args, args)...); - } - template - SPROUT_CONSTEXPR Res call(T const& ptr, void const volatile*, Args... args) const { - return ((*ptr).*pmf_)(SPROUT_FORWARD(Args, args)...); - } - public: - explicit SPROUT_CONSTEXPR mem_fn_adaptor(Res (Class::*pmf)(Args...) const) - : pmf_(pmf) - {} - SPROUT_CONSTEXPR Res operator()(Class const& object, Args... args) const { - return (object.*pmf_)(SPROUT_FORWARD(Args, args)...); - } - SPROUT_CONSTEXPR Res operator()(Class const* object, Args... args) const { - return (object->*pmf_)(SPROUT_FORWARD(Args, args)...); - } - template - SPROUT_CONSTEXPR Res operator()(T const& object, Args... args) const { - return call(object, &object, SPROUT_FORWARD(Args, args)...); - } - }; - template - class mem_fn_adaptor - : public sprout::detail::maybe_unary_or_binary_function - { - public: - typedef Res result_type; - private: - typedef Res (Class::*functor)(Args...) volatile; - private: - Res (Class::*pmf_)(Args...) volatile; - private: - template - Res call(T& object, Class const volatile*, Args... args) const { - return (object.*pmf_)(SPROUT_FORWARD(Args, args)...); - } - template - Res call(T& ptr, void const volatile*, Args... args) const { - return ((*ptr).*pmf_)(SPROUT_FORWARD(Args, args)...); - } - public: - explicit SPROUT_CONSTEXPR mem_fn_adaptor(Res (Class::*pmf)(Args...) volatile) - : pmf_(pmf) - {} - Res operator()(Class volatile& object, Args... args) const { - return (object.*pmf_)(SPROUT_FORWARD(Args, args)...); - } - Res operator()(Class volatile* object, Args... args) const { - return (object->*pmf_)(SPROUT_FORWARD(Args, args)...); - } - template - Res operator()(T& object, Args... args) const { - return call(object, &object, SPROUT_FORWARD(Args, args)...); - } - }; - template - class mem_fn_adaptor - : public sprout::detail::maybe_unary_or_binary_function - { - public: - typedef Res result_type; - private: - typedef Res (Class::*functor)(Args...) const volatile; - private: - Res (Class::*pmf_)(Args...) const volatile; - private: - template - SPROUT_CONSTEXPR Res call(T const& object, Class const volatile*, Args... args) const { - return (object.*pmf_)(SPROUT_FORWARD(Args, args)...); - } - template - SPROUT_CONSTEXPR Res call(T const& ptr, void const volatile*, Args... args) const { - return ((*ptr).*pmf_)(SPROUT_FORWARD(Args, args)...); - } - public: - explicit SPROUT_CONSTEXPR mem_fn_adaptor(Res (Class::*pmf)(Args...) const volatile) - : pmf_(pmf) - {} - SPROUT_CONSTEXPR Res operator()(Class const volatile& object, Args... args) const { - return (object.*pmf_)(SPROUT_FORWARD(Args, args)...); - } - SPROUT_CONSTEXPR Res operator()(Class const volatile* object, Args... args) const { - return (object->*pmf_)(SPROUT_FORWARD(Args, args)...); - } - template - SPROUT_CONSTEXPR Res operator()(T const& object, Args... args) const { - return call(object, &object, SPROUT_FORWARD(Args, args)...); - } - }; - - template - class mem_fn_adaptor { - private: - typedef char one; - struct two { char v[2]; }; - private: - template - static T& get_ref(); - template - static one check_const(T&, Class*); - template - static one check_const(T&, Up* const*); - template - static two check_const(T&, Up const* const*); - template - static two check_const(T&, Class const*); - template - static two check_const(T&, void const volatile*); - public: - template - struct result_type - : public sprout::detail::mem_fn_const_or_non< - Res, - (sizeof(two) == sizeof(check_const(get_ref(), typename sprout::identity::type()))) - > - {}; - template - struct result; - template - struct result - : public result_type - {}; - template - struct result - : public result_type - {}; - private: - Res Class::* pm_; - private: - template - Res& call(T& object, Class*) const { - return object.*pm_; - } - template - Res& call(T& object, Up* const*) const { - return (*object).*pm_; - } - template - const Res& call(T& object, Up const* const*) const { - return (*object).*pm_; - } - template - Res const& call(T& object, Class const*) const { - return object.*pm_; - } - template - const Res& call(T& ptr, void const volatile*) const { - return (*ptr).*pm_; - } - public: - explicit SPROUT_CONSTEXPR mem_fn_adaptor(Res Class::* pm) - : pm_(pm) - {} - Res& operator()(Class& object) const { - return object.*pm_; - } - SPROUT_CONSTEXPR Res const& operator()(Class const& object) const { - return object.*pm_; - } - Res& operator()(Class* object) const { - return object->*pm_; - } - SPROUT_CONSTEXPR Res const& operator()(Class const* object) const { - return object->*pm_; - } - template - typename result_type::type operator()(T& unknown) const { - return call(unknown, &unknown); - } - }; - - // - // mem_fn - // - template - inline SPROUT_CONSTEXPR sprout::mem_fn_adaptor - mem_fn(T Class::* pm) { - return sprout::mem_fn_adaptor(pm); - } -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_MEM_FN_HPP diff --git a/dsp/lib/sprout/sprout/functional/mem_fun.hpp b/dsp/lib/sprout/sprout/functional/mem_fun.hpp deleted file mode 100644 index feeafee..0000000 --- a/dsp/lib/sprout/sprout/functional/mem_fun.hpp +++ /dev/null @@ -1,102 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_MEM_FUN_HPP -#define SPROUT_FUNCTIONAL_MEM_FUN_HPP - -#include -#include - -namespace sprout { - // D.8.2.2 adaptors (deprecated) - - template - class mem_fun_t - : public sprout::unary_function - { - private: - Ret (T::*f_)(); - public: - explicit SPROUT_CONSTEXPR mem_fun_t(Ret (T::*pf)()) - : f_(pf) - {} - SPROUT_CONSTEXPR Ret operator()(T* p) const { - return (p->*f_)(); - } - }; - - template - class const_mem_fun_t - : public sprout::unary_function - { - private: - Ret (T::*f_)() const; - public: - explicit SPROUT_CONSTEXPR const_mem_fun_t(Ret (T::*pf)() const) - : f_(pf) - {} - SPROUT_CONSTEXPR Ret operator()(const T* p) const { - return (p->*f_)(); - } - }; - - template - class mem_fun1_t - : public sprout::binary_function - { - private: - Ret (T::*f_)(Arg); - public: - explicit SPROUT_CONSTEXPR mem_fun1_t(Ret (T::*pf)(Arg)) - : f_(pf) - {} - SPROUT_CONSTEXPR Ret operator()(T* p, Arg x) const { - return (p->*f_)(x); - } - }; - - template - class const_mem_fun1_t - : public sprout::binary_function - { - private: - Ret (T::*f_)(Arg) const; - public: - explicit SPROUT_CONSTEXPR const_mem_fun1_t(Ret (T::*pf)(Arg) const) - : f_(pf) - {} - SPROUT_CONSTEXPR Ret operator()(const T* p, Arg x) const { - return (p->*f_)(x); - } - }; - - template - inline SPROUT_CONSTEXPR sprout::mem_fun_t - mem_fun(Ret (T::*f)()) { - return sprout::mem_fun_t(f); - } - - template - inline SPROUT_CONSTEXPR sprout::const_mem_fun_t - mem_fun(Ret (T::*f)() const) { - return sprout::const_mem_fun_t(f); - } - - template - inline SPROUT_CONSTEXPR sprout::mem_fun1_t - mem_fun(Ret (T::*f)(Arg)) { - return sprout::mem_fun1_t(f); - } - - template - inline SPROUT_CONSTEXPR sprout::const_mem_fun1_t - mem_fun(Ret (T::*f)(Arg) const) { - return sprout::const_mem_fun1_t(f); - } -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_MEM_FUN_HPP diff --git a/dsp/lib/sprout/sprout/functional/mem_fun_ref.hpp b/dsp/lib/sprout/sprout/functional/mem_fun_ref.hpp deleted file mode 100644 index d80b79c..0000000 --- a/dsp/lib/sprout/sprout/functional/mem_fun_ref.hpp +++ /dev/null @@ -1,102 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_MEM_FUN_REF_HPP -#define SPROUT_FUNCTIONAL_MEM_FUN_REF_HPP - -#include -#include - -namespace sprout { - // D.8.2.2 adaptors (deprecated) - - template - class mem_fun_ref_t - : public sprout::unary_function - { - private: - Ret (T::*f_)(); - public: - explicit SPROUT_CONSTEXPR mem_fun_ref_t(Ret (T::*pf)()) - : f_(pf) - {} - SPROUT_CONSTEXPR Ret operator()(T& r) const { - return (r.*f_)(); - } - }; - - template - class const_mem_fun_ref_t - : public sprout::unary_function - { - private: - Ret (T::*f_)() const; - public: - explicit SPROUT_CONSTEXPR const_mem_fun_ref_t(Ret (T::*pf)() const) - : f_(pf) - {} - SPROUT_CONSTEXPR Ret operator()(const T& r) const { - return (r.*f_)(); - } - }; - - template - class mem_fun1_ref_t - : public sprout::binary_function - { - private: - Ret (T::*f_)(Arg); - public: - explicit SPROUT_CONSTEXPR mem_fun1_ref_t(Ret (T::*pf)(Arg)) - : f_(pf) - {} - SPROUT_CONSTEXPR Ret operator()(T& r, Arg x) const { - return (r.*f_)(x); - } - }; - - template - class const_mem_fun1_ref_t - : public sprout::binary_function - { - private: - Ret (T::*f_)(Arg) const; - public: - explicit SPROUT_CONSTEXPR const_mem_fun1_ref_t(Ret (T::*pf)(Arg) const) - : f_(pf) - {} - SPROUT_CONSTEXPR Ret operator()(const T& r, Arg x) const { - return (r.*f_)(x); - } - }; - - template - inline SPROUT_CONSTEXPR sprout::mem_fun_ref_t - mem_fun_ref(Ret (T::*f)()) { - return sprout::mem_fun_ref_t(f); - } - - template - inline SPROUT_CONSTEXPR sprout::const_mem_fun_ref_t - mem_fun_ref(Ret (T::*f)() const) { - return sprout::const_mem_fun_ref_t(f); - } - - template - inline SPROUT_CONSTEXPR sprout::mem_fun1_ref_t - mem_fun_ref(Ret (T::*f)(Arg)) { - return sprout::mem_fun1_ref_t(f); - } - - template - inline SPROUT_CONSTEXPR sprout::const_mem_fun1_ref_t - mem_fun_ref(Ret (T::*f)(Arg) const) { - return sprout::const_mem_fun1_ref_t(f); - } -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_MEM_FUN_REF_HPP diff --git a/dsp/lib/sprout/sprout/functional/member.hpp b/dsp/lib/sprout/sprout/functional/member.hpp deleted file mode 100644 index 6492755..0000000 --- a/dsp/lib/sprout/sprout/functional/member.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_MEMBER_HPP -#define SPROUT_FUNCTIONAL_MEMBER_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // member - // - template - struct member; - template<> - struct member - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval().*std::declval()) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval().*std::declval()) - { - return SPROUT_FORWARD(T, x).*SPROUT_FORWARD(U, y); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_MEMBER_HPP diff --git a/dsp/lib/sprout/sprout/functional/member_pointer.hpp b/dsp/lib/sprout/sprout/functional/member_pointer.hpp deleted file mode 100644 index 45dfd30..0000000 --- a/dsp/lib/sprout/sprout/functional/member_pointer.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_MEMBER_POINTER_HPP -#define SPROUT_FUNCTIONAL_MEMBER_POINTER_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // member_pointer - // - template - struct member_pointer; - template<> - struct member_pointer - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval()->*std::declval()) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval()->*std::declval()) - { - return SPROUT_FORWARD(T, x)->*SPROUT_FORWARD(U, y); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_MEMBER_POINTER_HPP diff --git a/dsp/lib/sprout/sprout/functional/members.hpp b/dsp/lib/sprout/sprout/functional/members.hpp deleted file mode 100644 index 67ff512..0000000 --- a/dsp/lib/sprout/sprout/functional/members.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_MEMBERS_HPP -#define SPROUT_FUNCTIONAL_MEMBERS_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_MEMBERS_HPP diff --git a/dsp/lib/sprout/sprout/functional/minus.hpp b/dsp/lib/sprout/sprout/functional/minus.hpp deleted file mode 100644 index 325355a..0000000 --- a/dsp/lib/sprout/sprout/functional/minus.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_MINUS_HPP -#define SPROUT_FUNCTIONAL_MINUS_HPP - -#include -#include -#include -#include - -namespace sprout { - - // 20.8.4 Arithmetic operations - template - struct minus { - public: - typedef T first_argument_type; - typedef T second_argument_type; - typedef T result_type; - public: - SPROUT_CONSTEXPR T operator()(T const& x, T const& y) const { - return x - y; - } - }; - - template<> - struct minus - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval() - std::declval()) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval() - std::declval()) - { - return SPROUT_FORWARD(T, x) - SPROUT_FORWARD(U, y); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_MINUS_HPP diff --git a/dsp/lib/sprout/sprout/functional/minus_assign.hpp b/dsp/lib/sprout/sprout/functional/minus_assign.hpp deleted file mode 100644 index 7fa93a7..0000000 --- a/dsp/lib/sprout/sprout/functional/minus_assign.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_MINUS_ASSIGN_HPP -#define SPROUT_FUNCTIONAL_MINUS_ASSIGN_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // minus_assign - // - template - struct minus_assign; - template<> - struct minus_assign - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval() -= std::declval()) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval() -= std::declval()) - { - return SPROUT_FORWARD(T, x) -= SPROUT_FORWARD(U, y); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_MINUS_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/functional/modulus.hpp b/dsp/lib/sprout/sprout/functional/modulus.hpp deleted file mode 100644 index 9ac5062..0000000 --- a/dsp/lib/sprout/sprout/functional/modulus.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_MODULUS_HPP -#define SPROUT_FUNCTIONAL_MODULUS_HPP - -#include -#include -#include -#include - -namespace sprout { - - // 20.8.4 Arithmetic operations - template - struct modulus { - public: - typedef T first_argument_type; - typedef T second_argument_type; - typedef T result_type; - public: - SPROUT_CONSTEXPR T operator()(T const& x, T const& y) const { - return x % y; - } - }; - - template<> - struct modulus - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval() % std::declval()) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval() % std::declval()) - { - return SPROUT_FORWARD(T, x) % SPROUT_FORWARD(U, y); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_MODULUS_HPP diff --git a/dsp/lib/sprout/sprout/functional/modulus_assign.hpp b/dsp/lib/sprout/sprout/functional/modulus_assign.hpp deleted file mode 100644 index cc8293c..0000000 --- a/dsp/lib/sprout/sprout/functional/modulus_assign.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_MODULUS_ASSIGN_HPP -#define SPROUT_FUNCTIONAL_MODULUS_ASSIGN_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // modulus_assign - // - template - struct modulus_assign; - template<> - struct modulus_assign - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval() %= std::declval()) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval() %= std::declval()) - { - return SPROUT_FORWARD(T, x) %= SPROUT_FORWARD(U, y); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_MODULUS_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/functional/multiplies.hpp b/dsp/lib/sprout/sprout/functional/multiplies.hpp deleted file mode 100644 index 02a2a0f..0000000 --- a/dsp/lib/sprout/sprout/functional/multiplies.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_MULTIPLIES_HPP -#define SPROUT_FUNCTIONAL_MULTIPLIES_HPP - -#include -#include -#include -#include - -namespace sprout { - - // 20.8.4 Arithmetic operations - template - struct multiplies { - public: - typedef T first_argument_type; - typedef T second_argument_type; - typedef T result_type; - public: - SPROUT_CONSTEXPR T operator()(T const& x, T const& y) const { - return x * y; - } - }; - - template<> - struct multiplies - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval() * std::declval()) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval() * std::declval()) - { - return SPROUT_FORWARD(T, x) * SPROUT_FORWARD(U, y); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_MULTIPLIES_HPP diff --git a/dsp/lib/sprout/sprout/functional/multiplies_assign.hpp b/dsp/lib/sprout/sprout/functional/multiplies_assign.hpp deleted file mode 100644 index 17742dc..0000000 --- a/dsp/lib/sprout/sprout/functional/multiplies_assign.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_MULTIPLIES_ASSIGN_HPP -#define SPROUT_FUNCTIONAL_MULTIPLIES_ASSIGN_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // multiplies_assign - // - template - struct multiplies_assign; - template<> - struct multiplies_assign - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval() *= std::declval()) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval() *= std::declval()) - { - return SPROUT_FORWARD(T, x) *= SPROUT_FORWARD(U, y); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_MULTIPLIES_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/functional/negate.hpp b/dsp/lib/sprout/sprout/functional/negate.hpp deleted file mode 100644 index 2db2bd7..0000000 --- a/dsp/lib/sprout/sprout/functional/negate.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_NEGATE_HPP -#define SPROUT_FUNCTIONAL_NEGATE_HPP - -#include -#include -#include -#include - -namespace sprout { - - // 20.8.4 Arithmetic operations - template - struct negate { - public: - typedef T argument_type; - typedef T result_type; - public: - SPROUT_CONSTEXPR T operator()(T const& x) const { - return -x; - } - }; - - template<> - struct negate - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(-std::declval()) - operator()(T&& x) - const SPROUT_NOEXCEPT_IF_EXPR(-std::declval()) - { - return -SPROUT_FORWARD(T, x); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_NEGATE_HPP diff --git a/dsp/lib/sprout/sprout/functional/negator.hpp b/dsp/lib/sprout/sprout/functional/negator.hpp deleted file mode 100644 index 5580e16..0000000 --- a/dsp/lib/sprout/sprout/functional/negator.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_NEGATOR_HPP -#define SPROUT_FUNCTIONAL_NEGATOR_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_NEGATOR_HPP diff --git a/dsp/lib/sprout/sprout/functional/not1.hpp b/dsp/lib/sprout/sprout/functional/not1.hpp deleted file mode 100644 index fa7d235..0000000 --- a/dsp/lib/sprout/sprout/functional/not1.hpp +++ /dev/null @@ -1,72 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_NOT1_HPP -#define SPROUT_FUNCTIONAL_NOT1_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template::value> - class unary_negate_impl; - - template - class unary_negate_impl { - public: - typedef typename Predicate::argument_type argument_type; - typedef bool result_type; - protected: - Predicate fn; - public: - explicit SPROUT_CONSTEXPR unary_negate_impl(Predicate const& pred) - : fn(pred) - {} - SPROUT_CONSTEXPR bool operator()(typename Predicate::argument_type const& x) const { - return !fn(x); - } - }; - - template - class unary_negate_impl { - protected: - Predicate fn; - public: - explicit SPROUT_CONSTEXPR unary_negate_impl(Predicate const& pred) - : fn(pred) - {} - template - SPROUT_CONSTEXPR decltype(!std::declval()(std::declval())) - operator()(T&& x) const { - return !fn(SPROUT_FORWARD(T, x)); - } - }; - } // namespace detail - - // 20.8.8 negators - template - class unary_negate - : public sprout::detail::unary_negate_impl - { - public: - explicit SPROUT_CONSTEXPR unary_negate(Predicate const& pred) - : sprout::detail::unary_negate_impl(pred) - {} - }; - - template - inline SPROUT_CONSTEXPR sprout::unary_negate - not1(Predicate const& pred) { - return sprout::unary_negate(pred); - } -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_NOT1_HPP diff --git a/dsp/lib/sprout/sprout/functional/not2.hpp b/dsp/lib/sprout/sprout/functional/not2.hpp deleted file mode 100644 index b2c5ba2..0000000 --- a/dsp/lib/sprout/sprout/functional/not2.hpp +++ /dev/null @@ -1,73 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_NOT2_HPP -#define SPROUT_FUNCTIONAL_NOT2_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template::value> - class binary_negate_impl; - - template - class binary_negate_impl { - public: - typedef typename Predicate::first_argument_type first_argument_type; - typedef typename Predicate::second_argument_type second_argument_type; - typedef bool result_type; - protected: - Predicate fn; - public: - explicit SPROUT_CONSTEXPR binary_negate_impl(Predicate const& pred) - : fn(pred) - {} - SPROUT_CONSTEXPR bool operator()(typename Predicate::first_argument_type const& x, typename Predicate::second_argument_type const& y) const { - return !fn(x, y); - } - }; - - template - class binary_negate_impl { - protected: - Predicate fn; - public: - explicit SPROUT_CONSTEXPR binary_negate_impl(Predicate const& pred) - : fn(pred) - {} - template - SPROUT_CONSTEXPR decltype(!std::declval()(std::declval(), std::declval())) - operator()(T&& x, U&& y) const { - return !fn(SPROUT_FORWARD(T, x), SPROUT_FORWARD(U, y)); - } - }; - } // namespace detail - - // 20.8.8 negators - template - class binary_negate - : public sprout::detail::binary_negate_impl - { - public: - explicit SPROUT_CONSTEXPR binary_negate(Predicate const& pred) - : sprout::detail::binary_negate_impl(pred) - {} - }; - - template - inline SPROUT_CONSTEXPR sprout::binary_negate - not2(Predicate const& pred) { - return sprout::binary_negate(pred); - } -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_NOT2_HPP diff --git a/dsp/lib/sprout/sprout/functional/not_equal_to.hpp b/dsp/lib/sprout/sprout/functional/not_equal_to.hpp deleted file mode 100644 index b4d669c..0000000 --- a/dsp/lib/sprout/sprout/functional/not_equal_to.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_NOT_EQUAL_TO_HPP -#define SPROUT_FUNCTIONAL_NOT_EQUAL_TO_HPP - -#include -#include -#include - -namespace sprout { - - // 20.8.5 Comparisons - template - struct not_equal_to { - public: - typedef T first_argument_type; - typedef T second_argument_type; - typedef bool result_type; - public: - SPROUT_CONSTEXPR bool operator()(T const& x, T const& y) const { - return x != y; - } - }; - - template<> - struct not_equal_to { - public: - typedef void is_transparent; - public: - template - SPROUT_CONSTEXPR decltype(std::declval() != std::declval()) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval() != std::declval()) - { - return SPROUT_FORWARD(T, x) != SPROUT_FORWARD(U, y); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_NOT_EQUAL_TO_HPP diff --git a/dsp/lib/sprout/sprout/functional/plus.hpp b/dsp/lib/sprout/sprout/functional/plus.hpp deleted file mode 100644 index 3dc087a..0000000 --- a/dsp/lib/sprout/sprout/functional/plus.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_PLUS_HPP -#define SPROUT_FUNCTIONAL_PLUS_HPP - -#include -#include -#include -#include - -namespace sprout { - - // 20.8.4 Arithmetic operations - template - struct plus { - public: - typedef T first_argument_type; - typedef T second_argument_type; - typedef T result_type; - public: - SPROUT_CONSTEXPR T operator()(T const& x, T const& y) const { - return x + y; - } - }; - - template<> - struct plus - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval() + std::declval()) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval() + std::declval()) - { - return SPROUT_FORWARD(T, x) + SPROUT_FORWARD(U, y); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_PLUS_HPP diff --git a/dsp/lib/sprout/sprout/functional/plus_assign.hpp b/dsp/lib/sprout/sprout/functional/plus_assign.hpp deleted file mode 100644 index 031e28f..0000000 --- a/dsp/lib/sprout/sprout/functional/plus_assign.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_PLUS_ASSIGN_HPP -#define SPROUT_FUNCTIONAL_PLUS_ASSIGN_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // plus_assign - // - template - struct plus_assign; - template<> - struct plus_assign - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval() += std::declval()) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval() += std::declval()) - { - return SPROUT_FORWARD(T, x) += SPROUT_FORWARD(U, y); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_PLUS_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic.hpp b/dsp/lib/sprout/sprout/functional/polymorphic.hpp deleted file mode 100644 index e37001d..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_HPP - -#include -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/address_of.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/address_of.hpp deleted file mode 100644 index ed19d23..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/address_of.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_ADDRESS_OF_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_ADDRESS_OF_HPP - -#include -#include - -namespace sprout { - // - // address_of_t - // address_of_ - // - typedef sprout::address_of<> address_of_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::address_of_t address_of_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_ADDRESS_OF_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/arithmetic.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/arithmetic.hpp deleted file mode 100644 index 91087c5..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/arithmetic.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_ARITHMETIC_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_ARITHMETIC_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_ARITHMETIC_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/assign.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/assign.hpp deleted file mode 100644 index 3f278bd..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/assign.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_ASSIGN_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_ASSIGN_HPP - -#include -#include - -namespace sprout { - // - // assign_t - // assign_ - // - typedef sprout::assign<> assign_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::assign_t assign_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/assignment.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/assignment.hpp deleted file mode 100644 index 2077da3..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/assignment.hpp +++ /dev/null @@ -1,24 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_ASSIGNMENT_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_ASSIGNMENT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_ASSIGNMENT_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/bind1st.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/bind1st.hpp deleted file mode 100644 index c82f52b..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/bind1st.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_BIND1ST_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_BIND1ST_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // binder1st_ - // bind1st_ - // - template - class binder1st_ { - protected: - Fn op; - T value; - public: - SPROUT_CONSTEXPR binder1st_(Fn&& x, T&& y) - : op(SPROUT_FORWARD(Fn, x)), value(SPROUT_FORWARD(T, y)) - {} - template - SPROUT_CONSTEXPR decltype(op(value, std::declval())) - operator()(Arg&& x) - const SPROUT_NOEXCEPT_IF_EXPR(op(value, std::declval())) - { - return op(value, SPROUT_FORWARD(Arg, x)); - } - }; - template - inline SPROUT_CONSTEXPR sprout::binder1st_::type, typename std::decay::type> - bind1st_(Fn&& fn, T&& x) { - typedef sprout::binder1st_::type, typename std::decay::type> type; - return type(SPROUT_FORWARD(Fn, fn), SPROUT_FORWARD(T, x)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_BIND1ST_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/bind2nd.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/bind2nd.hpp deleted file mode 100644 index 91af6ad..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/bind2nd.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_BIND2ND_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_BIND2ND_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // binder2nd_ - // bind2nd_ - // - template - class binder2nd_ { - protected: - Fn op; - T value; - public: - SPROUT_CONSTEXPR binder2nd_(Fn&& x, T&& y) - : op(SPROUT_FORWARD(Fn, x)), value(SPROUT_FORWARD(T, y)) - {} - template - SPROUT_CONSTEXPR decltype(op(std::declval(), value)) - operator()(Arg&& x) - const SPROUT_NOEXCEPT_IF_EXPR(op(std::declval(), value)) - { - return op(SPROUT_FORWARD(Arg, x), value); - } - }; - template - inline SPROUT_CONSTEXPR sprout::binder2nd_::type, typename std::decay::type> - bind2nd_(Fn&& fn, T&& x) { - typedef sprout::binder2nd_::type, typename std::decay::type> type; - return type(SPROUT_FORWARD(Fn, fn), SPROUT_FORWARD(T, x)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_BIND2ND_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/binder.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/binder.hpp deleted file mode 100644 index a234bdf..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/binder.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_BINDER_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_BINDER_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_BINDER_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/bit_and.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/bit_and.hpp deleted file mode 100644 index 9600d54..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/bit_and.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_BIT_AND_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_BIT_AND_HPP - -#include -#include - -namespace sprout { - // - // bit_and_t - // bit_and_ - // - typedef sprout::bit_and<> bit_and_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::bit_and_t bit_and_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_BIT_AND_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/bit_and_assign.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/bit_and_assign.hpp deleted file mode 100644 index f232937..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/bit_and_assign.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_BIT_AND_ASSIGN_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_BIT_AND_ASSIGN_HPP - -#include -#include - -namespace sprout { - // - // bit_and_assign_t - // bit_and_assign_ - // - typedef sprout::bit_and_assign<> bit_and_assign_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::bit_and_assign_t bit_and_assign_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_BIT_AND_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/bit_not.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/bit_not.hpp deleted file mode 100644 index b03925a..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/bit_not.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_BIT_NOT_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_BIT_NOT_HPP - -#include -#include - -namespace sprout { - // - // bit_not_t - // bit_not_ - // - typedef sprout::bit_not<> bit_not_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::bit_not_t bit_not_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_BIT_NOT_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/bit_or.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/bit_or.hpp deleted file mode 100644 index e843ceb..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/bit_or.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_BIT_OR_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_BIT_OR_HPP - -#include -#include - -namespace sprout { - // - // bit_or_t - // bit_or_ - // - typedef sprout::bit_or<> bit_or_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::bit_or_t bit_or_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_BIT_OR_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/bit_or_assign.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/bit_or_assign.hpp deleted file mode 100644 index 7819f62..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/bit_or_assign.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_BIT_OR_ASSIGN_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_BIT_OR_ASSIGN_HPP - -#include -#include - -namespace sprout { - // - // bit_or_assign_t - // bit_or_assign_ - // - typedef sprout::bit_or_assign<> bit_or_assign_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::bit_or_assign_t bit_or_assign_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_BIT_OR_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/bit_xor.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/bit_xor.hpp deleted file mode 100644 index f7019e3..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/bit_xor.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_BIT_XOR_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_BIT_XOR_HPP - -#include -#include - -namespace sprout { - // - // bit_xor_t - // bit_xor_ - // - typedef sprout::bit_xor<> bit_xor_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::bit_xor_t bit_xor_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_BIT_XOR_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/bit_xor_assign.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/bit_xor_assign.hpp deleted file mode 100644 index 1deee32..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/bit_xor_assign.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_BIT_XOR_ASSIGN_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_BIT_XOR_ASSIGN_HPP - -#include -#include - -namespace sprout { - // - // bit_xor_assign_t - // bit_xor_assign_ - // - typedef sprout::bit_xor_assign<> bit_xor_assign_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::bit_xor_assign_t bit_xor_assign_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_BIT_XOR_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/bitwise.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/bitwise.hpp deleted file mode 100644 index a9bc5f9..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/bitwise.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_BITWISE_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_BITWISE_HPP - -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_BITWISE_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/call_fun.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/call_fun.hpp deleted file mode 100644 index 8644752..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/call_fun.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_CALL_FUN_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_CALL_FUN_HPP - -#include -#include - -namespace sprout { - // - // call_fun_t - // call_fun_ - // - typedef sprout::call_fun<> call_fun_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::call_fun_t call_fun_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_CALL_FUN_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/comma.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/comma.hpp deleted file mode 100644 index 7d6aaa5..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/comma.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_COMMA_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_COMMA_HPP - -#include -#include - -namespace sprout { - // - // comma_t - // comma_ - // - typedef sprout::comma<> comma_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::comma_t comma_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_COMMA_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/comparison.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/comparison.hpp deleted file mode 100644 index 4b90b26..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/comparison.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_COMPARISON_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_COMPARISON_HPP - -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_COMPARISON_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/cond.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/cond.hpp deleted file mode 100644 index 3b784e2..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/cond.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_COND_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_COND_HPP - -#include -#include - -namespace sprout { - // - // cond_t - // cond_ - // - typedef sprout::cond<> cond_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::cond_t cond_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_COND_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/dereference.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/dereference.hpp deleted file mode 100644 index 1c65709..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/dereference.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_DEREFERENCE_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_DEREFERENCE_HPP - -#include -#include - -namespace sprout { - // - // dereference_t - // dereference_ - // - typedef sprout::dereference<> dereference_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::dereference_t dereference_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_DEREFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/divides.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/divides.hpp deleted file mode 100644 index 5c9634c..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/divides.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_DEVIDES_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_DEVIDES_HPP - -#include -#include - -namespace sprout { - // - // divides_t - // divides_ - // - typedef sprout::divides<> divides_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::divides_t divides_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_DEVIDES_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/divides_assign.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/divides_assign.hpp deleted file mode 100644 index 8acef3a..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/divides_assign.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_DEVIDES_ASSIGN_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_DEVIDES_ASSIGN_HPP - -#include -#include - -namespace sprout { - // - // divides_assign_t - // divides_assign_ - // - typedef sprout::divides_assign<> divides_assign_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::divides_assign_t divides_assign_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_DEVIDES_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/equal_to.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/equal_to.hpp deleted file mode 100644 index 0156e55..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/equal_to.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_EQUAL_TO_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_EQUAL_TO_HPP - -#include -#include - -namespace sprout { - // - // equal_to_t - // equal_to_ - // - typedef sprout::equal_to<> equal_to_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::equal_to_t equal_to_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_EQUAL_TO_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/functor.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/functor.hpp deleted file mode 100644 index e052ec4..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/functor.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_FUNCTOR_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_FUNCTOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_FUNCTOR_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/greater.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/greater.hpp deleted file mode 100644 index c4d5588..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/greater.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_GREATER_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_GREATER_HPP - -#include -#include - -namespace sprout { - // - // greater_t - // greater_ - // - typedef sprout::greater<> greater_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::greater_t greater_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_GREATER_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/greater_equal.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/greater_equal.hpp deleted file mode 100644 index 61ecc6d..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/greater_equal.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_GREATER_EQUAL_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_GREATER_EQUAL_HPP - -#include -#include - -namespace sprout { - // - // greater_equal_t - // greater_equal_ - // - typedef sprout::greater_equal<> greater_equal_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::greater_equal_t greater_equal_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_GREATER_EQUAL_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/inc_dec.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/inc_dec.hpp deleted file mode 100644 index da0c49c..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/inc_dec.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_INC_DEC_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_INC_DEC_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_INC_DEC_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/less.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/less.hpp deleted file mode 100644 index df232f0..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/less.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_LESS_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_LESS_HPP - -#include -#include - -namespace sprout { - // - // less_t - // less_ - // - typedef sprout::less<> less_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::less_t less_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_LESS_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/less_equal.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/less_equal.hpp deleted file mode 100644 index 5a511c0..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/less_equal.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_LESS_EQUAL_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_LESS_EQUAL_HPP - -#include -#include - -namespace sprout { - // - // less_equal_t - // less_equal_ - // - typedef sprout::less_equal<> less_equal_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::less_equal_t less_equal_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_LESS_EQUAL_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/logical.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/logical.hpp deleted file mode 100644 index f18ec2c..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/logical.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_LOGICAL_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_LOGICAL_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_LOGICAL_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/logical_and.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/logical_and.hpp deleted file mode 100644 index dcfc6ae..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/logical_and.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_LOGICAL_AND_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_LOGICAL_AND_HPP - -#include -#include - -namespace sprout { - // - // logical_and_t - // logical_and_ - // - typedef sprout::logical_and<> logical_and_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::logical_and_t logical_and_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_LOGICAL_AND_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/logical_not.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/logical_not.hpp deleted file mode 100644 index 28360f1..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/logical_not.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_LOGICAL_NOT_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_LOGICAL_NOT_HPP - -#include -#include - -namespace sprout { - // - // logical_not_t - // logical_not_ - // - typedef sprout::logical_not<> logical_not_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::logical_not_t logical_not_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_LOGICAL_NOT_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/logical_or.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/logical_or.hpp deleted file mode 100644 index 1a70aa8..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/logical_or.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_LOGICAL_OR_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_LOGICAL_OR_HPP - -#include -#include - -namespace sprout { - // - // logical_or_t - // logical_or_ - // - typedef sprout::logical_or<> logical_or_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::logical_or_t logical_or_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_LOGICAL_OR_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/member.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/member.hpp deleted file mode 100644 index d399ed2..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/member.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_MEMBER_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_MEMBER_HPP - -#include -#include - -namespace sprout { - // - // member_t - // member_ - // - typedef sprout::member<> member_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::member_t member_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_MEMBER_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/member_pointer.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/member_pointer.hpp deleted file mode 100644 index d987b9c..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/member_pointer.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_MEMBER_POINTER_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_MEMBER_POINTER_HPP - -#include -#include - -namespace sprout { - // - // member_pointer_t - // member_pointer_ - // - typedef sprout::member_pointer<> member_pointer_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::member_pointer_t member_pointer_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_MEMBER_POINTER_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/members.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/members.hpp deleted file mode 100644 index ea14cec..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/members.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_MEMBERS_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_MEMBERS_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_MEMBERS_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/minus.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/minus.hpp deleted file mode 100644 index 6d0b6e2..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/minus.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_MINUS_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_MINUS_HPP - -#include -#include - -namespace sprout { - // - // minus_t - // minus_ - // - typedef sprout::minus<> minus_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::minus_t minus_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_MINUS_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/minus_assign.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/minus_assign.hpp deleted file mode 100644 index 2a07b02..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/minus_assign.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_MINUS_ASSIGN_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_MINUS_ASSIGN_HPP - -#include -#include - -namespace sprout { - // - // minus_assign_t - // minus_assign_ - // - typedef sprout::minus_assign<> minus_assign_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::minus_assign_t minus_assign_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_MINUS_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/modulus.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/modulus.hpp deleted file mode 100644 index b89b287..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/modulus.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_MODULUS_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_MODULUS_HPP - -#include -#include - -namespace sprout { - // - // modulus_t - // modulus_ - // - typedef sprout::modulus<> modulus_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::modulus_t modulus_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_MODULUS_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/modulus_assign.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/modulus_assign.hpp deleted file mode 100644 index 661e490..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/modulus_assign.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_MODULUS_ASSIGN_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_MODULUS_ASSIGN_HPP - -#include -#include - -namespace sprout { - // - // modulus_assign_t - // modulus_assign_ - // - typedef sprout::modulus_assign<> modulus_assign_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::modulus_assign_t modulus_assign_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_MODULUS_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/multiplies.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/multiplies.hpp deleted file mode 100644 index 06bffbc..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/multiplies.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_MULTIPLIES_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_MULTIPLIES_HPP - -#include -#include - -namespace sprout { - // - // multiplies_t - // multiplies_ - // - typedef sprout::multiplies<> multiplies_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::multiplies_t multiplies_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_MULTIPLIES_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/multiplies_assign.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/multiplies_assign.hpp deleted file mode 100644 index 421b505..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/multiplies_assign.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_MULTIPLIES_ASSIGN_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_MULTIPLIES_ASSIGN_HPP - -#include -#include - -namespace sprout { - // - // multiplies_assign_t - // multiplies_assign_ - // - typedef sprout::multiplies_assign<> multiplies_assign_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::multiplies_assign_t multiplies_assign_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_MULTIPLIES_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/negate.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/negate.hpp deleted file mode 100644 index e41ff28..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/negate.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_NEGATE_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_NEGATE_HPP - -#include -#include - -namespace sprout { - // - // negate_t - // negate_ - // - typedef sprout::negate<> negate_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::negate_t negate_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_NEGATE_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/not_equal_to.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/not_equal_to.hpp deleted file mode 100644 index b03f20c..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/not_equal_to.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_NOT_EQUAL_TO_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_NOT_EQUAL_TO_HPP - -#include -#include - -namespace sprout { - // - // not_equal_to_t - // not_equal_to_ - // - typedef sprout::not_equal_to<> not_equal_to_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::not_equal_to_t not_equal_to_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_NOT_EQUAL_TO_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/plus.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/plus.hpp deleted file mode 100644 index 1b608f1..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/plus.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_PLUS_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_PLUS_HPP - -#include -#include - -namespace sprout { - // - // plus_t - // plus_ - // - typedef sprout::plus<> plus_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::plus_t plus_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_PLUS_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/plus_assign.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/plus_assign.hpp deleted file mode 100644 index ed35eb8..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/plus_assign.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_PLUS_ASSIGN_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_PLUS_ASSIGN_HPP - -#include -#include - -namespace sprout { - // - // plus_assign_t - // plus_assign_ - // - typedef sprout::plus_assign<> plus_assign_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::plus_assign_t plus_assign_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_PLUS_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/posite.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/posite.hpp deleted file mode 100644 index 41e6d60..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/posite.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_POSITE_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_POSITE_HPP - -#include -#include - -namespace sprout { - // - // posite_t - // posite_ - // - typedef sprout::posite<> posite_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::posite_t posite_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_POSITE_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/post_decrement.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/post_decrement.hpp deleted file mode 100644 index ec1abf9..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/post_decrement.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_POST_DECREMENT_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_POST_DECREMENT_HPP - -#include -#include - -namespace sprout { - // - // post_decrement_t - // post_decrement_ - // - typedef sprout::post_decrement<> post_decrement_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::post_decrement_t post_decrement_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_POST_DECREMENT_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/post_increment.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/post_increment.hpp deleted file mode 100644 index 5f71b3e..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/post_increment.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_POST_INCREMENT_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_POST_INCREMENT_HPP - -#include -#include - -namespace sprout { - // - // post_increment_t - // post_increment_ - // - typedef sprout::post_increment<> post_increment_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::post_increment_t post_increment_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_POST_INCREMENT_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/pre_decrement.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/pre_decrement.hpp deleted file mode 100644 index 633080c..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/pre_decrement.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_PRE_DECREMENT_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_PRE_DECREMENT_HPP - -#include -#include - -namespace sprout { - // - // pre_decrement_t - // pre_decrement_ - // - typedef sprout::pre_decrement<> pre_decrement_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::pre_decrement_t pre_decrement_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_PRE_DECREMENT_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/pre_increment.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/pre_increment.hpp deleted file mode 100644 index 48cf819..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/pre_increment.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_PRE_INCREMENT_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_PRE_INCREMENT_HPP - -#include -#include - -namespace sprout { - // - // pre_increment_t - // pre_increment_ - // - typedef sprout::pre_increment<> pre_increment_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::pre_increment_t pre_increment_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_PRE_INCREMENT_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/reference.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/reference.hpp deleted file mode 100644 index d892596..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/reference.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_REFERENCE_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_REFERENCE_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_REFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/shift_left.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/shift_left.hpp deleted file mode 100644 index e9b84ac..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/shift_left.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_SHIFT_LEFT_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_SHIFT_LEFT_HPP - -#include -#include - -namespace sprout { - // - // shift_left_t - // shift_left_ - // - typedef sprout::shift_left<> shift_left_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::shift_left_t shift_left_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_SHIFT_LEFT_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/shift_left_assign.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/shift_left_assign.hpp deleted file mode 100644 index 987a45d..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/shift_left_assign.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_SHIFT_LEFT_ASSIGN_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_SHIFT_LEFT_ASSIGN_HPP - -#include -#include - -namespace sprout { - // - // shift_left_assign_t - // shift_left_assign_ - // - typedef sprout::shift_left_assign<> shift_left_assign_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::shift_left_assign_t shift_left_assign_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_SHIFT_LEFT_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/shift_right.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/shift_right.hpp deleted file mode 100644 index d43ee7c..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/shift_right.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_SHIFT_LEFT_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_SHIFT_LEFT_HPP - -#include -#include - -namespace sprout { - // - // shift_right_t - // shift_right_ - // - typedef sprout::shift_right<> shift_right_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::shift_right_t shift_right_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_SHIFT_LEFT_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/shift_right_assign.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/shift_right_assign.hpp deleted file mode 100644 index 876c2b5..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/shift_right_assign.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_SHIFT_LEFT_ASSIGN_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_SHIFT_LEFT_ASSIGN_HPP - -#include -#include - -namespace sprout { - // - // shift_right_assign_t - // shift_right_assign_ - // - typedef sprout::shift_right_assign<> shift_right_assign_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::shift_right_assign_t shift_right_assign_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_SHIFT_LEFT_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/subscript.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/subscript.hpp deleted file mode 100644 index b7d7297..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/subscript.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_SUBSCRIPT_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_SUBSCRIPT_HPP - -#include -#include - -namespace sprout { - // - // subscript_t - // subscript_ - // - typedef sprout::subscript<> subscript_t; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::subscript_t subscript_ = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_SUBSCRIPT_HPP diff --git a/dsp/lib/sprout/sprout/functional/polymorphic/various.hpp b/dsp/lib/sprout/sprout/functional/polymorphic/various.hpp deleted file mode 100644 index be12840..0000000 --- a/dsp/lib/sprout/sprout/functional/polymorphic/various.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_VARIOUS_HPP -#define SPROUT_FUNCTIONAL_POLYMORPHIC_VARIOUS_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_POLYMORPHIC_VARIOUS_HPP diff --git a/dsp/lib/sprout/sprout/functional/posite.hpp b/dsp/lib/sprout/sprout/functional/posite.hpp deleted file mode 100644 index 145067f..0000000 --- a/dsp/lib/sprout/sprout/functional/posite.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POSITE_HPP -#define SPROUT_FUNCTIONAL_POSITE_HPP - -#include -#include -#include -#include - -namespace sprout { - - // 20.8.4 Arithmetic operations - template - struct posite { - public: - typedef T argument_type; - typedef T result_type; - public: - SPROUT_CONSTEXPR T operator()(T const& x) const { - return +x; - } - }; - - template<> - struct posite - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(+std::declval()) - operator()(T&& x) - const SPROUT_NOEXCEPT_IF_EXPR(+std::declval()) - { - return +SPROUT_FORWARD(T, x); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POSITE_HPP diff --git a/dsp/lib/sprout/sprout/functional/post_decrement.hpp b/dsp/lib/sprout/sprout/functional/post_decrement.hpp deleted file mode 100644 index 2b3c215..0000000 --- a/dsp/lib/sprout/sprout/functional/post_decrement.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POST_DECREMENT_HPP -#define SPROUT_FUNCTIONAL_POST_DECREMENT_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // post_decrement - // - template - struct post_decrement; - template<> - struct post_decrement - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval()--) - operator()(T&& x) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval()--) - { - return SPROUT_FORWARD(T, x)--; - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POST_DECREMENT_HPP diff --git a/dsp/lib/sprout/sprout/functional/post_increment.hpp b/dsp/lib/sprout/sprout/functional/post_increment.hpp deleted file mode 100644 index 57a2861..0000000 --- a/dsp/lib/sprout/sprout/functional/post_increment.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_POST_INCREMENT_HPP -#define SPROUT_FUNCTIONAL_POST_INCREMENT_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // post_increment - // - template - struct post_increment; - template<> - struct post_increment - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval()++) - operator()(T&& x) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval()++) - { - return SPROUT_FORWARD(T, x)++; - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_POST_INCREMENT_HPP diff --git a/dsp/lib/sprout/sprout/functional/pre_decrement.hpp b/dsp/lib/sprout/sprout/functional/pre_decrement.hpp deleted file mode 100644 index 35fe152..0000000 --- a/dsp/lib/sprout/sprout/functional/pre_decrement.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_PRE_DECREMENT_HPP -#define SPROUT_FUNCTIONAL_PRE_DECREMENT_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // pre_decrement - // - template - struct pre_decrement; - template<> - struct pre_decrement - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(--std::declval()) - operator()(T&& x) - const SPROUT_NOEXCEPT_IF_EXPR(--std::declval()) - { - return --SPROUT_FORWARD(T, x); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_PRE_DECREMENT_HPP diff --git a/dsp/lib/sprout/sprout/functional/pre_increment.hpp b/dsp/lib/sprout/sprout/functional/pre_increment.hpp deleted file mode 100644 index 4989e7e..0000000 --- a/dsp/lib/sprout/sprout/functional/pre_increment.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_PRE_INCREMENT_HPP -#define SPROUT_FUNCTIONAL_PRE_INCREMENT_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // pre_increment - // - template - struct pre_increment; - template<> - struct pre_increment - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(++std::declval()) - operator()(T&& x) - const SPROUT_NOEXCEPT_IF_EXPR(++std::declval()) - { - return ++SPROUT_FORWARD(T, x); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_PRE_INCREMENT_HPP diff --git a/dsp/lib/sprout/sprout/functional/ptr_fun.hpp b/dsp/lib/sprout/sprout/functional/ptr_fun.hpp deleted file mode 100644 index db6542c..0000000 --- a/dsp/lib/sprout/sprout/functional/ptr_fun.hpp +++ /dev/null @@ -1,62 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_PTR_FUN_HPP -#define SPROUT_FUNCTIONAL_PTR_FUN_HPP - -#include -#include - -namespace sprout { - // D.8.2.1 adaptors (deprecated) - - template - class pointer_to_unary_function - : public sprout::unary_function - { - protected: - Result (*ptr_)(Arg); - public: - SPROUT_CONSTEXPR pointer_to_unary_function() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - explicit SPROUT_CONSTEXPR pointer_to_unary_function(Result (*x)(Arg)) - : ptr_(x) - {} - SPROUT_CONSTEXPR Result operator()(Arg x) const { - return ptr_(x); - } - }; - - template - inline SPROUT_CONSTEXPR sprout::pointer_to_unary_function - ptr_fun(Result (*x)(Arg)) { - return sprout::pointer_to_unary_function(x); - } - - template - class pointer_to_binary_function - : public sprout::binary_function - { - protected: - Result (*ptr_)(Arg1, Arg2); - public: - SPROUT_CONSTEXPR pointer_to_binary_function() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - explicit SPROUT_CONSTEXPR pointer_to_binary_function(Result (*x)(Arg1, Arg2)) - : ptr_(x) - {} - SPROUT_CONSTEXPR Result operator()(Arg1 x, Arg2 y) const { - return ptr_(x, y); - } - }; - - template - inline SPROUT_CONSTEXPR sprout::pointer_to_binary_function - ptr_fun(Result (*x)(Arg1, Arg2)) { - return sprout::pointer_to_binary_function(x); - } -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_PTR_FUN_HPP diff --git a/dsp/lib/sprout/sprout/functional/ref.hpp b/dsp/lib/sprout/sprout/functional/ref.hpp deleted file mode 100644 index d7495b7..0000000 --- a/dsp/lib/sprout/sprout/functional/ref.hpp +++ /dev/null @@ -1,322 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_REF_HPP -#define SPROUT_FUNCTIONAL_REF_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // 20.8.3 reference_wrapper - - namespace detail { - template - struct reference_wrapper_base_impl; - template - struct reference_wrapper_base_impl - : public sprout::weak_result_type - {}; - template - struct reference_wrapper_base_impl - : public sprout::weak_result_type - { - public: - typedef typename T::argument_type argument_type; - }; - template - struct reference_wrapper_base_impl - : public sprout::weak_result_type - { - public: - typedef typename T::first_argument_type first_argument_type; - typedef typename T::second_argument_type second_argument_type; - }; - template - struct reference_wrapper_base_impl - : public sprout::weak_result_type - { - public: - typedef typename T::argument_type argument_type; - typedef typename T::first_argument_type first_argument_type; - typedef typename T::second_argument_type second_argument_type; - }; - template - struct reference_wrapper_base - : public sprout::detail::reference_wrapper_base_impl< - sprout::has_argument_type::value, - sprout::has_first_argument_type::value - && sprout::has_second_argument_type::value - , - T - > - {}; - template - struct reference_wrapper_base - : public sprout::unary_function - {}; - template - struct reference_wrapper_base - : public sprout::unary_function - {}; - template - struct reference_wrapper_base - : public sprout::unary_function - {}; - template - struct reference_wrapper_base - : public sprout::unary_function - {}; - template - struct reference_wrapper_base - : public sprout::binary_function - {}; - template - struct reference_wrapper_base - : public sprout::binary_function - {}; - template - struct reference_wrapper_base - : public sprout::binary_function - {}; - template - struct reference_wrapper_base - : public sprout::binary_function - {}; - template - struct reference_wrapper_base - : public sprout::unary_function - {}; - template - struct reference_wrapper_base - : public sprout::binary_function - {}; - template - struct reference_wrapper_base - : public sprout::unary_function - {}; - template - struct reference_wrapper_base - : public sprout::binary_function - {}; - template - struct reference_wrapper_base - : public sprout::unary_function - {}; - template - struct reference_wrapper_base - : public sprout::binary_function - {}; - template - struct reference_wrapper_base - : public sprout::unary_function - {}; - template - struct reference_wrapper_base - : public sprout::binary_function - {}; - template - struct reference_wrapper_base - : public sprout::unary_function - {}; - template - struct reference_wrapper_base - : public sprout::binary_function - {}; - } // namespace detail - - template - class reference_wrapper - : public sprout::detail::reference_wrapper_base::type> - { - public: - // types - typedef T type; - private: - T* t_; - private: - reference_wrapper(T&&) SPROUT_DELETED_FUNCTION_DECL - public: - // construct/copy/destroy - SPROUT_CONSTEXPR reference_wrapper(T& t) SPROUT_NOEXCEPT - : t_(sprout::addressof(t)) - {} - reference_wrapper(reference_wrapper const&) = default; - // assignment - SPROUT_CXX14_CONSTEXPR reference_wrapper& operator=(reference_wrapper const& rhs) { - t_ = rhs.t_; - return *this; - } - // access - SPROUT_CONSTEXPR operator T& () const SPROUT_NOEXCEPT { - return *t_; - } - SPROUT_CONSTEXPR T& get() const SPROUT_NOEXCEPT { - return *t_; - } - SPROUT_CONSTEXPR T* get_pointer() const SPROUT_NOEXCEPT { - return t_; - } - // invocation - template - SPROUT_CONSTEXPR typename sprout::result_of::type - operator()(Args&&... args) const { - return (*t_)(SPROUT_FORWARD(Args, args)...); - } - }; - - // - // ref - // cref - // - template - inline SPROUT_CONSTEXPR sprout::reference_wrapper - ref(T& t) SPROUT_NOEXCEPT { - return sprout::reference_wrapper(t); - } - template - inline SPROUT_CONSTEXPR sprout::reference_wrapper - cref(T const& t) SPROUT_NOEXCEPT { - return sprout::reference_wrapper(t); - } - template - void ref(T const&&) SPROUT_DELETED_FUNCTION_DECL - template - void cref(T const&&) SPROUT_DELETED_FUNCTION_DECL - - template - inline SPROUT_CONSTEXPR sprout::reference_wrapper - ref(sprout::reference_wrapper t) SPROUT_NOEXCEPT { - return t; - } - template - inline SPROUT_CONSTEXPR sprout::reference_wrapper - cref(sprout::reference_wrapper t) SPROUT_NOEXCEPT { - return sprout::reference_wrapper(t.get()); - } - - // - // is_reference_wrapper - // - template - struct is_reference_wrapper - : public sprout::false_type - {}; - template - struct is_reference_wrapper - : public sprout::is_reference_wrapper - {}; - template - struct is_reference_wrapper - : public sprout::is_reference_wrapper - {}; - template - struct is_reference_wrapper - : public sprout::is_reference_wrapper - {}; - template - struct is_reference_wrapper > - : public sprout::true_type - {}; - - // - // unwrap_reference - // - template - struct unwrap_reference - : public sprout::identity - {}; - template - struct unwrap_reference > - : public sprout::identity - {}; - template - struct unwrap_reference > - : public sprout::identity - {}; - template - struct unwrap_reference - : public sprout::unwrap_reference - {}; - template - struct unwrap_reference - : public sprout::unwrap_reference - {}; - template - struct unwrap_reference - : public sprout::unwrap_reference - {}; - - // - // strip_reference - // - template - struct strip_reference - : public sprout::identity - {}; - template - struct strip_reference > - : public sprout::identity - {}; - template - struct strip_reference > - : public sprout::identity - {}; - template - struct strip_reference - : public sprout::strip_reference - {}; - template - struct strip_reference - : public sprout::strip_reference - {}; - template - struct strip_reference - : public sprout::strip_reference - {}; - - // - // unwrap_ref - // - template - inline SPROUT_CONSTEXPR typename sprout::unwrap_reference::type& - unwrap_ref(T& t) { - return t; - } - template - inline SPROUT_CONSTEXPR typename sprout::unwrap_reference::type& - unwrap_ref(T const& t) { - return t; - } - - // - // get_pointer - // - template - inline SPROUT_CONSTEXPR T* - get_pointer(sprout::reference_wrapper const& r) { - return r.get_pointer(); - } - template - inline SPROUT_CONSTEXPR T* - get_pointer(std::reference_wrapper const& r) { - return &r.get(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_REF_HPP diff --git a/dsp/lib/sprout/sprout/functional/reference.hpp b/dsp/lib/sprout/sprout/functional/reference.hpp deleted file mode 100644 index 249e8c3..0000000 --- a/dsp/lib/sprout/sprout/functional/reference.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_REFERENCE_HPP -#define SPROUT_FUNCTIONAL_REFERENCE_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_REFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/functional/shift_left.hpp b/dsp/lib/sprout/sprout/functional/shift_left.hpp deleted file mode 100644 index b31c8a4..0000000 --- a/dsp/lib/sprout/sprout/functional/shift_left.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_SHIFT_LEFT_HPP -#define SPROUT_FUNCTIONAL_SHIFT_LEFT_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // shift_left - // - template - struct shift_left; - template<> - struct shift_left - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval() << std::declval()) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval() << std::declval()) - { - return SPROUT_FORWARD(T, x) << SPROUT_FORWARD(U, y); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_SHIFT_LEFT_HPP diff --git a/dsp/lib/sprout/sprout/functional/shift_left_assign.hpp b/dsp/lib/sprout/sprout/functional/shift_left_assign.hpp deleted file mode 100644 index ecd7859..0000000 --- a/dsp/lib/sprout/sprout/functional/shift_left_assign.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_SHIFT_LEFT_ASSIGN_HPP -#define SPROUT_FUNCTIONAL_SHIFT_LEFT_ASSIGN_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // shift_left_assign - // - template - struct shift_left_assign; - template<> - struct shift_left_assign - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval() <<= std::declval()) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval() <<= std::declval()) - { - return SPROUT_FORWARD(T, x) <<= SPROUT_FORWARD(U, y); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_SHIFT_LEFT_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/functional/shift_right.hpp b/dsp/lib/sprout/sprout/functional/shift_right.hpp deleted file mode 100644 index ab9a4fd..0000000 --- a/dsp/lib/sprout/sprout/functional/shift_right.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_SHIFT_RIGHT_HPP -#define SPROUT_FUNCTIONAL_SHIFT_RIGHT_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // shift_right - // - template - struct shift_right; - template<> - struct shift_right - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval() >> std::declval()) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval() >> std::declval()) - { - return SPROUT_FORWARD(T, x) >> SPROUT_FORWARD(U, y); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_SHIFT_RIGHT_HPP diff --git a/dsp/lib/sprout/sprout/functional/shift_right_assign.hpp b/dsp/lib/sprout/sprout/functional/shift_right_assign.hpp deleted file mode 100644 index 27327f0..0000000 --- a/dsp/lib/sprout/sprout/functional/shift_right_assign.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_SHIFT_RIGHT_ASSIGN_HPP -#define SPROUT_FUNCTIONAL_SHIFT_RIGHT_ASSIGN_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // shift_right_assign - // - template - struct shift_right_assign; - template<> - struct shift_right_assign - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval() >>= std::declval()) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval() >>= std::declval()) - { - return SPROUT_FORWARD(T, x) >>= SPROUT_FORWARD(U, y); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_SHIFT_RIGHT_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/functional/subscript.hpp b/dsp/lib/sprout/sprout/functional/subscript.hpp deleted file mode 100644 index a653b1f..0000000 --- a/dsp/lib/sprout/sprout/functional/subscript.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_SUBSCRIPT_HPP -#define SPROUT_FUNCTIONAL_SUBSCRIPT_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // subscript - // - template - struct subscript; - template<> - struct subscript - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(std::declval()[std::declval()]) - operator()(T&& x, U&& y) - const SPROUT_NOEXCEPT_IF_EXPR(std::declval()[std::declval()]) - { - return SPROUT_FORWARD(T, x)[SPROUT_FORWARD(U, y)]; - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_SUBSCRIPT_HPP diff --git a/dsp/lib/sprout/sprout/functional/transparent.hpp b/dsp/lib/sprout/sprout/functional/transparent.hpp deleted file mode 100644 index 4035248..0000000 --- a/dsp/lib/sprout/sprout/functional/transparent.hpp +++ /dev/null @@ -1,24 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_TRANSPARENT_HPP -#define SPROUT_FUNCTIONAL_TRANSPARENT_HPP - -#include - -namespace sprout { - // - // transparent - // - template - struct transparent { - public: - typedef T is_transparent; - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_TRANSPARENT_HPP diff --git a/dsp/lib/sprout/sprout/functional/type_traits.hpp b/dsp/lib/sprout/sprout/functional/type_traits.hpp deleted file mode 100644 index 3808fe0..0000000 --- a/dsp/lib/sprout/sprout/functional/type_traits.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_TYPE_TRAITS_HPP -#define SPROUT_FUNCTIONAL_TYPE_TRAITS_HPP - -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_TYPE_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/functional/type_traits/has_type.hpp b/dsp/lib/sprout/sprout/functional/type_traits/has_type.hpp deleted file mode 100644 index 82e2aa5..0000000 --- a/dsp/lib/sprout/sprout/functional/type_traits/has_type.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_TYPE_TRAITS_HAS_TYPE_HPP -#define SPROUT_FUNCTIONAL_TYPE_TRAITS_HAS_TYPE_HPP - -#include -#include - -namespace sprout { - // - // has_result_type - // has_argument_type - // has_first_argument_type - // has_second_argument_type - // - SPROUT_HAS_XXX_TYPE_DEF_LAZY(result_type); - SPROUT_HAS_XXX_TYPE_DEF_LAZY(argument_type); - SPROUT_HAS_XXX_TYPE_DEF_LAZY(first_argument_type); - SPROUT_HAS_XXX_TYPE_DEF_LAZY(second_argument_type); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_result_type_v = sprout::has_result_type::value; - template - SPROUT_STATIC_CONSTEXPR bool has_argument_type_v = sprout::has_argument_type::value; - template - SPROUT_STATIC_CONSTEXPR bool has_first_argument_type_v = sprout::has_first_argument_type::value; - template - SPROUT_STATIC_CONSTEXPR bool has_second_argument_type_v = sprout::has_second_argument_type::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_TYPE_TRAITS_HAS_TYPE_HPP diff --git a/dsp/lib/sprout/sprout/functional/type_traits/inherit_if_type.hpp b/dsp/lib/sprout/sprout/functional/type_traits/inherit_if_type.hpp deleted file mode 100644 index dbf485e..0000000 --- a/dsp/lib/sprout/sprout/functional/type_traits/inherit_if_type.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_TYPE_TRAITS_INHERIT_IF_TYPE_HPP -#define SPROUT_FUNCTIONAL_TYPE_TRAITS_INHERIT_IF_TYPE_HPP - -#include -#include - -namespace sprout { - // - // inherit_if_result_type - // inherit_if_argument_type - // inherit_if_first_argument_type - // inherit_if_second_argument_type - // - SPROUT_INHERIT_IF_XXX_TYPE_DEF_LAZY(result_type); - SPROUT_INHERIT_IF_XXX_TYPE_DEF_LAZY(argument_type); - SPROUT_INHERIT_IF_XXX_TYPE_DEF_LAZY(first_argument_type); - SPROUT_INHERIT_IF_XXX_TYPE_DEF_LAZY(second_argument_type); -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_TYPE_TRAITS_INHERIT_IF_TYPE_HPP diff --git a/dsp/lib/sprout/sprout/functional/type_traits/is_strict_function.hpp b/dsp/lib/sprout/sprout/functional/type_traits/is_strict_function.hpp deleted file mode 100644 index 55f0484..0000000 --- a/dsp/lib/sprout/sprout/functional/type_traits/is_strict_function.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_TYPE_TRAITS_IS_STRICT_FUNCTION_HPP -#define SPROUT_FUNCTIONAL_TYPE_TRAITS_IS_STRICT_FUNCTION_HPP - -#include -#include -#include - -namespace sprout { - // - // is_strict_unary_function - // is_strict_binary_function - // - template - struct is_strict_unary_function - : public sprout::bool_constant< - sprout::has_result_type::value - && sprout::has_argument_type::value - > - {}; - template - struct is_strict_binary_function - : public sprout::bool_constant< - sprout::has_result_type::value - && sprout::has_first_argument_type::value - && sprout::has_second_argument_type::value - > - {}; - // - // is_strict_function - // - template - struct is_strict_function - : public sprout::bool_constant< - sprout::is_strict_unary_function::value - || sprout::is_strict_binary_function::value - > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_strict_unary_function_v = sprout::is_strict_unary_function::value; - template - SPROUT_STATIC_CONSTEXPR bool is_strict_binary_function_v = sprout::is_strict_binary_function::value; - template - SPROUT_STATIC_CONSTEXPR bool is_strict_function_v = sprout::is_strict_function::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_TYPE_TRAITS_IS_STRICT_FUNCTION_HPP diff --git a/dsp/lib/sprout/sprout/functional/type_traits/is_transparent_function.hpp b/dsp/lib/sprout/sprout/functional/type_traits/is_transparent_function.hpp deleted file mode 100644 index d5567c9..0000000 --- a/dsp/lib/sprout/sprout/functional/type_traits/is_transparent_function.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_TYPE_TRAITS_IS_TRANSPARENT_FUNCTION_HPP -#define SPROUT_FUNCTIONAL_TYPE_TRAITS_IS_TRANSPARENT_FUNCTION_HPP - -#include -#include - -namespace sprout { - // - // is_transparent_function - // - SPROUT_HAS_XXX_TYPE_DEF(is_transparent_function, is_transparent); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_transparent_function_v = sprout::is_transparent_function::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_TYPE_TRAITS_IS_TRANSPARENT_FUNCTION_HPP diff --git a/dsp/lib/sprout/sprout/functional/type_traits/weak_result_type.hpp b/dsp/lib/sprout/sprout/functional/type_traits/weak_result_type.hpp deleted file mode 100644 index ff2a9d6..0000000 --- a/dsp/lib/sprout/sprout/functional/type_traits/weak_result_type.hpp +++ /dev/null @@ -1,113 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_TYPE_TRAITS_WEAK_RESULT_TYPE_HPP -#define SPROUT_FUNCTIONAL_TYPE_TRAITS_WEAK_RESULT_TYPE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - struct weak_result_type_impl - : public sprout::inherit_if_result_type - {}; - template - struct weak_result_type_impl - : public sprout::detail::weak_result_type_impl - {}; - template - struct weak_result_type_impl - : public sprout::detail::weak_result_type_impl - {}; - template - struct weak_result_type_impl - : public sprout::detail::weak_result_type_impl - {}; -#if SPROUT_CLANG_OR_LATER(3, 6, 0) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wambiguous-ellipsis" -#endif - template - struct weak_result_type_impl { - public: - typedef R result_type; - }; -#if !defined(_MSC_VER) - template - struct weak_result_type_impl { - public: - typedef R result_type; - }; -#endif - template - struct weak_result_type_impl { - public: - typedef R result_type; - }; -#if !defined(_MSC_VER) - template - struct weak_result_type_impl { - public: - typedef R result_type; - }; -#endif - template - struct weak_result_type_impl { - public: - typedef R result_type; - }; -#if !defined(_MSC_VER) - template - struct weak_result_type_impl { - public: - typedef R result_type; - }; -#endif - template - struct weak_result_type_impl { - public: - typedef R result_type; - }; -#if !defined(_MSC_VER) - template - struct weak_result_type_impl { - public: - typedef R result_type; - }; -#endif -#if SPROUT_CLANG_OR_LATER(3, 6, 0) -# pragma clang diagnostic pop -#endif - } // namespace detail - - // - // weak_result_type - // - template - struct weak_result_type - : public sprout::detail::weak_result_type_impl::type> - { -#ifdef SPROUT_WORKAROUND_NEEDS_EXPLICIT_EMPTY_BASE_CLASS_CONSTRUCT - public: - SPROUT_CONSTEXPR weak_result_type() - SPROUT_EXPLICIT_EMPTY_BASE_CLASS_CONSTRUCT(sprout::detail::weak_result_type_impl::type>) - SPROUT_EXPLICIT_EMPTY_BASE_CLASS_CONSTRUCT_BODY -#endif - }; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using weak_result_type_t = typename sprout::weak_result_type::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_TYPE_TRAITS_WEAK_RESULT_TYPE_HPP diff --git a/dsp/lib/sprout/sprout/functional/unary_function.hpp b/dsp/lib/sprout/sprout/functional/unary_function.hpp deleted file mode 100644 index faf17a7..0000000 --- a/dsp/lib/sprout/sprout/functional/unary_function.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_UNARY_FUNCTION_HPP -#define SPROUT_FUNCTIONAL_UNARY_FUNCTION_HPP - -#include - -namespace sprout { - // - // unary_function - // - template - struct unary_function { - public: - typedef Arg argument_type; - typedef Result result_type; - }; -} // namespace sprout - -#endif // #ifndef SPROUT_FUNCTIONAL_UNARY_FUNCTION_HPP diff --git a/dsp/lib/sprout/sprout/functional/various.hpp b/dsp/lib/sprout/sprout/functional/various.hpp deleted file mode 100644 index 2591141..0000000 --- a/dsp/lib/sprout/sprout/functional/various.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_FUNCTIONAL_VARIOUS_HPP -#define SPROUT_FUNCTIONAL_VARIOUS_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_FUNCTIONAL_VARIOUS_HPP diff --git a/dsp/lib/sprout/sprout/generator.hpp b/dsp/lib/sprout/sprout/generator.hpp deleted file mode 100644 index 3d3ea60..0000000 --- a/dsp/lib/sprout/sprout/generator.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_GENERATOR_HPP -#define SPROUT_GENERATOR_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_GENERATOR_HPP diff --git a/dsp/lib/sprout/sprout/generator/access_functions.hpp b/dsp/lib/sprout/sprout/generator/access_functions.hpp deleted file mode 100644 index 7a745f6..0000000 --- a/dsp/lib/sprout/sprout/generator/access_functions.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_GENERATOR_ACCESS_FUNCTIONS_HPP -#define SPROUT_GENERATOR_ACCESS_FUNCTIONS_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_GENERATOR_ACCESS_FUNCTIONS_HPP diff --git a/dsp/lib/sprout/sprout/generator/access_functions_fwd.hpp b/dsp/lib/sprout/sprout/generator/access_functions_fwd.hpp deleted file mode 100644 index 6d5158e..0000000 --- a/dsp/lib/sprout/sprout/generator/access_functions_fwd.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_GENERATOR_ACCESS_FUNCTIONS_FWD_HPP -#define SPROUT_GENERATOR_ACCESS_FUNCTIONS_FWD_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace generators { - // - // generated_value - // - template - SPROUT_CONSTEXPR decltype(sprout::generators::generator_access_traits::type>::get_generated_value(std::declval())) - generated_value(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::generators::generator_access_traits::type>::get_generated_value(std::declval())); - - // - // next_generator - // - template - SPROUT_CONSTEXPR decltype(sprout::generators::generator_access_traits::type>::get_next_generator(std::declval())) - next_generator(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::generators::generator_access_traits::type>::get_next_generator(std::declval())); - } // namespace generators - - using sprout::generators::generated_value; - using sprout::generators::next_generator; -} // namespace sprout - -#endif // #ifndef SPROUT_GENERATOR_ACCESS_FUNCTIONS_FWD_HPP diff --git a/dsp/lib/sprout/sprout/generator/detail/generated_value.hpp b/dsp/lib/sprout/sprout/generator/detail/generated_value.hpp deleted file mode 100644 index 4c1a829..0000000 --- a/dsp/lib/sprout/sprout/generator/detail/generated_value.hpp +++ /dev/null @@ -1,283 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_GENERATOR_DETAIL_GENERATED_VALUE_HPP -#define SPROUT_GENERATOR_DETAIL_GENERATED_VALUE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout_adl { - sprout::not_found_via_adl get_generated_value(...); -} // namespace sprout_adl - -namespace sprout { - namespace detail { - template - struct has_mem_generated_value_test { - public: - template< - typename U = T, - typename = typename sprout::identity().generated_value())>::type - > - static sprout::true_type test(int); - static sprout::false_type test(...); - }; -#if defined(_MSC_VER) && (_MSC_VER > 1900) - template::test(0))>::type> - struct has_mem_generated_value - : public Base_ - {}; -#else - template - struct has_mem_generated_value - : public sprout::identity::test(0))>::type - {}; -#endif - - template - struct is_substitutable_const_generated_value - : public sprout::bool_constant< - sprout::detail::has_mem_generated_value::value - > - {}; - - template - struct get_generated_value_impl; - - template - struct get_generated_value_impl< - Gen, - typename std::enable_if< - std::is_lvalue_reference::value && !std::is_const::type>::value - && sprout::detail::is_substitutable_const_generated_value::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(std::declval().generated_value()) - get_generated_value(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(std::declval().generated_value()) - { - typedef decltype(std::declval().generated_value()) type; - return sprout::const_reference_cast(sprout::as_const(gen).generated_value()); - } - }; - template - struct get_generated_value_impl< - Gen, - typename std::enable_if< - std::is_lvalue_reference::value && !std::is_const::type>::value - && !sprout::detail::is_substitutable_const_generated_value::value - && sprout::detail::has_mem_generated_value::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(std::declval().generated_value()) - get_generated_value(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(std::declval().generated_value()) - { - return gen.generated_value(); - } - }; - template - struct get_generated_value_impl< - Gen, - typename std::enable_if< - std::is_lvalue_reference::value && !std::is_const::type>::value - && !sprout::detail::is_substitutable_const_generated_value::value - && !sprout::detail::has_mem_generated_value::value - && sprout::is_input_iterator::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(*std::declval()) - get_generated_value(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(*std::declval()) - { - return *gen; - } - }; - template - struct get_generated_value_impl< - Gen, - typename std::enable_if< - std::is_lvalue_reference::value && !std::is_const::type>::value - && !sprout::detail::is_substitutable_const_generated_value::value - && !sprout::detail::has_mem_generated_value::value - && !sprout::is_input_iterator::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(sprout::tuples::get<0>(std::declval())) - get_generated_value(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(sprout::tuples::get<0>(std::declval())) - { - return sprout::tuples::get<0>(gen); - } - }; - - template - struct get_generated_value_impl< - Gen, - typename std::enable_if< - std::is_rvalue_reference::value && !std::is_const::type>::value - && sprout::detail::is_substitutable_const_generated_value::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(std::declval().generated_value()) - get_generated_value(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(std::declval().generated_value()) - { - typedef decltype(std::declval().generated_value()) type; - return sprout::const_reference_cast(sprout::as_const(sprout::move(gen)).generated_value()); - } - }; - template - struct get_generated_value_impl< - Gen, - typename std::enable_if< - std::is_rvalue_reference::value && !std::is_const::type>::value - && !sprout::detail::is_substitutable_const_generated_value::value - && sprout::detail::has_mem_generated_value::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(std::declval().generated_value()) - get_generated_value(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(std::declval().generated_value()) - { - return sprout::move(gen).generated_value(); - } - }; - template - struct get_generated_value_impl< - Gen, - typename std::enable_if< - std::is_rvalue_reference::value && !std::is_const::type>::value - && !sprout::detail::is_substitutable_const_generated_value::value - && !sprout::detail::has_mem_generated_value::value - && sprout::is_input_iterator::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(*std::declval()) - get_generated_value(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(*std::declval()) - { - return *sprout::move(gen); - } - }; - template - struct get_generated_value_impl< - Gen, - typename std::enable_if< - std::is_rvalue_reference::value && !std::is_const::type>::value - && !sprout::detail::is_substitutable_const_generated_value::value - && !sprout::detail::has_mem_generated_value::value - && !sprout::is_input_iterator::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(sprout::tuples::get<0>(std::declval())) - get_generated_value(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(sprout::tuples::get<0>(std::declval())) - { - return sprout::tuples::get<0>(sprout::move(gen)); - } - }; - - template - struct get_generated_value_impl< - Gen, - typename std::enable_if< - std::is_reference::value && std::is_const::type>::value - && sprout::detail::has_mem_generated_value::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(std::declval().generated_value()) - get_generated_value(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(std::declval().generated_value()) - { - return gen.generated_value(); - } - }; - template - struct get_generated_value_impl< - Gen, - typename std::enable_if< - std::is_reference::value && std::is_const::type>::value - && !sprout::detail::has_mem_generated_value::value - && sprout::is_input_iterator::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(*std::declval()) - get_generated_value(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(*std::declval()) - { - return *gen; - } - }; - template - struct get_generated_value_impl< - Gen, - typename std::enable_if< - std::is_reference::value && std::is_const::type>::value - && !sprout::detail::has_mem_generated_value::value - && !sprout::is_input_iterator::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(sprout::tuples::get<0>(std::declval())) - get_generated_value(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(sprout::tuples::get<0>(std::declval())) - { - return sprout::tuples::get<0>(gen); - } - }; - } // namespace detail -} // namespace sprout - -namespace sprout_generator_detail { - template - inline SPROUT_CONSTEXPR decltype(sprout::detail::get_generated_value_impl::get_generated_value(std::declval())) - get_generated_value(Gen& gen) - SPROUT_NOEXCEPT_IF_EXPR(sprout::detail::get_generated_value_impl::get_generated_value(std::declval())) - { - return sprout::detail::get_generated_value_impl::get_generated_value(gen); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !std::is_const::value && !std::is_volatile::value && !std::is_reference::value, - decltype(sprout::detail::get_generated_value_impl::get_generated_value(std::declval())) - >::type - get_generated_value(Gen&& gen) - SPROUT_NOEXCEPT_IF_EXPR(sprout::detail::get_generated_value_impl::get_generated_value(std::declval())) - { - return sprout::detail::get_generated_value_impl::get_generated_value(sprout::move(gen)); - } - template - inline SPROUT_CONSTEXPR decltype(sprout::detail::get_generated_value_impl::get_generated_value(std::declval())) - get_generated_value(Gen const& gen) - SPROUT_NOEXCEPT_IF_EXPR(sprout::detail::get_generated_value_impl::get_generated_value(std::declval())) - { - return sprout::detail::get_generated_value_impl::get_generated_value(gen); - } -} // namespace sprout_generator_detail - -#endif // #ifndef SPROUT_GENERATOR_DETAIL_GENERATED_VALUE_HPP diff --git a/dsp/lib/sprout/sprout/generator/detail/next_generator.hpp b/dsp/lib/sprout/sprout/generator/detail/next_generator.hpp deleted file mode 100644 index 773936a..0000000 --- a/dsp/lib/sprout/sprout/generator/detail/next_generator.hpp +++ /dev/null @@ -1,283 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_GENERATOR_DETAIL_NEXT_GENERATOR_HPP -#define SPROUT_GENERATOR_DETAIL_NEXT_GENERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout_adl { - sprout::not_found_via_adl get_next_generator(...); -} // namespace sprout_adl - -namespace sprout { - namespace detail { - template - struct has_mem_next_generator_test { - public: - template< - typename U = T, - typename = typename sprout::identity().next_generator())>::type - > - static sprout::true_type test(int); - static sprout::false_type test(...); - }; -#if defined(_MSC_VER) && (_MSC_VER > 1900) - template::test(0))>::type> - struct has_mem_next_generator - : public Base_ - {}; -#else - template - struct has_mem_next_generator - : public sprout::identity::test(0))>::type - {}; -#endif - - template - struct is_substitutable_const_next_generator - : public sprout::bool_constant< - sprout::detail::has_mem_next_generator::value - > - {}; - - template - struct get_next_generator_impl; - - template - struct get_next_generator_impl< - Gen, - typename std::enable_if< - std::is_lvalue_reference::value && !std::is_const::type>::value - && sprout::detail::is_substitutable_const_next_generator::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(std::declval().next_generator()) - get_next_generator(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(std::declval().next_generator()) - { - typedef decltype(std::declval().next_generator()) type; - return sprout::const_reference_cast(sprout::as_const(gen).next_generator()); - } - }; - template - struct get_next_generator_impl< - Gen, - typename std::enable_if< - std::is_lvalue_reference::value && !std::is_const::type>::value - && !sprout::detail::is_substitutable_const_next_generator::value - && sprout::detail::has_mem_next_generator::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(std::declval().next_generator()) - get_next_generator(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(std::declval().next_generator()) - { - return gen.next_generator(); - } - }; - template - struct get_next_generator_impl< - Gen, - typename std::enable_if< - std::is_lvalue_reference::value && !std::is_const::type>::value - && !sprout::detail::is_substitutable_const_next_generator::value - && !sprout::detail::has_mem_next_generator::value - && sprout::is_input_iterator::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(std::declval()) - get_next_generator(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(std::declval()) - { - return gen; - } - }; - template - struct get_next_generator_impl< - Gen, - typename std::enable_if< - std::is_lvalue_reference::value && !std::is_const::type>::value - && !sprout::detail::is_substitutable_const_next_generator::value - && !sprout::detail::has_mem_next_generator::value - && !sprout::is_input_iterator::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(sprout::tuples::get<1>(std::declval())) - get_next_generator(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(sprout::tuples::get<1>(std::declval())) - { - return sprout::tuples::get<1>(gen); - } - }; - - template - struct get_next_generator_impl< - Gen, - typename std::enable_if< - std::is_rvalue_reference::value && !std::is_const::type>::value - && sprout::detail::is_substitutable_const_next_generator::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(std::declval().next_generator()) - get_next_generator(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(std::declval().next_generator()) - { - typedef decltype(std::declval().next_generator()) type; - return sprout::const_reference_cast(sprout::as_const(sprout::move(gen)).next_generator()); - } - }; - template - struct get_next_generator_impl< - Gen, - typename std::enable_if< - std::is_rvalue_reference::value && !std::is_const::type>::value - && !sprout::detail::is_substitutable_const_next_generator::value - && sprout::detail::has_mem_next_generator::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(std::declval().next_generator()) - get_next_generator(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(std::declval().next_generator()) - { - return sprout::move(gen).next_generator(); - } - }; - template - struct get_next_generator_impl< - Gen, - typename std::enable_if< - std::is_rvalue_reference::value && !std::is_const::type>::value - && !sprout::detail::is_substitutable_const_next_generator::value - && !sprout::detail::has_mem_next_generator::value - && sprout::is_input_iterator::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(std::declval()) - get_next_generator(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(std::declval()) - { - return sprout::move(gen); - } - }; - template - struct get_next_generator_impl< - Gen, - typename std::enable_if< - std::is_rvalue_reference::value && !std::is_const::type>::value - && !sprout::detail::is_substitutable_const_next_generator::value - && !sprout::detail::has_mem_next_generator::value - && !sprout::is_input_iterator::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(sprout::tuples::get<1>(std::declval())) - get_next_generator(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(sprout::tuples::get<1>(std::declval())) - { - return sprout::tuples::get<1>(sprout::move(gen)); - } - }; - - template - struct get_next_generator_impl< - Gen, - typename std::enable_if< - std::is_reference::value && std::is_const::type>::value - && sprout::detail::has_mem_next_generator::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(std::declval().next_generator()) - get_next_generator(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(std::declval().next_generator()) - { - return gen.next_generator(); - } - }; - template - struct get_next_generator_impl< - Gen, - typename std::enable_if< - std::is_reference::value && std::is_const::type>::value - && !sprout::detail::has_mem_next_generator::value - && sprout::is_input_iterator::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(std::declval()) - get_next_generator(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(std::declval()) - { - return gen; - } - }; - template - struct get_next_generator_impl< - Gen, - typename std::enable_if< - std::is_reference::value && std::is_const::type>::value - && !sprout::detail::has_mem_next_generator::value - && !sprout::is_input_iterator::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(sprout::tuples::get<1>(std::declval())) - get_next_generator(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(sprout::tuples::get<1>(std::declval())) - { - return sprout::tuples::get<1>(gen); - } - }; - } // namespace detail -} // namespace sprout - -namespace sprout_generator_detail { - template - inline SPROUT_CONSTEXPR decltype(sprout::detail::get_next_generator_impl::get_next_generator(std::declval())) - get_next_generator(Gen& gen) - SPROUT_NOEXCEPT_IF_EXPR(sprout::detail::get_next_generator_impl::get_next_generator(std::declval())) - { - return sprout::detail::get_next_generator_impl::get_next_generator(gen); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !std::is_const::value && !std::is_volatile::value && !std::is_reference::value, - decltype(sprout::detail::get_next_generator_impl::get_next_generator(std::declval())) - >::type - get_next_generator(Gen&& gen) - SPROUT_NOEXCEPT_IF_EXPR(sprout::detail::get_next_generator_impl::get_next_generator(std::declval())) - { - return sprout::detail::get_next_generator_impl::get_next_generator(sprout::move(gen)); - } - template - inline SPROUT_CONSTEXPR decltype(sprout::detail::get_next_generator_impl::get_next_generator(std::declval())) - get_next_generator(Gen const& gen) - SPROUT_NOEXCEPT_IF_EXPR(sprout::detail::get_next_generator_impl::get_next_generator(std::declval())) - { - return sprout::detail::get_next_generator_impl::get_next_generator(gen); - } -} // namespace sprout_generator_detail - -#endif // #ifndef SPROUT_GENERATOR_DETAIL_NEXT_GENERATOR_HPP diff --git a/dsp/lib/sprout/sprout/generator/detail/next_value.hpp b/dsp/lib/sprout/sprout/generator/detail/next_value.hpp deleted file mode 100644 index b60c646..0000000 --- a/dsp/lib/sprout/sprout/generator/detail/next_value.hpp +++ /dev/null @@ -1,317 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_GENERATOR_DETAIL_NEXT_VALUE_HPP -#define SPROUT_GENERATOR_DETAIL_NEXT_VALUE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout_adl { - sprout::not_found_via_adl generate_next_value(...); -} // namespace sprout_adl - -namespace sprout { - namespace detail { - template - struct has_mem_next_value_test { - public: - template< - typename U = T, - typename = typename sprout::identity().next_value())>::type - > - static sprout::true_type test(int); - static sprout::false_type test(...); - }; -#if defined(_MSC_VER) && (_MSC_VER > 1900) - template::test(0))>::type> - struct has_mem_next_value - : public Base_ - {}; -#else - template - struct has_mem_next_value - : public sprout::identity::test(0))>::type - {}; -#endif - - template - struct has_function_call_test { - public: - template< - typename U = T, - typename = typename sprout::identity()())>::type - > - static sprout::true_type test(int); - static sprout::false_type test(...); - }; -#if defined(_MSC_VER) && (_MSC_VER > 1900) - template::test(0))>::type> - struct has_function_call - : public Base_ - {}; -#else - template - struct has_function_call - : public sprout::identity::test(0))>::type - {}; -#endif - - template - struct generate_next_value_impl; - - template - struct generate_next_value_impl< - Gen, - typename std::enable_if< - std::is_lvalue_reference::value && !std::is_const::type>::value - && sprout::detail::has_mem_next_value::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(std::declval().next_value()) - generate_next_value(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(std::declval().next_value()) - { - return gen.next_value(); - } - }; - template - struct generate_next_value_impl< - Gen, - typename std::enable_if< - std::is_lvalue_reference::value && !std::is_const::type>::value - && !sprout::detail::has_mem_next_value::value - && sprout::is_input_iterator::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(sprout::next(std::declval())) - generate_next_value(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(sprout::next(std::declval())) - { - return sprout::next(gen); - } - }; - template - struct generate_next_value_impl< - Gen, - typename std::enable_if< - std::is_lvalue_reference::value && !std::is_const::type>::value - && !sprout::detail::has_mem_next_value::value - && !sprout::is_input_iterator::value - && sprout::detail::has_function_call::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(std::declval()()) - generate_next_value(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(std::declval()()) - { - return gen(); - } - }; - template - struct generate_next_value_impl< - Gen, - typename std::enable_if< - std::is_lvalue_reference::value && !std::is_const::type>::value - && !sprout::detail::has_mem_next_value::value - && !sprout::is_input_iterator::value - && !sprout::detail::has_function_call::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(sprout::generators::next_value(sprout::generators::next_generator(std::declval()))) - generate_next_value(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(sprout::generators::next_value(sprout::generators::next_generator(std::declval()))) - { - return sprout::generators::next_value(sprout::generators::next_generator(gen)); - } - }; - - template - struct generate_next_value_impl< - Gen, - typename std::enable_if< - std::is_rvalue_reference::value && !std::is_const::type>::value - && sprout::detail::has_mem_next_value::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(std::declval().next_value()) - generate_next_value(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(std::declval().next_value()) - { - return sprout::move(gen).next_value(); - } - }; - template - struct generate_next_value_impl< - Gen, - typename std::enable_if< - std::is_rvalue_reference::value && !std::is_const::type>::value - && !sprout::detail::has_mem_next_value::value - && sprout::is_input_iterator::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(sprout::next(std::declval())) - generate_next_value(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(sprout::next(std::declval())) - { - return sprout::next(sprout::move(gen)); - } - }; - template - struct generate_next_value_impl< - Gen, - typename std::enable_if< - std::is_rvalue_reference::value && !std::is_const::type>::value - && !sprout::detail::has_mem_next_value::value - && !sprout::is_input_iterator::value - && sprout::detail::has_function_call::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(std::declval()()) - generate_next_value(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(std::declval()()) - { - return sprout::move(gen)(); - } - }; - template - struct generate_next_value_impl< - Gen, - typename std::enable_if< - std::is_rvalue_reference::value && !std::is_const::type>::value - && !sprout::detail::has_mem_next_value::value - && !sprout::is_input_iterator::value - && !sprout::detail::has_function_call::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(sprout::generators::next_value(sprout::generators::next_generator(std::declval()))) - generate_next_value(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(sprout::generators::next_value(sprout::generators::next_generator(std::declval()))) - { - return sprout::generators::next_value(sprout::generators::next_generator(sprout::move(gen))); - } - }; - - template - struct generate_next_value_impl< - Gen, - typename std::enable_if< - std::is_reference::value && std::is_const::type>::value - && sprout::detail::has_mem_next_value::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(std::declval().next_value()) - generate_next_value(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(std::declval().next_value()) - { - return gen.next_value(); - } - }; - template - struct generate_next_value_impl< - Gen, - typename std::enable_if< - std::is_reference::value && std::is_const::type>::value - && !sprout::detail::has_mem_next_value::value - && sprout::is_input_iterator::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(sprout::next(std::declval())) - generate_next_value(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(sprout::next(std::declval())) - { - return sprout::next(gen); - } - }; - template - struct generate_next_value_impl< - Gen, - typename std::enable_if< - std::is_reference::value && std::is_const::type>::value - && !sprout::detail::has_mem_next_value::value - && !sprout::is_input_iterator::value - && sprout::detail::has_function_call::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(std::declval()()) - generate_next_value(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(std::declval()()) - { - return gen(); - } - }; - template - struct generate_next_value_impl< - Gen, - typename std::enable_if< - std::is_reference::value && std::is_const::type>::value - && !sprout::detail::has_mem_next_value::value - && !sprout::is_input_iterator::value - && !sprout::detail::has_function_call::value - >::type - > { - public: - static SPROUT_CONSTEXPR decltype(sprout::generators::next_value(sprout::generators::next_generator(std::declval()))) - generate_next_value(Gen gen) - SPROUT_NOEXCEPT_IF_EXPR(sprout::generators::next_value(sprout::generators::next_generator(std::declval()))) - { - return sprout::generators::next_value(sprout::generators::next_generator(gen)); - } - }; - } // namespace detail -} // namespace sprout - -namespace sprout_generator_detail { - template - inline SPROUT_CONSTEXPR decltype(sprout::detail::generate_next_value_impl::generate_next_value(std::declval())) - generate_next_value(Gen& gen) - SPROUT_NOEXCEPT_IF_EXPR(sprout::detail::generate_next_value_impl::generate_next_value(std::declval())) - { - return sprout::detail::generate_next_value_impl::generate_next_value(gen); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !std::is_const::value && !std::is_volatile::value && !std::is_reference::value, - decltype(sprout::detail::generate_next_value_impl::generate_next_value(std::declval())) - >::type - generate_next_value(Gen&& gen) - SPROUT_NOEXCEPT_IF_EXPR(sprout::detail::generate_next_value_impl::generate_next_value(std::declval())) - { - return sprout::detail::generate_next_value_impl::generate_next_value(sprout::move(gen)); - } - template - inline SPROUT_CONSTEXPR decltype(sprout::detail::generate_next_value_impl::generate_next_value(std::declval())) - generate_next_value(Gen const& gen) - SPROUT_NOEXCEPT_IF_EXPR(sprout::detail::generate_next_value_impl::generate_next_value(std::declval())) - { - return sprout::detail::generate_next_value_impl::generate_next_value(gen); - } -} // namespace sprout_generator_detail - -#endif // #ifndef SPROUT_GENERATOR_DETAIL_NEXT_VALUE_HPP diff --git a/dsp/lib/sprout/sprout/generator/functions.hpp b/dsp/lib/sprout/sprout/generator/functions.hpp deleted file mode 100644 index 660c146..0000000 --- a/dsp/lib/sprout/sprout/generator/functions.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_GENERATOR_FUNCTIONS_HPP -#define SPROUT_GENERATOR_FUNCTIONS_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_GENERATOR_FUNCTIONS_HPP diff --git a/dsp/lib/sprout/sprout/generator/generate_functions.hpp b/dsp/lib/sprout/sprout/generator/generate_functions.hpp deleted file mode 100644 index fb9de9c..0000000 --- a/dsp/lib/sprout/sprout/generator/generate_functions.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_GENERATOR_GENERATE_FUNCTIONS_HPP -#define SPROUT_GENERATOR_GENERATE_FUNCTIONS_HPP - -#include -#include - -#endif // #ifndef SPROUT_GENERATOR_GENERATE_FUNCTIONS_HPP diff --git a/dsp/lib/sprout/sprout/generator/generate_functions_fwd.hpp b/dsp/lib/sprout/sprout/generator/generate_functions_fwd.hpp deleted file mode 100644 index ecabf67..0000000 --- a/dsp/lib/sprout/sprout/generator/generate_functions_fwd.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_GENERATOR_GENERATE_FUNCTIONS_FWD_HPP -#define SPROUT_GENERATOR_GENERATE_FUNCTIONS_FWD_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace generators { - // - // next_value - // - template - SPROUT_CONSTEXPR decltype(sprout::generators::generator_generate_traits::type>::generate_next_value(std::declval())) - next_value(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::generators::generator_generate_traits::type>::generate_next_value(std::declval())); - } // namespace generators - - using sprout::generators::next_value; -} // namespace sprout - -#endif // #ifndef SPROUT_GENERATOR_GENERATE_FUNCTIONS_FWD_HPP diff --git a/dsp/lib/sprout/sprout/generator/generated_value.hpp b/dsp/lib/sprout/sprout/generator/generated_value.hpp deleted file mode 100644 index 453562a..0000000 --- a/dsp/lib/sprout/sprout/generator/generated_value.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_GENERATOR_GENERATED_VALUE_HPP -#define SPROUT_GENERATOR_GENERATED_VALUE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace generators { - // - // generated_value - // - // effect: - // sprout::generators::generator_access_traits::get_generated_value(t) - // [default] - // ADL callable get_generated_value(t) -> get_generated_value(t) - // [default] - // T is not const - // && callable sprout::as_const(t).generated_value() - // -> sprout::const_reference_cast().generated_value())>(sprout::as_const(cont).generated_value()) - // otherwise, callable t.generated_value() -> t.generated_value() - // otherwise, T is InputIterator -> *t - // otherwise -> sprout::tuples::get<0>(t) - // - template - inline SPROUT_CONSTEXPR decltype(sprout::generators::generator_access_traits::type>::get_generated_value(std::declval())) - generated_value(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::generators::generator_access_traits::type>::get_generated_value(std::declval())) - { - return sprout::generators::generator_access_traits::type>::get_generated_value(SPROUT_FORWARD(T, t)); - } - } // namespace generators -} // namespace sprout - -#endif // #ifndef SPROUT_GENERATOR_GENERATED_VALUE_HPP diff --git a/dsp/lib/sprout/sprout/generator/generator_access_traits.hpp b/dsp/lib/sprout/sprout/generator/generator_access_traits.hpp deleted file mode 100644 index 9a20cc4..0000000 --- a/dsp/lib/sprout/sprout/generator/generator_access_traits.hpp +++ /dev/null @@ -1,136 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_GENERATOR_GENERATOR_ACCESS_TRAITS_HPP -#define SPROUT_GENERATOR_GENERATOR_ACCESS_TRAITS_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout_generator_detail { - using sprout_adl::get_generated_value; - using sprout_adl::get_next_generator; - - template - inline SPROUT_CONSTEXPR decltype(get_generated_value(std::declval())) - call_get_generated_value(Gen&& gen) - SPROUT_NOEXCEPT_IF_EXPR(get_generated_value(std::declval())) - { - return get_generated_value(SPROUT_FORWARD(Gen, gen)); - } - template - inline SPROUT_CONSTEXPR decltype(get_next_generator(std::declval())) - call_get_next_generator(Gen&& gen) - SPROUT_NOEXCEPT_IF_EXPR(get_next_generator(std::declval())) - { - return get_next_generator(SPROUT_FORWARD(Gen, gen)); - } -} // namespace sprout_generator_detail - -namespace sprout { - namespace generators { - namespace detail { - template - struct generator_access_traits_const_default { - public: - // get_generated_value - static SPROUT_CONSTEXPR decltype(sprout::generators::generator_access_traits::get_generated_value(std::declval())) - get_generated_value(Gen const& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::generators::generator_access_traits::get_generated_value(std::declval())) - { - return sprout::generators::generator_access_traits::get_generated_value(t); - } - // get_next_generator - static SPROUT_CONSTEXPR decltype(sprout::generators::generator_access_traits::get_next_generator(std::declval())) - get_next_generator(Gen const& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::generators::generator_access_traits::get_next_generator(std::declval())) - { - return sprout::generators::generator_access_traits::get_next_generator(t); - } - }; - } // namespace detail - - // - // generator_access_get_generated_value_default - // - template - struct generator_access_get_generated_value_default { - public: - static SPROUT_CONSTEXPR decltype(sprout_generator_detail::call_get_generated_value(std::declval())) - get_generated_value(Gen& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout_generator_detail::call_get_generated_value(std::declval())) - { - return sprout_generator_detail::call_get_generated_value(t); - } - static SPROUT_CONSTEXPR decltype(sprout_generator_detail::call_get_generated_value(std::declval())) - get_generated_value(Gen&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout_generator_detail::call_get_generated_value(std::declval())) - { - return sprout_generator_detail::call_get_generated_value(sprout::move(t)); - } - static SPROUT_CONSTEXPR decltype(sprout_generator_detail::call_get_generated_value(std::declval())) - get_generated_value(Gen const& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout_generator_detail::call_get_generated_value(std::declval())) - { - return sprout_generator_detail::call_get_generated_value(t); - } - }; - // - // generator_access_get_next_generator_default - // - template - struct generator_access_get_next_generator_default { - public: - static SPROUT_CONSTEXPR decltype(sprout_generator_detail::call_get_next_generator(std::declval())) - get_next_generator(Gen& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout_generator_detail::call_get_next_generator(std::declval())) - { - return sprout_generator_detail::call_get_next_generator(t); - } - static SPROUT_CONSTEXPR decltype(sprout_generator_detail::call_get_next_generator(std::declval())) - get_next_generator(Gen&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout_generator_detail::call_get_next_generator(std::declval())) - { - return sprout_generator_detail::call_get_next_generator(sprout::move(t)); - } - static SPROUT_CONSTEXPR decltype(sprout_generator_detail::call_get_next_generator(std::declval())) - get_next_generator(Gen const& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout_generator_detail::call_get_next_generator(std::declval())) - { - return sprout_generator_detail::call_get_next_generator(t); - } - }; - - // - // generator_access_traits_default - // - template - struct generator_access_traits_default - : public sprout::generators::generator_access_get_generated_value_default - , public sprout::generators::generator_access_get_next_generator_default - {}; - - // - // generator_access_traits - // - template - struct generator_access_traits - : public sprout::generators::generator_access_traits_default - {}; - template - struct generator_access_traits - : public sprout::generators::detail::generator_access_traits_const_default - {}; - } // namespace generators -} // namespace sprout - -#endif // #ifndef SPROUT_GENERATOR_GENERATOR_ACCESS_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/generator/generator_generate_traits.hpp b/dsp/lib/sprout/sprout/generator/generator_generate_traits.hpp deleted file mode 100644 index a9113f0..0000000 --- a/dsp/lib/sprout/sprout/generator/generator_generate_traits.hpp +++ /dev/null @@ -1,97 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_GENERATOR_GENERATOR_GENERATE_TRAITS_HPP -#define SPROUT_GENERATOR_GENERATOR_GENERATE_TRAITS_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout_generator_detail { - using sprout_adl::generate_next_value; - - template - inline SPROUT_CONSTEXPR decltype(generate_next_value(std::declval())) - call_generate_next_value(Gen&& gen) - SPROUT_NOEXCEPT_IF_EXPR(generate_next_value(std::declval())) - { - return generate_next_value(SPROUT_FORWARD(Gen, gen)); - } -} // namespace sprout_generator_detail - -namespace sprout { - namespace generators { - namespace detail { - template - struct generator_generate_traits_const_default { - public: - // generate_next_value - static SPROUT_CONSTEXPR decltype(sprout::generators::generator_generate_traits::generate_next_value(std::declval())) - generate_next_value(Gen const& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::generators::generator_generate_traits::generate_next_value(std::declval())) - { - return sprout::generators::generator_generate_traits::generate_next_value(t); - } - }; - } // namespace detail - - // - // generator_generate_generate_next_value_default - // - template - struct generator_generate_generate_next_value_default { - public: - static SPROUT_CONSTEXPR decltype(sprout_generator_detail::call_generate_next_value(std::declval())) - generate_next_value(Gen& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout_generator_detail::call_generate_next_value(std::declval())) - { - return sprout_generator_detail::call_generate_next_value(t); - } - static SPROUT_CONSTEXPR decltype(sprout_generator_detail::call_generate_next_value(std::declval())) - generate_next_value(Gen&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout_generator_detail::call_generate_next_value(std::declval())) - { - return sprout_generator_detail::call_generate_next_value(sprout::move(t)); - } - static SPROUT_CONSTEXPR decltype(sprout_generator_detail::call_generate_next_value(std::declval())) - generate_next_value(Gen const& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout_generator_detail::call_generate_next_value(std::declval())) - { - return sprout_generator_detail::call_generate_next_value(t); - } - }; - - // - // generator_generate_traits_default - // - template - struct generator_generate_traits_default - : public sprout::generators::generator_generate_generate_next_value_default - {}; - - // - // generator_generate_traits - // - template - struct generator_generate_traits - : public sprout::generators::generator_generate_traits_default - {}; - template - struct generator_generate_traits - : public sprout::generators::detail::generator_generate_traits_const_default - {}; - } // namespace generators -} // namespace sprout - -#include -#include - -#endif // #ifndef SPROUT_GENERATOR_GENERATOR_GENERATE_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/generator/next_generator.hpp b/dsp/lib/sprout/sprout/generator/next_generator.hpp deleted file mode 100644 index a9c2d8f..0000000 --- a/dsp/lib/sprout/sprout/generator/next_generator.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_GENERATOR_NEXT_GENERATOR_HPP -#define SPROUT_GENERATOR_NEXT_GENERATOR_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace generators { - // - // next_generator - // - // effect: - // sprout::generators::generator_access_traits::get_next_generator(t) - // [default] - // ADL callable get_next_generator(t) -> get_next_generator(t) - // [default] - // T is not const - // && callable sprout::as_const(t).next_generator() - // -> sprout::const_reference_cast().next_generator())>(sprout::as_const(cont).next_generator()) - // otherwise, callable t.next_generator() -> t.next_generator() - // otherwise, T is InputIterator -> t - // otherwise -> sprout::tuples::get<0>(t) - // - template - inline SPROUT_CONSTEXPR decltype(sprout::generators::generator_access_traits::type>::get_next_generator(std::declval())) - next_generator(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::generators::generator_access_traits::type>::get_next_generator(std::declval())) - { - return sprout::generators::generator_access_traits::type>::get_next_generator(SPROUT_FORWARD(T, t)); - } - } // namespace generators -} // namespace sprout - -#endif // #ifndef SPROUT_GENERATOR_NEXT_GENERATOR_HPP diff --git a/dsp/lib/sprout/sprout/generator/next_value.hpp b/dsp/lib/sprout/sprout/generator/next_value.hpp deleted file mode 100644 index 73726d7..0000000 --- a/dsp/lib/sprout/sprout/generator/next_value.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_GENERATOR_NEXT_VALUE_HPP -#define SPROUT_GENERATOR_NEXT_VALUE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace generators { - // - // next_value - // - // effect: - // sprout::generators::generator_generate_traits::generate_next_value(t) - // [default] - // ADL callable generate_next_value(t) -> generate_next_value(t) - // [default] - // otherwise, callable t.next_value() -> t.next_value() - // otherwise, T is InputIterator -> sprout::next(t) - // otherwise, callable t() -> t() - // otherwise -> sprout::generators::next_value(sprout::generators::next_generator(t)) - // - template - inline SPROUT_CONSTEXPR decltype(sprout::generators::generator_generate_traits::type>::generate_next_value(std::declval())) - next_value(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::generators::generator_generate_traits::type>::generate_next_value(std::declval())) - { - return sprout::generators::generator_generate_traits::type>::generate_next_value(SPROUT_FORWARD(T, t)); - } - } // namespace generators -} // namespace sprout - -#endif // #ifndef SPROUT_GENERATOR_NEXT_VALUE_HPP diff --git a/dsp/lib/sprout/sprout/generator/results.hpp b/dsp/lib/sprout/sprout/generator/results.hpp deleted file mode 100644 index 21b04e8..0000000 --- a/dsp/lib/sprout/sprout/generator/results.hpp +++ /dev/null @@ -1,54 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_GENERATOR_RESULTS_HPP -#define SPROUT_GENERATOR_RESULTS_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace generators { - namespace results { - // - // generated_value - // - template - struct generated_value - : public std::decay()()))> - {}; - - // - // next_generator - // - template - struct next_generator - : public std::decay()()))> - {}; - - // - // next_value - // - template - struct next_value - : public std::decay()()))> - {}; - } // namespace results - } // namespace generators - - namespace results { - using sprout::generators::results::generated_value; - using sprout::generators::results::next_generator; - using sprout::generators::results::next_value; - } // namespace results -} // namespace sprout - -#endif // #ifndef SPROUT_GENERATOR_RESULTS_HPP diff --git a/dsp/lib/sprout/sprout/generator/traits.hpp b/dsp/lib/sprout/sprout/generator/traits.hpp deleted file mode 100644 index d977fc8..0000000 --- a/dsp/lib/sprout/sprout/generator/traits.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_GENERATOR_TRAITS_HPP -#define SPROUT_GENERATOR_TRAITS_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_GENERATOR_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/generator/traits_fwd.hpp b/dsp/lib/sprout/sprout/generator/traits_fwd.hpp deleted file mode 100644 index 0edc3af..0000000 --- a/dsp/lib/sprout/sprout/generator/traits_fwd.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_GENERATOR_TRAITS_FWD_HPP -#define SPROUT_GENERATOR_TRAITS_FWD_HPP - -#include - -namespace sprout { - namespace generators { - // - // generator_access_traits - // - template - struct generator_access_traits; - - // - // generator_generate_traits - // - template - struct generator_generate_traits; - } // namespace generators - - using sprout::generators::generator_access_traits; - using sprout::generators::generator_generate_traits; -} // namespace sprout - -#endif // #ifndef SPROUT_GENERATOR_TRAITS_FWD_HPP diff --git a/dsp/lib/sprout/sprout/index_tuple.hpp b/dsp/lib/sprout/sprout/index_tuple.hpp deleted file mode 100644 index d6a47d6..0000000 --- a/dsp/lib/sprout/sprout/index_tuple.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_INDEX_TUPLE_HPP -#define SPROUT_INDEX_TUPLE_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_INDEX_TUPLE_HPP diff --git a/dsp/lib/sprout/sprout/index_tuple/class.hpp b/dsp/lib/sprout/sprout/index_tuple/class.hpp deleted file mode 100644 index 3cd8667..0000000 --- a/dsp/lib/sprout/sprout/index_tuple/class.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_INDEX_TUPLE_CLASS_HPP -#define SPROUT_INDEX_TUPLE_CLASS_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_INDEX_TUPLE_CLASS_HPP diff --git a/dsp/lib/sprout/sprout/index_tuple/enable_make_indexes.hpp b/dsp/lib/sprout/sprout/index_tuple/enable_make_indexes.hpp deleted file mode 100644 index 9aef2cb..0000000 --- a/dsp/lib/sprout/sprout/index_tuple/enable_make_indexes.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_INDEX_TUPLE_ENABLE_MAKE_INDEXES_HPP -#define SPROUT_INDEX_TUPLE_ENABLE_MAKE_INDEXES_HPP - -#include - -namespace sprout { - // - // enable_make_indexes - // - template - struct enable_make_indexes - : public IndexTupleType::type - { - public: - typedef typename IndexTupleType::type type; - public: - static SPROUT_CONSTEXPR type make() { - return type(); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_INDEX_TUPLE_ENABLE_MAKE_INDEXES_HPP diff --git a/dsp/lib/sprout/sprout/index_tuple/index_n.hpp b/dsp/lib/sprout/sprout/index_tuple/index_n.hpp deleted file mode 100644 index 99221df..0000000 --- a/dsp/lib/sprout/sprout/index_tuple/index_n.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_INDEX_TUPLE_INDEX_N_HPP -#define SPROUT_INDEX_TUPLE_INDEX_N_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // index_n - // uindex_n - // -#if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) - template - using index_n = sprout::integer_n; - - template - using uindex_n = sprout::integer_n; -#else // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) - template - struct index_n - : public sprout::integer_n::type - ::template transfer > - {}; - - template - struct uindex_n - : public sprout::integer_n::type - ::template transfer > - {}; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) -} // namespace sprout - -#endif // #ifndef SPROUT_INDEX_TUPLE_INDEX_N_HPP diff --git a/dsp/lib/sprout/sprout/index_tuple/index_pack.hpp b/dsp/lib/sprout/sprout/index_tuple/index_pack.hpp deleted file mode 100644 index fe01573..0000000 --- a/dsp/lib/sprout/sprout/index_tuple/index_pack.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_INDEX_TUPLE_INDEX_PACK_HPP -#define SPROUT_INDEX_TUPLE_INDEX_PACK_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // index_pack - // uindex_pack - // -#if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) - template - using index_pack = sprout::integer_pack; - - template - using uindex_pack = sprout::integer_pack; -#else // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) - template - struct index_pack - : public sprout::enable_make_indexes< - typename sprout::integer_pack::type - ::template transfer > - > - {}; - - template - struct uindex_pack - : public sprout::enable_make_indexes< - typename sprout::integer_pack::type - ::template transfer > - > - {}; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) -} // namespace sprout - -#endif // #ifndef SPROUT_INDEX_TUPLE_INDEX_PACK_HPP diff --git a/dsp/lib/sprout/sprout/index_tuple/index_range.hpp b/dsp/lib/sprout/sprout/index_tuple/index_range.hpp deleted file mode 100644 index 995a1e5..0000000 --- a/dsp/lib/sprout/sprout/index_tuple/index_range.hpp +++ /dev/null @@ -1,55 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_INDEX_TUPLE_INDEX_RANGE_HPP -#define SPROUT_INDEX_TUPLE_INDEX_RANGE_HPP - -#include -#include -#include - -namespace sprout { - // - // index_range - // uindex_range - // -// !!! for GCC 7.0.0 or later -//#if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) -#if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) && !SPROUT_GCC_OR_LATER(7, 0, 0) - template< - sprout::index_t First, sprout::index_t Last, - typename std::make_signed::type Step = sprout::detail::integer_range_default_step::value - > - using index_range = sprout::integer_range; - - template< - sprout::uindex_t First, sprout::uindex_t Last, - typename std::make_signed::type Step = sprout::detail::integer_range_default_step::value - > - using uindex_range = sprout::integer_range; -#else // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) - template< - sprout::index_t First, sprout::index_t Last, - typename std::make_signed::type Step = sprout::detail::integer_range_default_step::value - > - struct index_range - : public sprout::integer_range::type - ::template transfer > - {}; - - template< - sprout::uindex_t First, sprout::uindex_t Last, - typename std::make_signed::type Step = sprout::detail::integer_range_default_step::value - > - struct uindex_range - : public sprout::integer_range::type - ::template transfer > - {}; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) -} // namespace sprout - -#endif // #ifndef SPROUT_INDEX_TUPLE_INDEX_RANGE_HPP diff --git a/dsp/lib/sprout/sprout/index_tuple/index_sequence.hpp b/dsp/lib/sprout/sprout/index_tuple/index_sequence.hpp deleted file mode 100644 index 18a7d52..0000000 --- a/dsp/lib/sprout/sprout/index_tuple/index_sequence.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_INDEX_TUPLE_INDEX_SEQUENCE_HPP -#define SPROUT_INDEX_TUPLE_INDEX_SEQUENCE_HPP - -#include -#if SPROUT_USE_TEMPLATE_ALIASES -# include -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - -namespace sprout { -#if SPROUT_USE_TEMPLATE_ALIASES - // - // index_sequence - // - template - using index_sequence = sprout::uindex_tuple; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_INDEX_TUPLE_INDEX_SEQUENCE_HPP diff --git a/dsp/lib/sprout/sprout/index_tuple/index_sequence_for.hpp b/dsp/lib/sprout/sprout/index_tuple/index_sequence_for.hpp deleted file mode 100644 index 02c8e25..0000000 --- a/dsp/lib/sprout/sprout/index_tuple/index_sequence_for.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_INDEX_TUPLE_INDEX_SEQUENCE_FOR_HPP -#define SPROUT_INDEX_TUPLE_INDEX_SEQUENCE_FOR_HPP - -#include -#include - -namespace sprout { - // - // index_sequence_for - // -#if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) - template - using index_sequence_for = sprout::uindex_pack; -#else // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) - template - struct index_sequence_for - : public sprout::uindex_pack - {}; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) -} // namespace sprout - -#endif // #ifndef SPROUT_INDEX_TUPLE_INDEX_SEQUENCE_FOR_HPP diff --git a/dsp/lib/sprout/sprout/index_tuple/index_t.hpp b/dsp/lib/sprout/sprout/index_tuple/index_t.hpp deleted file mode 100644 index 4a8c18b..0000000 --- a/dsp/lib/sprout/sprout/index_tuple/index_t.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_INDEX_TUPLE_INDEX_T_HPP -#define SPROUT_INDEX_TUPLE_INDEX_T_HPP - -#include -#include - -namespace sprout { - // - // index_t - // uindex_t - // - typedef std::ptrdiff_t index_t; - typedef std::size_t uindex_t; -} // namespace sprout - -#endif // #ifndef SPROUT_INDEX_TUPLE_INDEX_T_HPP diff --git a/dsp/lib/sprout/sprout/index_tuple/index_tuple.hpp b/dsp/lib/sprout/sprout/index_tuple/index_tuple.hpp deleted file mode 100644 index 28f9d77..0000000 --- a/dsp/lib/sprout/sprout/index_tuple/index_tuple.hpp +++ /dev/null @@ -1,57 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_INDEX_TUPLE_INDEX_TUPLE_HPP -#define SPROUT_INDEX_TUPLE_INDEX_TUPLE_HPP - -#include -#include -#include - -namespace sprout { - // - // index_tuple - // uindex_tuple - // -#if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) - template - using index_tuple = sprout::integer_sequence; - - template - using uindex_tuple = sprout::integer_sequence; -#else // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) - - namespace detail { - template class Derived, T... Is> - struct integer_sequence_another_base - : public sprout::integer_sequence - { - public: - typedef Derived type; - template - struct rebind - : public Derived - {}; - public: - static SPROUT_CONSTEXPR type make() SPROUT_NOEXCEPT { - return type(); - } - }; - } // namespace detail - - template - struct index_tuple - : public sprout::detail::integer_sequence_another_base - {}; - template - struct uindex_tuple - : public sprout::detail::integer_sequence_another_base - {}; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) -} // namespace sprout - -#endif // #ifndef SPROUT_INDEX_TUPLE_INDEX_TUPLE_HPP diff --git a/dsp/lib/sprout/sprout/index_tuple/integer_n.hpp b/dsp/lib/sprout/sprout/index_tuple/integer_n.hpp deleted file mode 100644 index ab57b8b..0000000 --- a/dsp/lib/sprout/sprout/index_tuple/integer_n.hpp +++ /dev/null @@ -1,93 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_INDEX_TUPLE_INTEGER_N_HPP -#define SPROUT_INDEX_TUPLE_INTEGER_N_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // integer_n - // - namespace detail { - template - struct integer_n_next_even; - template - struct integer_n_next_even > - : public sprout::integer_sequence - {}; - - template - struct integer_n_next_even_odd; - template - struct integer_n_next_even_odd, Tail> - : public sprout::integer_sequence - {}; - - template - struct integer_n_impl; - template - struct integer_n_impl< - T, I, N, - typename std::enable_if<(N == 0)>::type - > - : public sprout::integer_sequence - {}; - template - struct integer_n_impl< - T, I, N, - typename std::enable_if<(N == 1)>::type - > - : public sprout::integer_sequence - {}; - template - struct integer_n_impl< - T, I, N, - typename std::enable_if<(N > 1 && N % 2 == 0)>::type - > - : public sprout::detail::integer_n_next_even< - T, typename sprout::detail::integer_n_impl::type - > - {}; - template - struct integer_n_impl< - T, I, N, - typename std::enable_if<(N > 1 && N % 2 == 1)>::type - > - : public sprout::detail::integer_n_next_even_odd< - T, typename sprout::detail::integer_n_impl::type, - I - > - {}; - - template - struct integer_n - : public sprout::enable_make_indexes< - sprout::detail::integer_n_impl - > - {}; - } // namespace detail - // - // integer_range - // -#if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) - template - using integer_n = typename sprout::detail::integer_n::type; -#else // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) - template - struct integer_n - : public sprout::detail::integer_n - {}; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) -} // namespace sprout - -#endif // #ifndef SPROUT_INDEX_TUPLE_INTEGER_N_HPP diff --git a/dsp/lib/sprout/sprout/index_tuple/integer_pack.hpp b/dsp/lib/sprout/sprout/index_tuple/integer_pack.hpp deleted file mode 100644 index 342e195..0000000 --- a/dsp/lib/sprout/sprout/index_tuple/integer_pack.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_INDEX_TUPLE_INTEGER_PACK_HPP -#define SPROUT_INDEX_TUPLE_INTEGER_PACK_HPP - -#include -#include -#include - -namespace sprout { - // - // integer_pack - // -#if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) - template - using integer_pack = sprout::make_integer_sequence::value>; -#else // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) - template - struct integer_pack - : public sprout::make_integer_sequence - {}; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) -} // namespace sprout - -#endif // #ifndef SPROUT_INDEX_TUPLE_INTEGER_PACK_HPP diff --git a/dsp/lib/sprout/sprout/index_tuple/integer_range.hpp b/dsp/lib/sprout/sprout/index_tuple/integer_range.hpp deleted file mode 100644 index c1e8b07..0000000 --- a/dsp/lib/sprout/sprout/index_tuple/integer_range.hpp +++ /dev/null @@ -1,124 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_INDEX_TUPLE_INTEGER_RANGE_HPP -#define SPROUT_INDEX_TUPLE_INTEGER_RANGE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - struct integer_range_default_step - : public sprout::integral_constant::type, (First <= Last ? 1 : -1)> - {}; - } // namespace detail - - namespace detail { - template - struct integer_range_next_even; - template - struct integer_range_next_even, Next> - : public sprout::integer_sequence - {}; - - template - struct integer_range_next_odd; - template - struct integer_range_next_odd, Next, Tail> - : public sprout::integer_sequence - {}; - - template::type Step, typename std::make_unsigned::type N, typename Enable = void> - struct integer_range_dispatch; - template::type Step, typename std::make_unsigned::type N> - struct integer_range_dispatch< - T, First, Step, N, - typename std::enable_if<(N == 0)>::type - > - : public sprout::integer_sequence - {}; - template::type Step, typename std::make_unsigned::type N> - struct integer_range_dispatch< - T, First, Step, N, - typename std::enable_if<(N == 1)>::type - > - : public sprout::integer_sequence - {}; - template::type Step, typename std::make_unsigned::type N> - struct integer_range_dispatch< - T, First, Step, N, - typename std::enable_if<(N > 1 && N % 2 == 0)>::type - > - : public sprout::detail::integer_range_next_even< - T, typename sprout::detail::integer_range_dispatch::type, - N / 2 * Step - > - {}; - template::type Step, typename std::make_unsigned::type N> - struct integer_range_dispatch< - T, First, Step, N, - typename std::enable_if<(N > 1 && N % 2 == 1)>::type - > - : public sprout::detail::integer_range_next_odd< - T, typename sprout::detail::integer_range_dispatch::type, - N / 2 * Step, First + (N - 1) * Step - > - {}; - template::type Step, typename Enable = void> - struct integer_range_impl {}; - template::type Step> - struct integer_range_impl< - T, First, Last, Step, - typename std::enable_if<((First < Last && Step > 0) || (First > Last && Step < 0) || (First == Last))>::type - > - : public sprout::detail::integer_range_dispatch< - T, First, Step, - (static_cast::type>(Last - First) + (Step > 0 ? Step - 1 : Step + 1)) / Step - > - {}; - - template< - typename T, T First, T Last, - typename std::make_signed::type Step - > - struct integer_range - : public sprout::enable_make_indexes< - sprout::detail::integer_range_impl - > - { - static_assert( - (First < Last && Step > 0) || (First > Last && Step < 0) || (First == Last), - "(First < Last && Step > 0) || (First > Last && Step < 0) || (First == Last)" - ); - }; - } // namespace detail - // - // integer_range - // -#if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) - template< - typename T, T First, T Last, - typename std::make_signed::type Step = sprout::detail::integer_range_default_step::value - > - using integer_range = typename sprout::detail::integer_range::type; -#else // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) - template< - typename T, T First, T Last, - typename std::make_signed::type Step = sprout::detail::integer_range_default_step::value - > - struct integer_range - : public sprout::detail::integer_range - {}; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) -} // namespace sprout - -#endif // #ifndef SPROUT_INDEX_TUPLE_INTEGER_RANGE_HPP diff --git a/dsp/lib/sprout/sprout/index_tuple/integer_sequence.hpp b/dsp/lib/sprout/sprout/index_tuple/integer_sequence.hpp deleted file mode 100644 index d1e75a2..0000000 --- a/dsp/lib/sprout/sprout/index_tuple/integer_sequence.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_INDEX_TUPLE_INTEGER_SEQUENCE_HPP -#define SPROUT_INDEX_TUPLE_INTEGER_SEQUENCE_HPP - -#include -#include - -namespace sprout { - // - // integer_sequence - // - template - struct integer_sequence { - public: - typedef integer_sequence type; - template - struct rebind - : public integer_sequence - {}; - public: - static SPROUT_CONSTEXPR type make() SPROUT_NOEXCEPT { - return type(); - } - public: - typedef T value_type; - template - struct transfer - : public Seq::template rebind - {}; - public: - SPROUT_STATIC_CONSTEXPR std::size_t static_size = sizeof...(Is); - public: - static SPROUT_CONSTEXPR size_t size() SPROUT_NOEXCEPT { - return static_size; - } - }; - template - SPROUT_CONSTEXPR_OR_CONST std::size_t sprout::integer_sequence::static_size; -} // namespace sprout - -#endif // #ifndef SPROUT_INDEX_TUPLE_INTEGER_SEQUENCE_HPP diff --git a/dsp/lib/sprout/sprout/index_tuple/literals.hpp b/dsp/lib/sprout/sprout/index_tuple/literals.hpp deleted file mode 100644 index b1de958..0000000 --- a/dsp/lib/sprout/sprout/index_tuple/literals.hpp +++ /dev/null @@ -1,62 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_INDEX_TUPLE_LITERALS_HPP -#define SPROUT_INDEX_TUPLE_LITERALS_HPP - -#include -#include -#include - -#if SPROUT_USE_USER_DEFINED_LITERALS - -#include -#include - -namespace sprout { - // - // indexes_result - // uindexes_result - // - template - struct indexes_result - : public sprout::make_index_tuple::value> - {}; - template - struct uindexes_result - : public sprout::make_uindex_tuple::value> - {}; - - namespace literals { - namespace indexes { - // - // _indexes - // _uindexes - // - template - SPROUT_CONSTEXPR typename sprout::indexes_result::type - operator"" _indexes() { - return sprout::indexes_result::make(); - } - template - SPROUT_CONSTEXPR typename sprout::uindexes_result::type - operator"" _uindexes() { - return sprout::uindexes_result::make(); - } - } // namespace indexes - - using sprout::literals::indexes::operator"" _indexes; - using sprout::literals::indexes::operator"" _uindexes; - } // namespace literals - - using sprout::literals::indexes::operator"" _indexes; - using sprout::literals::indexes::operator"" _uindexes; -} // namespace sprout - -#endif // #if SPROUT_USE_USER_DEFINED_LITERALS - -#endif // #ifndef SPROUT_INDEX_TUPLE_LITERALS_HPP diff --git a/dsp/lib/sprout/sprout/index_tuple/make_index_sequence.hpp b/dsp/lib/sprout/sprout/index_tuple/make_index_sequence.hpp deleted file mode 100644 index d600671..0000000 --- a/dsp/lib/sprout/sprout/index_tuple/make_index_sequence.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_INDEX_TUPLE_MAKE_INDEX_SEQUENCE_HPP -#define SPROUT_INDEX_TUPLE_MAKE_INDEX_SEQUENCE_HPP - -#include -#include -#include - -namespace sprout { - // - // make_index_sequence - // -#if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) - template - using make_index_sequence = sprout::make_uindex_tuple; -#else // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) - template - struct make_index_sequence - : public sprout::make_uindex_tuple - {}; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) -} // namespace sprout - -#endif // #ifndef SPROUT_INDEX_TUPLE_MAKE_INDEX_SEQUENCE_HPP diff --git a/dsp/lib/sprout/sprout/index_tuple/make_index_tuple.hpp b/dsp/lib/sprout/sprout/index_tuple/make_index_tuple.hpp deleted file mode 100644 index c8009eb..0000000 --- a/dsp/lib/sprout/sprout/index_tuple/make_index_tuple.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_INDEX_TUPLE_MAKE_INDEX_TUPLE_HPP -#define SPROUT_INDEX_TUPLE_MAKE_INDEX_TUPLE_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // make_index_tuple - // make_uindex_tuple - // -#if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) - template - using make_index_tuple = sprout::make_integer_sequence; - - template - using make_uindex_tuple = sprout::make_integer_sequence; -#else // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) - template - struct make_index_tuple - : public sprout::enable_make_indexes< - typename sprout::make_integer_sequence::type - ::template transfer >::type - > - {}; - - template - struct make_uindex_tuple - : public sprout::enable_make_indexes< - typename sprout::make_integer_sequence::type - ::template transfer >::type - > - {}; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) -} // namespace sprout - -#endif // #ifndef SPROUT_INDEX_TUPLE_MAKE_INDEX_TUPLE_HPP diff --git a/dsp/lib/sprout/sprout/index_tuple/make_indexes.hpp b/dsp/lib/sprout/sprout/index_tuple/make_indexes.hpp deleted file mode 100644 index 1218d87..0000000 --- a/dsp/lib/sprout/sprout/index_tuple/make_indexes.hpp +++ /dev/null @@ -1,24 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_INDEX_TUPLE_MAKE_INDEXES_HPP -#define SPROUT_INDEX_TUPLE_MAKE_INDEXES_HPP - -#include - -namespace sprout { - // - // make_indexes - // - template - inline SPROUT_CONSTEXPR typename Seq::type - make_indexes() { - return typename Seq::type(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_INDEX_TUPLE_MAKE_INDEXES_HPP diff --git a/dsp/lib/sprout/sprout/index_tuple/make_integer_sequence.hpp b/dsp/lib/sprout/sprout/index_tuple/make_integer_sequence.hpp deleted file mode 100644 index a23b753..0000000 --- a/dsp/lib/sprout/sprout/index_tuple/make_integer_sequence.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_INDEX_TUPLE_MAKE_INTEGER_SEQUENCE_HPP -#define SPROUT_INDEX_TUPLE_MAKE_INTEGER_SEQUENCE_HPP - -#include -#include - -namespace sprout { - // - // make_integer_sequence - // -#if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) - template - using make_integer_sequence = sprout::integer_range; -#else // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) - template - struct make_integer_sequence - : public sprout::integer_range - {}; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) -} // namespace sprout - -#endif // #ifndef SPROUT_INDEX_TUPLE_MAKE_INTEGER_SEQUENCE_HPP diff --git a/dsp/lib/sprout/sprout/index_tuple/metafunction.hpp b/dsp/lib/sprout/sprout/index_tuple/metafunction.hpp deleted file mode 100644 index 4dc26d6..0000000 --- a/dsp/lib/sprout/sprout/index_tuple/metafunction.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_INDEX_TUPLE_METAFUNCTION_HPP -#define SPROUT_INDEX_TUPLE_METAFUNCTION_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_INDEX_TUPLE_METAFUNCTION_HPP diff --git a/dsp/lib/sprout/sprout/index_tuple/tuple.hpp b/dsp/lib/sprout/sprout/index_tuple/tuple.hpp deleted file mode 100644 index bf0b823..0000000 --- a/dsp/lib/sprout/sprout/index_tuple/tuple.hpp +++ /dev/null @@ -1,113 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_INDEX_TUPLE_TUPLE_HPP -#define SPROUT_INDEX_TUPLE_TUPLE_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // tuple_size - // - template - struct tuple_size > - : public sprout::integral_constant - {}; - // - // tuple_element - // - template - struct tuple_element > - : public sprout::pack_element_c - {}; - -#if !(SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)) - // - // tuple_size - // - template - struct tuple_size > - : public std::tuple_size > - {}; - // - // tuple_element - // - template - struct tuple_element > - : public std::tuple_element > - {}; - - // - // tuple_size - // - template - struct tuple_size > - : public std::tuple_size > - {}; - // - // tuple_element - // - template - struct tuple_element > - : public std::tuple_element > - {}; -#endif // #if !(SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)) - -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -namespace sprout { - // - // tuple_get - // - template - inline SPROUT_CONSTEXPR typename std::tuple_element >::type - tuple_get(sprout::integer_sequence) SPROUT_NOEXCEPT { - static_assert(I < sizeof...(Is), "tuple_get: index out of range"); - typedef typename std::tuple_element >::type type; - return type(); - } - -#if !(SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)) - // - // tuple_get - // - template - inline SPROUT_CONSTEXPR typename std::tuple_element >::type - tuple_get(sprout::index_tuple) SPROUT_NOEXCEPT { - static_assert(I < sizeof...(Indexes), "tuple_get: index out of range"); - typedef typename std::tuple_element >::type type; - return type(); - } - - // - // tuple_get - // - template - inline SPROUT_CONSTEXPR typename std::tuple_element >::type - tuple_get(sprout::uindex_tuple) SPROUT_NOEXCEPT { - static_assert(I < sizeof...(Indexes), "tuple_get: index out of range"); - typedef typename std::tuple_element >::type type; - return type(); - } -#endif // #if !(SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)) -} // namespace sprout - -#endif // #ifndef SPROUT_INDEX_TUPLE_TUPLE_HPP diff --git a/dsp/lib/sprout/sprout/index_tuple/utility.hpp b/dsp/lib/sprout/sprout/index_tuple/utility.hpp deleted file mode 100644 index 421d4ac..0000000 --- a/dsp/lib/sprout/sprout/index_tuple/utility.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_INDEX_TUPLE_UTILITY_HPP -#define SPROUT_INDEX_TUPLE_UTILITY_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_INDEX_TUPLE_UTILITY_HPP diff --git a/dsp/lib/sprout/sprout/integer.hpp b/dsp/lib/sprout/sprout/integer.hpp deleted file mode 100644 index 1663429..0000000 --- a/dsp/lib/sprout/sprout/integer.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_INTEGER_HPP -#define SPROUT_INTEGER_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_INTEGER_HPP diff --git a/dsp/lib/sprout/sprout/integer/carry_to_exp2.hpp b/dsp/lib/sprout/sprout/integer/carry_to_exp2.hpp deleted file mode 100644 index 5db4b1e..0000000 --- a/dsp/lib/sprout/sprout/integer/carry_to_exp2.hpp +++ /dev/null @@ -1,75 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_INTEGER_CARRY_TO_EXP2_HPP -#define SPROUT_INTEGER_CARRY_TO_EXP2_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR IntType - carry_to_exp2_simpl(IntType x) { - return sprout::popcount(x) <= 1 ? x - : IntType(1) << (sizeof(IntType) * CHAR_BIT - sprout::cntl0(x)) - ; - } - template - inline SPROUT_CONSTEXPR UIntType - carry_to_exp2_uimpl(int n) { - return !n ? UIntType(0) - : UIntType(1) << (sizeof(UIntType) * CHAR_BIT - n) - ; - } - } // namespace detail - // - // carry_to_exp2 - // - // note: for signed integer - // x == MIN - // --> carry_to_exp2(x) returns x . - // x < 0 - // --> carry_to_exp2(x) returns -carry_to_exp2(-x) . - // -(MIN / 2) < x - // --> carry_to_exp2(x) returns MIN . - // - // note: for unsigned integer - // MAX / 2 + 1 < x - // --> carry_to_exp2(x) returns 0 . - // - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR IntType - carry_to_exp2(IntType x) { - return x == std::numeric_limits::min() ? x - : x < IntType(0) ? -sprout::detail::carry_to_exp2_simpl(-x) - : sprout::detail::carry_to_exp2_simpl(x) - ; - } - template< - typename UIntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR UIntType - carry_to_exp2(UIntType x) { - return sprout::popcount(x) <= 1 ? x - : sprout::detail::carry_to_exp2_uimpl(sprout::cntl0(x)) - ; - } -} // namespace sprout - -#endif // #ifndef SPROUT_INTEGER_CARRY_TO_EXP2_HPP diff --git a/dsp/lib/sprout/sprout/integer/integer_digits.hpp b/dsp/lib/sprout/sprout/integer/integer_digits.hpp deleted file mode 100644 index 568f070..0000000 --- a/dsp/lib/sprout/sprout/integer/integer_digits.hpp +++ /dev/null @@ -1,98 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_INTEGER_INTEGER_DIGITS_HPP -#define SPROUT_INTEGER_INTEGER_DIGITS_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - struct integer_digits_impl - : public sprout::integral_constant< - std::size_t, - (CHAR_BIT * sizeof(IntType) - (sprout::is_signed::value ? 1 : 0)) * N / D - + ((CHAR_BIT * sizeof(IntType) - (sprout::is_signed::value ? 1 : 0)) * N % D ? 1 : 0) - > - {}; - } // namespace detail - - // - // integer_digits - // - template - struct integer_digits; - - template - struct integer_digits - : public sprout::detail::integer_digits_impl - {}; - template - struct integer_digits - : public sprout::detail::integer_digits_impl - {}; - template - struct integer_digits - : public sprout::detail::integer_digits_impl - {}; - template - struct integer_digits - : public sprout::detail::integer_digits_impl - {}; - template - struct integer_digits - : public sprout::detail::integer_digits_impl - {}; - template - struct integer_digits - : public sprout::detail::integer_digits_impl - {}; - template - struct integer_digits - : public sprout::detail::integer_digits_impl - {}; - template - struct integer_digits - : public sprout::detail::integer_digits_impl - {}; - template - struct integer_digits - : public sprout::detail::integer_digits_impl - {}; - template - struct integer_digits - : public sprout::detail::integer_digits_impl - {}; - template - struct integer_digits - : public sprout::detail::integer_digits_impl - {}; - template - struct integer_digits - : public sprout::detail::integer_digits_impl - {}; - template - struct integer_digits - : public sprout::detail::integer_digits_impl - {}; - template - struct integer_digits - : public sprout::detail::integer_digits_impl - {}; - template - struct integer_digits - : public sprout::detail::integer_digits_impl - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_INTEGER_INTEGER_DIGITS_HPP diff --git a/dsp/lib/sprout/sprout/integer/static_pow.hpp b/dsp/lib/sprout/sprout/integer/static_pow.hpp deleted file mode 100644 index 488b0f7..0000000 --- a/dsp/lib/sprout/sprout/integer/static_pow.hpp +++ /dev/null @@ -1,76 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_INTEGER_STATIC_POW_HPP -#define SPROUT_INTEGER_STATIC_POW_HPP - -#include -#include - -namespace sprout { - // - // static_pow2 - // - template - struct static_pow2 - : public sprout::integral_constant - {}; - - namespace detail { - template - struct static_pow2m1; - template - struct static_pow2m1 - : public sprout::integral_constant - {}; - template - struct static_pow2m1 - : public sprout::integral_constant - {}; - } // namespace detail - // - // static_pow2m1 - // - template - struct static_pow2m1 - : public sprout::detail::static_pow2m1 - {}; - - namespace detail { - template - struct static_pow; - template - struct static_pow - : public sprout::integral_constant - {}; - template - struct static_pow - : public sprout::integral_constant - {}; - template - struct static_pow - : public sprout::integral_constant - {}; - template - struct static_pow - : public sprout::detail::static_pow::value, 2> - {}; - template - struct static_pow - : public sprout::integral_constant::value> - {}; - } // namespace detail - // - // static_pow - // - template - struct static_pow - : public sprout::detail::static_pow - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_INTEGER_STATIC_POW_HPP diff --git a/dsp/lib/sprout/sprout/io.hpp b/dsp/lib/sprout/sprout/io.hpp deleted file mode 100644 index 454a5c8..0000000 --- a/dsp/lib/sprout/sprout/io.hpp +++ /dev/null @@ -1,872 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_IO_HPP -#define SPROUT_IO_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace io { - namespace flags { - // - // fmtflags - // - enum fmtflags { - boolalpha = 1L << 0, - showbase = 1L << 1, - showpoint = 1L << 2, - showpos = 1L << 3, - uppercase = 1L << 4, - skipws = 1L << 5, - right = 1L << 6, - left = 1L << 7, - internal = 1L << 8, - dec = 1L << 9, - hex = 1L << 10, - oct = 1L << 11, - fixed = 1L << 12, - scientific = 1L << 13, - adjustfield = right | left | internal, - basefield = dec | hex | oct, - floatfield = fixed | scientific, - booleanfield = boolalpha | showbase | showpoint | showpos | uppercase | skipws, - default_flags = right | dec | fixed, - precision_ = 1L << 14, - width_ = 1L << 15, - fill_ = 1L << 16, - modified_shift_ = 17, - }; - // - // boolean_flag - // - template - struct boolean_flag - : public sprout::integral_constant - { - private: - bool flag_; - public: - SPROUT_CONSTEXPR boolean_flag() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - boolean_flag(boolean_flag const&) = default; - SPROUT_CONSTEXPR boolean_flag(bool flag) - : sprout::integral_constant() - , flag_(flag) - {} - SPROUT_CONSTEXPR boolean_flag operator()(bool flag) const { - return boolean_flag(flag); - } - SPROUT_CONSTEXPR operator bool() const { - return flag_; - } - SPROUT_CONSTEXPR bool operator!() const { - return !flag_; - } - }; - // - // field_flag - // - template - struct field_flag - : public sprout::integral_constant - { - public: - SPROUT_STATIC_CONSTEXPR sprout::io::flags::fmtflags mask = Mask; - public: - SPROUT_CONSTEXPR field_flag() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - field_flag(field_flag const&) = default; - }; - template - SPROUT_CONSTEXPR_OR_CONST sprout::io::flags::fmtflags sprout::io::flags::field_flag::mask; - - // - // precision_t - // - struct precision_t { - public: - typedef std::streamsize type; - public: - type value; - public: - SPROUT_CONSTEXPR precision_t(type value) - : value(value) - {} - SPROUT_CONSTEXPR operator type() const { - return value; - } - }; - - // - // width_t - // - struct width_t { - public: - typedef std::streamsize type; - public: - type value; - public: - SPROUT_CONSTEXPR width_t(type value) - : value(value) - {} - SPROUT_CONSTEXPR operator type() const { - return value; - } - }; - - // - // fill_t - // - struct fill_t { - public: - typedef char type; - public: - type value; - public: - SPROUT_CONSTEXPR fill_t(type value) - : value(value) - {} - SPROUT_CONSTEXPR operator type() const { - return value; - } - }; - } // namespace flags - - SPROUT_STATIC_CONSTEXPR sprout::io::flags::boolean_flag boolalpha = true; - SPROUT_STATIC_CONSTEXPR sprout::io::flags::boolean_flag showbase = true; - SPROUT_STATIC_CONSTEXPR sprout::io::flags::boolean_flag showpoint = true; - SPROUT_STATIC_CONSTEXPR sprout::io::flags::boolean_flag showpos = true; - SPROUT_STATIC_CONSTEXPR sprout::io::flags::boolean_flag uppercase = true; - SPROUT_STATIC_CONSTEXPR sprout::io::flags::boolean_flag skipws = true; - SPROUT_STATIC_CONSTEXPR sprout::io::flags::field_flag right = {}; - SPROUT_STATIC_CONSTEXPR sprout::io::flags::field_flag left = {}; - SPROUT_STATIC_CONSTEXPR sprout::io::flags::field_flag internal = {}; - SPROUT_STATIC_CONSTEXPR sprout::io::flags::field_flag dec = {}; - SPROUT_STATIC_CONSTEXPR sprout::io::flags::field_flag hex = {}; - SPROUT_STATIC_CONSTEXPR sprout::io::flags::field_flag oct = {}; - SPROUT_STATIC_CONSTEXPR sprout::io::flags::field_flag fixed = {}; - SPROUT_STATIC_CONSTEXPR sprout::io::flags::field_flag scientific = {}; - - // - // precision - // width - // fill - // - inline SPROUT_CONSTEXPR sprout::io::flags::precision_t - precision(sprout::io::flags::precision_t::type value) { - return sprout::io::flags::precision_t(value); - } - inline SPROUT_CONSTEXPR sprout::io::flags::width_t - width(sprout::io::flags::width_t::type value) { - return sprout::io::flags::width_t(value); - } - inline SPROUT_CONSTEXPR sprout::io::flags::fill_t - fill(sprout::io::flags::fill_t::type value) { - return sprout::io::flags::fill_t(value); - } - - // - // format_settings - // - class format_settings { - private: - sprout::io::flags::fmtflags flags_; - sprout::io::flags::precision_t precision_; - sprout::io::flags::width_t width_; - sprout::io::flags::fill_t fill_; - private: - SPROUT_CONSTEXPR format_settings(format_settings const& other, sprout::io::flags::fmtflags flags) - : flags_(flags) - , precision_(other.precision_) - , width_(other.width_) - , fill_(other.fill_) - {} - SPROUT_CONSTEXPR format_settings(format_settings const& other, sprout::io::flags::precision_t precision) - : flags_(static_cast(other.flags_ | sprout::io::flags::precision_)) - , precision_(precision) - , width_(other.width_) - , fill_(other.fill_) - {} - SPROUT_CONSTEXPR format_settings(format_settings const& other, sprout::io::flags::width_t width) - : flags_(static_cast(other.flags_ | sprout::io::flags::width_)) - , precision_(other.precision_) - , width_(width) - , fill_(other.fill_) - {} - SPROUT_CONSTEXPR format_settings(format_settings const& other, sprout::io::flags::fill_t fill) - : flags_(static_cast(other.flags_ | sprout::io::flags::fill_)) - , precision_(other.precision_) - , width_(other.width_) - , fill_(fill) - {} - SPROUT_CONSTEXPR format_settings( - sprout::io::flags::fmtflags flags, - sprout::io::flags::precision_t precision, - sprout::io::flags::width_t width, - sprout::io::flags::fill_t fill - ) - : flags_(flags) - , precision_(precision) - , width_(width) - , fill_(fill) - {} - public: - SPROUT_CONSTEXPR format_settings() - : flags_(sprout::io::flags::default_flags) - , precision_(6) - , width_(0) - , fill_(' ') - {} - format_settings(format_settings const&) = default; - explicit SPROUT_CONSTEXPR format_settings(sprout::io::flags::fmtflags flags) - : flags_(flags) - , precision_(6) - , width_(0) - , fill_(' ') - {} - explicit SPROUT_CONSTEXPR format_settings(sprout::io::flags::precision_t precision) - : flags_(sprout::io::flags::default_flags) - , precision_(precision) - , width_(0) - , fill_(' ') - {} - explicit SPROUT_CONSTEXPR format_settings(sprout::io::flags::width_t width) - : flags_(sprout::io::flags::default_flags) - , precision_(6) - , width_(width) - , fill_(' ') - {} - explicit SPROUT_CONSTEXPR format_settings(sprout::io::flags::fill_t fill) - : flags_(sprout::io::flags::default_flags) - , precision_(6) - , width_(0) - , fill_(fill) - {} - SPROUT_CONSTEXPR sprout::io::flags::fmtflags flags() const { - return flags_; - } - template - SPROUT_CONSTEXPR format_settings flags(sprout::io::flags::boolean_flag flag) const { - return format_settings( - *this, - static_cast( - (flag ? flags_ | Flag : flags_ & ~Flag) | (Flag << sprout::io::flags::modified_shift_) - ) - ); - } - template - SPROUT_CONSTEXPR format_settings flags(sprout::io::flags::field_flag) const { - return format_settings( - *this, - static_cast( - (flags_ & ~Mask) | (Flag & Mask) | (Mask << sprout::io::flags::modified_shift_) - ) - ); - } - SPROUT_CONSTEXPR sprout::io::flags::precision_t::type precision() const { - return precision_; - } - SPROUT_CONSTEXPR format_settings precision(sprout::io::flags::precision_t precision) const { - return format_settings(*this, precision); - } - SPROUT_CONSTEXPR sprout::io::flags::width_t::type width() const { - return width_; - } - SPROUT_CONSTEXPR format_settings width(sprout::io::flags::width_t width) const { - return format_settings(*this, width); - } - SPROUT_CONSTEXPR sprout::io::flags::fill_t::type fill() const { - return fill_; - } - SPROUT_CONSTEXPR format_settings fill(sprout::io::flags::fill_t fill) const { - return format_settings(*this, fill); - } - SPROUT_CONSTEXPR format_settings combine(format_settings const& base) const { - return format_settings( - static_cast( - (base.flags_ & ~(flags_ >> sprout::io::flags::modified_shift_)) | flags_ - ), - flags_ & sprout::io::flags::precision_ ? precision_ : base.precision_, - flags_ & sprout::io::flags::width_ ? width_ : base.width_, - flags_ & sprout::io::flags::fill_ ? fill_ : base.fill_ - ); - } - }; - - // - // format_holder - // - template - class format_holder { - private: - sprout::value_holder holder_; - sprout::io::format_settings settings_; - public: - SPROUT_CONSTEXPR format_holder() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - format_holder(format_holder const&) = default; - explicit SPROUT_CONSTEXPR format_holder(T const& value) - : holder_(value) - , settings_() - {} - SPROUT_CONSTEXPR format_holder( - T const& value, - sprout::io::format_settings const& settings - ) - : holder_(value) - , settings_(settings) - {} - SPROUT_CONSTEXPR format_holder( - format_holder const& holder, - sprout::io::format_settings const& settings - ) - : holder_(holder) - , settings_(settings) - {} - SPROUT_CONSTEXPR T const& value() const { - return holder_; - } - SPROUT_CONSTEXPR sprout::io::format_settings const& settings() const { - return settings_; - } - SPROUT_CONSTEXPR format_holder settings(sprout::io::format_settings const& settings) const { - return format_holder(holder_, settings); - } - }; - - namespace flags { - template - inline SPROUT_CONSTEXPR sprout::io::format_holder - operator|(T const& value, sprout::io::flags::boolean_flag flag) { - return sprout::io::format_holder(value, sprout::io::format_settings().flags(flag)); - } - template - inline SPROUT_CONSTEXPR sprout::io::format_holder - operator|(T const& value, sprout::io::flags::field_flag flag) { - return sprout::io::format_holder(value, sprout::io::format_settings().flags(flag)); - } - template - inline SPROUT_CONSTEXPR sprout::io::format_holder - operator|(T const& value, sprout::io::flags::precision_t precision) { - return sprout::io::format_holder(value, sprout::io::format_settings(precision)); - } - template - inline SPROUT_CONSTEXPR sprout::io::format_holder - operator|(T const& value, sprout::io::flags::width_t width) { - return sprout::io::format_holder(value, sprout::io::format_settings(width)); - } - template - inline SPROUT_CONSTEXPR sprout::io::format_holder - operator|(T const& value, sprout::io::flags::fill_t fill) { - return sprout::io::format_holder(value, sprout::io::format_settings(fill)); - } - - template - inline SPROUT_CONSTEXPR sprout::io::format_holder - operator|(sprout::io::format_holder const& holder, sprout::io::flags::boolean_flag flag) { - return holder.settings(holder.settings().flags(flag)); - } - template - inline SPROUT_CONSTEXPR sprout::io::format_holder - operator|(sprout::io::format_holder const& holder, sprout::io::flags::field_flag flag) { - return holder.settings(holder.settings().flags(flag)); - } - template - inline SPROUT_CONSTEXPR sprout::io::format_holder - operator|(sprout::io::format_holder const& holder, sprout::io::flags::precision_t precision) { - return holder.settings(holder.settings().precision(precision)); - } - template - inline SPROUT_CONSTEXPR sprout::io::format_holder - operator|(sprout::io::format_holder const& holder, sprout::io::flags::width_t width) { - return holder.settings(holder.settings().width(width)); - } - template - inline SPROUT_CONSTEXPR sprout::io::format_holder - operator|(sprout::io::format_holder const& holder, sprout::io::flags::fill_t fill) { - return holder.settings(holder.settings().fill(fill)); - } - } // namespace flags - - template - inline SPROUT_CONSTEXPR sprout::basic_string - output(Expression const& expr); - - // - // nil_expression - // - class nil_expression {}; - // - // is_nil_expression - // - template - struct is_nil_expression - : public sprout::false_type - {}; - template - struct is_nil_expression - : public sprout::io::is_nil_expression - {}; - template - struct is_nil_expression - : public sprout::io::is_nil_expression - {}; - template<> - struct is_nil_expression - : public sprout::true_type - {}; - - // - // root_expression - // - class root_expression { - private: - sprout::io::format_settings settings_; - public: - SPROUT_CONSTEXPR root_expression() - : settings_() - {} - root_expression(root_expression const&) = default; - explicit SPROUT_CONSTEXPR root_expression(sprout::io::format_settings const& settings) - : settings_(settings) - {} - SPROUT_CONSTEXPR sprout::io::format_settings const& settings() const { - return settings_; - } - }; - // - // is_root_expression - // - template - struct is_root_expression - : public sprout::false_type - {}; - template - struct is_root_expression - : public sprout::io::is_root_expression - {}; - template - struct is_root_expression - : public sprout::io::is_root_expression - {}; - template<> - struct is_root_expression - : public sprout::true_type - {}; - - // - // leaf_expression - // - template - class leaf_expression { - private: - sprout::value_holder value_; - public: - SPROUT_CONSTEXPR leaf_expression() - : value_() - {} - leaf_expression(leaf_expression const&) = default; - explicit SPROUT_CONSTEXPR leaf_expression(T const& value) - : value_(value) - {} - SPROUT_CONSTEXPR T const& value() const { - return value_; - } - }; - // - // is_leaf_expression - // - template - struct is_leaf_expression - : public sprout::false_type - {}; - template - struct is_leaf_expression - : public sprout::io::is_leaf_expression - {}; - template - struct is_leaf_expression - : public sprout::io::is_leaf_expression - {}; - template - struct is_leaf_expression > - : public sprout::true_type - {}; - - // - // format_expression - // - template - class format_expression { - private: - typedef typename std::conditional< - sprout::io::is_root_expression::value, - Left, - Left const& - >::type left_held_type; - typedef typename std::conditional< - sprout::io::is_nil_expression::value || sprout::io::is_leaf_expression::value, - Right, - Right const& - >::type right_held_type; - typedef sprout::value_holder left_holder_type; - typedef sprout::value_holder right_holder_type; - private: - left_holder_type left_; - right_holder_type right_; - public: - SPROUT_CONSTEXPR format_expression() - : left_(), right_() - {} - format_expression(format_expression const&) = default; - explicit SPROUT_CONSTEXPR format_expression(Left const& left) - : left_(left), right_() - {} - explicit SPROUT_CONSTEXPR format_expression(left_holder_type left) - : left_(left), right_() - {} - SPROUT_CONSTEXPR format_expression(Left const& left, Right const& right) - : left_(left) , right_(right) - {} - SPROUT_CONSTEXPR format_expression(left_holder_type left, right_holder_type right) - : left_(left), right_(right) - {} - SPROUT_CONSTEXPR Left const& left() const { - return left_; - } - SPROUT_CONSTEXPR Right const& right() const { - return right_; - } - SPROUT_CONSTEXPR sprout::io::format_settings const& settings() const { - return left().settings(); - } - template - SPROUT_CONSTEXPR sprout::basic_string output() const { - return sprout::io::output(*this); - } - template - SPROUT_CONSTEXPR operator sprout::basic_string() const { - return sprout::io::output(*this); - } - }; - // - // is_format_expression - // - template - struct is_format_expression - : public sprout::false_type - {}; - template - struct is_format_expression - : public sprout::io::is_format_expression - {}; - template - struct is_format_expression - : public sprout::io::is_format_expression - {}; - template - struct is_format_expression > - : public sprout::true_type - {}; - - // - // root_t - // - typedef sprout::io::format_expression< - sprout::io::root_expression, - sprout::io::nil_expression - > root_t; - - // - // root - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::io::root_t root = {}; - } // anonymous-namespace - - template - inline SPROUT_CONSTEXPR auto - operator<<(sprout::io::format_expression const& lhs, sprout::io::format_holder const& rhs) - -> sprout::io::format_expression< - sprout::io::format_expression, - decltype(std::declval() << rhs.value()) - > - { - typedef decltype(sprout::io::root << rhs.value()) type; - return sprout::io::format_expression, type>( - lhs, - sprout::io::root_t(sprout::io::root_expression(rhs.settings().combine(lhs.settings()))) << rhs.value() - ); - } - template - inline SPROUT_CONSTEXPR sprout::io::format_expression< - sprout::io::format_expression, - sprout::io::leaf_expression - > - operator<<(sprout::io::format_expression const& lhs, T const& rhs) { - return sprout::io::format_expression< - sprout::io::format_expression, - sprout::io::leaf_expression - >(lhs, sprout::io::leaf_expression(rhs)); - } - - // - // leaf_count - // - namespace detail { - template - struct leaf_count; - template<> - struct leaf_count - : public sprout::integral_constant - {}; - template - struct leaf_count > - : public sprout::integral_constant - {}; - template - struct leaf_count > - : public sprout::integral_constant< - std::size_t, - sprout::io::detail::leaf_count::value + sprout::io::detail::leaf_count::value - > - {}; - } // namespace detail - template - struct leaf_count - : public sprout::io::detail::leaf_count - {}; - template - struct leaf_count - : public sprout::io::leaf_count - {}; - template - struct leaf_count - : public sprout::io::leaf_count - {}; - - // - // leaf_at - // - namespace detail { - template - struct leaf_at; - template - struct leaf_at > { - public: - typedef T type; - }; - template - struct leaf_at > - : public std::conditional< - I < sprout::io::leaf_count::value, - sprout::io::detail::leaf_at, - sprout::io::detail::leaf_at::value, Right> - >::type - {}; - } // namespace detail - template - struct leaf_at - : public sprout::io::detail::leaf_at - {}; - template - struct leaf_at - : public sprout::io::leaf_at - {}; - template - struct leaf_at - : public sprout::io::leaf_at - {}; - - // - // get_leaf - // - namespace detail { - template< - std::size_t I, typename Left, typename Right, - typename sprout::enabler_if<(I >= sprout::io::leaf_count::value)>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR sprout::io::format_holder< - typename sprout::io::leaf_at >::type - > - get_leaf(sprout::io::format_expression const& expr); - - template< - std::size_t I, typename Left, typename T, - typename sprout::enabler_if<(I == sprout::io::leaf_count::value)>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR sprout::io::format_holder< - typename sprout::io::leaf_at > >::type - > - get_leaf(sprout::io::format_expression > const& expr) { - return sprout::io::format_holder< - typename sprout::io::leaf_at > >::type - >(expr.right().value(), expr.settings()); - } - - template< - std::size_t I, typename Left, typename Right, - typename sprout::enabler_if<(I < sprout::io::leaf_count::value)>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR sprout::io::format_holder< - typename sprout::io::leaf_at >::type - > - get_leaf(sprout::io::format_expression const& expr) { - return sprout::io::detail::get_leaf(expr.left()); - } - template< - std::size_t I, typename Left, typename Right, - typename sprout::enabler_if<(I >= sprout::io::leaf_count::value)>::type - > - inline SPROUT_CONSTEXPR sprout::io::format_holder< - typename sprout::io::leaf_at >::type - > - get_leaf(sprout::io::format_expression const& expr) { - return sprout::io::detail::get_leaf::value>(expr.right()); - } - } // namespace detail - template - inline SPROUT_CONSTEXPR sprout::io::format_holder::type> - get_leaf(Expression const& expr) { - return sprout::io::detail::get_leaf(expr); - } - - // - // eval - // - template< - typename Elem, std::size_t N, typename T, - typename sprout::enabler_if< - std::is_integral::value - && !sprout::is_char_type::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR auto - eval(sprout::io::format_holder const& holder) - -> decltype(sprout::int_to_string(holder.value())) - { - return sprout::int_to_string(holder.value()); - } - template< - typename Elem, std::size_t N, typename T, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR auto - eval(sprout::io::format_holder const& holder) - -> decltype(sprout::float_to_string(holder.value())) - { - return sprout::float_to_string(holder.value()); - } - template< - typename Elem, std::size_t N, typename T, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR auto - eval(sprout::io::format_holder const& holder) - -> decltype(sprout::detail::string_construct_access::raw_construct(1, static_cast(holder.value()))) - { - return sprout::detail::string_construct_access::raw_construct(1, static_cast(holder.value())); - } - template< - typename Elem, std::size_t N, typename T, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR auto - eval(sprout::io::format_holder const& holder) - -> decltype(sprout::to_string(holder.value())) - { - return sprout::to_string(holder.value()); - } - template< - typename Elem, std::size_t N, typename T, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR auto - eval(sprout::io::format_holder const& holder) - -> decltype(holder.value()) - { - return holder.value(); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR Elem - get_param(RandomAccessIterator const& found, sprout::array const& sizes, std::size_t idx, Args const&... args) { - return found == sizes.end() ? static_cast('\0') - : sprout::detail::param_seq_at( - found - sizes.begin(), - idx - (found != sizes.begin() ? found[-1] : 0), - args... - ) - ; - } - } // namespace detail - - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::basic_string - output_impl_1(sprout::index_tuple, sprout::array const& sizes, Args const&... args) { - typedef sprout::detail::string_construct_access access_type; - return access_type::raw_construct( - NS_SSCRISK_CEL_OR_SPROUT::min(sizes.back(), N), - sprout::io::detail::get_param( - sprout::range::lower_bound(sizes, static_cast(Indexes + 1)), - sizes, - Indexes, - args... - )... - ); - } - template - inline SPROUT_CONSTEXPR sprout::basic_string - output_impl(Args const&... args) { - return sprout::io::detail::output_impl_1( - sprout::make_index_tuple::make(), - sprout::range::partial_sum( - sprout::array{{args.size()...}}, - sprout::pit >() - ), - args... - ); - } - template - inline SPROUT_CONSTEXPR sprout::basic_string - output(Expression const& expr, sprout::index_tuple) { - return sprout::io::detail::output_impl( - sprout::io::eval(sprout::io::get_leaf(expr))... - ); - } - } // namespace detail - // - // output - // - template - inline SPROUT_CONSTEXPR sprout::basic_string - output(Expression const& expr) { - return sprout::io::detail::output( - expr, - sprout::make_index_tuple::value>::make() - ); - } - } // namespace io -} // namespace sprout - -#endif // #ifndef SPROUT_IO_HPP diff --git a/dsp/lib/sprout/sprout/iterator.hpp b/dsp/lib/sprout/sprout/iterator.hpp deleted file mode 100644 index 3ed3cdd..0000000 --- a/dsp/lib/sprout/sprout/iterator.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_HPP -#define SPROUT_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/adaptor.hpp b/dsp/lib/sprout/sprout/iterator/adaptor.hpp deleted file mode 100644 index 7b7bf23..0000000 --- a/dsp/lib/sprout/sprout/iterator/adaptor.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_ADAPTOR_HPP -#define SPROUT_ITERATOR_ADAPTOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ITERATOR_ADAPTOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/adjacent_filter_iterator.hpp b/dsp/lib/sprout/sprout/iterator/adjacent_filter_iterator.hpp deleted file mode 100644 index f64e03e..0000000 --- a/dsp/lib/sprout/sprout/iterator/adjacent_filter_iterator.hpp +++ /dev/null @@ -1,189 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_ADJACENT_FILTER_ITERATOR_HPP -#define SPROUT_ITERATOR_ADJACENT_FILTER_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // adjacent_filter_iterator - // - template - class adjacent_filter_iterator - : public sprout::detail::iterator_base< - Iterator, - typename sprout::min_iterator_category< - typename std::iterator_traits::iterator_category, - std::forward_iterator_tag - >::type - >::type - { - private: - typedef typename sprout::detail::iterator_base< - Iterator, - typename sprout::min_iterator_category< - typename std::iterator_traits::iterator_category, - std::forward_iterator_tag - >::type - >::type base_type; - public: - typedef Predicate predicate_type; - typedef Iterator iterator_type; - typedef typename base_type::iterator_category iterator_category; - typedef typename base_type::value_type value_type; - typedef typename base_type::difference_type difference_type; - typedef typename base_type::pointer pointer; - typedef typename base_type::reference reference; - private: - struct private_construct_t {}; - private: - static SPROUT_CONSTEXPR iterator_type find_next(iterator_type first, iterator_type last, Predicate pred) { - return sprout::adjacent_find(first, last, pred); - } - static SPROUT_CONSTEXPR iterator_type checked_next(iterator_type found, iterator_type last) { - return found == last ? last - : sprout::next(found) - ; - } - protected: - iterator_type current; - iterator_type last; - Predicate pred; - private: - SPROUT_CXX14_CONSTEXPR void satisfy_predicate() { - current = sprout::adjacent_find(current, last, pred); - } - SPROUT_CONSTEXPR adjacent_filter_iterator(Predicate pred, iterator_type it, iterator_type last, private_construct_t) - : current(it) - , last(last) - , pred(pred) - {} - public: - SPROUT_CONSTEXPR adjacent_filter_iterator() - : current(), last(), pred() - {} - adjacent_filter_iterator(adjacent_filter_iterator const&) = default; - SPROUT_CONSTEXPR adjacent_filter_iterator(Predicate pred, iterator_type it, iterator_type last = iterator_type()) - : current(find_next(it, last, pred)) - , last(last) - , pred(pred) - {} - template - SPROUT_CONSTEXPR adjacent_filter_iterator(adjacent_filter_iterator const& it) - : current(it.current) - , last(it.last) - , pred(it.pred) - {} - template - SPROUT_CXX14_CONSTEXPR adjacent_filter_iterator& operator=(adjacent_filter_iterator const& it) { - adjacent_filter_iterator temp(it); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR iterator_type base() const { - return current; - } - SPROUT_CONSTEXPR iterator_type end() const { - return last; - } - SPROUT_CONSTEXPR Predicate predicate() const { - return pred; - } - SPROUT_CONSTEXPR reference operator*() const { - return *current; - } - SPROUT_CONSTEXPR pointer operator->() const { - return &*current; - } - - SPROUT_CXX14_CONSTEXPR adjacent_filter_iterator& operator++() { - satisfy_predicate(); - if (current != last) { - ++current; - } - return *this; - } - SPROUT_CXX14_CONSTEXPR adjacent_filter_iterator operator++(int) { - adjacent_filter_iterator result(*this); - satisfy_predicate(); - if (current != last) { - ++current; - } - return result; - } - SPROUT_CONSTEXPR adjacent_filter_iterator next() const { - return adjacent_filter_iterator(pred, checked_next(find_next(current, last, pred), last), last, private_construct_t()); - } - SPROUT_CXX14_CONSTEXPR void swap(adjacent_filter_iterator& other) - SPROUT_NOEXCEPT_IF( - SPROUT_NOEXCEPT_EXPR(sprout::swap(current, other.current)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(last, other.last)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(pred, other.pred)) - ) - { - sprout::swap(current, other.current); - sprout::swap(last, other.last); - sprout::swap(pred, other.pred); - } - }; - - template - inline SPROUT_CONSTEXPR bool operator==( - sprout::adjacent_filter_iterator const& lhs, - sprout::adjacent_filter_iterator const& rhs - ) - { - return lhs.base() == rhs.base(); - } - template - inline SPROUT_CONSTEXPR bool operator!=( - sprout::adjacent_filter_iterator const& lhs, - sprout::adjacent_filter_iterator const& rhs - ) - { - return !(lhs == rhs); - } - - // - // make_adjacent_filter_iterator - // - template - inline SPROUT_CONSTEXPR sprout::adjacent_filter_iterator - make_adjacent_filter_iterator(Predicate pred, Iterator it, Iterator last = Iterator()) { - return sprout::adjacent_filter_iterator(pred, it, last); - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::adjacent_filter_iterator& lhs, sprout::adjacent_filter_iterator& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::adjacent_filter_iterator - iterator_next(sprout::adjacent_filter_iterator const& it) { - return it.next(); - } -} // namespace sprout - -#endif // SPROUT_ITERATOR_ADJACENT_FILTER_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/advance.hpp b/dsp/lib/sprout/sprout/iterator/advance.hpp deleted file mode 100644 index 4f96acb..0000000 --- a/dsp/lib/sprout/sprout/iterator/advance.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_ADVANCE_HPP -#define SPROUT_ITERATOR_ADVANCE_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CXX14_CONSTEXPR void - advance_impl(InputIterator& it, Distance n, std::input_iterator_tag*) { - SPROUT_ASSERT(sprout::math::greater_equal(n, 0)); - for (; 0 < n; --n) { - ++it; - } - } - template - inline SPROUT_CXX14_CONSTEXPR void - advance_impl(BidirectionalIterator& it, Distance n, std::bidirectional_iterator_tag*) { - if (n > 0) { - for (; 0 < n; --n) { - ++it; - } - } else { - for (; n < 0; ++n) { - --it; - } - } - } - template - inline SPROUT_CXX14_CONSTEXPR void - advance_impl(RandomAccessIterator& it, Distance n, std::random_access_iterator_tag*) { - it += n; - } - } // namespace detail - // - // advance - // - template::difference_type> - inline SPROUT_CXX14_CONSTEXPR void - advance(Iterator& it, Distance n = 1) { - typedef typename std::iterator_traits::iterator_category* category; - sprout::detail::advance_impl(it, n, category()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_ADVANCE_HPP diff --git a/dsp/lib/sprout/sprout/iterator/alternate_iterator.hpp b/dsp/lib/sprout/sprout/iterator/alternate_iterator.hpp deleted file mode 100644 index 36a7e56..0000000 --- a/dsp/lib/sprout/sprout/iterator/alternate_iterator.hpp +++ /dev/null @@ -1,307 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_ALTERNATE_ITERATOR_HPP -#define SPROUT_ITERATOR_ALTERNATE_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // alternate_iterator - // - template - class alternate_iterator - : public sprout::iterator< - typename sprout::common_iterator_category::type, - typename sprout::common_iterator_value_type::type, - typename sprout::common_iterator_difference_type::type, - typename sprout::common_iterator_pointer::type, - typename sprout::common_iterator_reference::type - > - { - public: - typedef LIterator iterator_type; - typedef RIterator iterator2_type; - typedef typename sprout::common_iterator_category::type iterator_category; - typedef typename sprout::common_iterator_value_type::type value_type; - typedef typename sprout::common_iterator_difference_type::type difference_type; - typedef typename sprout::common_iterator_pointer::type pointer; - typedef typename sprout::common_iterator_reference::type reference; - protected: - iterator_type current1; - iterator2_type current2; - bool in_left; - private: - SPROUT_CONSTEXPR alternate_iterator advance_impl_1(difference_type n) const { - return alternate_iterator(sprout::next(current1, n / 2), sprout::next(current2, n / 2), !(n % 2)); - } - SPROUT_CONSTEXPR alternate_iterator advance_impl(difference_type n) const { - return advance_impl_1(n + (!is_in_left() ? 1 : 0)); - } - SPROUT_CONSTEXPR alternate_iterator(iterator_type it1, iterator2_type it2, bool in_left) - : current1(it1), current2(it2), in_left(in_left) - {} - public: - SPROUT_CONSTEXPR alternate_iterator() - : current1(), current2(), in_left(true) - {} - alternate_iterator(alternate_iterator const&) = default; - SPROUT_CONSTEXPR alternate_iterator(iterator_type it1, iterator2_type it2) - : current1(it1), current2(it2), in_left(true) - {} - template - SPROUT_CONSTEXPR alternate_iterator(alternate_iterator const& it) - : current1(it.base()), current2(it.base2()), in_left(it.is_in_left()) - {} - template - SPROUT_CXX14_CONSTEXPR alternate_iterator& operator=(alternate_iterator const& it) { - alternate_iterator temp(it); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR iterator_type base() const { - return current1; - } - SPROUT_CONSTEXPR iterator2_type base2() const { - return current2; - } - SPROUT_CONSTEXPR bool is_in_left() const { - return in_left; - } - SPROUT_CONSTEXPR reference operator*() const { - return is_in_left() ? *current1 : *current2; - } - SPROUT_CONSTEXPR pointer operator->() const { - return &*(*this); - } - SPROUT_CXX14_CONSTEXPR alternate_iterator& operator++() { - if (is_in_left()) { - in_left = false; - } else { - in_left = true; - ++current1; - ++current2; - } - return *this; - } - SPROUT_CXX14_CONSTEXPR alternate_iterator operator++(int) { - alternate_iterator result(*this); - if (is_in_left()) { - in_left = false; - } else { - in_left = true; - ++current1; - ++current2; - } - return result; - } - SPROUT_CXX14_CONSTEXPR alternate_iterator& operator--() { - if (is_in_left()) { - in_left = false; - --current1; - --current2; - } else { - in_left = true; - } - return *this; - } - SPROUT_CXX14_CONSTEXPR alternate_iterator operator--(int) { - alternate_iterator temp(*this); - if (is_in_left()) { - in_left = false; - --current1; - --current2; - } else { - in_left = true; - } - return temp; - } - SPROUT_CONSTEXPR alternate_iterator operator+(difference_type n) const { - return advance_impl(n); - } - SPROUT_CONSTEXPR alternate_iterator operator-(difference_type n) const { - return advance_impl(-n); - } - SPROUT_CXX14_CONSTEXPR alternate_iterator& operator+=(difference_type n) { - alternate_iterator temp(*this + n); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR alternate_iterator& operator-=(difference_type n) { - alternate_iterator temp(*this - n); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR reference operator[](difference_type n) const { - return *(*this + n); - } - SPROUT_CONSTEXPR alternate_iterator next() const { - return is_in_left() ? alternate_iterator(current1, current2, false) - : alternate_iterator(sprout::next(current1), sprout::next(current2), true) - ; - } - SPROUT_CONSTEXPR alternate_iterator prev() const { - return is_in_left() ? alternate_iterator(sprout::prev(current1), sprout::prev(current2), false) - : alternate_iterator(current1, current2, true) - ; - } - SPROUT_CXX14_CONSTEXPR void swap(alternate_iterator& other) - SPROUT_NOEXCEPT_IF( - SPROUT_NOEXCEPT_EXPR(sprout::swap(current1, other.current1)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(current2, other.current2)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(in_left, other.in_left)) - ) - { - sprout::swap(current1, other.current1); - sprout::swap(current2, other.current2); - sprout::swap(in_left, other.in_left); - } - }; - - template< - typename LIterator1, typename RIterator1, - typename LIterator2, typename RIterator2 - > - inline SPROUT_CONSTEXPR bool operator==( - sprout::alternate_iterator const& lhs, - sprout::alternate_iterator const& rhs - ) - { - return lhs.base() == rhs.base() && (lhs.is_in_left() == rhs.is_in_left()); - } - template< - typename LIterator1, typename RIterator1, - typename LIterator2, typename RIterator2 - > - inline SPROUT_CONSTEXPR bool operator!=( - sprout::alternate_iterator const& lhs, - sprout::alternate_iterator const& rhs - ) - { - return !(lhs == rhs); - } - template< - typename LIterator1, typename RIterator1, - typename LIterator2, typename RIterator2 - > - inline SPROUT_CONSTEXPR bool operator<( - sprout::alternate_iterator const& lhs, - sprout::alternate_iterator const& rhs - ) - { - return lhs.base() < rhs.base() || (lhs.base() == rhs.base() && lhs.is_in_left() && !rhs.is_in_left()); - } - template< - typename LIterator1, typename RIterator1, - typename LIterator2, typename RIterator2 - > - inline SPROUT_CONSTEXPR bool operator>( - sprout::alternate_iterator const& lhs, - sprout::alternate_iterator const& rhs - ) - { - return rhs < lhs; - } - template< - typename LIterator1, typename RIterator1, - typename LIterator2, typename RIterator2 - > - inline SPROUT_CONSTEXPR bool operator<=( - sprout::alternate_iterator const& lhs, - sprout::alternate_iterator const& rhs - ) - { - return !(rhs < lhs); - } - template< - typename LIterator1, typename RIterator1, - typename LIterator2, typename RIterator2 - > - inline SPROUT_CONSTEXPR bool operator>=( - sprout::alternate_iterator const& lhs, - sprout::alternate_iterator const& rhs - ) - { - return !(lhs < rhs); - } - template< - typename LIterator1, typename RIterator1, - typename LIterator2, typename RIterator2 - > - inline SPROUT_CONSTEXPR decltype(std::declval() - std::declval()) - operator-( - sprout::alternate_iterator const& lhs, - sprout::alternate_iterator const& rhs - ) - { - return sprout::limited::plus( - sprout::limited::multiplies(lhs.base() - rhs.base(), 2), - lhs.is_in_left() ? (rhs.is_in_left() ? 0 : 1) : (rhs.is_in_left() ? 1 : 0) - ); - } - template - inline SPROUT_CONSTEXPR sprout::alternate_iterator operator+( - typename sprout::alternate_iterator::difference_type n, - sprout::alternate_iterator const& it - ) - { - return it + n; - } - - // - // make_alternate_iterator - // - template - inline SPROUT_CONSTEXPR sprout::alternate_iterator - make_alternate_iterator(LIterator it1, RIterator it2) { - return sprout::alternate_iterator(it1, it2); - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap( - sprout::alternate_iterator& lhs, - sprout::alternate_iterator& rhs - ) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::alternate_iterator - iterator_next(sprout::alternate_iterator const& it) { - return it.next(); - } - - // - // iterator_prev - // - template - inline SPROUT_CONSTEXPR sprout::alternate_iterator - iterator_prev(sprout::alternate_iterator const& it) { - return it.prev(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_ALTERNATE_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/amplitude_spectrum_iterator.hpp b/dsp/lib/sprout/sprout/iterator/amplitude_spectrum_iterator.hpp deleted file mode 100644 index 2e897d0..0000000 --- a/dsp/lib/sprout/sprout/iterator/amplitude_spectrum_iterator.hpp +++ /dev/null @@ -1,53 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_AMPLITUDE_SPECTRUM_ITERATOR_HPP -#define SPROUT_ITERATOR_AMPLITUDE_SPECTRUM_ITERATOR_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // amplitude_value - // - template - class amplitude_value { - public: - typedef typename T::value_type result_type; - typedef T argument_type; - public: - SPROUT_CONSTEXPR typename T::value_type - operator()(T const& value) const { - return sprout::amplitude_spectrum_value(value); - } - }; - template<> - class amplitude_value { - public: - template - SPROUT_CONSTEXPR typename T::value_type - operator()(T const& value) const { - return sprout::amplitude_spectrum_value(value); - } - }; - - // - // make_amplitude_spectrum_iterator - // - template - inline SPROUT_CONSTEXPR sprout::transform_iterator::value_type>, Iterator> - make_amplitude_spectrum_iterator(Iterator it) { - return sprout::transform_iterator::value_type>, Iterator>( - it, sprout::amplitude_value::value_type>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_AMPLITUDE_SPECTRUM_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/back_insert_iterator.hpp b/dsp/lib/sprout/sprout/iterator/back_insert_iterator.hpp deleted file mode 100644 index b2d3a49..0000000 --- a/dsp/lib/sprout/sprout/iterator/back_insert_iterator.hpp +++ /dev/null @@ -1,174 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_BACK_INSERT_ITERATOR_HPP -#define SPROUT_ITERATOR_BACK_INSERT_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // back_insert_iterator - // - template - class back_insert_iterator - : public sprout::iterator - , public sprout::container_holder - { - private: - typedef sprout::container_holder base_type; - public: - typedef typename base_type::container_type container_type; - typedef typename base_type::internal_type internal_type; - typedef typename base_type::iterator iterator; - typedef typename base_type::const_iterator const_iterator; - typedef typename base_type::reference reference; - typedef typename base_type::const_reference const_reference; - typedef typename base_type::size_type size_type; - typedef typename base_type::difference_type difference_type; - typedef typename base_type::pointer pointer; - typedef typename base_type::const_pointer const_pointer; - typedef typename base_type::param_type param_type; - typedef typename base_type::const_param_type const_param_type; - typedef typename base_type::holder_type holder_type; - protected: - using base_type::container; - public: - SPROUT_CONSTEXPR back_insert_iterator() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - explicit SPROUT_CONSTEXPR back_insert_iterator(param_type x) - : base_type(x) - {} - back_insert_iterator(back_insert_iterator const&) = default; - SPROUT_CXX14_CONSTEXPR back_insert_iterator& operator=(typename container_type::value_type const& value) { - container->push_back(value); - return *this; - } - SPROUT_CXX14_CONSTEXPR back_insert_iterator& operator=(typename container_type::value_type&& value) { - container->push_back(sprout::move(value)); - return *this; - } - SPROUT_CONSTEXPR back_insert_iterator& operator*() const { - return *this; - } - SPROUT_CXX14_CONSTEXPR back_insert_iterator& operator*() { - return *this; - } - SPROUT_CXX14_CONSTEXPR back_insert_iterator& operator++() { - return *this; - } - SPROUT_CXX14_CONSTEXPR back_insert_iterator operator++(int) { - return *this; - } - - SPROUT_CXX14_CONSTEXPR void swap(back_insert_iterator& other) - SPROUT_NOEXCEPT_IF_EXPR(base_type::swap(other)) - { - base_type::swap(other); - } - }; - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::back_insert_iterator& lhs, sprout::back_insert_iterator& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // back_inserter - // - template - inline SPROUT_CONSTEXPR sprout::back_insert_iterator - back_inserter(Container& x) { - return sprout::back_insert_iterator(x); - } - template - inline SPROUT_CONSTEXPR sprout::back_insert_iterator - back_inserter(Container const& x) { - return sprout::back_insert_iterator(x); - } - - // - // container_construct_traits - // - template - struct container_construct_traits > { - public: - typedef typename sprout::container_construct_traits::copied_type copied_type; - private: - template - static SPROUT_CONSTEXPR copied_type - remake_impl(Cont&& cont, InputIterator first, InputIterator last) { - return sprout::make( - sprout::make_insert_range_iterator( - sprout::internal_begin(cont), sprout::end(cont), - first, first, last - ), - sprout::make_insert_range_iterator( - sprout::internal_end(cont), sprout::end(cont), - last, first, last - ) - ); - } - public: - template - static SPROUT_CONSTEXPR copied_type - deep_copy(Cont&& cont) { - return sprout::deep_copy(sprout::get_internal(SPROUT_FORWARD(Cont, cont))); - } - template - static SPROUT_CONSTEXPR copied_type - make(Args&&... args) { - return sprout::make(SPROUT_FORWARD(Args, args)...); - } - template - static SPROUT_CONSTEXPR copied_type - remake(Cont&& cont, typename sprout::container_traits::difference_type, Args&&... args) { - return remake_impl(sprout::get_internal(SPROUT_FORWARD(Cont, cont)), SPROUT_FORWARD(Args, args)...); - } - }; - - // - // container_fitness_traits - // - template - struct container_fitness_traits > { - public: - template - static SPROUT_CONSTEXPR typename sprout::container_traits::difference_type - fit_size(Cont&& cont, typename sprout::container_traits::difference_type size) { - return size + sprout::size(SPROUT_FORWARD(Cont, cont)); - } - }; - - // - // sub_container_traits - // - template - struct sub_container_traits > - : public sprout::sub_container_traits > - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_BACK_INSERT_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/bytes_iterator.hpp b/dsp/lib/sprout/sprout/iterator/bytes_iterator.hpp deleted file mode 100644 index 51d2dd2..0000000 --- a/dsp/lib/sprout/sprout/iterator/bytes_iterator.hpp +++ /dev/null @@ -1,254 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_BYTES_ITERATOR_HPP -#define SPROUT_ITERATOR_BYTES_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // bytes_iterator - // - template< - typename Iterator, - typename Traits = sprout::endian_traits::value_type> - > - class bytes_iterator - : public sprout::iterator< - typename std::iterator_traits::iterator_category, - unsigned char, - std::ptrdiff_t, - void, - unsigned char - > - { - public: - typedef Iterator iterator_type; - typedef Traits traits_type; - private: - typedef sprout::iterator< - typename std::iterator_traits::iterator_category, - unsigned char, - std::ptrdiff_t, - void, - unsigned char - > base_type; - public: - typedef typename base_type::iterator_category iterator_category; - typedef typename base_type::value_type value_type; - typedef typename base_type::difference_type difference_type; - typedef typename base_type::pointer pointer; - typedef typename base_type::reference reference; - private: - struct next_tag {}; - struct prev_tag {}; - struct ra_tag {}; - private: - iterator_type it_; - difference_type i_; - private: - SPROUT_CONSTEXPR bytes_iterator(iterator_type it, difference_type i) - : it_(it) , i_(i) - {} - SPROUT_CONSTEXPR bytes_iterator(iterator_type it, difference_type i, next_tag) - : it_(i / traits_type::size() == 0 ? it : sprout::next(it)) - , i_(i % traits_type::size()) - {} - SPROUT_CONSTEXPR bytes_iterator(iterator_type it, difference_type i, prev_tag) - : it_((i + 1 - traits_type::size()) / traits_type::size() == 0 ? it : sprout::prev(it)) - , i_(i % traits_type::size() + traits_type::size()) - {} - SPROUT_CONSTEXPR bytes_iterator(iterator_type it, difference_type i, ra_tag) - : it_(i >= 0 - ? sprout::next(it, i / traits_type::size()) - : sprout::next(it, (i + 1 - traits_type::size()) / traits_type::size()) - ) - , i_(i >= 0 - ? i % traits_type::size() - : i % traits_type::size() + traits_type::size() - ) - {} - public: - SPROUT_CONSTEXPR bytes_iterator() - : it_(), i_() - {} - bytes_iterator(bytes_iterator const&) = default; - explicit SPROUT_CONSTEXPR bytes_iterator(iterator_type it) - : it_(it), i_() - {} - SPROUT_CONSTEXPR iterator_type const& base() const { - return it_; - } - SPROUT_CONSTEXPR difference_type index() const { - return i_; - } - SPROUT_CONSTEXPR bytes_iterator next() const { - return bytes_iterator(it_, i_ + 1, next_tag()); - } - SPROUT_CONSTEXPR bytes_iterator prev() const { - return bytes_iterator(it_, i_ - 1, prev_tag()); - } - SPROUT_CXX14_CONSTEXPR void swap(bytes_iterator& other) - SPROUT_NOEXCEPT_IF_EXPR(sprout::swap(it_, other.it_)) - { - sprout::swap(it_, other.it_); - sprout::swap(i_, other.i_); - } - SPROUT_CONSTEXPR reference operator*() const { - return traits_type::get_byte(*it_, i_); - } - SPROUT_CXX14_CONSTEXPR bytes_iterator& operator++() { - bytes_iterator temp(next()); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR bytes_iterator operator++(int) { - bytes_iterator result(*this); - ++*this; - return result; - } - SPROUT_CXX14_CONSTEXPR bytes_iterator& operator--() { - bytes_iterator temp(prev()); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR bytes_iterator operator--(int) { - bytes_iterator result(*this); - --*this; - return result; - } - SPROUT_CONSTEXPR bytes_iterator operator+(difference_type n) const { - return bytes_iterator(it_, i_ + n, ra_tag()); - } - SPROUT_CONSTEXPR bytes_iterator operator-(difference_type n) const { - return bytes_iterator(it_, i_ - n, ra_tag()); - } - SPROUT_CXX14_CONSTEXPR bytes_iterator& operator+=(difference_type n) { - bytes_iterator temp(it_, i_ + n, ra_tag()); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR bytes_iterator& operator-=(difference_type n) { - bytes_iterator temp(it_, i_ - n, ra_tag()); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR reference operator[](difference_type n) const { - return *(*this + n); - } - }; - - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::bytes_iterator const& lhs, sprout::bytes_iterator const& rhs) { - return lhs.base() == rhs.base() && lhs.index() == rhs.index(); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::bytes_iterator const& lhs, sprout::bytes_iterator const& rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator<(sprout::bytes_iterator const& lhs, sprout::bytes_iterator const& rhs) { - return lhs.base() < rhs.base() || (lhs.base() == rhs.base() && lhs.index() < rhs.index()); - } - template - inline SPROUT_CONSTEXPR bool - operator>(sprout::bytes_iterator const& lhs, sprout::bytes_iterator const& rhs) { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator<=(sprout::bytes_iterator const& lhs, sprout::bytes_iterator const& rhs) { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(sprout::bytes_iterator const& lhs, sprout::bytes_iterator const& rhs) { - return !(lhs < rhs); - } - template - inline SPROUT_CONSTEXPR decltype(std::declval() - std::declval()) - operator-(sprout::bytes_iterator const& lhs, sprout::bytes_iterator const& rhs) { - return (lhs.base() - rhs.base()) * Traits::size() + (lhs.index() - rhs.index()); - } - template - inline SPROUT_CONSTEXPR sprout::bytes_iterator - operator+(typename sprout::bytes_iterator::difference_type n, sprout::bytes_iterator const& it) { - return it + n; - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::bytes_iterator& lhs, sprout::bytes_iterator& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // make_bytes_iterator - // - template - inline SPROUT_CONSTEXPR sprout::bytes_iterator - make_bytes_iterator(Iterator it) { - return sprout::bytes_iterator(it); - } - template - inline SPROUT_CONSTEXPR sprout::bytes_iterator - make_bytes_iterator(Iterator it, Traits) { - return sprout::bytes_iterator(it); - } - - // - // make_big_bytes_iterator - // make_little_bytes_iterator - // - template - inline SPROUT_CONSTEXPR sprout::bytes_iterator::value_type> > - make_big_bytes_iterator(Iterator it) { - return sprout::bytes_iterator::value_type> >(it); - } - template - inline SPROUT_CONSTEXPR sprout::bytes_iterator::value_type> > - make_little_bytes_iterator(Iterator it) { - return sprout::bytes_iterator::value_type> >(it); - } - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::bytes_iterator - iterator_next(sprout::bytes_iterator const& it) { - return it.next(); - } - - // - // iterator_prev - // - template - inline SPROUT_CONSTEXPR sprout::bytes_iterator - iterator_prev(sprout::bytes_iterator const& it) { - return it.prev(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_BYTES_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/clamp_iterator.hpp b/dsp/lib/sprout/sprout/iterator/clamp_iterator.hpp deleted file mode 100644 index e1ce2e8..0000000 --- a/dsp/lib/sprout/sprout/iterator/clamp_iterator.hpp +++ /dev/null @@ -1,240 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_CLAMP_ITERATOR_HPP -#define SPROUT_ITERATOR_CLAMP_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - // - // clamp_iterator - // - template::value_type> > - class clamp_iterator - : public sprout::detail::iterator_base::type - { - private: - typedef typename sprout::detail::iterator_base::type base_type; - public: - typedef Iterator iterator_type; - typedef Compare compare_type; - typedef typename base_type::iterator_category iterator_category; - typedef typename base_type::value_type value_type; - typedef typename base_type::difference_type difference_type; - typedef typename base_type::pointer pointer; - typedef typename base_type::reference reference; - protected: - iterator_type current; - Compare comp; - value_type low; - value_type up; - public: - SPROUT_CONSTEXPR clamp_iterator() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - clamp_iterator(clamp_iterator const&) = default; - SPROUT_CONSTEXPR clamp_iterator(iterator_type it, value_type const& low, value_type const& up, Compare comp = Compare()) - : current(it), comp(comp), low(low), up(up) - {} - template - SPROUT_CONSTEXPR clamp_iterator(clamp_iterator const& it) - : current(it.current), comp(it.comp), low(it.low), up(it.up) - {} - template - SPROUT_CXX14_CONSTEXPR clamp_iterator& operator=(clamp_iterator const& it) { - clamp_iterator temp(it); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR iterator_type const& base() const { - return current; - } - SPROUT_CONSTEXPR Compare const& compare() const { - return comp; - } - SPROUT_CONSTEXPR value_type const& lower() const { - return low; - } - SPROUT_CONSTEXPR value_type const& upper() const { - return up; - } - SPROUT_CONSTEXPR reference operator*() const { - return sprout::clamp(*current, low, up, comp); - } - SPROUT_CONSTEXPR pointer operator->() const { - return &sprout::clamp(*current, low, up, comp); - } - - SPROUT_CXX14_CONSTEXPR clamp_iterator& operator++() { - ++current; - return *this; - } - SPROUT_CXX14_CONSTEXPR clamp_iterator operator++(int) { - clamp_iterator result(*this); - ++current; - return result; - } - SPROUT_CXX14_CONSTEXPR clamp_iterator& operator--() { - --current; - return *this; - } - SPROUT_CXX14_CONSTEXPR clamp_iterator operator--(int) { - clamp_iterator temp(*this); - --current; - return temp; - } - SPROUT_CONSTEXPR clamp_iterator operator+(difference_type n) const { - return clamp_iterator(sprout::next(current, n), low, up, comp); - } - SPROUT_CONSTEXPR clamp_iterator operator-(difference_type n) const { - return clamp_iterator(sprout::prev(current, n), low, up, comp); - } - SPROUT_CXX14_CONSTEXPR clamp_iterator& operator+=(difference_type n) { - clamp_iterator temp(sprout::next(current, n), low, up, comp); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR clamp_iterator& operator-=(difference_type n) { - clamp_iterator temp(sprout::prev(current, n), low, up, comp); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR reference operator[](difference_type n) const { - return sprout::clamp(*sprout::next(current, n), low, up, comp); - } - SPROUT_CONSTEXPR clamp_iterator next() const { - return clamp_iterator(sprout::next(current), low, up, comp); - } - SPROUT_CONSTEXPR clamp_iterator prev() const { - return clamp_iterator(sprout::prev(current), low, up, comp); - } - SPROUT_CXX14_CONSTEXPR void swap(clamp_iterator& other) - SPROUT_NOEXCEPT_IF( - SPROUT_NOEXCEPT_EXPR(sprout::swap(current, other.current)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(comp, other.comp)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(low, other.low)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(up, other.up)) - ) - { - sprout::swap(current, other.current); - sprout::swap(comp, other.comp); - sprout::swap(low, other.low); - sprout::swap(up, other.up); - } - }; - - template - inline SPROUT_CONSTEXPR bool operator==( - sprout::clamp_iterator const& lhs, - sprout::clamp_iterator const& rhs - ) - { - return lhs.base() == rhs.base(); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::clamp_iterator const& lhs, sprout::clamp_iterator const& rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator<(sprout::clamp_iterator const& lhs, sprout::clamp_iterator const& rhs) { - return lhs.base() < rhs.base(); - } - template - inline SPROUT_CONSTEXPR bool - operator>(sprout::clamp_iterator const& lhs, sprout::clamp_iterator const& rhs) { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator<=(sprout::clamp_iterator const& lhs, sprout::clamp_iterator const& rhs) { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(sprout::clamp_iterator const& lhs, sprout::clamp_iterator const& rhs) { - return !(lhs < rhs); - } - template - inline SPROUT_CONSTEXPR decltype(std::declval() - std::declval()) - operator-(sprout::clamp_iterator const& lhs, sprout::clamp_iterator const& rhs) { - return lhs.base() - rhs.base(); - } - template - inline SPROUT_CONSTEXPR sprout::clamp_iterator - operator+( - typename sprout::clamp_iterator::difference_type n, - sprout::clamp_iterator const& it - ) - { - return it + n; - } - - // - // make_clamp_iterator - // - template - inline SPROUT_CONSTEXPR sprout::clamp_iterator - make_clamp_iterator( - Iterator it, - typename std::iterator_traits::value_type const& low, - typename std::iterator_traits::value_type const& up, - Compare comp - ) - { - return sprout::clamp_iterator(it, low, up, comp); - } - template - inline SPROUT_CONSTEXPR sprout::clamp_iterator - make_clamp_iterator( - Iterator it, - typename std::iterator_traits::value_type const& low, - typename std::iterator_traits::value_type const& up - ) - { - return sprout::clamp_iterator(it, low, up); - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::clamp_iterator& lhs, sprout::clamp_iterator& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::clamp_iterator - iterator_next(sprout::clamp_iterator const& it) { - return it.next(); - } - - // - // iterator_prev - // - template - inline SPROUT_CONSTEXPR sprout::clamp_iterator - iterator_prev(sprout::clamp_iterator const& it) { - return it.prev(); - } -} // namespace sprout - -#endif // SPROUT_ITERATOR_CLAMP_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/const_iterator_cast.hpp b/dsp/lib/sprout/sprout/iterator/const_iterator_cast.hpp deleted file mode 100644 index f4bd831..0000000 --- a/dsp/lib/sprout/sprout/iterator/const_iterator_cast.hpp +++ /dev/null @@ -1,186 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_CONST_ITERATOR_CAST_HPP -#define SPROUT_ITERATOR_CONST_ITERATOR_CAST_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // is_const_iterator_cast_convertible - // - template - struct is_const_iterator_cast_convertible - : public sprout::is_same::type, typename std::remove_cv::type> - {}; - template - struct is_const_iterator_cast_convertible - : public sprout::is_const_iterator_cast_convertible - {}; - template - struct is_const_iterator_cast_convertible - : public sprout::is_const_iterator_cast_convertible - {}; - template - struct is_const_iterator_cast_convertible - : public sprout::is_const_iterator_cast_convertible - {}; - template - struct is_const_iterator_cast_convertible - : public sprout::is_const_iterator_cast_convertible - {}; - template - struct is_const_iterator_cast_convertible - : public sprout::is_const_iterator_cast_convertible - {}; - template - struct is_const_iterator_cast_convertible - : public sprout::is_const_iterator_cast_convertible - {}; - template - struct is_const_iterator_cast_convertible - : public sprout::is_const_iterator_cast_convertible - {}; - template - struct is_const_iterator_cast_convertible - : public sprout::is_const_iterator_cast_convertible - {}; - template - struct is_const_iterator_cast_convertible - : public sprout::is_const_iterator_cast_convertible - {}; - template - struct is_const_iterator_cast_convertible - : public sprout::is_const_iterator_cast_convertible - {}; - template - struct is_const_iterator_cast_convertible - : public sprout::is_const_iterator_cast_convertible - {}; - template - struct is_const_iterator_cast_convertible - : public sprout::is_const_iterator_cast_convertible - {}; - template - struct is_const_iterator_cast_convertible - : public sprout::is_const_iterator_cast_convertible - {}; - template - struct is_const_iterator_cast_convertible - : public sprout::is_const_iterator_cast_convertible - {}; - template - struct is_const_iterator_cast_convertible - : public sprout::is_const_iterator_cast_convertible - {}; - template - struct is_const_iterator_cast_convertible - : public sprout::is_same::type, typename std::remove_cv::type> - {}; -} // namespace sprout - -namespace sprout_adl { - template - sprout::not_found_via_adl const_iterator_conversion(...); -} // namespace sprout_adl - -namespace sprout { - namespace iterator_detail { - template< - typename T, typename U, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR T - const_iterator_conversion(U* it) { - return const_cast(it); - } - template - inline SPROUT_CONSTEXPR T - const_iterator_conversion(T const& it) { - return it; - } - } // namespace iterator_detail -} // namespace sprout - -namespace sprout_iterator_detail { - template - inline SPROUT_CONSTEXPR To - call_const_iterator_conversion(From const& it) { - using sprout::iterator_detail::const_iterator_conversion; - using sprout_adl::const_iterator_conversion; - return const_iterator_conversion(it); - } -} // namespace sprout_iterator_detail - -namespace sprout { - // - // const_iterator_cast - // - template - inline SPROUT_CONSTEXPR To - const_iterator_cast(From const& it) { - return sprout_iterator_detail::call_const_iterator_conversion(it); - } -} // namespace sprout - -// -// note: -// const_iterator_cast is an adaptable function for interconversion -// with iterator and const_iterator. -// If you want to adapt a user-defined iterator class to const_iterator_cast: -// - Specialize sprout::is_const_iterator_cast_convertible. -// - Overload const_iterator_conversion as to be lookup in the ADL. -// -// example: -// #include -// #include -// #include -// #include -// /* Mylib::Iterator is an user-defined iterator class*/ -// namespace Mylib { -// template -// struct Iterator { -// T* p; -// typedef T* pointer; -// /* definition iterator interface... */ -// }; -// } -// /* const_iterator_cast adapt for Mylib::Iterator */ -// namespace sprout { -// template -// struct is_const_iterator_cast_convertible< -// Mylib::Iterator, -// Mylib::Iterator -// > -// : public sprout::is_same< -// typename std::remove_cv::type, -// typename std::remove_cv::type -// > -// {}; -// } -// namespace Mylib { -// template -// inline SPROUT_CONSTEXPR typename std::enable_if< -// sprout::is_const_iterator_cast_convertible, To>::value, -// To -// >::type -// const_iterator_conversion(Iterator const& it) { -// return To{const_cast(it.p)}; -// } -// } -// /* test const_iterator_cast with Mylib::Iterator */ -// constexpr Mylib::Iterator it{0}; -// static_assert(sprout::const_iterator_cast >(it).p == 0, ""); -// - -#endif // #ifndef SPROUT_ITERATOR_CONST_ITERATOR_CAST_HPP diff --git a/dsp/lib/sprout/sprout/iterator/const_reference_cast.hpp b/dsp/lib/sprout/sprout/iterator/const_reference_cast.hpp deleted file mode 100644 index bc4adcf..0000000 --- a/dsp/lib/sprout/sprout/iterator/const_reference_cast.hpp +++ /dev/null @@ -1,242 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_CONST_REFERENCE_CAST_HPP -#define SPROUT_ITERATOR_CONST_REFERENCE_CAST_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // is_const_reference_cast_convertible - // - template - struct is_const_reference_cast_convertible - : public sprout::bool_constant< - sprout::is_const_cast_convertible::value - || std::is_same::type, typename std::remove_cv::type>::value - > - {}; - template - struct is_const_reference_cast_convertible - : public sprout::is_const_reference_cast_convertible - {}; - template - struct is_const_reference_cast_convertible - : public sprout::is_const_reference_cast_convertible - {}; - template - struct is_const_reference_cast_convertible - : public sprout::is_const_reference_cast_convertible - {}; - template - struct is_const_reference_cast_convertible - : public sprout::is_const_reference_cast_convertible - {}; - template - struct is_const_reference_cast_convertible - : public sprout::is_const_reference_cast_convertible - {}; - template - struct is_const_reference_cast_convertible - : public sprout::is_const_reference_cast_convertible - {}; - template - struct is_const_reference_cast_convertible - : public sprout::is_const_reference_cast_convertible - {}; - template - struct is_const_reference_cast_convertible - : public sprout::is_const_reference_cast_convertible - {}; - template - struct is_const_reference_cast_convertible - : public sprout::is_const_reference_cast_convertible - {}; - template - struct is_const_reference_cast_convertible - : public sprout::is_const_reference_cast_convertible - {}; - template - struct is_const_reference_cast_convertible - : public sprout::is_const_reference_cast_convertible - {}; - template - struct is_const_reference_cast_convertible - : public sprout::is_const_reference_cast_convertible - {}; - template - struct is_const_reference_cast_convertible - : public sprout::is_const_reference_cast_convertible - {}; - template - struct is_const_reference_cast_convertible - : public sprout::is_const_reference_cast_convertible - {}; - template - struct is_const_reference_cast_convertible - : public sprout::is_const_reference_cast_convertible - {}; -} // namespace sprout - -namespace sprout_adl { - template - sprout::not_found_via_adl const_reference_conversion(...); -} // namespace sprout_adl - -namespace sprout { - namespace iterator_detail { - template< - typename T, typename U, - typename sprout::enabler_if< - sprout::is_const_reference_cast_convertible::value - && std::is_reference::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR T - const_reference_conversion(U& t) { - return const_cast(t); - } - template< - typename T, typename U, - typename sprout::enabler_if< - sprout::is_const_reference_cast_convertible::value - && std::is_reference::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR T - const_reference_conversion(U const& t) { - return const_cast(t); - } - - template< - typename T, typename U, - typename sprout::enabler_if< - sprout::is_const_reference_cast_convertible::value - && std::is_pointer::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR T - const_reference_conversion(U& t) { - return const_cast(t); - } - template< - typename T, typename U, - typename sprout::enabler_if< - sprout::is_const_reference_cast_convertible::value - && std::is_pointer::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR T - const_reference_conversion(U const& t) { - return const_cast(t); - } - - template< - typename T, typename U, - typename sprout::enabler_if< - sprout::is_const_reference_cast_convertible::value - && !std::is_reference::value && !std::is_pointer::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR T - const_reference_conversion(U& t) { - return static_cast(t); - } - template< - typename T, typename U, - typename sprout::enabler_if< - sprout::is_const_reference_cast_convertible::value - && !std::is_reference::value && !std::is_pointer::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR T - const_reference_conversion(U const& t) { - return static_cast(t); - } - } // namespace iterator_detail -} // namespace sprout - -namespace sprout_iterator_detail { - template - inline SPROUT_CONSTEXPR To - call_const_reference_conversion(From&& t) { - using sprout::iterator_detail::const_reference_conversion; - using sprout_adl::const_reference_conversion; - return const_reference_conversion(SPROUT_FORWARD(From, t)); - } -} // namespace sprout_iterator_detail - -namespace sprout { - // - // const_reference_cast - // - template - inline SPROUT_CONSTEXPR To - const_reference_cast(From&& t) { - return sprout_iterator_detail::call_const_reference_conversion(SPROUT_FORWARD(From, t)); - } -} // namespace sprout - -// -// note: -// const_reference_cast is an adaptable function for interconversion -// with reference and const_reference. -// If you want to adapt a user-defined reference proxy class to const_reference_cast: -// - Specialize sprout::is_const_reference_cast_convertible. -// - Overload const_reference_conversion as to be lookup in the ADL. -// -// example: -// #include -// #include -// #include -// #include -// /* Mylib::Reference is an user-defined reference proxy class*/ -// namespace Mylib { -// template -// struct Reference { -// T* p; -// typedef T* pointer; -// /* definition reference proxy interface... */ -// }; -// } -// /* const_reference_cast adapt for Mylib::Reference */ -// namespace sprout { -// template -// struct is_const_reference_cast_convertible< -// Mylib::Reference, -// Mylib::Reference -// > -// : public sprout::is_same< -// typename std::remove_cv::type, -// typename std::remove_cv::type -// > -// {}; -// } -// namespace Mylib { -// template -// inline SPROUT_CONSTEXPR typename std::enable_if< -// sprout::is_const_reference_cast_convertible, To>::value, -// To -// >::type -// const_reference_conversion(Reference const& it) { -// return To{const_cast(it.p)}; -// } -// } -// /* test const_reference_cast with Mylib::Reference */ -// constexpr Mylib::Reference it{0}; -// static_assert(sprout::const_reference_cast >(it).p == 0, ""); -// - -#endif // #ifndef SPROUT_ITERATOR_CONST_REFERENCE_CAST_HPP diff --git a/dsp/lib/sprout/sprout/iterator/counting_iterator.hpp b/dsp/lib/sprout/sprout/iterator/counting_iterator.hpp deleted file mode 100644 index 6c943b6..0000000 --- a/dsp/lib/sprout/sprout/iterator/counting_iterator.hpp +++ /dev/null @@ -1,214 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_COUNTING_ITERATOR_HPP -#define SPROUT_ITERATOR_COUNTING_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // counting_iterator - // - template - class counting_iterator - : public sprout::iterator< - std::random_access_iterator_tag, - Incrementable, - std::ptrdiff_t, - Incrementable*, - Incrementable - > - { - public: - typedef std::random_access_iterator_tag iterator_category; - typedef Incrementable value_type; - typedef std::ptrdiff_t difference_type; - typedef value_type* pointer; - typedef value_type reference; - private: - template::value>::type = sprout::enabler> - static SPROUT_CONSTEXPR T - default_value() { - return sprout::numeric_limits::max(); - } - template::value>::type = sprout::enabler> - static SPROUT_CONSTEXPR T - default_value() { - return T(); - } - private: - value_type current_; - public: - SPROUT_CONSTEXPR counting_iterator() - : current_(default_value()) - {} - counting_iterator(counting_iterator const&) = default; - explicit SPROUT_CONSTEXPR counting_iterator(value_type const& v) - : current_(v) - {} - template - SPROUT_CONSTEXPR counting_iterator(counting_iterator const& it) - : current_(it.current_) - {} - template - SPROUT_CXX14_CONSTEXPR counting_iterator& operator=(counting_iterator const& it) { - counting_iterator temp(it); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR reference operator*() const { - return current_; - } - SPROUT_CONSTEXPR pointer operator->() const { - return ¤t_; - } - SPROUT_CXX14_CONSTEXPR counting_iterator& operator++() { - ++current_; - return *this; - } - SPROUT_CXX14_CONSTEXPR counting_iterator operator++(int) { - counting_iterator result(*this); - ++current_; - return result; - } - SPROUT_CXX14_CONSTEXPR counting_iterator& operator--() { - --current_; - return *this; - } - SPROUT_CXX14_CONSTEXPR counting_iterator operator--(int) { - counting_iterator temp(*this); - --current_; - return temp; - } - SPROUT_CONSTEXPR counting_iterator operator+(difference_type n) const { - return counting_iterator(current_ + n); - } - SPROUT_CONSTEXPR counting_iterator operator-(difference_type n) const { - return counting_iterator(current_ - n); - } - SPROUT_CXX14_CONSTEXPR counting_iterator& operator+=(difference_type n) { - counting_iterator temp(current_ + n); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR counting_iterator& operator-=(difference_type n) { - counting_iterator temp(current_ - n); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR reference operator[](difference_type n) const { - return current_ + n; - } - SPROUT_CONSTEXPR counting_iterator next() const { - return counting_iterator(current_ + 1); - } - SPROUT_CONSTEXPR counting_iterator prev() const { - return counting_iterator(current_ - 1); - } - SPROUT_CXX14_CONSTEXPR void swap(counting_iterator& other) - SPROUT_NOEXCEPT_IF_EXPR(sprout::swap(current_, other.current_)) - { - sprout::swap(current_, other.current_); - } - }; - - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::counting_iterator const& lhs, sprout::counting_iterator const& rhs) { - return *lhs == *rhs; - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::counting_iterator const& lhs, sprout::counting_iterator const& rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator<(sprout::counting_iterator const& lhs, sprout::counting_iterator const& rhs) { - return *lhs < *rhs; - } - template - inline SPROUT_CONSTEXPR bool - operator>(sprout::counting_iterator const& lhs, sprout::counting_iterator const& rhs) { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator<=(sprout::counting_iterator const& lhs, sprout::counting_iterator const& rhs) { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(sprout::counting_iterator const& lhs, sprout::counting_iterator const& rhs) { - return !(lhs < rhs); - } - template - inline SPROUT_CONSTEXPR typename sprout::counting_iterator::difference_type - operator-(sprout::counting_iterator const& lhs, sprout::counting_iterator const& rhs) { - return static_cast::difference_type>(*lhs - *rhs); - } - template - inline SPROUT_CONSTEXPR sprout::counting_iterator - operator+( - typename sprout::counting_iterator::difference_type n, - sprout::counting_iterator const& it - ) - { - return it + n; - } - - // - // make_counting_iterator - // - template - inline SPROUT_CONSTEXPR sprout::counting_iterator - make_counting_iterator(Incrementable const& v) { - return sprout::counting_iterator(v); - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::counting_iterator& lhs, sprout::counting_iterator& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::counting_iterator - iterator_next(sprout::counting_iterator const& it) { - return it.next(); - } - - // - // iterator_prev - // - template - inline SPROUT_CONSTEXPR sprout::counting_iterator - iterator_prev(sprout::counting_iterator const& it) { - return it.prev(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_COUNTING_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/detail/iterator_base.hpp b/dsp/lib/sprout/sprout/iterator/detail/iterator_base.hpp deleted file mode 100644 index 0c4f02e..0000000 --- a/dsp/lib/sprout/sprout/iterator/detail/iterator_base.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_DETAIL_ITERATOR_BASE_HPP -#define SPROUT_ITERATOR_DETAIL_ITERATOR_BASE_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template< - typename Iterator, - typename Category = sprout::use_default, - typename T = sprout::use_default, - typename Distance = sprout::use_default, - typename Pointer = sprout::use_default, - typename Reference = sprout::use_default - > - struct iterator_base - : public sprout::identity< - sprout::iterator< - typename sprout::select_default::iterator_category>::type, - typename sprout::select_default::value_type>::type, - typename sprout::select_default::difference_type>::type, - typename sprout::select_default::pointer>::type, - typename sprout::select_default::reference>::type - > - > - {}; - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_DETAIL_ITERATOR_BASE_HPP diff --git a/dsp/lib/sprout/sprout/iterator/detail/iterator_to_pointer.hpp b/dsp/lib/sprout/sprout/iterator/detail/iterator_to_pointer.hpp deleted file mode 100644 index 33a69ff..0000000 --- a/dsp/lib/sprout/sprout/iterator/detail/iterator_to_pointer.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_DETAIL_ITERATOR_TO_POINTER_HPP -#define SPROUT_ITERATOR_DETAIL_ITERATOR_TO_POINTER_HPP - -#include - -namespace sprout { - namespace detail { - template - class iterator_to_pointer_base {}; - template - class iterator_to_pointer_base { - public: - SPROUT_CONSTEXPR operator Pointer() const { - return &*static_cast(*this); - } - }; - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_DETAIL_ITERATOR_TO_POINTER_HPP diff --git a/dsp/lib/sprout/sprout/iterator/dft.hpp b/dsp/lib/sprout/sprout/iterator/dft.hpp deleted file mode 100644 index e3e59c5..0000000 --- a/dsp/lib/sprout/sprout/iterator/dft.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_DFT_HPP -#define SPROUT_ITERATOR_DFT_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ITERATOR_DFT_HPP diff --git a/dsp/lib/sprout/sprout/iterator/dft_iterator.hpp b/dsp/lib/sprout/sprout/iterator/dft_iterator.hpp deleted file mode 100644 index 87b8c69..0000000 --- a/dsp/lib/sprout/sprout/iterator/dft_iterator.hpp +++ /dev/null @@ -1,215 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_DFT_ITERATOR_HPP -#define SPROUT_ITERATOR_DFT_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // dft_iterator - // - template - class dft_iterator - : public sprout::detail::iterator_base< - Iterator, - std::random_access_iterator_tag, - sprout::use_default, - sprout::use_default, - void, - typename std::iterator_traits::value_type - >::type - { - private: - typedef typename sprout::detail::iterator_base< - Iterator, - std::random_access_iterator_tag, - sprout::use_default, - sprout::use_default, - void, - typename std::iterator_traits::value_type - >::type base_type; - public: - typedef Iterator iterator_type; - typedef typename base_type::iterator_category iterator_category; - typedef typename base_type::value_type value_type; - typedef typename base_type::difference_type difference_type; - typedef typename base_type::pointer pointer; - typedef typename base_type::reference reference; - private: - iterator_type first_; - iterator_type last_; - difference_type index_; - difference_type size_; - private: - SPROUT_CONSTEXPR dft_iterator(iterator_type first, iterator_type last, difference_type index, difference_type size) - : first_(first), last_(last), index_(index) - , size_(size) - {} - public: - SPROUT_CONSTEXPR dft_iterator() - : first_(), last_(), index_() - , size_() - {} - dft_iterator(dft_iterator const&) = default; - SPROUT_CONSTEXPR dft_iterator(iterator_type first, iterator_type last, difference_type index = 0) - : first_(first), last_(last), index_(index) - , size_(sprout::distance(first, last)) - {} - SPROUT_CONSTEXPR dft_iterator next() const { - return dft_iterator(first_, last_, index_, index_ + 1, size_); - } - SPROUT_CONSTEXPR dft_iterator prev() const { - return dft_iterator(first_, last_, index_, index_ - 1, size_); - } - SPROUT_CXX14_CONSTEXPR void swap(dft_iterator& other) - SPROUT_NOEXCEPT_IF( - SPROUT_NOEXCEPT_EXPR(sprout::swap(first_, other.first_)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(last_, other.last_)) - ) - { - sprout::swap(first_, other.first_); - sprout::swap(last_, other.last_); - sprout::swap(index_, other.index_); - sprout::swap(size_, other.size_); - } - SPROUT_CONSTEXPR reference operator*() const { - return sprout::detail::dft_element_impl(first_, last_, index_, size_); - } - SPROUT_CXX14_CONSTEXPR dft_iterator& operator++() { - dft_iterator temp(next()); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR dft_iterator operator++(int) { - dft_iterator result(*this); - ++*this; - return result; - } - SPROUT_CXX14_CONSTEXPR dft_iterator& operator--() { - dft_iterator temp(prev()); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR dft_iterator operator--(int) { - dft_iterator result(*this); - --*this; - return result; - } - SPROUT_CONSTEXPR dft_iterator operator+(difference_type n) const { - return dft_iterator(first_, last_, index_, index_ + n, size_); - } - SPROUT_CONSTEXPR dft_iterator operator-(difference_type n) const { - return dft_iterator(first_, last_, index_, index_ - n, size_); - } - SPROUT_CXX14_CONSTEXPR dft_iterator& operator+=(difference_type n) { - dft_iterator temp(first_, last_, index_, index_ + n, size_); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR dft_iterator& operator-=(difference_type n) { - dft_iterator temp(first_, last_, index_, index_ - n, size_); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR reference operator[](difference_type n) const { - return sprout::detail::dft_element_impl(first_, last_, index_ + n, size_); - } - }; - - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::dft_iterator const& lhs, sprout::dft_iterator const& rhs) { - return lhs.index() == rhs.index(); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::dft_iterator const& lhs, sprout::dft_iterator const& rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator<(sprout::dft_iterator const& lhs, sprout::dft_iterator const& rhs) { - return lhs.index_ < rhs.index_; - } - template - inline SPROUT_CONSTEXPR bool - operator>(sprout::dft_iterator const& lhs, sprout::dft_iterator const& rhs) { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator<=(sprout::dft_iterator const& lhs, sprout::dft_iterator const& rhs) { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(sprout::dft_iterator const& lhs, sprout::dft_iterator const& rhs) { - return !(lhs < rhs); - } - template - inline SPROUT_CONSTEXPR typename sprout::dft_iterator::difference_type - operator-(sprout::dft_iterator const& lhs, sprout::dft_iterator const& rhs) { - return lhs.index() - rhs.index(); - } - template - inline SPROUT_CONSTEXPR sprout::dft_iterator - operator+(typename sprout::dft_iterator::difference_type n, sprout::dft_iterator const& it) { - return it + n; - } - - // - // make_dft_iterator - // - template - inline SPROUT_CONSTEXPR sprout::dft_iterator - make_dft_iterator(Iterator first, Iterator last, typename std::iterator_traits::difference_type i = 0) { - return sprout::dft_iterator(first, last, i); - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::dft_iterator& lhs, sprout::dft_iterator& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::dft_iterator - iterator_next(sprout::dft_iterator const& it) { - return it.next(); - } - - // - // iterator_prev - // - template - inline SPROUT_CONSTEXPR sprout::dft_iterator - iterator_prev(sprout::dft_iterator const& it) { - return it.prev(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_DFT_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/distance.hpp b/dsp/lib/sprout/sprout/iterator/distance.hpp deleted file mode 100644 index 077633c..0000000 --- a/dsp/lib/sprout/sprout/iterator/distance.hpp +++ /dev/null @@ -1,147 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_DISTANCE_HPP -#define SPROUT_ITERATOR_DISTANCE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout_adl { - sprout::not_found_via_adl iterator_distance(...); -} // namespace sprout_adl - -namespace sprout { - namespace iterator_detail { - template - inline SPROUT_CXX14_CONSTEXPR typename std::iterator_traits::difference_type - cxx14_distance(RandomAccessIterator first, RandomAccessIterator last, std::random_access_iterator_tag*) { - return last - first; - } - template - inline SPROUT_CXX14_CONSTEXPR typename std::iterator_traits::difference_type - cxx14_distance(InputIterator first, InputIterator last, std::input_iterator_tag*) { - typename std::iterator_traits::difference_type n = 0; - for (; first != last; ++first) { - ++n; - } - return n; - } - template - inline SPROUT_CXX14_CONSTEXPR typename std::iterator_traits::difference_type - cxx14_distance(InputIterator first, InputIterator last) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::iterator_detail::cxx14_distance(first, last, category()); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - typename std::iterator_traits::difference_type - >::type - iterator_distance_dispatch(RandomAccessIterator first, RandomAccessIterator last) { - return last - first; - } - - template - inline SPROUT_CONSTEXPR sprout::pair::difference_type> - iterator_distance_impl_1( - sprout::pair::difference_type> const& current, - InputIterator last, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair::difference_type> type; - return current.first == last ? current - : n == 1 ? type(sprout::next(current.first), current.second + 1) - : sprout::iterator_detail::iterator_distance_impl_1( - sprout::iterator_detail::iterator_distance_impl_1( - current, - last, n / 2 - ), - last, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair::difference_type> - iterator_distance_impl( - sprout::pair::difference_type> const& current, - InputIterator last, typename std::iterator_traits::difference_type n - ) - { - return current.first == last ? current - : sprout::iterator_detail::iterator_distance_impl( - sprout::iterator_detail::iterator_distance_impl_1( - current, - last, n - ), - last, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_constant_distance_iterator::value && sprout::is_input_iterator::value - && sprout::is_literal_type::value, - typename std::iterator_traits::difference_type - >::type - iterator_distance_dispatch(InputIterator first, InputIterator last) { - typedef sprout::pair::difference_type> type; - return sprout::iterator_detail::iterator_distance_impl(type(first, 0), last, 1).second; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_constant_distance_iterator::value && sprout::is_input_iterator::value - && !sprout::is_literal_type::value, - typename std::iterator_traits::difference_type - >::type - iterator_distance_dispatch(InputIterator first, InputIterator last) { - return sprout::iterator_detail::cxx14_distance(first, last); - } - - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type - iterator_distance(InputIterator first, InputIterator last) { - return sprout::iterator_detail::iterator_distance_dispatch(first, last); - } - } // namespace iterator_detail -} // namespace sprout - -namespace sprout_iterator_detail { - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type - distance(InputIterator first, InputIterator last) { - using sprout::iterator_detail::iterator_distance; - using sprout_adl::iterator_distance; - return iterator_distance(first, last); - } -} // namespace sprout_iterator_detail - -namespace sprout { - // - // distance - // - // effect: - // ADL callable iterator_distance(first, last) -> iterator_distance(first, last) - // otherwise, [first, last) is RandomAccessIterator && ConstantDistanceIterator -> last - first - // otherwise, [first, last) is LiteralType -> linearly count: first to last - // otherwise -> cxx14_distance(first, last) - // - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type - distance(InputIterator first, InputIterator last) { - return sprout_iterator_detail::distance(first, last); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_DISTANCE_HPP diff --git a/dsp/lib/sprout/sprout/iterator/filter_iterator.hpp b/dsp/lib/sprout/sprout/iterator/filter_iterator.hpp deleted file mode 100644 index 9d62927..0000000 --- a/dsp/lib/sprout/sprout/iterator/filter_iterator.hpp +++ /dev/null @@ -1,214 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_FILTER_ITERATOR_HPP -#define SPROUT_ITERATOR_FILTER_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // filter_iterator - // - template - class filter_iterator - : public sprout::detail::iterator_base< - Iterator, - typename sprout::min_iterator_category< - typename std::iterator_traits::iterator_category, - std::bidirectional_iterator_tag - >::type - >::type - { - private: - typedef typename sprout::detail::iterator_base< - Iterator, - typename sprout::min_iterator_category< - typename std::iterator_traits::iterator_category, - std::bidirectional_iterator_tag - >::type - >::type base_type; - public: - typedef Predicate predicate_type; - typedef Iterator iterator_type; - typedef typename base_type::iterator_category iterator_category; - typedef typename base_type::value_type value_type; - typedef typename base_type::difference_type difference_type; - typedef typename base_type::pointer pointer; - typedef typename base_type::reference reference; - private: - struct private_construct_t {}; - private: - static SPROUT_CONSTEXPR iterator_type find_next(iterator_type first, iterator_type last, Predicate pred) { - return sprout::find_if(first, last, pred); - } - static SPROUT_CONSTEXPR iterator_type find_prev(iterator_type first, Predicate pred) { - return pred(*first) ? first - : find_prev(sprout::prev(first), pred) - ; - } - protected: - iterator_type current; - iterator_type last; - Predicate pred; - private: - SPROUT_CXX14_CONSTEXPR void satisfy_predicate() { - current = sprout::find_if(current, last, pred); - } - SPROUT_CXX14_CONSTEXPR void satisfy_predicate_backward() { - while (!pred(*current)) { - --current; - } - } - SPROUT_CONSTEXPR filter_iterator(Predicate pred, iterator_type it, iterator_type last, private_construct_t) - : current(it) - , last(last) - , pred(pred) - {} - public: - SPROUT_CONSTEXPR filter_iterator() - : current(), last(), pred() - {} - filter_iterator(filter_iterator const&) = default; - SPROUT_CONSTEXPR filter_iterator(Predicate pred, iterator_type it, iterator_type last = iterator_type()) - : current(find_next(it, last, pred)) - , last(last) - , pred(pred) - {} - template - SPROUT_CONSTEXPR filter_iterator(filter_iterator const& it) - : current(it.current) - , last(it.last) - , pred(it.pred) - {} - template - SPROUT_CXX14_CONSTEXPR filter_iterator& operator=(filter_iterator const& it) { - filter_iterator temp(it); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR iterator_type base() const { - return current; - } - SPROUT_CONSTEXPR iterator_type end() const { - return last; - } - SPROUT_CONSTEXPR Predicate predicate() const { - return pred; - } - SPROUT_CONSTEXPR reference operator*() const { - return *current; - } - SPROUT_CONSTEXPR pointer operator->() const { - return &*current; - } - - SPROUT_CXX14_CONSTEXPR filter_iterator& operator++() { - ++current; - satisfy_predicate(); - return *this; - } - SPROUT_CXX14_CONSTEXPR filter_iterator operator++(int) { - filter_iterator result(*this); - ++current; - satisfy_predicate(); - return result; - } - SPROUT_CXX14_CONSTEXPR filter_iterator& operator--() { - --current; - satisfy_predicate_backward(); - return *this; - } - SPROUT_CXX14_CONSTEXPR filter_iterator operator--(int) { - filter_iterator temp(*this); - --current; - satisfy_predicate_backward(); - return temp; - } - SPROUT_CONSTEXPR filter_iterator next() const { - return filter_iterator(pred, find_next(sprout::next(current), last, pred), last, private_construct_t()); - } - SPROUT_CONSTEXPR filter_iterator prev() const { - return filter_iterator(pred, find_prev(sprout::prev(current), pred), last, private_construct_t()); - } - SPROUT_CXX14_CONSTEXPR void swap(filter_iterator& other) - SPROUT_NOEXCEPT_IF( - SPROUT_NOEXCEPT_EXPR(sprout::swap(current, other.current)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(last, other.last)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(pred, other.pred)) - ) - { - sprout::swap(current, other.current); - sprout::swap(last, other.last); - sprout::swap(pred, other.pred); - } - }; - - template - inline SPROUT_CONSTEXPR bool operator==( - sprout::filter_iterator const& lhs, - sprout::filter_iterator const& rhs - ) - { - return lhs.base() == rhs.base(); - } - template - inline SPROUT_CONSTEXPR bool operator!=( - sprout::filter_iterator const& lhs, - sprout::filter_iterator const& rhs - ) - { - return !(lhs == rhs); - } - - // - // make_filter_iterator - // - template - inline SPROUT_CONSTEXPR sprout::filter_iterator - make_filter_iterator(Predicate pred, Iterator it, Iterator last = Iterator()) { - return sprout::filter_iterator(pred, it, last); - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::filter_iterator& lhs, sprout::filter_iterator& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::filter_iterator - iterator_next(sprout::filter_iterator const& it) { - return it.next(); - } - - // - // iterator_prev - // - template - inline SPROUT_CONSTEXPR sprout::filter_iterator - iterator_prev(sprout::filter_iterator const& it) { - return it.prev(); - } -} // namespace sprout - -#endif // SPROUT_ITERATOR_FILTER_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/front_insert_iterator.hpp b/dsp/lib/sprout/sprout/iterator/front_insert_iterator.hpp deleted file mode 100644 index dacd515..0000000 --- a/dsp/lib/sprout/sprout/iterator/front_insert_iterator.hpp +++ /dev/null @@ -1,174 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_FRONT_INSERT_ITERATOR_HPP -#define SPROUT_ITERATOR_FRONT_INSERT_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // front_insert_iterator - // - template - class front_insert_iterator - : public sprout::iterator - , public sprout::container_holder - { - private: - typedef sprout::container_holder base_type; - public: - typedef typename base_type::container_type container_type; - typedef typename base_type::internal_type internal_type; - typedef typename base_type::iterator iterator; - typedef typename base_type::const_iterator const_iterator; - typedef typename base_type::reference reference; - typedef typename base_type::const_reference const_reference; - typedef typename base_type::size_type size_type; - typedef typename base_type::difference_type difference_type; - typedef typename base_type::pointer pointer; - typedef typename base_type::const_pointer const_pointer; - typedef typename base_type::param_type param_type; - typedef typename base_type::const_param_type const_param_type; - typedef typename base_type::holder_type holder_type; - protected: - using base_type::container; - public: - SPROUT_CONSTEXPR front_insert_iterator() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - explicit SPROUT_CONSTEXPR front_insert_iterator(param_type x) - : base_type(x) - {} - front_insert_iterator(front_insert_iterator const&) = default; - SPROUT_CXX14_CONSTEXPR front_insert_iterator& operator=(typename container_type::value_type const& value) { - container->push_front(value); - return *this; - } - SPROUT_CXX14_CONSTEXPR front_insert_iterator& operator=(typename container_type::value_type&& value) { - container->push_front(sprout::move(value)); - return *this; - } - SPROUT_CONSTEXPR front_insert_iterator& operator*() const { - return *this; - } - SPROUT_CXX14_CONSTEXPR front_insert_iterator& operator*() { - return *this; - } - SPROUT_CXX14_CONSTEXPR front_insert_iterator& operator++() { - return *this; - } - SPROUT_CXX14_CONSTEXPR front_insert_iterator operator++(int) { - return *this; - } - - SPROUT_CXX14_CONSTEXPR void swap(front_insert_iterator& other) - SPROUT_NOEXCEPT_IF_EXPR(base_type::swap(other)) - { - base_type::swap(other); - } - }; - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::front_insert_iterator& lhs, sprout::front_insert_iterator& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // front_inserter - // - template - inline SPROUT_CONSTEXPR sprout::front_insert_iterator - front_inserter(Container& x) { - return sprout::front_insert_iterator(x); - } - template - inline SPROUT_CONSTEXPR sprout::front_insert_iterator - front_inserter(Container const& x) { - return sprout::front_insert_iterator(x); - } - - // - // container_construct_traits - // - template - struct container_construct_traits > { - public: - typedef typename sprout::container_construct_traits::copied_type copied_type; - private: - template - static SPROUT_CONSTEXPR copied_type - remake_impl(Cont&& cont, InputIterator first, InputIterator last) { - return sprout::make( - sprout::make_insert_range_iterator( - sprout::internal_begin(cont), sprout::begin(cont), - first, first, last - ), - sprout::make_insert_range_iterator( - sprout::internal_end(cont), sprout::begin(cont), - last, first, last - ) - ); - } - public: - template - static SPROUT_CONSTEXPR copied_type - deep_copy(Cont&& cont) { - return sprout::deep_copy(sprout::get_internal(SPROUT_FORWARD(Cont, cont))); - } - template - static SPROUT_CONSTEXPR copied_type - make(Args&&... args) { - return sprout::make(SPROUT_FORWARD(Args, args)...); - } - template - static SPROUT_CONSTEXPR copied_type - remake(Cont&& cont, typename sprout::container_traits::difference_type, Args&&... args) { - return remake_impl(sprout::get_internal(SPROUT_FORWARD(Cont, cont)), SPROUT_FORWARD(Args, args)...); - } - }; - - // - // container_fitness_traits - // - template - struct container_fitness_traits > { - public: - template - static SPROUT_CONSTEXPR typename sprout::container_traits::difference_type - fit_size(Cont&& cont, typename sprout::container_traits::difference_type size) { - return size + sprout::size(SPROUT_FORWARD(Cont, cont)); - } - }; - - // - // sub_container_traits - // - template - struct sub_container_traits > - : public sprout::sub_container_traits > - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_FRONT_INSERT_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/generator_iterator.hpp b/dsp/lib/sprout/sprout/iterator/generator_iterator.hpp deleted file mode 100644 index bc666b3..0000000 --- a/dsp/lib/sprout/sprout/iterator/generator_iterator.hpp +++ /dev/null @@ -1,161 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_GENERATOR_ITERATOR_HPP -#define SPROUT_ITERATOR_GENERATOR_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // generator_iterator - // - template - class generator_iterator - : public sprout::iterator< - std::forward_iterator_tag, - typename std::remove_reference()))>::type, - std::ptrdiff_t, - typename std::remove_reference()))>::type*, - decltype(sprout::generators::generated_value(std::declval())) - > - { - public: - typedef Generator generator_type; - typedef std::forward_iterator_tag iterator_category; - typedef typename sprout::identity()))>::type reference; - typedef typename std::remove_reference::type value_type; - typedef std::ptrdiff_t difference_type; - typedef value_type* pointer; - private: - generator_type gen_; - difference_type index_; - public: - SPROUT_CONSTEXPR generator_iterator() - : gen_(), index_() - {} - explicit SPROUT_CONSTEXPR generator_iterator( - generator_type const& gen, - difference_type index = sprout::numeric_limits::max() - ) - : gen_(gen), index_(index) - {} - SPROUT_CXX14_CONSTEXPR generator_type& generator() { - return gen_; - } - SPROUT_CONSTEXPR generator_type const& generator() const { - return gen_; - } - SPROUT_CONSTEXPR difference_type index() const { - return index_; - } - SPROUT_CONSTEXPR generator_iterator operator()() const { - return generator_iterator(sprout::generators::next_generator(gen_)(), index_ - 1); - } - SPROUT_CONSTEXPR generator_iterator next() const { - return (*this)(); - } - SPROUT_CONSTEXPR reference generated_value() const { - return sprout::generators::generated_value(gen_); - } - SPROUT_CONSTEXPR generator_iterator next_generator() const { - return (*this)(); - } - SPROUT_CONSTEXPR operator reference() const { - return generated_value(); - } - SPROUT_CXX14_CONSTEXPR void swap(generator_iterator& other) - SPROUT_NOEXCEPT_IF_EXPR(sprout::swap(gen_, other.gen_)) - { - sprout::swap(gen_, other.gen_); - sprout::swap(index_, other.index_); - } - SPROUT_CONSTEXPR reference operator*() const { - return sprout::generators::generated_value(gen_); - } - SPROUT_CONSTEXPR pointer operator->() const { - return &*(*this); - } - SPROUT_CXX14_CONSTEXPR generator_iterator& operator++() { - generator_iterator temp((*this)()); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR generator_iterator operator++(int) { - generator_iterator result(*this); - ++*this; - return result; - } - }; - - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::generator_iterator const& lhs, sprout::generator_iterator const& rhs) { - return lhs.index() == rhs.index(); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::generator_iterator const& lhs, sprout::generator_iterator const& rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator<(sprout::generator_iterator const& lhs, sprout::generator_iterator const& rhs) { - return rhs.index() < lhs.index(); - } - template - inline SPROUT_CONSTEXPR bool - operator>(sprout::generator_iterator const& lhs, sprout::generator_iterator const& rhs) { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator<=(sprout::generator_iterator const& lhs, sprout::generator_iterator const& rhs) { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(sprout::generator_iterator const& lhs, sprout::generator_iterator const& rhs) { - return !(lhs < rhs); - } - template - inline SPROUT_CONSTEXPR typename sprout::generator_iterator::difference_type - operator-(sprout::generator_iterator const& lhs, sprout::generator_iterator const& rhs) { - return rhs.index() - lhs.index(); - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::generator_iterator& lhs, sprout::generator_iterator& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::generator_iterator - iterator_next(sprout::generator_iterator const& it) { - return it.next(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_GENERATOR_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/idft_iterator.hpp b/dsp/lib/sprout/sprout/iterator/idft_iterator.hpp deleted file mode 100644 index f922fec..0000000 --- a/dsp/lib/sprout/sprout/iterator/idft_iterator.hpp +++ /dev/null @@ -1,215 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_IDFT_ITERATOR_HPP -#define SPROUT_ITERATOR_IDFT_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // idft_iterator - // - template - class idft_iterator - : public sprout::detail::iterator_base< - Iterator, - std::random_access_iterator_tag, - sprout::use_default, - sprout::use_default, - void, - typename std::iterator_traits::value_type - >::type - { - private: - typedef typename sprout::detail::iterator_base< - Iterator, - std::random_access_iterator_tag, - sprout::use_default, - sprout::use_default, - void, - typename std::iterator_traits::value_type - >::type base_type; - public: - typedef Iterator iterator_type; - typedef typename base_type::iterator_category iterator_category; - typedef typename base_type::value_type value_type; - typedef typename base_type::difference_type difference_type; - typedef typename base_type::pointer pointer; - typedef typename base_type::reference reference; - private: - iterator_type first_; - iterator_type last_; - difference_type index_; - difference_type size_; - private: - SPROUT_CONSTEXPR idft_iterator(iterator_type first, iterator_type last, difference_type index, difference_type size) - : first_(first), last_(last), index_(index) - , size_(size) - {} - public: - SPROUT_CONSTEXPR idft_iterator() - : first_(), last_(), index_() - , size_() - {} - idft_iterator(idft_iterator const&) = default; - SPROUT_CONSTEXPR idft_iterator(iterator_type first, iterator_type last, difference_type index = 0) - : first_(first), last_(last), index_(index) - , size_(sprout::distance(first, last)) - {} - SPROUT_CONSTEXPR idft_iterator next() const { - return idft_iterator(first_, last_, index_, index_ + 1, size_); - } - SPROUT_CONSTEXPR idft_iterator prev() const { - return idft_iterator(first_, last_, index_, index_ - 1, size_); - } - SPROUT_CXX14_CONSTEXPR void swap(idft_iterator& other) - SPROUT_NOEXCEPT_IF( - SPROUT_NOEXCEPT_EXPR(sprout::swap(first_, other.first_)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(last_, other.last_)) - ) - { - sprout::swap(first_, other.first_); - sprout::swap(last_, other.last_); - sprout::swap(index_, other.index_); - sprout::swap(size_, other.size_); - } - SPROUT_CONSTEXPR reference operator*() const { - return sprout::detail::idft_element_impl(first_, last_, index_, size_); - } - SPROUT_CXX14_CONSTEXPR idft_iterator& operator++() { - idft_iterator temp(next()); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR idft_iterator operator++(int) { - idft_iterator result(*this); - ++*this; - return result; - } - SPROUT_CXX14_CONSTEXPR idft_iterator& operator--() { - idft_iterator temp(prev()); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR idft_iterator operator--(int) { - idft_iterator result(*this); - --*this; - return result; - } - SPROUT_CONSTEXPR idft_iterator operator+(difference_type n) const { - return idft_iterator(first_, last_, index_, index_ + n, size_); - } - SPROUT_CONSTEXPR idft_iterator operator-(difference_type n) const { - return idft_iterator(first_, last_, index_, index_ - n, size_); - } - SPROUT_CXX14_CONSTEXPR idft_iterator& operator+=(difference_type n) { - idft_iterator temp(first_, last_, index_, index_ + n, size_); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR idft_iterator& operator-=(difference_type n) { - idft_iterator temp(first_, last_, index_, index_ - n, size_); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR reference operator[](difference_type n) const { - return sprout::detail::idft_element_impl(first_, last_, index_ + n, size_); - } - }; - - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::idft_iterator const& lhs, sprout::idft_iterator const& rhs) { - return lhs.index() == rhs.index(); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::idft_iterator const& lhs, sprout::idft_iterator const& rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator<(sprout::idft_iterator const& lhs, sprout::idft_iterator const& rhs) { - return lhs.index_ < rhs.index_; - } - template - inline SPROUT_CONSTEXPR bool - operator>(sprout::idft_iterator const& lhs, sprout::idft_iterator const& rhs) { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator<=(sprout::idft_iterator const& lhs, sprout::idft_iterator const& rhs) { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(sprout::idft_iterator const& lhs, sprout::idft_iterator const& rhs) { - return !(lhs < rhs); - } - template - inline SPROUT_CONSTEXPR typename sprout::idft_iterator::difference_type - operator-(sprout::idft_iterator const& lhs, sprout::idft_iterator const& rhs) { - return lhs.index() - rhs.index(); - } - template - inline SPROUT_CONSTEXPR sprout::idft_iterator - operator+(typename sprout::idft_iterator::difference_type n, sprout::idft_iterator const& it) { - return it + n; - } - - // - // make_idft_iterator - // - template - inline SPROUT_CONSTEXPR sprout::idft_iterator - make_idft_iterator(Iterator first, Iterator last, typename std::iterator_traits::difference_type i = 0) { - return sprout::idft_iterator(first, last, i); - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::idft_iterator& lhs, sprout::idft_iterator& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::idft_iterator - iterator_next(sprout::idft_iterator const& it) { - return it.next(); - } - - // - // iterator_prev - // - template - inline SPROUT_CONSTEXPR sprout::idft_iterator - iterator_prev(sprout::idft_iterator const& it) { - return it.prev(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_IDFT_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/index_iterator.hpp b/dsp/lib/sprout/sprout/iterator/index_iterator.hpp deleted file mode 100644 index 6c6c315..0000000 --- a/dsp/lib/sprout/sprout/iterator/index_iterator.hpp +++ /dev/null @@ -1,315 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_INDEX_ITERATOR_HPP -#define SPROUT_ITERATOR_INDEX_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // index_iterator - // - template > - class index_iterator - : public sprout::iterator< - std::random_access_iterator_tag, - typename sprout::container_traits::type>::value_type, - typename sprout::container_traits::type>::difference_type, - typename std::conditional< - std::is_const::type>::value, - typename sprout::container_traits::type>::const_pointer, - typename sprout::container_traits::type>::pointer - >::type, - typename std::conditional< - std::is_const::type>::value, - typename sprout::container_traits::type>::const_reference, - typename sprout::container_traits::type>::reference - >::type - > - , public sprout::detail::iterator_to_pointer_base< - sprout::index_iterator, - typename std::conditional< - std::is_const::type>::value, - typename sprout::container_traits::type>::const_pointer, - typename sprout::container_traits::type>::pointer - >::type, - ConvertibleToPointer - > - { - public: - typedef Container container_type; - typedef typename sprout::container_traits::type> traits_type; - typedef typename std::conditional< - std::is_reference::value, - typename std::remove_reference::type const&, - typename std::remove_reference::type const - >::type const_container_type; - private: - typedef Subscript subscript_type; - typedef sprout::iterator< - std::random_access_iterator_tag, - typename traits_type::value_type, - typename traits_type::difference_type, - typename std::conditional< - std::is_const::type>::value, - typename traits_type::const_pointer, - typename traits_type::pointer - >::type, - typename std::conditional< - std::is_const::type>::value, - typename traits_type::const_reference, - typename traits_type::reference - >::type - > base_type; - typedef sprout::value_holder holder_type; - public: - typedef typename base_type::iterator_category iterator_category; - typedef typename base_type::value_type value_type; - typedef typename base_type::difference_type difference_type; - typedef typename base_type::pointer pointer; - typedef typename base_type::reference reference; - typedef typename traits_type::size_type size_type; - private: - holder_type holder_; - difference_type index_; - private: - SPROUT_CONSTEXPR index_iterator(holder_type const& r, difference_type index) - : holder_(r), index_(index) - {} - public: - SPROUT_CONSTEXPR index_iterator() - : holder_(), index_() - {} - index_iterator(index_iterator const&) = default; - explicit SPROUT_CONSTEXPR index_iterator(typename holder_type::param_type p) - : holder_(p), index_(0) - {} - SPROUT_CONSTEXPR index_iterator(typename holder_type::param_type p, difference_type index) - : holder_(p), index_(index) - {} - SPROUT_CONSTEXPR operator index_iterator() const { - return index_iterator(holder_.get(), index_); - } - SPROUT_CONSTEXPR typename holder_type::mutable_or_const_reference base() const { - return holder_.get(); - } - SPROUT_CONSTEXPR difference_type index() const { - return index_; - } - SPROUT_CONSTEXPR index_iterator next() const { - return index_iterator(holder_, index_ + 1); - } - SPROUT_CONSTEXPR index_iterator prev() const { - return index_iterator(holder_, index_ - 1); - } - SPROUT_CXX14_CONSTEXPR void swap(index_iterator& other) - SPROUT_NOEXCEPT_IF_EXPR(sprout::swap(holder_, other.holder_)) - { - sprout::swap(holder_, other.holder_); - sprout::swap(index_, other.index_); - } - SPROUT_CONSTEXPR reference operator*() const { - return subscript_type()(holder_.get(), index_); - } - SPROUT_CONSTEXPR pointer operator->() const { - return &subscript_type()(holder_.get(), index_); - } - SPROUT_CXX14_CONSTEXPR index_iterator& operator++() { - index_iterator temp(next()); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR index_iterator operator++(int) { - index_iterator result(*this); - ++*this; - return result; - } - SPROUT_CXX14_CONSTEXPR index_iterator& operator--() { - index_iterator temp(prev()); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR index_iterator operator--(int) { - index_iterator result(*this); - --*this; - return result; - } - SPROUT_CONSTEXPR index_iterator operator+(difference_type n) const { - return index_iterator(holder_, index_ + n); - } - SPROUT_CONSTEXPR index_iterator operator-(difference_type n) const { - return index_iterator(holder_, index_ - n); - } - SPROUT_CXX14_CONSTEXPR index_iterator& operator+=(difference_type n) { - index_iterator temp(holder_, index_ + n); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR index_iterator& operator-=(difference_type n) { - index_iterator temp(holder_, index_ - n); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR reference operator[](difference_type n) const { - return subscript_type()(holder_.get(), index_ + n); - } - }; - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_same::type, typename std::decay::type>::value, - bool - >::type - operator==(sprout::index_iterator const& lhs, sprout::index_iterator const& rhs) { - return lhs.index() == rhs.index(); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_same::type, typename std::decay::type>::value, - bool - >::type - operator!=(sprout::index_iterator const& lhs, sprout::index_iterator const& rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_same::type, typename std::decay::type>::value, - bool - >::type - operator<(sprout::index_iterator const& lhs, sprout::index_iterator const& rhs) { - return lhs.index() < rhs.index(); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_same::type, typename std::decay::type>::value, - bool - >::type - operator>(sprout::index_iterator const& lhs, sprout::index_iterator const& rhs) { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_same::type, typename std::decay::type>::value, - bool - >::type - operator<=(sprout::index_iterator const& lhs, sprout::index_iterator const& rhs) { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_same::type, typename std::decay::type>::value, - bool - >::type - operator>=(sprout::index_iterator const& lhs, sprout::index_iterator const& rhs) { - return !(lhs < rhs); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_same::type, typename std::decay::type>::value, - decltype( - std::declval >::difference_type>() - - std::declval >::difference_type>() - ) - >::type - operator-(sprout::index_iterator const& lhs, sprout::index_iterator const& rhs) { - return lhs.index() - rhs.index(); - } - template - inline SPROUT_CONSTEXPR sprout::index_iterator - operator+(typename sprout::index_iterator::difference_type n, sprout::index_iterator const& it) { - return it + n; - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::index_iterator& lhs, sprout::index_iterator& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // is_index_iterator - // - template - struct is_index_iterator - : public sprout::false_type - {}; - template - struct is_index_iterator - : public sprout::is_index_iterator - {}; - template - struct is_index_iterator - : public sprout::is_index_iterator - {}; - template - struct is_index_iterator > - : public sprout::true_type - {}; - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::index_iterator - iterator_next(sprout::index_iterator const& it) { - return it.next(); - } - - // - // iterator_prev - // - template - inline SPROUT_CONSTEXPR sprout::index_iterator - iterator_prev(sprout::index_iterator const& it) { - return it.prev(); - } - - // - // is_const_iterator_cast_convertible - // - template - struct is_const_iterator_cast_convertible, sprout::index_iterator > - : public sprout::is_same::type, typename std::decay::type> - {}; - // - // const_iterator_conversion - // - template< - typename T, - typename Container, bool C, typename Subscript, - typename sprout::enabler_if, T>::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR T - const_iterator_conversion(sprout::index_iterator const& it) { - return T(const_cast(it.base()), it.index()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_INDEX_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/indexed_iterator.hpp b/dsp/lib/sprout/sprout/iterator/indexed_iterator.hpp deleted file mode 100644 index 83a479b..0000000 --- a/dsp/lib/sprout/sprout/iterator/indexed_iterator.hpp +++ /dev/null @@ -1,217 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_INDEXED_ITERATOR_HPP -#define SPROUT_ITERATOR_INDEXED_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // indexed_iterator - // - template - class indexed_iterator - : public sprout::detail::iterator_base::type - { - private: - typedef typename sprout::detail::iterator_base::type base_type; - public: - typedef Iterator iterator_type; - typedef typename base_type::iterator_category iterator_category; - typedef typename base_type::value_type value_type; - typedef typename base_type::difference_type difference_type; - typedef typename base_type::pointer pointer; - typedef typename base_type::reference reference; - typedef difference_type index_type; - protected: - iterator_type current; - index_type idx; - public: - SPROUT_CONSTEXPR indexed_iterator() - : current(), idx() - {} - SPROUT_CONSTEXPR indexed_iterator(indexed_iterator const& other) - : current(other.current) - , idx(other.idx) - {} - explicit SPROUT_CONSTEXPR indexed_iterator(iterator_type it, index_type idx = 0) - : current(it) - , idx(idx) - {} - template - SPROUT_CONSTEXPR indexed_iterator(indexed_iterator const& it) - : current(it.base()) - , idx(it.index()) - {} - template - SPROUT_CXX14_CONSTEXPR indexed_iterator& operator=(indexed_iterator const& it) { - indexed_iterator temp(it); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR iterator_type base() const { - return current; - } - SPROUT_CONSTEXPR index_type index() const { - return idx; - } - SPROUT_CONSTEXPR reference operator*() const { - return *current; - } - SPROUT_CONSTEXPR pointer operator->() const { - return &*current; - } - SPROUT_CXX14_CONSTEXPR indexed_iterator& operator++() { - ++current; - ++idx; - return *this; - } - SPROUT_CXX14_CONSTEXPR indexed_iterator operator++(int) { - indexed_iterator result(*this); - ++current; - ++idx; - return result; - } - SPROUT_CXX14_CONSTEXPR indexed_iterator& operator--() { - --current; - --idx; - return *this; - } - SPROUT_CXX14_CONSTEXPR indexed_iterator operator--(int) { - indexed_iterator temp(*this); - --current; - --idx; - return temp; - } - SPROUT_CONSTEXPR indexed_iterator operator+(difference_type n) const { - return indexed_iterator(current + n, idx + n); - } - SPROUT_CONSTEXPR indexed_iterator operator-(difference_type n) const { - return indexed_iterator(current - n, idx - n); - } - SPROUT_CXX14_CONSTEXPR indexed_iterator& operator+=(difference_type n) { - indexed_iterator temp(current + n, idx + n); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR indexed_iterator& operator-=(difference_type n) { - indexed_iterator temp(current - n, idx - n); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR reference operator[](difference_type n) const { - return *(current + n); - } - SPROUT_CONSTEXPR indexed_iterator next() const { - return indexed_iterator(sprout::next(current), idx + 1); - } - SPROUT_CONSTEXPR indexed_iterator prev() const { - return indexed_iterator(sprout::prev(current), idx - 1); - } - SPROUT_CXX14_CONSTEXPR void swap(indexed_iterator& other) - SPROUT_NOEXCEPT_IF( - SPROUT_NOEXCEPT_EXPR(swap(current, other.current)) - && SPROUT_NOEXCEPT_EXPR(swap(idx, other.idx)) - ) - { - swap(current, other.current); - swap(idx, other.idx); - } - }; - - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::indexed_iterator const& lhs, sprout::indexed_iterator const& rhs) { - return lhs.base() == rhs.base(); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::indexed_iterator const& lhs, sprout::indexed_iterator const& rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator<(sprout::indexed_iterator const& lhs, sprout::indexed_iterator const& rhs) { - return lhs.base() < rhs.base(); - } - template - inline SPROUT_CONSTEXPR bool - operator>(sprout::indexed_iterator const& lhs, sprout::indexed_iterator const& rhs) { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator<=(sprout::indexed_iterator const& lhs, sprout::indexed_iterator const& rhs) { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(sprout::indexed_iterator const& lhs, sprout::indexed_iterator const& rhs) { - return !(lhs < rhs); - } - template - inline SPROUT_CONSTEXPR decltype(std::declval() - std::declval()) - operator-(sprout::indexed_iterator const& lhs, sprout::indexed_iterator const& rhs) { - return lhs.base() - rhs.base(); - } - template - inline SPROUT_CONSTEXPR sprout::indexed_iterator - operator+( - typename sprout::indexed_iterator::difference_type n, - sprout::indexed_iterator const& it - ) - { - return it + n; - } - - // - // make_indexed_iterator - // - template - inline SPROUT_CONSTEXPR sprout::indexed_iterator - make_indexed_iterator(Iterator it, typename sprout::indexed_iterator::index_type idx = 0) { - return sprout::indexed_iterator(it, idx); - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::indexed_iterator& lhs, sprout::indexed_iterator& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::indexed_iterator - iterator_next(sprout::indexed_iterator const& it) { - return it.next(); - } - - // - // iterator_prev - // - template - inline SPROUT_CONSTEXPR sprout::indexed_iterator - iterator_prev(sprout::indexed_iterator const& it) { - return it.prev(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_INDEXED_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/insert_iterator.hpp b/dsp/lib/sprout/sprout/iterator/insert_iterator.hpp deleted file mode 100644 index 4226b6c..0000000 --- a/dsp/lib/sprout/sprout/iterator/insert_iterator.hpp +++ /dev/null @@ -1,185 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_INSERT_ITERATOR_HPP -#define SPROUT_ITERATOR_INSERT_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // insert_iterator - // - template - class insert_iterator - : public sprout::iterator - , public sprout::container_holder - { - private: - typedef sprout::container_holder base_type; - public: - typedef typename base_type::container_type container_type; - typedef typename base_type::internal_type internal_type; - typedef typename base_type::iterator iterator; - typedef typename base_type::const_iterator const_iterator; - typedef typename base_type::reference reference; - typedef typename base_type::const_reference const_reference; - typedef typename base_type::size_type size_type; - typedef typename base_type::difference_type difference_type; - typedef typename base_type::pointer pointer; - typedef typename base_type::const_pointer const_pointer; - typedef typename base_type::param_type param_type; - typedef typename base_type::const_param_type const_param_type; - typedef typename base_type::holder_type holder_type; - protected: - using base_type::container; - iterator iter; - public: - SPROUT_CONSTEXPR insert_iterator() - : base_type(), iter() - {} - SPROUT_CONSTEXPR insert_iterator(param_type x, iterator pos) - : base_type(x), iter(pos) - {} - insert_iterator(insert_iterator const&) = default; - SPROUT_CONSTEXPR iterator position() const { - return iter; - } - SPROUT_CXX14_CONSTEXPR insert_iterator& operator=(typename container_type::value_type const& value) { - container->insert(iter, value); - return *this; - } - SPROUT_CXX14_CONSTEXPR insert_iterator& operator=(typename container_type::value_type&& value) { - container->insert(iter, sprout::move(value)); - return *this; - } - SPROUT_CONSTEXPR insert_iterator& operator*() const { - return *this; - } - SPROUT_CXX14_CONSTEXPR insert_iterator& operator*() { - return *this; - } - SPROUT_CXX14_CONSTEXPR insert_iterator& operator++() { - return *this; - } - SPROUT_CXX14_CONSTEXPR insert_iterator operator++(int) { - return *this; - } - - SPROUT_CXX14_CONSTEXPR void swap(insert_iterator& other) - SPROUT_NOEXCEPT_IF( - SPROUT_NOEXCEPT_EXPR(base_type::swap(other)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(other.iter, iter)) - ) - { - base_type::swap(other); - sprout::swap(other.iter, iter); - } - }; - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::insert_iterator& lhs, sprout::insert_iterator& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // inserter - // - template - inline SPROUT_CONSTEXPR sprout::insert_iterator - inserter(Container& x, typename sprout::insert_iterator::iterator pos) { - return sprout::insert_iterator(x, pos); - } - template - inline SPROUT_CONSTEXPR sprout::insert_iterator - inserter(Container const& x, typename sprout::insert_iterator::iterator pos) { - return sprout::insert_iterator(x, pos); - } - - // - // container_construct_traits - // - template - struct container_construct_traits > { - public: - typedef typename sprout::container_construct_traits::copied_type copied_type; - private: - template - static SPROUT_CONSTEXPR copied_type - remake_impl(Iterator pos, Cont&& cont, InputIterator first, InputIterator last) { - return sprout::make( - sprout::make_insert_range_iterator( - sprout::internal_begin(cont), pos, - first, first, last - ), - sprout::make_insert_range_iterator( - sprout::internal_end(cont), pos, - last, first, last - ) - ); - } - public: - template - static SPROUT_CONSTEXPR copied_type - deep_copy(Cont&& cont) { - return sprout::deep_copy(sprout::get_internal(SPROUT_FORWARD(Cont, cont))); - } - template - static SPROUT_CONSTEXPR copied_type - make(Args&&... args) { - return sprout::make(SPROUT_FORWARD(Args, args)...); - } - template - static SPROUT_CONSTEXPR copied_type - remake(Cont&& cont, typename sprout::container_traits::difference_type, Args&&... args) { - return remake_impl(cont.position(), sprout::get_internal(SPROUT_FORWARD(Cont, cont)), SPROUT_FORWARD(Args, args)...); - } - }; - - // - // container_fitness_traits - // - template - struct container_fitness_traits > { - public: - template - static SPROUT_CONSTEXPR typename sprout::container_traits::difference_type - fit_size(Cont&& cont, typename sprout::container_traits::difference_type size) { - return size + sprout::size(SPROUT_FORWARD(Cont, cont)); - } - }; - - // - // sub_container_traits - // - template - struct sub_container_traits > - : public sprout::sub_container_traits > - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_INSERT_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/insert_range_iterator.hpp b/dsp/lib/sprout/sprout/iterator/insert_range_iterator.hpp deleted file mode 100644 index c26d255..0000000 --- a/dsp/lib/sprout/sprout/iterator/insert_range_iterator.hpp +++ /dev/null @@ -1,329 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_INSERT_RANGE_ITERATOR_HPP -#define SPROUT_ITERATOR_INSERT_RANGE_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // insert_range_iterator - // - template - class insert_range_iterator - : public sprout::iterator< - typename sprout::common_iterator_category::type, - typename sprout::common_iterator_value_type::type, - typename sprout::common_iterator_difference_type::type, - typename sprout::common_iterator_pointer::type, - typename sprout::common_iterator_reference::type - > - { - public: - typedef DstIterator iterator_type; - typedef SrcIterator iterator2_type; - typedef typename sprout::common_iterator_category::type iterator_category; - typedef typename sprout::common_iterator_value_type::type value_type; - typedef typename sprout::common_iterator_difference_type::type difference_type; - typedef typename sprout::common_iterator_pointer::type pointer; - typedef typename sprout::common_iterator_reference::type reference; - protected: - iterator_type current1; - iterator_type pos1; - iterator2_type current2; - iterator2_type first2; - iterator2_type last2; - private: - SPROUT_CONSTEXPR insert_range_iterator advance_impl(difference_type n) const { - return n >= 0 - ? current1 > pos1 ? insert_range_iterator(sprout::next(current1, n), pos1, current2, first2, last2) - : current1 == pos1 ? current2 == last2 ? insert_range_iterator(sprout::next(current1, n), pos1, current2, first2, last2) - : n <= sprout::distance(current2, last2) ? insert_range_iterator(current1, pos1, last2, sprout::next(current2, n), first2, last2) - : insert_range_iterator(sprout::next(current1, n - sprout::distance(current2, last2)), pos1, last2, first2, last2) - : n <= sprout::distance(current1, pos1) ? insert_range_iterator(sprout::next(current1, n), pos1, current2, first2, last2) - : n <= sprout::distance(current1, pos1) + sprout::distance(current2, last2) - ? insert_range_iterator(pos1, pos1, last2, sprout::next(current2, n - sprout::distance(current1, pos1)), first2, last2) - : insert_range_iterator(sprout::next(current1, n - sprout::distance(current1, pos1) - sprout::distance(current2, last2)), pos1, last2, first2, last2) - : current1 < pos1 ? insert_range_iterator(sprout::next(current1, n), pos1, current2, first2, last2) - : current1 == pos1 ? current2 == first2 ? insert_range_iterator(sprout::next(current1, n), pos1, current2, first2, last2) - : -n <= sprout::distance(first2, current2) ? insert_range_iterator(current1, pos1, last2, sprout::next(current2, n), first2, last2) - : insert_range_iterator(sprout::next(current1, n - sprout::distance(first2, current2)), pos1, first2, first2, last2) - : -n <= sprout::distance(pos1, current1) ? insert_range_iterator(sprout::next(current1, n), pos1, current2, first2, last2) - : -n <= sprout::distance(pos1, current1) + sprout::distance(first2, current2) - ? insert_range_iterator(pos1, pos1, last2, sprout::next(current2, n - sprout::distance(pos1, current1)), first2, last2) - : insert_range_iterator(sprout::next(current1, n - sprout::distance(pos1, current1) - sprout::distance(first2, current2)), pos1, first2, first2, last2) - ; - } - public: - SPROUT_CONSTEXPR insert_range_iterator() - : current1(), pos1(), current2(), first2(), last2() - {} - insert_range_iterator(insert_range_iterator const&) = default; - SPROUT_CONSTEXPR insert_range_iterator(iterator_type it1, iterator_type pos1, iterator2_type it2, iterator2_type first2, iterator2_type last2) - : current1(it1), pos1(pos1) - , current2(it2), first2(first2), last2(last2) - {} - template - SPROUT_CONSTEXPR insert_range_iterator(insert_range_iterator const& it) - : current1(it.base()), pos1(it.position()) - , current2(it.base2()), first2(it.first()), last2(it.last()) - {} - template - SPROUT_CXX14_CONSTEXPR insert_range_iterator& operator=(insert_range_iterator const& it) { - insert_range_iterator temp(it); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR iterator_type base() const { - return current1; - } - SPROUT_CONSTEXPR iterator_type position() const { - return pos1; - } - SPROUT_CONSTEXPR iterator2_type base2() const { - return current2; - } - SPROUT_CONSTEXPR iterator2_type first() const { - return first2; - } - SPROUT_CONSTEXPR iterator2_type last() const { - return last2; - } - SPROUT_CONSTEXPR bool is_in_base() const { - return current1 != pos1 || current2 == last2; - } - SPROUT_CONSTEXPR reference operator*() const { - return is_in_base() ? *current1 : *current2; - } - SPROUT_CONSTEXPR pointer operator->() const { - return &*(*this); - } - SPROUT_CXX14_CONSTEXPR insert_range_iterator& operator++() { - if (is_in_base()) { - ++current1; - } else { - ++current2; - } - return *this; - } - SPROUT_CXX14_CONSTEXPR insert_range_iterator operator++(int) { - insert_range_iterator result(*this); - if (is_in_base()) { - ++current1; - } else { - ++current2; - } - return result; - } - SPROUT_CXX14_CONSTEXPR insert_range_iterator& operator--() { - if (current1 != pos1 || current2 == first2) { - --current1; - } else { - --current2; - } - return *this; - } - SPROUT_CXX14_CONSTEXPR insert_range_iterator operator--(int) { - insert_range_iterator temp(*this); - if (current1 != pos1 || current2 == first2) { - --current1; - } else { - --current2; - } - return temp; - } - SPROUT_CONSTEXPR insert_range_iterator operator+(difference_type n) const { - return advance_impl(n); - } - SPROUT_CONSTEXPR insert_range_iterator operator-(difference_type n) const { - return advance_impl(-n); - } - SPROUT_CXX14_CONSTEXPR insert_range_iterator& operator+=(difference_type n) { - insert_range_iterator temp(*this + n); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR insert_range_iterator& operator-=(difference_type n) { - insert_range_iterator temp(*this - n); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR reference operator[](difference_type n) const { - return *(*this + n); - } - SPROUT_CONSTEXPR insert_range_iterator next() const { - return is_in_base() ? insert_range_iterator(sprout::next(current1), pos1, current2, first2, last2) - : insert_range_iterator(current1, pos1, sprout::next(current2), first2, last2) - ; - } - SPROUT_CONSTEXPR insert_range_iterator prev() const { - return current1 != pos1 || current2 == first2 ? insert_range_iterator(sprout::prev(current1), pos1, current2, first2, last2) - : insert_range_iterator(current1, pos1, sprout::prev(current2), first2, last2) - ; - } - SPROUT_CXX14_CONSTEXPR void swap(insert_range_iterator& other) - SPROUT_NOEXCEPT_IF( - SPROUT_NOEXCEPT_EXPR(sprout::swap(current1, other.current1)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(pos1, other.pos1)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(current2, other.current2)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(first2, other.first2)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(last2, other.last2)) - ) - { - sprout::swap(current1, other.current1); - sprout::swap(pos1, other.pos1); - sprout::swap(current2, other.current2); - sprout::swap(first2, other.first2); - sprout::swap(last2, other.last2); - } - }; - - template< - typename DstIterator1, typename SrcIterator1, - typename DstIterator2, typename SrcIterator2 - > - inline SPROUT_CONSTEXPR bool operator==( - sprout::insert_range_iterator const& lhs, - sprout::insert_range_iterator const& rhs - ) - { - return lhs.base() == rhs.base() && lhs.base2() == rhs.base2(); - } - template< - typename DstIterator1, typename SrcIterator1, - typename DstIterator2, typename SrcIterator2 - > - inline SPROUT_CONSTEXPR bool operator!=( - sprout::insert_range_iterator const& lhs, - sprout::insert_range_iterator const& rhs - ) - { - return !(lhs == rhs); - } - template< - typename DstIterator1, typename SrcIterator1, - typename DstIterator2, typename SrcIterator2 - > - inline SPROUT_CONSTEXPR bool operator<( - sprout::insert_range_iterator const& lhs, - sprout::insert_range_iterator const& rhs - ) - { - return lhs.is_in_base() && rhs.is_in_base() ? lhs.base() < rhs.base() - : !lhs.is_in_base() && !rhs.is_in_base() ? lhs.base2() < rhs.base2() - : lhs.is_in_base() - ; - } - template< - typename DstIterator1, typename SrcIterator1, - typename DstIterator2, typename SrcIterator2 - > - inline SPROUT_CONSTEXPR bool operator>( - sprout::insert_range_iterator const& lhs, - sprout::insert_range_iterator const& rhs - ) - { - return rhs < lhs; - } - template< - typename DstIterator1, typename SrcIterator1, - typename DstIterator2, typename SrcIterator2 - > - inline SPROUT_CONSTEXPR bool operator<=( - sprout::insert_range_iterator const& lhs, - sprout::insert_range_iterator const& rhs - ) - { - return !(rhs < lhs); - } - template< - typename DstIterator1, typename SrcIterator1, - typename DstIterator2, typename SrcIterator2 - > - inline SPROUT_CONSTEXPR bool operator>=( - sprout::insert_range_iterator const& lhs, - sprout::insert_range_iterator const& rhs - ) - { - return !(lhs < rhs); - } - template< - typename DstIterator1, typename SrcIterator1, - typename DstIterator2, typename SrcIterator2 - > - inline SPROUT_CONSTEXPR typename sprout::arithmetic_promote< - typename sprout::insert_range_iterator::difference_type, - typename sprout::insert_range_iterator::difference_type - >::type - operator-( - sprout::insert_range_iterator const& lhs, - sprout::insert_range_iterator const& rhs - ) - { - return sprout::limited::plus(lhs.base() - rhs.base(), lhs.base2() - rhs.base2()); - } - template - inline SPROUT_CONSTEXPR sprout::insert_range_iterator operator+( - typename sprout::insert_range_iterator::difference_type n, - sprout::insert_range_iterator const& it - ) - { - return it + n; - } - - // - // make_insert_range_iterator - // - template - inline SPROUT_CONSTEXPR sprout::insert_range_iterator - make_insert_range_iterator(DstIterator it1, DstIterator pos1, SrcIterator it2, SrcIterator first2, SrcIterator last2) { - return sprout::insert_range_iterator(it1, pos1, it2, first2, last2); - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap( - sprout::insert_range_iterator& lhs, - sprout::insert_range_iterator& rhs - ) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::insert_range_iterator - iterator_next(sprout::insert_range_iterator const& it) { - return it.next(); - } - - // - // iterator_prev - // - template - inline SPROUT_CONSTEXPR sprout::insert_range_iterator - iterator_prev(sprout::insert_range_iterator const& it) { - return it.prev(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_INSERT_RANGE_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/inserter.hpp b/dsp/lib/sprout/sprout/iterator/inserter.hpp deleted file mode 100644 index 99430a1..0000000 --- a/dsp/lib/sprout/sprout/iterator/inserter.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_INSERTER_HPP -#define SPROUT_ITERATOR_INSERTER_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ITERATOR_INSERTER_HPP diff --git a/dsp/lib/sprout/sprout/iterator/iterator.hpp b/dsp/lib/sprout/sprout/iterator/iterator.hpp deleted file mode 100644 index 11d44ed..0000000 --- a/dsp/lib/sprout/sprout/iterator/iterator.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_ITERATOR_HPP -#define SPROUT_ITERATOR_ITERATOR_HPP - -#include -#include - -namespace sprout { - template< - typename Category, - typename T, - typename Distance = std::ptrdiff_t, - typename Pointer = T*, - typename Reference = T& - > - struct iterator { - public: - typedef Category iterator_category; - typedef T value_type; - typedef Distance difference_type; - typedef Pointer pointer; - typedef Reference reference; - }; -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/iterator_traits.hpp b/dsp/lib/sprout/sprout/iterator/iterator_traits.hpp deleted file mode 100644 index 954321a..0000000 --- a/dsp/lib/sprout/sprout/iterator/iterator_traits.hpp +++ /dev/null @@ -1,50 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_ITERATOR_TRAITS_HPP -#define SPROUT_ITERATOR_ITERATOR_TRAITS_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // iterator_traits - // - namespace detail { - template - struct iterator_traits_impl - : public sprout::detail::nil_base - {}; - template - struct iterator_traits_impl< - Iterator, - typename sprout::head_element< - void, - typename Iterator::difference_type, - typename Iterator::value_type, - typename Iterator::pointer, - typename Iterator::reference, - typename Iterator::iterator_category - >::type - > - : public std::iterator_traits - {}; - } // namespace detail - template - struct iterator_traits - : public sprout::detail::iterator_traits_impl - {}; - template - struct iterator_traits - : public std::iterator_traits - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_ITERATOR_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/iterator/joint_iterator.hpp b/dsp/lib/sprout/sprout/iterator/joint_iterator.hpp deleted file mode 100644 index f3e0db2..0000000 --- a/dsp/lib/sprout/sprout/iterator/joint_iterator.hpp +++ /dev/null @@ -1,339 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_JOINT_ITERATOR_HPP -#define SPROUT_ITERATOR_JOINT_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // joint_iterator - // - template - class joint_iterator - : public sprout::iterator< - typename sprout::common_iterator_category::type, - typename sprout::common_iterator_value_type::type, - typename sprout::common_iterator_difference_type::type, - typename sprout::common_iterator_pointer::type, - typename sprout::common_iterator_reference::type - > - { - public: - typedef LIterator iterator_type; - typedef RIterator iterator2_type; - typedef typename sprout::common_iterator_category::type iterator_category; - typedef typename sprout::common_iterator_value_type::type value_type; - typedef typename sprout::common_iterator_difference_type::type difference_type; - typedef typename sprout::common_iterator_pointer::type pointer; - typedef typename sprout::common_iterator_reference::type reference; - protected: - iterator_type current1; - iterator_type last1; - iterator2_type first2; - iterator2_type current2; - private: - SPROUT_CONSTEXPR joint_iterator advance_impl_posite(difference_type n, difference_type d) const { - return n > d ? joint_iterator(last1, last1, first2, sprout::next(current2, n - d)) - : joint_iterator(sprout::next(current1, n), last1, first2, current2) - ; - } - SPROUT_CONSTEXPR joint_iterator advance_impl_negate(difference_type n, difference_type d) const { - return !(n > d) ? joint_iterator(sprout::next(current1, n - d), last1, first2, first2) - : joint_iterator(current1, last1, first2, sprout::next(current2, n)) - ; - } - SPROUT_CONSTEXPR joint_iterator advance_impl(difference_type n) const { - return n >= 0 - ? is_in_left() - ? advance_impl_posite(n, sprout::distance(current1, last1)) - : joint_iterator(current1, last1, first2, sprout::next(current2, n)) - : first2 == current2 - ? joint_iterator(sprout::next(current1, n), last1, first2, current2) - : advance_impl_negate(n, -sprout::distance(first2, current2)) - ; - } - public: - SPROUT_CONSTEXPR joint_iterator() - : current1(), last1(), first2(), current2() - {} - joint_iterator(joint_iterator const&) = default; - SPROUT_CONSTEXPR joint_iterator(iterator_type it1, iterator_type last1, iterator2_type first2, iterator2_type it2) - : current1(it1) , last1(last1) - , first2(first2) , current2(it2) - {} - template - SPROUT_CONSTEXPR joint_iterator(joint_iterator const& it) - : current1(it.base()) - , last1(it.left_end()) - , first2(it.right_begin()) - , current2(it.base2()) - {} - template - SPROUT_CXX14_CONSTEXPR joint_iterator& operator=(joint_iterator const& it) { - joint_iterator temp(it); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR iterator_type base() const { - return current1; - } - SPROUT_CONSTEXPR iterator_type left_end() const { - return last1; - } - SPROUT_CONSTEXPR iterator2_type right_begin() const { - return first2; - } - SPROUT_CONSTEXPR iterator2_type base2() const { - return current2; - } - SPROUT_CONSTEXPR bool is_in_left() const { - return current1 != last1; - } - SPROUT_CONSTEXPR reference operator*() const { - return is_in_left() ? *current1 : *current2; - } - SPROUT_CONSTEXPR pointer operator->() const { - return &*(*this); - } - SPROUT_CXX14_CONSTEXPR joint_iterator& operator++() { - if (is_in_left()) { - ++current1; - } else { - ++current2; - } - return *this; - } - SPROUT_CXX14_CONSTEXPR joint_iterator operator++(int) { - joint_iterator result(*this); - if (is_in_left()) { - ++current1; - } else { - ++current2; - } - return result; - } - SPROUT_CXX14_CONSTEXPR joint_iterator& operator--() { - if (first2 == current2) { - --current1; - } else { - --current2; - } - return *this; - } - SPROUT_CXX14_CONSTEXPR joint_iterator operator--(int) { - joint_iterator temp(*this); - if (first2 == current2) { - --current1; - } else { - --current2; - } - return temp; - } - SPROUT_CONSTEXPR joint_iterator operator+(difference_type n) const { - return advance_impl(n); - } - SPROUT_CONSTEXPR joint_iterator operator-(difference_type n) const { - return advance_impl(-n); - } - SPROUT_CXX14_CONSTEXPR joint_iterator& operator+=(difference_type n) { - joint_iterator temp(*this + n); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR joint_iterator& operator-=(difference_type n) { - joint_iterator temp(*this - n); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR reference operator[](difference_type n) const { - return *(*this + n); - } - SPROUT_CONSTEXPR joint_iterator next() const { - return is_in_left() ? joint_iterator(sprout::next(current1), last1, first2, current2) - : joint_iterator(current1, last1, first2, sprout::next(current2)) - ; - } - SPROUT_CONSTEXPR joint_iterator prev() const { - return first2 == current2 ? joint_iterator(sprout::prev(current1), last1, first2, current2) - : joint_iterator(current1, last1, first2, sprout::prev(current2)) - ; - } - SPROUT_CXX14_CONSTEXPR void swap(joint_iterator& other) - SPROUT_NOEXCEPT_IF( - SPROUT_NOEXCEPT_EXPR(sprout::swap(current1, other.current1)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(last1, other.last1)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(first2, other.first2)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(current2, other.current2)) - ) - { - sprout::swap(current1, other.current1); - sprout::swap(last1, other.last1); - sprout::swap(first2, other.first2); - sprout::swap(current2, other.current2); - } - }; - - template< - typename LIterator1, typename RIterator1, - typename LIterator2, typename RIterator2 - > - inline SPROUT_CONSTEXPR bool operator==( - sprout::joint_iterator const& lhs, - sprout::joint_iterator const& rhs - ) - { - return lhs.base() == rhs.base() && lhs.base2() == rhs.base2(); - } - template< - typename LIterator1, typename RIterator1, - typename LIterator2, typename RIterator2 - > - inline SPROUT_CONSTEXPR bool operator!=( - sprout::joint_iterator const& lhs, - sprout::joint_iterator const& rhs - ) - { - return !(lhs == rhs); - } - template< - typename LIterator1, typename RIterator1, - typename LIterator2, typename RIterator2 - > - inline SPROUT_CONSTEXPR bool operator<( - sprout::joint_iterator const& lhs, - sprout::joint_iterator const& rhs - ) - { - return lhs.is_in_left() && rhs.is_in_left() ? lhs.base() < rhs.base() - : !lhs.is_in_left() && !rhs.is_in_left() ? lhs.base2() < rhs.base2() - : lhs.is_in_left() - ; - } - template< - typename LIterator1, typename RIterator1, - typename LIterator2, typename RIterator2 - > - inline SPROUT_CONSTEXPR bool operator>( - sprout::joint_iterator const& lhs, - sprout::joint_iterator const& rhs - ) - { - return rhs < lhs; - } - template< - typename LIterator1, typename RIterator1, - typename LIterator2, typename RIterator2 - > - inline SPROUT_CONSTEXPR bool operator<=( - sprout::joint_iterator const& lhs, - sprout::joint_iterator const& rhs - ) - { - return !(rhs < lhs); - } - template< - typename LIterator1, typename RIterator1, - typename LIterator2, typename RIterator2 - > - inline SPROUT_CONSTEXPR bool operator>=( - sprout::joint_iterator const& lhs, - sprout::joint_iterator const& rhs - ) - { - return !(lhs < rhs); - } - template< - typename LIterator1, typename RIterator1, - typename LIterator2, typename RIterator2 - > - inline SPROUT_CONSTEXPR typename sprout::arithmetic_promote< - typename sprout::joint_iterator::difference_type, - typename sprout::joint_iterator::difference_type - >::type - operator-( - sprout::joint_iterator const& lhs, - sprout::joint_iterator const& rhs - ) - { - return lhs.is_in_left() && rhs.is_in_left() ? lhs.base() - rhs.base() - : !lhs.is_in_left() && !rhs.is_in_left() ? lhs.base2() - rhs.base2() - : lhs.is_in_left() ? sprout::limited::plus(lhs.left_end() - lhs.base(), rhs.base2() - rhs.right_begin()) - : sprout::limited::plus(lhs.base2() - lhs.right_begin(), rhs.left_end() - rhs.base()) - ; - } - template - inline SPROUT_CONSTEXPR sprout::joint_iterator operator+( - typename sprout::joint_iterator::difference_type n, - sprout::joint_iterator const& it - ) - { - return it + n; - } - - // - // make_joint_iterator - // - template - inline SPROUT_CONSTEXPR sprout::joint_iterator - make_joint_iterator(LIterator it1, LIterator last1, RIterator first2, RIterator it2) { - return sprout::joint_iterator(it1, last1, first2, it2); - } - template - inline SPROUT_CONSTEXPR sprout::joint_iterator - make_joint_iterator(LIterator it1, LIterator last1, RIterator first2) { - return sprout::joint_iterator(it1, last1, first2, first2); - } - template - inline SPROUT_CONSTEXPR sprout::joint_iterator - make_joint_iterator(LIterator last1, RIterator first2, RIterator it2) { - return sprout::joint_iterator(last1, last1, first2, it2); - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap( - sprout::joint_iterator& lhs, - sprout::joint_iterator& rhs - ) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::joint_iterator - iterator_next(sprout::joint_iterator const& it) { - return it.next(); - } - - // - // iterator_prev - // - template - inline SPROUT_CONSTEXPR sprout::joint_iterator - iterator_prev(sprout::joint_iterator const& it) { - return it.prev(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_JOINT_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/merge_iterator.hpp b/dsp/lib/sprout/sprout/iterator/merge_iterator.hpp deleted file mode 100644 index d0dd747..0000000 --- a/dsp/lib/sprout/sprout/iterator/merge_iterator.hpp +++ /dev/null @@ -1,250 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_MERGE_ITERATOR_HPP -#define SPROUT_ITERATOR_MERGE_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // merge_iterator - // - template< - typename LIterator, typename RIterator, - typename Compare = sprout::less<> - > - class merge_iterator - : public sprout::iterator< - typename sprout::min_iterator_category< - typename sprout::common_iterator_category::type, - std::forward_iterator_tag - >::type, - typename sprout::common_iterator_value_type::type, - typename sprout::common_iterator_difference_type::type, - typename sprout::common_iterator_pointer::type, - typename sprout::common_iterator_reference::type - > - { - public: - typedef LIterator iterator_type; - typedef RIterator iterator2_type; - typedef Compare compare_type; - typedef typename sprout::min_iterator_category< - typename sprout::common_iterator_category::type, - std::forward_iterator_tag - >::type iterator_category; - typedef typename sprout::common_iterator_value_type::type value_type; - typedef typename sprout::common_iterator_difference_type::type difference_type; - typedef typename sprout::common_iterator_pointer::type pointer; - typedef typename sprout::common_iterator_reference::type reference; - private: - static SPROUT_CONSTEXPR bool check_in_left( - iterator_type it1, iterator_type las1, - iterator2_type it2, iterator2_type las2, - Compare comp - ) - { - return it1 != las1 ? (it2 != las2 ? !comp(*it2, *it1) : true) - : !(it2 != las2) - ; - } - protected: - iterator_type current1; - iterator_type las1; - iterator2_type current2; - iterator2_type las2; - Compare comp; - bool in_left; - public: - SPROUT_CONSTEXPR merge_iterator() - : current1(), las1(), current2(), las2(), comp(), in_left(true) - {} - merge_iterator(merge_iterator const&) = default; - SPROUT_CONSTEXPR merge_iterator( - iterator_type it1, iterator_type las1, - iterator2_type it2, iterator2_type las2, - Compare comp = Compare() - ) - : current1(it1), las1(las1) - , current2(it2), las2(las2) - , comp(comp) - , in_left(check_in_left(it1, las1, it2, las2, comp)) - {} - template - SPROUT_CONSTEXPR merge_iterator(merge_iterator const& it) - : current1(it.base()), las1(it.last1()) - , current2(it.base2()), las2(it.last2()) - , comp(it.compare()) - , in_left(it.is_in_left()) - {} - template - SPROUT_CXX14_CONSTEXPR merge_iterator& operator=(merge_iterator const& it) { - merge_iterator temp(it); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR iterator_type base() const { - return current1; - } - SPROUT_CONSTEXPR iterator_type last1() const { - return las1; - } - SPROUT_CONSTEXPR iterator2_type base2() const { - return current2; - } - SPROUT_CONSTEXPR iterator2_type last2() const { - return las2; - } - SPROUT_CONSTEXPR Compare compare() const { - return comp; - } - SPROUT_CONSTEXPR bool is_in_left() const { - return in_left; - } - SPROUT_CONSTEXPR reference operator*() const { - return is_in_left() ? *current1 : *current2; - } - SPROUT_CONSTEXPR pointer operator->() const { - return &*(*this); - } - SPROUT_CXX14_CONSTEXPR merge_iterator& operator++() { - if (current1 != las1) { - if (current2 != las2) { - if (comp(*current2, *current1)) { - ++current2; - } else { - ++current1; - } - } else { - ++current1; - } - } else if (current2 != las2) { - ++current2; - } - in_left = check_in_left(current1, las1, current2, las2, comp); - return *this; - } - SPROUT_CXX14_CONSTEXPR merge_iterator operator++(int) { - merge_iterator result(*this); - if (current1 != las1) { - if (current2 != las2) { - if (comp(*current2, *current1)) { - ++current2; - } else { - ++current1; - } - } else { - ++current1; - } - } else if (current2 != las2) { - ++current2; - } - in_left = check_in_left(current1, las1, current2, las2, comp); - return result; - } - SPROUT_CONSTEXPR merge_iterator next() const { - return current1 != las1 - ? current2 != las2 - ? comp(*current2, *current1) - ? merge_iterator(current1, las1, sprout::next(current2), las2, comp) - : merge_iterator(sprout::next(current1), las1, current2, las2, comp) - : merge_iterator(sprout::next(current1), las1, current2, las2, comp) - : current2 != las2 - ? merge_iterator(current1, las1, sprout::next(current2), las2, comp) - : *this - ; - } - SPROUT_CXX14_CONSTEXPR void swap(merge_iterator& other) - SPROUT_NOEXCEPT_IF( - SPROUT_NOEXCEPT_EXPR(sprout::swap(current1, other.current1)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(las1, other.las1)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(current2, other.current2)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(las2, other.las2)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(comp, other.comp)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(in_left, other.in_left)) - ) - { - sprout::swap(current1, other.current1); - sprout::swap(las1, other.las1); - sprout::swap(current2, other.current2); - sprout::swap(las2, other.las2); - sprout::swap(comp, other.comp); - sprout::swap(in_left, other.in_left); - } - }; - - template< - typename LIterator1, typename RIterator1, typename Compare1, - typename LIterator2, typename RIterator2, typename Compare2 - > - inline SPROUT_CONSTEXPR bool operator==( - sprout::merge_iterator const& lhs, - sprout::merge_iterator const& rhs - ) - { - return lhs.base() == rhs.base() && lhs.base2() == rhs.base2(); - } - template< - typename LIterator1, typename RIterator1, typename Compare1, - typename LIterator2, typename RIterator2, typename Compare2 - > - inline SPROUT_CONSTEXPR bool operator!=( - sprout::merge_iterator const& lhs, - sprout::merge_iterator const& rhs - ) - { - return !(lhs == rhs); - } - - // - // make_merge_iterator - // - template - inline SPROUT_CONSTEXPR sprout::merge_iterator - make_merge_iterator(LIterator it1, LIterator las1, RIterator it2, RIterator las2, Compare comp) { - return sprout::merge_iterator(it1, las1, it2, las2, comp); - } - template - inline SPROUT_CONSTEXPR sprout::merge_iterator - make_merge_iterator(LIterator it1, LIterator las1, RIterator it2, RIterator las2) { - return sprout::merge_iterator(it1, las1, it2, las2); - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap( - sprout::merge_iterator& lhs, - sprout::merge_iterator& rhs - ) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::merge_iterator - iterator_next(sprout::merge_iterator const& it) { - return it.next(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_MERGE_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/move_iterator.hpp b/dsp/lib/sprout/sprout/iterator/move_iterator.hpp deleted file mode 100644 index 094b168..0000000 --- a/dsp/lib/sprout/sprout/iterator/move_iterator.hpp +++ /dev/null @@ -1,237 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_MOVE_ITERATOR_HPP -#define SPROUT_ITERATOR_MOVE_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // move_iterator - // - template - class move_iterator - : public sprout::detail::iterator_base< - Iterator, - sprout::use_default, - sprout::use_default, - sprout::use_default, - Iterator, - typename iterator_traits::value_type&& - >::type - { - private: - typedef typename sprout::detail::iterator_base< - Iterator, - sprout::use_default, - sprout::use_default, - sprout::use_default, - Iterator, - typename iterator_traits::value_type&& - >::type base_type; - public: - typedef Iterator iterator_type; - typedef typename base_type::iterator_category iterator_category; - typedef typename base_type::value_type value_type; - typedef typename base_type::difference_type difference_type; - typedef typename base_type::pointer pointer; - typedef typename base_type::reference reference; - protected: - iterator_type current; - public: - SPROUT_CONSTEXPR move_iterator() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - SPROUT_CONSTEXPR move_iterator(move_iterator const& other) - : current(other.current) - {} - explicit SPROUT_CONSTEXPR move_iterator(iterator_type it) - : current(it) - {} - template - SPROUT_CONSTEXPR move_iterator(move_iterator const& it) - : current(it.base()) - {} - template - SPROUT_CXX14_CONSTEXPR move_iterator& operator=(move_iterator const& it) { - move_iterator temp(it); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR iterator_type base() const { - return current; - } - SPROUT_CONSTEXPR reference operator*() const { - return sprout::move(*current); - } - SPROUT_CONSTEXPR pointer operator->() const { - return current; - } - SPROUT_CXX14_CONSTEXPR move_iterator& operator++() { - ++current; - return *this; - } - SPROUT_CXX14_CONSTEXPR move_iterator operator++(int) { - move_iterator result(*this); - ++current; - return result; - } - SPROUT_CXX14_CONSTEXPR move_iterator& operator--() { - --current; - return *this; - } - SPROUT_CXX14_CONSTEXPR move_iterator operator--(int) { - move_iterator temp(*this); - --current; - return temp; - } - SPROUT_CONSTEXPR move_iterator operator+(difference_type n) const { - return move_iterator(current + n); - } - SPROUT_CONSTEXPR move_iterator operator-(difference_type n) const { - return move_iterator(current - n); - } - SPROUT_CXX14_CONSTEXPR move_iterator& operator+=(difference_type n) { - move_iterator temp(current + n); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR move_iterator& operator-=(difference_type n) { - move_iterator temp(current - n); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR reference operator[](difference_type n) const { - return sprout::move(current[n]); - } - SPROUT_CONSTEXPR move_iterator next() const { - return move_iterator(sprout::next(current)); - } - SPROUT_CONSTEXPR move_iterator prev() const { - return move_iterator(sprout::prev(current)); - } - SPROUT_CXX14_CONSTEXPR void swap(move_iterator& other) - SPROUT_NOEXCEPT_IF( - SPROUT_NOEXCEPT_EXPR(swap(current, other.current)) - ) - { - swap(current, other.current); - } - }; - - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::move_iterator const& lhs, sprout::move_iterator const& rhs) { - return lhs.base() == rhs.base(); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::move_iterator const& lhs, sprout::move_iterator const& rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator<(sprout::move_iterator const& lhs, sprout::move_iterator const& rhs) { - return lhs.base() < rhs.base(); - } - template - inline SPROUT_CONSTEXPR bool - operator>(sprout::move_iterator const& lhs, sprout::move_iterator const& rhs) { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator<=(sprout::move_iterator const& lhs, sprout::move_iterator const& rhs) { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(sprout::move_iterator const& lhs, sprout::move_iterator const& rhs) { - return !(lhs < rhs); - } - template - inline SPROUT_CONSTEXPR decltype(std::declval() - std::declval()) - operator-(sprout::move_iterator const& lhs, sprout::move_iterator const& rhs) { - return lhs.base() - rhs.base(); - } - template - inline SPROUT_CONSTEXPR sprout::move_iterator - operator+( - typename sprout::move_iterator::difference_type n, - sprout::move_iterator const& it - ) - { - return it + n; - } - - // - // make_move_iterator - // - template - inline SPROUT_CONSTEXPR sprout::move_iterator - make_move_iterator(Iterator it) { - return sprout::move_iterator(it); - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::move_iterator& lhs, sprout::move_iterator& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::move_iterator - iterator_next(sprout::move_iterator const& it) { - return it.next(); - } - - // - // iterator_prev - // - template - inline SPROUT_CONSTEXPR sprout::move_iterator - iterator_prev(sprout::move_iterator const& it) { - return it.prev(); - } - - // - // is_const_iterator_cast_convertible - // - template - struct is_const_iterator_cast_convertible, sprout::move_iterator > - : public sprout::is_const_iterator_cast_convertible - {}; - // - // const_iterator_conversion - // - template< - typename T, - typename Iterator, - typename sprout::enabler_if, T>::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR T - const_iterator_conversion(sprout::move_iterator const& it) { - return T(sprout::const_iterator_cast(it.base())); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_MOVE_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/next.hpp b/dsp/lib/sprout/sprout/iterator/next.hpp deleted file mode 100644 index 85743b0..0000000 --- a/dsp/lib/sprout/sprout/iterator/next.hpp +++ /dev/null @@ -1,189 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_NEXT_HPP -#define SPROUT_ITERATOR_NEXT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout_adl { - sprout::not_found_via_adl iterator_next(...); -} // namespace sprout_adl - -namespace sprout { - namespace iterator_detail { - template - inline SPROUT_CXX14_CONSTEXPR InputIterator - cxx14_next(InputIterator it, typename std::iterator_traits::difference_type n = 1) { - sprout::advance(it, n); - return it; - } - - template - inline SPROUT_CONSTEXPR RandomAccessIterator - next_impl(RandomAccessIterator const& it, std::random_access_iterator_tag*) { - return it + 1; - } - template - inline SPROUT_CONSTEXPR InputIterator - next_impl(InputIterator const& it, std::input_iterator_tag*) { - return sprout::iterator_detail::cxx14_next(it); - } - - template - inline SPROUT_CONSTEXPR RandomAccessIterator - next_impl( - RandomAccessIterator const& it, typename std::iterator_traits::difference_type n, - std::random_access_iterator_tag* - ) - { - return it + n; - } - - template - inline SPROUT_CONSTEXPR BidirectionalIterator - next_impl_2_neg(BidirectionalIterator const& it, typename std::iterator_traits::difference_type n) { - return n == -1 ? sprout::prev(it) - : sprout::iterator_detail::next_impl_2_neg( - sprout::iterator_detail::next_impl_2_neg(it, n / 2), - n - (n / 2) - ) - ; - } - template - inline SPROUT_CONSTEXPR InputIterator - next_impl_2(InputIterator const& it, typename std::iterator_traits::difference_type n) { - return n == 1 ? sprout::next(it) - : sprout::iterator_detail::next_impl_2( - sprout::iterator_detail::next_impl_2(it, n / 2), - n - (n / 2) - ) - ; - } - - template - inline SPROUT_CONSTEXPR BidirectionalIterator - next_impl_1( - BidirectionalIterator const& it, typename std::iterator_traits::difference_type n, - std::bidirectional_iterator_tag* - ) - { - return n == 0 ? it - : n > 0 ? sprout::iterator_detail::next_impl_2(it, n) - : sprout::iterator_detail::next_impl_2_neg(it, n) - ; - } - template - inline SPROUT_CONSTEXPR InputIterator - next_impl_1( - InputIterator const& it, typename std::iterator_traits::difference_type n, - std::input_iterator_tag* - ) - { - return SPROUT_ASSERT(sprout::math::greater_equal(n, 0)), - n == 0 ? it - : sprout::iterator_detail::next_impl_2(it, n) - ; - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_literal_type::value, - InputIterator - >::type - next_impl( - InputIterator const& it, typename std::iterator_traits::difference_type n, - std::input_iterator_tag* - ) - { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::iterator_detail::next_impl_1(it, n, category()); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_literal_type::value, - InputIterator - >::type - next_impl( - InputIterator const& it, typename std::iterator_traits::difference_type n, - std::input_iterator_tag* - ) - { - return sprout::iterator_detail::cxx14_next(it, n); - } - - template - inline SPROUT_CONSTEXPR InputIterator - iterator_next(InputIterator const& it) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::iterator_detail::next_impl(it, category()); - } - template - inline SPROUT_CONSTEXPR InputIterator - iterator_next(InputIterator const& it, typename std::iterator_traits::difference_type n) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::iterator_detail::next_impl(it, n, category()); - } - } // namespace iterator_detail -} // namespace sprout - -namespace sprout_iterator_detail { - template - inline SPROUT_CONSTEXPR InputIterator - next(InputIterator const& it) { - using sprout::iterator_detail::iterator_next; - using sprout_adl::iterator_next; - return iterator_next(it); - } - template - inline SPROUT_CONSTEXPR InputIterator - next(InputIterator const& it, typename std::iterator_traits::difference_type n) { - using sprout::iterator_detail::iterator_next; - using sprout_adl::iterator_next; - return iterator_next(it, n); - } -} // namespace sprout_iterator_detail - -namespace sprout { - // - // next - // - // effect: - // ADL callable iterator_next(it) -> iterator_next(it) - // otherwise, InputIterator is RandomAccessIterator -> it + 1 - // otherwise -> cxx14_next(it) - // - template - inline SPROUT_CONSTEXPR InputIterator - next(InputIterator const& it) { - return sprout_iterator_detail::next(it); - } - // - // effect: - // ADL callable iterator_next(it, n) -> iterator_next(it, n) - // it is RandomAccessIterator -> it + n - // it is LiteralType && n >= 0 -> sprout::next(it)... - // it is LiteralType && n < 0 -> sprout::prev(it)... - // otherwise -> cxx14_next(it, n) - // - template - inline SPROUT_CONSTEXPR InputIterator - next(InputIterator const& it, typename std::iterator_traits::difference_type n) { - return sprout_iterator_detail::next(it, n); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_NEXT_HPP diff --git a/dsp/lib/sprout/sprout/iterator/next_fwd.hpp b/dsp/lib/sprout/sprout/iterator/next_fwd.hpp deleted file mode 100644 index bfb1ce1..0000000 --- a/dsp/lib/sprout/sprout/iterator/next_fwd.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_NEXT_FWD_HPP -#define SPROUT_ITERATOR_NEXT_FWD_HPP - -#include -#include - -namespace sprout { - // - // next - // - template - inline SPROUT_CONSTEXPR ForwardIterator - next(ForwardIterator const& it); - - template - inline SPROUT_CONSTEXPR ForwardIterator - next(ForwardIterator const& it, typename std::iterator_traits::difference_type n); -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_NEXT_FWD_HPP diff --git a/dsp/lib/sprout/sprout/iterator/next_iterator.hpp b/dsp/lib/sprout/sprout/iterator/next_iterator.hpp deleted file mode 100644 index dca6420..0000000 --- a/dsp/lib/sprout/sprout/iterator/next_iterator.hpp +++ /dev/null @@ -1,143 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_NEXT_ITERATOR_HPP -#define SPROUT_ITERATOR_NEXT_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // next_iterator - // - template - struct next_iterator - : public sprout::detail::iterator_base< - Iterator, - std::forward_iterator_tag - >::type - { - private: - typedef typename sprout::detail::iterator_base< - Iterator, - std::forward_iterator_tag - >::type base_type; - public: - typedef Iterator iterator_type; - typedef typename base_type::iterator_category iterator_category; - typedef typename base_type::value_type value_type; - typedef typename base_type::difference_type difference_type; - typedef typename base_type::pointer pointer; - typedef typename base_type::reference reference; - private: - typedef sprout::value_holder holder_type; - private: - holder_type holder_; - protected: - iterator_type current; - public: - SPROUT_CONSTEXPR next_iterator() - : holder_(), current() - {} - SPROUT_CONSTEXPR next_iterator(next_iterator const& other) - : holder_(other.holder_), current(other.current) - {} - SPROUT_CONSTEXPR next_iterator(iterator_type it) - : holder_(*it), current(sprout::next(it)) - {} - template - SPROUT_CONSTEXPR next_iterator(next_iterator const& it) - : holder_(*it), current(it.base()) - {} - template - SPROUT_CXX14_CONSTEXPR next_iterator& operator=(next_iterator const& it) { - next_iterator temp(it); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR iterator_type base() const { - return current; - } - SPROUT_CONSTEXPR reference operator*() const { - return *holder_; - } - SPROUT_CONSTEXPR pointer operator->() const { - return &*(*this); - } - SPROUT_CXX14_CONSTEXPR next_iterator& operator++() { - holder_ = holder_type(*current); - ++current; - return *this; - } - SPROUT_CXX14_CONSTEXPR next_iterator operator++(int) { - next_iterator result(*this); - holder_ = holder_type(*current); - ++current; - return result; - } - SPROUT_CONSTEXPR next_iterator next() const { - return next_iterator(current); - } - SPROUT_CXX14_CONSTEXPR void swap(next_iterator& other) - SPROUT_NOEXCEPT_IF( - SPROUT_NOEXCEPT_EXPR(swap(holder_, other.holder_)) - && SPROUT_NOEXCEPT_EXPR(swap(current, other.current)) - ) - { - swap(holder_, other.holder_); - swap(current, other.current); - } - }; - - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::next_iterator const& lhs, sprout::next_iterator const& rhs) { - return lhs.base() == rhs.base(); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::next_iterator const& lhs, sprout::next_iterator const& rhs) { - return !(lhs == rhs); - } - - // - // make_next_iterator - // - template - inline SPROUT_CONSTEXPR sprout::next_iterator - make_next_iterator(Iterator it) { - return sprout::next_iterator(it); - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::next_iterator& lhs, sprout::next_iterator& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::next_iterator - iterator_next(sprout::next_iterator const& it) { - return it.next(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_NEXT_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/operation.hpp b/dsp/lib/sprout/sprout/iterator/operation.hpp deleted file mode 100644 index a8d27fa..0000000 --- a/dsp/lib/sprout/sprout/iterator/operation.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_OPERATION_HPP -#define SPROUT_ITERATOR_OPERATION_HPP - -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ITERATOR_OPERATION_HPP diff --git a/dsp/lib/sprout/sprout/iterator/phase_spectrum_iterator.hpp b/dsp/lib/sprout/sprout/iterator/phase_spectrum_iterator.hpp deleted file mode 100644 index 30a0c82..0000000 --- a/dsp/lib/sprout/sprout/iterator/phase_spectrum_iterator.hpp +++ /dev/null @@ -1,53 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_PHASE_SPECTRUM_ITERATOR_HPP -#define SPROUT_ITERATOR_PHASE_SPECTRUM_ITERATOR_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // phase_value - // - template - class phase_value { - public: - typedef typename T::value_type result_type; - typedef T argument_type; - public: - SPROUT_CONSTEXPR typename T::value_type - operator()(T const& value) const { - return sprout::phase_spectrum_value(value); - } - }; - template<> - class phase_value { - public: - template - SPROUT_CONSTEXPR typename T::value_type - operator()(T const& value) const { - return sprout::phase_spectrum_value(value); - } - }; - - // - // make_phase_spectrum_iterator - // - template - inline SPROUT_CONSTEXPR sprout::transform_iterator::value_type>, Iterator> - make_phase_spectrum_iterator(Iterator it) { - return sprout::transform_iterator::value_type>, Iterator>( - it, sprout::phase_value::value_type>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_PHASE_SPECTRUM_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/predefined.hpp b/dsp/lib/sprout/sprout/iterator/predefined.hpp deleted file mode 100644 index 568ef8c..0000000 --- a/dsp/lib/sprout/sprout/iterator/predefined.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_PREDEFINED_HPP -#define SPROUT_ITERATOR_PREDEFINED_HPP - -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ITERATOR_PREDEFINED_HPP diff --git a/dsp/lib/sprout/sprout/iterator/prev.hpp b/dsp/lib/sprout/sprout/iterator/prev.hpp deleted file mode 100644 index 780441f..0000000 --- a/dsp/lib/sprout/sprout/iterator/prev.hpp +++ /dev/null @@ -1,164 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_PREV_HPP -#define SPROUT_ITERATOR_PREV_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout_adl { - sprout::not_found_via_adl iterator_prev(...); -} // namespace sprout_adl - -namespace sprout { - namespace iterator_detail { - template - inline SPROUT_CXX14_CONSTEXPR InputIterator - cxx14_prev(InputIterator it, typename std::iterator_traits::difference_type n = 1) { - sprout::advance(it, -n); - return it; - } - - template - inline SPROUT_CONSTEXPR RandomAccessIterator - prev_impl(RandomAccessIterator const& it, std::random_access_iterator_tag*) { - return it - 1; - } - template - inline SPROUT_CONSTEXPR BidirectionalIterator - prev_impl(BidirectionalIterator const& it, std::bidirectional_iterator_tag*) { - return sprout::iterator_detail::cxx14_prev(it); - } - - template - inline SPROUT_CONSTEXPR RandomAccessIterator - prev_impl( - RandomAccessIterator const& it, typename std::iterator_traits::difference_type n, - std::random_access_iterator_tag* - ) - { - return it - n; - } - - template - inline SPROUT_CONSTEXPR BidirectionalIterator - prev_impl_1_neg(BidirectionalIterator const& it, typename std::iterator_traits::difference_type n) { - return n == -1 ? sprout::next(it) - : sprout::iterator_detail::prev_impl_1_neg( - sprout::iterator_detail::prev_impl_1_neg(it, n / 2), - n - (n / 2) - ) - ; - } - template - inline SPROUT_CONSTEXPR BidirectionalIterator - prev_impl_1(BidirectionalIterator const& it, typename std::iterator_traits::difference_type n) { - return n == 1 ? sprout::prev(it) - : sprout::iterator_detail::prev_impl_1( - sprout::iterator_detail::prev_impl_1(it, n / 2), - n - (n / 2) - ) - ; - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_literal_type::value, - BidirectionalIterator - >::type - prev_impl( - BidirectionalIterator const& it, typename std::iterator_traits::difference_type n, - std::bidirectional_iterator_tag* - ) - { - return n == 0 ? it - : n > 0 ? sprout::iterator_detail::prev_impl_1(it, n) - : sprout::iterator_detail::prev_impl_1_neg(it, n) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_literal_type::value, - BidirectionalIterator - >::type - prev_impl( - BidirectionalIterator const& it, typename std::iterator_traits::difference_type n, - std::bidirectional_iterator_tag* - ) - { - return sprout::iterator_detail::cxx14_prev(it, n); - } - - template - inline SPROUT_CONSTEXPR BidirectionalIterator - iterator_prev(BidirectionalIterator const& it) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::iterator_detail::prev_impl(it, category()); - } - template - inline SPROUT_CONSTEXPR BidirectionalIterator - iterator_prev(BidirectionalIterator const& it, typename std::iterator_traits::difference_type n) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::iterator_detail::prev_impl(it, n, category()); - } - } // namespace iterator_detail -} // namespace sprout - -namespace sprout_iterator_detail { - template - inline SPROUT_CONSTEXPR BidirectionalIterator - prev(BidirectionalIterator const& it) { - using sprout::iterator_detail::iterator_prev; - using sprout_adl::iterator_prev; - return iterator_prev(it); - } - template - inline SPROUT_CONSTEXPR BidirectionalIterator - prev(BidirectionalIterator const& it, typename std::iterator_traits::difference_type n) { - using sprout::iterator_detail::iterator_prev; - using sprout_adl::iterator_prev; - return iterator_prev(it, n); - } -} // namespace sprout_iterator_detail - -namespace sprout { - // - // prev - // - // effect: - // ADL callable iterator_prev(it) -> iterator_prev(it) - // otherwise, BidirectionalIterator is RandomAccessIterator -> it - 1 - // otherwise -> cxx14_prev(it) - // - template - inline SPROUT_CONSTEXPR BidirectionalIterator - prev(BidirectionalIterator const& it) { - return sprout_iterator_detail::prev(it); - } - // - // effect: - // ADL callable iterator_prev(it, n) -> iterator_prev(it, n) - // it is RandomAccessIterator -> it - n - // it is LiteralType && n >= 0 -> sprout::prev(it)... - // it is LiteralType && n < 0 -> sprout::next(it)... - // otherwise -> cxx14_prev(it, n) - // - template - inline SPROUT_CONSTEXPR BidirectionalIterator - prev(BidirectionalIterator const& it, typename std::iterator_traits::difference_type n) { - return sprout_iterator_detail::prev(it, n); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_PREV_HPP diff --git a/dsp/lib/sprout/sprout/iterator/prev_fwd.hpp b/dsp/lib/sprout/sprout/iterator/prev_fwd.hpp deleted file mode 100644 index 4b1eec8..0000000 --- a/dsp/lib/sprout/sprout/iterator/prev_fwd.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_PREV_FWD_HPP -#define SPROUT_ITERATOR_PREV_FWD_HPP - -#include -#include - -namespace sprout { - // - // prev - // - template - inline SPROUT_CONSTEXPR BidirectionalIterator - prev(BidirectionalIterator const& it); - - template - inline SPROUT_CONSTEXPR BidirectionalIterator - prev(BidirectionalIterator const& it, typename std::iterator_traits::difference_type n); -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_PREV_FWD_HPP diff --git a/dsp/lib/sprout/sprout/iterator/ptr_index_iterator.hpp b/dsp/lib/sprout/sprout/iterator/ptr_index_iterator.hpp deleted file mode 100644 index 673a86a..0000000 --- a/dsp/lib/sprout/sprout/iterator/ptr_index_iterator.hpp +++ /dev/null @@ -1,299 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_PTR_INDEX_ITERATOR_HPP -#define SPROUT_ITERATOR_PTR_INDEX_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // ptr_index_iterator - // - template - class ptr_index_iterator - : public sprout::detail::iterator_base::type - , public sprout::detail::iterator_to_pointer_base< - sprout::ptr_index_iterator, - typename std::iterator_traits::pointer, - ConvertibleToPointer - > - { - private: - typedef typename sprout::detail::iterator_base::type base_type; - public: - typedef T type; - typedef typename base_type::iterator_category iterator_category; - typedef typename base_type::value_type value_type; - typedef typename base_type::difference_type difference_type; - typedef typename base_type::pointer pointer; - typedef typename base_type::reference reference; - typedef typename std::remove_pointer::type const* const_pointer; - private: - pointer p_; - difference_type index_; - public: - SPROUT_CONSTEXPR ptr_index_iterator() - : p_(), index_() - {} - ptr_index_iterator(ptr_index_iterator const&) = default; - explicit SPROUT_CONSTEXPR ptr_index_iterator(pointer p) - : p_(p), index_(0) - {} - SPROUT_CONSTEXPR ptr_index_iterator(pointer p, difference_type index) - : p_(p), index_(index) - {} - SPROUT_CONSTEXPR operator ptr_index_iterator() const { - return ptr_index_iterator(p_, index_); - } - SPROUT_CONSTEXPR pointer base() const { - return p_; - } - SPROUT_CONSTEXPR difference_type index() const { - return index_; - } - SPROUT_CONSTEXPR pointer ptr() const { - return p_ + index_; - } - SPROUT_CONSTEXPR ptr_index_iterator next() const { - return ptr_index_iterator(p_, index_ + 1); - } - SPROUT_CONSTEXPR ptr_index_iterator prev() const { - return ptr_index_iterator(p_, index_ - 1); - } - SPROUT_CXX14_CONSTEXPR void swap(ptr_index_iterator& other) - SPROUT_NOEXCEPT - { - sprout::swap(p_, other.p_); - sprout::swap(index_, other.index_); - } - SPROUT_CONSTEXPR reference operator*() const { - return p_[index_]; - } - SPROUT_CONSTEXPR pointer operator->() const { - return p_ + index_; - } - SPROUT_CXX14_CONSTEXPR ptr_index_iterator& operator++() { - ptr_index_iterator temp(next()); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR ptr_index_iterator operator++(int) { - ptr_index_iterator result(*this); - ++*this; - return result; - } - SPROUT_CXX14_CONSTEXPR ptr_index_iterator& operator--() { - ptr_index_iterator temp(prev()); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR ptr_index_iterator operator--(int) { - ptr_index_iterator result(*this); - --*this; - return result; - } - SPROUT_CONSTEXPR ptr_index_iterator operator+(difference_type n) const { - return ptr_index_iterator(p_, index_ + n); - } - SPROUT_CONSTEXPR ptr_index_iterator operator-(difference_type n) const { - return ptr_index_iterator(p_, index_ - n); - } - SPROUT_CXX14_CONSTEXPR ptr_index_iterator& operator+=(difference_type n) { - ptr_index_iterator temp(p_, index_ + n); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR ptr_index_iterator& operator-=(difference_type n) { - ptr_index_iterator temp(p_, index_ - n); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR reference operator[](difference_type n) const { - return p_[index_ + n]; - } - }; - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_same::type, typename std::decay::type>::value, - bool - >::type - operator==(sprout::ptr_index_iterator const& lhs, sprout::ptr_index_iterator const& rhs) { - return lhs.index() == rhs.index(); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_same::type, typename std::decay::type>::value, - bool - >::type - operator!=(sprout::ptr_index_iterator const& lhs, sprout::ptr_index_iterator const& rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_same::type, typename std::decay::type>::value, - bool - >::type - operator<(sprout::ptr_index_iterator const& lhs, sprout::ptr_index_iterator const& rhs) { - return lhs.index() < rhs.index(); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_same::type, typename std::decay::type>::value, - bool - >::type - operator>(sprout::ptr_index_iterator const& lhs, sprout::ptr_index_iterator const& rhs) { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_same::type, typename std::decay::type>::value, - bool - >::type - operator<=(sprout::ptr_index_iterator const& lhs, sprout::ptr_index_iterator const& rhs) { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_same::type, typename std::decay::type>::value, - bool - >::type - operator>=(sprout::ptr_index_iterator const& lhs, sprout::ptr_index_iterator const& rhs) { - return !(lhs < rhs); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - std::is_same::type, typename std::decay::type>::value, - decltype( - std::declval >::difference_type>() - - std::declval >::difference_type>() - ) - >::type - operator-(sprout::ptr_index_iterator const& lhs, sprout::ptr_index_iterator const& rhs) { - return lhs.index() - rhs.index(); - } - template - inline SPROUT_CONSTEXPR sprout::ptr_index_iterator - operator+(typename sprout::ptr_index_iterator::difference_type n, sprout::ptr_index_iterator const& it) { - return it + n; - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::ptr_index_iterator& lhs, sprout::ptr_index_iterator& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // make_ptr_index_iterator - // - template - inline SPROUT_CONSTEXPR sprout::ptr_index_iterator - make_ptr_index_iterator(T* p) { - return sprout::ptr_index_iterator(p); - } - template - inline SPROUT_CONSTEXPR sprout::ptr_index_iterator - make_ptr_index_iterator(T* p, typename sprout::ptr_index_iterator::difference_type index) { - return sprout::ptr_index_iterator(p, index); - } - - // - // ptr_index - // - template - inline SPROUT_CONSTEXPR sprout::ptr_index_iterator - ptr_index(T* p) { - return sprout::make_ptr_index_iterator(p); - } - template - inline SPROUT_CONSTEXPR sprout::ptr_index_iterator - ptr_index(T* p, typename std::iterator_traits::difference_type n) { - return sprout::make_ptr_index_iterator(p, n); - } - - template - inline SPROUT_CONSTEXPR Iterator - ptr_index(Iterator const& it) { - return it; - } - template - inline SPROUT_CONSTEXPR Iterator - ptr_index(Iterator const& it, typename std::iterator_traits::difference_type n) { - return sprout::next(it, n); - } - - // - // ptr_unindex - // - template - inline SPROUT_CONSTEXPR typename sprout::ptr_index_iterator::pointer - ptr_unindex(sprout::ptr_index_iterator const& it) { - return it.ptr(); - } - template - inline SPROUT_CONSTEXPR Iterator - ptr_unindex(Iterator const& it) { - return it; - } - - // - // is_ptr_index_iterator - // - template - struct is_ptr_index_iterator - : public sprout::false_type - {}; - template - struct is_ptr_index_iterator - : public sprout::is_ptr_index_iterator - {}; - template - struct is_ptr_index_iterator - : public sprout::is_ptr_index_iterator - {}; - template - struct is_ptr_index_iterator > - : public sprout::true_type - {}; - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::ptr_index_iterator - iterator_next(sprout::ptr_index_iterator const& it) { - return it.next(); - } - - // - // iterator_prev - // - template - inline SPROUT_CONSTEXPR sprout::ptr_index_iterator - iterator_prev(sprout::ptr_index_iterator const& it) { - return it.prev(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_PTR_INDEX_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/remake_iterator.hpp b/dsp/lib/sprout/sprout/iterator/remake_iterator.hpp deleted file mode 100644 index 2861bb1..0000000 --- a/dsp/lib/sprout/sprout/iterator/remake_iterator.hpp +++ /dev/null @@ -1,354 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_REMAKE_ITERATOR_HPP -#define SPROUT_ITERATOR_REMAKE_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - // - // remake_iterator - // - template - class remake_iterator - : public sprout::iterator< - typename sprout::common_iterator_category::type, - typename sprout::common_iterator_value_type::type, - typename sprout::common_iterator_difference_type::type, - typename sprout::common_iterator_pointer::type, - typename sprout::common_iterator_reference::type - > - { - public: - typedef DstIterator iterator_type; - typedef SrcIterator iterator2_type; - typedef typename sprout::common_iterator_category::type iterator_category; - typedef typename sprout::common_iterator_value_type::type value_type; - typedef typename sprout::common_iterator_difference_type::type difference_type; - typedef typename sprout::common_iterator_pointer::type pointer; - typedef typename sprout::common_iterator_reference::type reference; - private: - SPROUT_CONSTEXPR remake_iterator advance_impl(difference_type n) const { - return n >= 0 - ? remake_iterator( - sprout::next(current, n), - begin_off - n >= 0 ? fst - : (end_off - begin_off >= sprout::distance(fst, lst_) && begin_off - n <= -sprout::distance(fst, lst_)) ? lst_ - : begin_off <= 0 - ? sprout::next(current2, NS_SSCRISK_CEL_OR_SPROUT::min(NS_SSCRISK_CEL_OR_SPROUT::min(n, end_off), sprout::distance(current2, lst_))) - : sprout::next(current2, NS_SSCRISK_CEL_OR_SPROUT::min(NS_SSCRISK_CEL_OR_SPROUT::min(n - begin_off, end_off), sprout::distance(current2, lst_))) - , - fst, lst_, - begin_off - n, end_off - n - ) - : remake_iterator( - sprout::next(current, n), - begin_off - n >= 0 ? fst - : (end_off - begin_off >= sprout::distance(fst, lst_) && begin_off - n <= -sprout::distance(fst, lst_)) ? lst_ - : begin_off >= -sprout::distance(fst, lst_) - ? sprout::next(current2, n) - : sprout::next(current2, n - (begin_off + sprout::distance(fst, lst_))) - , - fst, lst_, - begin_off - n, end_off - n - ) - ; - } - protected: - iterator_type current; - iterator2_type current2; - iterator2_type fst; - iterator2_type lst_; - difference_type begin_off; - difference_type end_off; - public: - SPROUT_CONSTEXPR remake_iterator() - : current(), current2() - , fst(), lst_() - , begin_off(), end_off() - {} - SPROUT_CONSTEXPR remake_iterator(remake_iterator const& other) - : current(other.current), current2(other.current2) - , fst(other.fst), lst_(other.lst_) - , begin_off(other.begin_off), end_off(other.end_off) - {} - SPROUT_CONSTEXPR remake_iterator(iterator_type it, iterator2_type it2, iterator2_type fst, iterator2_type lst_, difference_type begin_off, difference_type end_off) - : current(it), current2(it2) - , fst(fst), lst_(lst_) - , begin_off(begin_off), end_off(end_off) - {} - template - SPROUT_CONSTEXPR remake_iterator(remake_iterator const& it) - : current(it.base()), current2(it.base2()) - , fst(it.first()), lst_(it.last()) - , begin_off(it.begin_offset()), end_off(it.end_offset()) - {} - template - SPROUT_CXX14_CONSTEXPR remake_iterator& operator=(remake_iterator const& it) { - remake_iterator temp(it); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR iterator_type base() const { - return current; - } - SPROUT_CONSTEXPR iterator2_type base2() const { - return current2; - } - SPROUT_CONSTEXPR iterator2_type first() const { - return fst; - } - SPROUT_CONSTEXPR iterator2_type last() const { - return lst_; - } - SPROUT_CONSTEXPR difference_type begin_offset() const { - return begin_off; - } - SPROUT_CONSTEXPR difference_type end_offset() const { - return end_off; - } - SPROUT_CONSTEXPR bool is_in_copying() const { - return begin_off <= 0 && end_off > 0 && current2 != lst_; - } - SPROUT_CONSTEXPR reference operator*() const { - return is_in_copying() ? *current2 : *current; - } - SPROUT_CONSTEXPR pointer operator->() const { - return &*(*this); - } - SPROUT_CXX14_CONSTEXPR remake_iterator& operator++() { - ++current; - if (is_in_copying()) { - ++current2; - } - --begin_off; - --end_off; - return *this; - } - SPROUT_CXX14_CONSTEXPR remake_iterator operator++(int) { - remake_iterator result(*this); - ++current; - if (is_in_copying()) { - ++current2; - } - --begin_off; - --end_off; - return result; - } - SPROUT_CXX14_CONSTEXPR remake_iterator& operator--() { - --current; - if (begin_off < 0 && end_off >= 0) { - --current2; - } - ++begin_off; - ++end_off; - return *this; - } - SPROUT_CXX14_CONSTEXPR remake_iterator operator--(int) { - remake_iterator temp(*this); - --current; - if (begin_off < 0 && end_off >= 0) { - --current2; - } - ++begin_off; - ++end_off; - return temp; - } - SPROUT_CONSTEXPR remake_iterator operator+(difference_type n) const { - return advance_impl(n); - } - SPROUT_CONSTEXPR remake_iterator operator-(difference_type n) const { - return advance_impl(-n); - } - SPROUT_CXX14_CONSTEXPR remake_iterator& operator+=(difference_type n) { - remake_iterator temp(*this + n); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR remake_iterator& operator-=(difference_type n) { - remake_iterator temp(*this - n); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR reference operator[](difference_type n) const { - return *(*this + n); - } - SPROUT_CONSTEXPR remake_iterator next() const { - return remake_iterator( - sprout::next(current), (is_in_copying() ? sprout::next(current2) : current2), - fst, lst_, - begin_off - 1, end_off - 1 - ); - } - SPROUT_CONSTEXPR remake_iterator prev() const { - return remake_iterator( - sprout::prev(current), (begin_off < 0 && end_off >= 0 ? sprout::prev(current2) : current2), - fst, lst_, - begin_off + 1, end_off + 1 - ); - } - SPROUT_CXX14_CONSTEXPR void swap(remake_iterator& other) - SPROUT_NOEXCEPT_IF( - SPROUT_NOEXCEPT_EXPR(swap(current, other.current)) - && SPROUT_NOEXCEPT_EXPR(swap(current2, other.current2)) - && SPROUT_NOEXCEPT_EXPR(swap(fst, other.fst)) - && SPROUT_NOEXCEPT_EXPR(swap(lst_, other.lst_)) - && SPROUT_NOEXCEPT_EXPR(swap(begin_off, other.begin_off)) - && SPROUT_NOEXCEPT_EXPR(swap(end_off, other.end_off)) - ) - { - swap(current, other.current); - swap(current2, other.current2); - swap(fst, other.fst); - swap(lst_, other.lst_); - swap(begin_off, other.begin_off); - swap(end_off, other.end_off); - } - }; - - template< - typename DstIterator1, typename SrcIterator1, - typename DstIterator2, typename SrcIterator2 - > - inline SPROUT_CONSTEXPR bool operator==( - sprout::remake_iterator const& lhs, - sprout::remake_iterator const& rhs - ) - { - return lhs.base() == rhs.base(); - } - template< - typename DstIterator1, typename SrcIterator1, - typename DstIterator2, typename SrcIterator2 - > - inline SPROUT_CONSTEXPR bool operator!=( - sprout::remake_iterator const& lhs, - sprout::remake_iterator const& rhs - ) - { - return !(lhs == rhs); - } - template< - typename DstIterator1, typename SrcIterator1, - typename DstIterator2, typename SrcIterator2 - > - inline SPROUT_CONSTEXPR bool operator<( - sprout::remake_iterator const& lhs, - sprout::remake_iterator const& rhs - ) - { - return lhs.base() < rhs.base(); - } - template< - typename DstIterator1, typename SrcIterator1, - typename DstIterator2, typename SrcIterator2 - > - inline SPROUT_CONSTEXPR bool operator>( - sprout::remake_iterator const& lhs, - sprout::remake_iterator const& rhs - ) - { - return rhs < lhs; - } - template< - typename DstIterator1, typename SrcIterator1, - typename DstIterator2, typename SrcIterator2 - > - inline SPROUT_CONSTEXPR bool operator<=( - sprout::remake_iterator const& lhs, - sprout::remake_iterator const& rhs - ) - { - return !(rhs < lhs); - } - template< - typename DstIterator1, typename SrcIterator1, - typename DstIterator2, typename SrcIterator2 - > - inline SPROUT_CONSTEXPR bool operator>=( - sprout::remake_iterator const& lhs, - sprout::remake_iterator const& rhs - ) - { - return !(lhs < rhs); - } - template< - typename DstIterator1, typename SrcIterator1, - typename DstIterator2, typename SrcIterator2 - > - inline SPROUT_CONSTEXPR decltype(std::declval() - std::declval()) - operator-( - sprout::remake_iterator const& lhs, - sprout::remake_iterator const& rhs - ) - { - return lhs.base() - rhs.base(); - } - template - inline SPROUT_CONSTEXPR sprout::remake_iterator operator+( - typename sprout::remake_iterator::difference_type n, - sprout::remake_iterator const& it - ) - { - return it + n; - } - - // - // make_remake_iterator - // - template - inline SPROUT_CONSTEXPR sprout::remake_iterator - make_remake_iterator( - DstIterator it, SrcIterator it2, - SrcIterator fst, SrcIterator lst_, - typename sprout::remake_iterator::difference_type begin_off, - typename sprout::remake_iterator::difference_type end_off - ) - { - return sprout::remake_iterator(it, it2, fst, lst_, begin_off, end_off); - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::remake_iterator& lhs, sprout::remake_iterator& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::remake_iterator - iterator_next(sprout::remake_iterator const& it) { - return it.next(); - } - - // - // iterator_prev - // - template - inline SPROUT_CONSTEXPR sprout::remake_iterator - iterator_prev(sprout::remake_iterator const& it) { - return it.prev(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_REMAKE_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/remove_if_iterator.hpp b/dsp/lib/sprout/sprout/iterator/remove_if_iterator.hpp deleted file mode 100644 index a62aab4..0000000 --- a/dsp/lib/sprout/sprout/iterator/remove_if_iterator.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_REMOVE_IF_ITERATOR_HPP -#define SPROUT_ITERATOR_REMOVE_IF_ITERATOR_HPP - -#include -#include - -namespace sprout { - // - // remove_if_filter - // - template - class remove_if_filter { - public: - typedef bool result_type; - private: - Predicate pred_; - public: - explicit SPROUT_CONSTEXPR remove_if_filter(Predicate pred) - : pred_(pred) - {} - template - SPROUT_CONSTEXPR bool operator()(U const& value) const { - return !pred_(value); - } - }; - - // - // make_remove_if_iterator - // - template - inline SPROUT_CONSTEXPR sprout::filter_iterator, Iterator> - make_remove_if_iterator(Predicate pred, Iterator it, Iterator last = Iterator()) { - return sprout::filter_iterator, Iterator>( - sprout::remove_if_filter(pred), it, last - ); - } -} // namespace sprout - -#endif // SPROUT_ITERATOR_REMOVE_IF_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/remove_iterator.hpp b/dsp/lib/sprout/sprout/iterator/remove_iterator.hpp deleted file mode 100644 index d5338a6..0000000 --- a/dsp/lib/sprout/sprout/iterator/remove_iterator.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_REMOVE_ITERATOR_HPP -#define SPROUT_ITERATOR_REMOVE_ITERATOR_HPP - -#include -#include - -namespace sprout { - // - // remove_filter - // - template - class remove_filter { - public: - typedef bool result_type; - private: - T value_; - public: - explicit SPROUT_CONSTEXPR remove_filter(T const& value) - : value_(value) - {} - template - SPROUT_CONSTEXPR bool operator()(U const& value) const { - return value != value_; - } - }; - - // - // make_remove_iterator - // - template - inline SPROUT_CONSTEXPR sprout::filter_iterator, Iterator> - make_remove_iterator(T const& value, Iterator it, Iterator last = Iterator()) { - return sprout::filter_iterator, Iterator>( - sprout::remove_filter(value), it, last - ); - } -} // namespace sprout - -#endif // SPROUT_ITERATOR_REMOVE_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/replace_if_iterator.hpp b/dsp/lib/sprout/sprout/iterator/replace_if_iterator.hpp deleted file mode 100644 index 046dd7a..0000000 --- a/dsp/lib/sprout/sprout/iterator/replace_if_iterator.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_REPLACE_IF_ITERATOR_HPP -#define SPROUT_ITERATOR_REPLACE_IF_ITERATOR_HPP - -#include -#include - -namespace sprout { - // - // replace_value_if - // - template - class replace_value_if { - public: - typedef Predicate predicate_type; - typedef T result_type; - typedef T argument_type; - private: - Predicate pred_; - T new_; - public: - SPROUT_CONSTEXPR replace_value_if(Predicate pred, T const& new_value) - : pred_(pred), new_(new_value) - {} - SPROUT_CONSTEXPR T operator()(T const& value) const { - return pred_(value) ? new_ : value; - } - }; - - // - // make_replace_if_iterator - // - template - inline SPROUT_CONSTEXPR sprout::transform_iterator, Iterator> - make_replace_if_iterator(Iterator it, Predicate pred, T const& new_value) { - return sprout::transform_iterator, Iterator>( - it, sprout::replace_value_if(pred, new_value) - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_REPLACE_IF_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/replace_iterator.hpp b/dsp/lib/sprout/sprout/iterator/replace_iterator.hpp deleted file mode 100644 index 5543b71..0000000 --- a/dsp/lib/sprout/sprout/iterator/replace_iterator.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_REPLACE_ITERATOR_HPP -#define SPROUT_ITERATOR_REPLACE_ITERATOR_HPP - -#include -#include - -namespace sprout { - // - // replace_value - // - template - class replace_value { - public: - typedef T result_type; - typedef T argument_type; - private: - T old_; - T new_; - public: - SPROUT_CONSTEXPR replace_value(T const& old_value, T const& new_value) - : old_(old_value), new_(new_value) - {} - SPROUT_CONSTEXPR T - operator()(T const& value) const { - return (value == old_) ? new_ : value; - } - }; - - // - // make_replace_iterator - // - template - inline SPROUT_CONSTEXPR sprout::transform_iterator, Iterator> - make_replace_iterator(Iterator it, T const& old_value, T const& new_value) { - return sprout::transform_iterator, Iterator>( - it, sprout::replace_value(old_value, new_value) - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_REPLACE_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/reverse_iterator.hpp b/dsp/lib/sprout/sprout/iterator/reverse_iterator.hpp deleted file mode 100644 index aad51cd..0000000 --- a/dsp/lib/sprout/sprout/iterator/reverse_iterator.hpp +++ /dev/null @@ -1,223 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_REVERSE_ITERATOR_HPP -#define SPROUT_ITERATOR_REVERSE_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // reverse_iterator - // - template - class reverse_iterator - : public sprout::detail::iterator_base::type - { - private: - typedef typename sprout::detail::iterator_base::type base_type; - public: - typedef Iterator iterator_type; - typedef typename base_type::iterator_category iterator_category; - typedef typename base_type::value_type value_type; - typedef typename base_type::difference_type difference_type; - typedef typename base_type::pointer pointer; - typedef typename base_type::reference reference; - protected: - iterator_type current; - public: - SPROUT_CONSTEXPR reverse_iterator() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - SPROUT_CONSTEXPR reverse_iterator(reverse_iterator const& other) - : current(other.current) - {} - explicit SPROUT_CONSTEXPR reverse_iterator(iterator_type it) - : current(it) - {} - template - SPROUT_CONSTEXPR reverse_iterator(reverse_iterator const& it) - : current(it.base()) - {} - template - SPROUT_CXX14_CONSTEXPR reverse_iterator& operator=(reverse_iterator const& it) { - reverse_iterator temp(it); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR iterator_type base() const { - return current; - } - SPROUT_CONSTEXPR reference operator*() const { - return *sprout::prev(current); - } - SPROUT_CONSTEXPR pointer operator->() const { - return &*(*this); - } - SPROUT_CXX14_CONSTEXPR reverse_iterator& operator++() { - --current; - return *this; - } - SPROUT_CXX14_CONSTEXPR reverse_iterator operator++(int) { - reverse_iterator result(*this); - --current; - return result; - } - SPROUT_CXX14_CONSTEXPR reverse_iterator& operator--() { - ++current; - return *this; - } - SPROUT_CXX14_CONSTEXPR reverse_iterator operator--(int) { - reverse_iterator temp(*this); - ++current; - return temp; - } - SPROUT_CONSTEXPR reverse_iterator operator+(difference_type n) const { - return reverse_iterator(current - n); - } - SPROUT_CONSTEXPR reverse_iterator operator-(difference_type n) const { - return reverse_iterator(current + n); - } - SPROUT_CXX14_CONSTEXPR reverse_iterator& operator+=(difference_type n) { - reverse_iterator temp(current - n); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR reverse_iterator& operator-=(difference_type n) { - reverse_iterator temp(current + n); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR reference operator[](difference_type n) const { - return *(current - (n + 1)); - } - SPROUT_CONSTEXPR reverse_iterator next() const { - return reverse_iterator(sprout::prev(current)); - } - SPROUT_CONSTEXPR reverse_iterator prev() const { - return reverse_iterator(sprout::next(current)); - } - SPROUT_CXX14_CONSTEXPR void swap(reverse_iterator& other) - SPROUT_NOEXCEPT_IF( - SPROUT_NOEXCEPT_EXPR(swap(current, other.current)) - ) - { - swap(current, other.current); - } - }; - - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::reverse_iterator const& lhs, sprout::reverse_iterator const& rhs) { - return lhs.base() == rhs.base(); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::reverse_iterator const& lhs, sprout::reverse_iterator const& rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator<(sprout::reverse_iterator const& lhs, sprout::reverse_iterator const& rhs) { - return lhs.base() < rhs.base(); - } - template - inline SPROUT_CONSTEXPR bool - operator>(sprout::reverse_iterator const& lhs, sprout::reverse_iterator const& rhs) { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator<=(sprout::reverse_iterator const& lhs, sprout::reverse_iterator const& rhs) { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(sprout::reverse_iterator const& lhs, sprout::reverse_iterator const& rhs) { - return !(lhs < rhs); - } - template - inline SPROUT_CONSTEXPR decltype(std::declval() - std::declval()) - operator-(sprout::reverse_iterator const& lhs, sprout::reverse_iterator const& rhs) { - return rhs.base() - lhs.base(); - } - template - inline SPROUT_CONSTEXPR sprout::reverse_iterator - operator+( - typename sprout::reverse_iterator::difference_type n, - sprout::reverse_iterator const& it - ) - { - return it + n; - } - - // - // make_reverse_iterator - // - template - inline SPROUT_CONSTEXPR sprout::reverse_iterator - make_reverse_iterator(Iterator it) { - return sprout::reverse_iterator(it); - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::reverse_iterator& lhs, sprout::reverse_iterator& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::reverse_iterator - iterator_next(sprout::reverse_iterator const& it) { - return it.next(); - } - - // - // iterator_prev - // - template - inline SPROUT_CONSTEXPR sprout::reverse_iterator - iterator_prev(sprout::reverse_iterator const& it) { - return it.prev(); - } - - // - // is_const_iterator_cast_convertible - // - template - struct is_const_iterator_cast_convertible, sprout::reverse_iterator > - : public sprout::is_const_iterator_cast_convertible - {}; - // - // const_iterator_conversion - // - template< - typename T, - typename Iterator, - typename sprout::enabler_if, T>::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR T - const_iterator_conversion(sprout::reverse_iterator const& it) { - return T(sprout::const_iterator_cast(it.base())); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_REVERSE_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/sawtooth_iterator.hpp b/dsp/lib/sprout/sprout/iterator/sawtooth_iterator.hpp deleted file mode 100644 index 70e4b99..0000000 --- a/dsp/lib/sprout/sprout/iterator/sawtooth_iterator.hpp +++ /dev/null @@ -1,231 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_SAWTOOTH_ITERATOR_HPP -#define SPROUT_ITERATOR_SAWTOOTH_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // sawtooth_iterator - // - template - class sawtooth_iterator - : public sprout::iterator< - std::random_access_iterator_tag, - Value, - std::ptrdiff_t, - Value*, - Value - > - { - public: - typedef std::random_access_iterator_tag iterator_category; - typedef Value value_type; - typedef std::ptrdiff_t difference_type; - typedef value_type* pointer; - typedef value_type reference; - private: - difference_type index_; - value_type frequency_; - value_type amplitude_; - value_type phase_; - private: - explicit SPROUT_CONSTEXPR sawtooth_iterator(sawtooth_iterator const& other, difference_type index) - : index_(index) - , frequency_(other.frequency_) - , amplitude_(other.amplitude_) - , phase_(other.phase_) - {} - public: - SPROUT_CONSTEXPR sawtooth_iterator() - : index_() - , frequency_(1) - , amplitude_(1) - , phase_(0) - {} - sawtooth_iterator(sawtooth_iterator const&) = default; - explicit SPROUT_CONSTEXPR sawtooth_iterator( - difference_type index, - value_type const& frequency = 1, - value_type const& amplitude = 1, - value_type const& phase = 0 - ) - : index_(index) - , frequency_(frequency) - , amplitude_(amplitude) - , phase_(phase) - {} - template - SPROUT_CONSTEXPR sawtooth_iterator(sawtooth_iterator const& it) - : index_(it.index_) - , frequency_(it.frequency_) - , amplitude_(it.amplitude_) - , phase_(it.phase_) - {} - template - SPROUT_CXX14_CONSTEXPR sawtooth_iterator& operator=(sawtooth_iterator const& it) { - sawtooth_iterator temp(it); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR difference_type index() const { - return index_; - } - SPROUT_CONSTEXPR value_type const& frequency() const { - return frequency_; - } - SPROUT_CONSTEXPR value_type const& amplitude() const { - return amplitude_; - } - SPROUT_CONSTEXPR value_type const& phase() const { - return phase_; - } - SPROUT_CONSTEXPR reference operator*() const { - return amplitude_ == 0 ? 0 - : sprout::detail::sawtooth_value(frequency_, amplitude_, phase_, index_) - ; - } - SPROUT_CONSTEXPR pointer operator->() const { - return &operator*()(); - } - SPROUT_CXX14_CONSTEXPR sawtooth_iterator& operator++() { - ++index_; - return *this; - } - SPROUT_CXX14_CONSTEXPR sawtooth_iterator operator++(int) { - sawtooth_iterator result(*this); - ++index_; - return result; - } - SPROUT_CXX14_CONSTEXPR sawtooth_iterator& operator--() { - --index_; - return *this; - } - SPROUT_CXX14_CONSTEXPR sawtooth_iterator operator--(int) { - sawtooth_iterator temp(*this); - --index_; - return temp; - } - SPROUT_CONSTEXPR sawtooth_iterator operator+(difference_type n) const { - return sawtooth_iterator(*this, index_ + n); - } - SPROUT_CONSTEXPR sawtooth_iterator operator-(difference_type n) const { - return sawtooth_iterator(*this, index_ - n); - } - SPROUT_CXX14_CONSTEXPR sawtooth_iterator& operator+=(difference_type n) { - sawtooth_iterator temp(*this, index_ + n); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR sawtooth_iterator& operator-=(difference_type n) { - sawtooth_iterator temp(*this, index_ - n); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR reference operator[](difference_type n) const { - return amplitude_ == 0 ? 0 - : sprout::detail::sawtooth_value(frequency_, amplitude_, phase_, index_ + n) - ; - } - SPROUT_CONSTEXPR sawtooth_iterator next() const { - return sawtooth_iterator(*this, index_ + 1); - } - SPROUT_CONSTEXPR sawtooth_iterator prev() const { - return sawtooth_iterator(*this, index_ - 1); - } - SPROUT_CXX14_CONSTEXPR void swap(sawtooth_iterator& other) SPROUT_NOEXCEPT { - sprout::swap(index_, other.index_); - sprout::swap(frequency_, other.frequency_); - sprout::swap(amplitude_, other.amplitude_); - sprout::swap(phase_, other.phase_); - } - }; - - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::sawtooth_iterator const& lhs, sprout::sawtooth_iterator const& rhs) { - return lhs.index() == rhs.index(); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::sawtooth_iterator const& lhs, sprout::sawtooth_iterator const& rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator<(sprout::sawtooth_iterator const& lhs, sprout::sawtooth_iterator const& rhs) { - return lhs.index() < rhs.index(); - } - template - inline SPROUT_CONSTEXPR bool - operator>(sprout::sawtooth_iterator const& lhs, sprout::sawtooth_iterator const& rhs) { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator<=(sprout::sawtooth_iterator const& lhs, sprout::sawtooth_iterator const& rhs) { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(sprout::sawtooth_iterator const& lhs, sprout::sawtooth_iterator const& rhs) { - return !(lhs < rhs); - } - template - inline SPROUT_CONSTEXPR typename sprout::sawtooth_iterator::difference_type - operator-(sprout::sawtooth_iterator const& lhs, sprout::sawtooth_iterator const& rhs) { - return lhs.index() - rhs.index(); - } - template - inline SPROUT_CONSTEXPR sprout::sawtooth_iterator - operator+(typename sprout::sawtooth_iterator::difference_type n, sprout::sawtooth_iterator const& it) { - return it + n; - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::sawtooth_iterator& lhs, sprout::sawtooth_iterator& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::sawtooth_iterator - iterator_next(sprout::sawtooth_iterator const& it) { - return it.next(); - } - - // - // iterator_prev - // - template - inline SPROUT_CONSTEXPR sprout::sawtooth_iterator - iterator_prev(sprout::sawtooth_iterator const& it) { - return it.prev(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_SAWTOOTH_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/set_difference_iterator.hpp b/dsp/lib/sprout/sprout/iterator/set_difference_iterator.hpp deleted file mode 100644 index 38474a2..0000000 --- a/dsp/lib/sprout/sprout/iterator/set_difference_iterator.hpp +++ /dev/null @@ -1,210 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_SET_DIFFERENCE_ITERATOR_HPP -#define SPROUT_ITERATOR_SET_DIFFERENCE_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // set_difference_iterator - // - template< - typename LIterator, typename RIterator, - typename Compare = sprout::less<> - > - class set_difference_iterator - : public sprout::iterator< - typename sprout::min_iterator_category< - typename sprout::common_iterator_category::type, - std::forward_iterator_tag - >::type, - typename sprout::common_iterator_value_type::type, - typename sprout::common_iterator_difference_type::type, - typename sprout::common_iterator_pointer::type, - typename sprout::common_iterator_reference::type - > - { - public: - typedef LIterator iterator_type; - typedef RIterator iterator2_type; - typedef Compare compare_type; - typedef typename sprout::min_iterator_category< - typename sprout::common_iterator_category::type, - std::forward_iterator_tag - >::type iterator_category; - typedef typename sprout::common_iterator_value_type::type value_type; - typedef typename sprout::common_iterator_difference_type::type difference_type; - typedef typename sprout::common_iterator_pointer::type pointer; - typedef typename sprout::common_iterator_reference::type reference; - protected: - typedef sprout::pair pair_type; - protected: - pair_type current; - iterator_type las1; - iterator2_type las2; - Compare comp; - private: - SPROUT_CONSTEXPR set_difference_iterator(set_difference_iterator const& other, pair_type const& next) - : current(next) - , las1(other.las1), las2(other.las2) - , comp(other.comp) - {} - public: - SPROUT_CONSTEXPR set_difference_iterator() - : current(), las1(), las2(), comp() - {} - set_difference_iterator(set_difference_iterator const&) = default; - SPROUT_CONSTEXPR set_difference_iterator( - iterator_type it1, iterator_type las1, - iterator2_type it2, iterator2_type las2, - Compare comp = Compare() - ) - : current(sprout::find_difference(it1, las1, it2, las2, comp)) - , las1(las1), las2(las2) - , comp(comp) - {} - template - SPROUT_CONSTEXPR set_difference_iterator(set_difference_iterator const& it) - : current(it.base(), it.base2()) - , las1(it.last1()), las2(it.last2()) - , comp(it.compare()) - {} - template - SPROUT_CXX14_CONSTEXPR set_difference_iterator& operator=(set_difference_iterator const& it) { - set_difference_iterator temp(it); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR iterator_type base() const { - return current.first; - } - SPROUT_CONSTEXPR iterator_type last1() const { - return las1; - } - SPROUT_CONSTEXPR iterator2_type base2() const { - return current.second; - } - SPROUT_CONSTEXPR iterator2_type last2() const { - return las2; - } - SPROUT_CONSTEXPR Compare compare() const { - return comp; - } - SPROUT_CONSTEXPR bool is_in_left() const { - return true; - } - SPROUT_CONSTEXPR reference operator*() const { - return *current.first; - } - SPROUT_CONSTEXPR pointer operator->() const { - return &*(*this); - } - SPROUT_CXX14_CONSTEXPR set_difference_iterator& operator++() { - current = sprout::next_difference(current.first, las1, current.second, las2, comp); - return *this; - } - SPROUT_CXX14_CONSTEXPR set_difference_iterator operator++(int) { - set_difference_iterator result(*this); - current = sprout::next_difference(current.first, las1, current.second, las2, comp); - return result; - } - SPROUT_CONSTEXPR set_difference_iterator next() const { - return set_difference_iterator( - *this, - sprout::next_difference(current.first, las1, current.second, las2, comp) - ); - } - SPROUT_CXX14_CONSTEXPR void swap(set_difference_iterator& other) - SPROUT_NOEXCEPT_IF( - SPROUT_NOEXCEPT_EXPR(sprout::swap(current, other.current)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(las1, other.las1)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(las2, other.las2)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(comp, other.comp)) - ) - { - sprout::swap(current, other.current); - sprout::swap(las1, other.las1); - sprout::swap(las2, other.las2); - sprout::swap(comp, other.comp); - } - }; - - template< - typename LIterator1, typename RIterator1, typename Compare1, - typename LIterator2, typename RIterator2, typename Compare2 - > - inline SPROUT_CONSTEXPR bool operator==( - sprout::set_difference_iterator const& lhs, - sprout::set_difference_iterator const& rhs - ) - { - return lhs.base() == rhs.base() && lhs.base2() == rhs.base2(); - } - template< - typename LIterator1, typename RIterator1, typename Compare1, - typename LIterator2, typename RIterator2, typename Compare2 - > - inline SPROUT_CONSTEXPR bool operator!=( - sprout::set_difference_iterator const& lhs, - sprout::set_difference_iterator const& rhs - ) - { - return !(lhs == rhs); - } - - // - // make_set_difference_iterator - // - template - inline SPROUT_CONSTEXPR sprout::set_difference_iterator - make_set_difference_iterator(LIterator it1, LIterator las1, RIterator it2, RIterator las2, Compare comp) { - return sprout::set_difference_iterator(it1, las1, it2, las2, comp); - } - template - inline SPROUT_CONSTEXPR sprout::set_difference_iterator - make_set_difference_iterator(LIterator it1, LIterator las1, RIterator it2, RIterator las2) { - return sprout::set_difference_iterator(it1, las1, it2, las2); - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap( - sprout::set_difference_iterator& lhs, - sprout::set_difference_iterator& rhs - ) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::set_difference_iterator - iterator_next(sprout::set_difference_iterator const& it) { - return it.next(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_SET_DIFFERENCE_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/set_intersection_iterator.hpp b/dsp/lib/sprout/sprout/iterator/set_intersection_iterator.hpp deleted file mode 100644 index 773c1f3..0000000 --- a/dsp/lib/sprout/sprout/iterator/set_intersection_iterator.hpp +++ /dev/null @@ -1,210 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_SET_INTERSECTION_ITERATOR_HPP -#define SPROUT_ITERATOR_SET_INTERSECTION_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // set_intersection_iterator - // - template< - typename LIterator, typename RIterator, - typename Compare = sprout::less<> - > - class set_intersection_iterator - : public sprout::iterator< - typename sprout::min_iterator_category< - typename sprout::common_iterator_category::type, - std::forward_iterator_tag - >::type, - typename sprout::common_iterator_value_type::type, - typename sprout::common_iterator_difference_type::type, - typename sprout::common_iterator_pointer::type, - typename sprout::common_iterator_reference::type - > - { - public: - typedef LIterator iterator_type; - typedef RIterator iterator2_type; - typedef Compare compare_type; - typedef typename sprout::min_iterator_category< - typename sprout::common_iterator_category::type, - std::forward_iterator_tag - >::type iterator_category; - typedef typename sprout::common_iterator_value_type::type value_type; - typedef typename sprout::common_iterator_difference_type::type difference_type; - typedef typename sprout::common_iterator_pointer::type pointer; - typedef typename sprout::common_iterator_reference::type reference; - protected: - typedef sprout::pair pair_type; - protected: - pair_type current; - iterator_type las1; - iterator2_type las2; - Compare comp; - private: - SPROUT_CONSTEXPR set_intersection_iterator(set_intersection_iterator const& other, pair_type const& next) - : current(next) - , las1(other.las1), las2(other.las2) - , comp(other.comp) - {} - public: - SPROUT_CONSTEXPR set_intersection_iterator() - : current(), las1(), las2(), comp() - {} - set_intersection_iterator(set_intersection_iterator const&) = default; - SPROUT_CONSTEXPR set_intersection_iterator( - iterator_type it1, iterator_type las1, - iterator2_type it2, iterator2_type las2, - Compare comp = Compare() - ) - : current(sprout::find_intersection(it1, las1, it2, las2, comp)) - , las1(las1), las2(las2) - , comp(comp) - {} - template - SPROUT_CONSTEXPR set_intersection_iterator(set_intersection_iterator const& it) - : current(it.base(), it.base2()) - , las1(it.last1()), las2(it.last2()) - , comp(it.compare()) - {} - template - SPROUT_CXX14_CONSTEXPR set_intersection_iterator& operator=(set_intersection_iterator const& it) { - set_intersection_iterator temp(it); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR iterator_type base() const { - return current.first; - } - SPROUT_CONSTEXPR iterator_type last1() const { - return las1; - } - SPROUT_CONSTEXPR iterator2_type base2() const { - return current.second; - } - SPROUT_CONSTEXPR iterator2_type last2() const { - return las2; - } - SPROUT_CONSTEXPR Compare compare() const { - return comp; - } - SPROUT_CONSTEXPR bool is_in_left() const { - return true; - } - SPROUT_CONSTEXPR reference operator*() const { - return *current.first; - } - SPROUT_CONSTEXPR pointer operator->() const { - return &*(*this); - } - SPROUT_CXX14_CONSTEXPR set_intersection_iterator& operator++() { - current = sprout::next_intersection(current.first, las1, current.second, las2, comp); - return *this; - } - SPROUT_CXX14_CONSTEXPR set_intersection_iterator operator++(int) { - set_intersection_iterator result(*this); - current = sprout::next_intersection(current.first, las1, current.second, las2, comp); - return result; - } - SPROUT_CONSTEXPR set_intersection_iterator next() const { - return set_intersection_iterator( - *this, - sprout::next_intersection(current.first, las1, current.second, las2, comp) - ); - } - SPROUT_CXX14_CONSTEXPR void swap(set_intersection_iterator& other) - SPROUT_NOEXCEPT_IF( - SPROUT_NOEXCEPT_EXPR(sprout::swap(current, other.current)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(las1, other.las1)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(las2, other.las2)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(comp, other.comp)) - ) - { - sprout::swap(current, other.current); - sprout::swap(las1, other.las1); - sprout::swap(las2, other.las2); - sprout::swap(comp, other.comp); - } - }; - - template< - typename LIterator1, typename RIterator1, typename Compare1, - typename LIterator2, typename RIterator2, typename Compare2 - > - inline SPROUT_CONSTEXPR bool operator==( - sprout::set_intersection_iterator const& lhs, - sprout::set_intersection_iterator const& rhs - ) - { - return lhs.base() == rhs.base() && lhs.base2() == rhs.base2(); - } - template< - typename LIterator1, typename RIterator1, typename Compare1, - typename LIterator2, typename RIterator2, typename Compare2 - > - inline SPROUT_CONSTEXPR bool operator!=( - sprout::set_intersection_iterator const& lhs, - sprout::set_intersection_iterator const& rhs - ) - { - return !(lhs == rhs); - } - - // - // make_set_intersection_iterator - // - template - inline SPROUT_CONSTEXPR sprout::set_intersection_iterator - make_set_intersection_iterator(LIterator it1, LIterator las1, RIterator it2, RIterator las2, Compare comp) { - return sprout::set_intersection_iterator(it1, las1, it2, las2, comp); - } - template - inline SPROUT_CONSTEXPR sprout::set_intersection_iterator - make_set_intersection_iterator(LIterator it1, LIterator las1, RIterator it2, RIterator las2) { - return sprout::set_intersection_iterator(it1, las1, it2, las2); - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap( - sprout::set_intersection_iterator& lhs, - sprout::set_intersection_iterator& rhs - ) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::set_intersection_iterator - iterator_next(sprout::set_intersection_iterator const& it) { - return it.next(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_SET_INTERSECTION_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/set_symmetric_difference_iterator.hpp b/dsp/lib/sprout/sprout/iterator/set_symmetric_difference_iterator.hpp deleted file mode 100644 index 8c8decf..0000000 --- a/dsp/lib/sprout/sprout/iterator/set_symmetric_difference_iterator.hpp +++ /dev/null @@ -1,278 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_SET_SYMMETRIC_DIFFERENCE_ITERATOR_HPP -#define SPROUT_ITERATOR_SET_SYMMETRIC_DIFFERENCE_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template< - typename LIterator, typename RIterator, - typename Compare - > - class set_symmetric_difference_iterator_impl { - protected: - typedef LIterator iterator_type; - typedef RIterator iterator2_type; - typedef Compare compare_type; - typedef typename sprout::min_iterator_category< - typename sprout::common_iterator_category::type, - std::forward_iterator_tag - >::type iterator_category; - typedef typename sprout::common_iterator_value_type::type value_type; - typedef typename sprout::common_iterator_difference_type::type difference_type; - typedef typename sprout::common_iterator_pointer::type pointer; - typedef typename sprout::common_iterator_reference::type reference; - protected: - typedef sprout::pair pair_type; - protected: - static SPROUT_CONSTEXPR bool check_in_left( - iterator_type it1, iterator_type las1, - iterator2_type it2, iterator2_type las2, - Compare comp - ) - { - return it1 != las1 ? (it2 != las2 ? comp(*it1, *it2) : true) - : !(it2 != las2) - ; - } - protected: - pair_type current; - iterator_type las1; - iterator2_type las2; - Compare comp; - protected: - bool in_left; - protected: - SPROUT_CONSTEXPR set_symmetric_difference_iterator_impl() - : current(), las1(), las2(), comp(), in_left(true) - {} - set_symmetric_difference_iterator_impl(set_symmetric_difference_iterator_impl const&) = default; - SPROUT_CONSTEXPR set_symmetric_difference_iterator_impl( - pair_type const& current, - iterator_type las1, iterator2_type las2, - Compare comp - ) - : current(current) - , las1(las1), las2(las2) - , comp(comp) - , in_left(check_in_left(current.first, las1, current.second, las2, comp)) - {} - SPROUT_CONSTEXPR set_symmetric_difference_iterator_impl( - pair_type const& current, - iterator_type las1, iterator2_type las2, - Compare comp, - bool in_left - ) - : current(current) - , las1(las1), las2(las2) - , comp(comp) - , in_left(in_left) - {} - }; - } // namespace detail - - // - // set_symmetric_difference_iterator - // - template< - typename LIterator, typename RIterator, - typename Compare = sprout::less<> - > - class set_symmetric_difference_iterator - : public sprout::iterator< - typename sprout::min_iterator_category< - typename sprout::common_iterator_category::type, - std::forward_iterator_tag - >::type, - typename sprout::common_iterator_value_type::type, - typename sprout::common_iterator_difference_type::type, - typename sprout::common_iterator_pointer::type, - typename sprout::common_iterator_reference::type - > - , private sprout::detail::set_symmetric_difference_iterator_impl - { - private: - typedef sprout::detail::set_symmetric_difference_iterator_impl impl_type; - public: - typedef typename impl_type::iterator_type iterator_type; - typedef typename impl_type::iterator2_type iterator2_type; - typedef typename impl_type::compare_type compare_type; - typedef typename impl_type::iterator_category iterator_category; - typedef typename impl_type::value_type value_type; - typedef typename impl_type::difference_type difference_type; - typedef typename impl_type::pointer pointer; - typedef typename impl_type::reference reference; - protected: - typedef typename impl_type::pair_type pair_type; - private: - using impl_type::check_in_left; - protected: - using impl_type::current; - using impl_type::las1; - using impl_type::las2; - using impl_type::comp; - private: - using impl_type::in_left; - private: - SPROUT_CONSTEXPR set_symmetric_difference_iterator(set_symmetric_difference_iterator const& other, pair_type const& next) - : impl_type(next, other.las1, other.las2, other.comp) - {} - public: - SPROUT_CONSTEXPR set_symmetric_difference_iterator() - : impl_type() - {} - set_symmetric_difference_iterator(set_symmetric_difference_iterator const&) = default; - SPROUT_CONSTEXPR set_symmetric_difference_iterator( - iterator_type it1, iterator_type las1, - iterator2_type it2, iterator2_type las2, - Compare comp = Compare() - ) - : impl_type(sprout::find_symmetric_difference(it1, las1, it2, las2, comp), las1, las2, comp) - {} - template - SPROUT_CONSTEXPR set_symmetric_difference_iterator(set_symmetric_difference_iterator const& it) - : impl_type(pair_type(it.base(), it.base2()), it.last1(), it.last2(), it.compare(), it.is_in_left()) - {} - template - SPROUT_CXX14_CONSTEXPR set_symmetric_difference_iterator& operator=(set_symmetric_difference_iterator const& it) { - set_symmetric_difference_iterator temp(it); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR iterator_type base() const { - return current.first; - } - SPROUT_CONSTEXPR iterator_type last1() const { - return las1; - } - SPROUT_CONSTEXPR iterator2_type base2() const { - return current.second; - } - SPROUT_CONSTEXPR iterator2_type last2() const { - return las2; - } - SPROUT_CONSTEXPR Compare compare() const { - return comp; - } - SPROUT_CONSTEXPR bool is_in_left() const { - return in_left; - } - SPROUT_CONSTEXPR reference operator*() const { - return is_in_left() ? *current.first : *current.second; - } - SPROUT_CONSTEXPR pointer operator->() const { - return &*(*this); - } - SPROUT_CXX14_CONSTEXPR set_symmetric_difference_iterator& operator++() { - current = sprout::next_symmetric_difference(current.first, las1, current.second, las2, comp); - in_left = check_in_left(current.first, las1, current.second, las2, comp); - return *this; - } - SPROUT_CXX14_CONSTEXPR set_symmetric_difference_iterator operator++(int) { - set_symmetric_difference_iterator result(*this); - current = sprout::next_symmetric_difference(current.first, las1, current.second, las2, comp); - in_left = check_in_left(current.first, las1, current.second, las2, comp); - return result; - } - SPROUT_CONSTEXPR set_symmetric_difference_iterator next() const { - return set_symmetric_difference_iterator( - *this, - sprout::next_symmetric_difference(current.first, las1, current.second, las2, comp) - ); - } - SPROUT_CXX14_CONSTEXPR void swap(set_symmetric_difference_iterator& other) - SPROUT_NOEXCEPT_IF( - SPROUT_NOEXCEPT_EXPR(sprout::swap(current, other.current)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(las1, other.las1)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(las2, other.las2)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(comp, other.comp)) - ) - { - sprout::swap(current, other.current); - sprout::swap(las1, other.las1); - sprout::swap(las2, other.las2); - sprout::swap(comp, other.comp); - sprout::swap(in_left, other.in_left); - } - }; - - template< - typename LIterator1, typename RIterator1, typename Compare1, - typename LIterator2, typename RIterator2, typename Compare2 - > - inline SPROUT_CONSTEXPR bool operator==( - sprout::set_symmetric_difference_iterator const& lhs, - sprout::set_symmetric_difference_iterator const& rhs - ) - { - return lhs.base() == rhs.base() && lhs.base2() == rhs.base2(); - } - template< - typename LIterator1, typename RIterator1, typename Compare1, - typename LIterator2, typename RIterator2, typename Compare2 - > - inline SPROUT_CONSTEXPR bool operator!=( - sprout::set_symmetric_difference_iterator const& lhs, - sprout::set_symmetric_difference_iterator const& rhs - ) - { - return !(lhs == rhs); - } - - // - // make_set_symmetric_difference_iterator - // - template - inline SPROUT_CONSTEXPR sprout::set_symmetric_difference_iterator - make_set_symmetric_difference_iterator(LIterator it1, LIterator las1, RIterator it2, RIterator las2, Compare comp) { - return sprout::set_symmetric_difference_iterator(it1, las1, it2, las2, comp); - } - template - inline SPROUT_CONSTEXPR sprout::set_symmetric_difference_iterator - make_set_symmetric_difference_iterator(LIterator it1, LIterator las1, RIterator it2, RIterator las2) { - return sprout::set_symmetric_difference_iterator(it1, las1, it2, las2); - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap( - sprout::set_symmetric_difference_iterator& lhs, - sprout::set_symmetric_difference_iterator& rhs - ) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::set_symmetric_difference_iterator - iterator_next(sprout::set_symmetric_difference_iterator const& it) { - return it.next(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_SET_SYMMETRIC_DIFFERENCE_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/set_union_iterator.hpp b/dsp/lib/sprout/sprout/iterator/set_union_iterator.hpp deleted file mode 100644 index e998710..0000000 --- a/dsp/lib/sprout/sprout/iterator/set_union_iterator.hpp +++ /dev/null @@ -1,228 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_SET_UNION_ITERATOR_HPP -#define SPROUT_ITERATOR_SET_UNION_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // set_union_iterator - // - template< - typename LIterator, typename RIterator, - typename Compare = sprout::less<> - > - class set_union_iterator - : public sprout::iterator< - typename sprout::min_iterator_category< - typename sprout::common_iterator_category::type, - std::forward_iterator_tag - >::type, - typename sprout::common_iterator_value_type::type, - typename sprout::common_iterator_difference_type::type, - typename sprout::common_iterator_pointer::type, - typename sprout::common_iterator_reference::type - > - { - public: - typedef LIterator iterator_type; - typedef RIterator iterator2_type; - typedef Compare compare_type; - typedef typename sprout::min_iterator_category< - typename sprout::common_iterator_category::type, - std::forward_iterator_tag - >::type iterator_category; - typedef typename sprout::common_iterator_value_type::type value_type; - typedef typename sprout::common_iterator_difference_type::type difference_type; - typedef typename sprout::common_iterator_pointer::type pointer; - typedef typename sprout::common_iterator_reference::type reference; - protected: - typedef sprout::pair pair_type; - private: - static SPROUT_CONSTEXPR bool check_in_left( - iterator_type it1, iterator_type las1, - iterator2_type it2, iterator2_type las2, - Compare comp - ) - { - return it1 != las1 ? (it2 != las2 ? comp(*it1, *it2) || !comp(*it2, *it1) : true) - : !(it2 != las2) - ; - } - protected: - pair_type current; - iterator_type las1; - iterator2_type las2; - Compare comp; - private: - bool in_left; - private: - SPROUT_CONSTEXPR set_union_iterator(set_union_iterator const& other, pair_type const& next) - : current(next) - , las1(other.las1), las2(other.las2) - , comp(other.comp) - , in_left(check_in_left(next.first, other.las1, next.second, other.las2, other.comp)) - {} - public: - SPROUT_CONSTEXPR set_union_iterator() - : current(), las1(), las2(), comp(), in_left(true) - {} - set_union_iterator(set_union_iterator const&) = default; - SPROUT_CONSTEXPR set_union_iterator( - iterator_type it1, iterator_type las1, - iterator2_type it2, iterator2_type las2, - Compare comp = Compare() - ) - : current(it1, it2) - , las1(las1), las2(las2) - , comp(comp) - , in_left(check_in_left(it1, las1, it2, las2, comp)) - {} - template - SPROUT_CONSTEXPR set_union_iterator(set_union_iterator const& it) - : current(it.base(), it.base2()) - , las1(it.last1()), las2(it.last2()) - , comp(it.compare()) - , in_left(it.is_in_left()) - {} - template - SPROUT_CXX14_CONSTEXPR set_union_iterator& operator=(set_union_iterator const& it) { - set_union_iterator temp(it); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR iterator_type base() const { - return current.first; - } - SPROUT_CONSTEXPR iterator_type last1() const { - return las1; - } - SPROUT_CONSTEXPR iterator2_type base2() const { - return current.second; - } - SPROUT_CONSTEXPR iterator2_type last2() const { - return las2; - } - SPROUT_CONSTEXPR Compare compare() const { - return comp; - } - SPROUT_CONSTEXPR bool is_in_left() const { - return in_left; - } - SPROUT_CONSTEXPR reference operator*() const { - return is_in_left() ? *current.first : *current.second; - } - SPROUT_CONSTEXPR pointer operator->() const { - return &*(*this); - } - SPROUT_CXX14_CONSTEXPR set_union_iterator& operator++() { - current = sprout::next_union(current.first, las1, current.second, las2, comp); - in_left = check_in_left(current.first, las1, current.second, las2, comp); - return *this; - } - SPROUT_CXX14_CONSTEXPR set_union_iterator operator++(int) { - set_union_iterator result(*this); - current = sprout::next_union(current.first, las1, current.second, las2, comp); - in_left = check_in_left(current.first, las1, current.second, las2, comp); - return result; - } - SPROUT_CONSTEXPR set_union_iterator next() const { - return set_union_iterator( - *this, - sprout::next_union(current.first, las1, current.second, las2, comp) - ); - } - SPROUT_CXX14_CONSTEXPR void swap(set_union_iterator& other) - SPROUT_NOEXCEPT_IF( - SPROUT_NOEXCEPT_EXPR(sprout::swap(current, other.current)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(las1, other.las1)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(las2, other.las2)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(comp, other.comp)) - ) - { - sprout::swap(current, other.current); - sprout::swap(las1, other.las1); - sprout::swap(las2, other.las2); - sprout::swap(comp, other.comp); - sprout::swap(in_left, other.in_left); - } - }; - - template< - typename LIterator1, typename RIterator1, typename Compare1, - typename LIterator2, typename RIterator2, typename Compare2 - > - inline SPROUT_CONSTEXPR bool operator==( - sprout::set_union_iterator const& lhs, - sprout::set_union_iterator const& rhs - ) - { - return lhs.base() == rhs.base() && lhs.base2() == rhs.base2(); - } - template< - typename LIterator1, typename RIterator1, typename Compare1, - typename LIterator2, typename RIterator2, typename Compare2 - > - inline SPROUT_CONSTEXPR bool operator!=( - sprout::set_union_iterator const& lhs, - sprout::set_union_iterator const& rhs - ) - { - return !(lhs == rhs); - } - - // - // make_set_union_iterator - // - template - inline SPROUT_CONSTEXPR sprout::set_union_iterator - make_set_union_iterator(LIterator it1, LIterator las1, RIterator it2, RIterator las2, Compare comp) { - return sprout::set_union_iterator(it1, las1, it2, las2, comp); - } - template - inline SPROUT_CONSTEXPR sprout::set_union_iterator - make_set_union_iterator(LIterator it1, LIterator las1, RIterator it2, RIterator las2) { - return sprout::set_union_iterator(it1, las1, it2, las2); - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap( - sprout::set_union_iterator& lhs, - sprout::set_union_iterator& rhs - ) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::set_union_iterator - iterator_next(sprout::set_union_iterator const& it) { - return it.next(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_SET_UNION_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/sinusoid_iterator.hpp b/dsp/lib/sprout/sprout/iterator/sinusoid_iterator.hpp deleted file mode 100644 index 3da3896..0000000 --- a/dsp/lib/sprout/sprout/iterator/sinusoid_iterator.hpp +++ /dev/null @@ -1,237 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_SINUSOID_ITERATOR_HPP -#define SPROUT_ITERATOR_SINUSOID_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // sinusoid_iterator - // - template - class sinusoid_iterator - : public sprout::iterator< - std::random_access_iterator_tag, - Value, - std::ptrdiff_t, - Value*, - Value - > - { - public: - typedef std::random_access_iterator_tag iterator_category; - typedef Value value_type; - typedef std::ptrdiff_t difference_type; - typedef value_type* pointer; - typedef value_type reference; - private: - difference_type index_; - value_type frequency_; - value_type amplitude_; - value_type phase_; - value_type d_; - private: - explicit SPROUT_CONSTEXPR sinusoid_iterator(sinusoid_iterator const& other, difference_type index) - : index_(index) - , frequency_(other.frequency_) - , amplitude_(other.amplitude_) - , phase_(other.phase_) - , d_(other.d_) - {} - public: - SPROUT_CONSTEXPR sinusoid_iterator() - : index_() - , frequency_(1) - , amplitude_(1) - , phase_(0) - , d_(sprout::detail::sinusoid_value_d(frequency_)) - {} - sinusoid_iterator(sinusoid_iterator const&) = default; - explicit SPROUT_CONSTEXPR sinusoid_iterator( - difference_type index, - value_type const& frequency = 1, - value_type const& amplitude = 1, - value_type const& phase = 0 - ) - : index_(index) - , frequency_(frequency) - , amplitude_(amplitude) - , phase_(phase) - , d_(sprout::detail::sinusoid_value_d(frequency_)) - {} - template - SPROUT_CONSTEXPR sinusoid_iterator(sinusoid_iterator const& it) - : index_(it.index_) - , frequency_(it.frequency_) - , amplitude_(it.amplitude_) - , phase_(it.phase_) - , d_(it.d_) - {} - template - SPROUT_CXX14_CONSTEXPR sinusoid_iterator& operator=(sinusoid_iterator const& it) { - sinusoid_iterator temp(it); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR difference_type index() const { - return index_; - } - SPROUT_CONSTEXPR value_type const& frequency() const { - return frequency_; - } - SPROUT_CONSTEXPR value_type const& amplitude() const { - return amplitude_; - } - SPROUT_CONSTEXPR value_type const& phase() const { - return phase_; - } - SPROUT_CONSTEXPR reference operator*() const { - return amplitude_ == 0 ? 0 - : sprout::detail::sinusoid_value(amplitude_, phase_, d_, index_) - ; - } - SPROUT_CONSTEXPR pointer operator->() const { - return &operator*()(); - } - SPROUT_CXX14_CONSTEXPR sinusoid_iterator& operator++() { - ++index_; - return *this; - } - SPROUT_CXX14_CONSTEXPR sinusoid_iterator operator++(int) { - sinusoid_iterator result(*this); - ++index_; - return result; - } - SPROUT_CXX14_CONSTEXPR sinusoid_iterator& operator--() { - --index_; - return *this; - } - SPROUT_CXX14_CONSTEXPR sinusoid_iterator operator--(int) { - sinusoid_iterator temp(*this); - --index_; - return temp; - } - SPROUT_CONSTEXPR sinusoid_iterator operator+(difference_type n) const { - return sinusoid_iterator(*this, index_ + n); - } - SPROUT_CONSTEXPR sinusoid_iterator operator-(difference_type n) const { - return sinusoid_iterator(*this, index_ - n); - } - SPROUT_CXX14_CONSTEXPR sinusoid_iterator& operator+=(difference_type n) { - sinusoid_iterator temp(*this, index_ + n); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR sinusoid_iterator& operator-=(difference_type n) { - sinusoid_iterator temp(*this, index_ - n); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR reference operator[](difference_type n) const { - return amplitude_ == 0 ? 0 - : sprout::detail::sinusoid_value(amplitude_, phase_, d_, index_ + n) - ; - } - SPROUT_CONSTEXPR sinusoid_iterator next() const { - return sinusoid_iterator(*this, index_ + 1); - } - SPROUT_CONSTEXPR sinusoid_iterator prev() const { - return sinusoid_iterator(*this, index_ - 1); - } - SPROUT_CXX14_CONSTEXPR void swap(sinusoid_iterator& other) SPROUT_NOEXCEPT { - sprout::swap(index_, other.index_); - sprout::swap(frequency_, other.frequency_); - sprout::swap(amplitude_, other.amplitude_); - sprout::swap(phase_, other.phase_); - sprout::swap(d_, other.d_); - } - }; - - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::sinusoid_iterator const& lhs, sprout::sinusoid_iterator const& rhs) { - return lhs.index() == rhs.index(); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::sinusoid_iterator const& lhs, sprout::sinusoid_iterator const& rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator<(sprout::sinusoid_iterator const& lhs, sprout::sinusoid_iterator const& rhs) { - return lhs.index() < rhs.index(); - } - template - inline SPROUT_CONSTEXPR bool - operator>(sprout::sinusoid_iterator const& lhs, sprout::sinusoid_iterator const& rhs) { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator<=(sprout::sinusoid_iterator const& lhs, sprout::sinusoid_iterator const& rhs) { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(sprout::sinusoid_iterator const& lhs, sprout::sinusoid_iterator const& rhs) { - return !(lhs < rhs); - } - template - inline SPROUT_CONSTEXPR typename sprout::sinusoid_iterator::difference_type - operator-(sprout::sinusoid_iterator const& lhs, sprout::sinusoid_iterator const& rhs) { - return lhs.index() - rhs.index(); - } - template - inline SPROUT_CONSTEXPR sprout::sinusoid_iterator - operator+(typename sprout::sinusoid_iterator::difference_type n, sprout::sinusoid_iterator const& it) { - return it + n; - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::sinusoid_iterator& lhs, sprout::sinusoid_iterator& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::sinusoid_iterator - iterator_next(sprout::sinusoid_iterator const& it) { - return it.next(); - } - - // - // iterator_prev - // - template - inline SPROUT_CONSTEXPR sprout::sinusoid_iterator - iterator_prev(sprout::sinusoid_iterator const& it) { - return it.prev(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_SINUSOID_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/size_enum_iterator.hpp b/dsp/lib/sprout/sprout/iterator/size_enum_iterator.hpp deleted file mode 100644 index d7f22c6..0000000 --- a/dsp/lib/sprout/sprout/iterator/size_enum_iterator.hpp +++ /dev/null @@ -1,436 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_SIZE_ENUM_ITERATOR_HPP -#define SPROUT_ITERATOR_SIZE_ENUM_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // size_enum_iterator - // - template - class size_enum_iterator - : public sprout::iterator< - typename std::iterator_traits::iterator_category, - typename sprout::container_traits< - typename std::iterator_traits::value_type - >::difference_type, - typename std::iterator_traits::difference_type, - typename sprout::container_traits< - typename std::iterator_traits::value_type - >::difference_type*, - typename sprout::container_traits< - typename std::iterator_traits::value_type - >::difference_type - > - { - public: - typedef Iterator iterator_type; - typedef typename std::iterator_traits::iterator_category iterator_category; - typedef typename sprout::container_traits< - typename std::iterator_traits::value_type - >::difference_type value_type; - typedef value_type reference; - typedef typename std::iterator_traits::difference_type difference_type; - typedef value_type* pointer; - protected: - iterator_type current; - public: - SPROUT_CONSTEXPR size_enum_iterator() - : current() - {} - size_enum_iterator(size_enum_iterator const&) = default; - explicit SPROUT_CONSTEXPR size_enum_iterator(iterator_type it) - : current(it) - {} - template - SPROUT_CONSTEXPR size_enum_iterator(size_enum_iterator const& it) - : current(it.current) - {} - template - SPROUT_CXX14_CONSTEXPR size_enum_iterator& operator=(size_enum_iterator const& it) { - size_enum_iterator temp(it); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR iterator_type base() const { - return current; - } - SPROUT_CONSTEXPR bool is_separator() const { - return false; - } - SPROUT_CONSTEXPR reference operator*() const { - return sprout::size(*current); - } - SPROUT_CONSTEXPR pointer operator->() const { - return &sprout::size(*current); - } - SPROUT_CXX14_CONSTEXPR size_enum_iterator& operator++() { - ++current; - return *this; - } - SPROUT_CXX14_CONSTEXPR size_enum_iterator operator++(int) { - size_enum_iterator result(*this); - ++current; - return result; - } - SPROUT_CXX14_CONSTEXPR size_enum_iterator& operator--() { - --current; - return *this; - } - SPROUT_CXX14_CONSTEXPR size_enum_iterator operator--(int) { - size_enum_iterator temp(*this); - --current; - return temp; - } - SPROUT_CONSTEXPR size_enum_iterator operator+(difference_type n) const { - return size_enum_iterator(current + n); - } - SPROUT_CONSTEXPR size_enum_iterator operator-(difference_type n) const { - return size_enum_iterator(current - n); - } - SPROUT_CXX14_CONSTEXPR size_enum_iterator& operator+=(difference_type n) { - size_enum_iterator temp(current + n); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR size_enum_iterator& operator-=(difference_type n) { - size_enum_iterator temp(current - n); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR reference operator[](difference_type n) const { - return sprout::size(current[n]); - } - SPROUT_CONSTEXPR size_enum_iterator next() const { - return size_enum_iterator(sprout::next(current)); - } - SPROUT_CONSTEXPR size_enum_iterator prev() const { - return size_enum_iterator(sprout::prev(current)); - } - SPROUT_CXX14_CONSTEXPR void swap(size_enum_iterator& other) - SPROUT_NOEXCEPT_IF_EXPR(sprout::swap(current, other.current)) - { - sprout::swap(current, other.current); - } - }; - - // - // size_enum_iterator - // - template - class size_enum_iterator - : public sprout::iterator< - typename std::iterator_traits::iterator_category, - typename sprout::container_traits< - typename std::iterator_traits::value_type - >::difference_type, - typename std::iterator_traits::difference_type, - typename sprout::container_traits< - typename std::iterator_traits::value_type - >::difference_type*, - typename sprout::container_traits< - typename std::iterator_traits::value_type - >::difference_type - > - { - public: - typedef Iterator iterator_type; - typedef typename std::iterator_traits::iterator_category iterator_category; - typedef typename sprout::container_traits< - typename std::iterator_traits::value_type - >::difference_type value_type; - typedef value_type reference; - typedef typename std::iterator_traits::difference_type difference_type; - typedef value_type* pointer; - protected: - iterator_type current; - value_type sep_size; - bool is_sep; - public: - SPROUT_CONSTEXPR size_enum_iterator() - : current(), sep_size(), is_sep() - {} - size_enum_iterator(size_enum_iterator const&) = default; - explicit SPROUT_CONSTEXPR size_enum_iterator(iterator_type it, value_type size = 0, bool sep = false) - : current(it) - , sep_size(size) - , is_sep(sep) - {} - template - SPROUT_CONSTEXPR size_enum_iterator(size_enum_iterator const& it) - : current(it.current) - , sep_size(it.sep_size) - , is_sep(it.is_sep) - {} - template - SPROUT_CXX14_CONSTEXPR size_enum_iterator& operator=(size_enum_iterator const& it) { - size_enum_iterator temp(it); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR iterator_type base() const { - return current; - } - SPROUT_CONSTEXPR value_type separator_size() const { - return sep_size; - } - SPROUT_CONSTEXPR bool is_separator() const { - return is_sep; - } - SPROUT_CONSTEXPR reference operator*() const { - return is_sep ? sep_size : sprout::size(*current); - } - SPROUT_CONSTEXPR pointer operator->() const { - return &(is_sep ? sep_size : sprout::size(*current)); - } - SPROUT_CXX14_CONSTEXPR size_enum_iterator& operator++() { - if (is_sep) { - ++current; - is_sep = false; - } else { - is_sep = true; - } - return *this; - } - SPROUT_CXX14_CONSTEXPR size_enum_iterator operator++(int) { - size_enum_iterator result(*this); - if (is_sep) { - ++current; - is_sep = false; - } else { - is_sep = true; - } - return result; - } - SPROUT_CXX14_CONSTEXPR size_enum_iterator& operator--() { - if (is_sep) { - is_sep = false; - } else { - --current; - is_sep = true; - } - return *this; - } - SPROUT_CXX14_CONSTEXPR size_enum_iterator operator--(int) { - size_enum_iterator temp(*this); - if (is_sep) { - is_sep = false; - } else { - --current; - is_sep = true; - } - return temp; - } - SPROUT_CONSTEXPR size_enum_iterator operator+(difference_type n) const { - return size_enum_iterator(current + (n + is_sep) / 2, sep_size, (n + is_sep) % 2); - } - SPROUT_CONSTEXPR size_enum_iterator operator-(difference_type n) const { - return size_enum_iterator(current - (n - is_sep) / 2, sep_size, (n - is_sep) % 2); - } - SPROUT_CXX14_CONSTEXPR size_enum_iterator& operator+=(difference_type n) { - size_enum_iterator temp(current + (n + is_sep) / 2, sep_size, (n + is_sep) % 2); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR size_enum_iterator& operator-=(difference_type n) { - size_enum_iterator temp(current - (n - is_sep) / 2, sep_size, (n - is_sep) % 2); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR reference operator[](difference_type n) const { - return sprout::size(current[(n + is_sep) / 2]); - } - SPROUT_CONSTEXPR size_enum_iterator next() const { - return is_sep - ? size_enum_iterator(sprout::next(current), sep_size, false) - : size_enum_iterator(current, sep_size, true) - ; - } - SPROUT_CONSTEXPR size_enum_iterator prev() const { - return is_sep - ? size_enum_iterator(current, sep_size, false) - : size_enum_iterator(sprout::prev(current), sep_size, true) - ; - } - SPROUT_CXX14_CONSTEXPR void swap(size_enum_iterator& other) - SPROUT_NOEXCEPT_IF_EXPR(sprout::swap(current, other.current)) - { - sprout::swap(current, other.current); - sprout::swap(sep_size, other.sep_size); - sprout::swap(is_sep, other.is_sep); - } - }; - - template< - typename Iterator1, bool Separated1, - typename Iterator2, bool Separated2 - > - inline SPROUT_CONSTEXPR bool - operator==( - sprout::size_enum_iterator const& lhs, - sprout::size_enum_iterator const& rhs - ) - { - return lhs.base() == rhs.base() && lhs.is_separator() == rhs.is_separator(); - } - template< - typename Iterator1, bool Separated1, - typename Iterator2, bool Separated2 - > - inline SPROUT_CONSTEXPR bool - operator!=( - sprout::size_enum_iterator const& lhs, - sprout::size_enum_iterator const& rhs - ) - { - return !(lhs == rhs); - } - template< - typename Iterator1, bool Separated1, - typename Iterator2, bool Separated2 - > - inline SPROUT_CONSTEXPR bool - operator<( - sprout::size_enum_iterator const& lhs, - sprout::size_enum_iterator const& rhs - ) - { - return lhs.base() < rhs.base() - || (lhs.base() == rhs.base() && !lhs.is_separator() && rhs.is_separator()) - ; - } - template< - typename Iterator1, bool Separated1, - typename Iterator2, bool Separated2 - > - inline SPROUT_CONSTEXPR bool - operator>( - sprout::size_enum_iterator const& lhs, - sprout::size_enum_iterator const& rhs - ) - { - return rhs < lhs; - } - template< - typename Iterator1, bool Separated1, - typename Iterator2, bool Separated2 - > - inline SPROUT_CONSTEXPR bool - operator<=( - sprout::size_enum_iterator const& lhs, - sprout::size_enum_iterator const& rhs - ) - { - return !(rhs < lhs); - } - template< - typename Iterator1, bool Separated1, - typename Iterator2, bool Separated2 - > - inline SPROUT_CONSTEXPR bool - operator>=( - sprout::size_enum_iterator const& lhs, - sprout::size_enum_iterator const& rhs - ) - { - return !(lhs < rhs); - } - template - inline SPROUT_CONSTEXPR decltype(std::declval() - std::declval()) - operator-( - sprout::size_enum_iterator const& lhs, - sprout::size_enum_iterator const& rhs - ) - { - return lhs.base() - rhs.base(); - } - template - inline SPROUT_CONSTEXPR decltype(std::declval() - std::declval()) - operator-( - sprout::size_enum_iterator const& lhs, - sprout::size_enum_iterator const& rhs - ) - { - return lhs.base() - rhs.base() + ( - lhs.is_separator() - ? rhs.is_separator() ? 0 : -1 - : rhs.is_separator() ? 1 : 0 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::size_enum_iterator - operator+( - typename sprout::size_enum_iterator::difference_type n, - sprout::size_enum_iterator const& it - ) - { - return it + n; - } - - // - // make_size_enum_iterator - // - template - inline SPROUT_CONSTEXPR sprout::size_enum_iterator - make_size_enum_iterator(Iterator it) { - return sprout::size_enum_iterator(it); - } - template - inline SPROUT_CONSTEXPR sprout::size_enum_iterator - make_size_enum_iterator( - Iterator it, - typename sprout::size_enum_iterator::value_type sep_size, - bool sep = false - ) - { - return sprout::size_enum_iterator(it, sep_size, sep); - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::size_enum_iterator& lhs, sprout::size_enum_iterator& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::size_enum_iterator - iterator_next(sprout::size_enum_iterator const& it) { - return it.next(); - } - - // - // iterator_prev - // - template - inline SPROUT_CONSTEXPR sprout::size_enum_iterator - iterator_prev(sprout::size_enum_iterator const& it) { - return it.prev(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_SIZE_ENUM_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/square_iterator.hpp b/dsp/lib/sprout/sprout/iterator/square_iterator.hpp deleted file mode 100644 index cb51db9..0000000 --- a/dsp/lib/sprout/sprout/iterator/square_iterator.hpp +++ /dev/null @@ -1,241 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_SQUARE_ITERATOR_HPP -#define SPROUT_ITERATOR_SQUARE_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // square_iterator - // - template - class square_iterator - : public sprout::iterator< - std::random_access_iterator_tag, - Value, - std::ptrdiff_t, - Value*, - Value - > - { - public: - typedef std::random_access_iterator_tag iterator_category; - typedef Value value_type; - typedef std::ptrdiff_t difference_type; - typedef value_type* pointer; - typedef value_type reference; - private: - difference_type index_; - value_type frequency_; - value_type amplitude_; - value_type phase_; - value_type duty_; - private: - explicit SPROUT_CONSTEXPR square_iterator(square_iterator const& other, difference_type index) - : index_(index) - , frequency_(other.frequency_) - , amplitude_(other.amplitude_) - , phase_(other.phase_) - , duty_(other.duty_) - {} - public: - SPROUT_CONSTEXPR square_iterator() - : index_() - , frequency_(1) - , amplitude_(1) - , phase_(0) - , duty_(0.5) - {} - square_iterator(square_iterator const&) = default; - explicit SPROUT_CONSTEXPR square_iterator( - difference_type index, - value_type const& frequency = 1, - value_type const& amplitude = 1, - value_type const& phase = 0, - value_type const& duty = 0.5 - ) - : index_(index) - , frequency_(frequency) - , amplitude_(amplitude) - , phase_(phase) - , duty_(duty) - {} - template - SPROUT_CONSTEXPR square_iterator(square_iterator const& it) - : index_(it.index_) - , frequency_(it.frequency_) - , amplitude_(it.amplitude_) - , phase_(it.phase_) - , duty_(it.duty_) - {} - template - SPROUT_CXX14_CONSTEXPR square_iterator& operator=(square_iterator const& it) { - square_iterator temp(it); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR difference_type index() const { - return index_; - } - SPROUT_CONSTEXPR value_type const& frequency() const { - return frequency_; - } - SPROUT_CONSTEXPR value_type const& amplitude() const { - return amplitude_; - } - SPROUT_CONSTEXPR value_type const& phase() const { - return phase_; - } - SPROUT_CONSTEXPR value_type const& duty() const { - return duty_; - } - SPROUT_CONSTEXPR reference operator*() const { - return amplitude_ == 0 ? 0 - : sprout::detail::square_value(frequency_, amplitude_, phase_, duty_, index_) - ; - } - SPROUT_CONSTEXPR pointer operator->() const { - return &operator*()(); - } - SPROUT_CXX14_CONSTEXPR square_iterator& operator++() { - ++index_; - return *this; - } - SPROUT_CXX14_CONSTEXPR square_iterator operator++(int) { - square_iterator result(*this); - ++index_; - return result; - } - SPROUT_CXX14_CONSTEXPR square_iterator& operator--() { - --index_; - return *this; - } - SPROUT_CXX14_CONSTEXPR square_iterator operator--(int) { - square_iterator temp(*this); - --index_; - return temp; - } - SPROUT_CONSTEXPR square_iterator operator+(difference_type n) const { - return square_iterator(*this, index_ + n); - } - SPROUT_CONSTEXPR square_iterator operator-(difference_type n) const { - return square_iterator(*this, index_ - n); - } - SPROUT_CXX14_CONSTEXPR square_iterator& operator+=(difference_type n) { - square_iterator temp(*this, index_ + n); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR square_iterator& operator-=(difference_type n) { - square_iterator temp(*this, index_ - n); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR reference operator[](difference_type n) const { - return amplitude_ == 0 ? 0 - : sprout::detail::square_value(frequency_, amplitude_, phase_, duty_, index_ + n) - ; - } - SPROUT_CONSTEXPR square_iterator next() const { - return square_iterator(*this, index_ + 1); - } - SPROUT_CONSTEXPR square_iterator prev() const { - return square_iterator(*this, index_ - 1); - } - SPROUT_CXX14_CONSTEXPR void swap(square_iterator& other) SPROUT_NOEXCEPT { - sprout::swap(index_, other.index_); - sprout::swap(frequency_, other.frequency_); - sprout::swap(amplitude_, other.amplitude_); - sprout::swap(phase_, other.phase_); - sprout::swap(duty_, other.duty_); - } - }; - - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::square_iterator const& lhs, sprout::square_iterator const& rhs) { - return lhs.index() == rhs.index(); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::square_iterator const& lhs, sprout::square_iterator const& rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator<(sprout::square_iterator const& lhs, sprout::square_iterator const& rhs) { - return lhs.index() < rhs.index(); - } - template - inline SPROUT_CONSTEXPR bool - operator>(sprout::square_iterator const& lhs, sprout::square_iterator const& rhs) { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator<=(sprout::square_iterator const& lhs, sprout::square_iterator const& rhs) { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(sprout::square_iterator const& lhs, sprout::square_iterator const& rhs) { - return !(lhs < rhs); - } - template - inline SPROUT_CONSTEXPR typename sprout::square_iterator::difference_type - operator-(sprout::square_iterator const& lhs, sprout::square_iterator const& rhs) { - return lhs.index() - rhs.index(); - } - template - inline SPROUT_CONSTEXPR sprout::square_iterator - operator+(typename sprout::square_iterator::difference_type n, sprout::square_iterator const& it) { - return it + n; - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::square_iterator& lhs, sprout::square_iterator& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::square_iterator - iterator_next(sprout::square_iterator const& it) { - return it.next(); - } - - // - // iterator_prev - // - template - inline SPROUT_CONSTEXPR sprout::square_iterator - iterator_prev(sprout::square_iterator const& it) { - return it.prev(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_SQUARE_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/step_iterator.hpp b/dsp/lib/sprout/sprout/iterator/step_iterator.hpp deleted file mode 100644 index 58d2710..0000000 --- a/dsp/lib/sprout/sprout/iterator/step_iterator.hpp +++ /dev/null @@ -1,258 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_STEP_ITERATOR_HPP -#define SPROUT_ITERATOR_STEP_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - // - // step_iterator - // - template - class step_iterator - : public sprout::detail::iterator_base::type - { - private: - typedef typename sprout::detail::iterator_base::type base_type; - public: - typedef Iterator iterator_type; - typedef typename base_type::iterator_category iterator_category; - typedef typename base_type::value_type value_type; - typedef typename base_type::difference_type difference_type; - typedef typename base_type::pointer pointer; - typedef typename base_type::reference reference; - private: - static SPROUT_CONSTEXPR iterator_type get_back(iterator_type it, difference_type wid, iterator_type last) { - return sprout::next(it, (sprout::distance(it, last) - 1) / wid * wid); - } - static SPROUT_CONSTEXPR difference_type next_distance(step_iterator const& it, difference_type n) { - return n >= 0 ? NS_SSCRISK_CEL_OR_SPROUT::min(sprout::distance(it.current, it.back), n * it.wid) - : it.is_last ? 0 - : NS_SSCRISK_CEL_OR_SPROUT::max(-sprout::distance(it.current, it.back), n * it.wid) - ; - } - protected: - iterator_type current; - iterator_type last; - difference_type wid; - private: - iterator_type back; - bool is_last; - private: - SPROUT_CONSTEXPR step_iterator(step_iterator const& other, difference_type n) - : current(sprout::next(other.current, next_distance(other, n))), last(other.last), wid(other.wid) - , back(other.back), is_last(next_distance(other, n) == 0) - {} - public: - SPROUT_CONSTEXPR step_iterator() - : current(), last(), wid(1) - , back(), is_last() - {} - SPROUT_CONSTEXPR step_iterator(step_iterator const& other) - : current(other.current), last(other.last), wid(other.wid) - , back(other.back), is_last(other.is_last) - {} - explicit SPROUT_CONSTEXPR step_iterator(iterator_type it, difference_type wid = 1, iterator_type last = iterator_type()) - : current(it), last(last), wid(wid) - , back(get_back(it, wid, last)), is_last(it == last) - {} - template - SPROUT_CONSTEXPR step_iterator(step_iterator const& it) - : current(it.base()), last(it.end()), wid(it.width()) - , back(get_back(it.base(), it.width(), it.end())), is_last(it.is_end()) - {} - template - SPROUT_CXX14_CONSTEXPR step_iterator& operator=(step_iterator const& it) { - step_iterator temp(it); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR iterator_type base() const { - return current; - } - SPROUT_CONSTEXPR difference_type width() const { - return wid; - } - SPROUT_CONSTEXPR iterator_type end() const { - return last; - } - SPROUT_CONSTEXPR bool is_end() const { - return is_last; - } - SPROUT_CONSTEXPR reference operator*() const { - return *current; - } - SPROUT_CONSTEXPR pointer operator->() const { - return &*current; - } - SPROUT_CXX14_CONSTEXPR step_iterator& operator++() { - if (current == back) { - is_last = true; - } - current += next_distance(*this, 1); - return *this; - } - SPROUT_CXX14_CONSTEXPR step_iterator operator++(int) { - step_iterator result(*this); - if (current == back) { - is_last = true; - } - current += next_distance(*this, 1); - return result; - } - SPROUT_CXX14_CONSTEXPR step_iterator& operator--() { - current += next_distance(*this, -1); - if (current != back) { - is_last = false; - } - return *this; - } - SPROUT_CXX14_CONSTEXPR step_iterator operator--(int) { - step_iterator temp(*this); - current += next_distance(*this, -1); - if (current != back) { - is_last = false; - } - return temp; - } - SPROUT_CONSTEXPR step_iterator operator+(difference_type n) const { - return step_iterator(*this, n); - } - SPROUT_CONSTEXPR step_iterator operator-(difference_type n) const { - return step_iterator(*this, -n); - } - SPROUT_CXX14_CONSTEXPR step_iterator& operator+=(difference_type n) { - step_iterator temp(*this, n); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR step_iterator& operator-=(difference_type n) { - step_iterator temp(*this, -n); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR reference operator[](difference_type n) const { - return *(current + n * wid); - } - SPROUT_CONSTEXPR step_iterator next() const { - return step_iterator(*this, 1); - } - SPROUT_CONSTEXPR step_iterator prev() const { - return step_iterator(*this, -1); - } - SPROUT_CXX14_CONSTEXPR void swap(step_iterator& other) - SPROUT_NOEXCEPT_IF( - SPROUT_NOEXCEPT_EXPR(swap(current, other.current)) - && SPROUT_NOEXCEPT_EXPR(swap(last, other.last)) - && SPROUT_NOEXCEPT_EXPR(swap(wid, other.wid)) - && SPROUT_NOEXCEPT_EXPR(swap(back, other.back)) - && SPROUT_NOEXCEPT_EXPR(swap(wid, other.wid)) - && SPROUT_NOEXCEPT_EXPR(swap(is_last, other.is_last)) - ) - { - swap(current, other.current); - swap(last, other.last); - swap(wid, other.wid); - swap(back, other.back); - swap(is_last, other.is_last); - } - }; - - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::step_iterator const& lhs, sprout::step_iterator const& rhs) { - return lhs.base() == rhs.base() && lhs.is_end() == rhs.is_end(); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::step_iterator const& lhs, sprout::step_iterator const& rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator<(sprout::step_iterator const& lhs, sprout::step_iterator const& rhs) { - return lhs.base() < rhs.base() || (lhs.base() == rhs.base() && !lhs.is_end() && rhs.is_end()); - } - template - inline SPROUT_CONSTEXPR bool - operator>(sprout::step_iterator const& lhs, sprout::step_iterator const& rhs) { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator<=(sprout::step_iterator const& lhs, sprout::step_iterator const& rhs) { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(sprout::step_iterator const& lhs, sprout::step_iterator const& rhs) { - return !(lhs < rhs); - } - template - inline SPROUT_CONSTEXPR decltype(std::declval() - std::declval()) - operator-(sprout::step_iterator const& lhs, sprout::step_iterator const& rhs) { - return (lhs.base() - rhs.base()) / lhs.width() + (lhs.is_end() ? 1 : 0) - (rhs.is_end() ? 1 : 0); - } - template - inline SPROUT_CONSTEXPR sprout::step_iterator - operator+( - typename sprout::step_iterator::difference_type n, - sprout::step_iterator const& it - ) - { - return it + n; - } - - // - // make_step_iterator - // - template - inline SPROUT_CONSTEXPR sprout::step_iterator - make_step_iterator(Iterator it, typename sprout::step_iterator::difference_type wid = 1) { - return sprout::step_iterator(it, wid); - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::step_iterator& lhs, sprout::step_iterator& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::step_iterator - iterator_next(sprout::step_iterator const& it) { - return it.next(); - } - - // - // iterator_prev - // - template - inline SPROUT_CONSTEXPR sprout::step_iterator - iterator_prev(sprout::step_iterator const& it) { - return it.prev(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_STEP_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/string.hpp b/dsp/lib/sprout/sprout/iterator/string.hpp deleted file mode 100644 index f61a2b6..0000000 --- a/dsp/lib/sprout/sprout/iterator/string.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_STRING_HPP -#define SPROUT_ITERATOR_STRING_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_ITERATOR_STRING_HPP diff --git a/dsp/lib/sprout/sprout/iterator/to_lower_iterator.hpp b/dsp/lib/sprout/sprout/iterator/to_lower_iterator.hpp deleted file mode 100644 index 0e11fbc..0000000 --- a/dsp/lib/sprout/sprout/iterator/to_lower_iterator.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_TO_LOWER_ITERATOR_HPP -#define SPROUT_ITERATOR_TO_LOWER_ITERATOR_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // make_to_lower_iterator - // - template - inline SPROUT_CONSTEXPR sprout::transform_iterator::value_type>, Iterator> - make_to_lower_iterator(Iterator it) { - return sprout::transform_iterator::value_type>, Iterator>( - it, sprout::ctypes::to_lower::value_type>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_TO_LOWER_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/to_upper_iterator.hpp b/dsp/lib/sprout/sprout/iterator/to_upper_iterator.hpp deleted file mode 100644 index 526f202..0000000 --- a/dsp/lib/sprout/sprout/iterator/to_upper_iterator.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_TO_UPPER_ITERATOR_HPP -#define SPROUT_ITERATOR_TO_UPPER_ITERATOR_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // make_to_upper_iterator - // - template - inline SPROUT_CONSTEXPR sprout::transform_iterator::value_type>, Iterator> - make_to_upper_iterator(Iterator it) { - return sprout::transform_iterator::value_type>, Iterator>( - it, sprout::ctypes::to_upper::value_type>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_TO_UPPER_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/transform_iterator.hpp b/dsp/lib/sprout/sprout/iterator/transform_iterator.hpp deleted file mode 100644 index 68d9aab..0000000 --- a/dsp/lib/sprout/sprout/iterator/transform_iterator.hpp +++ /dev/null @@ -1,433 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_TRANSFORM_ITERATOR_HPP -#define SPROUT_ITERATOR_TRANSFORM_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // transform_iterator - // - template - class transform_iterator - : public sprout::iterator< - typename sprout::common_iterator_category::type, - typename std::remove_reference< - typename sprout::result_of< - BinaryFunction ( - typename std::iterator_traits::reference, - typename std::iterator_traits::reference - ) - >::type - >::type, - typename std::iterator_traits::difference_type, - typename std::remove_reference< - typename sprout::result_of< - BinaryFunction ( - typename std::iterator_traits::reference, - typename std::iterator_traits::reference - ) - >::type - >::type*, - typename sprout::result_of< - BinaryFunction ( - typename std::iterator_traits::reference, - typename std::iterator_traits::reference - ) - >::type - > - { - public: - typedef BinaryFunction functor_type; - typedef LIterator iterator_type; - typedef RIterator iterator2_type; - typedef typename sprout::common_iterator_category::type iterator_category; - typedef typename sprout::result_of< - BinaryFunction ( - typename std::iterator_traits::reference, - typename std::iterator_traits::reference - ) - >::type reference; - typedef typename std::remove_reference::type value_type; - typedef typename std::iterator_traits::difference_type difference_type; - typedef value_type* pointer; - protected: - iterator_type current; - iterator2_type current2; - BinaryFunction func; - public: - SPROUT_CONSTEXPR transform_iterator() - : current(), current2(), func() - {} - transform_iterator(transform_iterator const&) = default; - SPROUT_CONSTEXPR transform_iterator(iterator_type it, iterator2_type it2) - : current(it) - , current2(it2) - {} - SPROUT_CONSTEXPR transform_iterator(iterator_type it, iterator2_type it2, BinaryFunction func) - : current(it) - , current2(it2) - , func(func) - {} - template - SPROUT_CONSTEXPR transform_iterator(transform_iterator const& it) - : current(it.current) - , current2(it.current2) - , func(it.func) - {} - template - SPROUT_CXX14_CONSTEXPR transform_iterator& operator=(transform_iterator const& it) { - transform_iterator temp(it); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR iterator_type base() const { - return current; - } - SPROUT_CONSTEXPR iterator_type base2() const { - return current2; - } - SPROUT_CONSTEXPR BinaryFunction functor() const { - return func; - } - SPROUT_CONSTEXPR reference operator*() const { - return func(*current, *current2); - } - SPROUT_CONSTEXPR pointer operator->() const { - return &func(*current, *current2); - } - SPROUT_CXX14_CONSTEXPR transform_iterator& operator++() { - ++current; - ++current2; - return *this; - } - SPROUT_CXX14_CONSTEXPR transform_iterator operator++(int) { - transform_iterator result(*this); - ++current; - ++current2; - return result; - } - SPROUT_CXX14_CONSTEXPR transform_iterator& operator--() { - --current; - --current2; - return *this; - } - SPROUT_CXX14_CONSTEXPR transform_iterator operator--(int) { - transform_iterator temp(*this); - --current; - --current2; - return temp; - } - SPROUT_CONSTEXPR transform_iterator operator+(difference_type n) const { - return transform_iterator(current + n, current2 + n, func); - } - SPROUT_CONSTEXPR transform_iterator operator-(difference_type n) const { - return transform_iterator(current - n, current2 - n, func); - } - SPROUT_CXX14_CONSTEXPR transform_iterator& operator+=(difference_type n) { - transform_iterator temp(current + n, current2 + n, func); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR transform_iterator& operator-=(difference_type n) { - transform_iterator temp(current - n, current2 - n, func); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR reference operator[](difference_type n) const { - return func(current[n], current2[n]); - } - SPROUT_CONSTEXPR transform_iterator next() const { - return transform_iterator(sprout::next(current), sprout::next(current2), func); - } - SPROUT_CONSTEXPR transform_iterator prev() const { - return transform_iterator(sprout::prev(current), sprout::prev(current2), func); - } - SPROUT_CXX14_CONSTEXPR void swap(transform_iterator& other) - SPROUT_NOEXCEPT_IF( - SPROUT_NOEXCEPT_EXPR(sprout::swap(current, other.current)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(current2, other.current2)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(func, other.func)) - ) - { - sprout::swap(current, other.current); - sprout::swap(current2, other.current2); - sprout::swap(func, other.func); - } - }; - - // - // transform_iterator - // - template - class transform_iterator - : public sprout::iterator< - typename std::iterator_traits::iterator_category, - typename std::remove_reference< - typename sprout::result_of< - UnaryFunction (typename std::iterator_traits::reference) - >::type - >::type, - typename std::iterator_traits::difference_type, - typename std::remove_reference< - typename sprout::result_of< - UnaryFunction (typename std::iterator_traits::reference) - >::type - >::type*, - typename sprout::result_of< - UnaryFunction (typename std::iterator_traits::reference) - >::type - > - { - public: - typedef UnaryFunction functor_type; - typedef Iterator iterator_type; - typedef typename std::iterator_traits::iterator_category iterator_category; - typedef typename sprout::result_of< - UnaryFunction (typename std::iterator_traits::reference) - >::type reference; - typedef typename std::remove_reference::type value_type; - typedef typename std::iterator_traits::difference_type difference_type; - typedef value_type* pointer; - protected: - iterator_type current; - UnaryFunction func; - public: - SPROUT_CONSTEXPR transform_iterator() - : current(), func() - {} - transform_iterator(transform_iterator const&) = default; - explicit SPROUT_CONSTEXPR transform_iterator(iterator_type it) - : current(it) - {} - SPROUT_CONSTEXPR transform_iterator(iterator_type it, UnaryFunction func) - : current(it) - , func(func) - {} - template - SPROUT_CONSTEXPR transform_iterator(transform_iterator const& it) - : current(it.current) - , func(it.func) - {} - template - SPROUT_CXX14_CONSTEXPR transform_iterator& operator=(transform_iterator const& it) { - transform_iterator temp(it); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR iterator_type base() const { - return current; - } - SPROUT_CONSTEXPR UnaryFunction functor() const { - return func; - } - SPROUT_CONSTEXPR reference operator*() const { - return func(*current); - } - SPROUT_CONSTEXPR pointer operator->() const { - return &func(*current); - } - SPROUT_CXX14_CONSTEXPR transform_iterator& operator++() { - ++current; - return *this; - } - SPROUT_CXX14_CONSTEXPR transform_iterator operator++(int) { - transform_iterator result(*this); - ++current; - return result; - } - SPROUT_CXX14_CONSTEXPR transform_iterator& operator--() { - --current; - return *this; - } - SPROUT_CXX14_CONSTEXPR transform_iterator operator--(int) { - transform_iterator temp(*this); - --current; - return temp; - } - SPROUT_CONSTEXPR transform_iterator operator+(difference_type n) const { - return transform_iterator(current + n, func); - } - SPROUT_CONSTEXPR transform_iterator operator-(difference_type n) const { - return transform_iterator(current - n, func); - } - SPROUT_CXX14_CONSTEXPR transform_iterator& operator+=(difference_type n) { - transform_iterator temp(current + n, func); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR transform_iterator& operator-=(difference_type n) { - transform_iterator temp(current - n, func); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR reference operator[](difference_type n) const { - return func(current[n]); - } - SPROUT_CONSTEXPR transform_iterator next() const { - return transform_iterator(sprout::next(current), func); - } - SPROUT_CONSTEXPR transform_iterator prev() const { - return transform_iterator(sprout::prev(current), func); - } - SPROUT_CXX14_CONSTEXPR void swap(transform_iterator& other) - SPROUT_NOEXCEPT_IF( - SPROUT_NOEXCEPT_EXPR(sprout::swap(current, other.current)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(func, other.func)) - ) - { - sprout::swap(current, other.current); - sprout::swap(func, other.func); - } - }; - - template< - typename UnaryOrBinaryFunction1, typename LIterator1, typename RIterator1, - typename UnaryOrBinaryFunction2, typename LIterator2, typename RIterator2 - > - inline SPROUT_CONSTEXPR bool operator==( - sprout::transform_iterator const& lhs, - sprout::transform_iterator const& rhs - ) - { - return lhs.base() == rhs.base(); - } - template< - typename UnaryOrBinaryFunction1, typename LIterator1, typename RIterator1, - typename UnaryOrBinaryFunction2, typename LIterator2, typename RIterator2 - > - inline SPROUT_CONSTEXPR bool operator!=( - sprout::transform_iterator const& lhs, - sprout::transform_iterator const& rhs - ) - { - return !(lhs == rhs); - } - template< - typename UnaryOrBinaryFunction1, typename LIterator1, typename RIterator1, - typename UnaryOrBinaryFunction2, typename LIterator2, typename RIterator2 - > - inline SPROUT_CONSTEXPR bool operator<( - sprout::transform_iterator const& lhs, - sprout::transform_iterator const& rhs - ) - { - return lhs.base() < rhs.base(); - } - template< - typename UnaryOrBinaryFunction1, typename LIterator1, typename RIterator1, - typename UnaryOrBinaryFunction2, typename LIterator2, typename RIterator2 - > - inline SPROUT_CONSTEXPR bool operator>( - sprout::transform_iterator const& lhs, - sprout::transform_iterator const& rhs - ) - { - return rhs < lhs; - } - template< - typename UnaryOrBinaryFunction1, typename LIterator1, typename RIterator1, - typename UnaryOrBinaryFunction2, typename LIterator2, typename RIterator2 - > - inline SPROUT_CONSTEXPR bool operator<=( - sprout::transform_iterator const& lhs, - sprout::transform_iterator const& rhs - ) - { - return !(rhs < lhs); - } - template< - typename UnaryOrBinaryFunction1, typename LIterator1, typename RIterator1, - typename UnaryOrBinaryFunction2, typename LIterator2, typename RIterator2 - > - inline SPROUT_CONSTEXPR bool operator>=( - sprout::transform_iterator const& lhs, - sprout::transform_iterator const& rhs - ) - { - return !(lhs < rhs); - } - template< - typename UnaryOrBinaryFunction1, typename LIterator1, typename RIterator1, - typename UnaryOrBinaryFunction2, typename LIterator2, typename RIterator2 - > - inline SPROUT_CONSTEXPR decltype(std::declval() - std::declval()) operator-( - sprout::transform_iterator const& lhs, - sprout::transform_iterator const& rhs - ) - { - return lhs.base() - rhs.base(); - } - template - inline SPROUT_CONSTEXPR sprout::transform_iterator operator+( - typename sprout::transform_iterator::difference_type n, - sprout::transform_iterator const& it - ) - { - return it + n; - } - - // - // make_transform_iterator - // - template - inline SPROUT_CONSTEXPR sprout::transform_iterator - make_transform_iterator(LIterator it1, RIterator it2, BinaryFunction func) { - return sprout::transform_iterator(it1, it2, func); - } - template - inline SPROUT_CONSTEXPR sprout::transform_iterator - make_transform_iterator(Iterator it, UnaryFunction func) { - return sprout::transform_iterator(it, func); - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap( - sprout::transform_iterator& lhs, - sprout::transform_iterator& rhs - ) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::transform_iterator - iterator_next(sprout::transform_iterator const& it) { - return it.next(); - } - - // - // iterator_prev - // - template - inline SPROUT_CONSTEXPR sprout::transform_iterator - iterator_prev(sprout::transform_iterator const& it) { - return it.prev(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_TRANSFORM_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/triangle_iterator.hpp b/dsp/lib/sprout/sprout/iterator/triangle_iterator.hpp deleted file mode 100644 index c836c14..0000000 --- a/dsp/lib/sprout/sprout/iterator/triangle_iterator.hpp +++ /dev/null @@ -1,255 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_TRIANGLE_ITERATOR_HPP -#define SPROUT_ITERATOR_TRIANGLE_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // triangle_iterator - // - template - class triangle_iterator - : public sprout::iterator< - std::random_access_iterator_tag, - Value, - std::ptrdiff_t, - Value*, - Value - > - { - public: - typedef std::random_access_iterator_tag iterator_category; - typedef Value value_type; - typedef std::ptrdiff_t difference_type; - typedef value_type* pointer; - typedef value_type reference; - private: - difference_type index_; - value_type frequency_; - value_type amplitude_; - value_type phase_; - private: - explicit SPROUT_CONSTEXPR triangle_iterator(triangle_iterator const& other, difference_type index) - : index_(index) - , frequency_(other.frequency_) - , amplitude_(other.amplitude_) - , phase_(other.phase_) - {} - public: - SPROUT_CONSTEXPR triangle_iterator() - : index_() - , frequency_(1) - , amplitude_(1) - , phase_(0) - {} - triangle_iterator(triangle_iterator const&) = default; - explicit SPROUT_CONSTEXPR triangle_iterator( - difference_type index, - value_type const& frequency = 1, - value_type const& amplitude = 1, - value_type const& phase = 0 - ) - : index_(index) - , frequency_(frequency) - , amplitude_(amplitude) - , phase_(phase) - {} - template - SPROUT_CONSTEXPR triangle_iterator(triangle_iterator const& it) - : index_(it.index_) - , frequency_(it.frequency_) - , amplitude_(it.amplitude_) - , phase_(it.phase_) - {} - template - SPROUT_CXX14_CONSTEXPR triangle_iterator& operator=(triangle_iterator const& it) { - triangle_iterator temp(it); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR difference_type index() const { - return index_; - } - SPROUT_CONSTEXPR value_type const& frequency() const { - return frequency_; - } - SPROUT_CONSTEXPR value_type const& amplitude() const { - return amplitude_; - } - SPROUT_CONSTEXPR value_type const& phase() const { - return phase_; - } - SPROUT_CONSTEXPR reference operator*() const { - return amplitude_ == 0 ? 0 - : sprout::detail::triangle_value(frequency_, amplitude_, phase_, index_) - ; - } - SPROUT_CONSTEXPR pointer operator->() const { - return &operator*()(); - } - SPROUT_CXX14_CONSTEXPR triangle_iterator& operator++() { - ++index_; - return *this; - } - SPROUT_CXX14_CONSTEXPR triangle_iterator operator++(int) { - triangle_iterator result(*this); - ++index_; - return result; - } - SPROUT_CXX14_CONSTEXPR triangle_iterator& operator--() { - --index_; - return *this; - } - SPROUT_CXX14_CONSTEXPR triangle_iterator operator--(int) { - triangle_iterator temp(*this); - --index_; - return temp; - } - SPROUT_CONSTEXPR triangle_iterator operator+(difference_type n) const { - return triangle_iterator(*this, index_ + n); - } - SPROUT_CONSTEXPR triangle_iterator operator-(difference_type n) const { - return triangle_iterator(*this, index_ - n); - } - SPROUT_CXX14_CONSTEXPR triangle_iterator& operator+=(difference_type n) { - triangle_iterator temp(*this, index_ + n); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR triangle_iterator& operator-=(difference_type n) { - triangle_iterator temp(*this, index_ - n); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR reference operator[](difference_type n) const { - return amplitude_ == 0 ? 0 - : sprout::detail::triangle_value(frequency_, amplitude_, phase_, index_ + n) - ; - } - SPROUT_CONSTEXPR triangle_iterator next() const { - return triangle_iterator(*this, index_ + 1); - } - SPROUT_CONSTEXPR triangle_iterator prev() const { - return triangle_iterator(*this, index_ - 1); - } - SPROUT_CXX14_CONSTEXPR void swap(triangle_iterator& other) SPROUT_NOEXCEPT { - sprout::swap(index_, other.index_); - sprout::swap(frequency_, other.frequency_); - sprout::swap(amplitude_, other.amplitude_); - sprout::swap(phase_, other.phase_); - } - }; - - template - inline SPROUT_CONSTEXPR bool operator==( - sprout::triangle_iterator const& lhs, - sprout::triangle_iterator const& rhs - ) - { - return lhs.index() == rhs.index(); - } - template - inline SPROUT_CONSTEXPR bool operator!=( - sprout::triangle_iterator const& lhs, - sprout::triangle_iterator const& rhs - ) - { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool operator<( - sprout::triangle_iterator const& lhs, - sprout::triangle_iterator const& rhs - ) - { - return lhs.index() < rhs.index(); - } - template - inline SPROUT_CONSTEXPR bool operator>( - sprout::triangle_iterator const& lhs, - sprout::triangle_iterator const& rhs - ) - { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR bool operator<=( - sprout::triangle_iterator const& lhs, - sprout::triangle_iterator const& rhs - ) - { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR bool operator>=( - sprout::triangle_iterator const& lhs, - sprout::triangle_iterator const& rhs - ) - { - return !(lhs < rhs); - } - template - inline SPROUT_CONSTEXPR typename sprout::triangle_iterator::difference_type operator-( - sprout::triangle_iterator const& lhs, - sprout::triangle_iterator const& rhs - ) - { - return lhs.index() - rhs.index(); - } - template - inline SPROUT_CONSTEXPR sprout::triangle_iterator operator+( - typename sprout::triangle_iterator::difference_type n, - sprout::triangle_iterator const& it - ) - { - return it + n; - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::triangle_iterator& lhs, sprout::triangle_iterator& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::triangle_iterator - iterator_next(sprout::triangle_iterator const& it) { - return it.next(); - } - - // - // iterator_prev - // - template - inline SPROUT_CONSTEXPR sprout::triangle_iterator - iterator_prev(sprout::triangle_iterator const& it) { - return it.prev(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_TRIANGLE_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/type_traits.hpp b/dsp/lib/sprout/sprout/iterator/type_traits.hpp deleted file mode 100644 index 44c3366..0000000 --- a/dsp/lib/sprout/sprout/iterator/type_traits.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_TYPE_TRAITS_HPP -#define SPROUT_ITERATOR_TYPE_TRAITS_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_ITERATOR_TYPE_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/iterator/type_traits/category.hpp b/dsp/lib/sprout/sprout/iterator/type_traits/category.hpp deleted file mode 100644 index 4c9dceb..0000000 --- a/dsp/lib/sprout/sprout/iterator/type_traits/category.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_TYPE_TRAITS_CATEGORY_HPP -#define SPROUT_ITERATOR_TYPE_TRAITS_CATEGORY_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ITERATOR_TYPE_TRAITS_CATEGORY_HPP diff --git a/dsp/lib/sprout/sprout/iterator/type_traits/common.hpp b/dsp/lib/sprout/sprout/iterator/type_traits/common.hpp deleted file mode 100644 index 547f52f..0000000 --- a/dsp/lib/sprout/sprout/iterator/type_traits/common.hpp +++ /dev/null @@ -1,186 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_TYPE_TRAITS_COMMON_HPP -#define SPROUT_ITERATOR_TYPE_TRAITS_COMMON_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - struct iterator_category_hierarchy_impl; - template - struct iterator_category_hierarchy_impl - : public sprout::integral_constant - {}; - template - struct iterator_category_hierarchy_impl - : public sprout::integral_constant - {}; - template - struct iterator_category_hierarchy_impl - : public sprout::integral_constant - {}; - template - struct iterator_category_hierarchy_impl - : public sprout::integral_constant - {}; - - template - struct iterator_category_hierarchy - : public sprout::detail::iterator_category_hierarchy_impl< - Category, - sprout::is_random_access_iterator_category::value, - sprout::is_bidirectional_iterator_category::value, - sprout::is_forward_iterator_category::value, - sprout::is_input_iterator_category::value || sprout::is_output_iterator_category::value - > - {}; - - template - struct iterator_category_less - : public sprout::bool_constant< - (sprout::detail::iterator_category_hierarchy::value < sprout::detail::iterator_category_hierarchy::value) - > - {}; - } // namespace detail - // - // min_iterator_category - // - template - struct min_iterator_category; - template - struct min_iterator_category - : public sprout::identity - {}; - template - struct min_iterator_category - : public std::conditional< - sprout::detail::iterator_category_less::value, - Category1, Category2 - > - {}; - template - struct min_iterator_category - : public sprout::min_iterator_category< - Head, - typename sprout::min_iterator_category::type - > - {}; - - // - // common_iterator_category - // - template - struct common_iterator_category - : public sprout::min_iterator_category< - typename std::iterator_traits::iterator_category... - > - {}; - - namespace detail { - template - struct common_iterator_reference_impl; - template - struct common_iterator_reference_impl { - public: - typedef T type; - }; - template - struct common_iterator_reference_impl - : public std::conditional< - std::is_reference::value && std::is_reference::value, - typename std::conditional< - std::is_convertible::value - && (std::is_same::type, typename std::decay::type>::value - || std::is_base_of::type, typename std::decay::type>::value - ) - , - U, - typename std::conditional< - std::is_convertible::value - && (std::is_same::type, typename std::decay::type>::value - || std::is_base_of::type, typename std::decay::type>::value - ) - , - T, - typename sprout::common_decay::type - >::type - >::type, - typename sprout::common_decay::type - > - {}; - template - struct common_iterator_reference_impl - : public sprout::detail::common_iterator_reference_impl< - typename sprout::detail::common_iterator_reference_impl::type, - Tail... - > - {}; - } // namespace detail - // - // common_iterator_reference - // - template - struct common_iterator_reference - : public sprout::detail::common_iterator_reference_impl< - typename std::iterator_traits::reference... - > - {}; - - // - // common_iterator_value_type - // - template - struct common_iterator_value_type - : public std::decay< - typename sprout::common_iterator_reference::type - > - {}; - - // - // common_iterator_pointer - // - template - struct common_iterator_pointer - : public std::add_pointer< - typename std::remove_reference::type>::type - > - {}; - - // - // common_iterator_difference_type - // - template - struct common_iterator_difference_type - : public sprout::common_decay::difference_type...> - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using min_iterator_category_t = typename sprout::min_iterator_category::type; - template - using common_iterator_category_t = typename sprout::common_iterator_category::type; - template - using common_iterator_reference_t = typename sprout::common_iterator_reference::type; - template - using common_iterator_value_type_t = typename sprout::common_iterator_value_type::type; - template - using common_iterator_pointer_t = typename sprout::common_iterator_pointer::type; - template - using common_iterator_difference_type_t = typename sprout::common_iterator_difference_type::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_TYPE_TRAITS_COMMON_HPP diff --git a/dsp/lib/sprout/sprout/iterator/type_traits/is_constant_distance_iterator.hpp b/dsp/lib/sprout/sprout/iterator/type_traits/is_constant_distance_iterator.hpp deleted file mode 100644 index 369e706..0000000 --- a/dsp/lib/sprout/sprout/iterator/type_traits/is_constant_distance_iterator.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_TYPE_TRAITS_IS_CONSTANT_DISTANCE_ITERATOR_HPP -#define SPROUT_ITERATOR_TYPE_TRAITS_IS_CONSTANT_DISTANCE_ITERATOR_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // is_constant_distance_iterator - // - template - struct is_constant_distance_iterator - : public sprout::bool_constant< -#ifdef SPROUT_NO_CXX14_CONSTEXPR - sprout::is_random_access_iterator::value && !std::is_pointer::value -#else // #ifdef SPROUT_NO_CXX14_CONSTEXPR - sprout::is_random_access_iterator::value -#endif // #ifdef SPROUT_NO_CXX14_CONSTEXPR - > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_constant_distance_iterator_v = sprout::is_constant_distance_iterator::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_TYPE_TRAITS_IS_CONSTANT_DISTANCE_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/type_traits/is_iterator.hpp b/dsp/lib/sprout/sprout/iterator/type_traits/is_iterator.hpp deleted file mode 100644 index aa9015b..0000000 --- a/dsp/lib/sprout/sprout/iterator/type_traits/is_iterator.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_TYPE_TRAITS_IS_ITERATOR_HPP -#define SPROUT_ITERATOR_TYPE_TRAITS_IS_ITERATOR_HPP - -#include -#include -#include - -namespace sprout { - namespace detail { - // - // has_iterator_category - // - SPROUT_HAS_XXX_TYPE_DEF_LAZY(iterator_category); - } // namespace detail - - // - // is_iterator - // - template - struct is_iterator - : public sprout::detail::has_iterator_category > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_iterator_v = sprout::is_iterator::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_TYPE_TRAITS_IS_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/type_traits/is_iterator_category_of.hpp b/dsp/lib/sprout/sprout/iterator/type_traits/is_iterator_category_of.hpp deleted file mode 100644 index f5a0f3d..0000000 --- a/dsp/lib/sprout/sprout/iterator/type_traits/is_iterator_category_of.hpp +++ /dev/null @@ -1,76 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_TYPE_TRAITS_IS_ITERATOR_CATEGORY_OF_HPP -#define SPROUT_ITERATOR_TYPE_TRAITS_IS_ITERATOR_CATEGORY_OF_HPP - -#include -#include -#include - -namespace sprout { - // - // is_iterator_category_of - // - template - struct is_iterator_category_of - : public sprout::is_convertible - {}; - - // - // is_input_iterator_category - // - template - struct is_input_iterator_category - : public sprout::is_iterator_category_of - {}; - // - // is_output_iterator_category - // - template - struct is_output_iterator_category - : public sprout::is_iterator_category_of - {}; - // - // is_forward_iterator_category - // - template - struct is_forward_iterator_category - : public sprout::is_iterator_category_of - {}; - // - // is_bidirectional_iterator_category - // - template - struct is_bidirectional_iterator_category - : public sprout::is_iterator_category_of - {}; - // - // is_random_access_iterator_category - // - template - struct is_random_access_iterator_category - : public sprout::is_iterator_category_of - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_iterator_category_of_v = sprout::is_iterator_category_of::value; - template - SPROUT_STATIC_CONSTEXPR bool is_input_iterator_category_v = sprout::is_input_iterator_category::value; - template - SPROUT_STATIC_CONSTEXPR bool is_output_iterator_category_v = sprout::is_output_iterator_category::value; - template - SPROUT_STATIC_CONSTEXPR bool is_forward_iterator_category_v = sprout::is_forward_iterator_category::value; - template - SPROUT_STATIC_CONSTEXPR bool is_bidirectional_iterator_category_v = sprout::is_bidirectional_iterator_category::value; - template - SPROUT_STATIC_CONSTEXPR bool is_random_access_iterator_category_v = sprout::is_random_access_iterator_category::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_TYPE_TRAITS_IS_ITERATOR_CATEGORY_OF_HPP diff --git a/dsp/lib/sprout/sprout/iterator/type_traits/is_iterator_of.hpp b/dsp/lib/sprout/sprout/iterator/type_traits/is_iterator_of.hpp deleted file mode 100644 index fab4520..0000000 --- a/dsp/lib/sprout/sprout/iterator/type_traits/is_iterator_of.hpp +++ /dev/null @@ -1,106 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_TYPE_TRAITS_IS_ITERATOR_OF_HPP -#define SPROUT_ITERATOR_TYPE_TRAITS_IS_ITERATOR_OF_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - struct is_iterator_of_impl - : public sprout::false_type - {}; - template - struct is_iterator_of_impl< - MaybeIterator, Category, - typename std::enable_if::value>::type - > - : public sprout::is_iterator_category_of::iterator_category, Category> - {}; - } // namespace detail - - // - // is_iterator_of - // - template - struct is_iterator_of - : public sprout::detail::is_iterator_of_impl - {}; - - // - // is_input_iterator - // - template - struct is_input_iterator - : public sprout::is_iterator_of - {}; - // - // is_output_iterator - // - template - struct is_output_iterator - : public sprout::is_iterator_of - {}; - // - // is_forward_iterator - // - template - struct is_forward_iterator - : public sprout::is_iterator_of - {}; - // - // is_bidirectional_iterator - // - template - struct is_bidirectional_iterator - : public sprout::is_iterator_of - {}; - // - // is_random_access_iterator - // - template - struct is_random_access_iterator - : public sprout::is_iterator_of - {}; - - // - // is_iterator_outputable - // - template - struct is_iterator_outputable - : public sprout::bool_constant< - sprout::is_output_iterator::type>::value - || sprout::is_forward_iterator::type>::value - > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_iterator_of_v = sprout::is_iterator_of::value; - template - SPROUT_STATIC_CONSTEXPR bool is_input_iterator_v = sprout::is_input_iterator::value; - template - SPROUT_STATIC_CONSTEXPR bool is_output_iterator_v = sprout::is_output_iterator::value; - template - SPROUT_STATIC_CONSTEXPR bool is_forward_iterator_v = sprout::is_forward_iterator::value; - template - SPROUT_STATIC_CONSTEXPR bool is_bidirectional_iterator_v = sprout::is_bidirectional_iterator::value; - template - SPROUT_STATIC_CONSTEXPR bool is_random_access_iterator_v = sprout::is_random_access_iterator::value; - template - SPROUT_STATIC_CONSTEXPR bool is_iterator_outputable_v = sprout::is_iterator_outputable::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_TYPE_TRAITS_IS_ITERATOR_OF_HPP diff --git a/dsp/lib/sprout/sprout/iterator/unique_iterator.hpp b/dsp/lib/sprout/sprout/iterator/unique_iterator.hpp deleted file mode 100644 index e3e4daf..0000000 --- a/dsp/lib/sprout/sprout/iterator/unique_iterator.hpp +++ /dev/null @@ -1,57 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_UNIQUE_ITERATOR_HPP -#define SPROUT_ITERATOR_UNIQUE_ITERATOR_HPP - -#include -#include -#include - -namespace sprout { - // - // unique_filter - // - template > - class unique_filter { - public: - typedef bool result_type; - private: - Predicate pred_; - public: - SPROUT_CONSTEXPR unique_filter() - : pred_() - {} - explicit SPROUT_CONSTEXPR unique_filter(Predicate pred) - : pred_(pred) - {} - template - SPROUT_CONSTEXPR bool operator()(T const& lhs, U const& rhs) const { - return !pred_(lhs, rhs); - } - }; - - // - // make_unique_iterator - // - template - inline SPROUT_CONSTEXPR sprout::adjacent_filter_iterator, Iterator> - make_unique_iterator(Predicate pred, Iterator it, Iterator last = Iterator()) { - return sprout::adjacent_filter_iterator, Iterator>( - sprout::unique_filter(pred), it, last - ); - } - template - inline SPROUT_CONSTEXPR sprout::adjacent_filter_iterator, Iterator> - make_unique_iterator(Iterator it, Iterator last = Iterator()) { - return sprout::adjacent_filter_iterator, Iterator>( - sprout::unique_filter<>(), it, last - ); - } -} // namespace sprout - -#endif // SPROUT_ITERATOR_UNIQUE_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/value_iterator.hpp b/dsp/lib/sprout/sprout/iterator/value_iterator.hpp deleted file mode 100644 index cb75217..0000000 --- a/dsp/lib/sprout/sprout/iterator/value_iterator.hpp +++ /dev/null @@ -1,213 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_VALUE_ITERATOR_HPP -#define SPROUT_ITERATOR_VALUE_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // value_iterator - // - template - class value_iterator - : public sprout::iterator< - std::random_access_iterator_tag, - typename sprout::value_holder::value_type, - std::ptrdiff_t, - typename sprout::value_holder::mutable_or_const_pointer, - typename sprout::value_holder::mutable_or_const_reference - > - { - public: - typedef T type; - typedef typename std::conditional< - std::is_reference::value, - typename std::decay::type const&, - typename std::decay::type const - >::type const_type; - private: - typedef sprout::iterator< - std::random_access_iterator_tag, - typename sprout::value_holder::value_type, - std::ptrdiff_t, - typename sprout::value_holder::mutable_or_const_pointer, - typename sprout::value_holder::mutable_or_const_reference - > base_type; - public: - typedef typename base_type::iterator_category iterator_category; - typedef typename base_type::value_type value_type; - typedef typename base_type::difference_type difference_type; - typedef typename base_type::pointer pointer; - typedef typename base_type::reference reference; - private: - sprout::value_holder holder_; - difference_type index_; - private: - SPROUT_CONSTEXPR value_iterator(sprout::value_holder const& r, difference_type index) - : holder_(r), index_(index) - {} - public: - SPROUT_CONSTEXPR value_iterator() - : holder_(), index_() - {} - value_iterator(value_iterator const&) = default; - explicit SPROUT_CONSTEXPR value_iterator( - typename sprout::value_holder::param_type p, - difference_type index = sprout::numeric_limits::max() - ) - : holder_(p), index_(index) - {} - SPROUT_CONSTEXPR operator value_iterator() const { - return value_iterator(holder_.get(), index_); - } - SPROUT_CONSTEXPR difference_type index() const { - return index_; - } - SPROUT_CONSTEXPR value_iterator next() const { - return value_iterator(holder_, index_ - 1); - } - SPROUT_CONSTEXPR value_iterator prev() const { - return value_iterator(holder_, index_ + 1); - } - SPROUT_CXX14_CONSTEXPR void swap(value_iterator& other) - SPROUT_NOEXCEPT_IF_EXPR(sprout::swap(holder_, other.holder_)) - { - sprout::swap(holder_, other.holder_); - sprout::swap(index_, other.index_); - } - SPROUT_CONSTEXPR reference operator*() const { - return holder_.get(); - } - SPROUT_CONSTEXPR pointer operator->() const { - return holder_.get_pointer(); - } - SPROUT_CXX14_CONSTEXPR value_iterator& operator++() { - value_iterator temp(next()); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR value_iterator operator++(int) { - value_iterator result(*this); - ++*this; - return result; - } - SPROUT_CXX14_CONSTEXPR value_iterator& operator--() { - value_iterator temp(prev()); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR value_iterator operator--(int) { - value_iterator result(*this); - --*this; - return result; - } - SPROUT_CONSTEXPR value_iterator operator+(difference_type n) const { - return value_iterator(holder_, index_ - n); - } - SPROUT_CONSTEXPR value_iterator operator-(difference_type n) const { - return value_iterator(holder_, index_ + n); - } - SPROUT_CXX14_CONSTEXPR value_iterator& operator+=(difference_type n) { - value_iterator temp(holder_, index_ - n); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR value_iterator& operator-=(difference_type n) { - value_iterator temp(holder_, index_ + n); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR reference operator[](difference_type) const { - return holder_.get(); - } - }; - - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::value_iterator const& lhs, sprout::value_iterator const& rhs) { - return lhs.index() == rhs.index(); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::value_iterator const& lhs, sprout::value_iterator const& rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator<(sprout::value_iterator const& lhs, sprout::value_iterator const& rhs) { - return rhs.index() < lhs.index(); - } - template - inline SPROUT_CONSTEXPR bool - operator>(sprout::value_iterator const& lhs, sprout::value_iterator const& rhs) { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator<=(sprout::value_iterator const& lhs, sprout::value_iterator const& rhs) { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(sprout::value_iterator const& lhs, sprout::value_iterator const& rhs) { - return !(lhs < rhs); - } - template - inline SPROUT_CONSTEXPR typename sprout::value_iterator::difference_type - operator-(sprout::value_iterator const& lhs, sprout::value_iterator const& rhs) { - return rhs.index() - lhs.index(); - } - template - inline SPROUT_CONSTEXPR sprout::value_iterator - operator+(typename sprout::value_iterator::difference_type n, sprout::value_iterator const& it) { - return it + n; - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::value_iterator& lhs, sprout::value_iterator& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::value_iterator - iterator_next(sprout::value_iterator const& it) { - return it.next(); - } - - // - // iterator_prev - // - template - inline SPROUT_CONSTEXPR sprout::value_iterator - iterator_prev(sprout::value_iterator const& it) { - return it.prev(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_VALUE_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/valued_iterator.hpp b/dsp/lib/sprout/sprout/iterator/valued_iterator.hpp deleted file mode 100644 index 9882b23..0000000 --- a/dsp/lib/sprout/sprout/iterator/valued_iterator.hpp +++ /dev/null @@ -1,225 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_VALUED_ITERATOR_HPP -#define SPROUT_ITERATOR_VALUED_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // valued_iterator - // - template - class valued_iterator - : public sprout::detail::iterator_base::type - { - private: - typedef typename sprout::detail::iterator_base::type base_type; - public: - typedef Iterator iterator_type; - typedef typename base_type::iterator_category iterator_category; - typedef typename base_type::value_type value_type; - typedef typename base_type::difference_type difference_type; - typedef typename base_type::pointer pointer; - typedef typename base_type::reference reference; - typedef T content_type; - typedef sprout::value_holder holder_type; - typedef typename holder_type::param_type param_type; - typedef typename holder_type::mutable_or_const_reference get_type; - protected: - iterator_type current; - holder_type holder; - public: - SPROUT_CONSTEXPR valued_iterator() - : current(), holder() - {} - SPROUT_CONSTEXPR valued_iterator(valued_iterator const& other) - : current(other.current) - , holder(other.holder) - {} - explicit SPROUT_CONSTEXPR valued_iterator(iterator_type it) - : current(it) - , holder() - {} - SPROUT_CONSTEXPR valued_iterator(iterator_type it, holder_type const& r) - : current(it) - , holder(r) - {} - SPROUT_CONSTEXPR valued_iterator(iterator_type it, param_type p) - : current(it) - , holder(p) - {} - template - SPROUT_CONSTEXPR valued_iterator(valued_iterator const& it) - : current(it.base()) - , holder(it.get()) - {} - template - SPROUT_CXX14_CONSTEXPR valued_iterator& operator=(valued_iterator const& it) { - valued_iterator temp(it); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR iterator_type base() const { - return current; - } - SPROUT_CONSTEXPR get_type get() const { - return holder.get(); - } - SPROUT_CONSTEXPR reference operator*() const { - return *current; - } - SPROUT_CONSTEXPR pointer operator->() const { - return &*current; - } - SPROUT_CXX14_CONSTEXPR valued_iterator& operator++() { - ++current; - return *this; - } - SPROUT_CXX14_CONSTEXPR valued_iterator operator++(int) { - valued_iterator result(*this); - ++current; - return result; - } - SPROUT_CXX14_CONSTEXPR valued_iterator& operator--() { - --current; - return *this; - } - SPROUT_CXX14_CONSTEXPR valued_iterator operator--(int) { - valued_iterator temp(*this); - --current; - return temp; - } - SPROUT_CONSTEXPR valued_iterator operator+(difference_type n) const { - return valued_iterator(current + n, holder); - } - SPROUT_CONSTEXPR valued_iterator operator-(difference_type n) const { - return valued_iterator(current - n, holder); - } - SPROUT_CXX14_CONSTEXPR valued_iterator& operator+=(difference_type n) { - valued_iterator temp(current + n, holder); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR valued_iterator& operator-=(difference_type n) { - valued_iterator temp(current - n, holder); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR reference operator[](difference_type n) const { - return *(current + n); - } - SPROUT_CONSTEXPR valued_iterator next() const { - return valued_iterator(sprout::next(current), holder); - } - SPROUT_CONSTEXPR valued_iterator prev() const { - return valued_iterator(sprout::prev(current), holder); - } - SPROUT_CXX14_CONSTEXPR void swap(valued_iterator& other) - SPROUT_NOEXCEPT_IF( - SPROUT_NOEXCEPT_EXPR(swap(current, other.current)) - && SPROUT_NOEXCEPT_EXPR(swap(holder, other.holder)) - ) - { - swap(current, other.current); - swap(holder, other.holder); - } - }; - - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::valued_iterator const& lhs, sprout::valued_iterator const& rhs) { - return lhs.base() == rhs.base(); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::valued_iterator const& lhs, sprout::valued_iterator const& rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator<(sprout::valued_iterator const& lhs, sprout::valued_iterator const& rhs) { - return lhs.base() < rhs.base(); - } - template - inline SPROUT_CONSTEXPR bool - operator>(sprout::valued_iterator const& lhs, sprout::valued_iterator const& rhs) { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator<=(sprout::valued_iterator const& lhs, sprout::valued_iterator const& rhs) { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(sprout::valued_iterator const& lhs, sprout::valued_iterator const& rhs) { - return !(lhs < rhs); - } - template - inline SPROUT_CONSTEXPR decltype(std::declval() - std::declval()) - operator-(sprout::valued_iterator const& lhs, sprout::valued_iterator const& rhs) { - return lhs.base() - rhs.base(); - } - template - inline SPROUT_CONSTEXPR sprout::valued_iterator - operator+( - typename sprout::valued_iterator::difference_type n, - sprout::valued_iterator const& it - ) - { - return it + n; - } - - // - // make_valued_iterator - // - template - inline SPROUT_CONSTEXPR sprout::valued_iterator - make_valued_iterator(Iterator it, T const& param) { - return sprout::valued_iterator(it, param); - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::valued_iterator& lhs, sprout::valued_iterator& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::valued_iterator - iterator_next(sprout::valued_iterator const& it) { - return it.next(); - } - - // - // iterator_prev - // - template - inline SPROUT_CONSTEXPR sprout::valued_iterator - iterator_prev(sprout::valued_iterator const& it) { - return it.prev(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_ITERATOR_VALUED_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/iterator/various.hpp b/dsp/lib/sprout/sprout/iterator/various.hpp deleted file mode 100644 index 2b0320d..0000000 --- a/dsp/lib/sprout/sprout/iterator/various.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_VARIOUS_HPP -#define SPROUT_ITERATOR_VARIOUS_HPP - -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ITERATOR_VARIOUS_HPP diff --git a/dsp/lib/sprout/sprout/iterator/wave.hpp b/dsp/lib/sprout/sprout/iterator/wave.hpp deleted file mode 100644 index 26146fc..0000000 --- a/dsp/lib/sprout/sprout/iterator/wave.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_WAVE_HPP -#define SPROUT_ITERATOR_WAVE_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_ITERATOR_WAVE_HPP diff --git a/dsp/lib/sprout/sprout/iterator/while_iterator.hpp b/dsp/lib/sprout/sprout/iterator/while_iterator.hpp deleted file mode 100644 index 5373951..0000000 --- a/dsp/lib/sprout/sprout/iterator/while_iterator.hpp +++ /dev/null @@ -1,220 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_ITERATOR_WHILE_ITERATOR_HPP -#define SPROUT_ITERATOR_WHILE_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // while_iterator - // - template - class while_iterator - : public sprout::detail::iterator_base< - Iterator, - typename std::conditional< - std::is_convertible::iterator_category, std::random_access_iterator_tag>::value, - std::bidirectional_iterator_tag, - typename std::iterator_traits::iterator_category - >::type - >::type - { - private: - typedef typename sprout::detail::iterator_base< - Iterator, - typename std::conditional< - std::is_convertible::iterator_category, std::random_access_iterator_tag>::value, - std::bidirectional_iterator_tag, - typename std::iterator_traits::iterator_category - >::type - >::type base_type; - public: - typedef Predicate predicate_type; - typedef Iterator iterator_type; - typedef typename base_type::iterator_category iterator_category; - typedef typename base_type::value_type value_type; - typedef typename base_type::difference_type difference_type; - typedef typename base_type::pointer pointer; - typedef typename base_type::reference reference; - private: - struct private_construct_t {}; - private: - static SPROUT_CONSTEXPR iterator_type find_next(iterator_type first, iterator_type last, Predicate pred) { - return first == last || pred(*first) ? first - : last - ; - } - static SPROUT_CONSTEXPR iterator_type find_prev(iterator_type first, Predicate pred) { - return pred(*first) ? first - : find_prev(sprout::prev(first), pred) - ; - } - protected: - iterator_type current; - iterator_type last; - Predicate pred; - private: - SPROUT_CXX14_CONSTEXPR void satisfy_predicate() { - if (!pred(*current)) { - current = last; - } - } - SPROUT_CXX14_CONSTEXPR void satisfy_predicate_backward() { - while (!pred(*current)) { - --current; - } - } - SPROUT_CONSTEXPR while_iterator(Predicate pred, iterator_type it, iterator_type last, private_construct_t) - : current(it) - , last(last) - , pred(pred) - {} - public: - SPROUT_CONSTEXPR while_iterator() - : current(), last(), pred() - {} - while_iterator(while_iterator const&) = default; - SPROUT_CONSTEXPR while_iterator(Predicate pred, iterator_type it, iterator_type last = iterator_type()) - : current(find_next(it, last, pred)) - , last(last) - , pred(pred) - {} - template - SPROUT_CONSTEXPR while_iterator(while_iterator const& it) - : current(it.current) - , last(it.last) - , pred(it.pred) - {} - template - SPROUT_CXX14_CONSTEXPR while_iterator& operator=(while_iterator const& it) { - while_iterator temp(it); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR iterator_type base() const { - return current; - } - SPROUT_CONSTEXPR iterator_type end() const { - return last; - } - SPROUT_CONSTEXPR Predicate predicate() const { - return pred; - } - SPROUT_CONSTEXPR reference operator*() const { - return *current; - } - SPROUT_CONSTEXPR pointer operator->() const { - return &*current; - } - - SPROUT_CXX14_CONSTEXPR while_iterator& operator++() { - ++current; - satisfy_predicate(); - return *this; - } - SPROUT_CXX14_CONSTEXPR while_iterator operator++(int) { - while_iterator result(*this); - ++current; - satisfy_predicate(); - return result; - } - SPROUT_CXX14_CONSTEXPR while_iterator& operator--() { - --current; - satisfy_predicate_backward(); - return *this; - } - SPROUT_CXX14_CONSTEXPR while_iterator operator--(int) { - while_iterator temp(*this); - --current; - satisfy_predicate_backward(); - return temp; - } - SPROUT_CONSTEXPR while_iterator next() const { - return while_iterator(pred, find_next(sprout::next(current), last, pred), last, private_construct_t()); - } - SPROUT_CONSTEXPR while_iterator prev() const { - return while_iterator(pred, find_prev(sprout::prev(current), pred), last, private_construct_t()); - } - SPROUT_CXX14_CONSTEXPR void swap(while_iterator& other) - SPROUT_NOEXCEPT_IF( - SPROUT_NOEXCEPT_EXPR(sprout::swap(current, other.current)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(last, other.last)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(pred, other.pred)) - ) - { - sprout::swap(current, other.current); - sprout::swap(last, other.last); - sprout::swap(pred, other.pred); - } - }; - - template - inline SPROUT_CONSTEXPR bool operator==( - sprout::while_iterator const& lhs, - sprout::while_iterator const& rhs - ) - { - return lhs.base() == rhs.base(); - } - template - inline SPROUT_CONSTEXPR bool operator!=( - sprout::while_iterator const& lhs, - sprout::while_iterator const& rhs - ) - { - return !(lhs == rhs); - } - - // - // make_while_iterator - // - template - inline SPROUT_CONSTEXPR sprout::while_iterator - make_while_iterator(Predicate pred, Iterator it, Iterator last = Iterator()) { - return sprout::while_iterator(pred, it, last); - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::while_iterator& lhs, sprout::while_iterator& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::while_iterator - iterator_next(sprout::while_iterator const& it) { - return it.next(); - } - - // - // iterator_prev - // - template - inline SPROUT_CONSTEXPR sprout::while_iterator - iterator_prev(sprout::while_iterator const& it) { - return it.prev(); - } -} // namespace sprout - -#endif // SPROUT_ITERATOR_WHILE_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/limits.hpp b/dsp/lib/sprout/sprout/limits.hpp deleted file mode 100644 index 070def4..0000000 --- a/dsp/lib/sprout/sprout/limits.hpp +++ /dev/null @@ -1,318 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LIMITS_HPP -#define SPROUT_LIMITS_HPP - -#include -#include -#ifdef SPROUT_NO_CXX11_NUMERIC_LIMITS -# include -# include -# include -# if !defined(__FLT_DENORM_MIN__) || !defined(__LDBL_DENORM_MIN__) || !defined(__LDBL_DENORM_MIN__) -# include -# endif // #if !defined(__FLT_DENORM_MIN__) || !defined(__LDBL_DENORM_MIN__) || !defined(__LDBL_DENORM_MIN__) -#endif // #ifdef SPROUT_NO_CXX11_NUMERIC_LIMITS - -namespace sprout { - // - // numeric_limits - // -#ifdef SPROUT_NO_CXX11_NUMERIC_LIMITS - namespace detail { - template - class numeric_limits_base { - private: - typedef std::numeric_limits impl_type; - public: - SPROUT_STATIC_CONSTEXPR bool is_specialized = impl_type::is_specialized; - - SPROUT_STATIC_CONSTEXPR int digits = impl_type::digits; - SPROUT_STATIC_CONSTEXPR int digits10 = impl_type::digits10; - SPROUT_STATIC_CONSTEXPR int max_digits10 = impl_type::max_digits10; - SPROUT_STATIC_CONSTEXPR bool is_signed = impl_type::is_signed; - SPROUT_STATIC_CONSTEXPR bool is_integer = impl_type::is_integer; - SPROUT_STATIC_CONSTEXPR bool is_exact = impl_type::is_exact; - SPROUT_STATIC_CONSTEXPR int radix = impl_type::radix; - - SPROUT_STATIC_CONSTEXPR int min_exponent = impl_type::min_exponent; - SPROUT_STATIC_CONSTEXPR int min_exponent10 = impl_type::min_exponent10; - SPROUT_STATIC_CONSTEXPR int max_exponent = impl_type::max_exponent; - SPROUT_STATIC_CONSTEXPR int max_exponent10 = impl_type::max_exponent10; - SPROUT_STATIC_CONSTEXPR bool has_infinity = impl_type::has_infinity; - SPROUT_STATIC_CONSTEXPR bool has_quiet_NaN = impl_type::has_quiet_NaN; - SPROUT_STATIC_CONSTEXPR bool has_signaling_NaN = impl_type::has_signaling_NaN; - SPROUT_STATIC_CONSTEXPR std::float_denorm_style has_denorm = impl_type::has_denorm; - SPROUT_STATIC_CONSTEXPR bool has_denorm_loss = impl_type::has_denorm_loss; - - SPROUT_STATIC_CONSTEXPR bool is_iec559 = impl_type::is_iec559; - SPROUT_STATIC_CONSTEXPR bool is_bounded = impl_type::is_bounded; - SPROUT_STATIC_CONSTEXPR bool is_modulo = impl_type::is_modulo; - SPROUT_STATIC_CONSTEXPR bool traps = impl_type::traps; - SPROUT_STATIC_CONSTEXPR bool tinyness_before = impl_type::tinyness_before; - SPROUT_STATIC_CONSTEXPR std::float_round_style round_style = impl_type::round_style; - }; - - template - class numeric_limits_impl; - template - class numeric_limits_impl - : public sprout::detail::numeric_limits_base - { - private: - typedef std::numeric_limits impl_type; - public: - static SPROUT_CONSTEXPR T min() SPROUT_NOEXCEPT { - return impl_type::min(); - } - static SPROUT_CONSTEXPR T max() SPROUT_NOEXCEPT { - return impl_type::max(); - } - static SPROUT_CONSTEXPR T lowest() SPROUT_NOEXCEPT { - return impl_type::lowest(); - } - - static SPROUT_CONSTEXPR T epsilon() SPROUT_NOEXCEPT { - return impl_type::epsilon(); - } - static SPROUT_CONSTEXPR T round_error() SPROUT_NOEXCEPT { - return impl_type::round_error(); - } - - static SPROUT_CONSTEXPR T infinity() SPROUT_NOEXCEPT { - return impl_type::infinity(); - } - static SPROUT_CONSTEXPR T quiet_NaN() SPROUT_NOEXCEPT { - return impl_type::quiet_NaN(); - } - static SPROUT_CONSTEXPR T signaling_NaN() SPROUT_NOEXCEPT { - return impl_type::signaling_NaN(); - } - static SPROUT_CONSTEXPR T denorm_min() SPROUT_NOEXCEPT { - return impl_type::denorm_min(); - } - }; - template - class numeric_limits_impl - : public sprout::detail::numeric_limits_base - { - public: - static SPROUT_CONSTEXPR T min() SPROUT_NOEXCEPT { - return T(); - } - static SPROUT_CONSTEXPR T max() SPROUT_NOEXCEPT { - return T(); - } - static SPROUT_CONSTEXPR T lowest() SPROUT_NOEXCEPT { - return T(); - } - - static SPROUT_CONSTEXPR T epsilon() SPROUT_NOEXCEPT { - return T(); - } - static SPROUT_CONSTEXPR T round_error() SPROUT_NOEXCEPT { - return T(); - } - - static SPROUT_CONSTEXPR T infinity() SPROUT_NOEXCEPT { - return T(); - } - static SPROUT_CONSTEXPR T quiet_NaN() SPROUT_NOEXCEPT { - return T(); - } - static SPROUT_CONSTEXPR T signaling_NaN() SPROUT_NOEXCEPT { - return T(); - } - static SPROUT_CONSTEXPR T denorm_min() SPROUT_NOEXCEPT { - return T(); - } - }; - } // namespace detail - - template - class numeric_limits - : public sprout::detail::numeric_limits_impl::is_specialized> - {}; - template - class numeric_limits - : public sprout::numeric_limits - {}; - template - class numeric_limits - : public sprout::numeric_limits - {}; - template - class numeric_limits - : public sprout::numeric_limits - {}; - -#define SPROUT_NUMERIC_LIMITS_INTEGRAL_SPECIALIZED_DECL(TYPE, MIN, MAX) \ - template<> \ - class numeric_limits \ - : public sprout::detail::numeric_limits_base \ - { \ - public: \ - static SPROUT_CONSTEXPR TYPE min() SPROUT_NOEXCEPT { \ - return MIN; \ - } \ - static SPROUT_CONSTEXPR TYPE max() SPROUT_NOEXCEPT { \ - return MAX; \ - } \ - static SPROUT_CONSTEXPR TYPE lowest() SPROUT_NOEXCEPT { \ - return min(); \ - } \ - \ - static SPROUT_CONSTEXPR TYPE epsilon() SPROUT_NOEXCEPT { \ - return static_cast(0); \ - } \ - static SPROUT_CONSTEXPR TYPE round_error() SPROUT_NOEXCEPT { \ - return static_cast(0); \ - } \ - \ - static SPROUT_CONSTEXPR TYPE infinity() SPROUT_NOEXCEPT { \ - return static_cast(0); \ - } \ - static SPROUT_CONSTEXPR TYPE quiet_NaN() SPROUT_NOEXCEPT { \ - return static_cast(0); \ - } \ - static SPROUT_CONSTEXPR TYPE signaling_NaN() SPROUT_NOEXCEPT { \ - return static_cast(0); \ - } \ - static SPROUT_CONSTEXPR TYPE denorm_min() SPROUT_NOEXCEPT { \ - return static_cast(0); \ - } \ - } - - SPROUT_NUMERIC_LIMITS_INTEGRAL_SPECIALIZED_DECL(bool, false, true); - - SPROUT_NUMERIC_LIMITS_INTEGRAL_SPECIALIZED_DECL(short, SHRT_MIN, SHRT_MAX); - SPROUT_NUMERIC_LIMITS_INTEGRAL_SPECIALIZED_DECL(int, INT_MIN, INT_MAX); - SPROUT_NUMERIC_LIMITS_INTEGRAL_SPECIALIZED_DECL(long, LONG_MIN, LONG_MAX); - SPROUT_NUMERIC_LIMITS_INTEGRAL_SPECIALIZED_DECL(long long, LLONG_MIN, LLONG_MAX); - SPROUT_NUMERIC_LIMITS_INTEGRAL_SPECIALIZED_DECL(unsigned short, static_cast(0), USHRT_MAX); - SPROUT_NUMERIC_LIMITS_INTEGRAL_SPECIALIZED_DECL(unsigned int, static_cast(0), UINT_MAX); - SPROUT_NUMERIC_LIMITS_INTEGRAL_SPECIALIZED_DECL(unsigned long, static_cast(0), ULONG_MAX); - SPROUT_NUMERIC_LIMITS_INTEGRAL_SPECIALIZED_DECL(unsigned long long, static_cast(0), ULLONG_MAX); - - SPROUT_NUMERIC_LIMITS_INTEGRAL_SPECIALIZED_DECL(signed char, SCHAR_MIN, SCHAR_MAX); - SPROUT_NUMERIC_LIMITS_INTEGRAL_SPECIALIZED_DECL(unsigned char, static_cast(0), UCHAR_MAX); -#if SPROUT_USE_UNICODE_LITERALS - SPROUT_NUMERIC_LIMITS_INTEGRAL_SPECIALIZED_DECL( - char16_t, - static_cast(sprout::numeric_limits::min()), - static_cast(sprout::numeric_limits::max()) - ); - SPROUT_NUMERIC_LIMITS_INTEGRAL_SPECIALIZED_DECL( - char32_t, - static_cast(sprout::numeric_limits::min()), - static_cast(sprout::numeric_limits::max()) - ); -#endif - SPROUT_NUMERIC_LIMITS_INTEGRAL_SPECIALIZED_DECL(wchar_t, WCHAR_MIN, WCHAR_MAX); -#undef SPROUT_NUMERIC_LIMITS_INTEGRAL_SPECIALIZED_DECL - -#define SPROUT_NUMERIC_LIMITS_FLOATING_POINT_SPECIALIZED_DECL(TYPE, MIN, MAX, EPS, RND, INF, QNAN, SNAN, DMIN) \ - template<> \ - class numeric_limits \ - : public sprout::detail::numeric_limits_base \ - { \ - public: \ - static SPROUT_CONSTEXPR TYPE min() SPROUT_NOEXCEPT { \ - return MIN; \ - } \ - static SPROUT_CONSTEXPR TYPE max() SPROUT_NOEXCEPT { \ - return MAX; \ - } \ - static SPROUT_CONSTEXPR TYPE lowest() SPROUT_NOEXCEPT { \ - return -max(); \ - } \ - \ - static SPROUT_CONSTEXPR TYPE epsilon() SPROUT_NOEXCEPT { \ - return EPS; \ - } \ - static SPROUT_CONSTEXPR TYPE round_error() SPROUT_NOEXCEPT { \ - return RND; \ - } \ - \ - static SPROUT_CONSTEXPR TYPE infinity() SPROUT_NOEXCEPT { \ - return INF; \ - } \ - static SPROUT_CONSTEXPR TYPE quiet_NaN() SPROUT_NOEXCEPT { \ - return QNAN; \ - } \ - static SPROUT_CONSTEXPR TYPE signaling_NaN() SPROUT_NOEXCEPT { \ - return SNAN; \ - } \ - static SPROUT_CONSTEXPR TYPE denorm_min() SPROUT_NOEXCEPT { \ - return DMIN; \ - } \ - } - -#if !defined(__FLT_DENORM_MIN__) - SPROUT_NUMERIC_LIMITS_FLOATING_POINT_SPECIALIZED_DECL( - float, - FLT_MIN, FLT_MAX, - FLT_EPSILON, 0.5F, - INFINITY, NAN, NAN, FLT_MIN - ); -#else // #if !defined(__FLT_DENORM_MIN__) - SPROUT_NUMERIC_LIMITS_FLOATING_POINT_SPECIALIZED_DECL( - float, - FLT_MIN, FLT_MAX, - FLT_EPSILON, 0.5F, - __builtin_huge_valf(), __builtin_nanf(""), __builtin_nansf(""), __FLT_DENORM_MIN__ - ); -#endif // #if !defined(__FLT_DENORM_MIN__) -#if !defined(__DBL_DENORM_MIN__) - SPROUT_NUMERIC_LIMITS_FLOATING_POINT_SPECIALIZED_DECL( - double, - DBL_MIN, DBL_MAX, - DBL_EPSILON, 0.5, - INFINITY, NAN, NAN, DBL_MIN - ); -#else // #if !defined(__DBL_DENORM_MIN__) - SPROUT_NUMERIC_LIMITS_FLOATING_POINT_SPECIALIZED_DECL( - double, - DBL_MIN, DBL_MAX, - DBL_EPSILON, 0.5, - __builtin_huge_val(), __builtin_nan(""), __builtin_nans(""), __DBL_DENORM_MIN__ - ); -#endif // #if !defined(__DBL_DENORM_MIN__) -#if !defined(__LDBL_DENORM_MIN__) - SPROUT_NUMERIC_LIMITS_FLOATING_POINT_SPECIALIZED_DECL( - long double, - LDBL_MIN, LDBL_MAX, - LDBL_EPSILON, 0.5L, - INFINITY, NAN, NAN, LDBL_MIN - ); -#else // #if !defined(__LDBL_DENORM_MIN__) - SPROUT_NUMERIC_LIMITS_FLOATING_POINT_SPECIALIZED_DECL( - long double, - LDBL_MIN, LDBL_MAX, - LDBL_EPSILON, 0.5L, - __builtin_huge_vall(), __builtin_nanl(""), __builtin_nansl(""), __LDBL_DENORM_MIN__ - ); -#endif // #if !defined(__LDBL_DENORM_MIN__) -#undef SPROUT_NUMERIC_LIMITS_FLOATING_POINT_SPECIALIZED_DECL - -#else // #ifdef SPROUT_NO_CXX11_NUMERIC_LIMITS - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using numeric_limits = std::numeric_limits; -#else // #if SPROUT_USE_TEMPLATE_ALIASES - template - class numeric_limits - : public std::numeric_limits - {}; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - -#endif // #ifdef SPROUT_NO_CXX11_NUMERIC_LIMITS -} // namespace sprout - -#endif // #ifndef SPROUT_LIMITS_HPP diff --git a/dsp/lib/sprout/sprout/logic.hpp b/dsp/lib/sprout/sprout/logic.hpp deleted file mode 100644 index 0ee28b9..0000000 --- a/dsp/lib/sprout/sprout/logic.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LOGIC_HPP -#define SPROUT_LOGIC_HPP - -#include -#include - -#endif // #ifndef SPROUT_LOGIC_HPP diff --git a/dsp/lib/sprout/sprout/logic/tribool.hpp b/dsp/lib/sprout/sprout/logic/tribool.hpp deleted file mode 100644 index c456e6e..0000000 --- a/dsp/lib/sprout/sprout/logic/tribool.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LOGIC_TRIBOOL_HPP -#define SPROUT_LOGIC_TRIBOOL_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_LOGIC_TRIBOOL_HPP diff --git a/dsp/lib/sprout/sprout/logic/tribool/hash.hpp b/dsp/lib/sprout/sprout/logic/tribool/hash.hpp deleted file mode 100644 index d84403e..0000000 --- a/dsp/lib/sprout/sprout/logic/tribool/hash.hpp +++ /dev/null @@ -1,71 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LOGIC_TRIBOOL_HASH_HPP -#define SPROUT_LOGIC_TRIBOOL_HASH_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // hash_value_traits - // - template<> - struct hash_value_traits { - public: - static SPROUT_CONSTEXPR std::size_t - hash_value(sprout::logic::indeterminate_keyword_t) { - return sprout::logic::tribool::indeterminate_value; - } - }; - template<> - struct hash_value_traits::type> { - public: - static SPROUT_CONSTEXPR std::size_t - hash_value(sprout::logic::indeterminate_keyword_t) { - return sprout::logic::tribool::indeterminate_value; - } - }; - - namespace logic { - // - // hash_value - // - inline SPROUT_CONSTEXPR std::size_t - hash_value(sprout::logic::tribool const& v) { - return sprout::to_hash(v.value); - } - } // namespace logic -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // hash - // - template<> - struct hash - : public sprout::hash - {}; - template<> - struct hash - : public sprout::hash - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -#endif // #ifndef SPROUT_LOGIC_TRIBOOL_HASH_HPP diff --git a/dsp/lib/sprout/sprout/logic/tribool/io.hpp b/dsp/lib/sprout/sprout/logic/tribool/io.hpp deleted file mode 100644 index ad33821..0000000 --- a/dsp/lib/sprout/sprout/logic/tribool/io.hpp +++ /dev/null @@ -1,200 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LOGIC_TRIBOOL_IO_HPP -#define SPROUT_LOGIC_TRIBOOL_IO_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace logic { - namespace detail { - SPROUT_LITERAL_STRING_DEF(default_indeterminate_name, "indeterminate", 13); - } // namespace detail - // - // get_default_indeterminate_name - // - template - inline SPROUT_NON_CONSTEXPR std::basic_string - get_default_indeterminate_name() { - return sprout::logic::detail::default_indeterminate_name::value.c_str(); - } - - // - // indeterminate_name - // - template - class indeterminate_name - : public std::locale::facet - , private sprout::noncopyable - { - public: - typedef Elem char_type; - typedef std::basic_string string_type; - public: - static std::locale::id id; - private: - string_type name_; - public: - SPROUT_NON_CONSTEXPR indeterminate_name() - : name_(sprout::logic::get_default_indeterminate_name()) - {} - explicit SPROUT_NON_CONSTEXPR indeterminate_name(string_type const& initial_name) - : name_(initial_name) - {} - SPROUT_NON_CONSTEXPR string_type name() const { - return name_; - } - }; - template - std::locale::id sprout::logic::indeterminate_name::id; - - // - // operator<< - // - template - inline SPROUT_NON_CONSTEXPR std::basic_ostream& - operator<<(std::basic_ostream& lhs, sprout::logic::tribool rhs) { - if (!sprout::logic::indeterminate(rhs)) { - lhs << static_cast(rhs); - } else { - typename std::basic_ostream::sentry cerberus(lhs); - if (cerberus) { - if (lhs.flags() & std::ios_base::boolalpha) { - if (std::has_facet >(lhs.getloc())) { - indeterminate_name const& facet - = std::use_facet >(lhs.getloc()) - ; - lhs << facet.name(); - } else { - lhs << sprout::logic::get_default_indeterminate_name(); - } - } else { - lhs << 2; - } - } - } - return lhs; - } - template - inline SPROUT_NON_CONSTEXPR std::basic_ostream& - operator<<(std::basic_ostream& lhs, sprout::logic::indeterminate_keyword_t) { - return lhs << sprout::logic::tribool(indeterminate); - } - - // - // operator>> - // - template - inline SPROUT_NON_CONSTEXPR std::basic_istream& - operator>>(std::basic_istream& lhs, sprout::logic::tribool& rhs) { - if (lhs.flags() & std::ios_base::boolalpha) { - typename std::basic_istream::sentry cerberus(lhs); - if (cerberus) { - typedef std::basic_string string_type; - const std::numpunct& numpunct_facet = - std::use_facet >(lhs.getloc()) - ; - string_type falsename = numpunct_facet.falsename(); - string_type truename = numpunct_facet.truename(); - string_type othername = std::has_facet >(lhs.getloc()) - ? std::use_facet >(lhs.getloc()).name() - : sprout::logic::get_default_indeterminate_name() - ; - typename string_type::size_type pos = 0; - bool falsename_ok = true; - bool truename_ok = true; - bool othername_ok = true; - while (falsename_ok && pos < falsename.size() - || truename_ok && pos < truename.size() - || othername_ok && pos < othername.size() - ) - { - typename Traits::int_type c = lhs.get(); - if (c == Traits::eof()) { - return lhs; - } - bool matched = false; - if (falsename_ok && pos < falsename.size()) { - if (Traits::eq(Traits::to_char_type(c), falsename[pos])) { - matched = true; - } else { - falsename_ok = false; - } - } - if (truename_ok && pos < truename.size()) { - if (Traits::eq(Traits::to_char_type(c), truename[pos])) { - matched = true; - } else { - truename_ok = false; - } - } - if (othername_ok && pos < othername.size()) { - if (Traits::eq(Traits::to_char_type(c), othername[pos])) { - matched = true; - } else { - othername_ok = false; - } - } - if (matched) { - ++pos; - } - if (pos > falsename.size()) { - falsename_ok = false; - } - if (pos > truename.size()) { - truename_ok = false; - } - if (pos > othername.size()) { - othername_ok = false; - } - } - if (pos == 0) { - lhs.setstate(std::ios_base::failbit); - } else { - if (falsename_ok) { - rhs = false; - } else if (truename_ok) { - rhs = true; - } else if (othername_ok) { - rhs = indeterminate; - } else { - lhs.setstate(std::ios_base::failbit); - } - } - } - } else { - long value; - if (lhs >> value) { - switch (value) { - case 0: - rhs = false; - break; - case 1: - rhs = true; - break; - case 2: - rhs = indeterminate; - break; - default: - lhs.setstate(std::ios_base::failbit); - } - } - } - return lhs; - } - } // namespace logic -} // namespace sprout - -#endif // #ifndef SPROUT_LOGIC_TRIBOOL_IO_HPP diff --git a/dsp/lib/sprout/sprout/logic/tribool/tribool.hpp b/dsp/lib/sprout/sprout/logic/tribool/tribool.hpp deleted file mode 100644 index 3b4738f..0000000 --- a/dsp/lib/sprout/sprout/logic/tribool/tribool.hpp +++ /dev/null @@ -1,198 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LOGIC_TRIBOOL_TRIBOOL_HPP -#define SPROUT_LOGIC_TRIBOOL_TRIBOOL_HPP - -#include -#include - -namespace sprout { - namespace logic { - namespace detail { - struct indeterminate_t {}; - } // namespace detail - - // - // indeterminate_keyword_t - // - typedef bool (*indeterminate_keyword_t)(sprout::logic::tribool, sprout::logic::detail::indeterminate_t); - - // - // tribool - // - class tribool { - private: - struct dummy { - public: - SPROUT_CXX14_CONSTEXPR void nonnull() {} - }; - typedef void (dummy::*safe_bool)(); - public: - enum value_t { - false_value, - true_value, - indeterminate_value - }; - public: - value_t value; - public: - SPROUT_CONSTEXPR tribool() - : value(false_value) - {} - SPROUT_CONSTEXPR tribool(bool initial_value) - : value(initial_value? true_value : false_value) - {} - SPROUT_CONSTEXPR tribool(sprout::logic::indeterminate_keyword_t) - : value(indeterminate_value) - {} - SPROUT_CONSTEXPR operator safe_bool() const { - return value == true_value ? &dummy::nonnull : 0; - } - }; - - // - // indeterminate - // - inline SPROUT_CONSTEXPR bool - indeterminate(sprout::logic::tribool x, sprout::logic::detail::indeterminate_t = sprout::logic::detail::indeterminate_t()) { - return x.value == sprout::logic::tribool::indeterminate_value; - } - - // - // operator! - // - inline SPROUT_CONSTEXPR sprout::logic::tribool - operator!(sprout::logic::tribool x) { - return x.value == sprout::logic::tribool::false_value ? sprout::logic::tribool(true) - : x.value == sprout::logic::tribool::true_value ? sprout::logic::tribool(false) - : sprout::logic::tribool(sprout::logic::indeterminate) - ; - } - - // - // operator&& - // - inline SPROUT_CONSTEXPR sprout::logic::tribool - operator&&(sprout::logic::tribool lhs, sprout::logic::tribool rhs) { - return static_cast(!lhs) || static_cast(!rhs) ? sprout::logic::tribool(false) - : static_cast(lhs) && static_cast(rhs) ? sprout::logic::tribool(true) - : sprout::logic::tribool(sprout::logic::indeterminate) - ; - } - inline SPROUT_CONSTEXPR sprout::logic::tribool - operator&&(tribool lhs, bool rhs) { - return rhs ? lhs : sprout::logic::tribool(false); - } - - inline SPROUT_CONSTEXPR sprout::logic::tribool - operator&&(bool lhs, sprout::logic::tribool rhs) { - return lhs ? rhs : sprout::logic::tribool(false); - } - - inline SPROUT_CONSTEXPR sprout::logic::tribool - operator&&(sprout::logic::indeterminate_keyword_t, sprout::logic::tribool lhs) { - return !lhs ? sprout::logic::tribool(false) : sprout::logic::tribool(sprout::logic::indeterminate); - } - inline SPROUT_CONSTEXPR sprout::logic::tribool - operator&&(sprout::logic::tribool lhs, sprout::logic::indeterminate_keyword_t) { - return !lhs ? sprout::logic::tribool(false) : sprout::logic::tribool(indeterminate); - } - - // - // operator|| - // - inline SPROUT_CONSTEXPR sprout::logic::tribool - operator||(sprout::logic::tribool lhs, sprout::logic::tribool rhs) { - return static_cast(!lhs) && static_cast(!rhs) ? sprout::logic::tribool(false) - : static_cast(lhs) || static_cast(rhs) ? sprout::logic::tribool(true) - : sprout::logic::tribool(sprout::logic::indeterminate) - ; - } - inline SPROUT_CONSTEXPR sprout::logic::tribool - operator||(sprout::logic::tribool lhs, bool rhs) { - return rhs ? sprout::logic::tribool(true) : lhs; - } - inline SPROUT_CONSTEXPR sprout::logic::tribool - operator||(bool lhs, sprout::logic::tribool rhs) { - return lhs ? sprout::logic::tribool(true) : rhs; - } - inline SPROUT_CONSTEXPR sprout::logic::tribool - operator||(sprout::logic::indeterminate_keyword_t, sprout::logic::tribool lhs) { - return lhs ? sprout::logic::tribool(true) : sprout::logic::tribool(sprout::logic::indeterminate); - } - inline SPROUT_CONSTEXPR sprout::logic::tribool - operator||(sprout::logic::tribool lhs, sprout::logic::indeterminate_keyword_t) { - return lhs ? sprout::logic::tribool(true) : sprout::logic::tribool(sprout::logic::indeterminate); - } - - // - // operator== - // - inline SPROUT_CONSTEXPR sprout::logic::tribool - operator==(sprout::logic::tribool lhs, sprout::logic::tribool rhs) { - return sprout::logic::indeterminate(lhs) || sprout::logic::indeterminate(rhs) - ? sprout::logic::tribool(sprout::logic::indeterminate) - : (lhs && rhs) || (!lhs && !rhs) - ; - } - inline SPROUT_CONSTEXPR sprout::logic::tribool - operator==(sprout::logic::tribool lhs, bool rhs) { - return lhs == sprout::logic::tribool(rhs); - } - inline SPROUT_CONSTEXPR sprout::logic::tribool - operator==(bool lhs, sprout::logic::tribool rhs) { - return sprout::logic::tribool(lhs) == rhs; - } - inline SPROUT_CONSTEXPR sprout::logic::tribool - operator==(sprout::logic::indeterminate_keyword_t, sprout::logic::tribool lhs) { - return sprout::logic::tribool(sprout::logic::indeterminate) == lhs; - } - inline SPROUT_CONSTEXPR sprout::logic::tribool - operator==(sprout::logic::tribool lhs, sprout::logic::indeterminate_keyword_t) { - return sprout::logic::tribool(sprout::logic::indeterminate) == lhs; - } - - // - // operator!= - // - inline SPROUT_CONSTEXPR sprout::logic::tribool - operator!=(sprout::logic::tribool lhs, sprout::logic::tribool rhs) { - return sprout::logic::indeterminate(lhs) || sprout::logic::indeterminate(rhs) - ? sprout::logic::tribool(sprout::logic::indeterminate) - : !((lhs && rhs) || (!lhs && !rhs)) - ; - } - inline SPROUT_CONSTEXPR sprout::logic::tribool - operator!=(sprout::logic::tribool lhs, bool rhs) { - return lhs != sprout::logic::tribool(rhs); - } - inline SPROUT_CONSTEXPR sprout::logic::tribool - operator!=(bool lhs, sprout::logic::tribool rhs) { - return sprout::logic::tribool(lhs) != rhs; - } - inline SPROUT_CONSTEXPR sprout::logic::tribool - operator!=(sprout::logic::indeterminate_keyword_t, sprout::logic::tribool lhs) { - return sprout::logic::tribool(sprout::logic::indeterminate) != lhs; - } - inline SPROUT_CONSTEXPR sprout::logic::tribool - operator!=(sprout::logic::tribool lhs, sprout::logic::indeterminate_keyword_t) { - return sprout::logic::tribool(sprout::logic::indeterminate) != lhs; - } - } // namespace logic - - using sprout::logic::tribool; - using sprout::logic::indeterminate; -} // namespace sprout - -#define SPROUT_TRIBOOL_THIRD_STATE(NAME) \ - inline SPROUT_CONSTEXPR bool \ - NAME(sprout::logic::tribool lhs, sprout::logic::detail::indeterminate_t = sprout::logic::detail::indeterminate_t()) { \ - return lhs.value == sprout::logic::tribool::indeterminate_value; \ - } - -#endif // #ifndef SPROUT_LOGIC_TRIBOOL_TRIBOOL_HPP diff --git a/dsp/lib/sprout/sprout/logic/tribool/tribool_fwd.hpp b/dsp/lib/sprout/sprout/logic/tribool/tribool_fwd.hpp deleted file mode 100644 index 1fec86f..0000000 --- a/dsp/lib/sprout/sprout/logic/tribool/tribool_fwd.hpp +++ /dev/null @@ -1,22 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LOGIC_TRIBOOL_TRIBOOL_FWD_HPP -#define SPROUT_LOGIC_TRIBOOL_TRIBOOL_FWD_HPP - -#include - -namespace sprout { - namespace logic { - // - // tribool - // - class tribool; - } // namespace logic -} // namespace sprout - -#endif // #ifndef SPROUT_LOGIC_TRIBOOL_TRIBOOL_FWD_HPP diff --git a/dsp/lib/sprout/sprout/logic/tribool_fwd.hpp b/dsp/lib/sprout/sprout/logic/tribool_fwd.hpp deleted file mode 100644 index dbb4cad..0000000 --- a/dsp/lib/sprout/sprout/logic/tribool_fwd.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_LOGIC_TRIBOOL_FWD_HPP -#define SPROUT_LOGIC_TRIBOOL_FWD_HPP - -#include -#include - -#endif // #ifndef SPROUT_LOGIC_TRIBOOL_FWD_HPP diff --git a/dsp/lib/sprout/sprout/math.hpp b/dsp/lib/sprout/sprout/math.hpp deleted file mode 100644 index 6f0feee..0000000 --- a/dsp/lib/sprout/sprout/math.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_HPP -#define SPROUT_MATH_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_MATH_HPP diff --git a/dsp/lib/sprout/sprout/math/abs.hpp b/dsp/lib/sprout/sprout/math/abs.hpp deleted file mode 100644 index e3d7d5f..0000000 --- a/dsp/lib/sprout/sprout/math/abs.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_ABS_HPP -#define SPROUT_MATH_ABS_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - // - // abs - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - abs(FloatType x) { - return sprout::math::fabs(x); - } - } // namespace math - - using sprout::math::abs; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_ABS_HPP diff --git a/dsp/lib/sprout/sprout/math/acos.hpp b/dsp/lib/sprout/sprout/math/acos.hpp deleted file mode 100644 index ae9e1c9..0000000 --- a/dsp/lib/sprout/sprout/math/acos.hpp +++ /dev/null @@ -1,78 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_ACOS_HPP -#define SPROUT_MATH_ACOS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_acos(float x) { - return __builtin_acosf(x); - } - inline SPROUT_CONSTEXPR double - builtin_acos(double x) { - return __builtin_acos(x); - } - inline SPROUT_CONSTEXPR long double - builtin_acos(long double x) { - return __builtin_acosl(x); - } -#endif - - template - inline SPROUT_CONSTEXPR T - acos_impl(T x) { - return sprout::math::half_pi() - sprout::math::asin(x); - } - } // namespace detail - // - // acos - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - acos(FloatType x) { - return sprout::math::isnan(x) ? x - : sprout::math::fabs(x) > 1 ? sprout::numeric_limits::quiet_NaN() -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_acos(x) -#else - : x == 1 ? FloatType(0) - : static_cast(sprout::math::detail::acos_impl(static_cast::type>(x))) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - acos(IntType x) { - return sprout::math::acos(static_cast(x)); - } - } // namespace math - - using sprout::math::acos; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_ACOS_HPP diff --git a/dsp/lib/sprout/sprout/math/acosh.hpp b/dsp/lib/sprout/sprout/math/acosh.hpp deleted file mode 100644 index 6ba12b4..0000000 --- a/dsp/lib/sprout/sprout/math/acosh.hpp +++ /dev/null @@ -1,78 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_ACOSH_HPP -#define SPROUT_MATH_ACOSH_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_acosh(float x) { - return __builtin_acoshf(x); - } - inline SPROUT_CONSTEXPR double - builtin_acosh(double x) { - return __builtin_acosh(x); - } - inline SPROUT_CONSTEXPR long double - builtin_acosh(long double x) { - return __builtin_acoshl(x); - } -#endif - - template - inline SPROUT_CONSTEXPR T - acosh_impl(T x) { - return sprout::math::log(x + sprout::math::sqrt(x * x - 1)); - } - } // namespace detail - // - // acosh - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - acosh(FloatType x) { - return sprout::math::isnan(x) ? x - : x < 1 ? -sprout::numeric_limits::quiet_NaN() - : x == sprout::numeric_limits::infinity() ? sprout::numeric_limits::infinity() -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_acosh(x) -#else - : x == 1 ? FloatType(0) - : static_cast(sprout::math::detail::acosh_impl(static_cast::type>(x))) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - acosh(IntType x) { - return sprout::math::acosh(static_cast(x)); - } - } // namespace math - - using sprout::math::acosh; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_ACOSH_HPP diff --git a/dsp/lib/sprout/sprout/math/asin.hpp b/dsp/lib/sprout/sprout/math/asin.hpp deleted file mode 100644 index cf49fb4..0000000 --- a/dsp/lib/sprout/sprout/math/asin.hpp +++ /dev/null @@ -1,130 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_ASIN_HPP -#define SPROUT_MATH_ASIN_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_asin(float x) { - return __builtin_asinf(x); - } - inline SPROUT_CONSTEXPR double - builtin_asin(double x) { - return __builtin_asin(x); - } - inline SPROUT_CONSTEXPR long double - builtin_asin(long double x) { - return __builtin_asinl(x); - } -#endif - - template - inline SPROUT_CONSTEXPR T - asin_impl_center_1(T x, T x2) { - return (((((((((((( - + 0.0316658385792867081040808) * x2 - + -0.0158620440988475212803145) * x2 - + 0.0192942786775238654913582) * x2 - + 0.0066153165197009078340075) * x2 - + 0.0121483892822292648695383) * x2 - + 0.0138885410156894774969889) * x2 - + 0.0173593516996479249428647) * x2 - + 0.0223717830666671020710108) * x2 - + 0.0303819580081956423799529) * x2 - + 0.0446428568582815922683933) * x2 - + 0.0750000000029696112392353) * x2 - + 0.1666666666666558995379880) * x2 - * x + x - ; - } - template - inline SPROUT_CONSTEXPR T - asin_impl_center(T x) { - return sprout::math::detail::asin_impl_center_1(x, x * x); - } - template - inline SPROUT_CONSTEXPR T - asin_impl_tail(T x) { - return sprout::math::half_pi() + sprout::math::sqrt(T(1) - x) - * ((((((((((((( - + -0.0000121189820098929624806) * x - + 0.0001307564187657962919394) * x - + -0.0006702485124770180942917) * x - + 0.0021912255981979442677477) * x - + -0.0052049731575223952626203) * x - + 0.0097868293573384001221447) * x - + -0.0156746038587246716524035) * x - + 0.0229883479552557203133368) * x - + -0.0331919619444009606270380) * x - + 0.0506659694457588602631748) * x - + -0.0890259194305537131666744) * x - + 0.2145993335526539017488949) * x - + -1.5707961988153774692344105) - ; - } - template - inline SPROUT_CONSTEXPR T - asin_impl(T x) { - return x < T(-0.5) ? -sprout::math::detail::asin_impl_tail(-x) - : x > T(0.5) ? sprout::math::detail::asin_impl_tail(x) - : sprout::math::detail::asin_impl_center(x) - ; - } - } // namespace detail - // - // asin - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - asin(FloatType x) { - return sprout::math::isnan(x) ? x - : sprout::math::fabs(x) > 1 ? sprout::numeric_limits::quiet_NaN() -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_asin(x) -#else - : x == 0 ? x - : static_cast( - x < 0 ? -sprout::math::detail::asin_impl(static_cast::type>(-x)) - : sprout::math::detail::asin_impl(static_cast::type>(x)) - ) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - asin(IntType x) { - return sprout::math::asin(static_cast(x)); - } - } // namespace math - - using sprout::math::asin; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_ASIN_HPP diff --git a/dsp/lib/sprout/sprout/math/asinh.hpp b/dsp/lib/sprout/sprout/math/asinh.hpp deleted file mode 100644 index b7919f5..0000000 --- a/dsp/lib/sprout/sprout/math/asinh.hpp +++ /dev/null @@ -1,78 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_ASINH_HPP -#define SPROUT_MATH_ASINH_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_asinh(float x) { - return __builtin_asinhf(x); - } - inline SPROUT_CONSTEXPR double - builtin_asinh(double x) { - return __builtin_asinh(x); - } - inline SPROUT_CONSTEXPR long double - builtin_asinh(long double x) { - return __builtin_asinhl(x); - } -#endif - - template - inline SPROUT_CONSTEXPR T - asinh_impl(T x) { - return sprout::math::log(x + sprout::math::sqrt(x * x + 1)); - } - } // namespace detail - // - // asinh - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - asinh(FloatType x) { - return sprout::math::isnan(x) ? x - : x == sprout::numeric_limits::infinity() ? sprout::numeric_limits::infinity() - : x == -sprout::numeric_limits::infinity() ? -sprout::numeric_limits::infinity() -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_asinh(x) -#else - : x == 0 ? x - : static_cast(sprout::math::detail::asinh_impl(static_cast::type>(x))) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - asinh(IntType x) { - return sprout::math::asinh(static_cast(x)); - } - } // namespace math - - using sprout::math::asinh; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_ASINH_HPP diff --git a/dsp/lib/sprout/sprout/math/atan.hpp b/dsp/lib/sprout/sprout/math/atan.hpp deleted file mode 100644 index bdddd0d..0000000 --- a/dsp/lib/sprout/sprout/math/atan.hpp +++ /dev/null @@ -1,98 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_ATAN_HPP -#define SPROUT_MATH_ATAN_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_atan(float x) { - return __builtin_atanf(x); - } - inline SPROUT_CONSTEXPR double - builtin_atan(double x) { - return __builtin_atan(x); - } - inline SPROUT_CONSTEXPR long double - builtin_atan(long double x) { - return __builtin_atanl(x); - } -#endif - - template - inline SPROUT_CONSTEXPR T - atan_impl_1(T x, std::size_t n, std::size_t last) { - return last - n == 1 - ? (n % 2 ? -1 : 1) * sprout::detail::pow_n(x, 2 * n + 1) / (2 * n + 1) - : sprout::math::detail::atan_impl_1(x, n, n + (last - n) / 2) - + sprout::math::detail::atan_impl_1(x, n + (last - n) / 2, last) - ; - } - template - inline SPROUT_CONSTEXPR T - atan_impl(T x) { - return x > sprout::math::root_two() + 1 - ? sprout::math::half_pi() - sprout::math::detail::atan_impl_1(1 / x, 0, sprout::math::factorial_limit() + 1) - : x > sprout::math::root_two() - 1 - ? sprout::math::quarter_pi() + sprout::math::detail::atan_impl_1((x - 1) / (x + 1), 0, sprout::math::factorial_limit() + 1) - : x + sprout::math::detail::atan_impl_1(x, 1, sprout::math::factorial_limit() + 1) - ; - } - - } // namespace detail - // - // atan - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - atan(FloatType x) { - return sprout::math::isnan(x) ? x - : x == sprout::numeric_limits::infinity() ? sprout::math::half_pi() - : x == -sprout::numeric_limits::infinity() ? -sprout::math::half_pi() -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_atan(x) -#else - : x == 0 ? x - : static_cast( - x < 0 ? -sprout::math::detail::atan_impl(static_cast::type>(-x)) - : sprout::math::detail::atan_impl(static_cast::type>(x)) - ) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - atan(IntType x) { - return sprout::math::atan(static_cast(x)); - } - } // namespace math - - using sprout::math::atan; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_ATAN_HPP diff --git a/dsp/lib/sprout/sprout/math/atan2.hpp b/dsp/lib/sprout/sprout/math/atan2.hpp deleted file mode 100644 index 141729c..0000000 --- a/dsp/lib/sprout/sprout/math/atan2.hpp +++ /dev/null @@ -1,125 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_ATAN2_HPP -#define SPROUT_MATH_ATAN2_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_atan2(float y, float x) { - return __builtin_atan2f(y, x); - } - inline SPROUT_CONSTEXPR double - builtin_atan2(double y, double x) { - return __builtin_atan2(y, x); - } - inline SPROUT_CONSTEXPR long double - builtin_atan2(long double y, long double x) { - return __builtin_atan2l(y, x); - } -#endif - - template - inline SPROUT_CONSTEXPR T - atan2_impl(T y, T x) { - return x < 0 ? sprout::math::atan(y / x) + ( - y < 0 ? -sprout::math::pi() - : sprout::math::pi() - ) - : sprout::math::atan(y / x) - ; - } - } // namespace detail - // - // atan2 - // - // issue: - // [ !(SPROUT_USE_BUILTIN_CMATH_FUNCTION || SPROUT_USE_BUILTIN_COPYSIGN_FUNCTION) ] - // atan2(}0, -0) returns } . - // # returns }0 . ( same as atan2(}0, +0) ) - // atan2(-0, x) returns - for x < 0. - // # returns + . ( same as atan2(+0, x) ) - // atan2(-NaN, -NaN) returns -NaN . - // # returns +NaN . ( same as atan2(+NaN, +NaN) ) - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - atan2(FloatType y, FloatType x) { - return sprout::math::isnan(y) - ? sprout::math::isnan(x) - ? sprout::math::signbit(y) && sprout::math::signbit(x) ? -sprout::numeric_limits::quiet_NaN() - : sprout::numeric_limits::quiet_NaN() - : y - : sprout::math::isnan(x) ? x - : x == -sprout::numeric_limits::infinity() - ? y == sprout::numeric_limits::infinity() ? sprout::math::three_quarters_pi() - : y == -sprout::numeric_limits::infinity() ? -sprout::math::three_quarters_pi() - : sprout::math::copysign(sprout::math::pi(), y) - : x == sprout::numeric_limits::infinity() - ? y == sprout::numeric_limits::infinity() ? sprout::math::quarter_pi() - : y == -sprout::numeric_limits::infinity() ? -sprout::math::quarter_pi() - : FloatType(0) * y - : y == sprout::numeric_limits::infinity() ? sprout::math::half_pi() - : y == -sprout::numeric_limits::infinity() ? -sprout::math::half_pi() -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_atan2(y, x) -#else - : y == 0 - ? x < 0 ? sprout::math::copysign(sprout::math::pi(), y) - : x > 0 ? FloatType(0) * y - : sprout::math::signbit(x) ? sprout::math::copysign(sprout::math::pi(), y) - : FloatType(0) * y - : x == 0 - ? y < 0 ? -sprout::math::half_pi() - : sprout::math::half_pi() - : static_cast( - sprout::math::detail::atan2_impl( - static_cast::type>(y), - static_cast::type>(x) - ) - ) -#endif - ; - } - template< - typename ArithmeticType1, - typename ArithmeticType2, - typename sprout::enabler_if< - std::is_arithmetic::value && std::is_arithmetic::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::float_promote::type - atan2(ArithmeticType1 y, ArithmeticType2 x) { - typedef typename sprout::float_promote::type type; - return sprout::math::atan2(static_cast(y), static_cast(x)); - } - } // namespace math - - using sprout::math::atan2; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_ATAN2_HPP diff --git a/dsp/lib/sprout/sprout/math/atanh.hpp b/dsp/lib/sprout/sprout/math/atanh.hpp deleted file mode 100644 index fed8bdb..0000000 --- a/dsp/lib/sprout/sprout/math/atanh.hpp +++ /dev/null @@ -1,79 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_ATANH_HPP -#define SPROUT_MATH_ATANH_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_atanh(float x) { - return __builtin_atanhf(x); - } - inline SPROUT_CONSTEXPR double - builtin_atanh(double x) { - return __builtin_atanh(x); - } - inline SPROUT_CONSTEXPR long double - builtin_atanh(long double x) { - return __builtin_atanhl(x); - } -#endif - - template - inline SPROUT_CONSTEXPR T - atanh_impl(T x) { - return sprout::math::log((1 + x) / (1 - x)) / 2; - } - } // namespace detail - // - // atanh - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - atanh(FloatType x) { - return sprout::math::isnan(x) ? x - : x == 1 ? sprout::numeric_limits::infinity() - : x == -1 ? -sprout::numeric_limits::infinity() - : sprout::math::fabs(x) > 1 ? -sprout::numeric_limits::quiet_NaN() -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_atanh(x) -#else - : x == 0 ? x - : static_cast(sprout::math::detail::atanh_impl(static_cast::type>(x))) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - atanh(IntType x) { - return sprout::math::atanh(static_cast(x)); - } - } // namespace math - - using sprout::math::atanh; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_ATANH_HPP diff --git a/dsp/lib/sprout/sprout/math/bernoulli.hpp b/dsp/lib/sprout/sprout/math/bernoulli.hpp deleted file mode 100644 index 1096095..0000000 --- a/dsp/lib/sprout/sprout/math/bernoulli.hpp +++ /dev/null @@ -1,269 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_BERNOULLI_HPP -#define SPROUT_MATH_BERNOULLI_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -# define SPROUT_BERNOULLI_TABLE_DEF_FLOAT \ - {{ \ - 1.F, \ - 1.F / 6, \ - -1.F / 30, \ - 1.F / 42, \ - -1.F / 30, \ - 5.F / 66, \ - -691.F / 2730, \ - 7.F / 6, \ - -3617.F / 510, \ - 43867.F / 798, \ - -174611.F / 330, \ - 854513.F / 138, \ - -236364091.F / 2730, \ - 8553103.F / 6, \ - -236364091.F / 870, \ - 8615841276005.F / 14322, \ - -7709321041217.F / 510, \ - 2577687858367.F / 6, \ - -26315271553053477373.F / 1919190, \ - 2929993913841559.F / 6, \ - -261082718496449122051.F / 13530, \ - 1520097643918070802691.F / 1806, \ - -2.783326957930102423502e22F / 690, \ - 5.96451111593912163278e23F / 282, \ - -1.20866265222965259346e23F, \ - 7.500866746076964366856e24F, \ - -5.038778101481068914138e26F, \ - 3.65287764848181233351e28F, \ - -2.849876930245088222627e30F, \ - 2.386542749968362764465e32F, \ - -2.139994925722533366581e34F, \ - 2.050097572347809756992e36F, \ - -2.09380059113463784091e38F \ - }} -# define SPROUT_BERNOULLI_TABLE_DEF_DOUBLE \ - {{ \ - 1., \ - 1. / 6, \ - -1. / 30, \ - 1. / 42, \ - -1. / 30, \ - 5. / 66, \ - -691. / 2730, \ - 7. / 6, \ - -3617. / 510, \ - 43867. / 798, \ - -174611. / 330, \ - 854513. / 138, \ - -236364091. / 2730, \ - 8553103. / 6, \ - -236364091. / 870, \ - 8615841276005. / 14322, \ - -7709321041217. / 510, \ - 2577687858367. / 6, \ - -26315271553053477373. / 1919190, \ - 2929993913841559. / 6, \ - -261082718496449122051. / 13530, \ - 1520097643918070802691. / 1806, \ - -2.783326957930102423502e22 / 690, \ - 5.96451111593912163278e23 / 282, \ - -1.20866265222965259346e23, \ - 7.500866746076964366856e24, \ - -5.038778101481068914138e26, \ - 3.65287764848181233351e28, \ - -2.849876930245088222627e30, \ - 2.386542749968362764465e32, \ - -2.139994925722533366581e34, \ - 2.050097572347809756992e36, \ - -2.09380059113463784091e38, \ - 2.275269648846351555965e40, \ - -2.62577102862395760473e42, \ - 3.21250821027180325182e44, \ - -4.159827816679471091392e46, \ - 5.692069548203528002388e48, \ - -8.21836294197845756923e50, \ - 1.250290432716699301673e53, \ - -2.001558323324837027493e55, \ - 3.36749829153643742334e57, \ - -5.947097050313544771866e59, \ - 1.101191032362797755956e62, \ - -2.135525954525350118866e64, \ - 4.332889698664119241962e66, \ - -9.18855282416693282262e68, \ - 2.034689677632907449346e71, \ - -4.70038339580357310786e73, \ - 1.131804344548424927068e76, \ - -2.838224957069370695926e78 \ - }} -# define SPROUT_BERNOULLI_TABLE_DEF_LONG_DOUBLE \ - {{ \ - 1.L, \ - 1.L / 6, \ - -1.L / 30, \ - 1.L / 42, \ - -1.L / 30, \ - 5.L / 66, \ - -691.L / 2730, \ - 7.L / 6, \ - -3617.L / 510, \ - 43867.L / 798, \ - -174611.L / 330, \ - 854513.L / 138, \ - -236364091.L / 2730, \ - 8553103.L / 6, \ - -236364091.L / 870, \ - 8615841276005.L / 14322, \ - -7709321041217.L / 510, \ - 2577687858367.L / 6, \ - -26315271553053477373.L / 1919190, \ - 2929993913841559.L / 6, \ - -261082718496449122051.L / 13530, \ - 1520097643918070802691.L / 1806, \ - -2.783326957930102423502e22L / 690, \ - 5.96451111593912163278e23L / 282, \ - -1.20866265222965259346e23L, \ - 7.500866746076964366856e24L, \ - -5.038778101481068914138e26L, \ - 3.65287764848181233351e28L, \ - -2.849876930245088222627e30L, \ - 2.386542749968362764465e32L, \ - -2.139994925722533366581e34L, \ - 2.050097572347809756992e36L, \ - -2.09380059113463784091e38L, \ - 2.275269648846351555965e40L, \ - -2.62577102862395760473e42L, \ - 3.21250821027180325182e44L, \ - -4.159827816679471091392e46L, \ - 5.692069548203528002388e48L, \ - -8.21836294197845756923e50L, \ - 1.250290432716699301673e53L, \ - -2.001558323324837027493e55L, \ - 3.36749829153643742334e57L, \ - -5.947097050313544771866e59L, \ - 1.101191032362797755956e62L, \ - -2.135525954525350118866e64L, \ - 4.332889698664119241962e66L, \ - -9.18855282416693282262e68L, \ - 2.034689677632907449346e71L, \ - -4.70038339580357310786e73L, \ - 1.131804344548424927068e76L, \ - -2.838224957069370695926e78L \ - }} - - template - struct bernoulli_numbers; - - template - struct bernoulli_numbers { - public: - typedef float type; - public: - SPROUT_STATIC_CONSTEXPR std::size_t limit = 64; - public: - typedef sprout::array table_type; - public: - SPROUT_STATIC_CONSTEXPR table_type table - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(SPROUT_BERNOULLI_TABLE_DEF_FLOAT) - ; - }; - template - SPROUT_CONSTEXPR_OR_CONST std::size_t sprout::math::detail::bernoulli_numbers< - float, X - >::limit; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::math::detail::bernoulli_numbers< - float, X - >::table_type sprout::math::detail::bernoulli_numbers< - float, X - >::table SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(SPROUT_BERNOULLI_TABLE_DEF_FLOAT); - - template - struct bernoulli_numbers { - public: - typedef double type; - public: - SPROUT_STATIC_CONSTEXPR std::size_t limit = 100; - public: - typedef sprout::array table_type; - public: - SPROUT_STATIC_CONSTEXPR table_type table - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(SPROUT_BERNOULLI_TABLE_DEF_DOUBLE) - ; - }; - template - SPROUT_CONSTEXPR_OR_CONST std::size_t sprout::math::detail::bernoulli_numbers< - double, X - >::limit; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::math::detail::bernoulli_numbers< - double, X - >::table_type sprout::math::detail::bernoulli_numbers< - double, X - >::table SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(SPROUT_BERNOULLI_TABLE_DEF_DOUBLE); - - template - struct bernoulli_numbers { - public: - typedef long double type; - public: - SPROUT_STATIC_CONSTEXPR std::size_t limit = 100; - public: - typedef sprout::array table_type; - public: - SPROUT_STATIC_CONSTEXPR table_type table - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(SPROUT_BERNOULLI_TABLE_DEF_LONG_DOUBLE) - ; - }; - template - SPROUT_CONSTEXPR_OR_CONST std::size_t sprout::math::detail::bernoulli_numbers< - long double, X - >::limit; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::math::detail::bernoulli_numbers< - long double, X - >::table_type sprout::math::detail::bernoulli_numbers< - long double, X - >::table SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(SPROUT_BERNOULLI_TABLE_DEF_LONG_DOUBLE); - -# undef SPROUT_BERNOULLI_TABLE_DEF_FLOAT -# undef SPROUT_BERNOULLI_TABLE_DEF_DOUBLE -# undef SPROUT_BERNOULLI_TABLE_DEF_LONG_DOUBLE - } // namespace detail - // - // bernoulli_number_limit - // - template::value>::type> - inline SPROUT_CONSTEXPR std::size_t bernoulli_number_limit() { - typedef typename std::remove_cv::type type; - return sprout::math::detail::bernoulli_numbers::limit; - } - // - // bernoulli_number - // - template::value>::type> - inline SPROUT_CONSTEXPR T bernoulli_number(std::size_t x) { - typedef typename std::remove_cv::type type; - return SPROUT_ASSERT(x <= sprout::math::bernoulli_number_limit()), - x == 1 ? type(-1) / 2 - : x % 2 ? type(0) - : sprout::math::detail::bernoulli_numbers::table[x / 2] - ; - } - } // namespace math - - using sprout::math::bernoulli_number; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_BERNOULLI_HPP diff --git a/dsp/lib/sprout/sprout/math/cbrt.hpp b/dsp/lib/sprout/sprout/math/cbrt.hpp deleted file mode 100644 index 8ce4958..0000000 --- a/dsp/lib/sprout/sprout/math/cbrt.hpp +++ /dev/null @@ -1,81 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_CBRT_HPP -#define SPROUT_MATH_CBRT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_cbrt(float x) { - return __builtin_cbrtf(x); - } - inline SPROUT_CONSTEXPR double - builtin_cbrt(double x) { - return __builtin_cbrt(x); - } - inline SPROUT_CONSTEXPR long double - builtin_cbrt(long double x) { - return __builtin_cbrtl(x); - } -#endif - - template - inline SPROUT_CONSTEXPR T - cbrt_impl(T x) { - return x < 0 ? -sprout::pow(-x, sprout::math::third()) - : sprout::pow(x, sprout::math::third()) - ; - } - } // namespace detail - // - // cbrt - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - cbrt(FloatType x) { - return sprout::math::isnan(x) ? x - : x == sprout::numeric_limits::infinity() ? sprout::numeric_limits::infinity() - : x == -sprout::numeric_limits::infinity() ? -sprout::numeric_limits::infinity() -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_cbrt(x) -#else - : x == 0 ? x - : static_cast(sprout::math::detail::cbrt_impl(static_cast::type>(x))) -#endif - ; - } - - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - cbrt(IntType x) { - return sprout::math::cbrt(static_cast(x)); - } - } // namespace math - - using sprout::math::cbrt; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_CBRT_HPP diff --git a/dsp/lib/sprout/sprout/math/ceil.hpp b/dsp/lib/sprout/sprout/math/ceil.hpp deleted file mode 100644 index 608d009..0000000 --- a/dsp/lib/sprout/sprout/math/ceil.hpp +++ /dev/null @@ -1,90 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_CEIL_HPP -#define SPROUT_MATH_CEIL_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_ceil(float x) { - return __builtin_ceilf(x); - } - inline SPROUT_CONSTEXPR double - builtin_ceil(double x) { - return __builtin_ceil(x); - } - inline SPROUT_CONSTEXPR long double - builtin_ceil(long double x) { - return __builtin_ceill(x); - } -#endif - - template - inline SPROUT_CONSTEXPR T - ceil_impl_1(T x, T x0) { - return sprout::math::equal_to(x, x0) ? x0 - : x0 + T(1) - ; - } - template - inline SPROUT_CONSTEXPR T - ceil_impl(T x) { - return x < 0 ? -static_cast(static_cast(-x)) - : sprout::math::detail::ceil_impl_1(x, static_cast(static_cast(x))) - ; - } - } // namespace detail - // - // ceil - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - ceil(FloatType x) { - return sprout::math::isnan(x) ? x - : x == sprout::numeric_limits::infinity() ? sprout::numeric_limits::infinity() - : x == -sprout::numeric_limits::infinity() ? -sprout::numeric_limits::infinity() -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_ceil(x) -#else - : x == 0 ? x - : sprout::numeric_limits::max() < x || sprout::numeric_limits::max() < -x - ? SPROUT_MATH_THROW_LARGE_FLOAT_ROUNDING(std::runtime_error("ceil: large float rounding."), x) - : static_cast(sprout::math::detail::ceil_impl(static_cast::type>(x))) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - ceil(IntType x) { - return sprout::math::ceil(static_cast(x)); - } - } // namespace math - - using sprout::math::ceil; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_CEIL_HPP diff --git a/dsp/lib/sprout/sprout/math/classifications.hpp b/dsp/lib/sprout/sprout/math/classifications.hpp deleted file mode 100644 index a428f42..0000000 --- a/dsp/lib/sprout/sprout/math/classifications.hpp +++ /dev/null @@ -1,21 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_CLASSIFICATIONS_HPP -#define SPROUT_MATH_CLASSIFICATIONS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_MATH_CLASSIFICATIONS_HPP diff --git a/dsp/lib/sprout/sprout/math/cmath.hpp b/dsp/lib/sprout/sprout/math/cmath.hpp deleted file mode 100644 index 357567e..0000000 --- a/dsp/lib/sprout/sprout/math/cmath.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_CMATH_HPP -#define SPROUT_MATH_CMATH_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_MATH_CMATH_HPP diff --git a/dsp/lib/sprout/sprout/math/common_factor.hpp b/dsp/lib/sprout/sprout/math/common_factor.hpp deleted file mode 100644 index 705cef5..0000000 --- a/dsp/lib/sprout/sprout/math/common_factor.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_COMMON_FACTOR_HPP -#define SPROUT_MATH_COMMON_FACTOR_HPP - -#include -#include - -#endif // SPROUT_MATH_COMMON_FACTOR_HPP diff --git a/dsp/lib/sprout/sprout/math/compare.hpp b/dsp/lib/sprout/sprout/math/compare.hpp deleted file mode 100644 index 558c5ea..0000000 --- a/dsp/lib/sprout/sprout/math/compare.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_COMPARE_HPP -#define SPROUT_MATH_COMPARE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - // - // compare - // - template< - typename T, typename U, - typename sprout::enabler_if::value && std::is_arithmetic::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR int - compare(T x, U y) { - return sprout::math::equal_to(x, y) ? 0 - : sprout::math::less(x, y) ? -1 - : 1 - ; - } - } // namespace math -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_COMPARE_HPP diff --git a/dsp/lib/sprout/sprout/math/comparisons.hpp b/dsp/lib/sprout/sprout/math/comparisons.hpp deleted file mode 100644 index 0b9dbeb..0000000 --- a/dsp/lib/sprout/sprout/math/comparisons.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_COMPARISON_HPP -#define SPROUT_MATH_COMPARISON_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_MATH_COMPARISON_HPP diff --git a/dsp/lib/sprout/sprout/math/constant_variables.hpp b/dsp/lib/sprout/sprout/math/constant_variables.hpp deleted file mode 100644 index 49e2282..0000000 --- a/dsp/lib/sprout/sprout/math/constant_variables.hpp +++ /dev/null @@ -1,122 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_CONSTANT_VARIABLES_HPP -#define SPROUT_MATH_CONSTANT_VARIABLES_HPP - -#include -#if SPROUT_USE_VARIABLE_TEMPLATES -# include -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - -namespace sprout { - namespace math { -#if SPROUT_USE_VARIABLE_TEMPLATES - // - // pi - // - template - SPROUT_STATIC_CONSTEXPR T pi_v = sprout::math::pi(); - // - // half_pi - // - template - SPROUT_STATIC_CONSTEXPR T half_pi_v = sprout::math::half_pi(); - // - // third_pi - // two_thirds_pi - // - template - SPROUT_STATIC_CONSTEXPR T third_pi_v = sprout::math::third_pi(); - template - SPROUT_STATIC_CONSTEXPR T two_thirds_pi_v = sprout::math::two_thirds_pi(); - // - // quarter_pi - // three_quarters_pi - // - template - SPROUT_STATIC_CONSTEXPR T quarter_pi_v = sprout::math::quarter_pi(); - template - SPROUT_STATIC_CONSTEXPR T three_quarters_pi_v = sprout::math::three_quarters_pi(); - // - // two_pi - // four_pi - // - template - SPROUT_STATIC_CONSTEXPR T two_pi_v = sprout::math::two_pi(); - template - SPROUT_STATIC_CONSTEXPR T four_pi_v = sprout::math::four_pi(); - // - // two_div_pi - // root_two_div_pi - // - template - SPROUT_STATIC_CONSTEXPR T two_div_pi_v = sprout::math::two_div_pi(); - template - SPROUT_STATIC_CONSTEXPR T root_two_div_pi_v = sprout::math::root_two_div_pi(); - // - // root_pi - // one_div_root_pi - // root_one_div_pi - // two_div_root_pi - // - template - SPROUT_STATIC_CONSTEXPR T root_pi_v = sprout::math::root_pi(); - template - SPROUT_STATIC_CONSTEXPR T one_div_root_pi_v = sprout::math::one_div_root_pi(); - template - SPROUT_STATIC_CONSTEXPR T root_one_div_pi_v = sprout::math::root_one_div_pi(); - template - SPROUT_STATIC_CONSTEXPR T two_div_root_pi_v = sprout::math::two_div_root_pi(); - // - // half - // quarter - // third - // two_thirds - // - template - SPROUT_STATIC_CONSTEXPR T half_v = sprout::math::half(); - template - SPROUT_STATIC_CONSTEXPR T quarter_v = sprout::math::quarter(); - template - SPROUT_STATIC_CONSTEXPR T third_v = sprout::math::third(); - template - SPROUT_STATIC_CONSTEXPR T two_thirds_v = sprout::math::two_thirds(); - // - // root_two - // root_three - // half_root_two - // - template - SPROUT_STATIC_CONSTEXPR T root_two_v = sprout::math::root_two(); - template - SPROUT_STATIC_CONSTEXPR T root_three_v = sprout::math::root_three(); - template - SPROUT_STATIC_CONSTEXPR T half_root_two_v = sprout::math::half_root_two(); - // - // e - // - template - SPROUT_STATIC_CONSTEXPR T e_v = sprout::math::e(); - // - // ln_ten - // ln_two - // - template - SPROUT_STATIC_CONSTEXPR T ln_ten_v = sprout::math::ln_ten(); - template - SPROUT_STATIC_CONSTEXPR T ln_two_v = sprout::math::ln_two(); - // - // phi - // - template - SPROUT_STATIC_CONSTEXPR T phi_v = sprout::math::phi(); -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - } // namespace math -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_CONSTANT_VARIABLES_HPP diff --git a/dsp/lib/sprout/sprout/math/constants.hpp b/dsp/lib/sprout/sprout/math/constants.hpp deleted file mode 100644 index a6c3320..0000000 --- a/dsp/lib/sprout/sprout/math/constants.hpp +++ /dev/null @@ -1,167 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_CONSTANTS_HPP -#define SPROUT_MATH_CONSTANTS_HPP - -#include - -namespace sprout { - namespace math { - // - // pi - // - template - inline SPROUT_CONSTEXPR T pi() { - return static_cast(3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651L); - } - // - // half_pi - // - template - inline SPROUT_CONSTEXPR T half_pi() { - return static_cast(1.57079632679489661923132169163975144209858469968755291048747229615390820314310449931401741267105853399107404326L); - } - // - // third_pi - // two_thirds_pi - // - template - inline SPROUT_CONSTEXPR T third_pi() { - return static_cast(1.04719755119659774615421446109316762806572313312503527365831486410260546876206966620934494178070568932738269550L); - } - template - inline SPROUT_CONSTEXPR T two_thirds_pi() { - return static_cast(2.09439510239319549230842892218633525613144626625007054731662972820521093752413933241868988356141137865476539101L); - } - // - // quarter_pi - // three_quarters_pi - // - template - inline SPROUT_CONSTEXPR T quarter_pi() { - return static_cast(0.78539816339744830961566084581987572104929234984377645524373614807695410157155224965700870633552926699553702163L); - } - template - inline SPROUT_CONSTEXPR T three_quarters_pi() { - return static_cast(2.35619449019234492884698253745962716314787704953132936573120844423086230471465674897102611900658780098661106488L); - } - // - // two_pi - // four_pi - // - template - inline SPROUT_CONSTEXPR T two_pi() { - return static_cast(6.28318530717958647692528676655900576839433879875021164194988918461563281257241799725606965068423413596429617303L); - } - template - inline SPROUT_CONSTEXPR T four_pi() { - return static_cast(12.56637061435917295385057353311801153678867759750042328389977836923126562514483599451213930136846827192859234606L); - } - // - // two_div_pi - // root_two_div_pi - // - template - inline SPROUT_CONSTEXPR T two_div_pi() { - return static_cast(0.636619772367581343075535053490057448137838582961825794990669376235587190536906140360455211065012343824291370907L); - } - template - inline SPROUT_CONSTEXPR T root_two_div_pi() { - return static_cast(0.797884560802865355879892119868763736951717262329869315331851659341315851798603677002504667814613872860605117725L); - } - // - // root_pi - // one_div_root_pi - // root_one_div_pi - // two_div_root_pi - // - template - inline SPROUT_CONSTEXPR T root_pi() { - return static_cast(1.77245385090551602729816748334114518279754945612238712821380778985291128459103218137495065673854466541622682362L); - } - template - inline SPROUT_CONSTEXPR T one_div_root_pi() { - return static_cast(0.564189583547756286948079451560772585844050629328998856844085721710642468441493414486743660202107363443028347906L); - } - template - inline SPROUT_CONSTEXPR T root_one_div_pi() { - return static_cast(0.564189583547756286948079451560772585844050629328998856844085721710642468441493414486743660202107363443028347906L); - } - template - inline SPROUT_CONSTEXPR T two_div_root_pi() { - return static_cast(1.128379167095512573896158903121545171688101258657997713688171443421284936882986828973487320404214726886056695812L); - } - // - // half - // quarter - // third - // two_thirds - // - template - inline SPROUT_CONSTEXPR T half() { - return static_cast(0.5L); - } - template - inline SPROUT_CONSTEXPR T quarter() { - return static_cast(0.25L); - } - template - inline SPROUT_CONSTEXPR T third() { - return static_cast(0.33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333L); - } - template - inline SPROUT_CONSTEXPR T two_thirds() { - return static_cast(0.66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666L); - } - // - // root_two - // root_three - // half_root_two - // - template - inline SPROUT_CONSTEXPR T root_two() { - return static_cast(1.41421356237309504880168872420969807856967187537694807317667973799073247846210703885038753432764157273501384623L); - } - template - inline SPROUT_CONSTEXPR T root_three() { - return static_cast(1.73205080756887729352744634150587236694280525381038062805580697945193301690880003708114618675724857567562614142L); - } - template - inline SPROUT_CONSTEXPR T half_root_two() { - return static_cast(0.707106781186547524400844362104849039284835937688474036588339868995366239231053519425193767163820786367506923115L); - } - // - // e - // - template - inline SPROUT_CONSTEXPR T e() { - return static_cast(2.71828182845904523536028747135266249775724709369995957496696762772407663035354759457138217852516642742746639193L); - } - // - // ln_ten - // ln_two - // - template - inline SPROUT_CONSTEXPR T ln_ten() { - return static_cast(2.30258509299404568401799145468436420760110148862877297603332790096757260967735248023599720508959829834196778404L); - } - template - inline SPROUT_CONSTEXPR T ln_two() { - return static_cast(0.693147180559945309417232121458176568075500134360255254120680009493393621969694715605863326996418687542001481021L); - } - // - // phi - // - template - inline SPROUT_CONSTEXPR T phi() { - return static_cast(1.61803398874989484820458683436563811772030917980576286213544862270526046281890244970720720418939113748475408807L); - } - } // namespace math -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_CONSTANTS_HPP diff --git a/dsp/lib/sprout/sprout/math/copysign.hpp b/dsp/lib/sprout/sprout/math/copysign.hpp deleted file mode 100644 index 71cebbe..0000000 --- a/dsp/lib/sprout/sprout/math/copysign.hpp +++ /dev/null @@ -1,93 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_COPYSIGN_HPP -#define SPROUT_MATH_COPYSIGN_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION || SPROUT_USE_BUILTIN_COPYSIGN_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_copysign(float x, float y) { - return __builtin_copysignf(x, y); - } - inline SPROUT_CONSTEXPR double - builtin_copysign(double x, double y) { - return __builtin_copysign(x, y); - } - inline SPROUT_CONSTEXPR long double - builtin_copysign(long double x, long double y) { - return __builtin_copysignl(x, y); - } -#endif - template - inline SPROUT_CONSTEXPR bool - broken_signbit(FloatType x) { - return !sprout::math::isnan(x) && x < 0; - } - } // namespace detail - // - // copysign - // - // issue: - // [ !(SPROUT_USE_BUILTIN_CMATH_FUNCTION || SPROUT_USE_BUILTIN_COPYSIGN_FUNCTION) ] - // copysign(}x, -0) returns -x for |x| is not 0 . - // # returns +x . ( same as copysign(}x, +0) ) - // copysign(}x, -NaN) returns -x for |x| is not NaN . - // # returns +x . ( same as copysign(}x, +NaN) ) - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - copysign(FloatType x, FloatType y) { - return -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION || SPROUT_USE_BUILTIN_COPYSIGN_FUNCTION - sprout::math::detail::builtin_copysign(x, y) -#else - x == 0 - ? y == 0 ? y - : sprout::math::detail::broken_signbit(y) ? -FloatType(0) - : FloatType(0) - : sprout::math::isnan(x) - ? sprout::math::isnan(y) ? y - : sprout::math::detail::broken_signbit(y) ? -sprout::numeric_limits::quiet_NaN() - : sprout::numeric_limits::quiet_NaN() - : sprout::math::detail::broken_signbit(y) != sprout::math::detail::broken_signbit(x) ? -x - : x -#endif - ; - } - - template< - typename ArithmeticType1, - typename ArithmeticType2, - typename sprout::enabler_if< - std::is_arithmetic::value && std::is_arithmetic::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::float_promote::type - copysign(ArithmeticType1 x, ArithmeticType2 y) { - typedef typename sprout::float_promote::type type; - return sprout::math::copysign(static_cast(x), static_cast(y)); - } - } // namespace math - - using sprout::math::copysign; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_COPYSIGN_HPP diff --git a/dsp/lib/sprout/sprout/math/cos.hpp b/dsp/lib/sprout/sprout/math/cos.hpp deleted file mode 100644 index 0898a17..0000000 --- a/dsp/lib/sprout/sprout/math/cos.hpp +++ /dev/null @@ -1,122 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_COS_HPP -#define SPROUT_MATH_COS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_cos(float x) { - return __builtin_cosf(x); - } - inline SPROUT_CONSTEXPR double - builtin_cos(double x) { - return __builtin_cos(x); - } - inline SPROUT_CONSTEXPR long double - builtin_cos(long double x) { - return __builtin_cosl(x); - } -#endif - - template - inline SPROUT_CONSTEXPR T - cos_impl_1(T x2, std::size_t n, std::size_t last) { - return last - n == 1 - ? (n % 2 ? -1 : 1) * sprout::detail::pow_n(x2, n) / sprout::math::unchecked_factorial(2 * n) - : sprout::math::detail::cos_impl_1(x2, n, n + (last - n) / 2) - + sprout::math::detail::cos_impl_1(x2, n + (last - n) / 2, last) - ; - } - template - inline SPROUT_CONSTEXPR T - cos_impl(T x) { - return T(1) + sprout::math::detail::cos_impl_1( - sprout::detail::pow2(sprout::math::fmod(x, sprout::math::two_pi())), - 1, sprout::math::factorial_limit() / 2 + 1 - ); - } - - // !!! OLD: -// template -// inline SPROUT_CONSTEXPR T -// cos_impl_2(T x) { -// return x <= sprout::math::quarter_pi() ? -sprout::math::detail::cosp(x) -// : x <= sprout::math::half_pi() ? -sprout::math::detail::sinp(sprout::math::half_pi() - x) -// : x <= sprout::math::three_quarters_pi() ? sprout::math::detail::sinp(x - sprout::math::half_pi()) -// : sprout::math::detail::cosp(sprout::math::pi() - x) -// ; -// } -// template -// inline SPROUT_CONSTEXPR T -// cos_impl_1(T x) { -// return x > sprout::math::pi() ? sprout::math::detail::cos_impl_2(x - sprout::math::pi()) -// : x <= sprout::math::quarter_pi() ? sprout::math::detail::cosp(x) -// : x <= sprout::math::half_pi() ? sprout::math::detail::sinp(sprout::math::half_pi() - x) -// : x <= sprout::math::three_quarters_pi() ? -sprout::math::detail::sinp(x - sprout::math::half_pi()) -// : -sprout::math::detail::cosp(sprout::math::pi() - x) -// ; -// } -// template -// inline SPROUT_CONSTEXPR T -// cos_impl(T x) { -// return sprout::math::detail::cos_impl_1(sprout::math::fmod(sprout::math::fabs(x), sprout::math::two_pi())); -// } - } // namespace detail - // - // cos - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - cos(FloatType x) { - return sprout::math::isnan(x) ? x - : x == sprout::numeric_limits::infinity() || x == -sprout::numeric_limits::infinity() - ? -sprout::numeric_limits::quiet_NaN() -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_cos(x) -#else - : x == 0 ? FloatType(1) - : static_cast(sprout::math::detail::cos_impl(static_cast::type>(x))) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - cos(IntType x) { - return sprout::math::cos(static_cast(x)); - } - } // namespace math - - using sprout::math::cos; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_COS_HPP diff --git a/dsp/lib/sprout/sprout/math/cosh.hpp b/dsp/lib/sprout/sprout/math/cosh.hpp deleted file mode 100644 index 35951a4..0000000 --- a/dsp/lib/sprout/sprout/math/cosh.hpp +++ /dev/null @@ -1,83 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_COSH_HPP -#define SPROUT_MATH_COSH_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_cosh(float x) { - return __builtin_coshf(x); - } - inline SPROUT_CONSTEXPR double - builtin_cosh(double x) { - return __builtin_cosh(x); - } - inline SPROUT_CONSTEXPR long double - builtin_cosh(long double x) { - return __builtin_coshl(x); - } -#endif - - template - inline SPROUT_CONSTEXPR T - cosh_impl_1(T t) { - return T(0.5) * t + T(0.5) / t; - } - template - inline SPROUT_CONSTEXPR T - cosh_impl(T x) { - return sprout::math::detail::cosh_impl_1(sprout::math::exp(x)); - } - } // namespace detail - // - // cosh - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - cosh(FloatType x) { - return sprout::math::isnan(x) ? x - : x == sprout::numeric_limits::infinity() || x == -sprout::numeric_limits::infinity() - ? sprout::numeric_limits::infinity() -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_cosh(x) -#else - : x == 0 ? FloatType(1) - : static_cast(sprout::math::detail::cosh_impl(static_cast::type>(x))) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - cosh(IntType x) { - return sprout::math::cosh(static_cast(x)); - } - } // namespace math - - using sprout::math::cosh; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_COSH_HPP diff --git a/dsp/lib/sprout/sprout/math/curve.hpp b/dsp/lib/sprout/sprout/math/curve.hpp deleted file mode 100644 index e84dc77..0000000 --- a/dsp/lib/sprout/sprout/math/curve.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_CURVE_HPP -#define SPROUT_MATH_CURVE_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_MATH_CURVE_HPP diff --git a/dsp/lib/sprout/sprout/math/curve/bezier.hpp b/dsp/lib/sprout/sprout/math/curve/bezier.hpp deleted file mode 100644 index 31e8ff7..0000000 --- a/dsp/lib/sprout/sprout/math/curve/bezier.hpp +++ /dev/null @@ -1,144 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_CURVE_BEZIER_HPP -#define SPROUT_MATH_CURVE_BEZIER_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { - template::value - 1> - class bezier_impl; - template - class bezier_impl { - public: - static SPROUT_CONSTEXPR typename sprout::math::curve_point_result::type - call(Points const& p, T const& t) { - using sprout::tuples::nested_get; - using sprout::detail::pow2; - return sprout::math::curve_point_traits::make( - pow2(1 - t) * nested_get<0, 0>(p) - + 2 * t * (1 - t) * nested_get<1, 0>(p) - + pow2(t) * nested_get<2, 0>(p) - , - pow2(1 - t) * nested_get<0, 1>(p) - + 2 * t * (1 - t) * nested_get<1, 1>(p) - + pow2(t) * nested_get<2, 1>(p) - ); - } - }; - template - class bezier_impl { - public: - static SPROUT_CONSTEXPR typename sprout::math::curve_point_result::type - call(Points const& p, T const& t) { - using sprout::tuples::nested_get; - using sprout::detail::pow2; - using sprout::detail::pow3; - return sprout::math::curve_point_traits::make( - pow3(1 - t) * nested_get<0, 0>(p) - + 3 * t * pow2(1 - t) * nested_get<1, 0>(p) - + 3 * pow2(t) * (1 - t) * nested_get<2, 0>(p) - + pow3(t) * nested_get<3, 0>(p) - , - pow3(1 - t) * nested_get<0, 1>(p) - + 3 * t * pow2(1 - t) * nested_get<1, 1>(p) - + 3 * pow2(t) * (1 - t) * nested_get<2, 1>(p) - + pow3(t) * nested_get<3, 1>(p) - ); - } - }; - template - class bezier_impl { - public: - static SPROUT_CONSTEXPR typename sprout::math::curve_point_result::type - call(Points const& p, T const& t) { - using sprout::tuples::nested_get; - using sprout::detail::pow2; - using sprout::detail::pow3; - using sprout::detail::pow4; - return sprout::math::curve_point_traits::make( - pow4(1 - t) * nested_get<0, 0>(p) - + 4 * t * pow3(1 - t) * nested_get<1, 0>(p) - + 6 * pow2(t) * pow2(1 - t) * nested_get<2, 0>(p) - + 4 * pow3(t) * (1 - t) * nested_get<3, 0>(p) - + pow4(t) * nested_get<4, 0>(p) - , - pow4(1 - t) * nested_get<0, 1>(p) - + 4 * t * pow3(1 - t) * nested_get<1, 1>(p) - + 6 * pow2(t) * pow2(1 - t) * nested_get<2, 1>(p) - + 4 * pow3(t) * (1 - t) * nested_get<3, 1>(p) - + pow4(t) * nested_get<4, 1>(p) - ); - } - }; - template - class bezier_impl { - public: - static SPROUT_CONSTEXPR typename sprout::math::curve_point_result::type - call(Points const& p, T const& t) { - using sprout::tuples::nested_get; - using sprout::detail::pow2; - using sprout::detail::pow3; - using sprout::detail::pow4; - using sprout::detail::pow5; - return sprout::math::curve_point_traits::make( - pow5(1 - t) * nested_get<0, 0>(p) - + 5 * t * pow4(1 - t) * nested_get<1, 0>(p) - + 10 * pow2(t) * pow3(1 - t) * nested_get<2, 0>(p) - + 10 * pow3(t) * pow2(1 - t) * nested_get<3, 0>(p) - + 5 * pow4(t) * (1 - t) * nested_get<4, 0>(p) - + pow5(t) * nested_get<5, 0>(p) - , - pow5(1 - t) * nested_get<0, 1>(p) - + 5 * t * pow4(1 - t) * nested_get<1, 1>(p) - + 10 * pow2(t) * pow3(1 - t) * nested_get<2, 1>(p) - + 10 * pow3(t) * pow2(1 - t) * nested_get<3, 1>(p) - + 5 * pow4(t) * (1 - t) * nested_get<4, 1>(p) - + pow5(t) * nested_get<5, 1>(p) - ); - } - }; - } // namespace detail - - // - // bezier - // - template - inline SPROUT_CONSTEXPR typename sprout::math::curve_point_result::type - bezier(T const& t, Points const& p) { - return sprout::math::detail::bezier_impl::call(p, t); - } - template - inline SPROUT_CONSTEXPR typename sprout::math::curve_point_result::type - bezier(T const& t, Points const& p) { - return sprout::math::detail::bezier_impl::call(p, t); - } - - template - inline SPROUT_CONSTEXPR typename sprout::math::curve_point_result >::type - bezier(T const& t, P0 const& p0, P1 const& p1, P2 const& p2, PTail const&... p) { - return sprout::math::bezier(t, sprout::tuples::forward_as_tuple(p0, p1, p2, p...)); - } - template - inline SPROUT_CONSTEXPR typename sprout::math::curve_point_result >::type - bezier(T const& t, P0 const& p0, P1 const& p1, P2 const& p2, PTail const&... p) { - return sprout::math::bezier(t, sprout::tuples::forward_as_tuple(p0, p1, p2, p...)); - } - } // namespace math - - using sprout::math::bezier; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_CURVE_BEZIER_HPP diff --git a/dsp/lib/sprout/sprout/math/curve/catmull_rom_spline.hpp b/dsp/lib/sprout/sprout/math/curve/catmull_rom_spline.hpp deleted file mode 100644 index 53ca05a..0000000 --- a/dsp/lib/sprout/sprout/math/curve/catmull_rom_spline.hpp +++ /dev/null @@ -1,122 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_CURVE_CATMULL_ROM_SPLINE_HPP -#define SPROUT_MATH_CURVE_CATMULL_ROM_SPLINE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { - template - class catmull_rom_spline_impl { - public: - static SPROUT_CONSTEXPR typename sprout::math::curve_point_result::type - call(Points const& p, T const& t) { - using sprout::tuples::nested_get; - using sprout::detail::pow2; - using sprout::detail::pow3; - return sprout::math::curve_point_traits::make( - (-nested_get<0, 0>(p) + 3 * nested_get<1, 0>(p) - 3 * nested_get<2, 0>(p) + nested_get<3, 0>(p)) / 2 * pow3(t) - + (2 * nested_get<0, 0>(p) - 5 * nested_get<1, 0>(p) + 4 * nested_get<2, 0>(p) - nested_get<3, 0>(p)) / 2 * pow2(t) - + (-nested_get<0, 0>(p) + nested_get<2, 0>(p)) / 2 * t - + nested_get<1, 0>(p) - , - (-nested_get<0, 1>(p) + 3 * nested_get<1, 1>(p) - 3 * nested_get<2, 1>(p) + nested_get<3, 1>(p)) / 2 * pow3(t) - + (2 * nested_get<0, 1>(p) - 5 * nested_get<1, 1>(p) + 4 * nested_get<2, 1>(p) - nested_get<3, 1>(p)) / 2 * pow2(t) - + (-nested_get<0, 1>(p) + nested_get<2, 1>(p)) / 2 * t - + nested_get<1, 1>(p) - ); - } - }; - template - class catmull_rom_spline_start_impl { - public: - static SPROUT_CONSTEXPR typename sprout::math::curve_point_result::type - call(Points const& p, T const& t) { - using sprout::tuples::nested_get; - using sprout::detail::pow2; - return sprout::math::curve_point_traits::make( - (nested_get<0, 0>(p) - 2 * nested_get<1, 0>(p) + nested_get<2, 0>(p)) / 2 * pow2(t) - + (-3 * nested_get<0, 0>(p) + 4 * nested_get<1, 0>(p) - nested_get<2, 0>(p)) / 2 * t - + nested_get<0, 0>(p) - , - (nested_get<0, 1>(p) - 2 * nested_get<1, 1>(p) + nested_get<2, 1>(p)) / 2 * pow2(t) - + (-3 * nested_get<0, 1>(p) + 4 * nested_get<1, 1>(p) - nested_get<2, 1>(p)) / 2 * t - + nested_get<0, 1>(p) - ); - } - }; - template - class catmull_rom_spline_end_impl { - public: - static SPROUT_CONSTEXPR typename sprout::math::curve_point_result::type - call(Points const& p, T const& t) { - using sprout::tuples::nested_get; - using sprout::detail::pow2; - return sprout::math::curve_point_traits::make( - (nested_get<0, 0>(p) - 2 * nested_get<1, 0>(p) + nested_get<2, 0>(p)) / 2 * pow2(t) - + (-nested_get<0, 0>(p) + nested_get<2, 0>(p)) / 2 * t - + nested_get<1, 0>(p) - , - (nested_get<0, 1>(p) - 2 * nested_get<1, 1>(p) + nested_get<2, 1>(p)) / 2 * pow2(t) - + (-nested_get<0, 1>(p) + nested_get<2, 1>(p)) / 2 * t - + nested_get<1, 1>(p) - ); - } - }; - } // namespace detail - - // - // catmull_rom_spline - // catmull_rom_spline_start - // catmull_rom_spline_end - // - template - inline SPROUT_CONSTEXPR typename sprout::math::curve_point_result::type - catmull_rom_spline(T const& t, Points const& p) { - return sprout::math::detail::catmull_rom_spline_impl::call(p, t); - } - template - inline SPROUT_CONSTEXPR typename sprout::math::curve_point_result::type - catmull_rom_spline_start(T const& t, Points const& p) { - return sprout::math::detail::catmull_rom_spline_start_impl::call(p, t); - } - template - inline SPROUT_CONSTEXPR typename sprout::math::curve_point_result::type - catmull_rom_spline_end(T const& t, Points const& p) { - return sprout::math::detail::catmull_rom_spline_end_impl::call(p, t); - } - - template - inline SPROUT_CONSTEXPR typename sprout::math::curve_point_result >::type - catmull_rom_spline(T const& t, P0 const& p0, P1 const& p1, P2 const& p2, P3 const& p3) { - return sprout::math::catmull_rom_spline(t, sprout::tuples::forward_as_tuple(p0, p1, p2, p3)); - } - template - inline SPROUT_CONSTEXPR typename sprout::math::curve_point_result >::type - catmull_rom_spline_start(T const& t, P0 const& p0, P1 const& p1, P2 const& p2) { - return sprout::math::catmull_rom_spline_start(t, sprout::tuples::forward_as_tuple(p0, p1, p2)); - } - template - inline SPROUT_CONSTEXPR typename sprout::math::curve_point_result >::type - catmull_rom_spline_end(T const& t, P0 const& p0, P1 const& p1, P2 const& p2) { - return sprout::math::catmull_rom_spline_end(t, sprout::tuples::forward_as_tuple(p0, p1, p2)); - } - } // namespace math - - using sprout::math::catmull_rom_spline; - using sprout::math::catmull_rom_spline_start; - using sprout::math::catmull_rom_spline_end; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_CURVE_CATMULL_ROM_SPLINE_HPP diff --git a/dsp/lib/sprout/sprout/math/curve/curve_point.hpp b/dsp/lib/sprout/sprout/math/curve/curve_point.hpp deleted file mode 100644 index 1009424..0000000 --- a/dsp/lib/sprout/sprout/math/curve/curve_point.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_CURVE_CURVE_POINT_HPP -#define SPROUT_MATH_CURVE_CURVE_POINT_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - // - // curve_point - // curve_point_traits - // curve_point_result - // - template - struct curve_point - : public sprout::remove_cvref(std::declval()))> - {}; - template - struct curve_point_traits - : public sprout::tuples::tuple_construct_traits::type> - {}; - template - struct curve_point_result - : public sprout::identity< - typename sprout::math::curve_point_traits::copied_type - > - {}; - } // namespace math -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_CURVE_CURVE_POINT_HPP diff --git a/dsp/lib/sprout/sprout/math/detail/config.hpp b/dsp/lib/sprout/sprout/math/detail/config.hpp deleted file mode 100644 index a714ebc..0000000 --- a/dsp/lib/sprout/sprout/math/detail/config.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_DETAIL_CONFIG_HPP -#define SPROUT_MATH_DETAIL_CONFIG_HPP - -#include -#include -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION -# include -#endif - -#if (FLT_RADIX == 2) -# define SPROUT_FLT_RADIX_IS_2 1 -#else -# define SPROUT_FLT_RADIX_IS_2 0 -#endif - -#if SPROUT_NOERROR_LARGE_FLOAT_ROUNDING -# define SPROUT_MATH_THROW_LARGE_FLOAT_ROUNDING(e, x) (x) -#else -# define SPROUT_MATH_THROW_LARGE_FLOAT_ROUNDING(e, x) throw (e) -#endif - -#endif // #ifndef SPROUT_MATH_DETAIL_CONFIG_HPP diff --git a/dsp/lib/sprout/sprout/math/detail/cosp.hpp b/dsp/lib/sprout/sprout/math/detail/cosp.hpp deleted file mode 100644 index 97aabb8..0000000 --- a/dsp/lib/sprout/sprout/math/detail/cosp.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_DETAIL_COSP_HPP -#define SPROUT_MATH_DETAIL_COSP_HPP - -#include - -namespace sprout { - namespace math { - namespace detail { - template - inline SPROUT_CONSTEXPR T - cosp_impl(T x2) { - return ((((((( - -1.13585365213876817300e-11) * x2 - + 2.08757008419747316778e-9) * x2 - - 2.75573141792967388112e-7) * x2 - + 2.48015872888517045348e-5) * x2 - - 1.38888888888730564116e-3) * x2 - + 4.16666666666665929218e-2) * x2 - - 0.5) * x2 - + 1.0 - ; - } - template - inline SPROUT_CONSTEXPR T - cosp(T x) { - return sprout::math::detail::cosp_impl(x * x); - } - } // namespace detail - } // namespace math -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_DETAIL_COSP_HPP diff --git a/dsp/lib/sprout/sprout/math/detail/float_compute.hpp b/dsp/lib/sprout/sprout/math/detail/float_compute.hpp deleted file mode 100644 index c0036ae..0000000 --- a/dsp/lib/sprout/sprout/math/detail/float_compute.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_DETAIL_FLOAT_COMPUTE_HPP -#define SPROUT_MATH_DETAIL_FLOAT_COMPUTE_HPP - -#include -#include - -namespace sprout { - namespace math { - namespace detail { - template - struct float_compute - : public sprout::float_promote - {}; - - template - inline SPROUT_CONSTEXPR typename sprout::math::detail::float_compute::type - as_float_compute(FloatType const& x) { - return static_cast::type>(x); - } - } // namespace detail - } // namespace math -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_DETAIL_FLOAT_COMPUTE_HPP diff --git a/dsp/lib/sprout/sprout/math/detail/sinp.hpp b/dsp/lib/sprout/sprout/math/detail/sinp.hpp deleted file mode 100644 index c28c81b..0000000 --- a/dsp/lib/sprout/sprout/math/detail/sinp.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_DETAIL_SINP_HPP -#define SPROUT_MATH_DETAIL_SINP_HPP - -#include - -namespace sprout { - namespace math { - namespace detail { - template - inline SPROUT_CONSTEXPR T - sinp_impl(T x, T x2) { - return x + x * ((((((( - 1.58962301576546568060e-10) * x2 - - 2.50507477628578072866e-8) * x2 - + 2.75573136213857245213e-6) * x2 - - 1.98412698295895385996e-4) * x2 - + 8.33333333332211858878e-3) * x2 - - 1.66666666666666307295e-1) * x2 - ); - } - template - inline SPROUT_CONSTEXPR T - sinp(T x) { - return sprout::math::detail::sinp_impl(x, x * x); - } - } // namespace detail - } // namespace math -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_DETAIL_SINP_HPP diff --git a/dsp/lib/sprout/sprout/math/equal_to.hpp b/dsp/lib/sprout/sprout/math/equal_to.hpp deleted file mode 100644 index bbf5e74..0000000 --- a/dsp/lib/sprout/sprout/math/equal_to.hpp +++ /dev/null @@ -1,74 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_EQUAL_TO_HPP -#define SPROUT_MATH_EQUAL_TO_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { - template - inline SPROUT_CONSTEXPR T - max3(T x, T y, T z) { - return sprout::max(sprout::max(x, y), z); - } - - template - inline SPROUT_CONSTEXPR bool - equal_to_impl(FloatType x, FloatType y) { - return x == y - || sprout::fabs(x - y) - <= sprout::numeric_limits::epsilon() * sprout::math::detail::max3(sprout::fabs(x), sprout::fabs(y), FloatType(1)) - ; - } - - template< - typename FloatType1, typename FloatType2, - typename sprout::enabler_if< - std::is_floating_point::type>::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - equal_to(FloatType1 x, FloatType2 y) { - typedef typename sprout::arithmetic_promote::type type; - return sprout::math::detail::equal_to_impl(x, y); - } - - template< - typename IntType1, typename IntType2, - typename sprout::enabler_if< - std::is_integral::type>::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - equal_to(IntType1 x, IntType2 y) { - return x == y; - } - } // namespace detail - // - // equal_to - // - template< - typename T, typename U, - typename sprout::enabler_if::value && std::is_arithmetic::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - equal_to(T x, U y) { - return sprout::math::detail::equal_to(x, y); - } - } // namespace math -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_EQUAL_TO_HPP diff --git a/dsp/lib/sprout/sprout/math/erf.hpp b/dsp/lib/sprout/sprout/math/erf.hpp deleted file mode 100644 index 0a47c87..0000000 --- a/dsp/lib/sprout/sprout/math/erf.hpp +++ /dev/null @@ -1,177 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_ERF_HPP -#define SPROUT_MATH_ERF_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_erf(float x) { - return __builtin_erff(x); - } - inline SPROUT_CONSTEXPR double - builtin_erf(double x) { - return __builtin_erf(x); - } - inline SPROUT_CONSTEXPR long double - builtin_erf(long double x) { - return __builtin_erfl(x); - } -#endif - - template - inline SPROUT_CONSTEXPR T - erf_impl_3(T x, T y) { - return x < 0 ? -y - : y - ; - } - template - inline SPROUT_CONSTEXPR T - erf_impl_2_b(T x, T t, int k) { - return sprout::math::detail::erf_impl_3( - x, - T(1) - sprout::detail::pow_n( - k == 0 ? ((((((((((( - -2.9734388465e-10 * t + 2.69776334046e-9) * t - + -6.40788827665e-9) * t + -1.6678201321e-8) * t + -2.1854388148686e-7) * t - + 2.66246030457984e-6) * t + 1.612722157047886e-5) * t + -2.5616361025506629e-4) * t - + 1.5380842432375365e-4) * t + 0.00815533022524927908) * t + -0.01402283663896319337) * t - + -0.19746892495383021487) * t + 0.71511720328842845913 - : k == 1 ? ((((((((((( - -1.951073787e-11 * t + -3.2302692214e-10) * t - + 5.22461866919e-9) * t + 3.42940918551e-9) * t + -3.5772874310272e-7) * t - + 1.9999935792654e-7) * t + 2.687044575042908e-5) * t + -1.1843240273775776e-4) * t - + -8.0991728956032271e-4) * t + 0.00661062970502241174) * t + 0.00909530922354827295) * t - + -0.2016007277849101314) * t + 0.51169696718727644908 - : k == 2 ? ((((((((((( - 3.147682272e-11 * t + -4.8465972408e-10) * t - + 6.3675740242e-10) * t + 3.377623323271e-8) * t + -1.5451139637086e-7) * t - + -2.03340624738438e-6) * t + 1.947204525295057e-5) * t + 2.854147231653228e-5) * t - + -0.00101565063152200272) * t + 0.00271187003520095655) * t + 0.02328095035422810727) * t - + -0.16725021123116877197) * t + 0.32490054966649436974 - : k == 3 ? ((((((((((( - 2.31936337e-11 * t + -6.303206648e-11) * t - + -2.64888267434e-9) * t + 2.050708040581e-8) * t + 1.1371857327578e-7) * t - + -2.11211337219663e-6) * t + 3.68797328322935e-6) * t + 9.823686253424796e-5) * t - + -6.5860243990455368e-4) * t + -7.5285814895230877e-4) * t + 0.02585434424202960464) * t - + -0.11637092784486193258) * t + 0.18267336775296612024 - : ((((((((((( - -3.67789363e-12 * t + 2.0876046746e-10) * t - + -1.93319027226e-9) * t + -4.35953392472e-9) * t + 1.8006992266137e-7) * t - + -7.8441223763969e-7) * t + -6.75407647949153e-6) * t + 8.428418334440096e-5) * t - + -1.7604388937031815e-4) * t + -0.0023972961143507161) * t + 0.0206412902387602297) * t - + -0.06905562880005864105) * t + 0.09084526782065478489 - , - 16 - ) - ); - } - template - inline SPROUT_CONSTEXPR T - erf_impl_2_a_1(T x, T w, T t, int k) { - return sprout::math::detail::erf_impl_3( - x, - k == 0 ? (((((((((((( - 5.958930743e-11 * t + -1.13739022964e-9) * t - + 1.466005199839e-8) * t + -1.635035446196e-7) * t + 1.6461004480962e-6) * t - + -1.492559551950604e-5) * t + 1.2055331122299265e-4) * t + -8.548326981129666e-4) * t - + 0.00522397762482322257) * t + -0.0268661706450773342) * t + 0.11283791670954881569) * t - + -0.37612638903183748117) * t + 1.12837916709551257377) * w - : k == 1 ? (((((((((((( - 2.372510631e-11 * t + -4.5493253732e-10) * t - + 5.90362766598e-9) * t + -6.642090827576e-8) * t + 6.7595634268133e-7) * t - + -6.21188515924e-6) * t + 5.10388300970969e-5) * t + -3.7015410692956173e-4) * t - + 0.00233307631218880978) * t + -0.0125498847718219221) * t + 0.05657061146827041994) * t - + -0.2137966477645600658) * t + 0.84270079294971486929) * w - : k == 2 ? (((((((((((( - 9.49905026e-12 * t + -1.8310229805e-10) * t - + 2.39463074e-9) * t + -2.721444369609e-8) * t + 2.8045522331686e-7) * t - + -2.61830022482897e-6) * t + 2.195455056768781e-5) * t + -1.6358986921372656e-4) * t - + 0.00107052153564110318) * t + -0.00608284718113590151) * t + 0.02986978465246258244) * t - + -0.13055593046562267625) * t + 0.67493323603965504676) * w - : k == 3 ? (((((((((((( - 3.82722073e-12 * t + -7.421598602e-11) * t - + 9.793057408e-10) * t + -1.126008898854e-8) * t + 1.1775134830784e-7) * t - + -1.1199275838265e-6) * t + 9.62023443095201e-6) * t + -7.404402135070773e-5) * t - + 5.0689993654144881e-4) * t + -0.00307553051439272889) * t + 0.01668977892553165586) * t - + -0.08548534594781312114) * t + 0.56909076642393639985) * w - : (((((((((((( - 1.55296588e-12 * t + -3.032205868e-11) * t - + 4.0424830707e-10) * t + -4.71135111493e-9) * t + 5.011915876293e-8) * t - + -4.8722516178974e-7) * t + 4.30683284629395e-6) * t + -3.445026145385764e-5) * t - + 2.4879276133931664e-4) * t + -0.00162940941748079288) * t + 0.00988786373932350462) * t - + -0.05962426839442303805) * t + 0.49766113250947636708) * w - ); - } - template - inline SPROUT_CONSTEXPR T - erf_impl_2_a(T x, T w, T t) { - return sprout::math::detail::erf_impl_2_a_1(x, w, sprout::math::fractional_part(t), sprout::math::itrunc(t)); - } - template - inline SPROUT_CONSTEXPR T - erf_impl_1(T x, T w) { - return w < T(2.2) ? sprout::math::detail::erf_impl_2_a(x, w, w * w) - : w < T(6.9) ? sprout::math::detail::erf_impl_2_b(x, sprout::math::fractional_part(w), sprout::math::itrunc(w) - 2) - : sprout::math::detail::erf_impl_3(x, T(1)) - ; - } - template - inline SPROUT_CONSTEXPR T - erf_impl(T x) { - return sprout::math::detail::erf_impl_1(x, x < 0 ? -x : x); - } - } // namespace detail - // - // erf - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - erf(FloatType x) { - return sprout::math::isnan(x) ? x - : x == sprout::numeric_limits::infinity() ? FloatType(1) - : x == -sprout::numeric_limits::infinity() ? FloatType(-1) -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_erf(x) -#else - : x == 0 ? x - : static_cast(sprout::math::detail::erf_impl(static_cast::type>(x))) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - erf(IntType x) { - return sprout::math::erf(static_cast(x)); - } - } // namespace math - - using sprout::math::erf; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_ERF_HPP diff --git a/dsp/lib/sprout/sprout/math/erfc.hpp b/dsp/lib/sprout/sprout/math/erfc.hpp deleted file mode 100644 index 1c0d9bc..0000000 --- a/dsp/lib/sprout/sprout/math/erfc.hpp +++ /dev/null @@ -1,75 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_ERFC_HPP -#define SPROUT_MATH_ERFC_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_erfc(float x) { - return __builtin_erfcf(x); - } - inline SPROUT_CONSTEXPR double - builtin_erfc(double x) { - return __builtin_erfc(x); - } - inline SPROUT_CONSTEXPR long double - builtin_erfc(long double x) { - return __builtin_erfcl(x); - } -#endif - - template - inline SPROUT_CONSTEXPR T - erfc_impl(T x) { - return T(1) - sprout::math::erf(x); - } - } // namespace detail - // - // erfc - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - erfc(FloatType x) { - return sprout::math::isnan(x) ? x - : x == sprout::numeric_limits::infinity() ? FloatType(0) - : x == -sprout::numeric_limits::infinity() ? FloatType(2) -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_erfc(x) -#else - : static_cast(sprout::math::detail::erfc_impl(static_cast::type>(x))) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - erfc(IntType x) { - return sprout::math::erfc(static_cast(x)); - } - } // namespace math - - using sprout::math::erfc; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_ERFC_HPP diff --git a/dsp/lib/sprout/sprout/math/error.hpp b/dsp/lib/sprout/sprout/math/error.hpp deleted file mode 100644 index efe729b..0000000 --- a/dsp/lib/sprout/sprout/math/error.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_ERROR_HPP -#define SPROUT_MATH_ERROR_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_MATH_ERROR_HPP diff --git a/dsp/lib/sprout/sprout/math/exp.hpp b/dsp/lib/sprout/sprout/math/exp.hpp deleted file mode 100644 index 4cc0ad8..0000000 --- a/dsp/lib/sprout/sprout/math/exp.hpp +++ /dev/null @@ -1,90 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_EXP_HPP -#define SPROUT_MATH_EXP_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_exp(float x) { - return __builtin_expf(x); - } - inline SPROUT_CONSTEXPR double - builtin_exp(double x) { - return __builtin_exp(x); - } - inline SPROUT_CONSTEXPR long double - builtin_exp(long double x) { - return __builtin_expl(x); - } -#endif - - template - inline SPROUT_CONSTEXPR T - exp_impl_1(T x, std::size_t n, std::size_t last) { - return last - n == 1 - ? sprout::detail::pow_n(x, n) / sprout::math::unchecked_factorial(n) - : sprout::math::detail::exp_impl_1(x, n, n + (last - n) / 2) - + sprout::math::detail::exp_impl_1(x, n + (last - n) / 2, last) - ; - } - template - inline SPROUT_CONSTEXPR T - exp_impl(T x) { - return !(x > -1) ? T(1) / (T(1) + sprout::math::detail::exp_impl_1(-x, 1, sprout::math::factorial_limit() / 2 + 1)) - : T(1) + sprout::math::detail::exp_impl_1(x, 1, sprout::math::factorial_limit() / 2 + 1) - ; - } - } // namespace detail - // - // exp - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - exp(FloatType x) { - return sprout::math::isnan(x) ? x - : x == -sprout::numeric_limits::infinity() ? FloatType(0) - : x == sprout::numeric_limits::infinity() ? sprout::numeric_limits::infinity() -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_exp(x) -#else - : x == 0 ? FloatType(1) - : static_cast(sprout::math::detail::exp_impl(static_cast::type>(x))) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - exp(IntType x) { - return sprout::math::exp(static_cast(x)); - } - } // namespace math - - using sprout::math::exp; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_EXP_HPP diff --git a/dsp/lib/sprout/sprout/math/exp10.hpp b/dsp/lib/sprout/sprout/math/exp10.hpp deleted file mode 100644 index f7a1310..0000000 --- a/dsp/lib/sprout/sprout/math/exp10.hpp +++ /dev/null @@ -1,59 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_EXP10_HPP -#define SPROUT_MATH_EXP10_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { - template - inline SPROUT_CONSTEXPR T - exp10_impl(T x) { - return sprout::math::exp(x * sprout::math::ln_ten()); - } - } // namespace detail - // - // exp10 - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - exp10(FloatType x) { - return sprout::math::isnan(x) ? x - : x == -sprout::numeric_limits::infinity() ? FloatType(0) - : x == sprout::numeric_limits::infinity() ? sprout::numeric_limits::infinity() - : x == 0 ? FloatType(1) - : static_cast(sprout::math::detail::exp10_impl(static_cast::type>(x))) - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - exp10(IntType x) { - return sprout::math::exp10(static_cast(x)); - } - } // namespace math - - using sprout::math::exp10; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_EXP10_HPP diff --git a/dsp/lib/sprout/sprout/math/exp2.hpp b/dsp/lib/sprout/sprout/math/exp2.hpp deleted file mode 100644 index b399c64..0000000 --- a/dsp/lib/sprout/sprout/math/exp2.hpp +++ /dev/null @@ -1,79 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_EXP2_HPP -#define SPROUT_MATH_EXP2_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_exp2(float x) { - return __builtin_exp2f(x); - } - inline SPROUT_CONSTEXPR double - builtin_exp2(double x) { - return __builtin_exp2(x); - } - inline SPROUT_CONSTEXPR long double - builtin_exp2(long double x) { - return __builtin_exp2l(x); - } -#endif - - template - inline SPROUT_CONSTEXPR T - exp2_impl(T x) { - return sprout::math::exp(x * sprout::math::ln_two()); - } - - } // namespace detail - // - // exp2 - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - exp2(FloatType x) { - return sprout::math::isnan(x) ? x - : x == -sprout::numeric_limits::infinity() ? FloatType(0) - : x == sprout::numeric_limits::infinity() ? sprout::numeric_limits::infinity() -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_exp2(x) -#else - : x == 0 ? FloatType(1) - : static_cast(sprout::math::detail::exp2_impl(static_cast::type>(x))) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - exp2(IntType x) { - return sprout::math::exp2(static_cast(x)); - } - } // namespace math - - using sprout::math::exp2; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_EXP2_HPP diff --git a/dsp/lib/sprout/sprout/math/expm1.hpp b/dsp/lib/sprout/sprout/math/expm1.hpp deleted file mode 100644 index e230fa7..0000000 --- a/dsp/lib/sprout/sprout/math/expm1.hpp +++ /dev/null @@ -1,79 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_EXPM1_HPP -#define SPROUT_MATH_EXPM1_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_expm1(float x) { - return __builtin_expm1f(x); - } - inline SPROUT_CONSTEXPR double - builtin_expm1(double x) { - return __builtin_expm1(x); - } - inline SPROUT_CONSTEXPR long double - builtin_expm1(long double x) { - return __builtin_expm1l(x); - } -#endif - - template - inline SPROUT_CONSTEXPR T - expm1_impl(T x) { - return sprout::math::exp(x) - T(1); - } - } // namespace detail - // - // expm1 - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - expm1(FloatType x) { - return sprout::math::isnan(x) ? x - : x == -sprout::numeric_limits::infinity() ? FloatType(-1) - : x == sprout::numeric_limits::infinity() ? sprout::numeric_limits::infinity() -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_expm1(x) -#else - : x == 0 ? x - : static_cast(sprout::math::detail::expm1_impl(static_cast::type>(x))) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - expm1(IntType x) { - return sprout::math::expm1(static_cast(x)); - } - } // namespace math - - using sprout::math::expm1; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_EXPM1_HPP diff --git a/dsp/lib/sprout/sprout/math/exponential.hpp b/dsp/lib/sprout/sprout/math/exponential.hpp deleted file mode 100644 index 6965412..0000000 --- a/dsp/lib/sprout/sprout/math/exponential.hpp +++ /dev/null @@ -1,22 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_EXPONENTIAL_HPP -#define SPROUT_MATH_EXPONENTIAL_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_MATH_EXPONENTIAL_HPP diff --git a/dsp/lib/sprout/sprout/math/fabs.hpp b/dsp/lib/sprout/sprout/math/fabs.hpp deleted file mode 100644 index bf70449..0000000 --- a/dsp/lib/sprout/sprout/math/fabs.hpp +++ /dev/null @@ -1,68 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_FABS_HPP -#define SPROUT_MATH_FABS_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_fabs(float x) { - return __builtin_fabsf(x); - } - inline SPROUT_CONSTEXPR double - builtin_fabs(double x) { - return __builtin_fabs(x); - } - inline SPROUT_CONSTEXPR long double - builtin_fabs(long double x) { - return __builtin_fabsl(x); - } -#endif - } // namespace detail - // - // fabs - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - fabs(FloatType x) { - return -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - sprout::math::detail::builtin_fabs(x) -#else - sprout::math::isnan(x) ? sprout::numeric_limits::quiet_NaN() - : x == 0 ? FloatType(0) - : sprout::math::copysign(x, FloatType(0)) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - fabs(IntType x) { - return sprout::math::fabs(static_cast(x)); - } - } // namespace math - - using sprout::math::fabs; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_FABS_HPP diff --git a/dsp/lib/sprout/sprout/math/factorial.hpp b/dsp/lib/sprout/sprout/math/factorial.hpp deleted file mode 100644 index 90509e8..0000000 --- a/dsp/lib/sprout/sprout/math/factorial.hpp +++ /dev/null @@ -1,796 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_FACTORIAL_HPP -#define SPROUT_MATH_FACTORIAL_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -# define SPROUT_FACTORIAL_TABLE_DEF_INT_1 \ - {{ \ - 1, \ - 1, \ - 2, \ - 6, \ - 24, \ - 120 \ - }} -# define SPROUT_FACTORIAL_TABLE_DEF_UINT_1 \ - {{ \ - 1, \ - 1, \ - 2, \ - 6, \ - 24, \ - 120 \ - }} -# define SPROUT_FACTORIAL_TABLE_DEF_INT_2 \ - {{ \ - 1, \ - 1, \ - 2, \ - 6, \ - 24, \ - 120, \ - 720, \ - 5040 \ - }} -# define SPROUT_FACTORIAL_TABLE_DEF_UINT_2 \ - {{ \ - 1, \ - 1, \ - 2, \ - 6, \ - 24, \ - 120, \ - 720, \ - 5040, \ - 40320 \ - }} -# define SPROUT_FACTORIAL_TABLE_DEF_INT_4 \ - {{ \ - 1, \ - 1, \ - 2, \ - 6, \ - 24, \ - 120, \ - 720, \ - 5040, \ - 40320, \ - 362880, \ - 3628800, \ - 39916800 \ - }} -# define SPROUT_FACTORIAL_TABLE_DEF_UINT_4 \ - {{ \ - 1, \ - 1, \ - 2, \ - 6, \ - 24, \ - 120, \ - 720, \ - 5040, \ - 40320, \ - 362880, \ - 3628800, \ - 39916800 \ - }} -# define SPROUT_FACTORIAL_TABLE_DEF_INT_8 \ - {{ \ - SPROUT_INT64_C(1), \ - SPROUT_INT64_C(1), \ - SPROUT_INT64_C(2), \ - SPROUT_INT64_C(6), \ - SPROUT_INT64_C(24), \ - SPROUT_INT64_C(120), \ - SPROUT_INT64_C(720), \ - SPROUT_INT64_C(5040), \ - SPROUT_INT64_C(40320), \ - SPROUT_INT64_C(362880), \ - SPROUT_INT64_C(3628800), \ - SPROUT_INT64_C(39916800), \ - SPROUT_INT64_C(479001600), \ - SPROUT_INT64_C(6227020800), \ - SPROUT_INT64_C(87178291200), \ - SPROUT_INT64_C(1307674368000), \ - SPROUT_INT64_C(20922789888000), \ - SPROUT_INT64_C(355687428096000), \ - SPROUT_INT64_C(6402373705728000), \ - SPROUT_INT64_C(121645100408832000), \ - SPROUT_INT64_C(2432902008176640000) \ - }} -# define SPROUT_FACTORIAL_TABLE_DEF_UINT_8 \ - {{ \ - SPROUT_UINT64_C(1), \ - SPROUT_UINT64_C(1), \ - SPROUT_UINT64_C(2), \ - SPROUT_UINT64_C(6), \ - SPROUT_UINT64_C(24), \ - SPROUT_UINT64_C(120), \ - SPROUT_UINT64_C(720), \ - SPROUT_UINT64_C(5040), \ - SPROUT_UINT64_C(40320), \ - SPROUT_UINT64_C(362880), \ - SPROUT_UINT64_C(3628800), \ - SPROUT_UINT64_C(39916800), \ - SPROUT_UINT64_C(479001600), \ - SPROUT_UINT64_C(6227020800), \ - SPROUT_UINT64_C(87178291200), \ - SPROUT_UINT64_C(1307674368000), \ - SPROUT_UINT64_C(20922789888000), \ - SPROUT_UINT64_C(355687428096000), \ - SPROUT_UINT64_C(6402373705728000), \ - SPROUT_UINT64_C(121645100408832000), \ - SPROUT_UINT64_C(2432902008176640000) \ - }} -# define SPROUT_FACTORIAL_TABLE_DEF_FLOAT \ - {{ \ - 1.0F, \ - 1.0F, \ - 2.0F, \ - 6.0F, \ - 24.0F, \ - 120.0F, \ - 720.0F, \ - 5040.0F, \ - 40320.0F, \ - 362880.0F, \ - 3628800.0F, \ - 39916800.0F, \ - 479001600.0F, \ - 6227020800.0F, \ - 87178291200.0F, \ - 1307674368000.0F, \ - 20922789888000.0F, \ - 355687428096000.0F, \ - 6402373705728000.0F, \ - 121645100408832000.0F, \ - 0.243290200817664e19F, \ - 0.5109094217170944e20F, \ - 0.112400072777760768e22F, \ - 0.2585201673888497664e23F, \ - 0.62044840173323943936e24F, \ - 0.15511210043330985984e26F, \ - 0.403291461126605635584e27F, \ - 0.10888869450418352160768e29F, \ - 0.304888344611713860501504e30F, \ - 0.8841761993739701954543616e31F, \ - 0.26525285981219105863630848e33F, \ - 0.822283865417792281772556288e34F, \ - 0.26313083693369353016721801216e36F, \ - 0.868331761881188649551819440128e37F, \ - 0.29523279903960414084761860964352e39F \ - }} -# define SPROUT_FACTORIAL_TABLE_DEF_DOUBLE \ - {{ \ - 1.0, \ - 1.0, \ - 2.0, \ - 6.0, \ - 24.0, \ - 120.0, \ - 720.0, \ - 5040.0, \ - 40320.0, \ - 362880.0, \ - 3628800.0, \ - 39916800.0, \ - 479001600.0, \ - 6227020800.0, \ - 87178291200.0, \ - 1307674368000.0, \ - 20922789888000.0, \ - 355687428096000.0, \ - 6402373705728000.0, \ - 121645100408832000.0, \ - 0.243290200817664e19, \ - 0.5109094217170944e20, \ - 0.112400072777760768e22, \ - 0.2585201673888497664e23, \ - 0.62044840173323943936e24, \ - 0.15511210043330985984e26, \ - 0.403291461126605635584e27, \ - 0.10888869450418352160768e29, \ - 0.304888344611713860501504e30, \ - 0.8841761993739701954543616e31, \ - 0.26525285981219105863630848e33, \ - 0.822283865417792281772556288e34, \ - 0.26313083693369353016721801216e36, \ - 0.868331761881188649551819440128e37, \ - 0.29523279903960414084761860964352e39, \ - 0.103331479663861449296666513375232e41, \ - 0.3719933267899012174679994481508352e42, \ - 0.137637530912263450463159795815809024e44, \ - 0.5230226174666011117600072241000742912e45, \ - 0.203978820811974433586402817399028973568e47, \ - 0.815915283247897734345611269596115894272e48, \ - 0.3345252661316380710817006205344075166515e50, \ - 0.1405006117752879898543142606244511569936e52, \ - 0.6041526306337383563735513206851399750726e53, \ - 0.265827157478844876804362581101461589032e55, \ - 0.1196222208654801945619631614956577150644e57, \ - 0.5502622159812088949850305428800254892962e58, \ - 0.2586232415111681806429643551536119799692e60, \ - 0.1241391559253607267086228904737337503852e62, \ - 0.6082818640342675608722521633212953768876e63, \ - 0.3041409320171337804361260816606476884438e65, \ - 0.1551118753287382280224243016469303211063e67, \ - 0.8065817517094387857166063685640376697529e68, \ - 0.427488328406002556429801375338939964969e70, \ - 0.2308436973392413804720927426830275810833e72, \ - 0.1269640335365827592596510084756651695958e74, \ - 0.7109985878048634518540456474637249497365e75, \ - 0.4052691950487721675568060190543232213498e77, \ - 0.2350561331282878571829474910515074683829e79, \ - 0.1386831185456898357379390197203894063459e81, \ - 0.8320987112741390144276341183223364380754e82, \ - 0.507580213877224798800856812176625227226e84, \ - 0.3146997326038793752565312235495076408801e86, \ - 0.1982608315404440064116146708361898137545e88, \ - 0.1268869321858841641034333893351614808029e90, \ - 0.8247650592082470666723170306785496252186e91, \ - 0.5443449390774430640037292402478427526443e93, \ - 0.3647111091818868528824985909660546442717e95, \ - 0.2480035542436830599600990418569171581047e97, \ - 0.1711224524281413113724683388812728390923e99, \ - 0.1197857166996989179607278372168909873646e101, \ - 0.8504785885678623175211676442399260102886e102, \ - 0.6123445837688608686152407038527467274078e104, \ - 0.4470115461512684340891257138125051110077e106, \ - 0.3307885441519386412259530282212537821457e108, \ - 0.2480914081139539809194647711659403366093e110, \ - 0.188549470166605025498793226086114655823e112, \ - 0.1451830920282858696340707840863082849837e114, \ - 0.1132428117820629783145752115873204622873e116, \ - 0.8946182130782975286851441715398316520698e117, \ - 0.7156945704626380229481153372318653216558e119, \ - 0.5797126020747367985879734231578109105412e121, \ - 0.4753643337012841748421382069894049466438e123, \ - 0.3945523969720658651189747118012061057144e125, \ - 0.3314240134565353266999387579130131288001e127, \ - 0.2817104114380550276949479442260611594801e129, \ - 0.2422709538367273238176552320344125971528e131, \ - 0.210775729837952771721360051869938959523e133, \ - 0.1854826422573984391147968456455462843802e135, \ - 0.1650795516090846108121691926245361930984e137, \ - 0.1485715964481761497309522733620825737886e139, \ - 0.1352001527678402962551665687594951421476e141, \ - 0.1243841405464130725547532432587355307758e143, \ - 0.1156772507081641574759205162306240436215e145, \ - 0.1087366156656743080273652852567866010042e147, \ - 0.103299784882390592625997020993947270954e149, \ - 0.9916779348709496892095714015418938011582e150, \ - 0.9619275968248211985332842594956369871234e152, \ - 0.942689044888324774562618574305724247381e154, \ - 0.9332621544394415268169923885626670049072e156, \ - 0.9332621544394415268169923885626670049072e158, \ - 0.9425947759838359420851623124482936749562e160, \ - 0.9614466715035126609268655586972595484554e162, \ - 0.990290071648618040754671525458177334909e164, \ - 0.1029901674514562762384858386476504428305e167, \ - 0.1081396758240290900504101305800329649721e169, \ - 0.1146280563734708354534347384148349428704e171, \ - 0.1226520203196137939351751701038733888713e173, \ - 0.132464181945182897449989183712183259981e175, \ - 0.1443859583202493582204882102462797533793e177, \ - 0.1588245541522742940425370312709077287172e179, \ - 0.1762952551090244663872161047107075788761e181, \ - 0.1974506857221074023536820372759924883413e183, \ - 0.2231192748659813646596607021218715118256e185, \ - 0.2543559733472187557120132004189335234812e187, \ - 0.2925093693493015690688151804817735520034e189, \ - 0.339310868445189820119825609358857320324e191, \ - 0.396993716080872089540195962949863064779e193, \ - 0.4684525849754290656574312362808384164393e195, \ - 0.5574585761207605881323431711741977155627e197, \ - 0.6689502913449127057588118054090372586753e199, \ - 0.8094298525273443739681622845449350829971e201, \ - 0.9875044200833601362411579871448208012564e203, \ - 0.1214630436702532967576624324188129585545e206, \ - 0.1506141741511140879795014161993280686076e208, \ - 0.1882677176888926099743767702491600857595e210, \ - 0.237217324288004688567714730513941708057e212, \ - 0.3012660018457659544809977077527059692324e214, \ - 0.3856204823625804217356770659234636406175e216, \ - 0.4974504222477287440390234150412680963966e218, \ - 0.6466855489220473672507304395536485253155e220, \ - 0.8471580690878820510984568758152795681634e222, \ - 0.1118248651196004307449963076076169029976e225, \ - 0.1487270706090685728908450891181304809868e227, \ - 0.1992942746161518876737324194182948445223e229, \ - 0.269047270731805048359538766214698040105e231, \ - 0.3659042881952548657689727220519893345429e233, \ - 0.5012888748274991661034926292112253883237e235, \ - 0.6917786472619488492228198283114910358867e237, \ - 0.9615723196941089004197195613529725398826e239, \ - 0.1346201247571752460587607385894161555836e242, \ - 0.1898143759076170969428526414110767793728e244, \ - 0.2695364137888162776588507508037290267094e246, \ - 0.3854370717180072770521565736493325081944e248, \ - 0.5550293832739304789551054660550388118e250, \ - 0.80479260574719919448490292577980627711e252, \ - 0.1174997204390910823947958271638517164581e255, \ - 0.1727245890454638911203498659308620231933e257, \ - 0.2556323917872865588581178015776757943262e259, \ - 0.380892263763056972698595524350736933546e261, \ - 0.571338395644585459047893286526105400319e263, \ - 0.8627209774233240431623188626544191544816e265, \ - 0.1311335885683452545606724671234717114812e268, \ - 0.2006343905095682394778288746989117185662e270, \ - 0.308976961384735088795856467036324046592e272, \ - 0.4789142901463393876335775239063022722176e274, \ - 0.7471062926282894447083809372938315446595e276, \ - 0.1172956879426414428192158071551315525115e279, \ - 0.1853271869493734796543609753051078529682e281, \ - 0.2946702272495038326504339507351214862195e283, \ - 0.4714723635992061322406943211761943779512e285, \ - 0.7590705053947218729075178570936729485014e287, \ - 0.1229694218739449434110178928491750176572e290, \ - 0.2004401576545302577599591653441552787813e292, \ - 0.3287218585534296227263330311644146572013e294, \ - 0.5423910666131588774984495014212841843822e296, \ - 0.9003691705778437366474261723593317460744e298, \ - 0.1503616514864999040201201707840084015944e301, \ - 0.2526075744973198387538018869171341146786e303, \ - 0.4269068009004705274939251888899566538069e305, \ - 0.7257415615307998967396728211129263114717e307 \ - }} -# define SPROUT_FACTORIAL_TABLE_DEF_LONG_DOUBLE \ - {{ \ - 1.0L, \ - 1.0L, \ - 2.0L, \ - 6.0L, \ - 24.0L, \ - 120.0L, \ - 720.0L, \ - 5040.0L, \ - 40320.0L, \ - 362880.0L, \ - 3628800.0L, \ - 39916800.0L, \ - 479001600.0L, \ - 6227020800.0L, \ - 87178291200.0L, \ - 1307674368000.0L, \ - 20922789888000.0L, \ - 355687428096000.0L, \ - 6402373705728000.0L, \ - 121645100408832000.0L, \ - 0.243290200817664e19L, \ - 0.5109094217170944e20L, \ - 0.112400072777760768e22L, \ - 0.2585201673888497664e23L, \ - 0.62044840173323943936e24L, \ - 0.15511210043330985984e26L, \ - 0.403291461126605635584e27L, \ - 0.10888869450418352160768e29L, \ - 0.304888344611713860501504e30L, \ - 0.8841761993739701954543616e31L, \ - 0.26525285981219105863630848e33L, \ - 0.822283865417792281772556288e34L, \ - 0.26313083693369353016721801216e36L, \ - 0.868331761881188649551819440128e37L, \ - 0.29523279903960414084761860964352e39L, \ - 0.103331479663861449296666513375232e41L, \ - 0.3719933267899012174679994481508352e42L, \ - 0.137637530912263450463159795815809024e44L, \ - 0.5230226174666011117600072241000742912e45L, \ - 0.203978820811974433586402817399028973568e47L, \ - 0.815915283247897734345611269596115894272e48L, \ - 0.3345252661316380710817006205344075166515e50L, \ - 0.1405006117752879898543142606244511569936e52L, \ - 0.6041526306337383563735513206851399750726e53L, \ - 0.265827157478844876804362581101461589032e55L, \ - 0.1196222208654801945619631614956577150644e57L, \ - 0.5502622159812088949850305428800254892962e58L, \ - 0.2586232415111681806429643551536119799692e60L, \ - 0.1241391559253607267086228904737337503852e62L, \ - 0.6082818640342675608722521633212953768876e63L, \ - 0.3041409320171337804361260816606476884438e65L, \ - 0.1551118753287382280224243016469303211063e67L, \ - 0.8065817517094387857166063685640376697529e68L, \ - 0.427488328406002556429801375338939964969e70L, \ - 0.2308436973392413804720927426830275810833e72L, \ - 0.1269640335365827592596510084756651695958e74L, \ - 0.7109985878048634518540456474637249497365e75L, \ - 0.4052691950487721675568060190543232213498e77L, \ - 0.2350561331282878571829474910515074683829e79L, \ - 0.1386831185456898357379390197203894063459e81L, \ - 0.8320987112741390144276341183223364380754e82L, \ - 0.507580213877224798800856812176625227226e84L, \ - 0.3146997326038793752565312235495076408801e86L, \ - 0.1982608315404440064116146708361898137545e88L, \ - 0.1268869321858841641034333893351614808029e90L, \ - 0.8247650592082470666723170306785496252186e91L, \ - 0.5443449390774430640037292402478427526443e93L, \ - 0.3647111091818868528824985909660546442717e95L, \ - 0.2480035542436830599600990418569171581047e97L, \ - 0.1711224524281413113724683388812728390923e99L, \ - 0.1197857166996989179607278372168909873646e101L, \ - 0.8504785885678623175211676442399260102886e102L, \ - 0.6123445837688608686152407038527467274078e104L, \ - 0.4470115461512684340891257138125051110077e106L, \ - 0.3307885441519386412259530282212537821457e108L, \ - 0.2480914081139539809194647711659403366093e110L, \ - 0.188549470166605025498793226086114655823e112L, \ - 0.1451830920282858696340707840863082849837e114L, \ - 0.1132428117820629783145752115873204622873e116L, \ - 0.8946182130782975286851441715398316520698e117L, \ - 0.7156945704626380229481153372318653216558e119L, \ - 0.5797126020747367985879734231578109105412e121L, \ - 0.4753643337012841748421382069894049466438e123L, \ - 0.3945523969720658651189747118012061057144e125L, \ - 0.3314240134565353266999387579130131288001e127L, \ - 0.2817104114380550276949479442260611594801e129L, \ - 0.2422709538367273238176552320344125971528e131L, \ - 0.210775729837952771721360051869938959523e133L, \ - 0.1854826422573984391147968456455462843802e135L, \ - 0.1650795516090846108121691926245361930984e137L, \ - 0.1485715964481761497309522733620825737886e139L, \ - 0.1352001527678402962551665687594951421476e141L, \ - 0.1243841405464130725547532432587355307758e143L, \ - 0.1156772507081641574759205162306240436215e145L, \ - 0.1087366156656743080273652852567866010042e147L, \ - 0.103299784882390592625997020993947270954e149L, \ - 0.9916779348709496892095714015418938011582e150L, \ - 0.9619275968248211985332842594956369871234e152L, \ - 0.942689044888324774562618574305724247381e154L, \ - 0.9332621544394415268169923885626670049072e156L, \ - 0.9332621544394415268169923885626670049072e158L, \ - 0.9425947759838359420851623124482936749562e160L, \ - 0.9614466715035126609268655586972595484554e162L, \ - 0.990290071648618040754671525458177334909e164L, \ - 0.1029901674514562762384858386476504428305e167L, \ - 0.1081396758240290900504101305800329649721e169L, \ - 0.1146280563734708354534347384148349428704e171L, \ - 0.1226520203196137939351751701038733888713e173L, \ - 0.132464181945182897449989183712183259981e175L, \ - 0.1443859583202493582204882102462797533793e177L, \ - 0.1588245541522742940425370312709077287172e179L, \ - 0.1762952551090244663872161047107075788761e181L, \ - 0.1974506857221074023536820372759924883413e183L, \ - 0.2231192748659813646596607021218715118256e185L, \ - 0.2543559733472187557120132004189335234812e187L, \ - 0.2925093693493015690688151804817735520034e189L, \ - 0.339310868445189820119825609358857320324e191L, \ - 0.396993716080872089540195962949863064779e193L, \ - 0.4684525849754290656574312362808384164393e195L, \ - 0.5574585761207605881323431711741977155627e197L, \ - 0.6689502913449127057588118054090372586753e199L, \ - 0.8094298525273443739681622845449350829971e201L, \ - 0.9875044200833601362411579871448208012564e203L, \ - 0.1214630436702532967576624324188129585545e206L, \ - 0.1506141741511140879795014161993280686076e208L, \ - 0.1882677176888926099743767702491600857595e210L, \ - 0.237217324288004688567714730513941708057e212L, \ - 0.3012660018457659544809977077527059692324e214L, \ - 0.3856204823625804217356770659234636406175e216L, \ - 0.4974504222477287440390234150412680963966e218L, \ - 0.6466855489220473672507304395536485253155e220L, \ - 0.8471580690878820510984568758152795681634e222L, \ - 0.1118248651196004307449963076076169029976e225L, \ - 0.1487270706090685728908450891181304809868e227L, \ - 0.1992942746161518876737324194182948445223e229L, \ - 0.269047270731805048359538766214698040105e231L, \ - 0.3659042881952548657689727220519893345429e233L, \ - 0.5012888748274991661034926292112253883237e235L, \ - 0.6917786472619488492228198283114910358867e237L, \ - 0.9615723196941089004197195613529725398826e239L, \ - 0.1346201247571752460587607385894161555836e242L, \ - 0.1898143759076170969428526414110767793728e244L, \ - 0.2695364137888162776588507508037290267094e246L, \ - 0.3854370717180072770521565736493325081944e248L, \ - 0.5550293832739304789551054660550388118e250L, \ - 0.80479260574719919448490292577980627711e252L, \ - 0.1174997204390910823947958271638517164581e255L, \ - 0.1727245890454638911203498659308620231933e257L, \ - 0.2556323917872865588581178015776757943262e259L, \ - 0.380892263763056972698595524350736933546e261L, \ - 0.571338395644585459047893286526105400319e263L, \ - 0.8627209774233240431623188626544191544816e265L, \ - 0.1311335885683452545606724671234717114812e268L, \ - 0.2006343905095682394778288746989117185662e270L, \ - 0.308976961384735088795856467036324046592e272L, \ - 0.4789142901463393876335775239063022722176e274L, \ - 0.7471062926282894447083809372938315446595e276L, \ - 0.1172956879426414428192158071551315525115e279L, \ - 0.1853271869493734796543609753051078529682e281L, \ - 0.2946702272495038326504339507351214862195e283L, \ - 0.4714723635992061322406943211761943779512e285L, \ - 0.7590705053947218729075178570936729485014e287L, \ - 0.1229694218739449434110178928491750176572e290L, \ - 0.2004401576545302577599591653441552787813e292L, \ - 0.3287218585534296227263330311644146572013e294L, \ - 0.5423910666131588774984495014212841843822e296L, \ - 0.9003691705778437366474261723593317460744e298L, \ - 0.1503616514864999040201201707840084015944e301L, \ - 0.2526075744973198387538018869171341146786e303L, \ - 0.4269068009004705274939251888899566538069e305L, \ - 0.7257415615307998967396728211129263114717e307L \ - }} - - template - struct factorials; - - template - struct factorials::value && sizeof(T) == 1>::type> { - public: - typedef T type; - public: - SPROUT_STATIC_CONSTEXPR std::size_t limit = 5; - public: - typedef sprout::array table_type; - public: - SPROUT_STATIC_CONSTEXPR table_type table - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(SPROUT_FACTORIAL_TABLE_DEF_INT_1) - ; - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::math::detail::factorials< - T, typename std::enable_if::value && sizeof(T) == 1>::type - >::table_type sprout::math::detail::factorials< - T, typename std::enable_if::value && sizeof(T) == 1>::type - >::table SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(SPROUT_FACTORIAL_TABLE_DEF_INT_1); - - template - struct factorials::value && sizeof(T) == 1>::type> { - public: - typedef T type; - public: - SPROUT_STATIC_CONSTEXPR std::size_t limit = 5; - public: - typedef sprout::array table_type; - public: - SPROUT_STATIC_CONSTEXPR table_type table - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(SPROUT_FACTORIAL_TABLE_DEF_UINT_1) - ; - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::math::detail::factorials< - T, typename std::enable_if::value && sizeof(T) == 1>::type - >::table_type sprout::math::detail::factorials< - T, typename std::enable_if::value && sizeof(T) == 1>::type - >::table SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(SPROUT_FACTORIAL_TABLE_DEF_UINT_1); - - template - struct factorials::value && sizeof(T) == 2>::type> { - public: - typedef T type; - public: - SPROUT_STATIC_CONSTEXPR std::size_t limit = 7; - public: - typedef sprout::array table_type; - public: - SPROUT_STATIC_CONSTEXPR table_type table - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(SPROUT_FACTORIAL_TABLE_DEF_INT_2) - ; - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::math::detail::factorials< - T, typename std::enable_if::value && sizeof(T) == 2>::type - >::table_type sprout::math::detail::factorials< - T, typename std::enable_if::value && sizeof(T) == 2>::type - >::table SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(SPROUT_FACTORIAL_TABLE_DEF_INT_2); - - template - struct factorials::value && sizeof(T) == 2>::type> { - public: - typedef T type; - public: - SPROUT_STATIC_CONSTEXPR std::size_t limit = 8; - public: - typedef sprout::array table_type; - public: - SPROUT_STATIC_CONSTEXPR table_type table - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(SPROUT_FACTORIAL_TABLE_DEF_UINT_2) - ; - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::math::detail::factorials< - T, typename std::enable_if::value && sizeof(T) == 2>::type - >::table_type sprout::math::detail::factorials< - T, typename std::enable_if::value && sizeof(T) == 2>::type - >::table SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(SPROUT_FACTORIAL_TABLE_DEF_UINT_2); - - template - struct factorials::value && sizeof(T) == 4>::type> { - public: - typedef T type; - public: - SPROUT_STATIC_CONSTEXPR std::size_t limit = 11; - public: - typedef sprout::array table_type; - public: - SPROUT_STATIC_CONSTEXPR table_type table - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(SPROUT_FACTORIAL_TABLE_DEF_INT_4) - ; - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::math::detail::factorials< - T, typename std::enable_if::value && sizeof(T) == 4>::type - >::table_type sprout::math::detail::factorials< - T, typename std::enable_if::value && sizeof(T) == 4>::type - >::table SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(SPROUT_FACTORIAL_TABLE_DEF_INT_4); - - template - struct factorials::value && sizeof(T) == 4>::type> { - public: - typedef T type; - public: - SPROUT_STATIC_CONSTEXPR std::size_t limit = 11; - public: - typedef sprout::array table_type; - public: - SPROUT_STATIC_CONSTEXPR table_type table - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(SPROUT_FACTORIAL_TABLE_DEF_UINT_4) - ; - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::math::detail::factorials< - T, typename std::enable_if::value && sizeof(T) == 4>::type - >::table_type sprout::math::detail::factorials< - T, typename std::enable_if::value && sizeof(T) == 4>::type - >::table SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(SPROUT_FACTORIAL_TABLE_DEF_UINT_4); - - template - struct factorials::value && sizeof(T) == 8>::type> { - public: - typedef T type; - public: - SPROUT_STATIC_CONSTEXPR std::size_t limit = 20; - public: - typedef sprout::array table_type; - public: - SPROUT_STATIC_CONSTEXPR table_type table - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(SPROUT_FACTORIAL_TABLE_DEF_INT_8) - ; - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::math::detail::factorials< - T, typename std::enable_if::value && sizeof(T) == 8>::type - >::table_type sprout::math::detail::factorials< - T, typename std::enable_if::value && sizeof(T) == 8>::type - >::table SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(SPROUT_FACTORIAL_TABLE_DEF_INT_8); - - template - struct factorials::value && sizeof(T) == 8>::type> { - public: - typedef T type; - public: - SPROUT_STATIC_CONSTEXPR std::size_t limit = 20; - public: - typedef sprout::array table_type; - public: - SPROUT_STATIC_CONSTEXPR table_type table - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(SPROUT_FACTORIAL_TABLE_DEF_UINT_8) - ; - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::math::detail::factorials< - T, typename std::enable_if::value && sizeof(T) == 8>::type - >::table_type sprout::math::detail::factorials< - T, typename std::enable_if::value && sizeof(T) == 8>::type - >::table SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(SPROUT_FACTORIAL_TABLE_DEF_UINT_8); - - template - struct factorials::value>::type> { - public: - typedef T type; - public: - SPROUT_STATIC_CONSTEXPR std::size_t limit = 34; - public: - typedef sprout::array table_type; - public: - SPROUT_STATIC_CONSTEXPR table_type table - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(SPROUT_FACTORIAL_TABLE_DEF_FLOAT) - ; - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::math::detail::factorials< - T, typename std::enable_if::value>::type - >::table_type sprout::math::detail::factorials< - T, typename std::enable_if::value>::type - >::table SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(SPROUT_FACTORIAL_TABLE_DEF_FLOAT); - - template - struct factorials::value>::type> { - public: - typedef T type; - public: - SPROUT_STATIC_CONSTEXPR std::size_t limit = 170; - public: - typedef sprout::array table_type; - public: - SPROUT_STATIC_CONSTEXPR table_type table - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(SPROUT_FACTORIAL_TABLE_DEF_DOUBLE) - ; - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::math::detail::factorials< - T, typename std::enable_if::value>::type - >::table_type sprout::math::detail::factorials< - T, typename std::enable_if::value>::type - >::table SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(SPROUT_FACTORIAL_TABLE_DEF_DOUBLE); - - template - struct factorials::value>::type> { - public: - typedef T type; - public: - SPROUT_STATIC_CONSTEXPR std::size_t limit = 170; - public: - typedef sprout::array table_type; - public: - SPROUT_STATIC_CONSTEXPR table_type table - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(SPROUT_FACTORIAL_TABLE_DEF_LONG_DOUBLE) - ; - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::math::detail::factorials< - T, typename std::enable_if::value>::type - >::table_type sprout::math::detail::factorials< - T, typename std::enable_if::value>::type - >::table SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(SPROUT_FACTORIAL_TABLE_DEF_LONG_DOUBLE); - -# undef SPROUT_FACTORIAL_TABLE_DEF_INT_1 -# undef SPROUT_FACTORIAL_TABLE_DEF_UINT_1 -# undef SPROUT_FACTORIAL_TABLE_DEF_INT_2 -# undef SPROUT_FACTORIAL_TABLE_DEF_UINT_2 -# undef SPROUT_FACTORIAL_TABLE_DEF_INT_4 -# undef SPROUT_FACTORIAL_TABLE_DEF_UINT_4 -# undef SPROUT_FACTORIAL_TABLE_DEF_INT_8 -# undef SPROUT_FACTORIAL_TABLE_DEF_UINT_8 -# undef SPROUT_FACTORIAL_TABLE_DEF_FLOAT -# undef SPROUT_FACTORIAL_TABLE_DEF_DOUBLE -# undef SPROUT_FACTORIAL_TABLE_DEF_LONG_DOUBLE - } // namespace detail - // - // factorial_limit - // - template::value>::type> - inline SPROUT_CONSTEXPR std::size_t factorial_limit() { - typedef typename std::remove_cv::type type; - return sprout::math::detail::factorials::limit; - } - // - // unchecked_factorial - // - template::value>::type> - inline SPROUT_CONSTEXPR T unchecked_factorial(std::size_t x) { - typedef typename std::remove_cv::type type; - return sprout::math::detail::factorials::table[x]; - } - // - // factorial - // - template::value>::type> - inline SPROUT_CONSTEXPR T factorial(std::size_t x) { - return SPROUT_ASSERT(x <= sprout::math::factorial_limit::type>()), - sprout::math::unchecked_factorial(x) - ; - } - } // namespace math - - using sprout::math::factorial_limit; - using sprout::math::unchecked_factorial; - using sprout::math::factorial; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_FACTORIAL_HPP diff --git a/dsp/lib/sprout/sprout/math/fdim.hpp b/dsp/lib/sprout/sprout/math/fdim.hpp deleted file mode 100644 index bb379dd..0000000 --- a/dsp/lib/sprout/sprout/math/fdim.hpp +++ /dev/null @@ -1,76 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_FDIM_HPP -#define SPROUT_MATH_FDIM_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_fdim(float x, float y) { - return __builtin_fdimf(x, y); - } - inline SPROUT_CONSTEXPR double - builtin_fdim(double x, double y) { - return __builtin_fdim(x, y); - } - inline SPROUT_CONSTEXPR long double - builtin_fdim(long double x, long double y) { - return __builtin_fdiml(x, y); - } -#endif - } // namespace detail - // - // fdim - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - fdim(FloatType x, FloatType y) { - return sprout::math::isnan(y) ? y - : sprout::math::isnan(x) ? x - : x == sprout::numeric_limits::infinity() ? sprout::numeric_limits::infinity() - : x == -sprout::numeric_limits::infinity() ? FloatType(0) - : y == sprout::numeric_limits::infinity() ? FloatType(0) - : y == -sprout::numeric_limits::infinity() ? sprout::numeric_limits::infinity() -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_fdim(x, y) -#else - : x > y ? x - y : FloatType(0) -#endif - ; - } - template< - typename ArithmeticType1, - typename ArithmeticType2, - typename sprout::enabler_if< - std::is_arithmetic::value && std::is_arithmetic::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::float_promote::type - fdim(ArithmeticType1 x, ArithmeticType2 y) { - typedef typename sprout::float_promote::type type; - return sprout::math::fdim(static_cast(x), static_cast(y)); - } - } // namespace math - - using sprout::math::fdim; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_FDIM_HPP diff --git a/dsp/lib/sprout/sprout/math/float2_exponent.hpp b/dsp/lib/sprout/sprout/math/float2_exponent.hpp deleted file mode 100644 index 3aeea49..0000000 --- a/dsp/lib/sprout/sprout/math/float2_exponent.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_FLOAT2_EXPONENT_HPP -#define SPROUT_MATH_FLOAT2_EXPONENT_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - // - // float2_exponent - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR int - float2_exponent(FloatType x) { - return sprout::math::isnan(x) ? 0 - : x == 0 ? 0 - : x == sprout::numeric_limits::infinity() || x == -sprout::numeric_limits::infinity() ? 0 - : sprout::math::ilogb2(x) + 1 - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR int - float2_exponent(IntType x) { - return sprout::math::float2_exponent(static_cast(x)); - } - } // namespace math - - using sprout::math::float2_exponent; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_FLOAT2_EXPONENT_HPP diff --git a/dsp/lib/sprout/sprout/math/float2_sig_exp.hpp b/dsp/lib/sprout/sprout/math/float2_sig_exp.hpp deleted file mode 100644 index accb316..0000000 --- a/dsp/lib/sprout/sprout/math/float2_sig_exp.hpp +++ /dev/null @@ -1,61 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_FLOAT2_SIG_EXP_HPP -#define SPROUT_MATH_FLOAT2_SIG_EXP_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::pair - float2_sig_exp_impl(T x, int exp) { - typedef sprout::pair type; - return type(x / sprout::detail::pow_n(T(2), exp), exp); - } - } // namespace detail - // - // float2_sig_exp - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR sprout::pair - float2_sig_exp(FloatType x) { - typedef sprout::pair type; - return sprout::math::isnan(x) ? type(x, 0) - : x == sprout::numeric_limits::infinity() ? type(sprout::numeric_limits::infinity(), 0) - : x == -sprout::numeric_limits::infinity() ? type(-sprout::numeric_limits::infinity(), 0) - : x == 0 ? type(x, 0) - : sprout::math::detail::float2_sig_exp_impl(x, sprout::math::ilogb2(x) + 1) - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR sprout::pair - float2_sig_exp(IntType x) { - return sprout::math::float2_sig_exp(static_cast(x)); - } - } // namespace math - - using sprout::math::float2_sig_exp; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_FLOAT2_SIG_EXP_HPP diff --git a/dsp/lib/sprout/sprout/math/float2_significand.hpp b/dsp/lib/sprout/sprout/math/float2_significand.hpp deleted file mode 100644 index 707cbfd..0000000 --- a/dsp/lib/sprout/sprout/math/float2_significand.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_FLOAT2_SIGNIFICAND_HPP -#define SPROUT_MATH_FLOAT2_SIGNIFICAND_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - // - // float2_significand - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - float2_significand(FloatType x) { - return sprout::math::isnan(x) ? x - : x == sprout::numeric_limits::infinity() ? sprout::numeric_limits::infinity() - : x == -sprout::numeric_limits::infinity() ? -sprout::numeric_limits::infinity() - : x == 0 ? x - : x / sprout::detail::pow_n(FloatType(2), sprout::float2_exponent(x)) - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - float2_significand(IntType x) { - return sprout::math::float_significand(static_cast(x)); - } - } // namespace math - - using sprout::math::float2_significand; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_FLOAT2_SIGNIFICAND_HPP diff --git a/dsp/lib/sprout/sprout/math/float_exponent.hpp b/dsp/lib/sprout/sprout/math/float_exponent.hpp deleted file mode 100644 index cf01be3..0000000 --- a/dsp/lib/sprout/sprout/math/float_exponent.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_FLOAT_EXPONENT_HPP -#define SPROUT_MATH_FLOAT_EXPONENT_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - // - // float_exponent - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR int - float_exponent(FloatType x) { - return sprout::math::isnan(x) ? 0 - : x == 0 ? 0 - : x == sprout::numeric_limits::infinity() || x == -sprout::numeric_limits::infinity() ? 0 - : sprout::math::ilogb(x) + 1 - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR int - float_exponent(IntType x) { - return sprout::math::float_exponent(static_cast(x)); - } - } // namespace math - - using sprout::math::float_exponent; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_FLOAT_EXPONENT_HPP diff --git a/dsp/lib/sprout/sprout/math/float_sig_exp.hpp b/dsp/lib/sprout/sprout/math/float_sig_exp.hpp deleted file mode 100644 index 2444b08..0000000 --- a/dsp/lib/sprout/sprout/math/float_sig_exp.hpp +++ /dev/null @@ -1,61 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_FLOAT_SIG_EXP_HPP -#define SPROUT_MATH_FLOAT_SIG_EXP_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::pair - float_sig_exp_impl(T x, int exp) { - typedef sprout::pair type; - return type(x / sprout::detail::pow_n(T(sprout::numeric_limits::radix), exp), exp); - } - } // namespace detail - // - // float_sig_exp - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR sprout::pair - float_sig_exp(FloatType x) { - typedef sprout::pair type; - return sprout::math::isnan(x) ? type(x, 0) - : x == sprout::numeric_limits::infinity() ? type(sprout::numeric_limits::infinity(), 0) - : x == -sprout::numeric_limits::infinity() ? type(-sprout::numeric_limits::infinity(), 0) - : x == 0 ? type(x, 0) - : sprout::math::detail::float_sig_exp_impl(x, sprout::math::ilogb(x) + 1) - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR sprout::pair - float_sig_exp(IntType x) { - return sprout::math::float_sig_exp(static_cast(x)); - } - } // namespace math - - using sprout::math::float_sig_exp; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_FLOAT_SIG_EXP_HPP diff --git a/dsp/lib/sprout/sprout/math/float_significand.hpp b/dsp/lib/sprout/sprout/math/float_significand.hpp deleted file mode 100644 index 6cdcfb0..0000000 --- a/dsp/lib/sprout/sprout/math/float_significand.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_FLOAT_SIGNIFICAND_HPP -#define SPROUT_MATH_FLOAT_SIGNIFICAND_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - // - // float_significand - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - float_significand(FloatType x) { - return sprout::math::isnan(x) ? x - : x == sprout::numeric_limits::infinity() ? sprout::numeric_limits::infinity() - : x == -sprout::numeric_limits::infinity() ? -sprout::numeric_limits::infinity() - : x == 0 ? x - : x / sprout::detail::pow_n(FloatType(sprout::numeric_limits::radix), sprout::float_exponent(x)) - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - float_significand(IntType x) { - return sprout::math::float_significand(static_cast(x)); - } - } // namespace math - - using sprout::math::float_significand; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_FLOAT_SIGNIFICAND_HPP diff --git a/dsp/lib/sprout/sprout/math/floating_point.hpp b/dsp/lib/sprout/sprout/math/floating_point.hpp deleted file mode 100644 index 7f0dd51..0000000 --- a/dsp/lib/sprout/sprout/math/floating_point.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_FLOATING_POINT_HPP -#define SPROUT_MATH_FLOATING_POINT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_MATH_FLOATING_POINT_HPP diff --git a/dsp/lib/sprout/sprout/math/floor.hpp b/dsp/lib/sprout/sprout/math/floor.hpp deleted file mode 100644 index e82c37c..0000000 --- a/dsp/lib/sprout/sprout/math/floor.hpp +++ /dev/null @@ -1,90 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_FLOOR_HPP -#define SPROUT_MATH_FLOOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_floor(float x) { - return __builtin_floorf(x); - } - inline SPROUT_CONSTEXPR double - builtin_floor(double x) { - return __builtin_floor(x); - } - inline SPROUT_CONSTEXPR long double - builtin_floor(long double x) { - return __builtin_floorl(x); - } -#endif - - template - inline SPROUT_CONSTEXPR T - floor_impl_1(T x, T x0) { - return sprout::math::equal_to(x, x0) ? x0 - : x0 - T(1) - ; - } - template - inline SPROUT_CONSTEXPR T - floor_impl(T x) { - return x < 0 ? sprout::math::detail::floor_impl_1(x, -static_cast(static_cast(-x))) - : static_cast(static_cast(x)) - ; - } - } // namespace detail - // - // floor - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - floor(FloatType x) { - return sprout::math::isnan(x) ? x - : x == sprout::numeric_limits::infinity() ? sprout::numeric_limits::infinity() - : x == -sprout::numeric_limits::infinity() ? -sprout::numeric_limits::infinity() -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_floor(x) -#else - : x == 0 ? x - : sprout::numeric_limits::max() < x || sprout::numeric_limits::max() < -x - ? SPROUT_MATH_THROW_LARGE_FLOAT_ROUNDING(std::runtime_error("floor: large float rounding."), x) - : static_cast(sprout::math::detail::floor_impl(static_cast::type>(x))) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - floor(IntType x) { - return sprout::math::floor(static_cast(x)); - } - } // namespace math - - using sprout::math::floor; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_FLOOR_HPP diff --git a/dsp/lib/sprout/sprout/math/fma.hpp b/dsp/lib/sprout/sprout/math/fma.hpp deleted file mode 100644 index 726fd41..0000000 --- a/dsp/lib/sprout/sprout/math/fma.hpp +++ /dev/null @@ -1,86 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_FMA_HPP -#define SPROUT_MATH_FMA_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_fma(float x, float y, float z) { - return __builtin_fmaf(x, y, z); - } - inline SPROUT_CONSTEXPR double - builtin_fma(double x, double y, double z) { - return __builtin_fma(x, y, z); - } - inline SPROUT_CONSTEXPR long double - builtin_fma(long double x, long double y, long double z) { - return __builtin_fmal(x, y, z); - } -#endif - } // namespace detail - // - // fma - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - fma(FloatType x, FloatType y, FloatType z) { - return sprout::math::isnan(x) ? x - : sprout::math::isnan(y) ? y - : sprout::math::isnan(z) ? z - : sprout::math::isinf(x) && y == 0 ? sprout::numeric_limits::quiet_NaN() - : sprout::math::isinf(y) && x == 0 ? sprout::numeric_limits::quiet_NaN() - : (sprout::math::isinf(x) || sprout::math::isinf(y)) && sprout::math::isinf(z) && (sprout::math::signbit(x) ^ sprout::math::signbit(y) ^ sprout::math::signbit(z)) - ? sprout::numeric_limits::quiet_NaN() -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_fma(x, y, z) -#else - : x * y + z -#endif - ; - } - template< - typename ArithmeticType1, - typename ArithmeticType2, - typename ArithmeticType3, - typename sprout::enabler_if< - std::is_arithmetic::value - && std::is_arithmetic::value - && std::is_arithmetic::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::float_promote< - ArithmeticType1, ArithmeticType2, ArithmeticType3 - >::type - fma(ArithmeticType1 x, ArithmeticType2 y, ArithmeticType3 z) { - typedef typename sprout::float_promote< - ArithmeticType1, ArithmeticType2, ArithmeticType3 - >::type type; - return sprout::math::fma(static_cast(x), static_cast(y), static_cast(z)); - } - } // namespace math - - using sprout::math::fma; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_FMA_HPP diff --git a/dsp/lib/sprout/sprout/math/fmax.hpp b/dsp/lib/sprout/sprout/math/fmax.hpp deleted file mode 100644 index e33187a..0000000 --- a/dsp/lib/sprout/sprout/math/fmax.hpp +++ /dev/null @@ -1,77 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_FMAX_HPP -#define SPROUT_MATH_FMAX_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_fmax(float x, float y) { - return __builtin_fmaxf(x, y); - } - inline SPROUT_CONSTEXPR double - builtin_fmax(double x, double y) { - return __builtin_fmax(x, y); - } - inline SPROUT_CONSTEXPR long double - builtin_fmax(long double x, long double y) { - return __builtin_fmaxl(x, y); - } -#endif - } // namespace detail - // - // fmax - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - fmax(FloatType x, FloatType y) { - return sprout::math::isnan(y) ? x - : sprout::math::isnan(x) ? y - : y == -sprout::numeric_limits::infinity() ? x - : x == sprout::numeric_limits::infinity() ? x - : x == -sprout::numeric_limits::infinity() ? y - : y == sprout::numeric_limits::infinity() ? y -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : x == 0 && y == 0 ? x - : sprout::math::detail::builtin_fmax(x, y) -#else - : x < y ? y : x -#endif - ; - } - template< - typename ArithmeticType1, - typename ArithmeticType2, - typename sprout::enabler_if< - std::is_arithmetic::value && std::is_arithmetic::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::float_promote::type - fmax(ArithmeticType1 x, ArithmeticType2 y) { - typedef typename sprout::float_promote::type type; - return sprout::math::fmax(static_cast(x), static_cast(y)); - } - } // namespace math - - using sprout::math::fmax; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_FMAX_HPP diff --git a/dsp/lib/sprout/sprout/math/fmin.hpp b/dsp/lib/sprout/sprout/math/fmin.hpp deleted file mode 100644 index 756998d..0000000 --- a/dsp/lib/sprout/sprout/math/fmin.hpp +++ /dev/null @@ -1,77 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_FMIN_HPP -#define SPROUT_MATH_FMIN_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_fmin(float x, float y) { - return __builtin_fminf(x, y); - } - inline SPROUT_CONSTEXPR double - builtin_fmin(double x, double y) { - return __builtin_fmin(x, y); - } - inline SPROUT_CONSTEXPR long double - builtin_fmin(long double x, long double y) { - return __builtin_fminl(x, y); - } -#endif - } // namespace detail - // - // fmin - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - fmin(FloatType x, FloatType y) { - return sprout::math::isnan(y) ? x - : sprout::math::isnan(x) ? y - : x == -sprout::numeric_limits::infinity() ? x - : y == sprout::numeric_limits::infinity() ? x - : y == -sprout::numeric_limits::infinity() ? y - : x == sprout::numeric_limits::infinity() ? y -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : x == 0 && y == 0 ? x - : sprout::math::detail::builtin_fmin(x, y) -#else - : y < x ? y : x -#endif - ; - } - template< - typename ArithmeticType1, - typename ArithmeticType2, - typename sprout::enabler_if< - std::is_arithmetic::value && std::is_arithmetic::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::float_promote::type - fmin(ArithmeticType1 x, ArithmeticType2 y) { - typedef typename sprout::float_promote::type type; - return sprout::math::fmin(static_cast(x), static_cast(y)); - } - } // namespace math - - using sprout::math::fmin; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_FMIN_HPP diff --git a/dsp/lib/sprout/sprout/math/fmod.hpp b/dsp/lib/sprout/sprout/math/fmod.hpp deleted file mode 100644 index 9d8ffb0..0000000 --- a/dsp/lib/sprout/sprout/math/fmod.hpp +++ /dev/null @@ -1,122 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_FMOD_HPP -#define SPROUT_MATH_FMOD_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { - template - inline SPROUT_CONSTEXPR T - fmod_impl_6(T x, T y, T x1) { - return x1 >= y - ? x < 0 ? -(x1 - y) : x1 - y - : x < 0 ? -x1 : x1 - ; - } - template - inline SPROUT_CONSTEXPR T - fmod_impl_5(T x, T y, T x1, T y1, T z, int iscy, int idiff, int i) { - return i != idiff - ? z >= 0 - ? sprout::math::detail::fmod_impl_5(x, y, z + z, y1, z + z - y1, iscy, idiff, i + 1) - : sprout::math::detail::fmod_impl_5(x, y, x1 + x1, y1, x1 + x1 - y1, iscy, idiff, i + 1) - : sprout::math::detail::fmod_impl_6(x, y, sprout::math::scalbn(x1, iscy)) - ; - } - template - inline SPROUT_CONSTEXPR T - fmod_impl_4(T x, T y, T x1, T y1, int iscy, int idiff, int i) { - return sprout::math::detail::fmod_impl_5(x, y, x1, y1, x1 - y1, iscy, idiff, i); - } - template - inline SPROUT_CONSTEXPR T - fmod_impl_3(T x, T y, T x1, int iscx, int iscy, int idiff) { - return idiff ? sprout::math::detail::fmod_impl_4(x, y, sprout::math::scalbn(x1, -iscx), sprout::math::scalbn(y, -iscy), iscy, idiff, 0) - : sprout::math::detail::fmod_impl_6(x, y, x1) - ; - } - template - inline SPROUT_CONSTEXPR T - fmod_impl_2(T x, T y, T x1, int iscx, int iscy) { - return sprout::math::detail::fmod_impl_3(x, y, x1, iscx, iscy, iscx - iscy); - } - template - inline SPROUT_CONSTEXPR T - fmod_impl_1(T x, T y, T x1) { - return y > x1 ? x - : sprout::math::detail::fmod_impl_2(x, y, x1, sprout::math::ilogb(x1), sprout::math::ilogb(y)) - ; - } - template - inline SPROUT_CONSTEXPR T - fmod_impl(T x, T y) { - return sprout::math::detail::fmod_impl_1(x, sprout::math::fabs(y), sprout::math::fabs(x)); - } - } // namespace detail - // - // fmod - // - // issue: - // fmod(-NaN, -NaN) returns -NaN . - // # returns +NaN . ( same as fmod(+NaN, +NaN) ) - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - fmod(FloatType x, FloatType y) { - return sprout::math::isnan(y) - ? sprout::math::isnan(x) - ? sprout::math::signbit(y) || sprout::math::signbit(x) ? -sprout::numeric_limits::quiet_NaN() - : sprout::numeric_limits::quiet_NaN() - : y - : sprout::math::isnan(x) ? x - : x == sprout::numeric_limits::infinity() || x == -sprout::numeric_limits::infinity() || y == 0 - ? -sprout::numeric_limits::quiet_NaN() - : x == 0 ? x - : y == sprout::numeric_limits::infinity() || y == -sprout::numeric_limits::infinity() ? x - : static_cast(sprout::math::detail::fmod_impl( - static_cast::type>(x), - static_cast::type>(y) - )) - ; - } - - template< - typename ArithmeticType1, - typename ArithmeticType2, - typename sprout::enabler_if< - std::is_arithmetic::value && std::is_arithmetic::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::float_promote::type - fmod(ArithmeticType1 x, ArithmeticType2 y) { - typedef typename sprout::float_promote::type type; - return sprout::math::fmod(static_cast(x), static_cast(y)); - } - } // namespace math - - using sprout::math::fmod; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_FMOD_HPP diff --git a/dsp/lib/sprout/sprout/math/fpclassify.hpp b/dsp/lib/sprout/sprout/math/fpclassify.hpp deleted file mode 100644 index 600d6b1..0000000 --- a/dsp/lib/sprout/sprout/math/fpclassify.hpp +++ /dev/null @@ -1,68 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_FPCLASSIFY_HPP -#define SPROUT_MATH_FPCLASSIFY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - template - inline SPROUT_CONSTEXPR int - builtin_fpclassify(FloatType x) { - return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, x); - } -#endif - } // namespace detail - // - // fpclassify - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR int - fpclassify(FloatType x) { - return -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - sprout::math::detail::builtin_fpclassify(x) -#else - sprout::math::isnan(x) ? FP_NAN - : sprout::math::isinf(x) ? FP_INFINITE - : sprout::math::iszero(x) ? FP_ZERO - : sprout::math::detail::issubnormal_or_zero(x) ? FP_SUBNORMAL - : FP_NORMAL -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR int - fpclassify(IntType x) { - return x ? FP_NORMAL - : FP_ZERO - ; - } - } // namespace math - - using sprout::math::fpclassify; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_FPCLASSIFY_HPP diff --git a/dsp/lib/sprout/sprout/math/frac_int.hpp b/dsp/lib/sprout/sprout/math/frac_int.hpp deleted file mode 100644 index 435cb8b..0000000 --- a/dsp/lib/sprout/sprout/math/frac_int.hpp +++ /dev/null @@ -1,60 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_FRAC_INT_HPP -#define SPROUT_MATH_FRAC_INT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::pair - frac_int_impl(T x, T ipart) { - typedef sprout::pair type; - return sprout::math::isnan(x) ? type(x, ipart) - : x == sprout::numeric_limits::infinity() || x == -sprout::numeric_limits::infinity() ? type(sprout::math::copysign(T(0), x), ipart) - : x == 0 ? type(x, ipart) - : x == ipart ? type(T(0) * x, ipart) - : type(sprout::math::copysign(x - ipart, x), ipart) - ; - } - } // namespace detail - // - // frac_int - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR sprout::pair - frac_int(FloatType x) { - return sprout::math::detail::frac_int_impl(x, sprout::integer_part(x)); - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR sprout::pair - frac_int(IntType x) { - return sprout::math::frac_int(static_cast(x)); - } - } // namespace math - - using sprout::math::frac_int; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_FRAC_INT_HPP diff --git a/dsp/lib/sprout/sprout/math/fractional_part.hpp b/dsp/lib/sprout/sprout/math/fractional_part.hpp deleted file mode 100644 index 7f143e9..0000000 --- a/dsp/lib/sprout/sprout/math/fractional_part.hpp +++ /dev/null @@ -1,59 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_FRACTIONAL_PART_HPP -#define SPROUT_MATH_FRACTIONAL_PART_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { - template - inline SPROUT_CONSTEXPR T - fractional_part_impl(T x, T ipart) { - return x == ipart ? T(0) * x - : sprout::math::copysign(x - ipart, x) - ; - } - } // namespace detail - // - // fractional_part - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - fractional_part(FloatType x) { - return sprout::math::isnan(x) ? x - : x == sprout::numeric_limits::infinity() || x == -sprout::numeric_limits::infinity() ? sprout::math::copysign(FloatType(0), x) - : x == 0 ? x - : sprout::math::detail::fractional_part_impl(x, sprout::integer_part(x)) - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - fractional_part(IntType x) { - return sprout::math::fractional_part(static_cast(x)); - } - } // namespace math - - using sprout::math::fractional_part; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_FRACTIONAL_PART_HPP diff --git a/dsp/lib/sprout/sprout/math/functions.hpp b/dsp/lib/sprout/sprout/math/functions.hpp deleted file mode 100644 index e94fcd6..0000000 --- a/dsp/lib/sprout/sprout/math/functions.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_FUNCTIONS_HPP -#define SPROUT_MATH_FUNCTIONS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_MATH_FUNCTIONS_HPP diff --git a/dsp/lib/sprout/sprout/math/gamma.hpp b/dsp/lib/sprout/sprout/math/gamma.hpp deleted file mode 100644 index 51381ca..0000000 --- a/dsp/lib/sprout/sprout/math/gamma.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_GAMMA_HPP -#define SPROUT_MATH_GAMMA_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_MATH_GAMMA_HPP diff --git a/dsp/lib/sprout/sprout/math/gcd.hpp b/dsp/lib/sprout/sprout/math/gcd.hpp deleted file mode 100644 index 98b38cc..0000000 --- a/dsp/lib/sprout/sprout/math/gcd.hpp +++ /dev/null @@ -1,260 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_GCD_HPP -#define SPROUT_MATH_GCD_HPP - -#include -#include -#include -#include -#include -#ifdef SPROUT_WORKAROUND_NOT_TERMINATE_RECURSIVE_CONSTEXPR_FUNCTION_TEMPLATE -# include -#endif - -namespace sprout { - namespace math { - namespace detail { - template - inline SPROUT_CONSTEXPR RingType - gcd_euclidean(RingType a, RingType b) { - return a == static_cast(0) ? b - : b % a == static_cast(0) ? a - : sprout::math::detail::gcd_euclidean(a % (b % a), b % a) - ; - } - - template - inline SPROUT_CONSTEXPR IntType - gcd_integer_impl(IntType result) { - return result < static_cast(0) ? -result : result; - } - template - inline SPROUT_CONSTEXPR IntType - gcd_integer(IntType const& a, IntType const& b) { - return sprout::math::detail::gcd_integer_impl( - sprout::math::detail::gcd_euclidean(a, b) - ); - } -#ifdef SPROUT_WORKAROUND_NOT_TERMINATE_RECURSIVE_CONSTEXPR_FUNCTION_TEMPLATE - template - inline SPROUT_CONSTEXPR BuiltInUnsigned - gcd_binary_2_1(unsigned shifts, sprout::array const& r, unsigned which); - template - inline SPROUT_CONSTEXPR BuiltInUnsigned - gcd_binary_2_1(unsigned shifts, sprout::array const& r, unsigned which); - template - inline SPROUT_CONSTEXPR BuiltInUnsigned - gcd_binary_2_2(unsigned shifts, sprout::array const& r, unsigned which) { - return r[which] ? sprout::math::detail::gcd_binary_2_1(shifts, r, which) - : r[!which] << shifts - ; - } - template - inline SPROUT_CONSTEXPR BuiltInUnsigned - gcd_binary_2_2(unsigned, sprout::array const&, unsigned) { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - inline SPROUT_CONSTEXPR BuiltInUnsigned - gcd_binary_2_1(unsigned shifts, sprout::array const& r, unsigned which) { - return !(r[which] & 1u) ? sprout::math::detail::gcd_binary_2_1( - shifts, - which ? sprout::array{{r[0], BuiltInUnsigned(r[1] >> 1)}} - : sprout::array{{BuiltInUnsigned(r[0] >> 1), r[1]}} - , - which - ) - : r[!which] > r[which] ? sprout::math::detail::gcd_binary_2_2( - shifts, - which ^ 1u ? sprout::array{{r[0], BuiltInUnsigned(r[1] - r[0])}} - : sprout::array{{BuiltInUnsigned(r[0] - r[1]), r[1]}} - , - which ^ 1u - ) - : sprout::math::detail::gcd_binary_2_2( - shifts, - which ? sprout::array{{r[0], BuiltInUnsigned(r[1] - r[0])}} - : sprout::array{{BuiltInUnsigned(r[0] - r[1]), r[1]}} - , - which - ) - ; - } - template - inline SPROUT_CONSTEXPR BuiltInUnsigned - gcd_binary_2_1(unsigned, sprout::array const&, unsigned) { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } -#else - template - inline SPROUT_CONSTEXPR BuiltInUnsigned - gcd_binary_2_1(unsigned shifts, sprout::array const& r, unsigned which); - template - inline SPROUT_CONSTEXPR BuiltInUnsigned - gcd_binary_2_2(unsigned shifts, sprout::array const& r, unsigned which) { - return r[which] ? sprout::math::detail::gcd_binary_2_1(shifts, r, which) - : r[!which] << shifts - ; - } - template - inline SPROUT_CONSTEXPR BuiltInUnsigned - gcd_binary_2_1(unsigned shifts, sprout::array const& r, unsigned which) { - return !(r[which] & 1u) ? sprout::math::detail::gcd_binary_2_1( - shifts, - which ? sprout::array{{r[0], BuiltInUnsigned(r[1] >> 1)}} - : sprout::array{{BuiltInUnsigned(r[0] >> 1), r[1]}} - , - which - ) - : r[!which] > r[which] ? sprout::math::detail::gcd_binary_2_2( - shifts, - which ^ 1u ? sprout::array{{r[0], BuiltInUnsigned(r[1] - r[0])}} - : sprout::array{{BuiltInUnsigned(r[0] - r[1]), r[1]}} - , - which ^ 1u - ) - : sprout::math::detail::gcd_binary_2_2( - shifts, - which ? sprout::array{{r[0], BuiltInUnsigned(r[1] - r[0])}} - : sprout::array{{BuiltInUnsigned(r[0] - r[1]), r[1]}} - , - which - ) - ; - } -#endif - template - inline SPROUT_CONSTEXPR BuiltInUnsigned - gcd_binary_1(BuiltInUnsigned u, BuiltInUnsigned v, unsigned shifts = 0) { - return (!(u & 1u) && !(v & 1u)) ? sprout::math::detail::gcd_binary_1(u >> 1, v >> 1, shifts + 1) - : sprout::math::detail::gcd_binary_2_1( - shifts, sprout::array{{u, v}}, static_cast(u & 1u) - ) - ; - } - template - inline SPROUT_CONSTEXPR BuiltInUnsigned - gcd_binary(BuiltInUnsigned u, BuiltInUnsigned v) { - return u && v ? sprout::math::detail::gcd_binary_1(u, v) - : u + v - ; - } - - template - struct gcd_optimal_evaluator_helper_t { - public: - SPROUT_CONSTEXPR T operator()(T const& a, T const& b) const { - return sprout::math::detail::gcd_euclidean(a, b); - } - }; - template - struct gcd_optimal_evaluator_helper_t { - public: - SPROUT_CONSTEXPR T operator()(T const& a, T const& b) const { - return sprout::math::detail::gcd_integer(a, b); - } - }; - - template - struct gcd_optimal_evaluator { - public: - SPROUT_CONSTEXPR T operator()(T const& a, T const& b) const { - typedef sprout::numeric_limits limits_type; - typedef sprout::math::detail::gcd_optimal_evaluator_helper_t< - T, limits_type::is_specialized, limits_type::is_signed - > helper_type; - return helper_type().operator()(a, b); - } - }; - -# define SPROUT_PRIVATE_GCD_UF(Ut) \ - template<> \ - struct gcd_optimal_evaluator { \ - public: \ - SPROUT_CONSTEXPR Ut operator()(Ut a, Ut b) const { \ - return sprout::math::detail::gcd_binary(a, b); \ - } \ - } - SPROUT_PRIVATE_GCD_UF(unsigned char); - SPROUT_PRIVATE_GCD_UF(unsigned short); - SPROUT_PRIVATE_GCD_UF(unsigned); - SPROUT_PRIVATE_GCD_UF(unsigned long); - SPROUT_PRIVATE_GCD_UF(unsigned long long); -# if CHAR_MIN == 0 - SPROUT_PRIVATE_GCD_UF(char); -# endif - #undef SPROUT_PRIVATE_GCD_UF - -# define SPROUT_PRIVATE_GCD_SF(St, Ut) \ - template<> \ - struct gcd_optimal_evaluator { \ - public: \ - SPROUT_CONSTEXPR St operator()(St a, St b) const { \ - using sprout::abs; \ - return static_cast(sprout::math::detail::gcd_optimal_evaluator().operator()( \ - static_cast(abs(a)), static_cast(abs(b)) \ - )); \ - } \ - } - SPROUT_PRIVATE_GCD_SF(signed char, unsigned char); - SPROUT_PRIVATE_GCD_SF(short, unsigned short); - SPROUT_PRIVATE_GCD_SF(int, unsigned); - SPROUT_PRIVATE_GCD_SF(long, unsigned long); -# if CHAR_MIN < 0 - SPROUT_PRIVATE_GCD_SF(char, unsigned char); -# endif - SPROUT_PRIVATE_GCD_SF(long long, unsigned long long); - #undef SPROUT_PRIVATE_GCD_SF - - template - inline SPROUT_CONSTEXPR T - gcd_optimal(T const& a, T const& b) { - return sprout::math::detail::gcd_optimal_evaluator().operator()(a, b); - } - } // namespace detail - - // - // gcd_evaluator - // - template - class gcd_evaluator { - public: - typedef IntType result_type; - typedef IntType first_argument_type; - typedef IntType second_argument_type; - public: - SPROUT_CONSTEXPR IntType - operator()(IntType const& a, IntType const& b) const { - return sprout::math::detail::gcd_optimal(a, b); - } - }; - template<> - class gcd_evaluator { - public: - template - SPROUT_CONSTEXPR IntType - operator()(IntType const& a, IntType const& b) const { - return sprout::math::detail::gcd_optimal(a, b); - } - }; - - // - // gcd - // - template - inline SPROUT_CONSTEXPR IntType - gcd(IntType const& a, IntType const& b) { - return sprout::math::gcd_evaluator().operator()(a, b); - } - } // namespace math - - using sprout::math::gcd; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_GCD_HPP diff --git a/dsp/lib/sprout/sprout/math/greater.hpp b/dsp/lib/sprout/sprout/math/greater.hpp deleted file mode 100644 index ded1482..0000000 --- a/dsp/lib/sprout/sprout/math/greater.hpp +++ /dev/null @@ -1,87 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_GREATER_HPP -#define SPROUT_MATH_GREATER_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { - template< - typename FloatType1, typename FloatType2, - typename sprout::enabler_if< - std::is_floating_point::type>::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - greater(FloatType1 x, FloatType2 y) { - return sprout::math::not_equal_to(x, y) && x > y; - } - - template< - typename IntType1, typename IntType2, - typename sprout::enabler_if< - std::is_integral::type>::value - && (sprout::is_unsigned::value == sprout::is_unsigned::value) - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - greater(IntType1 x, IntType2 y) { - return x > y; - } - template< - typename IntType1, typename IntType2, - typename sprout::enabler_if< - std::is_integral::type>::value - && sprout::is_signed::value && sprout::is_unsigned::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - greater(IntType1 x, IntType2 y) { - typedef typename std::make_unsigned::type>::type type; - return x < 0 ? false - : static_cast(x) > static_cast(y) - ; - } - template< - typename IntType1, typename IntType2, - typename sprout::enabler_if< - std::is_integral::type>::value - && sprout::is_unsigned::value && sprout::is_signed::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - greater(IntType1 x, IntType2 y) { - typedef typename std::make_unsigned::type>::type type; - return y < 0 ? true - : static_cast(x) > static_cast(y) - ; - } - } // namespace detail - // - // greater - // - template< - typename T, typename U, - typename sprout::enabler_if::value && std::is_arithmetic::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - greater(T x, U y) { - return sprout::math::detail::greater(x, y); - } - } // namespace math -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_GREATER_HPP diff --git a/dsp/lib/sprout/sprout/math/greater_equal.hpp b/dsp/lib/sprout/sprout/math/greater_equal.hpp deleted file mode 100644 index f95d5a6..0000000 --- a/dsp/lib/sprout/sprout/math/greater_equal.hpp +++ /dev/null @@ -1,87 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_GREATER_EQUAL_HPP -#define SPROUT_MATH_GREATER_EQUAL_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { - template< - typename FloatType1, typename FloatType2, - typename sprout::enabler_if< - std::is_floating_point::type>::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - greater_equal(FloatType1 x, FloatType2 y) { - return sprout::math::equal_to(x, y) || x > y; - } - - template< - typename IntType1, typename IntType2, - typename sprout::enabler_if< - std::is_integral::type>::value - && (sprout::is_unsigned::value == sprout::is_unsigned::value) - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - greater_equal(IntType1 x, IntType2 y) { - return x >= y; - } - template< - typename IntType1, typename IntType2, - typename sprout::enabler_if< - std::is_integral::type>::value - && sprout::is_signed::value && sprout::is_unsigned::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - greater_equal(IntType1 x, IntType2 y) { - typedef typename std::make_unsigned::type>::type type; - return x < 0 ? false - : static_cast(x) >= static_cast(y) - ; - } - template< - typename IntType1, typename IntType2, - typename sprout::enabler_if< - std::is_integral::type>::value - && sprout::is_unsigned::value && sprout::is_signed::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - greater_equal(IntType1 x, IntType2 y) { - typedef typename std::make_unsigned::type>::type type; - return y < 0 ? true - : static_cast(x) >= static_cast(y) - ; - } - } // namespace detail - // - // greater_equal - // - template< - typename T, typename U, - typename sprout::enabler_if::value && std::is_arithmetic::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - greater_equal(T x, U y) { - return sprout::math::detail::greater_equal(x, y); - } - } // namespace math -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_GREATER_EQUAL_HPP diff --git a/dsp/lib/sprout/sprout/math/hyperbolic.hpp b/dsp/lib/sprout/sprout/math/hyperbolic.hpp deleted file mode 100644 index 9270501..0000000 --- a/dsp/lib/sprout/sprout/math/hyperbolic.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_HYPERBOLIC_HPP -#define SPROUT_MATH_HYPERBOLIC_HPP - -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_MATH_HYPERBOLIC_HPP diff --git a/dsp/lib/sprout/sprout/math/hypot.hpp b/dsp/lib/sprout/sprout/math/hypot.hpp deleted file mode 100644 index f0b2020..0000000 --- a/dsp/lib/sprout/sprout/math/hypot.hpp +++ /dev/null @@ -1,105 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_HYPOT_HPP -#define SPROUT_MATH_HYPOT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_hypot(float x, float y) { - return __builtin_hypotf(x, y); - } - inline SPROUT_CONSTEXPR double - builtin_hypot(double x, double y) { - return __builtin_hypot(x, y); - } - inline SPROUT_CONSTEXPR long double - builtin_hypot(long double x, long double y) { - return __builtin_hypotl(x, y); - } -#endif - - template - inline SPROUT_CONSTEXPR T - hypot_impl_2(T t, T w) { - return t * sprout::math::sqrt(T(1) + w * w); - } - template - inline SPROUT_CONSTEXPR T - hypot_impl_1(T x, T y) { - return x < y - ? sprout::math::detail::hypot_impl_2(y, x / y) - : sprout::math::detail::hypot_impl_2(x, y / x) - ; - } - template - inline SPROUT_CONSTEXPR T - hypot_impl(T x, T y) { - return sprout::math::detail::hypot_impl_1(sprout::math::fabs(x), sprout::math::fabs(y)); - } - } // namespace detail - // - // hypot - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - hypot(FloatType x, FloatType y) { - return y == sprout::numeric_limits::infinity() || y == -sprout::numeric_limits::infinity() - ? sprout::numeric_limits::infinity() - : x == sprout::numeric_limits::infinity() || x == -sprout::numeric_limits::infinity() - ? sprout::numeric_limits::infinity() - : sprout::math::isnan(y) ? y - : sprout::math::isnan(x) ? x -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_hypot(x, y) -#else - : y == 0 ? sprout::math::fabs(x) - : x == 0 ? sprout::math::fabs(y) - : static_cast(sprout::math::detail::hypot_impl( - static_cast::type>(x), - static_cast::type>(y) - )) -#endif - ; - } - - template< - typename ArithmeticType1, - typename ArithmeticType2, - typename sprout::enabler_if< - std::is_arithmetic::value && std::is_arithmetic::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::float_promote::type - hypot(ArithmeticType1 x, ArithmeticType2 y) { - typedef typename sprout::float_promote::type type; - return sprout::math::hypot(static_cast(x), static_cast(y)); - } - } // namespace math - - using sprout::math::hypot; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_HYPOT_HPP diff --git a/dsp/lib/sprout/sprout/math/iceil.hpp b/dsp/lib/sprout/sprout/math/iceil.hpp deleted file mode 100644 index db6110a..0000000 --- a/dsp/lib/sprout/sprout/math/iceil.hpp +++ /dev/null @@ -1,94 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_ICEIL_HPP -#define SPROUT_MATH_ICEIL_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION -# include -#else -# include -#endif - -namespace sprout { - namespace math { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - namespace detail { - template - inline SPROUT_CONSTEXPR To - iceil_impl(FloatType x) { - return sprout::numeric_limits::max() < x || sprout::numeric_limits::min() > x - ? SPROUT_MATH_THROW_LARGE_FLOAT_ROUNDING(std::runtime_error("iceil: large float rounding."), static_cast(x)) - : static_cast(x) - ; - } - } // namespace detail - // - // iceil - // - template< - typename To = int, - typename FloatType, - typename sprout::enabler_if::value && std::is_integral::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR To - iceil(FloatType x) { - return sprout::math::isnan(x) || sprout::math::isinf(x) ? sprout::numeric_limits::min() - : sprout::math::detail::iceil_impl(sprout::math::ceil(x)) - ; - } -#else - namespace detail { - template - inline SPROUT_CONSTEXPR To - iceil_impl(FloatType x, To x0) { - return sprout::math::less_equal(x, x0) ? x0 - : x0 + 1 - ; - } - } // namespace detail - // - // iceil - // - template< - typename To = int, - typename FloatType, - typename sprout::enabler_if::value && std::is_integral::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR To - iceil(FloatType x) { - return sprout::math::isnan(x) || sprout::math::isinf(x) ? sprout::numeric_limits::min() - : x == 0 ? To(0) - : sprout::numeric_limits::max() < x || sprout::numeric_limits::min() > x - ? SPROUT_MATH_THROW_LARGE_FLOAT_ROUNDING(std::runtime_error("iceil: large float rounding."), static_cast(x)) - : sprout::math::detail::iceil_impl(x, static_cast(x)) - ; - } -#endif - template< - typename To = int, - typename IntType, - typename sprout::enabler_if::value && std::is_integral::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR To - iceil(IntType x) { - return sprout::math::iceil(static_cast(x)); - } - } // namespace math - - using sprout::math::iceil; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_ICEIL_HPP diff --git a/dsp/lib/sprout/sprout/math/ifloor.hpp b/dsp/lib/sprout/sprout/math/ifloor.hpp deleted file mode 100644 index bc138f0..0000000 --- a/dsp/lib/sprout/sprout/math/ifloor.hpp +++ /dev/null @@ -1,94 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_IFLOOR_HPP -#define SPROUT_MATH_IFLOOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION -# include -#else -# include -#endif - -namespace sprout { - namespace math { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - namespace detail { - template - inline SPROUT_CONSTEXPR To - ifloor_impl(FloatType x) { - return sprout::numeric_limits::max() < x || sprout::numeric_limits::min() > x - ? SPROUT_MATH_THROW_LARGE_FLOAT_ROUNDING(std::runtime_error("ifloor: large float rounding."), static_cast(x)) - : static_cast(x) - ; - } - } // namespace detail - // - // ifloor - // - template< - typename To = int, - typename FloatType, - typename sprout::enabler_if::value && std::is_integral::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR To - ifloor(FloatType x) { - return sprout::math::isnan(x) || sprout::math::isinf(x) ? sprout::numeric_limits::min() - : sprout::math::detail::ifloor_impl(sprout::math::floor(x)) - ; - } -#else - namespace detail { - template - inline SPROUT_CONSTEXPR To - ifloor_impl(FloatType x, To x0) { - return sprout::math::greater_equal(x, x0) ? x0 - : x0 - 1 - ; - } - } // namespace detail - // - // ifloor - // - template< - typename To = int, - typename FloatType, - typename sprout::enabler_if::value && std::is_integral::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR To - ifloor(FloatType x) { - return sprout::math::isnan(x) || sprout::math::isinf(x) ? sprout::numeric_limits::min() - : x == 0 ? To(0) - : sprout::numeric_limits::max() < x || sprout::numeric_limits::min() > x - ? SPROUT_MATH_THROW_LARGE_FLOAT_ROUNDING(std::runtime_error("ifloor: large float rounding."), static_cast(x)) - : sprout::math::detail::ifloor_impl(x, static_cast(x)) - ; - } -#endif - template< - typename To = int, - typename IntType, - typename sprout::enabler_if::value && std::is_integral::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR To - ifloor(IntType x) { - return sprout::math::ifloor(static_cast(x)); - } - } // namespace math - - using sprout::math::ifloor; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_IFLOOR_HPP diff --git a/dsp/lib/sprout/sprout/math/ilogb.hpp b/dsp/lib/sprout/sprout/math/ilogb.hpp deleted file mode 100644 index 514ea41..0000000 --- a/dsp/lib/sprout/sprout/math/ilogb.hpp +++ /dev/null @@ -1,73 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_ILOGB_HPP -#define SPROUT_MATH_ILOGB_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR int - builtin_ilogb(float x) { - return __builtin_ilogbf(x); - } - inline SPROUT_CONSTEXPR int - builtin_ilogb(double x) { - return __builtin_ilogb(x); - } - inline SPROUT_CONSTEXPR int - builtin_ilogb(long double x) { - return __builtin_ilogbl(x); - } -#endif - } // namespace detail - // - // ilogb - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR int - ilogb(FloatType x) { - return sprout::math::iszero(x) ? FP_ILOGB0 - : sprout::math::isinf(x) ? INT_MAX - : sprout::math::isnan(x) ? FP_ILOGBNAN -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_ilogb(x) -#else - : static_cast(sprout::math::logb(x)) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR int - ilogb(IntType x) { - return sprout::math::ilogb(static_cast(x)); - } - } // namespace math - - using sprout::math::ilogb; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_ILOGB_HPP diff --git a/dsp/lib/sprout/sprout/math/ilogb2.hpp b/dsp/lib/sprout/sprout/math/ilogb2.hpp deleted file mode 100644 index 8536da3..0000000 --- a/dsp/lib/sprout/sprout/math/ilogb2.hpp +++ /dev/null @@ -1,73 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_ILOGB2_HPP -#define SPROUT_MATH_ILOGB2_HPP - -#include -#include -#include -#include -#include -#include -#include -#if SPROUT_FLT_RADIX_IS_2 -# include -#else -# include -# include -# include -# include -#endif - -namespace sprout { - namespace math { -#if SPROUT_FLT_RADIX_IS_2 - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR int - ilogb2(FloatType x) { - return sprout::math::ilogb(x); - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR int - ilogb2(IntType x) { - return sprout::math::ilogb(x); - } -#else - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR int - ilogb2(FloatType x) { - return sprout::math::iszero(x) ? FP_ILOGB0 - : sprout::math::isinf(x) ? INT_MAX - : sprout::math::isnan(x) ? FP_ILOGBNAN - : static_cast(sprout::math::logb2(x)) - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR int - ilogb2(IntType x) { - return sprout::math::ilogb2(static_cast(x)); - } -#endif - } // namespace math - - using sprout::math::ilogb2; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_ILOGB2_HPP diff --git a/dsp/lib/sprout/sprout/math/integer.hpp b/dsp/lib/sprout/sprout/math/integer.hpp deleted file mode 100644 index 2904766..0000000 --- a/dsp/lib/sprout/sprout/math/integer.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_INTEGER_HPP -#define SPROUT_MATH_INTEGER_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_MATH_INTEGER_HPP diff --git a/dsp/lib/sprout/sprout/math/integer_part.hpp b/dsp/lib/sprout/sprout/math/integer_part.hpp deleted file mode 100644 index 86d638a..0000000 --- a/dsp/lib/sprout/sprout/math/integer_part.hpp +++ /dev/null @@ -1,50 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_INTEGER_PART_HPP -#define SPROUT_MATH_INTEGER_PART_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - // - // integer_part - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - integer_part(FloatType x) { - return sprout::math::isnan(x) ? x - : x == sprout::numeric_limits::infinity() ? sprout::numeric_limits::infinity() - : x == -sprout::numeric_limits::infinity() ? -sprout::numeric_limits::infinity() - : x == 0 ? x - : sprout::math::trunc(x) - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - integer_part(IntType x) { - return sprout::math::integer_part(static_cast(x)); - } - } // namespace math - - using sprout::math::integer_part; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_INTEGER_PART_HPP diff --git a/dsp/lib/sprout/sprout/math/iround.hpp b/dsp/lib/sprout/sprout/math/iround.hpp deleted file mode 100644 index 30e8729..0000000 --- a/dsp/lib/sprout/sprout/math/iround.hpp +++ /dev/null @@ -1,102 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_IROUND_HPP -#define SPROUT_MATH_IROUND_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION -# include -#else -# include -#endif - -namespace sprout { - namespace math { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - namespace detail { - template - inline SPROUT_CONSTEXPR To - iround_impl(FloatType x) { - return sprout::numeric_limits::max() < x || sprout::numeric_limits::min() > x - ? SPROUT_MATH_THROW_LARGE_FLOAT_ROUNDING(std::runtime_error("iround: large float rounding."), static_cast(x)) - : static_cast(x) - ; - } - } // namespace detail - // - // iround - // - template< - typename To = int, - typename FloatType, - typename sprout::enabler_if::value && std::is_integral::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR To - iround(FloatType x) { - return sprout::math::isnan(x) || sprout::math::isinf(x) ? sprout::numeric_limits::min() - : sprout::math::detail::iround_impl(sprout::math::round(x)) - ; - } -#else - namespace detail { - template - inline SPROUT_CONSTEXPR To - iround_impl_positive(FloatType x, To x0) { - return x - x0 < FloatType(0.5) ? x0 - : x0 + 1 - ; - } - template - inline SPROUT_CONSTEXPR To - iround_impl_nagative(FloatType x, To x0) { - return x0 - x < FloatType(0.5) ? x0 - : x0 - 1 - ; - } - } // namespace detail - // - // iround - // - template< - typename To = int, - typename FloatType, - typename sprout::enabler_if::value && std::is_integral::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR To - iround(FloatType x) { - return sprout::math::isnan(x) || sprout::math::isinf(x) ? sprout::numeric_limits::min() - : x == 0 ? To(0) - : sprout::numeric_limits::max() < x || sprout::numeric_limits::min() > x - ? SPROUT_MATH_THROW_LARGE_FLOAT_ROUNDING(std::runtime_error("iround: large float irounding."), x) - : x < 0 ? sprout::math::detail::iround_impl_nagative(x, static_cast(x)) - : sprout::math::detail::iround_impl_positive(x, static_cast(x)) - ; - } -#endif - template< - typename To = int, - typename IntType, - typename sprout::enabler_if::value && std::is_integral::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR To - iround(IntType x) { - return sprout::math::iround(static_cast(x)); - } - } // namespace math - - using sprout::math::iround; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_IROUND_HPP diff --git a/dsp/lib/sprout/sprout/math/is_even.hpp b/dsp/lib/sprout/sprout/math/is_even.hpp deleted file mode 100644 index 409450a..0000000 --- a/dsp/lib/sprout/sprout/math/is_even.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_IS_EVEN_HPP -#define SPROUT_MATH_IS_EVEN_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { - template - inline SPROUT_CONSTEXPR bool - is_even_unchecked(T x) { - return sprout::math::fmod(x, T(2)) == T(0); - } - } // namespace detail - // - // is_even - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - is_even(FloatType x) { - return sprout::math::isfinite(x) - && sprout::math::detail::is_even_unchecked(x) - ; - } - } // namespace math - - using sprout::math::is_even; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_IS_EVEN_HPP diff --git a/dsp/lib/sprout/sprout/math/is_integer.hpp b/dsp/lib/sprout/sprout/math/is_integer.hpp deleted file mode 100644 index caf331f..0000000 --- a/dsp/lib/sprout/sprout/math/is_integer.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_IS_INTEGER_HPP -#define SPROUT_MATH_IS_INTEGER_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { - template - inline SPROUT_CONSTEXPR bool - is_integer_unchecked(T x) { - return x == sprout::math::trunc(x); - } - } // namespace detail - // - // is_integer - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - is_integer(FloatType x) { - return sprout::math::isfinite(x) - && sprout::math::detail::is_integer_unchecked(x) - ; - } - } // namespace math - - using sprout::math::is_integer; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_IS_INTEGER_HPP diff --git a/dsp/lib/sprout/sprout/math/is_odd.hpp b/dsp/lib/sprout/sprout/math/is_odd.hpp deleted file mode 100644 index a3497b4..0000000 --- a/dsp/lib/sprout/sprout/math/is_odd.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_IS_ODD_HPP -#define SPROUT_MATH_IS_ODD_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { - template - inline SPROUT_CONSTEXPR bool - is_odd_unchecked(T x) { - return sprout::math::fmod(x, T(2)) == T(1); - } - } // namespace detail - // - // is_odd - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - is_odd(FloatType x) { - return sprout::math::isfinite(x) - && sprout::math::detail::is_odd_unchecked(x < 0 ? -x : x) - ; - } - } // namespace math - - using sprout::math::is_odd; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_IS_ODD_HPP diff --git a/dsp/lib/sprout/sprout/math/isfinite.hpp b/dsp/lib/sprout/sprout/math/isfinite.hpp deleted file mode 100644 index 5fc0f7a..0000000 --- a/dsp/lib/sprout/sprout/math/isfinite.hpp +++ /dev/null @@ -1,59 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_ISFINITE_HPP -#define SPROUT_MATH_ISFINITE_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - template - inline SPROUT_CONSTEXPR bool - builtin_isfinite(FloatType x) { - return __builtin_isfinite(x); - } -#endif - } // namespace detail - // - // isfinite - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - isfinite(FloatType x) { - return -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - sprout::math::detail::builtin_isfinite(x) -#else - !(sprout::math::isnan(x) || sprout::math::isinf(x)) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - isfinite(IntType) { - return true; - } - } // namespace math - - using sprout::math::isfinite; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_ISFINITE_HPP diff --git a/dsp/lib/sprout/sprout/math/isgreater.hpp b/dsp/lib/sprout/sprout/math/isgreater.hpp deleted file mode 100644 index ede76c0..0000000 --- a/dsp/lib/sprout/sprout/math/isgreater.hpp +++ /dev/null @@ -1,63 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_ISGREATER_HPP -#define SPROUT_MATH_ISGREATER_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - template - inline SPROUT_CONSTEXPR bool - builtin_isgreater(FloatType x, FloatType y) { - return __builtin_isgreater(x, y); - } -#endif - } // namespace detail - // - // isgreater - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - isgreater(FloatType x, FloatType y) { - return -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - sprout::math::detail::builtin_isgreater(x, y) -#else - !sprout::math::isnan(x) && !sprout::math::isnan(y) && (x > y) -#endif - ; - } - template< - typename ArithmeticType1, - typename ArithmeticType2, - typename sprout::enabler_if< - std::is_arithmetic::value && std::is_arithmetic::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - isgreater(ArithmeticType1 x, ArithmeticType2 y) { - typedef typename sprout::float_promote::type type; - return sprout::math::isgreater(static_cast(x), static_cast(y)); - } - } // namespace math - - using sprout::math::isgreater; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_ISGREATER_HPP diff --git a/dsp/lib/sprout/sprout/math/isgreaterequal.hpp b/dsp/lib/sprout/sprout/math/isgreaterequal.hpp deleted file mode 100644 index 0251fd1..0000000 --- a/dsp/lib/sprout/sprout/math/isgreaterequal.hpp +++ /dev/null @@ -1,63 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_ISGREATEREQUAL_HPP -#define SPROUT_MATH_ISGREATEREQUAL_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - template - inline SPROUT_CONSTEXPR bool - builtin_isgreaterequal(FloatType x, FloatType y) { - return __builtin_isgreaterequal(x, y); - } -#endif - } // namespace detail - // - // isgreaterequal - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - isgreaterequal(FloatType x, FloatType y) { - return -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - sprout::math::detail::builtin_isgreaterequal(x, y) -#else - !sprout::math::isnan(x) && !sprout::math::isnan(y) && (x >= y) -#endif - ; - } - template< - typename ArithmeticType1, - typename ArithmeticType2, - typename sprout::enabler_if< - std::is_arithmetic::value && std::is_arithmetic::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - isgreaterequal(ArithmeticType1 x, ArithmeticType2 y) { - typedef typename sprout::float_promote::type type; - return sprout::math::isgreaterequal(static_cast(x), static_cast(y)); - } - } // namespace math - - using sprout::math::isgreaterequal; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_ISGREATEREQUAL_HPP diff --git a/dsp/lib/sprout/sprout/math/isinf.hpp b/dsp/lib/sprout/sprout/math/isinf.hpp deleted file mode 100644 index 7f38827..0000000 --- a/dsp/lib/sprout/sprout/math/isinf.hpp +++ /dev/null @@ -1,59 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_ISINF_HPP -#define SPROUT_MATH_ISINF_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - template - inline SPROUT_CONSTEXPR bool - builtin_isinf(FloatType x) { - return __builtin_isinf(x); - } -#endif - } // namespace detail - // - // isinf - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - isinf(FloatType x) { - return -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - sprout::math::detail::builtin_isinf(x) -#else - x == sprout::numeric_limits::infinity() - || x == -sprout::numeric_limits::infinity() -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - isinf(IntType) { - return false; - } - } // namespace math - - using sprout::math::isinf; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_ISINF_HPP diff --git a/dsp/lib/sprout/sprout/math/isless.hpp b/dsp/lib/sprout/sprout/math/isless.hpp deleted file mode 100644 index 54bf0e8..0000000 --- a/dsp/lib/sprout/sprout/math/isless.hpp +++ /dev/null @@ -1,63 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_ISLESS_HPP -#define SPROUT_MATH_ISLESS_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - template - inline SPROUT_CONSTEXPR bool - builtin_isless(FloatType x, FloatType y) { - return __builtin_isless(x, y); - } -#endif - } // namespace detail - // - // isless - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - isless(FloatType x, FloatType y) { - return -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - sprout::math::detail::builtin_isless(x, y) -#else - !sprout::math::isnan(x) && !sprout::math::isnan(y) && (x < y) -#endif - ; - } - template< - typename ArithmeticType1, - typename ArithmeticType2, - typename sprout::enabler_if< - std::is_arithmetic::value && std::is_arithmetic::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - isless(ArithmeticType1 x, ArithmeticType2 y) { - typedef typename sprout::float_promote::type type; - return sprout::math::isless(static_cast(x), static_cast(y)); - } - } // namespace math - - using sprout::math::isless; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_ISLESS_HPP diff --git a/dsp/lib/sprout/sprout/math/islessequal.hpp b/dsp/lib/sprout/sprout/math/islessequal.hpp deleted file mode 100644 index 0d1b8f6..0000000 --- a/dsp/lib/sprout/sprout/math/islessequal.hpp +++ /dev/null @@ -1,63 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_ISLESSEQUAL_HPP -#define SPROUT_MATH_ISLESSEQUAL_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - template - inline SPROUT_CONSTEXPR bool - builtin_islessequal(FloatType x, FloatType y) { - return __builtin_islessequal(x, y); - } -#endif - } // namespace detail - // - // islessequal - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - islessequal(FloatType x, FloatType y) { - return -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - sprout::math::detail::builtin_islessequal(x, y) -#else - !sprout::math::isnan(x) && !sprout::math::isnan(y) && (x < y) -#endif - ; - } - template< - typename ArithmeticType1, - typename ArithmeticType2, - typename sprout::enabler_if< - std::is_arithmetic::value && std::is_arithmetic::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - islessequal(ArithmeticType1 x, ArithmeticType2 y) { - typedef typename sprout::float_promote::type type; - return sprout::math::islessequal(static_cast(x), static_cast(y)); - } - } // namespace math - - using sprout::math::islessequal; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_ISLESSEQUAL_HPP diff --git a/dsp/lib/sprout/sprout/math/islessgreater.hpp b/dsp/lib/sprout/sprout/math/islessgreater.hpp deleted file mode 100644 index 8515a11..0000000 --- a/dsp/lib/sprout/sprout/math/islessgreater.hpp +++ /dev/null @@ -1,63 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_ISLESSGREATER_HPP -#define SPROUT_MATH_ISLESSGREATER_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - template - inline SPROUT_CONSTEXPR bool - builtin_islessgreater(FloatType x, FloatType y) { - return __builtin_islessgreater(x, y); - } -#endif - } // namespace detail - // - // islessgreater - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - islessgreater(FloatType x, FloatType y) { - return -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - sprout::math::detail::builtin_islessgreater(x, y) -#else - !sprout::math::isnan(x) && !sprout::math::isnan(y) && ((x < y) || (x > y)) -#endif - ; - } - template< - typename ArithmeticType1, - typename ArithmeticType2, - typename sprout::enabler_if< - std::is_arithmetic::value && std::is_arithmetic::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - islessgreater(ArithmeticType1 x, ArithmeticType2 y) { - typedef typename sprout::float_promote::type type; - return sprout::math::islessgreater(static_cast(x), static_cast(y)); - } - } // namespace math - - using sprout::math::islessgreater; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_ISLESSGREATER_HPP diff --git a/dsp/lib/sprout/sprout/math/isnan.hpp b/dsp/lib/sprout/sprout/math/isnan.hpp deleted file mode 100644 index f9d8d45..0000000 --- a/dsp/lib/sprout/sprout/math/isnan.hpp +++ /dev/null @@ -1,57 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_ISNAN_HPP -#define SPROUT_MATH_ISNAN_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - template - inline SPROUT_CONSTEXPR bool - builtin_isnan(FloatType x) { - return __builtin_isnan(x); - } -#endif - } // namespace detail - // - // isnan - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - isnan(FloatType x) { - return -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - sprout::math::detail::builtin_isnan(x) -#else - !(x == x) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - isnan(IntType) { - return false; - } - } // namespace math - - using sprout::math::isnan; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_ISNAN_HPP diff --git a/dsp/lib/sprout/sprout/math/isnormal.hpp b/dsp/lib/sprout/sprout/math/isnormal.hpp deleted file mode 100644 index dc02dcc..0000000 --- a/dsp/lib/sprout/sprout/math/isnormal.hpp +++ /dev/null @@ -1,62 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_ISNORMAL_HPP -#define SPROUT_MATH_ISNORMAL_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - template - inline SPROUT_CONSTEXPR bool - builtin_isnormal(FloatType x) { - return __builtin_isnormal(x); - } -#endif - } // namespace detail - // - // isnormal - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - isnormal(FloatType x) { - return -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - sprout::math::detail::builtin_isnormal(x) -#else - !sprout::math::isnan(x) - && !sprout::math::isinf(x) - && !sprout::math::detail::issubnormal_or_zero(x) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - isnormal(IntType x) { - return x != 0; - } - } // namespace math - - using sprout::math::isnormal; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_ISNORMAL_HPP diff --git a/dsp/lib/sprout/sprout/math/issubnormal.hpp b/dsp/lib/sprout/sprout/math/issubnormal.hpp deleted file mode 100644 index b6840ab..0000000 --- a/dsp/lib/sprout/sprout/math/issubnormal.hpp +++ /dev/null @@ -1,55 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_ISSUBNORMAL_HPP -#define SPROUT_MATH_ISSUBNORMAL_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { - // - // issubnormal_or_zero - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - issubnormal_or_zero(FloatType x) { - return x > 0 - ? x < sprout::numeric_limits::min() - : x > -sprout::numeric_limits::min() - ; - } - } // namespace detail - // - // issubnormal - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - issubnormal SPROUT_PREVENT_MACRO_SUBSTITUTION (FloatType x) { - return !sprout::math::isnan(x) - && !sprout::math::iszero(x) - && sprout::math::detail::issubnormal_or_zero(x) - ; - } - } // namespace math - - using sprout::math::issubnormal; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_ISSUBNORMAL_HPP diff --git a/dsp/lib/sprout/sprout/math/isunordered.hpp b/dsp/lib/sprout/sprout/math/isunordered.hpp deleted file mode 100644 index ddff856..0000000 --- a/dsp/lib/sprout/sprout/math/isunordered.hpp +++ /dev/null @@ -1,63 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_ISUNORDERED_HPP -#define SPROUT_MATH_ISUNORDERED_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - template - inline SPROUT_CONSTEXPR bool - builtin_isunordered(FloatType x, FloatType y) { - return __builtin_isunordered(x, y); - } -#endif - } // namespace detail - // - // isunordered - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - isunordered(FloatType x, FloatType y) { - return -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - sprout::math::detail::builtin_isunordered(x, y) -#else - sprout::math::isnan(x) || sprout::math::isnan(y) -#endif - ; - } - template< - typename ArithmeticType1, - typename ArithmeticType2, - typename sprout::enabler_if< - std::is_arithmetic::value && std::is_arithmetic::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - isunordered(ArithmeticType1 x, ArithmeticType2 y) { - typedef typename sprout::float_promote::type type; - return sprout::math::isunordered(static_cast(x), static_cast(y)); - } - } // namespace math - - using sprout::math::isunordered; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_ISUNORDERED_HPP diff --git a/dsp/lib/sprout/sprout/math/iszero.hpp b/dsp/lib/sprout/sprout/math/iszero.hpp deleted file mode 100644 index 2f0aa3f..0000000 --- a/dsp/lib/sprout/sprout/math/iszero.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_ISZERO_HPP -#define SPROUT_MATH_ISZERO_HPP - -#include -#include -#include - -namespace sprout { - namespace math { - // - // iszero - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - iszero(FloatType x) { - return x == 0; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - iszero(IntType x) { - return x == 0; - } - } // namespace math - - using sprout::math::iszero; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_ISZERO_HPP diff --git a/dsp/lib/sprout/sprout/math/itrunc.hpp b/dsp/lib/sprout/sprout/math/itrunc.hpp deleted file mode 100644 index 84f2fd4..0000000 --- a/dsp/lib/sprout/sprout/math/itrunc.hpp +++ /dev/null @@ -1,83 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_ITRUNC_HPP -#define SPROUT_MATH_ITRUNC_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION -# include -#endif - -namespace sprout { - namespace math { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - namespace detail { - template - inline SPROUT_CONSTEXPR To - itrunc_impl(FloatType x) { - return sprout::numeric_limits::max() < x || sprout::numeric_limits::min() > x - ? SPROUT_MATH_THROW_LARGE_FLOAT_ROUNDING(std::runtime_error("itrunc: large float rounding."), static_cast(x)) - : static_cast(x) - ; - } - } // namespace detail - // - // itrunc - // - template< - typename To = int, - typename FloatType, - typename sprout::enabler_if::value && std::is_integral::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR To - itrunc(FloatType x) { - return sprout::math::isnan(x) || sprout::math::isinf(x) ? sprout::numeric_limits::min() - : sprout::math::detail::itrunc_impl(sprout::math::trunc(x)) - ; - } -#else - // - // itrunc - // - template< - typename To = int, - typename FloatType, - typename sprout::enabler_if::value && std::is_integral::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR To - itrunc(FloatType x) { - return sprout::math::isnan(x) || sprout::math::isinf(x) ? sprout::numeric_limits::min() - : x == 0 ? To(0) - : sprout::numeric_limits::max() < x || sprout::numeric_limits::min() > x - ? SPROUT_MATH_THROW_LARGE_FLOAT_ROUNDING(std::runtime_error("itrunc: large float rounding."), static_cast(x)) - : static_cast(x) - ; - } -#endif - template< - typename To = int, - typename IntType, - typename sprout::enabler_if::value && std::is_integral::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR To - itrunc(IntType x) { - return sprout::math::itrunc(static_cast(x)); - } - } // namespace math - - using sprout::math::itrunc; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_ITRUNC_HPP diff --git a/dsp/lib/sprout/sprout/math/lcm.hpp b/dsp/lib/sprout/sprout/math/lcm.hpp deleted file mode 100644 index dbf8663..0000000 --- a/dsp/lib/sprout/sprout/math/lcm.hpp +++ /dev/null @@ -1,119 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_LCM_HPP -#define SPROUT_MATH_LCM_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { - template - inline SPROUT_CONSTEXPR RingType - lcm_euclidean_impl(RingType a, RingType b, RingType temp) { - return temp != static_cast(0) ? (a / temp * b) - : static_cast(0) - ; - } - template - inline SPROUT_CONSTEXPR RingType - lcm_euclidean(RingType a, RingType b) { - return sprout::math::detail::lcm_euclidean_impl( - a, b, sprout::math::detail::gcd_euclidean(a, b) - ); - } - - template - inline SPROUT_CONSTEXPR IntType - lcm_integer_impl(IntType result) { - return result < static_cast(0) ? -result : result; - } - template - inline SPROUT_CONSTEXPR IntType - lcm_integer(IntType const& a, IntType const& b) { - return sprout::math::detail::lcm_integer_impl( - sprout::math::detail::lcm_euclidean(a, b) - ); - } - - template - struct lcm_optimal_evaluator_helper_t { - public: - SPROUT_CONSTEXPR T operator()(T const& a, T const& b) const { - return sprout::math::detail::lcm_euclidean(a, b); - } - }; - template - struct lcm_optimal_evaluator_helper_t { - public: - SPROUT_CONSTEXPR T operator()(T const& a, T const& b) const { - return sprout::math::detail::lcm_integer(a, b); - } - }; - - template - struct lcm_optimal_evaluator { - public: - SPROUT_CONSTEXPR T operator()(T const& a, T const& b) const { - typedef sprout::numeric_limits limits_type; - typedef sprout::math::detail::lcm_optimal_evaluator_helper_t< - T, limits_type::is_specialized, limits_type::is_signed - > helper_type; - return helper_type().operator()(a, b); - } - }; - - template - inline SPROUT_CONSTEXPR T - lcm_optimal(T const& a, T const& b) { - return sprout::math::detail::lcm_optimal_evaluator().operator()(a, b); - } - } // namespace detail - - // - // lcm_evaluator - // - template - class lcm_evaluator { - public: - typedef IntType result_type; - typedef IntType first_argument_type; - typedef IntType second_argument_type; - public: - SPROUT_CONSTEXPR IntType - operator()(IntType const& a, IntType const& b) const { - return sprout::math::detail::lcm_optimal(a, b); - } - }; - template<> - class lcm_evaluator { - public: - template - SPROUT_CONSTEXPR IntType - operator()(IntType const& a, IntType const& b) const { - return sprout::math::detail::lcm_optimal(a, b); - } - }; - - // - // lcm - // - template - inline SPROUT_CONSTEXPR IntType - lcm(IntType const& a, IntType const& b) { - return sprout::math::lcm_evaluator().operator()(a, b); - } - } // namespace math - - using sprout::math::lcm; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_LCM_HPP diff --git a/dsp/lib/sprout/sprout/math/ldexp.hpp b/dsp/lib/sprout/sprout/math/ldexp.hpp deleted file mode 100644 index a72d5d2..0000000 --- a/dsp/lib/sprout/sprout/math/ldexp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_LDEXP_HPP -#define SPROUT_MATH_LDEXP_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_ldexp(float x, int exp) { - return __builtin_ldexpf(x, exp); - } - inline SPROUT_CONSTEXPR double - builtin_ldexp(double x, int exp) { - return __builtin_ldexp(x, exp); - } - inline SPROUT_CONSTEXPR long double - builtin_ldexp(long double x, int exp) { - return __builtin_ldexpl(x, exp); - } -#endif - - template - inline SPROUT_CONSTEXPR T - ldexp_impl(T x, int exp) { - return x * sprout::detail::pow_n(T(2), exp); - } - } // namespace detail - // - // ldexp - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - ldexp(FloatType x, int exp) { - return -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - sprout::math::detail::builtin_ldexp(x, exp) -#else - sprout::math::isnan(x) ? x - : x == sprout::numeric_limits::infinity() ? sprout::numeric_limits::infinity() - : x == -sprout::numeric_limits::infinity() ? -sprout::numeric_limits::infinity() - : exp == 0 ? x - : x == 0 ? x - : static_cast(sprout::math::detail::ldexp_impl(static_cast::type>(x), exp)) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - ldexp(IntType x, int exp) { - return sprout::math::ldexp(static_cast(x), exp); - } - } // namespace math - - using sprout::math::ldexp; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_LDEXP_HPP diff --git a/dsp/lib/sprout/sprout/math/less.hpp b/dsp/lib/sprout/sprout/math/less.hpp deleted file mode 100644 index 6f72f4d..0000000 --- a/dsp/lib/sprout/sprout/math/less.hpp +++ /dev/null @@ -1,87 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_LESS_HPP -#define SPROUT_MATH_LESS_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { - template< - typename FloatType1, typename FloatType2, - typename sprout::enabler_if< - std::is_floating_point::type>::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - less(FloatType1 x, FloatType2 y) { - return sprout::math::not_equal_to(x, y) && x < y; - } - - template< - typename IntType1, typename IntType2, - typename sprout::enabler_if< - std::is_integral::type>::value - && (sprout::is_unsigned::value == sprout::is_unsigned::value) - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - less(IntType1 x, IntType2 y) { - return x < y; - } - template< - typename IntType1, typename IntType2, - typename sprout::enabler_if< - std::is_integral::type>::value - && sprout::is_signed::value && sprout::is_unsigned::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - less(IntType1 x, IntType2 y) { - typedef typename std::make_unsigned::type>::type type; - return x < 0 ? true - : static_cast(x) < static_cast(y) - ; - } - template< - typename IntType1, typename IntType2, - typename sprout::enabler_if< - std::is_integral::type>::value - && sprout::is_unsigned::value && sprout::is_signed::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - less(IntType1 x, IntType2 y) { - typedef typename std::make_unsigned::type>::type type; - return y < 0 ? false - : static_cast(x) < static_cast(y) - ; - } - } // namespace detail - // - // less - // - template< - typename T, typename U, - typename sprout::enabler_if::value && std::is_arithmetic::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - less(T x, U y) { - return sprout::math::detail::less(x, y); - } - } // namespace math -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_LESS_HPP diff --git a/dsp/lib/sprout/sprout/math/less_equal.hpp b/dsp/lib/sprout/sprout/math/less_equal.hpp deleted file mode 100644 index 3d9ce1b..0000000 --- a/dsp/lib/sprout/sprout/math/less_equal.hpp +++ /dev/null @@ -1,87 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_LESS_EQUAL_HPP -#define SPROUT_MATH_LESS_EQUAL_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { - template< - typename FloatType1, typename FloatType2, - typename sprout::enabler_if< - std::is_floating_point::type>::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - less_equal(FloatType1 x, FloatType2 y) { - return sprout::math::equal_to(x, y) || x < y; - } - - template< - typename IntType1, typename IntType2, - typename sprout::enabler_if< - std::is_integral::type>::value - && (sprout::is_unsigned::value == sprout::is_unsigned::value) - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - less_equal(IntType1 x, IntType2 y) { - return x <= y; - } - template< - typename IntType1, typename IntType2, - typename sprout::enabler_if< - std::is_integral::type>::value - && sprout::is_signed::value && sprout::is_unsigned::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - less_equal(IntType1 x, IntType2 y) { - typedef typename std::make_unsigned::type>::type type; - return x < 0 ? true - : static_cast(x) <= static_cast(y) - ; - } - template< - typename IntType1, typename IntType2, - typename sprout::enabler_if< - std::is_integral::type>::value - && sprout::is_unsigned::value && sprout::is_signed::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - less_equal(IntType1 x, IntType2 y) { - typedef typename std::make_unsigned::type>::type type; - return y < 0 ? false - : static_cast(x) <= static_cast(y) - ; - } - } // namespace detail - // - // less_equal - // - template< - typename T, typename U, - typename sprout::enabler_if::value && std::is_arithmetic::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - less_equal(T x, U y) { - return sprout::math::detail::less_equal(x, y); - } - } // namespace math -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_LESS_EQUAL_HPP diff --git a/dsp/lib/sprout/sprout/math/lgamma.hpp b/dsp/lib/sprout/sprout/math/lgamma.hpp deleted file mode 100644 index 45894db..0000000 --- a/dsp/lib/sprout/sprout/math/lgamma.hpp +++ /dev/null @@ -1,238 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_LGAMMA_HPP -#define SPROUT_MATH_LGAMMA_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_lgamma(float x) { - return __builtin_lgammaf(x); - } - inline SPROUT_CONSTEXPR double - builtin_lgamma(double x) { - return __builtin_lgamma(x); - } - inline SPROUT_CONSTEXPR long double - builtin_lgamma(long double x) { - return __builtin_lgammal(x); - } -#endif - - template - inline SPROUT_CONSTEXPR T - lgamma_impl_3(T x, T y) { - return x < 0 ? sprout::math::log(sprout::math::pi() / sprout::math::fabs(x * sprout::math::sin(x * sprout::math::pi()))) - y - : y - ; - } - template - inline SPROUT_CONSTEXPR T - lgamma_impl_2_d_1(T x, T w, T v, T t) { - return sprout::math::detail::lgamma_impl_3( - x, - (((((-0.00163312359200500807 * t + 8.3644533703385956e-4) * t + -5.9518947575728181e-4) * t - + 7.9365057505415415e-4) * t + -0.00277777777735463043) * t + 0.08333333333333309869) * v + 0.91893853320467274178 - + ((w - T(0.5)) * sprout::math::log(w) - w) - ); - } - template - inline SPROUT_CONSTEXPR T - lgamma_impl_2_d(T x, T w, T v) { - return sprout::math::detail::lgamma_impl_2_d_1(x, w, v, v * v); - } - template - inline SPROUT_CONSTEXPR T - lgamma_impl_2_c_1(T x, T t, int k) { - return sprout::math::detail::lgamma_impl_3( - x, - k == 0 ? ((((((((((( - 1.16333640008e-8 * t + -8.33156123568e-8) * t - + 3.832869977018e-7) * t + -1.5814047847688e-6) * t + 6.50106723241e-6) * t - + -2.74514060128677e-5) * t + 1.209015360925566e-4) * t + -5.666333178228163e-4) * t - + 0.0029294103665559733) * t + -0.0180340086069185819) * t + 0.1651788780501166204) * t - + 1.1031566406452431944) * t + 1.2009736023470742248 - : k == 1 ? ((((((((((( - 1.3842760642e-9 * t + -6.9417501176e-9) * t - + 3.42976459827e-8) * t + -1.785317236779e-7) * t + 9.525947257118e-7) * t - + -5.2483007560905e-6) * t + 3.02364659535708e-5) * t + -1.858396115473822e-4) * t - + 0.0012634378559425382) * t + -0.0102594702201954322) * t + 0.1243625515195050218) * t - + 1.3888709263595291174) * t + 2.4537365708424422209 - : k == 2 ? ((((((((((( - 1.298977078e-10 * t + -8.02957489e-10) * t - + 4.945484615e-9) * t + -3.17563534834e-8) * t + 2.092136698089e-7) * t - + -1.4252023958462e-6) * t + 1.01652510114008e-5) * t + -7.74550502862323e-5) * t - + 6.537746948291078e-4) * t + -0.006601491253552183) * t + 0.0996711934948138193) * t - + 1.6110931485817511402) * t + 3.9578139676187162939 - : k == 3 ? ((((((((((( - 1.83995642e-11 * t + -1.353537034e-10) * t - + 9.984676809e-10) * t + -7.6346363974e-9) * t + 5.99311464148e-8) * t - + -4.868554120177e-7) * t + 4.1441957716669e-6) * t + -3.77160856623282e-5) * t - + 3.805693126824884e-4) * t + -0.0045979851178130194) * t + 0.0831422678749791178) * t - + 1.7929113303999329439) * t + 5.6625620598571415285 - : ((((((((((( - 3.4858778e-12 * t + -2.97587783e-11) * t - + 2.557677575e-10) * t + -2.2705728282e-9) * t + 2.0702499245e-8) * t - + -1.954426390917e-7) * t + 1.9343161886722e-6) * t + -2.0479024910257e-5) * t - + 2.405181940241215e-4) * t + -0.0033842087561074799) * t + 0.0713079483483518997) * t - + 1.9467574842460867884) * t + 7.5343642367587329552 - ); - } - template - inline SPROUT_CONSTEXPR T - lgamma_impl_2_c(T x, T w, int k) { - return sprout::math::detail::lgamma_impl_2_c_1(x, w - (static_cast(k) + 3.5), k); - } - template - inline SPROUT_CONSTEXPR T - lgamma_impl_2_b_2(T x, T t, int k) { - return sprout::math::detail::lgamma_impl_3( - x, - k == 0 ? (((((((((((( - -4.587497028e-11 * t + 1.902363396e-10) * t - + 8.6377323367e-10) * t + 1.15513678861e-8) * t + -2.556403058605e-8) * t - + -1.5236723372486e-7) * t + -3.1680510638574e-6) * t + 1.22903704923381e-6) * t - + 2.334372474572637e-5) * t + 0.00111544038088797696) * t + 0.00344717051723468982) * t - + 0.03198287045148788384) * t + -0.32705333652955399526) * t + 0.40120442440953927615 - : k == 1 ? (((((((((((( - -5.184290387e-11 * t + -8.3355121068e-10) * t - + -2.56167239813e-9) * t + 1.455875381397e-8) * t + 1.3512178394703e-7) * t - + 2.9898826810905e-7) * t + -3.58107254612779e-6) * t + -2.445260816156224e-5) * t - + -4.417127762011821e-5) * t + 0.00112859455189416567) * t + 0.00804694454346728197) * t - + 0.04919775747126691372) * t + -0.24818372840948854178) * t + 0.11071780856646862561 - : k == 2 ? (((((((((((( - 3.0279161576e-10 * t + 1.60742167357e-9) * t - + -4.05596009522e-9) * t + -5.089259920266e-8) * t + -2.029496209743e-8) * t - + 1.35130272477793e-6) * t + 3.91430041115376e-6) * t + -2.871505678061895e-5) * t - + -2.3052137536922035e-4) * t + 4.5534656385400747e-4) * t + 0.01153444585593040046) * t - + 0.07924014651650476036) * t + -0.12152192626936502982) * t + -0.07916438300260539592 - : k == 3 ? (((((((((((( - -5.091914958e-10 * t + -1.15274986907e-9) * t - + 1.237873512188e-8) * t + 2.937383549209e-8) * t + -3.0621450667958e-7) * t - + -7.7409414949954e-7) * t + 8.16753874325579e-6) * t + 2.412433382517375e-5) * t - + -2.60612176060637e-4) * t + -9.1000087658659231e-4) * t + 0.01068093850598380797) * t - + 0.11395654404408482305) * t + 0.07209569059984075595) * t + -0.10971041451764266684 - : k == 4 ? (((((((((((( - 4.0119897187e-10 * t + -1.3224526679e-10) * t - + -1.002723190355e-8) * t + 2.569249716518e-8) * t + 2.0336011868466e-7) * t - + -1.1809768272606e-6) * t + -3.00660303810663e-6) * t + 4.402212897757763e-5) * t - + -1.462405876235375e-5) * t + -0.0016487379559600128) * t + 0.00513927520866443706) * t - + 0.13843580753590579416) * t + 0.32730190978254056722) * t + 0.08588339725978624973 - : k == 5 ? (((((((((((( - -1.5413428348e-10 * t + 6.4905779353e-10) * t - + 1.60702811151e-9) * t + -2.655645793815e-8) * t + 7.619544277956e-8) * t - + 4.7604380765353e-7) * t + -4.90748870866195e-6) * t + 8.21513040821212e-6) * t - + 1.4804944070262948e-4) * t + -0.00122152255762163238) * t + -8.7425289205498532e-4) * t - + 0.1443870369965796831) * t + 0.61315889733595543766) * t + 0.55513708159976477557 - : (((((((((((( - 1.049740243e-11 * t + -2.5832017855e-10) * t - + 1.39591845075e-9) * t + -2.1177278325e-10) * t + -5.082950464905e-8) * t - + 3.7801785193343e-7) * t + -7.3982266659145e-7) * t + -1.088918441519888e-5) * t - + 1.2491810452478905e-4) * t + -4.9171790705139895e-4) * t + -0.0042570708944826646) * t - + 0.13595080378472757216) * t + 0.89518356003149514744) * t + 1.31073912535196238583 - ); - } - template - inline SPROUT_CONSTEXPR T - lgamma_impl_2_b_1(T x, T t, int k) { - return sprout::math::detail::lgamma_impl_2_b_2(x, t - (static_cast(k) - T(3.5)), k); - } - template - inline SPROUT_CONSTEXPR T - lgamma_impl_2_b(T x, T t) { - return sprout::math::detail::lgamma_impl_2_b_1(x, t, sprout::math::itrunc(t) + 4); - } - template - inline SPROUT_CONSTEXPR T - lgamma_impl_2_a(T x, T w, int k) { - return sprout::math::detail::lgamma_impl_3( - x, - -sprout::math::log( - k == 0 ? (((((((((( - 9.967270908702825e-5 * w + -1.9831672170162227e-4) * w - + -0.00117085315349625822) * w + 0.00722012810948319552) * w + -0.0096221300936780297) * w - + -0.04219772092994235254) * w + 0.16653861065243609743) * w + -0.04200263501129018037) * w - + -0.65587807152061930091) * w + 0.57721566490153514421) * w + 0.99999999999999999764) * w - : (((((((((( - 4.67209725901142e-5 * w + -6.812300803992063e-5) * w - + -0.00132531159076610073) * w + 0.0073352117810720277) * w + -0.00968095666383935949) * w - + -0.0421764281187354028) * w + 0.16653313644244428256) * w + -0.04200165481709274859) * w - + -0.65587818792782740945) * w + 0.57721567315209190522) * w + 0.99999999973565236061) * w - ) - ); - } - - template - inline SPROUT_CONSTEXPR T - lgamma_impl_1(T x, T w) { - return w < T(0.5) ? sprout::math::detail::lgamma_impl_2_a(x, w, w < T(0.25) ? 0 : 1) - : w < T(3.5) ? sprout::math::detail::lgamma_impl_2_b(x, w - T(4.5) / (w + T(0.5))) - : w < T(8) ? sprout::math::detail::lgamma_impl_2_c(x, w, sprout::math::itrunc(w) - 3) - : sprout::math::detail::lgamma_impl_2_d(x, w, T(1) / w) - ; - } - template - inline SPROUT_CONSTEXPR T - lgamma_impl(T x) { - return sprout::math::detail::lgamma_impl_1(x, x < 0 ? -x : x); - } - } // namespace detail - // - // lgamma - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - lgamma(FloatType x) { - return sprout::math::isnan(x) ? x - : x <= 0 && sprout::math::is_integer(x) ? sprout::numeric_limits::infinity() - : x == -sprout::numeric_limits::infinity() ? sprout::numeric_limits::infinity() - : x == sprout::numeric_limits::infinity() ? sprout::numeric_limits::infinity() -//#if SPROUT_USE_BUILTIN_CMATH_FUNCTION -// : sprout::math::detail::builtin_lgamma(x) -//#else - : x == 1 ? FloatType(0) - : x == 2 ? FloatType(0) - : static_cast(sprout::math::detail::lgamma_impl(static_cast::type>(x))) -//#endif - ; - } - - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - lgamma(IntType x) { - return sprout::math::lgamma(static_cast(x)); - } - } // namespace math - - using sprout::math::lgamma; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_LGAMMA_HPP diff --git a/dsp/lib/sprout/sprout/math/llround.hpp b/dsp/lib/sprout/sprout/math/llround.hpp deleted file mode 100644 index aa2b88e..0000000 --- a/dsp/lib/sprout/sprout/math/llround.hpp +++ /dev/null @@ -1,74 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_LLROUND_HPP -#define SPROUT_MATH_LLROUND_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR long long - builtin_llround(float x) { - return __builtin_llroundf(x); - } - inline SPROUT_CONSTEXPR long long - builtin_llround(double x) { - return __builtin_llround(x); - } - inline SPROUT_CONSTEXPR long long - builtin_llround(long double x) { - return __builtin_llroundl(x); - } -#endif - } // namespace detail - // - // llround - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR long long - llround(FloatType x) { - return sprout::math::isnan(x) || sprout::math::isinf(x) ? sprout::numeric_limits::min() -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_llround(x) -#else - : sprout::math::iround(x); -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR long long - llround(IntType x) { - return -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - sprout::math::detail::builtin_llround(x) -#else - sprout::math::iround(x) -#endif - ; - } - } // namespace math - - using sprout::math::llround; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_LLROUND_HPP diff --git a/dsp/lib/sprout/sprout/math/log.hpp b/dsp/lib/sprout/sprout/math/log.hpp deleted file mode 100644 index f28fd1d..0000000 --- a/dsp/lib/sprout/sprout/math/log.hpp +++ /dev/null @@ -1,101 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_LOG_HPP -#define SPROUT_MATH_LOG_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_log(float x) { - return __builtin_logf(x); - } - inline SPROUT_CONSTEXPR double - builtin_log(double x) { - return __builtin_log(x); - } - inline SPROUT_CONSTEXPR long double - builtin_log(long double x) { - return __builtin_logl(x); - } -#endif - - template - inline SPROUT_CONSTEXPR T - log_impl_2(T x, std::size_t n, std::size_t last) { - return last - n == 1 - ? (n % 2 ? 1 : -1) * sprout::detail::pow_n(x, n) / n - : sprout::math::detail::log_impl_2(x, n, n + (last - n) / 2) - + sprout::math::detail::log_impl_2(x, n + (last - n) / 2, last) - ; - } - template - inline SPROUT_CONSTEXPR T - log_impl_1(T x) { - return !(x > sprout::math::root_two()) - ? sprout::math::detail::log_impl_2(x - T(1), 1, sprout::math::factorial_limit() + 1) - : T(2) * sprout::math::detail::log_impl_1(sprout::math::sqrt(x)) - ; - } - template - inline SPROUT_CONSTEXPR T - log_impl(T x) { - return x < 1 ? -sprout::math::detail::log_impl_1(T(1) / x) - : sprout::math::detail::log_impl_1(x) - ; - } - } // namespace detail - // - // log - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - log(FloatType x) { - return sprout::math::isnan(x) ? x - : x == 0 ? -sprout::numeric_limits::infinity() - : x == sprout::numeric_limits::infinity() ? sprout::numeric_limits::infinity() - : x < 0 ? sprout::numeric_limits::quiet_NaN() -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_log(x) -#else - : x == 1 ? FloatType(0) - : static_cast(sprout::math::detail::log_impl(static_cast::type>(x))) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - log(IntType x) { - return sprout::math::log(static_cast(x)); - } - } // namespace math - - using sprout::math::log; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_LOG_HPP diff --git a/dsp/lib/sprout/sprout/math/log10.hpp b/dsp/lib/sprout/sprout/math/log10.hpp deleted file mode 100644 index 8c6a6eb..0000000 --- a/dsp/lib/sprout/sprout/math/log10.hpp +++ /dev/null @@ -1,79 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_LOG10_HPP -#define SPROUT_MATH_LOG10_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_log10(float x) { - return __builtin_log10f(x); - } - inline SPROUT_CONSTEXPR double - builtin_log10(double x) { - return __builtin_log10(x); - } - inline SPROUT_CONSTEXPR long double - builtin_log10(long double x) { - return __builtin_log10l(x); - } -#endif - - template - inline SPROUT_CONSTEXPR T - log10_impl(T x) { - return sprout::math::log(x) / sprout::math::ln_ten(); - } - } // namespace detail - // - // log10 - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - log10(FloatType x) { - return sprout::math::isnan(x) ? x - : x == 0 ? -sprout::numeric_limits::infinity() - : x == sprout::numeric_limits::infinity() ? sprout::numeric_limits::infinity() - : x < 0 ? sprout::numeric_limits::quiet_NaN() -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_log10(x) -#else - : x == 1 ? FloatType(0) - : static_cast(sprout::math::detail::log10_impl(static_cast::type>(x))) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - log10(IntType x) { - return sprout::math::log10(static_cast(x)); - } - } // namespace math - - using sprout::math::log10; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_LOG10_HPP diff --git a/dsp/lib/sprout/sprout/math/log1p.hpp b/dsp/lib/sprout/sprout/math/log1p.hpp deleted file mode 100644 index 165305a..0000000 --- a/dsp/lib/sprout/sprout/math/log1p.hpp +++ /dev/null @@ -1,78 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_LOG1P_HPP -#define SPROUT_MATH_LOG1P_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_log1p(float x) { - return __builtin_log1pf(x); - } - inline SPROUT_CONSTEXPR double - builtin_log1p(double x) { - return __builtin_log1p(x); - } - inline SPROUT_CONSTEXPR long double - builtin_log1p(long double x) { - return __builtin_log1pl(x); - } -#endif - - template - inline SPROUT_CONSTEXPR T - log1p_impl(T x) { - return sprout::math::log(T(1) + x); - } - } // namespace detail - // - // log1p - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - log1p(FloatType x) { - return sprout::math::isnan(x) ? x - : x == -1 ? -sprout::numeric_limits::infinity() - : x == sprout::numeric_limits::infinity() ? sprout::numeric_limits::infinity() - : x < -1 ? -sprout::numeric_limits::quiet_NaN() -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_log1p(x) -#else - : x == 0 ? x - : static_cast(sprout::math::detail::log1p_impl(static_cast::type>(x))) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - log1p(IntType x) { - return sprout::math::log1p(static_cast(x)); - } - } // namespace math - - using sprout::math::log1p; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_LOG1P_HPP diff --git a/dsp/lib/sprout/sprout/math/log2.hpp b/dsp/lib/sprout/sprout/math/log2.hpp deleted file mode 100644 index 21bc6f4..0000000 --- a/dsp/lib/sprout/sprout/math/log2.hpp +++ /dev/null @@ -1,79 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_LOG2_HPP -#define SPROUT_MATH_LOG2_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_log2(float x) { - return __builtin_log2f(x); - } - inline SPROUT_CONSTEXPR double - builtin_log2(double x) { - return __builtin_log2(x); - } - inline SPROUT_CONSTEXPR long double - builtin_log2(long double x) { - return __builtin_log2l(x); - } -#endif - - template - inline SPROUT_CONSTEXPR T - log2_impl(T x) { - return sprout::math::log(x) / sprout::math::ln_two(); - } - } // namespace detail - // - // log2 - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - log2(FloatType x) { - return sprout::math::isnan(x) ? x - : x == 0 ? -sprout::numeric_limits::infinity() - : x == sprout::numeric_limits::infinity() ? sprout::numeric_limits::infinity() - : x < 0 ? sprout::numeric_limits::quiet_NaN() -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_log2(x) -#else - : x == 1 ? FloatType(0) - : static_cast(sprout::math::detail::log2_impl(static_cast::type>(x))) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - log2(IntType x) { - return sprout::math::log2(static_cast(x)); - } - } // namespace math - - using sprout::math::log2; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_LOG2_HPP diff --git a/dsp/lib/sprout/sprout/math/log_a.hpp b/dsp/lib/sprout/sprout/math/log_a.hpp deleted file mode 100644 index 9e825ad..0000000 --- a/dsp/lib/sprout/sprout/math/log_a.hpp +++ /dev/null @@ -1,64 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_LOG_A_HPP -#define SPROUT_MATH_LOG_A_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { - template - inline SPROUT_CONSTEXPR T - log_a_impl(T x, T y) { - return x == 2 ? sprout::math::log(y) / sprout::math::ln_two() - : x == 10 ? sprout::math::log(y) / sprout::math::ln_ten() - : sprout::math::log(y) / sprout::math::log(x) - ; - } - } // namespace detail - // - // log_a - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - log_a(FloatType x, FloatType y) { - return static_cast(sprout::math::detail::log_a_impl( - static_cast::type>(x), - static_cast::type>(y) - )); - } - - template< - typename ArithmeticType1, - typename ArithmeticType2, - typename sprout::enabler_if< - std::is_arithmetic::value && std::is_arithmetic::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::float_promote::type - log_a(ArithmeticType1 x, ArithmeticType2 y) { - typedef typename sprout::float_promote::type type; - return sprout::math::log_a(static_cast(x), static_cast(y)); - } - } // namespace math - - using sprout::math::log_a; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_LOG_A_HPP diff --git a/dsp/lib/sprout/sprout/math/logb.hpp b/dsp/lib/sprout/sprout/math/logb.hpp deleted file mode 100644 index 1baa649..0000000 --- a/dsp/lib/sprout/sprout/math/logb.hpp +++ /dev/null @@ -1,156 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_LOGB_HPP -#define SPROUT_MATH_LOGB_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_logb(float x) { - return __builtin_logbf(x); - } - inline SPROUT_CONSTEXPR double - builtin_logb(double x) { - return __builtin_logb(x); - } - inline SPROUT_CONSTEXPR long double - builtin_logb(long double x) { - return __builtin_logbl(x); - } -#endif - - template - inline SPROUT_CONSTEXPR T - logb_impl_3_neg_lo(T x, T x0, T base, T exp) { - return base < 1 ? sprout::math::detail::logb_impl_3_neg_lo( - x, x0 * sprout::numeric_limits::radix, x / (x0 / sprout::numeric_limits::radix), exp - 1 - ) - : exp - ; - } - template - inline SPROUT_CONSTEXPR T - logb_impl_3_neg_hi(T x, T x0, T base, T exp) { - return !(base < sprout::numeric_limits::radix) ? sprout::math::detail::logb_impl_3_neg_hi( - x, x0 / sprout::numeric_limits::radix, x / (x0 * sprout::numeric_limits::radix), exp + 1 - ) - : exp - ; - } - template - inline SPROUT_CONSTEXPR T - logb_impl_3_pos_lo(T x, T x0, T base, T exp) { - return base < 1 ? sprout::math::detail::logb_impl_3_pos_lo( - x, x0 * sprout::numeric_limits::radix, x / (x0 / sprout::numeric_limits::radix), exp - 1 - ) - : exp - ; - } - template - inline SPROUT_CONSTEXPR T - logb_impl_3_pos_hi(T x, T x0, T base, T exp) { - return !(base < sprout::numeric_limits::radix) ? sprout::math::detail::logb_impl_3_pos_hi( - x, x0 / sprout::numeric_limits::radix, x / (x0 * sprout::numeric_limits::radix), exp + 1 - ) - : exp - ; - } - template - inline SPROUT_CONSTEXPR T - logb_impl_3(T x, T x0, T base, T exp) { - return x < 1 - ? base < 1 ? sprout::math::detail::logb_impl_3_neg_lo( - x, x0 * sprout::numeric_limits::radix, x / (x0 / sprout::numeric_limits::radix), exp - 1 - ) - : !(base < sprout::numeric_limits::radix) ? sprout::math::detail::logb_impl_3_neg_hi( - x, x0 / sprout::numeric_limits::radix, x / (x0 * sprout::numeric_limits::radix), exp + 1 - ) - : exp - : base < 1 ? sprout::math::detail::logb_impl_3_pos_lo( - x, x0 * sprout::numeric_limits::radix, x / (x0 / sprout::numeric_limits::radix), exp - 1 - ) - : !(base < sprout::numeric_limits::radix) ? sprout::math::detail::logb_impl_3_pos_hi( - x, x0 / sprout::numeric_limits::radix, x / (x0 * sprout::numeric_limits::radix), exp + 1 - ) - : exp - ; - } - template - inline SPROUT_CONSTEXPR T - logb_impl_2(T x, T x0, T exp) { - return sprout::math::detail::logb_impl_3(x, x0, x / x0, exp); - } - template - inline SPROUT_CONSTEXPR T - logb_impl_1(T x, T exp) { - return sprout::math::detail::logb_impl_2( - x, sprout::detail::pow_n(T(sprout::numeric_limits::radix), sprout::math::itrunc(exp)), exp - ); - } - template - inline SPROUT_CONSTEXPR T - logb_impl(T x) { - return x < 0 ? sprout::math::detail::logb_impl_1(-x, sprout::math::trunc(sprout::math::log_a(T(sprout::numeric_limits::radix), -x))) - : sprout::math::detail::logb_impl_1(x, sprout::math::trunc(sprout::math::log_a(T(sprout::numeric_limits::radix), x))) - ; - } - } // namespace detail - // - // logb - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - logb(FloatType x) { - return sprout::math::isnan(x) ? x - : x == 0 ? -sprout::numeric_limits::infinity() -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION -# if defined(__GNUC__) - : x == -sprout::numeric_limits::infinity() - ? sprout::numeric_limits::infinity() -# endif - : sprout::math::detail::builtin_logb(x) -#else - : x == sprout::numeric_limits::infinity() || x == -sprout::numeric_limits::infinity() - ? sprout::numeric_limits::infinity() - : static_cast(sprout::math::detail::logb_impl(static_cast::type>(x))) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - logb(IntType x) { - return sprout::math::logb(static_cast(x)); - } - } // namespace math - - using sprout::math::logb; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_LOGB_HPP diff --git a/dsp/lib/sprout/sprout/math/logb2.hpp b/dsp/lib/sprout/sprout/math/logb2.hpp deleted file mode 100644 index 82f2bd5..0000000 --- a/dsp/lib/sprout/sprout/math/logb2.hpp +++ /dev/null @@ -1,159 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_LOGB2_HPP -#define SPROUT_MATH_LOGB2_HPP - -#include -#include -#include -#include -#include -#if SPROUT_FLT_RADIX_IS_2 -# include -#else -# include -# include -# include -# include -# include -# include -# include -# include -#endif - -namespace sprout { - namespace math { -#if SPROUT_FLT_RADIX_IS_2 - // - // logb2 - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - logb2(FloatType x) { - return sprout::math::logb(x); - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - logb2(IntType x) { - return sprout::math::logb(x); - } -#else - namespace detail { - template - inline SPROUT_CONSTEXPR T - logb2_impl_3_neg_lo(T x, T x0, T base, T exp) { - return base < 1 ? sprout::math::detail::logb2_impl_3_neg_lo( - x, x0 * 2, x / (x0 / 2), exp - 1 - ) - : exp - ; - } - template - inline SPROUT_CONSTEXPR T - logb2_impl_3_neg_hi(T x, T x0, T base, T exp) { - return !(base < 2) ? sprout::math::detail::logb2_impl_3_neg_hi( - x, x0 / 2, x / (x0 * 2), exp + 1 - ) - : exp - ; - } - template - inline SPROUT_CONSTEXPR T - logb2_impl_3_pos_lo(T x, T x0, T base, T exp) { - return base < 1 ? sprout::math::detail::logb2_impl_3_pos_lo( - x, x0 * 2, x / (x0 / 2), exp - 1 - ) - : exp - ; - } - template - inline SPROUT_CONSTEXPR T - logb2_impl_3_pos_hi(T x, T x0, T base, T exp) { - return !(base < 2) ? sprout::math::detail::logb2_impl_3_pos_hi( - x, x0 / 2, x / (x0 * 2), exp + 1 - ) - : exp - ; - } - template - inline SPROUT_CONSTEXPR T - logb2_impl_3(T x, T x0, T base, T exp) { - return x < 1 - ? base < 1 ? sprout::math::detail::logb2_impl_3_neg_lo( - x, x0 * 2, x / (x0 / 2), exp - 1 - ) - : !(base < 2) ? sprout::math::detail::logb2_impl_3_neg_hi( - x, x0 / 2, x / (x0 * 2), exp + 1 - ) - : exp - : base < 1 ? sprout::math::detail::logb2_impl_3_pos_lo( - x, x0 * 2, x / (x0 / 2), exp - 1 - ) - : !(base < 2) ? sprout::math::detail::logb2_impl_3_pos_hi( - x, x0 / 2, x / (x0 * 2), exp + 1 - ) - : exp - ; - } - template - inline SPROUT_CONSTEXPR T - logb2_impl_2(T x, T x0, T exp) { - return sprout::math::detail::logb2_impl_3(x, x0, x / x0, exp); - } - template - inline SPROUT_CONSTEXPR T - logb2_impl_1(T x, T exp) { - return sprout::math::detail::logb2_impl_2( - x, sprout::detail::pow_n(T(2), sprout::math::itrunc(exp)), exp - ); - } - template - inline SPROUT_CONSTEXPR T - logb2_impl(T x) { - return x < 0 ? sprout::math::detail::logb2_impl_1(-x, sprout::math::trunc(sprout::math::log_a(T(2), -x))) - : sprout::math::detail::logb2_impl_1(x, sprout::math::trunc(sprout::math::log_a(T(2), x))) - ; - } - } // namespace detail - // - // logb2 - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - logb2(FloatType x) { - return sprout::math::isnan(x) ? x - : x == 0 ? -sprout::numeric_limits::infinity() - : x == sprout::numeric_limits::infinity() || x == -sprout::numeric_limits::infinity() - ? sprout::numeric_limits::infinity() - : static_cast(sprout::math::detail::logb2_impl(static_cast::type>(x))) - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - logb2(IntType x) { - return sprout::math::logb2(static_cast(x)); - } -#endif - } // namespace math - - using sprout::math::logb2; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_LOGB2_HPP diff --git a/dsp/lib/sprout/sprout/math/lround.hpp b/dsp/lib/sprout/sprout/math/lround.hpp deleted file mode 100644 index e6ed967..0000000 --- a/dsp/lib/sprout/sprout/math/lround.hpp +++ /dev/null @@ -1,74 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_LROUND_HPP -#define SPROUT_MATH_LROUND_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR long - builtin_lround(float x) { - return __builtin_lroundf(x); - } - inline SPROUT_CONSTEXPR long - builtin_lround(double x) { - return __builtin_lround(x); - } - inline SPROUT_CONSTEXPR long - builtin_lround(long double x) { - return __builtin_lroundl(x); - } -#endif - } // namespace detail - // - // lround - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR long - lround(FloatType x) { - return sprout::math::isnan(x) || sprout::math::isinf(x) ? sprout::numeric_limits::min() -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_lround(x) -#else - : sprout::math::iround(x); -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR long - lround(IntType x) { - return -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - sprout::math::detail::builtin_lround(x) -#else - sprout::math::iround(x) -#endif - ; - } - } // namespace math - - using sprout::math::lround; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_LROUND_HPP diff --git a/dsp/lib/sprout/sprout/math/manipulations.hpp b/dsp/lib/sprout/sprout/math/manipulations.hpp deleted file mode 100644 index ef86bdd..0000000 --- a/dsp/lib/sprout/sprout/math/manipulations.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_MANIPULATIONS_HPP -#define SPROUT_MATH_MANIPULATIONS_HPP - -#include -#include - -#endif // #ifndef SPROUT_MATH_MANIPULATIONS_HPP diff --git a/dsp/lib/sprout/sprout/math/minmax.hpp b/dsp/lib/sprout/sprout/math/minmax.hpp deleted file mode 100644 index d3a660a..0000000 --- a/dsp/lib/sprout/sprout/math/minmax.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_MINMAX_HPP -#define SPROUT_MATH_MINMAX_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_MATH_MINMAX_HPP diff --git a/dsp/lib/sprout/sprout/math/muladd.hpp b/dsp/lib/sprout/sprout/math/muladd.hpp deleted file mode 100644 index 9f51566..0000000 --- a/dsp/lib/sprout/sprout/math/muladd.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_MULADD_HPP -#define SPROUT_MATH_MULADD_HPP - -#include -#include - -#endif // #ifndef SPROUT_MATH_MULADD_HPP diff --git a/dsp/lib/sprout/sprout/math/nearest.hpp b/dsp/lib/sprout/sprout/math/nearest.hpp deleted file mode 100644 index 9c66223..0000000 --- a/dsp/lib/sprout/sprout/math/nearest.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_NEAREST_HPP -#define SPROUT_MATH_NEAREST_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_MATH_NEAREST_HPP diff --git a/dsp/lib/sprout/sprout/math/not_equal_to.hpp b/dsp/lib/sprout/sprout/math/not_equal_to.hpp deleted file mode 100644 index 7807687..0000000 --- a/dsp/lib/sprout/sprout/math/not_equal_to.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_NOT_EQUAL_TO_HPP -#define SPROUT_MATH_NOT_EQUAL_TO_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace math { - // - // not_equal_to - // - template< - typename T, typename U, - typename sprout::enabler_if::value && std::is_arithmetic::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - not_equal_to(T x, U y) { - return !sprout::math::equal_to(x, y); - } - } // namespace math -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_NOT_EQUAL_TO_HPP diff --git a/dsp/lib/sprout/sprout/math/pow.hpp b/dsp/lib/sprout/sprout/math/pow.hpp deleted file mode 100644 index 0730d17..0000000 --- a/dsp/lib/sprout/sprout/math/pow.hpp +++ /dev/null @@ -1,123 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_POW_HPP -#define SPROUT_MATH_POW_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_pow(float x, float y) { - return __builtin_powf(x, y); - } - inline SPROUT_CONSTEXPR double - builtin_pow(double x, double y) { - return __builtin_pow(x, y); - } - inline SPROUT_CONSTEXPR long double - builtin_pow(long double x, long double y) { - return __builtin_powl(x, y); - } -#endif - - template - inline SPROUT_CONSTEXPR T - pow_impl(T x, T y) { - return x < 0 - ? is_odd(y) ? -sprout::math::exp(y * sprout::math::log(-x)) - : sprout::math::exp(y * sprout::math::log(-x)) - : sprout::math::exp(y * sprout::math::log(x)) - ; - } - } // namespace detail - // - // pow - // - // issue: - // [ !(SPROUT_USE_BUILTIN_CMATH_FUNCTION || SPROUT_USE_BUILTIN_COPYSIGN_FUNCTION) ] - // pow(-0, y) returns -�� for y an odd integer < 0. - // # returns +�� . ( same as pow(+0, y) ) - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - pow(FloatType x, FloatType y) { - return x == 1 ? FloatType(1) - : y == 0 ? FloatType(1) - : sprout::math::isnan(y) ? y - : sprout::math::isnan(x) ? x - : x == 0 - ? y < 0 - ? sprout::math::is_odd(y) ? sprout::math::copysign(sprout::numeric_limits::infinity(), x) - : sprout::numeric_limits::infinity() - : sprout::math::is_odd(y) ? x - : FloatType(0) - : x == -1 && (y == sprout::numeric_limits::infinity() || y == -sprout::numeric_limits::infinity()) ? FloatType(1) - : y == -sprout::numeric_limits::infinity() - ? sprout::math::fabs(x) < 1 ? sprout::numeric_limits::infinity() - : FloatType(0) - : y == sprout::numeric_limits::infinity() - ? sprout::math::fabs(x) < 1 ? FloatType(0) - : sprout::numeric_limits::infinity() - : x == -sprout::numeric_limits::infinity() - ? y < 0 - ? sprout::math::is_odd(y) ? -FloatType(0) - : FloatType(0) - : sprout::math::is_odd(y) ? -sprout::numeric_limits::infinity() - : sprout::numeric_limits::infinity() - : x == sprout::numeric_limits::infinity() - ? y < 0 ? FloatType(0) - : sprout::numeric_limits::infinity() - : x < 0 && !sprout::math::is_integer(y) ? sprout::numeric_limits::quiet_NaN() -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_pow(x, y) -#else - : static_cast(sprout::math::detail::pow_impl( - static_cast::type>(x), - static_cast::type>(y) - )) -#endif - ; - } - - template< - typename ArithmeticType1, - typename ArithmeticType2, - typename sprout::enabler_if< - std::is_arithmetic::value && std::is_arithmetic::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::float_promote::type - pow(ArithmeticType1 x, ArithmeticType2 y) { - typedef typename sprout::float_promote::type type; - return sprout::math::pow(static_cast(x), static_cast(y)); - } - } // namespace math - - using sprout::math::pow; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_POW_HPP diff --git a/dsp/lib/sprout/sprout/math/power.hpp b/dsp/lib/sprout/sprout/math/power.hpp deleted file mode 100644 index fe320a4..0000000 --- a/dsp/lib/sprout/sprout/math/power.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_POWER_HPP -#define SPROUT_MATH_POWER_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_MATH_POWER_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion.hpp b/dsp/lib/sprout/sprout/math/quaternion.hpp deleted file mode 100644 index 6a2cdb4..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion.hpp +++ /dev/null @@ -1,24 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_HPP -#define SPROUT_MATH_QUATERNION_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_MATH_QUATERNION_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/abs.hpp b/dsp/lib/sprout/sprout/math/quaternion/abs.hpp deleted file mode 100644 index 955aeb6..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/abs.hpp +++ /dev/null @@ -1,71 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_ABS_HPP -#define SPROUT_MATH_QUATERNION_ABS_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - // - // abs - // - namespace detail { - template - inline SPROUT_CONSTEXPR T - abs_q_impl_3(sprout::array const& temp, T const& maxim) { - return maxim * sprout::math::sqrt(sprout::math::detail::sum(sprout::math::detail::mul(temp, temp))); - } - template - inline SPROUT_CONSTEXPR T - abs_q_impl_2(sprout::array const& temp, T const& maxim) { - return sprout::math::detail::abs_q_impl_3( - sprout::math::detail::mul(temp, maxim), maxim - ); - } - template - inline SPROUT_CONSTEXPR T - abs_q_impl_1(sprout::array const& temp, T const& maxim) { - return maxim == static_cast(0) ? sprout::math::quaternion(maxim) - : sprout::math::detail::abs_q_impl_2( - temp, static_cast(1) / maxim - ) - ; - } - template - inline SPROUT_CONSTEXPR T - abs_q_impl(sprout::array const& temp) { - return sprout::math::detail::abs_q_impl_1( - temp, sprout::math::detail::abs_max(temp) - ); - } - } // namespace detail - template - inline SPROUT_CONSTEXPR T - abs(sprout::math::quaternion const& q) { - return sprout::math::detail::abs_q_impl( - sprout::array{{ - q.R_component_1(), - q.R_component_2(), - q.R_component_3(), - q.R_component_4() - }} - ); - } - } // namespace math - - using sprout::math::abs; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_QUATERNION_ABS_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/arithmetic_operators.hpp b/dsp/lib/sprout/sprout/math/quaternion/arithmetic_operators.hpp deleted file mode 100644 index a0b3ade..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/arithmetic_operators.hpp +++ /dev/null @@ -1,381 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_ARITHMETIC_OPERATORS_HPP -#define SPROUT_MATH_QUATERNION_ARITHMETIC_OPERATORS_HPP - -#include -#include - -namespace sprout { - namespace math { - // - // operator+ - // - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - operator+(T const& lhs, sprout::math::quaternion const& rhs) { - return sprout::math::quaternion( - lhs + rhs.R_component_1(), - rhs.R_component_2(), - rhs.R_component_3(), - rhs.R_component_4() - ); - } - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - operator+(sprout::math::quaternion const& lhs, T const& rhs) { - return sprout::math::quaternion( - lhs.R_component_1() + rhs, - lhs.R_component_2(), - lhs.R_component_3(), - lhs.R_component_4() - ); - } - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - operator+(sprout::complex const& lhs, sprout::math::quaternion const& rhs) { - return sprout::math::quaternion( - lhs.real() + rhs.R_component_1(), - lhs.imag() + rhs.R_component_2(), - rhs.R_component_3(), - rhs.R_component_4() - ); - } - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - operator+(sprout::math::quaternion const& lhs, sprout::complex const& rhs) { - return sprout::math::quaternion( - lhs.R_component_1() + rhs.real(), - lhs.R_component_2() + rhs.imag(), - lhs.R_component_3(), - lhs.R_component_4() - ); - } - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - operator+(sprout::math::quaternion const& lhs, sprout::math::quaternion const& rhs) { - return sprout::math::quaternion( - lhs.R_component_1() + rhs.R_component_1(), - lhs.R_component_2() + rhs.R_component_2(), - lhs.R_component_3() + rhs.R_component_3(), - lhs.R_component_4() + rhs.R_component_4() - ); - } - // - // operator- - // - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - operator-(T const& lhs, sprout::math::quaternion const& rhs) { - return sprout::math::quaternion( - lhs - rhs.R_component_1(), - rhs.R_component_2(), - rhs.R_component_3(), - rhs.R_component_4() - ); - } - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - operator-(sprout::math::quaternion const& lhs, T const& rhs) { - return sprout::math::quaternion( - lhs.R_component_1() - rhs, - lhs.R_component_2(), - lhs.R_component_3(), - lhs.R_component_4() - ); - } - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - operator-(sprout::complex const& lhs, sprout::math::quaternion const& rhs) { - return sprout::math::quaternion( - lhs.real() - rhs.R_component_1(), - lhs.imag() - rhs.R_component_2(), - rhs.R_component_3(), - rhs.R_component_4() - ); - } - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - operator-(sprout::math::quaternion const& lhs, sprout::complex const& rhs) { - return sprout::math::quaternion( - lhs.R_component_1() - rhs.real(), - lhs.R_component_2() - rhs.imag(), - lhs.R_component_3(), - lhs.R_component_4() - ); - } - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - operator-(sprout::math::quaternion const& lhs, sprout::math::quaternion const& rhs) { - return sprout::math::quaternion( - lhs.R_component_1() - rhs.R_component_1(), - lhs.R_component_2() - rhs.R_component_2(), - lhs.R_component_3() - rhs.R_component_3(), - lhs.R_component_4() - rhs.R_component_4() - ); - } - // - // operator* - // - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - operator*(T const& lhs, sprout::math::quaternion const& rhs) { - return sprout::math::quaternion( - lhs * rhs.R_component_1(), - lhs * rhs.R_component_2(), - lhs * rhs.R_component_3(), - lhs * rhs.R_component_4() - ); - } - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - operator*(sprout::math::quaternion const& lhs, T const& rhs) { - return sprout::math::quaternion( - lhs.R_component_1() * rhs, - lhs.R_component_2() * rhs, - lhs.R_component_3() * rhs, - lhs.R_component_4() * rhs - ); - } - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - mul_qc_impl(T const& a, T const& b, T const& c, T const& d, T const& ar, T const& br) { - return sprout::math::quaternion( - +a * ar - b * br, - +a * br + b * ar, - +c * ar + d * br, - -c * br + d * ar - ); - } - } // namespace detail - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - operator*(sprout::complex const& lhs, sprout::math::quaternion const& rhs) { - return sprout::math::detail::mul_qc_impl( - lhs.R_component_1(), lhs.R_component_2(), lhs.R_component_3(), lhs.R_component_4(), - rhs.real(), rhs.imag() - ); - } - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - operator*(sprout::math::quaternion const& lhs, sprout::complex const& rhs) { - return sprout::math::detail::mul_qc_impl( - rhs.R_component_1(), rhs.R_component_2(), rhs.R_component_3(), rhs.R_component_4(), - lhs.real(), lhs.imag() - ); - } - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - mul_qq_impl(T const& a, T const& b, T const& c, T const& d, T const& ar, T const& br, T const& cr, T const& dr) { - return sprout::math::quaternion( - +a * ar - b * br - c * cr - d * dr, - +a * br + b * ar + c * dr - d * cr, - +a * cr - b * dr + c * ar + d * br, - +a * dr + b * cr - c * br + d * ar - ); - } - } // namespace detail - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - operator*(sprout::math::quaternion const& lhs, sprout::math::quaternion const& rhs) { - return sprout::math::detail::mul_qq_impl( - lhs.R_component_1(), lhs.R_component_2(), lhs.R_component_3(), lhs.R_component_4(), - rhs.R_component_1(), rhs.R_component_2(), rhs.R_component_3(), rhs.R_component_4() - ); - } - // - // operator/ - // - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - operator/(T const& lhs, sprout::math::quaternion const& rhs) { - return sprout::math::quaternion( - lhs / rhs.R_component_1(), - lhs / rhs.R_component_2(), - lhs / rhs.R_component_3(), - lhs / rhs.R_component_4() - ); - } - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - operator/(sprout::math::quaternion const& lhs, T const& rhs) { - return sprout::math::quaternion( - lhs.R_component_1() / rhs, - lhs.R_component_2() / rhs, - lhs.R_component_3() / rhs, - lhs.R_component_4() / rhs - ); - } - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - div_qq_impl_4(sprout::array const& tt) { - return sprout::math::quaternion( - tt[0], tt[1], tt[2], tt[3] - ); - } - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - div_qq_impl_3(sprout::array const& tr, T const& mixam, sprout::array const& tt) { - return sprout::math::detail::div_qq_impl_3( - sprout::math::detail::mul(tt, mixam / sprout::math::detail::sum(tr)) - ); - } - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - div_qq_impl_2(T const& a, T const& b, T const& c, T const& d, sprout::array const& tr, T const& mixam) { - return sprout::math::detail::div_qq_impl_3( - sprout::math::detail::mul(tr, tr), mixam, - sprout::array{{ - +a * tr[0] + b * tr[1] + c * tr[2] + d * tr[3], - -a * tr[1] + b * tr[0] - c * tr[3] + d * tr[2], - -a * tr[2] + b * tr[3] + c * tr[0] - d * tr[1], - -a * tr[3] - b * tr[2] + c * tr[1] + d * tr[0] - }} - ); - } - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - div_qq_impl_1(T const& a, T const& b, T const& c, T const& d, sprout::array const& tr, T const& mixam) { - return sprout::math::detail::div_qq_impl_2( - a, b, c, d, sprout::math::detail::mul(tr, mixam), mixam - ); - } - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - div_qq_impl(T const& a, T const& b, T const& c, T const& d, sprout::array const& tr) { - return sprout::math::detail::div_qq_impl_1( - a, b, c, d, tr, - static_cast(1) / sprout::math::detail::abs_max(tr) - ); - } - } // namespace detail - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - operator/(sprout::complex const& lhs, sprout::math::quaternion const& rhs) { - return sprout::math::detail::div_qq_impl( - lhs.real(), lhs.imag(), static_cast(0), static_cast(0), - sprout::array{{rhs.R_component_1(), rhs.R_component_2(), rhs.R_component_3(), rhs.R_component_4()}} - ); - } - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - operator/(sprout::math::quaternion const& lhs, sprout::complex const& rhs) { - return sprout::math::detail::div_qq_impl( - lhs.R_component_1(), lhs.R_component_2(), lhs.R_component_3(), lhs.R_component_4(), - sprout::array{{rhs.real(), rhs.imag(), static_cast(0), static_cast(0)}} - ); - } - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - operator/(sprout::math::quaternion const& lhs, sprout::math::quaternion const& rhs) { - return sprout::math::detail::div_qq_impl( - lhs.R_component_1(), lhs.R_component_2(), lhs.R_component_3(), lhs.R_component_4(), - sprout::array{{rhs.R_component_1(), rhs.R_component_2(), rhs.R_component_3(), rhs.R_component_4()}} - ); - } - - // - // operator+ - // operator- - // - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - operator+(sprout::math::quaternion const& q) { - return q; - } - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - operator-(sprout::math::quaternion const& q) { - return sprout::math::quaternion(-q.R_component_1(), -q.R_component_2(), -q.R_component_3(), -q.R_component_4()); - } - - // - // operator== - // operator!= - // - template - inline SPROUT_CONSTEXPR bool - operator==(T const& lhs, sprout::math::quaternion const& rhs) { - return rhs.R_component_1() == lhs - && rhs.R_component_2() == static_cast(0) - && rhs.R_component_3() == static_cast(0) - && rhs.R_component_4() == static_cast(0) - ; - } - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::math::quaternion const& lhs, T const& rhs) { - return lhs.R_component_1() == rhs - && lhs.R_component_2() == static_cast(0) - && lhs.R_component_3() == static_cast(0) - && lhs.R_component_4() == static_cast(0) - ; - } - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::complex const& lhs, sprout::math::quaternion const& rhs) { - return rhs.R_component_1() == lhs.real() - && rhs.R_component_2() == lhs.imag() - && rhs.R_component_3() == static_cast(0) - && rhs.R_component_4() == static_cast(0) - ; - } - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::math::quaternion const& lhs, sprout::complex const& rhs) { - return lhs.R_component_1() == rhs.real() - && lhs.R_component_2() == rhs.imag() - && lhs.R_component_3() == static_cast(0) - && lhs.R_component_4() == static_cast(0) - ; - } - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::math::quaternion const& lhs, sprout::math::quaternion const& rhs) { - return rhs.R_component_1() == lhs.R_component_1() - && rhs.R_component_2() == lhs.R_component_2() - && rhs.R_component_3() == lhs.R_component_3() - && rhs.R_component_4() == lhs.R_component_4() - ; - } - -#define SPROUT_QUATERNION_NOT_EQUAL_GENERATOR \ - { \ - return !(lhs == rhs); \ - } - - template - inline SPROUT_CONSTEXPR bool - operator!=(T const& lhs, sprout::math::quaternion const& rhs) - SPROUT_QUATERNION_NOT_EQUAL_GENERATOR - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::math::quaternion const& lhs, T const& rhs) - SPROUT_QUATERNION_NOT_EQUAL_GENERATOR - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::complex const& lhs, sprout::math::quaternion const& rhs) - SPROUT_QUATERNION_NOT_EQUAL_GENERATOR - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::math::quaternion const& lhs, sprout::complex const& rhs) - SPROUT_QUATERNION_NOT_EQUAL_GENERATOR - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::math::quaternion const& lhs, sprout::math::quaternion const& rhs) - SPROUT_QUATERNION_NOT_EQUAL_GENERATOR - -#undef SPROUT_QUATERNION_NOT_EQUAL_GENERATOR - - } // namespace math -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_QUATERNION_ARITHMETIC_OPERATORS_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/conj.hpp b/dsp/lib/sprout/sprout/math/quaternion/conj.hpp deleted file mode 100644 index 662068b..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/conj.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_CONJ_HPP -#define SPROUT_MATH_QUATERNION_CONJ_HPP - -#include -#include - -namespace sprout { - namespace math { - // - // conj - // - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - conj(sprout::math::quaternion const& q) { - return sprout::math::quaternion( - +q.R_component_1(), - -q.R_component_2(), - -q.R_component_3(), - -q.R_component_4() - ); - } - } // namespace math - - using sprout::math::conj; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_QUATERNION_CONJ_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/container.hpp b/dsp/lib/sprout/sprout/math/quaternion/container.hpp deleted file mode 100644 index bde84d7..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/container.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_CONTAINER_HPP -#define SPROUT_MATH_QUATERNION_CONTAINER_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // container_construct_traits - // - template - struct container_construct_traits > { - public: - typedef sprout::math::quaternion copied_type; - public: - template - static SPROUT_CONSTEXPR copied_type - deep_copy(Cont&& cont) { - return SPROUT_FORWARD(Cont, cont); - } - template - static SPROUT_CONSTEXPR copied_type - make(Args&&... args) { - return copied_type(SPROUT_FORWARD(Args, args)...); - } - template - static SPROUT_CONSTEXPR copied_type - remake(Cont&&, typename sprout::container_traits >::difference_type, Args&&... args) { - return copied_type(SPROUT_FORWARD(Args, args)...); - } - }; - - // - // container_transform_traits - // - template - struct container_transform_traits > { - public: - template - struct rebind_type { - public: - typedef sprout::math::quaternion type; - }; - }; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_QUATERNION_CONTAINER_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/cos.hpp b/dsp/lib/sprout/sprout/math/quaternion/cos.hpp deleted file mode 100644 index 08194e2..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/cos.hpp +++ /dev/null @@ -1,60 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_COS_HPP -#define SPROUT_MATH_QUATERNION_COS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - // - // cos - // - // !!! -// namespace detail { -// template -// inline SPROUT_CONSTEXPR sprout::math::quaternion -// cos_impl_1(sprout::math::quaternion const& q, T const& z, T const& w) { -// return sprout::math::quaternion( -// sprout::math::cos(sprout::math::real(q)) * sprout::math::cosh(z), -// w * q.R_component_2(), -// w * q.R_component_3(), -// w * q.R_component_4() -// ); -// } -// template -// inline SPROUT_CONSTEXPR sprout::math::quaternion -// cos_impl(sprout::math::quaternion const& q, T const& z) { -// return sprout::math::detail::cos_impl_1( -// q, z, -// -sprout::math::sin(sprout::math::real(q)) * sprout::math::sinhc_pi(z) -// ); -// } -// } // namespace detail -// template -// inline SPROUT_CONSTEXPR sprout::math::quaternion -// cos(sprout::math::quaternion const& q) { -// return sprout::math::detail::cos_impl( -// q, -// sprout::math::abs(sprout::math::unreal(q)) -// ); -// } - } // namespace math - -// using sprout::math::cos; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_QUATERNION_COS_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/cosh.hpp b/dsp/lib/sprout/sprout/math/quaternion/cosh.hpp deleted file mode 100644 index 52c9f0b..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/cosh.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_COSH_HPP -#define SPROUT_MATH_QUATERNION_COSH_HPP - -#include -#include -#include - -namespace sprout { - namespace math { - // - // cosh - // - // !!! -// template -// inline SPROUT_CONSTEXPR sprout::math::quaternion -// cosh(sprout::math::quaternion const& q) { -// return (sprout::math::exp(+q) + sprout::math::exp(-q)) / static_cast(2); -// } - } // namespace math - -// using sprout::math::cosh; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_QUATERNION_COSH_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/creations.hpp b/dsp/lib/sprout/sprout/math/quaternion/creations.hpp deleted file mode 100644 index 8b726dd..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/creations.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_CREATIONS_HPP -#define SPROUT_MATH_QUATERNION_CREATIONS_HPP - -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_MATH_QUATERNION_CREATIONS_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/cylindrical.hpp b/dsp/lib/sprout/sprout/math/quaternion/cylindrical.hpp deleted file mode 100644 index f1596ed..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/cylindrical.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_CYLINDRICAL_HPP -#define SPROUT_MATH_QUATERNION_CYLINDRICAL_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace math { - // - // cylindrical - // - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - cylindrical(T const& r, T const& angle, T const& h1, T const& h2) { - return sprout::math::quaternion( - r * sprout::math::cos(angle), - r * sprout::math::sin(angle), - h1, - h2 - ); - } - } // namespace math - - using sprout::math::cylindrical; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_QUATERNION_CYLINDRICAL_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/cylindrospherical.hpp b/dsp/lib/sprout/sprout/math/quaternion/cylindrospherical.hpp deleted file mode 100644 index e79b025..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/cylindrospherical.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_CYLINDROSPERICAL_HPP -#define SPROUT_MATH_QUATERNION_CYLINDROSPERICAL_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace math { - // - // cylindrospherical - // - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - cylindrospherical(T const& t, T const& radius, T const& longitude, T const& latitude) { - return sprout::math::quaternion( - t, - radius * sprout::math::cos(longitude) * sprout::math::cos(latitude), - radius * sprout::math::sin(longitude) * sprout::math::cos(latitude), - radius * sprout::math::sin(latitude) - ); - } - } // namespace math - - using sprout::math::cylindrospherical; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_QUATERNION_CYLINDROSPERICAL_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/detail/abs_max.hpp b/dsp/lib/sprout/sprout/math/quaternion/detail/abs_max.hpp deleted file mode 100644 index 90c8a39..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/detail/abs_max.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_DETAIL_ABS_MAX_HPP -#define SPROUT_MATH_QUATERNION_DETAIL_ABS_MAX_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { - template - class abs_less { - public: - SPROUT_CONSTEXPR T - operator()(T const& lhs, T const& rhs) const { - return sprout::math::abs(lhs) < sprout::math::abs(rhs); - } - }; - - template - SPROUT_CONSTEXPR T - abs_max(sprout::array const& c) { - return sprout::math::abs(*sprout::range::max_element(c, sprout::math::detail::abs_less())); - } - } // namespace detail - } // namespace math -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_QUATERNION_DETAIL_ABS_MAX_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/detail/mul.hpp b/dsp/lib/sprout/sprout/math/quaternion/detail/mul.hpp deleted file mode 100644 index 4d2461b..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/detail/mul.hpp +++ /dev/null @@ -1,57 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_DETAIL_MUL_HPP -#define SPROUT_MATH_QUATERNION_DETAIL_MUL_HPP - -#include -#include - -namespace sprout { - namespace math { - namespace detail { - template - SPROUT_CONSTEXPR sprout::array - mul(sprout::array const& l, T const& r) { - return sprout::array{{ - l[0] * r, - l[1] * r, - }}; - } - template - SPROUT_CONSTEXPR sprout::array - mul(sprout::array const& l, sprout::array const& r) { - return sprout::array{{ - l[0] * r[0], - l[1] * r[1], - }}; - } - template - SPROUT_CONSTEXPR sprout::array - mul(sprout::array const& l, T const& r) { - return sprout::array{{ - l[0] * r, - l[1] * r, - l[2] * r, - l[3] * r - }}; - } - template - SPROUT_CONSTEXPR sprout::array - mul(sprout::array const& l, sprout::array const& r) { - return sprout::array{{ - l[0] * r[0], - l[1] * r[1], - l[2] * r[2], - l[3] * r[3] - }}; - } - } // namespace detail - } // namespace math -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_QUATERNION_DETAIL_MUL_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/detail/sum.hpp b/dsp/lib/sprout/sprout/math/quaternion/detail/sum.hpp deleted file mode 100644 index e2ce6f7..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/detail/sum.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_DETAIL_SUM_HPP -#define SPROUT_MATH_QUATERNION_DETAIL_SUM_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { - template - class abs_plus { - public: - SPROUT_CONSTEXPR T - operator()(T const& lhs, T const& rhs) const { - return sprout::math::abs(lhs) + sprout::math::abs(rhs); - } - }; - - template - SPROUT_CONSTEXPR T - sum(sprout::array const& c) { - return sprout::range::accumulate(c, static_cast(0)); - } - template - SPROUT_CONSTEXPR T - abs_sum(sprout::array const& c) { - return sprout::range::accumulate(c, static_cast(0), sprout::math::detail::abs_plus()); - } - } // namespace detail - } // namespace math -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_QUATERNION_DETAIL_SUM_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/exp.hpp b/dsp/lib/sprout/sprout/math/quaternion/exp.hpp deleted file mode 100644 index 08ba9dc..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/exp.hpp +++ /dev/null @@ -1,58 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_EXP_HPP -#define SPROUT_MATH_QUATERNION_EXP_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - // - // exp - // - // !!! -// namespace detail { -// template -// inline SPROUT_CONSTEXPR sprout::math::quaternion -// exp_impl_1(sprout::math::quaternion const& q, T const& z, T const& w) { -// return sprout::math::exp(sprout::math::real(q)) * sprout::math::quaternion( -// sprout::math::cos(z), -// w * q.R_component_2(), -// w * q.R_component_3(), -// w * q.R_component_4() -// ); -// } -// template -// inline SPROUT_CONSTEXPR sprout::math::quaternion -// exp_impl(sprout::math::quaternion const& q, T const& z) { -// return sprout::math::detail::exp_impl_1( -// q, z, -// sprout::math::sinc_pi(z) -// ); -// } -// } // namespace detail -// inline SPROUT_CONSTEXPR sprout::math::quaternion -// exp(sprout::math::quaternion const& q) { -// return sprout::math::detail::exp_impl( -// q, -// sprout::math::abs(sprout::math::unreal(q)) -// ); -// } - } // namespace math - -// using sprout::math::exp; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_QUATERNION_EXP_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/hash.hpp b/dsp/lib/sprout/sprout/math/quaternion/hash.hpp deleted file mode 100644 index b827102..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/hash.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_HASH_HPP -#define SPROUT_MATH_QUATERNION_HASH_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - // - // hash_value - // - template - inline SPROUT_CONSTEXPR std::size_t - hash_value(sprout::math::quaternion const& v) { - return sprout::hash_values(v[0], v[1], v[2], v[3]); - } - } // namespace math -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // hash - // - template - struct hash > - : public sprout::hash > - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -#endif // #ifndef SPROUT_MATH_QUATERNION_HASH_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/l1.hpp b/dsp/lib/sprout/sprout/math/quaternion/l1.hpp deleted file mode 100644 index aa9bff8..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/l1.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_SUP_HPP -#define SPROUT_MATH_QUATERNION_SUP_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace math { - // - // l1 - // - template - inline SPROUT_CONSTEXPR T - l1(sprout::math::quaternion const& q) { - return sprout::math::detail::abs_sum( - sprout::array{{ - q.R_component_1(), - q.R_component_2(), - q.R_component_3(), - q.R_component_4() - }} - ); - } - } // namespace math - - using sprout::math::l1; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_QUATERNION_SUP_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/literals.hpp b/dsp/lib/sprout/sprout/math/quaternion/literals.hpp deleted file mode 100644 index c39569c..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/literals.hpp +++ /dev/null @@ -1,124 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_LITERALS_HPP -#define SPROUT_MATH_QUATERNION_LITERALS_HPP - -#include -#include -#include -#include - -#if SPROUT_USE_USER_DEFINED_LITERALS - -namespace sprout { - namespace literals { - namespace quaternion { - using sprout::literals::complex::operator"" _i; - using sprout::literals::complex::operator"" _if; - using sprout::literals::complex::operator"" _iF; - using sprout::literals::complex::operator"" _il; - using sprout::literals::complex::operator"" _iL; - - // - // _j - // - inline SPROUT_CONSTEXPR sprout::math::quaternion - operator"" _j(long double x) { - return sprout::math::quaternion(0, 0, x); - } - - // - // _jf - // _jF - // - inline SPROUT_CONSTEXPR sprout::math::quaternion - operator"" _jf(long double x) { - return sprout::math::quaternion(0, 0, static_cast(x)); - } - inline SPROUT_CONSTEXPR sprout::math::quaternion - operator"" _jF(long double x) { - return sprout::math::quaternion(0, 0, static_cast(x)); - } - - // - // _jl - // _jL - // - inline SPROUT_CONSTEXPR sprout::math::quaternion - operator"" _jl(long double x) { - return sprout::math::quaternion(0, 0, x); - } - inline SPROUT_CONSTEXPR sprout::math::quaternion - operator"" _jL(long double x) { - return sprout::math::quaternion(0, 0, x); - } - - // - // _k - // - inline SPROUT_CONSTEXPR sprout::math::quaternion - operator"" _k(long double x) { - return sprout::math::quaternion(0, 0, 0, x); - } - - // - // _kf - // _kF - // - inline SPROUT_CONSTEXPR sprout::math::quaternion - operator"" _kf(long double x) { - return sprout::math::quaternion(0, 0, 0, static_cast(x)); - } - inline SPROUT_CONSTEXPR sprout::math::quaternion - operator"" _kF(long double x) { - return sprout::math::quaternion(0, 0, 0, static_cast(x)); - } - - // - // _kl - // _kL - // - inline SPROUT_CONSTEXPR sprout::math::quaternion - operator"" _kl(long double x) { - return sprout::math::quaternion(0, 0, 0, x); - } - inline SPROUT_CONSTEXPR sprout::math::quaternion - operator"" _kL(long double x) { - return sprout::math::quaternion(0, 0, 0, x); - } - } // namespace quaternion - - using sprout::literals::quaternion::operator"" _j; - using sprout::literals::quaternion::operator"" _jf; - using sprout::literals::quaternion::operator"" _jF; - using sprout::literals::quaternion::operator"" _jl; - using sprout::literals::quaternion::operator"" _jL; - - using sprout::literals::quaternion::operator"" _k; - using sprout::literals::quaternion::operator"" _kf; - using sprout::literals::quaternion::operator"" _kF; - using sprout::literals::quaternion::operator"" _kl; - using sprout::literals::quaternion::operator"" _kL; - } // namespace literals - - using sprout::literals::quaternion::operator"" _j; - using sprout::literals::quaternion::operator"" _jf; - using sprout::literals::quaternion::operator"" _jF; - using sprout::literals::quaternion::operator"" _jl; - using sprout::literals::quaternion::operator"" _jL; - - using sprout::literals::quaternion::operator"" _k; - using sprout::literals::quaternion::operator"" _kf; - using sprout::literals::quaternion::operator"" _kF; - using sprout::literals::quaternion::operator"" _kl; - using sprout::literals::quaternion::operator"" _kL; -} // namespace sprout - -#endif // #if SPROUT_USE_USER_DEFINED_LITERALS - -#endif // #ifndef SPROUT_MATH_QUATERNION_LITERALS_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/multipolar.hpp b/dsp/lib/sprout/sprout/math/quaternion/multipolar.hpp deleted file mode 100644 index 84dac8b..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/multipolar.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_MULTIPOLAR_HPP -#define SPROUT_MATH_QUATERNION_MULTIPOLAR_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace math { - // - // multipolar - // - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - multipolar(T const& rho1, T const& theta1, T const& rho2, T const& theta2) { - return sprout::math::quaternion( - rho1 * sprout::math::cos(theta1), - rho1 * sprout::math::sin(theta1), - rho2 * sprout::math::cos(theta2), - rho2 * sprout::math::sin(theta2) - ); - } - } // namespace math - - using sprout::math::multipolar; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_QUATERNION_MULTIPOLAR_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/norm.hpp b/dsp/lib/sprout/sprout/math/quaternion/norm.hpp deleted file mode 100644 index fda13d5..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/norm.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_NORM_HPP -#define SPROUT_MATH_QUATERNION_NORM_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - // - // norm - // - template - inline SPROUT_CONSTEXPR T - norm(sprout::math::quaternion const& q) { - return sprout::math::real(q * sprout::math::conj(q)); - } - } // namespace math - - using sprout::math::norm; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_QUATERNION_NORM_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/operators.hpp b/dsp/lib/sprout/sprout/math/quaternion/operators.hpp deleted file mode 100644 index d746065..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/operators.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_OPERATORS_HPP -#define SPROUT_MATH_QUATERNION_OPERATORS_HPP - -#include -#include - -#endif // #ifndef SPROUT_MATH_QUATERNION_OPERATORS_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/pow.hpp b/dsp/lib/sprout/sprout/math/quaternion/pow.hpp deleted file mode 100644 index f84eb36..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/pow.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_POW_HPP -#define SPROUT_MATH_QUATERNION_POW_HPP - -#include -#include - -namespace sprout { - namespace math { - // - // pow - // - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - pow_q_impl(sprout::math::quaternion const& q, int n, int m, sprout::math::quaternion const& result) { - return n != m << 1 ? result * result * q - : result * result - ; - } - } // namespace detail - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - pow(sprout::math::quaternion const& q, int n) { - return n > 1 ? sprout::math::detail::pow_q_impl( - q, n, n >> 1, sprout::math::pow(q, n >> 1) - ) - : n == 1 ? q - : n == 0 ? sprout::math::quaternion(static_cast(1)) - : sprout::math::pow(sprout::math::quaternion(static_cast(1)) / q, -n) - ; - } - } // namespace math - - using sprout::math::pow; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_QUATERNION_POW_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/quaternion.hpp b/dsp/lib/sprout/sprout/math/quaternion/quaternion.hpp deleted file mode 100644 index db8afa7..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/quaternion.hpp +++ /dev/null @@ -1,770 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_QUATERNION_HPP -#define SPROUT_MATH_QUATERNION_QUATERNION_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - -#define SPROUT_QUATERNION_ACCESSOR_GENERATOR(type) \ - SPROUT_CONSTEXPR type real() const { \ - return (elems_[0]); \ - } \ - SPROUT_CONSTEXPR quaternion unreal() const { \ - return (quaternion(static_cast(0), elems_[1], elems_[2], elems_[3])); \ - } \ - SPROUT_CONSTEXPR type R_component_1() const { \ - return (elems_[0]); \ - } \ - SPROUT_CONSTEXPR type R_component_2() const { \ - return (elems_[1]); \ - } \ - SPROUT_CONSTEXPR type R_component_3() const { \ - return (elems_[2]); \ - } \ - SPROUT_CONSTEXPR type R_component_4() const { \ - return (elems_[3]); \ - } \ - SPROUT_CONSTEXPR sprout::complex C_component_1() const { \ - return sprout::complex(elems_[0], elems_[1]); \ - } \ - SPROUT_CONSTEXPR sprout::complex C_component_2() const { \ - return sprout::complex(elems_[2], elems_[3]); \ - } - -#define SPROUT_QUATERNION_MEMBER_ASSIGNMENT_GENERATOR(type) \ - template \ - SPROUT_CXX14_CONSTEXPR quaternion& operator=(quaternion const& a_affecter) { \ - elems_[0] = static_cast(a_affecter.R_component_1()); \ - elems_[1] = static_cast(a_affecter.R_component_2()); \ - elems_[2] = static_cast(a_affecter.R_component_3()); \ - elems_[3] = static_cast(a_affecter.R_component_4()); \ - return *this; \ - } \ - SPROUT_CXX14_CONSTEXPR quaternion& operator=(quaternion const& a_affecter) { \ - elems_[0] = a_affecter.elems_[0]; \ - elems_[1] = a_affecter.elems_[1]; \ - elems_[2] = a_affecter.elems_[2]; \ - elems_[3] = a_affecter.elems_[3]; \ - return *this; \ - } \ - SPROUT_CXX14_CONSTEXPR quaternion& operator=(type const& a_affecter) { \ - elems_[0] = a_affecter; \ - elems_[1] = elems_[2] = elems_[3] = static_cast(0); \ - return *this; \ - } \ - SPROUT_CXX14_CONSTEXPR quaternion& operator=(sprout::complex const& a_affecter) { \ - elems_[0] = a_affecter.real(); \ - elems_[1] = a_affecter.imag(); \ - elems_[2] = elems_[3] = static_cast(0); \ - return *this; \ - } - - // - // quaternion - // - template - class quaternion - : public sprout::detail::inherit_static_size > - { - private: - typedef sprout::array array_type; - public: - typedef T value_type; - typedef typename array_type::iterator iterator; - typedef typename array_type::const_iterator const_iterator; - typedef typename array_type::reference reference; - typedef typename array_type::const_reference const_reference; - typedef typename array_type::size_type size_type; - typedef typename array_type::pointer pointer; - typedef typename array_type::const_pointer const_pointer; - typedef typename array_type::reverse_iterator reverse_iterator; - typedef typename array_type::const_reverse_iterator const_reverse_iterator; - private: - array_type elems_; - public: - explicit SPROUT_CONSTEXPR quaternion( - T const& requested_a = T(), - T const& requested_b = T(), - T const& requested_c = T(), - T const& requested_d = T() - ) - : elems_{{requested_a, requested_b, requested_c, requested_d}} - {} - explicit SPROUT_CONSTEXPR quaternion( - sprout::complex const& z0, - sprout::complex const& z1 = sprout::complex() - ) - : elems_{{z0.real(), z0.imag(), z1.real(), z1.imag()}} - {} - template - explicit SPROUT_CONSTEXPR quaternion(quaternion const& a_recopier) - : elems_{{ - static_cast(a_recopier.R_component_1()), - static_cast(a_recopier.R_component_2()), - static_cast(a_recopier.R_component_3()), - static_cast(a_recopier.R_component_4()) - }} - {} - SPROUT_QUATERNION_ACCESSOR_GENERATOR(T) - SPROUT_QUATERNION_MEMBER_ASSIGNMENT_GENERATOR(T) - SPROUT_CXX14_CONSTEXPR quaternion& operator+=(T const& rhs) { - T at = elems_[0] + rhs; - elems_[0] = at; - return *this; - } - SPROUT_CXX14_CONSTEXPR quaternion& operator+=(sprout::complex const& rhs) { - T at = elems_[0] + rhs.real(); - T bt = elems_[1] + rhs.imag(); - elems_[0] = at; - elems_[1] = bt; - return *this; - } - template - SPROUT_CXX14_CONSTEXPR quaternion& operator+=(quaternion const& rhs) { - T at = elems_[0] + static_cast(rhs.R_component_1()); - T bt = elems_[1] + static_cast(rhs.R_component_2()); - T ct = elems_[2] + static_cast(rhs.R_component_3()); - T dt = elems_[3] + static_cast(rhs.R_component_4()); - elems_[0] = at; - elems_[1] = bt; - elems_[2] = ct; - elems_[3] = dt; - return *this; - } - SPROUT_CXX14_CONSTEXPR quaternion& operator-=(T const& rhs) { - T at = elems_[0] - rhs; - elems_[0] = at; - return *this; - } - SPROUT_CXX14_CONSTEXPR quaternion& operator-=(sprout::complex const& rhs) { - T at = elems_[0] - rhs.real(); - T bt = elems_[1] - rhs.imag(); - elems_[0] = at; - elems_[1] = bt; - return *this; - } - template - SPROUT_CXX14_CONSTEXPR quaternion& operator-=(quaternion const& rhs) { - T at = elems_[0] - static_cast(rhs.R_component_1()); - T bt = elems_[1] - static_cast(rhs.R_component_2()); - T ct = elems_[2] - static_cast(rhs.R_component_3()); - T dt = elems_[3] - static_cast(rhs.R_component_4()); - elems_[0] = at; - elems_[1] = bt; - elems_[2] = ct; - elems_[3] = dt; - return *this; - } - SPROUT_CXX14_CONSTEXPR quaternion& operator*=(T const& rhs) { - T at = elems_[0] * rhs; - T bt = elems_[1] * rhs; - T ct = elems_[2] * rhs; - T dt = elems_[3] * rhs; - elems_[0] = at; - elems_[1] = bt; - elems_[2] = ct; - elems_[3] = dt; - return *this; - } - SPROUT_CXX14_CONSTEXPR quaternion& operator*=(sprout::complex const& rhs) { - T ar = rhs.real(); - T br = rhs.imag(); - T at = +elems_[0] * ar - elems_[1] * br; - T bt = +elems_[0] * br + elems_[1] * ar; - T ct = +elems_[2] * ar + elems_[3] * br; - T dt = -elems_[2] * br + elems_[3] * ar; - elems_[0] = at; - elems_[1] = bt; - elems_[2] = ct; - elems_[3] = dt; - return *this; - } - template - SPROUT_CXX14_CONSTEXPR quaternion& operator*=(quaternion const& rhs) { - T ar = static_cast(rhs.R_component_1()); - T br = static_cast(rhs.R_component_2()); - T cr = static_cast(rhs.R_component_3()); - T dr = static_cast(rhs.R_component_4()); - T at = +elems_[0] * ar - elems_[1] * br - elems_[2] * cr - elems_[3] * dr; - T bt = +elems_[0] * br + elems_[1] * ar + elems_[2] * dr - elems_[3] * cr; - T ct = +elems_[0] * cr - elems_[1] * dr + elems_[2] * ar + elems_[3] * br; - T dt = +elems_[0] * dr + elems_[1] * cr - elems_[2] * br + elems_[3] * ar; - elems_[0] = at; - elems_[1] = bt; - elems_[2] = ct; - elems_[3] = dt; - return *this; - } - SPROUT_CXX14_CONSTEXPR quaternion& operator/=(T const& rhs) { - T at = elems_[0] / rhs; - T bt = elems_[1] / rhs; - T ct = elems_[2] / rhs; - T dt = elems_[3] / rhs; - elems_[0] = at; - elems_[1] = bt; - elems_[2] = ct; - elems_[3] = dt; - return *this; - } - SPROUT_CXX14_CONSTEXPR quaternion& operator/=(sprout::complex const& rhs) { - T ar = rhs.real(); - T br = rhs.imag(); - T denominator = ar * ar + br * br; - T at =(+elems_[0] * ar + elems_[1] * br) / denominator; - T bt =(-elems_[0] * br + elems_[1] * ar) / denominator; - T ct =(+elems_[2] * ar - elems_[3] * br) / denominator; - T dt =(+elems_[2] * br + elems_[3] * ar) / denominator; - elems_[0] = at; - elems_[1] = bt; - elems_[2] = ct; - elems_[3] = dt; - return *this; - } - template - SPROUT_CXX14_CONSTEXPR quaternion& operator/=(quaternion const& rhs) { - T ar = static_cast(rhs.R_component_1()); - T br = static_cast(rhs.R_component_2()); - T cr = static_cast(rhs.R_component_3()); - T dr = static_cast(rhs.R_component_4()); - T denominator = ar * ar + br * br + cr * cr + dr * dr; - T at =(+elems_[0] * ar + elems_[1] * br + elems_[2] * cr + elems_[3] * dr) / denominator; - T bt =(-elems_[0] * br + elems_[1] * ar - elems_[2] * dr + elems_[3] * cr) / denominator; - T ct =(-elems_[0] * cr + elems_[1] * dr + elems_[2] * ar - elems_[3] * br) / denominator; - T dt =(-elems_[0] * dr - elems_[1] * cr + elems_[2] * br + elems_[3] * ar) / denominator; - elems_[0] = at; - elems_[1] = bt; - elems_[2] = ct; - elems_[3] = dt; - return *this; - } - // iterators: - SPROUT_CXX14_CONSTEXPR iterator begin() SPROUT_NOEXCEPT { - return elems_.begin(); - } - SPROUT_CONSTEXPR const_iterator begin() const SPROUT_NOEXCEPT { - return elems_.begin(); - } - SPROUT_CXX14_CONSTEXPR iterator end() SPROUT_NOEXCEPT { - return elems_.end(); - } - SPROUT_CONSTEXPR const_iterator end() const SPROUT_NOEXCEPT { - return elems_.end(); - } - SPROUT_CXX14_CONSTEXPR reverse_iterator rbegin() SPROUT_NOEXCEPT { - return elems_.rbegin(); - } - SPROUT_CONSTEXPR const_reverse_iterator rbegin() const SPROUT_NOEXCEPT { - return elems_.rbegin(); - } - SPROUT_CXX14_CONSTEXPR reverse_iterator rend() SPROUT_NOEXCEPT { - return elems_.rend(); - } - SPROUT_CONSTEXPR const_reverse_iterator rend() const SPROUT_NOEXCEPT { - return elems_.rend(); - } - SPROUT_CONSTEXPR const_iterator cbegin() const SPROUT_NOEXCEPT { - return elems_.cbegin(); - } - SPROUT_CONSTEXPR const_iterator cend() const SPROUT_NOEXCEPT { - return elems_.cbegin(); - } - SPROUT_CONSTEXPR const_reverse_iterator crbegin() const SPROUT_NOEXCEPT { - return elems_.crbegin(); - } - SPROUT_CONSTEXPR const_reverse_iterator crend() const SPROUT_NOEXCEPT { - return elems_.crend(); - } - // capacity: - SPROUT_CONSTEXPR size_type size() const SPROUT_NOEXCEPT { - return elems_.size(); - } - SPROUT_CONSTEXPR size_type max_size() const SPROUT_NOEXCEPT { - return elems_.max_size(); - } - SPROUT_CONSTEXPR bool empty() const SPROUT_NOEXCEPT { - return elems_.empty(); - } - // element access: - SPROUT_CXX14_CONSTEXPR reference operator[](size_type i) { - return elems_[i]; - } - SPROUT_CONSTEXPR const_reference operator[](size_type i) const { - return elems_[i]; - } - SPROUT_CXX14_CONSTEXPR reference at(size_type i) { - return elems_.at(i); - } - SPROUT_CONSTEXPR const_reference at(size_type i) const { - return elems_.at(i); - } - SPROUT_CXX14_CONSTEXPR reference front() { - return elems_.front(); - } - SPROUT_CONSTEXPR const_reference front() const { - return elems_.front(); - } - SPROUT_CXX14_CONSTEXPR reference back() { - return elems_.back(); - } - SPROUT_CONSTEXPR const_reference back() const { - return elems_.back(); - } - - SPROUT_CXX14_CONSTEXPR pointer data() SPROUT_NOEXCEPT { - return elems_.data(); - } - SPROUT_CONSTEXPR const_pointer data() const SPROUT_NOEXCEPT { - return elems_.data(); - } - SPROUT_CXX14_CONSTEXPR pointer c_array() SPROUT_NOEXCEPT { - return elems_.c_array(); - } - SPROUT_CONSTEXPR const_pointer c_array() const SPROUT_NOEXCEPT { - return elems_.c_array(); - } - }; - - template<> - class quaternion; - template<> - class quaternion; - template<> - class quaternion; - -#define SPROUT_QUATERNION_MEMBER_TYPE_DATA_GENERATOR(type) \ - private: \ - typedef sprout::array array_type; \ - public: \ - typedef type value_type; \ - typedef typename array_type::iterator iterator; \ - typedef typename array_type::const_iterator const_iterator; \ - typedef typename array_type::reference reference; \ - typedef typename array_type::const_reference const_reference; \ - typedef typename array_type::size_type size_type; \ - typedef typename array_type::pointer pointer; \ - typedef typename array_type::const_pointer const_pointer; \ - typedef typename array_type::reverse_iterator reverse_iterator; \ - typedef typename array_type::const_reverse_iterator const_reverse_iterator; \ - private: \ - array_type elems_; - -#define SPROUT_QUATERNION_CONSTRUCTOR_GENERATOR(type) \ - explicit SPROUT_CONSTEXPR quaternion( \ - type const& requested_a = static_cast(0), \ - type const& requested_b = static_cast(0), \ - type const& requested_c = static_cast(0), \ - type const& requested_d = static_cast(0) \ - ) \ - : elems_{{requested_a, requested_a, requested_c, requested_d}} \ - {} \ - explicit SPROUT_CONSTEXPR quaternion( \ - sprout::complex const& z0, \ - sprout::complex const& z1 = sprout::complex() \ - ) \ - : elems_{{z0.real(), z0.imag(), z1.real(), z1.imag()}} \ - {} - -#define SPROUT_QUATERNION_MEMBER_ADD_GENERATOR_1(type) \ - SPROUT_CXX14_CONSTEXPR quaternion& operator+=(type const& rhs) { \ - elems_[0] += rhs; \ - return *this; \ - } - -#define SPROUT_QUATERNION_MEMBER_ADD_GENERATOR_2(type) \ - SPROUT_CXX14_CONSTEXPR quaternion& operator+=(sprout::complex const& rhs) { \ - elems_[0] += rhs.real(); \ - elems_[1] += rhs.imag(); \ - return *this; \ - } - -#define SPROUT_QUATERNION_MEMBER_ADD_GENERATOR_3(type) \ - template \ - SPROUT_CXX14_CONSTEXPR quaternion& operator+=(quaternion const& rhs) { \ - elems_[0] += static_cast(rhs.R_component_1()); \ - elems_[1] += static_cast(rhs.R_component_2()); \ - elems_[2] += static_cast(rhs.R_component_3()); \ - elems_[3] += static_cast(rhs.R_component_4()); \ - return *this; \ - } - -#define SPROUT_QUATERNION_MEMBER_SUB_GENERATOR_1(type) \ - SPROUT_CXX14_CONSTEXPR quaternion& operator-=(type const& rhs) { \ - elems_[0] -= rhs; \ - return *this; \ - } - -#define SPROUT_QUATERNION_MEMBER_SUB_GENERATOR_2(type) \ - SPROUT_CXX14_CONSTEXPR quaternion& operator-=(sprout::complex const& rhs) { \ - elems_[0] -= rhs.real(); \ - elems_[1] -= rhs.imag(); \ - return *this; \ - } - -#define SPROUT_QUATERNION_MEMBER_SUB_GENERATOR_3(type) \ - template \ - SPROUT_CXX14_CONSTEXPR quaternion& operator-=(quaternion const& rhs) { \ - elems_[0] -= static_cast(rhs.R_component_1()); \ - elems_[1] -= static_cast(rhs.R_component_2()); \ - elems_[2] -= static_cast(rhs.R_component_3()); \ - elems_[3] -= static_cast(rhs.R_component_4()); \ - return *this; \ - } - -#define SPROUT_QUATERNION_MEMBER_MUL_GENERATOR_1(type) \ - SPROUT_CXX14_CONSTEXPR quaternion& operator*=(type const& rhs) { \ - elems_[0] *= rhs; \ - elems_[1] *= rhs; \ - elems_[2] *= rhs; \ - elems_[3] *= rhs; \ - return *this; \ - } - -#define SPROUT_QUATERNION_MEMBER_MUL_GENERATOR_2(type) \ - SPROUT_CXX14_CONSTEXPR quaternion& operator*=(sprout::complex const& rhs) { \ - type ar = rhs.real(); \ - type br = rhs.imag(); \ - type at = +elems_[0] * ar - elems_[1] * br; \ - type bt = +elems_[0] * br + elems_[1] * ar; \ - type ct = +elems_[2] * ar + elems_[3] * br; \ - type dt = -elems_[2] * br + elems_[3] * ar; \ - elems_[0] = at; \ - elems_[1] = bt; \ - elems_[2] = ct; \ - elems_[3] = dt; \ - return *this; \ - } - -#define SPROUT_QUATERNION_MEMBER_MUL_GENERATOR_3(type) \ - template \ - SPROUT_CXX14_CONSTEXPR quaternion& operator*=(quaternion const& rhs) { \ - type ar = static_cast(rhs.R_component_1()); \ - type br = static_cast(rhs.R_component_2()); \ - type cr = static_cast(rhs.R_component_3()); \ - type dr = static_cast(rhs.R_component_4()); \ - type at = +elems_[0] * ar - elems_[1] * br - elems_[2] * cr - elems_[3] * dr; \ - type bt = +elems_[0] * br + elems_[1] * ar + elems_[2] * dr - elems_[3] * cr; \ - type ct = +elems_[0] * cr - elems_[1] * dr + elems_[2] * ar + elems_[3] * br; \ - type dt = +elems_[0] * dr + elems_[1] * cr - elems_[2] * br + elems_[3] * ar; \ - elems_[0] = at; \ - elems_[1] = bt; \ - elems_[2] = ct; \ - elems_[3] = dt; \ - return *this; \ - } - -#define SPROUT_QUATERNION_MEMBER_DIV_GENERATOR_1(type) \ - SPROUT_CXX14_CONSTEXPR quaternion& operator/=(type const& rhs) { \ - elems_[0] /= rhs; \ - elems_[1] /= rhs; \ - elems_[2] /= rhs; \ - elems_[3] /= rhs; \ - return *this; \ - } - -#define SPROUT_QUATERNION_MEMBER_DIV_GENERATOR_2(type) \ - SPROUT_CXX14_CONSTEXPR quaternion& operator/=(sprout::complex const& rhs) { \ - sprout::array tr{{ \ - rhs.real(), \ - rhs.imag() \ - }}; \ - type mixam = static_cast(1) / sprout::math::detail::abs_max(tr); \ - tr = sprout::math::detail::mul(tr, mixam); \ - sprout::array tt{{ \ - +elems_[0] * tr[0] + elems_[1] * tr[1], \ - -elems_[0] * tr[1] + elems_[1] * tr[0], \ - +elems_[2] * tr[0] - elems_[3] * tr[1], \ - +elems_[2] * tr[1] + elems_[3] * tr[0] \ - }}; \ - tr = sprout::math::detail::mul(tr, tr); \ - tt = sprout::math::detail::mul(tt, mixam / sprout::math::detail::sum(tr)); \ - elems_[0] = tt[0]; \ - elems_[1] = tt[1]; \ - elems_[2] = tt[2]; \ - elems_[3] = tt[3]; \ - return *this; \ - } - -#define SPROUT_QUATERNION_MEMBER_DIV_GENERATOR_3(type) \ - template \ - SPROUT_CXX14_CONSTEXPR quaternion& operator/=(quaternion const& rhs) { \ - sprout::array tr{{ \ - static_cast(rhs.R_component_1()), \ - static_cast(rhs.R_component_2()), \ - static_cast(rhs.R_component_3()), \ - static_cast(rhs.R_component_4()) \ - }}; \ - type mixam = static_cast(1) / sprout::math::detail::abs_max(tr); \ - tr = sprout::math::detail::mul(tr, mixam); \ - sprout::array tt{{ \ - +elems_[0] * tr[0] + elems_[1] * tr[1] + elems_[2] * tr[2] + elems_[3] * tr[3], \ - -elems_[0] * tr[1] + elems_[1] * tr[0] - elems_[2] * tr[3] + elems_[3] * tr[2], \ - -elems_[0] * tr[2] + elems_[1] * tr[3] + elems_[2] * tr[0] - elems_[3] * tr[1], \ - -elems_[0] * tr[3] - elems_[1] * tr[2] + elems_[2] * tr[1] + elems_[3] * tr[0] \ - }}; \ - tr = sprout::math::detail::mul(tr, tr); \ - tt = sprout::math::detail::mul(tt, mixam / sprout::math::detail::sum(tr)); \ - elems_[0] = tt[0]; \ - elems_[1] = tt[1]; \ - elems_[2] = tt[2]; \ - elems_[3] = tt[3]; \ - return *this; \ - } - -#define SPROUT_QUATERNION_MEMBER_ADD_GENERATOR(type) \ - SPROUT_QUATERNION_MEMBER_ADD_GENERATOR_1(type) \ - SPROUT_QUATERNION_MEMBER_ADD_GENERATOR_2(type) \ - SPROUT_QUATERNION_MEMBER_ADD_GENERATOR_3(type) - -#define SPROUT_QUATERNION_MEMBER_SUB_GENERATOR(type) \ - SPROUT_QUATERNION_MEMBER_SUB_GENERATOR_1(type) \ - SPROUT_QUATERNION_MEMBER_SUB_GENERATOR_2(type) \ - SPROUT_QUATERNION_MEMBER_SUB_GENERATOR_3(type) - -#define SPROUT_QUATERNION_MEMBER_MUL_GENERATOR(type) \ - SPROUT_QUATERNION_MEMBER_MUL_GENERATOR_1(type) \ - SPROUT_QUATERNION_MEMBER_MUL_GENERATOR_2(type) \ - SPROUT_QUATERNION_MEMBER_MUL_GENERATOR_3(type) - -#define SPROUT_QUATERNION_MEMBER_DIV_GENERATOR(type) \ - SPROUT_QUATERNION_MEMBER_DIV_GENERATOR_1(type) \ - SPROUT_QUATERNION_MEMBER_DIV_GENERATOR_2(type) \ - SPROUT_QUATERNION_MEMBER_DIV_GENERATOR_3(type) - -#define SPROUT_QUATERNION_MEMBER_ALGEBRAIC_GENERATOR(type) \ - SPROUT_QUATERNION_MEMBER_ADD_GENERATOR(type) \ - SPROUT_QUATERNION_MEMBER_SUB_GENERATOR(type) \ - SPROUT_QUATERNION_MEMBER_MUL_GENERATOR(type) \ - SPROUT_QUATERNION_MEMBER_DIV_GENERATOR(type) - -#define SPROUT_QUATERNION_MEMBER_CONTAINER_GENERATOR(type) \ - SPROUT_CXX14_CONSTEXPR iterator begin() SPROUT_NOEXCEPT { \ - return elems_.begin(); \ - } \ - SPROUT_CONSTEXPR const_iterator begin() const SPROUT_NOEXCEPT { \ - return elems_.begin(); \ - } \ - SPROUT_CXX14_CONSTEXPR iterator end() SPROUT_NOEXCEPT { \ - return elems_.end(); \ - } \ - SPROUT_CONSTEXPR const_iterator end() const SPROUT_NOEXCEPT { \ - return elems_.end(); \ - } \ - SPROUT_CXX14_CONSTEXPR reverse_iterator rbegin() SPROUT_NOEXCEPT { \ - return elems_.rbegin(); \ - } \ - SPROUT_CONSTEXPR const_reverse_iterator rbegin() const SPROUT_NOEXCEPT { \ - return elems_.rbegin(); \ - } \ - SPROUT_CXX14_CONSTEXPR reverse_iterator rend() SPROUT_NOEXCEPT { \ - return elems_.rend(); \ - } \ - SPROUT_CONSTEXPR const_reverse_iterator rend() const SPROUT_NOEXCEPT { \ - return elems_.rend(); \ - } \ - SPROUT_CONSTEXPR const_iterator cbegin() const SPROUT_NOEXCEPT { \ - return elems_.cbegin(); \ - } \ - SPROUT_CONSTEXPR const_iterator cend() const SPROUT_NOEXCEPT { \ - return elems_.cbegin(); \ - } \ - SPROUT_CONSTEXPR const_reverse_iterator crbegin() const SPROUT_NOEXCEPT { \ - return elems_.crbegin(); \ - } \ - SPROUT_CONSTEXPR const_reverse_iterator crend() const SPROUT_NOEXCEPT { \ - return elems_.crend(); \ - } \ - \ - SPROUT_CONSTEXPR size_type size() const SPROUT_NOEXCEPT { \ - return elems_.size(); \ - } \ - SPROUT_CONSTEXPR size_type max_size() const SPROUT_NOEXCEPT { \ - return elems_.max_size(); \ - } \ - SPROUT_CONSTEXPR bool empty() const SPROUT_NOEXCEPT { \ - return elems_.empty(); \ - } \ - \ - SPROUT_CXX14_CONSTEXPR reference operator[](size_type i) { \ - return elems_[i]; \ - } \ - SPROUT_CONSTEXPR const_reference operator[](size_type i) const { \ - return elems_[i]; \ - } \ - SPROUT_CXX14_CONSTEXPR reference at(size_type i) { \ - return elems_.at(i); \ - } \ - SPROUT_CONSTEXPR const_reference at(size_type i) const { \ - return elems_.at(i); \ - } \ - SPROUT_CXX14_CONSTEXPR reference front() { \ - return elems_.front(); \ - } \ - SPROUT_CONSTEXPR const_reference front() const { \ - return elems_.front(); \ - } \ - SPROUT_CXX14_CONSTEXPR reference back() { \ - return elems_.back(); \ - } \ - SPROUT_CONSTEXPR const_reference back() const { \ - return elems_.back(); \ - } \ - \ - SPROUT_CXX14_CONSTEXPR pointer data() SPROUT_NOEXCEPT { \ - return elems_.data(); \ - } \ - SPROUT_CONSTEXPR const_pointer data() const SPROUT_NOEXCEPT { \ - return elems_.data(); \ - } \ - SPROUT_CXX14_CONSTEXPR pointer c_array() SPROUT_NOEXCEPT { \ - return elems_.c_array(); \ - } \ - SPROUT_CONSTEXPR const_pointer c_array() const SPROUT_NOEXCEPT { \ - return elems_.c_array(); \ - } - -#define SPROUT_QUATERNION_BASE_STATIC_SIZE_DECL(type) \ - public sprout::detail::inherit_static_size > - - - template<> - class quaternion - : SPROUT_QUATERNION_BASE_STATIC_SIZE_DECL(float) - { - public: - SPROUT_QUATERNION_MEMBER_TYPE_DATA_GENERATOR(float) - public: - SPROUT_QUATERNION_CONSTRUCTOR_GENERATOR(float) - explicit SPROUT_CONSTEXPR quaternion(quaternion const& a_recopier); - explicit SPROUT_CONSTEXPR quaternion(quaternion const& a_recopier); - SPROUT_QUATERNION_ACCESSOR_GENERATOR(float) - SPROUT_QUATERNION_MEMBER_ASSIGNMENT_GENERATOR(float) - SPROUT_QUATERNION_MEMBER_ALGEBRAIC_GENERATOR(float) - SPROUT_QUATERNION_MEMBER_CONTAINER_GENERATOR(float) - }; - - template<> - class quaternion - : SPROUT_QUATERNION_BASE_STATIC_SIZE_DECL(double) - { - public: - SPROUT_QUATERNION_MEMBER_TYPE_DATA_GENERATOR(double) - public: - SPROUT_QUATERNION_CONSTRUCTOR_GENERATOR(double) - explicit SPROUT_CONSTEXPR quaternion(quaternion const& a_recopier); - explicit SPROUT_CONSTEXPR quaternion(quaternion const& a_recopier); - SPROUT_QUATERNION_ACCESSOR_GENERATOR(double) - SPROUT_QUATERNION_MEMBER_ASSIGNMENT_GENERATOR(double) - SPROUT_QUATERNION_MEMBER_ALGEBRAIC_GENERATOR(double) - SPROUT_QUATERNION_MEMBER_CONTAINER_GENERATOR(double) - }; - - template<> - class quaternion - : SPROUT_QUATERNION_BASE_STATIC_SIZE_DECL(long double) - { - public: - SPROUT_QUATERNION_MEMBER_TYPE_DATA_GENERATOR(long double) - public: - SPROUT_QUATERNION_CONSTRUCTOR_GENERATOR(long double) - explicit SPROUT_CONSTEXPR quaternion(quaternion const& a_recopier); - explicit SPROUT_CONSTEXPR quaternion(quaternion const& a_recopier); - SPROUT_QUATERNION_ACCESSOR_GENERATOR(long double) - SPROUT_QUATERNION_MEMBER_ASSIGNMENT_GENERATOR(long double) - SPROUT_QUATERNION_MEMBER_ALGEBRAIC_GENERATOR(long double) - SPROUT_QUATERNION_MEMBER_CONTAINER_GENERATOR(long double) - }; - - SPROUT_CONSTEXPR sprout::math::quaternion::quaternion(sprout::math::quaternion const& a_recopier) - : elems_{{ - static_cast(a_recopier.R_component_1()), - static_cast(a_recopier.R_component_2()), - static_cast(a_recopier.R_component_3()), - static_cast(a_recopier.R_component_4()) - }} - {} - SPROUT_CONSTEXPR sprout::math::quaternion::quaternion(sprout::math::quaternion const& a_recopier) - : elems_{{ - static_cast(a_recopier.R_component_1()), - static_cast(a_recopier.R_component_2()), - static_cast(a_recopier.R_component_3()), - static_cast(a_recopier.R_component_4()) - }} - {} - - SPROUT_CONSTEXPR sprout::math::quaternion::quaternion(sprout::math::quaternion const& a_recopier) - : elems_{{ - static_cast(a_recopier.R_component_1()), - static_cast(a_recopier.R_component_2()), - static_cast(a_recopier.R_component_3()), - static_cast(a_recopier.R_component_4()) - }} - {} - SPROUT_CONSTEXPR sprout::math::quaternion::quaternion(sprout::math::quaternion const& a_recopier) - : elems_{{ - static_cast(a_recopier.R_component_1()), - static_cast(a_recopier.R_component_2()), - static_cast(a_recopier.R_component_3()), - static_cast(a_recopier.R_component_4()) - }} - {} - - SPROUT_CONSTEXPR sprout::math::quaternion::quaternion(sprout::math::quaternion const& a_recopier) - : elems_{{ - static_cast(a_recopier.R_component_1()), - static_cast(a_recopier.R_component_2()), - static_cast(a_recopier.R_component_3()), - static_cast(a_recopier.R_component_4()) - }} - {} - SPROUT_CONSTEXPR sprout::math::quaternion::quaternion(sprout::math::quaternion const& a_recopier) - : elems_{{ - static_cast(a_recopier.R_component_1()), - static_cast(a_recopier.R_component_2()), - static_cast(a_recopier.R_component_3()), - static_cast(a_recopier.R_component_4()) - }} - {} - -#undef SPROUT_QUATERNION_MEMBER_CONTAINER_GENERATOR -#undef SPROUT_QUATERNION_MEMBER_ALGEBRAIC_GENERATOR -#undef SPROUT_QUATERNION_MEMBER_ADD_GENERATOR -#undef SPROUT_QUATERNION_MEMBER_SUB_GENERATOR -#undef SPROUT_QUATERNION_MEMBER_MUL_GENERATOR -#undef SPROUT_QUATERNION_MEMBER_DIV_GENERATOR -#undef SPROUT_QUATERNION_MEMBER_ADD_GENERATOR_1 -#undef SPROUT_QUATERNION_MEMBER_ADD_GENERATOR_2 -#undef SPROUT_QUATERNION_MEMBER_ADD_GENERATOR_3 -#undef SPROUT_QUATERNION_MEMBER_SUB_GENERATOR_1 -#undef SPROUT_QUATERNION_MEMBER_SUB_GENERATOR_2 -#undef SPROUT_QUATERNION_MEMBER_SUB_GENERATOR_3 -#undef SPROUT_QUATERNION_MEMBER_MUL_GENERATOR_1 -#undef SPROUT_QUATERNION_MEMBER_MUL_GENERATOR_2 -#undef SPROUT_QUATERNION_MEMBER_MUL_GENERATOR_3 -#undef SPROUT_QUATERNION_MEMBER_DIV_GENERATOR_1 -#undef SPROUT_QUATERNION_MEMBER_DIV_GENERATOR_2 -#undef SPROUT_QUATERNION_MEMBER_DIV_GENERATOR_3 -#undef SPROUT_QUATERNION_CONSTRUCTOR_GENERATOR -#undef SPROUT_QUATERNION_MEMBER_TYPE_DATA_GENERATOR -#undef SPROUT_QUATERNION_MEMBER_ASSIGNMENT_GENERATOR -#undef SPROUT_QUATERNION_ACCESSOR_GENERATOR - } // namespace math - - using sprout::math::quaternion; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_QUATERNION_QUATERNION_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/real.hpp b/dsp/lib/sprout/sprout/math/quaternion/real.hpp deleted file mode 100644 index 9b74024..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/real.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_REAL_HPP -#define SPROUT_MATH_QUATERNION_REAL_HPP - -#include -#include - -namespace sprout { - namespace math { - // - // real - // - template - inline SPROUT_CONSTEXPR T - real(sprout::math::quaternion const& q) { - return q.real(); - } - } // namespace math - - using sprout::math::real; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_QUATERNION_REAL_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/semipolar.hpp b/dsp/lib/sprout/sprout/math/quaternion/semipolar.hpp deleted file mode 100644 index 7f9a5dc..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/semipolar.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_SEMIPOLAR_HPP -#define SPROUT_MATH_QUATERNION_SEMIPOLAR_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace math { - // - // semipolar - // - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - semipolar(T const& rho, T const& alpha, T const& theta1, T const& theta2) { - return rho * sprout::math::quaternion( - sprout::math::cos(alpha) * sprout::math::cos(theta1), - sprout::math::cos(alpha) * sprout::math::sin(theta1), - sprout::math::sin(alpha) * sprout::math::cos(theta2), - sprout::math::sin(alpha) * sprout::math::sin(theta2) - ); - } - } // namespace math - - using sprout::math::semipolar; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_QUATERNION_SEMIPOLAR_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/sin.hpp b/dsp/lib/sprout/sprout/math/quaternion/sin.hpp deleted file mode 100644 index 0d9e326..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/sin.hpp +++ /dev/null @@ -1,60 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_SIN_HPP -#define SPROUT_MATH_QUATERNION_SIN_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - // - // sin - // - // !!! -// namespace detail { -// template -// inline SPROUT_CONSTEXPR sprout::math::quaternion -// sin_impl_1(sprout::math::quaternion const& q, T const& z, T const& w) { -// return sprout::math::quaternion( -// sprout::math::sin(sprout::math::real(q)) * sprout::math::cosh(z), -// w * q.R_component_2(), -// w * q.R_component_3(), -// w * q.R_component_4() -// ); -// } -// template -// inline SPROUT_CONSTEXPR sprout::math::quaternion -// sin_impl(sprout::math::quaternion const& q, T const& z) { -// return sprout::math::detail::sin_impl_1( -// q, z, -// +sprout::math::cos(sprout::math::real(q)) * sprout::math::sinhc_pi(z) -// ); -// } -// } // namespace detail -// template -// inline SPROUT_CONSTEXPR sprout::math::quaternion -// sin(sprout::math::quaternion const& q) { -// return sprout::math::detail::sin_impl( -// q, -// sprout::math::abs(sprout::math::unreal(q)) -// ); -// } - } // namespace math - -// using sprout::math::sin; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_QUATERNION_SIN_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/sinh.hpp b/dsp/lib/sprout/sprout/math/quaternion/sinh.hpp deleted file mode 100644 index 3957679..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/sinh.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_SINH_HPP -#define SPROUT_MATH_QUATERNION_SINH_HPP - -#include -#include -#include - -namespace sprout { - namespace math { - // - // sinh - // - // !!! -// template -// inline SPROUT_CONSTEXPR sprout::math::quaternion -// sinh(sprout::math::quaternion const& q) { -// return (sprout::math::exp(+q) - sprout::math::exp(-q)) / static_cast(2); -// } - } // namespace math - -// using sprout::math::sinh; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_QUATERNION_SINH_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/spherical.hpp b/dsp/lib/sprout/sprout/math/quaternion/spherical.hpp deleted file mode 100644 index 375827f..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/spherical.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_SPHERICAL_HPP -#define SPROUT_MATH_QUATERNION_SPHERICAL_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace math { - // - // spherical - // - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - spherical_impl(T const& rho, T const& theta, T const& phi1, T const& phi2, T const& p1, T const& p2) { - return rho * sprout::math::quaternion( - sprout::math::cos(theta) * (p2 * p1), - sprout::math::sin(theta) * (p2 * p1), - sprout::math::sin(phi1) * p2, - sprout::math::sin(phi2) - ); - } - } // namespace detail - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - spherical(T const& rho, T const& theta, T const& phi1, T const& phi2) { - return sprout::math::detail::spherical_impl( - rho, theta, phi1, phi2, - sprout::math::cos(phi1), sprout::math::cos(phi2) - ); - } - } // namespace math - - using sprout::math::spherical; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_QUATERNION_SPHERICAL_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/stream_operators.hpp b/dsp/lib/sprout/sprout/math/quaternion/stream_operators.hpp deleted file mode 100644 index 8bcf0b7..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/stream_operators.hpp +++ /dev/null @@ -1,200 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_STREAM_OPERATORS_HPP -#define SPROUT_MATH_QUATERNION_STREAM_OPERATORS_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - // - // operator<< - // operator>> - // - template - inline SPROUT_NON_CONSTEXPR std::basic_ostream& - operator<<( std::basic_ostream& lhs, sprout::math::quaternion const& rhs) { - std::basic_ostringstream s; - s.flags(lhs.flags()); - s.imbue(lhs.getloc()); - s.precision(lhs.precision()); - s - << '(' - << rhs.R_component_1() << ',' - << rhs.R_component_2() << ',' - << rhs.R_component_3() << ',' - << rhs.R_component_4() - << ')' - ; - return lhs << s.str(); - } - template - inline SPROUT_NON_CONSTEXPR std::basic_istream& - operator>>(std::basic_istream& lhs, sprout::math::quaternion& rhs) { - std::ctype const& ct = std::use_facet >(lhs.getloc()); - T a = T(); - T b = T(); - T c = T(); - T d = T(); - sprout::complex u = sprout::complex(); - sprout::complex v = sprout::complex(); - Elem ch = Elem(); - char cc; - lhs >> ch; - if (!lhs.good()) { - goto finish; - } - cc = ct.narrow(ch, char()); - if (cc == '(') { - lhs >> ch; - if (!lhs.good()) { - goto finish; - } - cc = ct.narrow(ch, char()); - if (cc == '(') { - lhs.putback(ch); - lhs >> u; - a = u.real(); - b = u.imag(); - if (!lhs.good()) { - goto finish; - } - lhs >> ch; - if (!lhs.good()) { - goto finish; - } - cc = ct.narrow(ch, char()); - if (cc == ')') { - rhs = sprout::math::quaternion(a, b); - } else if (cc == ',') { - lhs >> v; - c = v.real(); - d = v.imag(); - if (!lhs.good()) { - goto finish; - } - lhs >> ch; - if (!lhs.good()) { - goto finish; - } - cc = ct.narrow(ch, char()); - if (cc == ')') { - rhs = sprout::math::quaternion(a, b, c, d); - } else { - lhs.setstate(std::ios_base::failbit); - } - } else { - lhs.setstate(std::ios_base::failbit); - } - } else { - lhs.putback(ch); - lhs >> a; - if (!lhs.good()) { - goto finish; - } - lhs >> ch; - if (!lhs.good()) { - goto finish; - } - cc = ct.narrow(ch, char()); - if (cc == ')') { - rhs = sprout::math::quaternion(a); - } else if (cc == ',') { - lhs >> ch; - if (!lhs.good()) { - goto finish; - } - cc = ct.narrow(ch, char()); - if (cc == '(') { - lhs.putback(ch); - lhs >> v; - c = v.real(); - d = v.imag(); - if (!lhs.good()) { - goto finish; - } - lhs >> ch; - if (!lhs.good()) { - goto finish; - } - cc = ct.narrow(ch, char()); - if (cc == ')') { - rhs = sprout::math::quaternion(a, b, c, d); - } else { - lhs.setstate(std::ios_base::failbit); - } - } else { - lhs.putback(ch); - lhs >> b; - if (!lhs.good()) { - goto finish; - } - lhs >> ch; - if (!lhs.good()) { - goto finish; - } - cc = ct.narrow(ch, char()); - if (cc == ')') { - rhs = sprout::math::quaternion(a, b); - } else if (cc == ',') { - lhs >> c; - if (!lhs.good()) { - goto finish; - } - lhs >> ch; - if (!lhs.good()) { - goto finish; - } - cc = ct.narrow(ch, char()); - if (cc == ')') { - rhs = sprout::math::quaternion(a, b, c); - } else if (cc == ',') { - lhs >> d; - if (!lhs.good()) { - goto finish; - } - lhs >> ch; - if (!lhs.good()) { - goto finish; - } - cc = ct.narrow(ch, char()); - if (cc == ')') { - rhs = sprout::math::quaternion(a, b, c, d); - } else { - lhs.setstate(std::ios_base::failbit); - } - } else { - lhs.setstate(std::ios_base::failbit); - } - } else { - lhs.setstate(std::ios_base::failbit); - } - } - } else { - lhs.setstate(std::ios_base::failbit); - } - } - } else { - lhs.putback(ch); - lhs >> a; - if (!lhs.good()) { - goto finish; - } - rhs = sprout::math::quaternion(a); - } - finish: - return lhs; - } - } // namespace math -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_QUATERNION_STREAM_OPERATORS_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/sup.hpp b/dsp/lib/sprout/sprout/math/quaternion/sup.hpp deleted file mode 100644 index ec919f6..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/sup.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_SUP_HPP -#define SPROUT_MATH_QUATERNION_SUP_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace math { - // - // sup - // - template - inline SPROUT_CONSTEXPR T - sup(sprout::math::quaternion const& q) { - return sprout::math::detail::abs_max( - sprout::array{{ - q.R_component_1(), - q.R_component_2(), - q.R_component_3(), - q.R_component_4() - }} - ); - } - } // namespace math - - using sprout::math::sup; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_QUATERNION_SUP_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/tan.hpp b/dsp/lib/sprout/sprout/math/quaternion/tan.hpp deleted file mode 100644 index 161648a..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/tan.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_TAN_HPP -#define SPROUT_MATH_QUATERNION_TAN_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace math { - // - // tan - // - // !!! -// template -// inline SPROUT_CONSTEXPR sprout::math::quaternion -// tan(sprout::math::quaternion const& q) { -// return sprout::math::sin(q) / sprout::math::cos(q); -// } - } // namespace math - -// using sprout::math::tan; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_QUATERNION_TAN_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/tanh.hpp b/dsp/lib/sprout/sprout/math/quaternion/tanh.hpp deleted file mode 100644 index 8bce998..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/tanh.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_TANH_HPP -#define SPROUT_MATH_QUATERNION_TANH_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace math { - // - // tanh - // - // !!! -// template -// inline SPROUT_CONSTEXPR sprout::math::quaternion -// tanh(sprout::math::quaternion const& q) { -// return sprout::math::sinh(q) / sprout::math::cosh(q); -// } - } // namespace math - -// using sprout::math::tanh; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_QUATERNION_TANH_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/transcendentals.hpp b/dsp/lib/sprout/sprout/math/quaternion/transcendentals.hpp deleted file mode 100644 index 756466e..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/transcendentals.hpp +++ /dev/null @@ -1,21 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_TRANSCENDENTALS_HPP -#define SPROUT_MATH_QUATERNION_TRANSCENDENTALS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_MATH_QUATERNION_TRANSCENDENTALS_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/tuple.hpp b/dsp/lib/sprout/sprout/math/quaternion/tuple.hpp deleted file mode 100644 index a9e30a0..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/tuple.hpp +++ /dev/null @@ -1,139 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_TUPLE_HPP -#define SPROUT_MATH_QUATERNION_TUPLE_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - namespace detail { - template - struct tuple_element_impl; - template - struct tuple_element_impl > - : public sprout::detail::nil_base - {}; - template - struct tuple_element_impl<0, sprout::math::quaternion > - : public sprout::identity - {}; - template - struct tuple_element_impl<1, sprout::math::quaternion > - : public sprout::identity - {}; - template - struct tuple_element_impl<2, sprout::math::quaternion > - : public sprout::identity - {}; - template - struct tuple_element_impl<3, sprout::math::quaternion > - : public sprout::identity - {}; - - template - struct get_impl; - template - struct get_impl<0, sprout::math::quaternion > { - public: - SPROUT_CONSTEXPR T& operator()(sprout::math::quaternion& t) const { - return t[0]; - } - SPROUT_CONSTEXPR T const& operator()(sprout::math::quaternion const& t) const { - return t[0]; - } - }; - template - struct get_impl<1, sprout::math::quaternion > { - public: - SPROUT_CONSTEXPR T& operator()(sprout::math::quaternion& t) const { - return t[1]; - } - SPROUT_CONSTEXPR T const& operator()(sprout::math::quaternion const& t) const { - return t[1]; - } - }; - template - struct get_impl<2, sprout::math::quaternion > { - public: - SPROUT_CONSTEXPR T& operator()(sprout::math::quaternion& t) const { - return t[2]; - } - SPROUT_CONSTEXPR T const& operator()(sprout::math::quaternion const& t) const { - return t[2]; - } - }; - template - struct get_impl<3, sprout::math::quaternion > { - public: - SPROUT_CONSTEXPR T& operator()(sprout::math::quaternion& t) const { - return t[3]; - } - SPROUT_CONSTEXPR T const& operator()(sprout::math::quaternion const& t) const { - return t[3]; - } - }; - } // namespace detail - } // namespace tuples -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // tuple_size - // - template - struct tuple_size > - : public sprout::integral_constant - {}; - - // - // tuple_element - // - template - struct tuple_element > - : public sprout::tuples::detail::tuple_element_impl > - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -namespace sprout { - // - // tuple_get - // - template - inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element >::type& - tuple_get(sprout::math::quaternion& t) SPROUT_NOEXCEPT { - static_assert(I < 4, "tuple_get: index out of range"); - return sprout::tuples::detail::get_impl >()(t); - } - template - inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element >::type const& - tuple_get(sprout::math::quaternion const& t) SPROUT_NOEXCEPT { - static_assert(I < 4, "tuple_get: index out of range"); - return sprout::tuples::detail::get_impl >()(t); - } - template - inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element >::type&& - tuple_get(sprout::math::quaternion&& t) SPROUT_NOEXCEPT { - return sprout::move(sprout::tuples::get(t)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_QUATERNION_TUPLE_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/type_traits.hpp b/dsp/lib/sprout/sprout/math/quaternion/type_traits.hpp deleted file mode 100644 index 0e4c160..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/type_traits.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_TYPE_TRAITS_HPP -#define SPROUT_MATH_QUATERNION_TYPE_TRAITS_HPP - -#include -#include -#include - -namespace sprout { - namespace math { - // - // is_quaternion - // - template - struct is_quaternion - : public sprout::false_type - {}; - template - struct is_quaternion - : public sprout::math::is_quaternion - {}; - template - struct is_quaternion - : public sprout::math::is_quaternion - {}; - template - struct is_quaternion > - : public sprout::true_type - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_quaternion_v = sprout::math::is_quaternion::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - } // namespace math - - using sprout::math::is_quaternion; -#if SPROUT_USE_VARIABLE_TEMPLATES - using sprout::math::is_quaternion_v; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_QUATERNION_TYPE_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/unreal.hpp b/dsp/lib/sprout/sprout/math/quaternion/unreal.hpp deleted file mode 100644 index b415ddb..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/unreal.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_UNREAL_HPP -#define SPROUT_MATH_QUATERNION_UNREAL_HPP - -#include -#include - -namespace sprout { - namespace math { - // - // unreal - // - template - inline SPROUT_CONSTEXPR sprout::math::quaternion - unreal(sprout::math::quaternion const& q) { - return q.unreal(); - } - } // namespace math - - using sprout::math::unreal; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_QUATERNION_UNREAL_HPP diff --git a/dsp/lib/sprout/sprout/math/quaternion/values.hpp b/dsp/lib/sprout/sprout/math/quaternion/values.hpp deleted file mode 100644 index fccfd38..0000000 --- a/dsp/lib/sprout/sprout/math/quaternion/values.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUATERNION_VALUES_HPP -#define SPROUT_MATH_QUATERNION_VALUES_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_MATH_QUATERNION_VALUES_HPP diff --git a/dsp/lib/sprout/sprout/math/quotient.hpp b/dsp/lib/sprout/sprout/math/quotient.hpp deleted file mode 100644 index 4d7d904..0000000 --- a/dsp/lib/sprout/sprout/math/quotient.hpp +++ /dev/null @@ -1,60 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_QUOTIENT_HPP -#define SPROUT_MATH_QUOTIENT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - // - // quotient - // - template< - typename R = int, - typename FloatType, - typename sprout::enabler_if::value && std::is_integral::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR R - quotient(FloatType x, FloatType y) { - return y == 0 ? R(0) - : sprout::math::isnan(y) || sprout::math::isnan(x) ? R(0) - : x == sprout::numeric_limits::infinity() || x == -sprout::numeric_limits::infinity() - ? R(0) - : x == 0 ? R(0) - : y == sprout::numeric_limits::infinity() || y == -sprout::numeric_limits::infinity() ? R(0) - : sprout::math::rem_quo(x, y).second - ; - } - template< - typename R = int, - typename ArithmeticType1, - typename ArithmeticType2, - typename sprout::enabler_if< - std::is_arithmetic::value && std::is_arithmetic::value && std::is_integral::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR R - quotient(ArithmeticType1 x, ArithmeticType2 y) { - typedef typename sprout::float_promote::type type; - return sprout::math::quotient(static_cast(x), static_cast(y)); - } - } // namespace math - - using sprout::math::quotient; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_QUOTIENT_HPP diff --git a/dsp/lib/sprout/sprout/math/rem_quo.hpp b/dsp/lib/sprout/sprout/math/rem_quo.hpp deleted file mode 100644 index 8134624..0000000 --- a/dsp/lib/sprout/sprout/math/rem_quo.hpp +++ /dev/null @@ -1,145 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_REM_QUO_HPP -#define SPROUT_MATH_REM_QUO_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::pair - rem_quo_ret(Pair const& p) { - typedef sprout::pair type; - return type(static_cast(p.first), p.second); - } - - template - inline SPROUT_CONSTEXPR sprout::pair - rem_quo_impl_7(T x, T y, int k, R iquo, T x1, T z) { - typedef sprout::pair type; - return (z > y) || ((z == y) && ((iquo & 1) != 0)) - ? x < 0 ? type(-(x1 - y), ((iquo + 1) & 0x7) * k) : type(x1 - y, ((iquo + 1) & 0x7) * k) - : x < 0 ? type(-x1, (iquo & 0x7) * k) : type(x1, (iquo & 0x7) * k) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - rem_quo_impl_6(T x, T y, int k, R iquo, T x1) { - return x1 >= y - ? sprout::math::detail::rem_quo_impl_7(x, y, k, iquo + 1, x1 - y, (x1 - y) + (x1 - y)) - : sprout::math::detail::rem_quo_impl_7(x, y, k, iquo, x1, x1 + x1) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - rem_quo_impl_5(T x, T y, int k, R iquo, T x1, T y1, T z, int iscy, int idiff, int i) { - return i != idiff - ? z >= 0 - ? sprout::math::detail::rem_quo_impl_5(x, y, k, iquo + iquo + 2, z + z, y1, z + z - y1, iscy, idiff, i + 1) - : sprout::math::detail::rem_quo_impl_5(x, y, k, iquo + iquo, x1 + x1, y1, x1 + x1 - y1, iscy, idiff, i + 1) - : sprout::math::detail::rem_quo_impl_6(x, y, k, iquo, sprout::math::scalbn(x1, iscy)) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - rem_quo_impl_4(T x, T y, int k, R iquo, T x1, T y1, int iscy, int idiff, int i) { - return sprout::math::detail::rem_quo_impl_5(x, y, k, iquo, x1, y1, x1 - y1, iscy, idiff, i); - } - template - inline SPROUT_CONSTEXPR sprout::pair - rem_quo_impl_3(T x, T y, int k, R iquo, T x1, int iscx, int iscy, int idiff) { - return idiff < 0 ? sprout::math::detail::rem_quo_impl_7(x, y, k, iquo, x1, x1 + x1) - : idiff ? sprout::math::detail::rem_quo_impl_4(x, y, k, iquo, sprout::math::scalbn(x1, -iscx), sprout::math::scalbn(y, -iscy), iscy, idiff, 0) - : sprout::math::detail::rem_quo_impl_6(x, y, k, iquo, x1) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - rem_quo_impl_2(T x, T y, int k, R iquo, T x1, int iscx, int iscy) { - return sprout::math::detail::rem_quo_impl_3(x, y, k, iquo, x1, iscx, iscy, iscx - iscy); - } - template - inline SPROUT_CONSTEXPR sprout::pair - rem_quo_impl_1(T x, T y, int k, R iquo, T x1) { - return sprout::math::detail::rem_quo_impl_2(x, y, k, iquo, x1, sprout::math::ilogb(x1), sprout::math::ilogb(y)); - } - template - inline SPROUT_CONSTEXPR sprout::pair - rem_quo_impl(T x, T y, R iquo) { - return sprout::math::detail::rem_quo_impl_1(x, sprout::math::fabs(y), (sprout::math::signbit(x) ^ sprout::math::signbit(y) ? -1 : 1), iquo, sprout::math::fabs(x)); - } - } // namespace detail - // - // rem_quo - // - // - // issue: - // rem_quo(-NaN, -NaN) returns {-NaN, _} . - // # returns {+NaN, _} . ( same as rem_quo(+NaN, +NaN) ) - // - template< - typename R = int, - typename FloatType, - typename sprout::enabler_if::value && std::is_integral::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR sprout::pair - rem_quo(FloatType x, FloatType y) { - typedef sprout::pair type; - return y == 0 ? type(-sprout::numeric_limits::quiet_NaN(), R(0)) - : sprout::math::isnan(y) - ? sprout::math::isnan(x) - ? type(sprout::math::signbit(y) && sprout::math::signbit(x) ? -sprout::numeric_limits::quiet_NaN() : sprout::numeric_limits::quiet_NaN(), R(0)) - : type(y, R(0)) - : sprout::math::isnan(x) ? type(x, R(0)) - : x == sprout::numeric_limits::infinity() || x == -sprout::numeric_limits::infinity() - ? type(-sprout::numeric_limits::quiet_NaN(), R(0)) - : x == 0 ? type(x, R(0)) - : y == sprout::numeric_limits::infinity() || y == -sprout::numeric_limits::infinity() ? type(x, R(0)) - : sprout::math::detail::rem_quo_ret(sprout::math::detail::rem_quo_impl( - static_cast::type>(x), - static_cast::type>(y), - R(0) - )) - ; - } - template< - typename R = int, - typename ArithmeticType1, - typename ArithmeticType2, - typename sprout::enabler_if< - std::is_arithmetic::value && std::is_arithmetic::value && std::is_integral::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR sprout::pair< - typename sprout::float_promote::type, - R - > - rem_quo(ArithmeticType1 x, ArithmeticType2 y) { - typedef typename sprout::float_promote::type type; - return sprout::math::rem_quo(static_cast(x), static_cast(y)); - } - } // namespace math - - using sprout::math::rem_quo; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_REM_QUO_HPP diff --git a/dsp/lib/sprout/sprout/math/remainder.hpp b/dsp/lib/sprout/sprout/math/remainder.hpp deleted file mode 100644 index bdedc08..0000000 --- a/dsp/lib/sprout/sprout/math/remainder.hpp +++ /dev/null @@ -1,87 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_REMAINDER_HPP -#define SPROUT_MATH_REMAINDER_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_remainder(float x, float y) { - return __builtin_remainderf(x, y); - } - inline SPROUT_CONSTEXPR double - builtin_remainder(double x, double y) { - return __builtin_remainder(x, y); - } - inline SPROUT_CONSTEXPR long double - builtin_remainder(long double x, long double y) { - return __builtin_remainderl(x, y); - } -#endif - } // namespace detail - // - // remainder - // - // issue: - // remainder(-NaN, -NaN) returns -NaN . - // # returns +NaN . ( same as remainder(+NaN, +NaN) ) - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - remainder(FloatType x, FloatType y) { - return y == 0 ? -sprout::numeric_limits::quiet_NaN() - : sprout::math::isnan(y) - ? sprout::math::isnan(x) - ? sprout::math::signbit(y) && sprout::math::signbit(x) ? -sprout::numeric_limits::quiet_NaN() - : sprout::numeric_limits::quiet_NaN() - : y - : sprout::math::isnan(x) ? x - : x == sprout::numeric_limits::infinity() || x == -sprout::numeric_limits::infinity() - ? -sprout::numeric_limits::quiet_NaN() - : x == 0 ? x - : y == sprout::numeric_limits::infinity() || y == -sprout::numeric_limits::infinity() ? x -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_remainder(x, y) -#else - : sprout::math::rem_quo(x, y).first -#endif - ; - } - template< - typename ArithmeticType1, - typename ArithmeticType2, - typename sprout::enabler_if< - std::is_arithmetic::value && std::is_arithmetic::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::float_promote::type - remainder(ArithmeticType1 x, ArithmeticType2 y) { - typedef typename sprout::float_promote::type type; - return sprout::math::remainder(static_cast(x), static_cast(y)); - } - } // namespace math - - using sprout::math::remainder; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_REMAINDER_HPP diff --git a/dsp/lib/sprout/sprout/math/remainders.hpp b/dsp/lib/sprout/sprout/math/remainders.hpp deleted file mode 100644 index 8557780..0000000 --- a/dsp/lib/sprout/sprout/math/remainders.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_REMAINDERS_HPP -#define SPROUT_MATH_REMAINDERS_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_MATH_REMAINDERS_HPP diff --git a/dsp/lib/sprout/sprout/math/round.hpp b/dsp/lib/sprout/sprout/math/round.hpp deleted file mode 100644 index b5fee39..0000000 --- a/dsp/lib/sprout/sprout/math/round.hpp +++ /dev/null @@ -1,96 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_ROUND_HPP -#define SPROUT_MATH_ROUND_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_round(float x) { - return __builtin_roundf(x); - } - inline SPROUT_CONSTEXPR double - builtin_round(double x) { - return __builtin_round(x); - } - inline SPROUT_CONSTEXPR long double - builtin_round(long double x) { - return __builtin_roundl(x); - } -#endif - - template - inline SPROUT_CONSTEXPR T - round_impl_positive(T x, T x0) { - return x - x0 < T(0.5) ? x0 - : x0 + T(1) - ; - } - template - inline SPROUT_CONSTEXPR T - round_impl_nagative(T x, T x0) { - return x0 - x < T(0.5) ? x0 - : x0 - T(1) - ; - } - template - inline SPROUT_CONSTEXPR T - round_impl(T x) { - return x < 0 ? sprout::math::detail::round_impl_nagative(x, -static_cast(static_cast(-x))) - : sprout::math::detail::round_impl_positive(x, static_cast(static_cast(x))) - ; - } - } // namespace detail - // - // round - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - round(FloatType x) { - return sprout::math::isnan(x) ? x - : x == sprout::numeric_limits::infinity() ? sprout::numeric_limits::infinity() - : x == -sprout::numeric_limits::infinity() ? -sprout::numeric_limits::infinity() -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_round(x) -#else - : x == 0 ? x - : sprout::numeric_limits::max() < x || sprout::numeric_limits::max() < -x - ? SPROUT_MATH_THROW_LARGE_FLOAT_ROUNDING(std::runtime_error("round: large float rounding."), x) - : static_cast(sprout::math::detail::round_impl(static_cast::type>(x))) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - round(IntType x) { - return sprout::math::round(static_cast(x)); - } - } // namespace math - - using sprout::math::round; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_ROUND_HPP diff --git a/dsp/lib/sprout/sprout/math/scalbln.hpp b/dsp/lib/sprout/sprout/math/scalbln.hpp deleted file mode 100644 index 5d25746..0000000 --- a/dsp/lib/sprout/sprout/math/scalbln.hpp +++ /dev/null @@ -1,79 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_SCALBLN_HPP -#define SPROUT_MATH_SCALBLN_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_scalbln(float x, long exp) { - return __builtin_scalblnf(x, exp); - } - inline SPROUT_CONSTEXPR double - builtin_scalbln(double x, long exp) { - return __builtin_scalbln(x, exp); - } - inline SPROUT_CONSTEXPR long double - builtin_scalbln(long double x, long exp) { - return __builtin_scalblnl(x, exp); - } -#endif - - template - inline SPROUT_CONSTEXPR T - scalbln_impl(T x, long exp) { - return x * sprout::detail::pow_n(T(sprout::numeric_limits::radix), exp); - } - } // namespace detail - // - // scalbln - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - scalbln(FloatType x, long exp) { - return -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - sprout::math::detail::builtin_scalbln(x, exp) -#else - sprout::math::isnan(x) ? x - : x == sprout::numeric_limits::infinity() ? sprout::numeric_limits::infinity() - : x == -sprout::numeric_limits::infinity() ? -sprout::numeric_limits::infinity() - : exp == 0 ? x - : x == 0 ? x - : static_cast(sprout::math::detail::scalbln_impl(static_cast::type>(x), exp)) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - scalbln(IntType x, long exp) { - return sprout::math::scalbln(static_cast(x), exp); - } - } // namespace math - - using sprout::math::scalbln; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_SCALBLN_HPP diff --git a/dsp/lib/sprout/sprout/math/scalbn.hpp b/dsp/lib/sprout/sprout/math/scalbn.hpp deleted file mode 100644 index 9285a70..0000000 --- a/dsp/lib/sprout/sprout/math/scalbn.hpp +++ /dev/null @@ -1,79 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_SCALBN_HPP -#define SPROUT_MATH_SCALBN_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_scalbn(float x, int exp) { - return __builtin_scalbnf(x, exp); - } - inline SPROUT_CONSTEXPR double - builtin_scalbn(double x, int exp) { - return __builtin_scalbn(x, exp); - } - inline SPROUT_CONSTEXPR long double - builtin_scalbn(long double x, int exp) { - return __builtin_scalbnl(x, exp); - } -#endif - - template - inline SPROUT_CONSTEXPR T - scalbn_impl(T x, int exp) { - return x * sprout::detail::pow_n(T(sprout::numeric_limits::radix), exp); - } - } // namespace detail - // - // scalbn - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - scalbn(FloatType x, int exp) { - return -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - sprout::math::detail::builtin_scalbn(x, exp) -#else - sprout::math::isnan(x) ? x - : x == sprout::numeric_limits::infinity() ? sprout::numeric_limits::infinity() - : x == -sprout::numeric_limits::infinity() ? -sprout::numeric_limits::infinity() - : exp == 0 ? x - : x == 0 ? x - : static_cast(sprout::math::detail::scalbn_impl(static_cast::type>(x), exp)) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - scalbn(IntType x, int exp) { - return sprout::math::scalbn(static_cast(x), exp); - } - } // namespace math - - using sprout::math::scalbn; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_SCALBN_HPP diff --git a/dsp/lib/sprout/sprout/math/sigmoid.hpp b/dsp/lib/sprout/sprout/math/sigmoid.hpp deleted file mode 100644 index 9a857ac..0000000 --- a/dsp/lib/sprout/sprout/math/sigmoid.hpp +++ /dev/null @@ -1,203 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_SIGMOID_HPP -#define SPROUT_MATH_SIGMOID_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - // - // sigmoid - // - namespace detail { - template - inline SPROUT_CONSTEXPR T - sigmoid_impl(T x){ - return 1 / (1 + sprout::math::exp(-x)); - } - template - inline SPROUT_CONSTEXPR T - sigmoid_impl(T x, T a){ - return sprout::math::detail::sigmoid_impl(a * x); - } - } // namespace detail - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - sigmoid(FloatType x){ - return sprout::math::detail::sigmoid_impl(sprout::math::detail::as_float_compute(x)); - } - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - sigmoid(FloatType x, FloatType a){ - return sprout::math::detail::sigmoid_impl(sprout::math::detail::as_float_compute(x), sprout::math::detail::as_float_compute(a)); - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - sigmoid(IntType x) { - return sprout::math::sigmoid(static_cast(x)); - } - template< - typename ArithmeticType1, - typename ArithmeticType2, - typename sprout::enabler_if< - std::is_arithmetic::value && std::is_arithmetic::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::float_promote::type - sigmoid(ArithmeticType1 x, ArithmeticType2 a) { - typedef typename sprout::float_promote::type type; - return sprout::math::sigmoid(static_cast(x), static_cast(a)); - } - - // - // d_sigmoid - // - namespace detail { - template - inline SPROUT_CONSTEXPR T - d_sigmoid_impl_1(T s){ - return s * (1 - s); - } - template - inline SPROUT_CONSTEXPR T - d_sigmoid_impl_1(T s, T a){ - return a * s * (1 - s); - } - template - inline SPROUT_CONSTEXPR T - d_sigmoid_impl(T x){ - return sprout::math::detail::d_sigmoid_impl_1(sprout::math::sigmoid(x)); - } - template - inline SPROUT_CONSTEXPR T - d_sigmoid_impl(T x, T a){ - return sprout::math::detail::d_sigmoid_impl_1(sprout::math::sigmoid(x, a), a); - } - } // namespace detail - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - d_sigmoid(FloatType x){ - return sprout::math::detail::d_sigmoid_impl(sprout::math::detail::as_float_compute(x)); - } - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - d_sigmoid(FloatType x, FloatType a){ - return sprout::math::detail::d_sigmoid_impl(sprout::math::detail::as_float_compute(x), sprout::math::detail::as_float_compute(a)); - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - d_sigmoid(IntType x) { - return sprout::math::d_sigmoid(static_cast(x)); - } - template< - typename ArithmeticType1, - typename ArithmeticType2, - typename sprout::enabler_if< - std::is_arithmetic::value && std::is_arithmetic::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::float_promote::type - d_sigmoid(ArithmeticType1 x, ArithmeticType2 a) { - typedef typename sprout::float_promote::type type; - return sprout::math::d_sigmoid(static_cast(x), static_cast(a)); - } - - // - // d2_sigmoid - // - namespace detail { - template - inline SPROUT_CONSTEXPR T - d2_sigmoid_impl_1(T s){ - return s * (1 - s) * (1 - 2 * s); - } - template - inline SPROUT_CONSTEXPR T - d2_sigmoid_impl_1(T s, T a){ - return a * a * s * (1 - s) * (1 - 2 * s); - } - template - inline SPROUT_CONSTEXPR T - d2_sigmoid_impl(T x){ - return sprout::math::detail::d2_sigmoid_impl_1(sprout::math::sigmoid(x)); - } - template - inline SPROUT_CONSTEXPR T - d2_sigmoid_impl(T x, T a){ - return sprout::math::detail::d2_sigmoid_impl_1(sprout::math::sigmoid(x, a), a); - } - } // namespace detail - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - d2_sigmoid(FloatType x){ - return sprout::math::detail::d2_sigmoid_impl(sprout::math::detail::as_float_compute(x)); - } - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - d2_sigmoid(FloatType x, FloatType a){ - return sprout::math::detail::d2_sigmoid_impl(sprout::math::detail::as_float_compute(x), sprout::math::detail::as_float_compute(a)); - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - d2_sigmoid(IntType x) { - return sprout::math::d2_sigmoid(static_cast(x)); - } - template< - typename ArithmeticType1, - typename ArithmeticType2, - typename sprout::enabler_if< - std::is_arithmetic::value && std::is_arithmetic::value - >::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::float_promote::type - d2_sigmoid(ArithmeticType1 x, ArithmeticType2 a) { - typedef typename sprout::float_promote::type type; - return sprout::math::d2_sigmoid(static_cast(x), static_cast(a)); - } - } // namespace math - - using sprout::math::sigmoid; - using sprout::math::d_sigmoid; - using sprout::math::d2_sigmoid; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_SIGMOID_HPP diff --git a/dsp/lib/sprout/sprout/math/signbit.hpp b/dsp/lib/sprout/sprout/math/signbit.hpp deleted file mode 100644 index ef4fe4f..0000000 --- a/dsp/lib/sprout/sprout/math/signbit.hpp +++ /dev/null @@ -1,67 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_SIGNBIT_HPP -#define SPROUT_MATH_SIGNBIT_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - template - inline SPROUT_CONSTEXPR bool - builtin_signbit(FloatType x) { - return __builtin_signbit(x); - } -#endif - } // namespace detail - // - // signbit - // - // issue: - // [ !(SPROUT_USE_BUILTIN_CMATH_FUNCTION || SPROUT_USE_BUILTIN_COPYSIGN_FUNCTION) ] - // signbit(-0) returns false . - // # returns true . ( same as signbit(+0) ) - // signbit(-NaN) returns false . - // # returns true . ( same as signbit(+NaN) ) - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - signbit(FloatType x) { - return -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - sprout::math::detail::builtin_signbit(x) -#elif SPROUT_USE_BUILTIN_COPYSIGN_FUNCTION - sprout::math::copysign(FloatType(1), x) < FloatType(0) -#else - sprout::math::detail::broken_signbit(x) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR bool - signbit(IntType x) { - return x < 0; - } - } // namespace math - - using sprout::math::signbit; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_SIGNBIT_HPP diff --git a/dsp/lib/sprout/sprout/math/sin.hpp b/dsp/lib/sprout/sprout/math/sin.hpp deleted file mode 100644 index 40e0fad..0000000 --- a/dsp/lib/sprout/sprout/math/sin.hpp +++ /dev/null @@ -1,78 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_SIN_HPP -#define SPROUT_MATH_SIN_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_sin(float x) { - return __builtin_sinf(x); - } - inline SPROUT_CONSTEXPR double - builtin_sin(double x) { - return __builtin_sin(x); - } - inline SPROUT_CONSTEXPR long double - builtin_sin(long double x) { - return __builtin_sinl(x); - } -#endif - - template - inline SPROUT_CONSTEXPR T - sin_impl(T x) { - return -sprout::math::cos(x + sprout::math::half_pi()); - } - } // namespace detail - // - // sin - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - sin(FloatType x) { - return sprout::math::isnan(x) ? x - : x == sprout::numeric_limits::infinity() || x == -sprout::numeric_limits::infinity() - ? -sprout::numeric_limits::quiet_NaN() -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_sin(x) -#else - : x == 0 ? x - : static_cast(sprout::math::detail::sin_impl(static_cast::type>(x))) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - sin(IntType x) { - return sprout::math::sin(static_cast(x)); - } - } // namespace math - - using sprout::math::sin; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_SIN_HPP diff --git a/dsp/lib/sprout/sprout/math/sinh.hpp b/dsp/lib/sprout/sprout/math/sinh.hpp deleted file mode 100644 index 4bf3c2e..0000000 --- a/dsp/lib/sprout/sprout/math/sinh.hpp +++ /dev/null @@ -1,83 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_SINH_HPP -#define SPROUT_MATH_SINH_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_sinh(float x) { - return __builtin_sinhf(x); - } - inline SPROUT_CONSTEXPR double - builtin_sinh(double x) { - return __builtin_sinh(x); - } - inline SPROUT_CONSTEXPR long double - builtin_sinh(long double x) { - return __builtin_sinhl(x); - } -#endif - - template - inline SPROUT_CONSTEXPR T - sinh_impl_1(T t) { - return T(0.5) * t - T(0.5) / t; - } - template - inline SPROUT_CONSTEXPR T - sinh_impl(T x) { - return sprout::math::detail::sinh_impl_1(sprout::math::exp(x)); - } - } // namespace detail - // - // sinh - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - sinh(FloatType x) { - return sprout::math::isnan(x) ? x - : x == sprout::numeric_limits::infinity() ? sprout::numeric_limits::infinity() - : x == -sprout::numeric_limits::infinity() ? -sprout::numeric_limits::infinity() -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_sinh(x) -#else - : x == 0 ? x - : static_cast(sprout::math::detail::sinh_impl(static_cast::type>(x))) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - sinh(IntType x) { - return sprout::math::sinh(static_cast(x)); - } - } // namespace math - - using sprout::math::sinh; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_SINH_HPP diff --git a/dsp/lib/sprout/sprout/math/sqrt.hpp b/dsp/lib/sprout/sprout/math/sqrt.hpp deleted file mode 100644 index 837e419..0000000 --- a/dsp/lib/sprout/sprout/math/sqrt.hpp +++ /dev/null @@ -1,88 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_SQRT_HPP -#define SPROUT_MATH_SQRT_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_sqrt(float x) { - return __builtin_sqrtf(x); - } - inline SPROUT_CONSTEXPR double - builtin_sqrt(double x) { - return __builtin_sqrt(x); - } - inline SPROUT_CONSTEXPR long double - builtin_sqrt(long double x) { - return __builtin_sqrtl(x); - } -#endif - - template - inline SPROUT_CONSTEXPR T - sqrt_impl_2(T x, T s, T s2) { - return !(s < s2) ? s2 - : sprout::math::detail::sqrt_impl_2(x, (x / s + s) / 2, s) - ; - } - template - inline SPROUT_CONSTEXPR T - sqrt_impl_1(T x, T s) { - return sprout::math::detail::sqrt_impl_2(x, (x / s + s) / 2, s); - } - template - inline SPROUT_CONSTEXPR T - sqrt_impl(T x) { - return sprout::math::detail::sqrt_impl_1(x, x > 1 ? x : T(1)); - } - } // namespace detail - // - // sqrt - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - sqrt(FloatType x) { - return sprout::math::isnan(x) ? x - : x == sprout::numeric_limits::infinity() ? sprout::numeric_limits::infinity() - : x < 0 ? -sprout::numeric_limits::quiet_NaN() -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_sqrt(x) -#else - : x == 0 ? x - : static_cast(sprout::math::detail::sqrt_impl(static_cast::type>(x))) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - sqrt(IntType x) { - return sprout::math::sqrt(static_cast(x)); - } - } // namespace math - - using sprout::math::sqrt; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_SQRT_HPP diff --git a/dsp/lib/sprout/sprout/math/tan.hpp b/dsp/lib/sprout/sprout/math/tan.hpp deleted file mode 100644 index 2190935..0000000 --- a/dsp/lib/sprout/sprout/math/tan.hpp +++ /dev/null @@ -1,78 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_TAN_HPP -#define SPROUT_MATH_TAN_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_tan(float x) { - return __builtin_tanf(x); - } - inline SPROUT_CONSTEXPR double - builtin_tan(double x) { - return __builtin_tan(x); - } - inline SPROUT_CONSTEXPR long double - builtin_tan(long double x) { - return __builtin_tanl(x); - } -#endif - - template - inline SPROUT_CONSTEXPR T - tan_impl(T x) { - return sprout::math::sin(x) / sprout::math::cos(x); - } - } // namespace detail - // - // tan - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - tan(FloatType x) { - return sprout::math::isnan(x) ? x - : x == sprout::numeric_limits::infinity() || x == -sprout::numeric_limits::infinity() - ? -sprout::numeric_limits::quiet_NaN() -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_tan(x) -#else - : x == 0 ? x - : static_cast(sprout::math::detail::tan_impl(static_cast::type>(x))) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - tan(IntType x) { - return sprout::math::tan(static_cast(x)); - } - } // namespace math - - using sprout::math::tan; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_TAN_HPP diff --git a/dsp/lib/sprout/sprout/math/tanh.hpp b/dsp/lib/sprout/sprout/math/tanh.hpp deleted file mode 100644 index f13d9ab..0000000 --- a/dsp/lib/sprout/sprout/math/tanh.hpp +++ /dev/null @@ -1,87 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_TANH_HPP -#define SPROUT_MATH_TANH_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_tanh(float x) { - return __builtin_tanhf(x); - } - inline SPROUT_CONSTEXPR double - builtin_tanh(double x) { - return __builtin_tanh(x); - } - inline SPROUT_CONSTEXPR long double - builtin_tanh(long double x) { - return __builtin_tanhl(x); - } -#endif - - template - inline SPROUT_CONSTEXPR T - tanh_impl_2(T t, T u) { - return (t - u) / (t + u); - } - template - inline SPROUT_CONSTEXPR T - tanh_impl_1(T t) { - return sprout::math::detail::tanh_impl_2(t, T(1) / t); - } - template - inline SPROUT_CONSTEXPR T - tanh_impl(T x) { - return sprout::math::detail::tanh_impl_1(sprout::math::exp(x)); - } - } // namespace detail - // - // tanh - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - tanh(FloatType x) { - return sprout::math::isnan(x) ? x - : x == sprout::numeric_limits::infinity() ? FloatType(1) - : x == -sprout::numeric_limits::infinity() ? FloatType(-1) -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_tanh(x) -#else - : x == 0 ? x - : static_cast(sprout::math::detail::tanh_impl(static_cast::type>(x))) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - tanh(IntType x) { - return sprout::math::tanh(static_cast(x)); - } - } // namespace math - - using sprout::math::tanh; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_TANH_HPP diff --git a/dsp/lib/sprout/sprout/math/tgamma.hpp b/dsp/lib/sprout/sprout/math/tgamma.hpp deleted file mode 100644 index 04e9aae..0000000 --- a/dsp/lib/sprout/sprout/math/tgamma.hpp +++ /dev/null @@ -1,166 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_TGAMMA_HPP -#define SPROUT_MATH_TGAMMA_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_tgamma(float x) { - return __builtin_tgammaf(x); - } - inline SPROUT_CONSTEXPR double - builtin_tgamma(double x) { - return __builtin_tgamma(x); - } - inline SPROUT_CONSTEXPR long double - builtin_tgamma(long double x) { - return __builtin_tgammal(x); - } -#endif - - template - inline SPROUT_CONSTEXPR T - tgamma_impl_y(T w) { - return (((((((((((( - -1.99542863674e-7 * w + 1.337767384067e-6) * w - - 2.591225267689e-6) * w - 1.7545539395205e-5) * w - + 1.45596568617526e-4) * w - 3.60837876648255e-4) * w - - 8.04329819255744e-4) * w + 0.008023273027855346) * w - - 0.017645244547851414) * w - 0.024552490005641278) * w - + 0.19109110138763841) * w - 0.233093736421782878) * w - - 0.422784335098466784) * w + 0.99999999999999999 - ; - } - template - inline SPROUT_CONSTEXPR T - tgamma_impl_t_pos(T x, std::size_t n, std::size_t last) { - return last - n == 1 - ? x - static_cast(n) - : sprout::math::detail::tgamma_impl_t_pos(x, n, n + (last - n) / 2) - * sprout::math::detail::tgamma_impl_t_pos(x, n + (last - n) / 2, last) - ; - } - template - inline SPROUT_CONSTEXPR T - tgamma_impl_t_neg(T x, std::size_t n, std::size_t last) { - return last - n == 1 - ? x + static_cast(n) - : sprout::math::detail::tgamma_impl_t_neg(x, n, n + (last - n) / 2) - * sprout::math::detail::tgamma_impl_t_neg(x, n + (last - n) / 2, last) - ; - } - template - inline SPROUT_CONSTEXPR T - tgamma_impl_t_pos_rec(T x, std::size_t n, std::size_t last) { - return last - n == 1 - ? T(1) / (x - static_cast(n)) - : sprout::math::detail::tgamma_impl_t_pos_rec(x, n, n + (last - n) / 2) - * sprout::math::detail::tgamma_impl_t_pos_rec(x, n + (last - n) / 2, last) - ; - } - template - inline SPROUT_CONSTEXPR T - tgamma_impl_t_neg_rec(T x, std::size_t n, std::size_t last) { - return last - n == 1 - ? T(1) / (x + static_cast(n)) - : sprout::math::detail::tgamma_impl_t_neg_rec(x, n, n + (last - n) / 2) - * sprout::math::detail::tgamma_impl_t_neg_rec(x, n + (last - n) / 2, last) - ; - } - template - inline SPROUT_CONSTEXPR T - tgamma_impl_2_pos_rec(T x, T y, T t) { - return t == 0 ? sprout::numeric_limits::infinity() - : (x - T(1)) / y / t - ; - } - template - inline SPROUT_CONSTEXPR T - tgamma_impl_1(T x, int n) { - return n == 1 ? (x - T(1)) / sprout::math::detail::tgamma_impl_y(x - (n + 2)) - : n == 0 ? T(1) / sprout::math::detail::tgamma_impl_y(x - (n + 2)) - : n == static_cast(sprout::math::factorial_limit()) - ? sprout::math::detail::tgamma_impl_2_pos_rec(x, sprout::math::detail::tgamma_impl_y(x - (n + 2)), sprout::math::detail::tgamma_impl_t_pos_rec(x, 2, n + 1)) - : n == -static_cast(sprout::math::factorial_limit()) - ? T(1) / sprout::math::detail::tgamma_impl_y(x - (n + 2)) * sprout::math::detail::tgamma_impl_t_neg_rec(x, 0, -n) - : n > 1 ? (x - T(1)) / sprout::math::detail::tgamma_impl_y(x - (n + 2)) * sprout::math::detail::tgamma_impl_t_pos(x, 2, n + 1) - : T(1) / sprout::math::detail::tgamma_impl_y(x - (n + 2)) / sprout::math::detail::tgamma_impl_t_neg(x, 0, -n) - ; - } - template - inline SPROUT_CONSTEXPR T - tgamma_impl(T x) { - return sprout::math::detail::tgamma_impl_1( - x, - sprout::clamp( - sprout::math::iround(x - T(2)), - -static_cast(sprout::math::factorial_limit()), - static_cast(sprout::math::factorial_limit()) - ) - ); - } - } // namespace detail - // - // tgamma - // - // issue: - // [ !(SPROUT_USE_BUILTIN_CMATH_FUNCTION || SPROUT_USE_BUILTIN_COPYSIGN_FUNCTION) ] - // tgamma(-0) returns - . - // # returns + . ( same as tgamma(+0) ) - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - tgamma(FloatType x) { - return sprout::math::isnan(x) ? x - : x == 0 ? sprout::math::copysign(sprout::numeric_limits::infinity(), x) - : x == -sprout::numeric_limits::infinity() ? -sprout::numeric_limits::quiet_NaN() - : x == sprout::numeric_limits::infinity() ? sprout::numeric_limits::infinity() - : x < 0 && sprout::math::is_integer(x) ? sprout::numeric_limits::quiet_NaN() -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_tgamma(x) -#else - : static_cast(sprout::math::detail::tgamma_impl(static_cast::type>(x))) -#endif - ; - } - - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - tgamma(IntType x) { - return sprout::math::tgamma(static_cast(x)); - } - } // namespace math - - using sprout::math::tgamma; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_TGAMMA_HPP diff --git a/dsp/lib/sprout/sprout/math/trigonometric.hpp b/dsp/lib/sprout/sprout/math/trigonometric.hpp deleted file mode 100644 index 2ffc858..0000000 --- a/dsp/lib/sprout/sprout/math/trigonometric.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_TRIGONOMETRIC_HPP -#define SPROUT_MATH_TRIGONOMETRIC_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_MATH_TRIGONOMETRIC_HPP diff --git a/dsp/lib/sprout/sprout/math/trunc.hpp b/dsp/lib/sprout/sprout/math/trunc.hpp deleted file mode 100644 index 16c193e..0000000 --- a/dsp/lib/sprout/sprout/math/trunc.hpp +++ /dev/null @@ -1,74 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MATH_TRUNC_HPP -#define SPROUT_MATH_TRUNC_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace math { - namespace detail { -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - inline SPROUT_CONSTEXPR float - builtin_trunc(float x) { - return __builtin_truncf(x); - } - inline SPROUT_CONSTEXPR double - builtin_trunc(double x) { - return __builtin_trunc(x); - } - inline SPROUT_CONSTEXPR long double - builtin_trunc(long double x) { - return __builtin_truncl(x); - } -#endif - } // namespace detail - // - // trunc - // - template< - typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - trunc(FloatType x) { - return sprout::math::isnan(x) ? x - : x == sprout::numeric_limits::infinity() ? sprout::numeric_limits::infinity() - : x == -sprout::numeric_limits::infinity() ? -sprout::numeric_limits::infinity() -#if SPROUT_USE_BUILTIN_CMATH_FUNCTION - : sprout::math::detail::builtin_trunc(x) -#else - : x == 0 ? x - : sprout::numeric_limits::max() < x || sprout::numeric_limits::max() < -x - ? SPROUT_MATH_THROW_LARGE_FLOAT_ROUNDING(std::runtime_error("trunc: large float rounding."), x) - : x < 0 ? -static_cast(static_cast(-x)) - : static_cast(static_cast(x)) -#endif - ; - } - template< - typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR double - trunc(IntType x) { - return sprout::math::trunc(static_cast(x)); - } - } // namespace math - - using sprout::math::trunc; -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_TRUNC_HPP diff --git a/dsp/lib/sprout/sprout/memory.hpp b/dsp/lib/sprout/sprout/memory.hpp deleted file mode 100644 index 157df35..0000000 --- a/dsp/lib/sprout/sprout/memory.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MEMORY_HPP -#define SPROUT_MEMORY_HPP - -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_MEMORY_HPP diff --git a/dsp/lib/sprout/sprout/memory/addressof.hpp b/dsp/lib/sprout/sprout/memory/addressof.hpp deleted file mode 100644 index ebf97af..0000000 --- a/dsp/lib/sprout/sprout/memory/addressof.hpp +++ /dev/null @@ -1,154 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MEMORY_ADDRESSOF_HPP -#define SPROUT_MEMORY_ADDRESSOF_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout_adl { - sprout::not_found_via_adl get_addressof(...); -} // namespace sprout_adl - -namespace sprout { - namespace detail { - struct address_op_helper {}; - void operator&(sprout::detail::address_op_helper const&); - - template - struct has_mem_address_op_test { - public: - template< - typename U = T, - typename = typename sprout::identity().operator&())>::type - > - static sprout::true_type test(int); - static sprout::false_type test(...); - }; -#if defined(_MSC_VER) && (_MSC_VER > 1900) - template::test(0))>::type> - struct has_mem_address_op - : public Base_ - {}; -#else - template - struct has_mem_address_op - : public sprout::identity::test(0))>::type - {}; -#endif - - template - struct has_nonmem_address_op_test { - public: - template< - typename U = T, - typename = typename sprout::identity()))>::type - > - static sprout::true_type test(int); - static sprout::false_type test(...); - }; -#if defined(_MSC_VER) && (_MSC_VER > 1900) - template::test(0))>::type> - struct has_nonmem_address_op - : public Base_ - {}; -#else - template - struct has_nonmem_address_op - : public sprout::identity::test(0))>::type - {}; -#endif - - template - struct has_address_op - : public sprout::bool_constant< - sprout::detail::has_mem_address_op::value || sprout::detail::has_nonmem_address_op::value - > - {}; - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::detail::has_address_op::value, - T* - >::type - get_addressof_impl(T& t) SPROUT_NOEXCEPT { - return std::addressof(t); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::has_address_op::value, - T* - >::type - get_addressof_impl(T& t) SPROUT_NOEXCEPT { - return &t; - } - } // namespace detail -} // namespace sprout - -namespace sprout_addressof_detail { - template - inline SPROUT_CONSTEXPR T* - get_addressof(T& t) SPROUT_NOEXCEPT { - return sprout::detail::get_addressof_impl(t); - } -} // namespace sprout_addressof_detail - -namespace sprout { - // - // address_traits - // - template - struct address_traits { - public: - template - static SPROUT_CONSTEXPR U* - get_addressof(U& t) SPROUT_NOEXCEPT { - using sprout_addressof_detail::get_addressof; - using sprout_adl::get_addressof; - return get_addressof(t); - } - }; - template - struct address_traits - : public sprout::address_traits - {}; - template - struct address_traits - : public sprout::address_traits - {}; - template - struct address_traits - : public sprout::address_traits - {}; -} // namespace sprout - -namespace sprout { - // - // addressof - // - // effect: - // sprout::address_traits::get_addressof(t) - // [default] - // ADL callable get_addressof(t) -> get_addressof(t) - // [default] - // no overloaded operator&() -> &t - // otherwise -> std::addressof(t) - // - template - inline SPROUT_CONSTEXPR T* - addressof(T& t) SPROUT_NOEXCEPT { - return sprout::address_traits::get_addressof(t); - } -} // namespace sprout - -#endif // #ifndef SPROUT_MEMORY_ADDRESSOF_HPP diff --git a/dsp/lib/sprout/sprout/memory/exempt_ptr.hpp b/dsp/lib/sprout/sprout/memory/exempt_ptr.hpp deleted file mode 100644 index 56ca724..0000000 --- a/dsp/lib/sprout/sprout/memory/exempt_ptr.hpp +++ /dev/null @@ -1,376 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MEMORY_EXEMPT_PTR_HPP -#define SPROUT_MEMORY_EXEMPT_PTR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // exempt_ptr - // - template - class exempt_ptr { - public: - typedef T value_type; - typedef T element_type; - typedef T* pointer; - typedef T const* const_pointer; - typedef T& reference; - typedef T const& const_reference; - typedef std::ptrdiff_t difference_type; - typedef std::random_access_iterator_tag iterator_category; - private: - pointer p_; - private: - template - static SPROUT_CONSTEXPR bool is_compat() { - return std::is_convertible::value; - } - public: - SPROUT_CONSTEXPR exempt_ptr() SPROUT_NOEXCEPT - : p_() - {} - SPROUT_CONSTEXPR exempt_ptr(std::nullptr_t) SPROUT_NOEXCEPT - : exempt_ptr() - {} - explicit SPROUT_CONSTEXPR exempt_ptr(pointer other) SPROUT_NOEXCEPT - : p_(other) - {} - template< - typename U, - typename sprout::enabler_if::value>::type = sprout::enabler - > - explicit SPROUT_CONSTEXPR exempt_ptr(U* other) SPROUT_NOEXCEPT - : p_(other) - {} - template< - typename U, - typename sprout::enabler_if::value>::type = sprout::enabler - > - SPROUT_CONSTEXPR exempt_ptr(sprout::exempt_ptr const& other) SPROUT_NOEXCEPT - : p_(other.get()) - {} - SPROUT_CXX14_CONSTEXPR exempt_ptr& - operator=(std::nullptr_t) SPROUT_NOEXCEPT { - reset(); - return *this; - } - template< - typename U, - typename sprout::enabler_if::value>::type = sprout::enabler - > - SPROUT_CXX14_CONSTEXPR exempt_ptr& - operator=(U* other) SPROUT_NOEXCEPT { - reset(other); - return *this; - } - template< - typename U, - typename sprout::enabler_if::value>::type = sprout::enabler - > - SPROUT_CXX14_CONSTEXPR exempt_ptr& - operator=(exempt_ptr const& other) SPROUT_NOEXCEPT { - reset(other.get()); - return *this; - } - SPROUT_CONSTEXPR pointer - get() const SPROUT_NOEXCEPT { - return p_; - } - SPROUT_CONSTEXPR reference - operator*() const SPROUT_NOEXCEPT { - return *get(); - } - SPROUT_CONSTEXPR pointer - operator->() const SPROUT_NOEXCEPT { - return get(); - } - SPROUT_EXPLICIT_CONVERSION SPROUT_CONSTEXPR operator bool() const SPROUT_NOEXCEPT { - return get(); - } - SPROUT_EXPLICIT_CONVERSION SPROUT_CONSTEXPR operator pointer() const SPROUT_NOEXCEPT { - return get(); - } - SPROUT_CXX14_CONSTEXPR pointer - release() SPROUT_NOEXCEPT { - pointer old = get(); - reset(); - return old; - } - SPROUT_CXX14_CONSTEXPR void - reset(pointer t = 0) SPROUT_NOEXCEPT { - p_ = t; - } - SPROUT_CXX14_CONSTEXPR void - swap(exempt_ptr& other) SPROUT_NOEXCEPT { - swap(p_, other.p_); - } - SPROUT_CXX14_CONSTEXPR exempt_ptr& - operator++() { - ++p_; - return *this; - } - SPROUT_CXX14_CONSTEXPR exempt_ptr& - operator--() { - --p_; - return *this; - } - SPROUT_CXX14_CONSTEXPR exempt_ptr operator++(int) { - pointer tmp = p_; ++p_; return exempt_ptr{tmp}; - } - SPROUT_CXX14_CONSTEXPR exempt_ptr operator--(int) { - pointer tmp = p_; --p_; return exempt_ptr{tmp}; - } - SPROUT_CXX14_CONSTEXPR exempt_ptr - operator+() const { - return *this; } - SPROUT_CXX14_CONSTEXPR exempt_ptr - operator+(std::ptrdiff_t d) const { - return exempt_ptr{p_+d}; - } - SPROUT_CXX14_CONSTEXPR exempt_ptr - operator-(std::ptrdiff_t d) const { - return exempt_ptr{p_-d}; - } - SPROUT_CXX14_CONSTEXPR value_type& - operator[](std::ptrdiff_t k) { - return p_[k]; - } - SPROUT_CXX14_CONSTEXPR value_type const& - operator[](std::ptrdiff_t k) const { - return p_[k]; - } - }; - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::exempt_ptr& x, sprout::exempt_ptr& y) SPROUT_NOEXCEPT { - x.swap(y); - } - // - // make_exempt - // - template - inline SPROUT_CONSTEXPR sprout::exempt_ptr - make_exempt(T* p) SPROUT_NOEXCEPT { - return sprout::exempt_ptr(p); - } - // - // operator== - // operator!= - // - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::exempt_ptr const& x, sprout::exempt_ptr const& y) SPROUT_NOEXCEPT { - return x.get() == y.get(); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::exempt_ptr const& x, sprout::exempt_ptr const& y) SPROUT_NOEXCEPT { - return !(x == y); - } - - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::exempt_ptr const& x, std::nullptr_t) SPROUT_NOEXCEPT { - return !x; - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::exempt_ptr const& x, std::nullptr_t) SPROUT_NOEXCEPT { - return static_cast(x); - } - - template - inline SPROUT_CONSTEXPR bool - operator==(std::nullptr_t, sprout::exempt_ptr const& y) SPROUT_NOEXCEPT { - return !y; - } - template - inline SPROUT_CONSTEXPR bool - operator!=(std::nullptr_t, sprout::exempt_ptr const& y) SPROUT_NOEXCEPT { - return static_cast(y); - } - // - // operator< - // operator> - // operator=< - // operator=> - // - template - inline SPROUT_CONSTEXPR bool - operator<(sprout::exempt_ptr const& x, sprout::exempt_ptr const& y) { - typedef typename sprout::common_decay::type type; - return sprout::less()(x.get(), y.get()); - } - template - inline SPROUT_CONSTEXPR bool - operator>(sprout::exempt_ptr const& x, sprout::exempt_ptr const& y) { - return y < x; - } - template - inline SPROUT_CONSTEXPR bool - operator<=(sprout::exempt_ptr const& x, sprout::exempt_ptr const& y) { - return !(y < x); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(sprout::exempt_ptr const& x, sprout::exempt_ptr const& y) { - return !(x < y); - } - - template - inline SPROUT_CONSTEXPR bool - operator<(sprout::exempt_ptr const& x, std::nullptr_t y) { - return sprout::less()(x.get(), y); - } - template - inline SPROUT_CONSTEXPR bool - operator>(sprout::exempt_ptr const& x, std::nullptr_t y) { - return y < x; - } - template - inline SPROUT_CONSTEXPR bool - operator<=(sprout::exempt_ptr const& x, std::nullptr_t y) { - return !(y < x); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(sprout::exempt_ptr const& x, std::nullptr_t y) { - return !(x < y); - } - - template - inline SPROUT_CONSTEXPR bool - operator<(std::nullptr_t x, sprout::exempt_ptr const& y) { - return sprout::less()(x, y.get()); - } - template - inline SPROUT_CONSTEXPR bool - operator>(std::nullptr_t x, sprout::exempt_ptr const& y) { - return y < x; - } - template - inline SPROUT_CONSTEXPR bool - operator<=(std::nullptr_t x, sprout::exempt_ptr const& y) { - return !(y < x); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(std::nullptr_t x, sprout::exempt_ptr const& y) { - return !(x < y); - } - // - // operator+ - // operator- - // - template - inline SPROUT_CONSTEXPR sprout::exempt_ptr - operator+(std::ptrdiff_t d, sprout::exempt_ptr const& p) { - return p + d; - } - template - inline SPROUT_CONSTEXPR std::ptrdiff_t - operator-(sprout::exempt_ptr const& x, sprout::exempt_ptr const& y) { - return x.get() - y.get(); - } - // - // operator<< - // - template - inline SPROUT_CONSTEXPR std::basic_ostream& - operator<<(std::basic_ostream& lhs, sprout::exempt_ptr const& rhs) { - return lhs << rhs.get(); - } -} // namespace sprout - -namespace sprout { - // - // hash_value - // - template - inline SPROUT_CONSTEXPR std::size_t - hash_value(sprout::exempt_ptr const& v) { - return sprout::hash_value(v.get()); - } -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // hash - // - template - struct hash > - : public sprout::hash > - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -namespace sprout { - // - // static_pointer_cast - // const_pointer_cast - // dynamic_pointer_cast - // reinterpret_pointer_cast - // - template - inline SPROUT_CONSTEXPR sprout::exempt_ptr - static_pointer_cast(sprout::exempt_ptr const& p) { - typedef typename sprout::exempt_ptr::element_type element_type; - return sprout::exempt_ptr(sprout::static_pointer_cast(p.get())); - } - template - inline SPROUT_CONSTEXPR sprout::exempt_ptr - const_pointer_cast(sprout::exempt_ptr const& p) { - typedef typename sprout::exempt_ptr::element_type element_type; - return sprout::exempt_ptr(sprout::const_pointer_cast(p.get())); - } - template - inline SPROUT_CONSTEXPR sprout::exempt_ptr - dynamic_pointer_cast(sprout::exempt_ptr const& p) { - typedef typename sprout::exempt_ptr::element_type element_type; - return sprout::exempt_ptr(sprout::dynamic_pointer_cast(p.get())); - } - template - inline SPROUT_CONSTEXPR sprout::exempt_ptr - reinterpret_pointer_cast(sprout::exempt_ptr const& p) { - typedef typename sprout::exempt_ptr::element_type element_type; - return sprout::exempt_ptr(sprout::reinterpret_pointer_cast(p.get())); - } - - // - // get_pointer - // - template - inline SPROUT_NON_CONSTEXPR T* - get_pointer(sprout::exempt_ptr const& p) SPROUT_NOEXCEPT { - return p.get(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_MEMORY_EXEMPT_PTR_HPP diff --git a/dsp/lib/sprout/sprout/memory/get_pointer.hpp b/dsp/lib/sprout/sprout/memory/get_pointer.hpp deleted file mode 100644 index 6e5548e..0000000 --- a/dsp/lib/sprout/sprout/memory/get_pointer.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MEMORY_GET_POINTER_HPP -#define SPROUT_MEMORY_GET_POINTER_HPP - -#include -#include - -namespace sprout { - // - // get_pointer - // - template - inline SPROUT_CONSTEXPR T* - get_pointer(T* p) SPROUT_NOEXCEPT { - return p; - } - -#if !defined(SPROUT_NO_AUTO_PTR) - template - inline SPROUT_NON_CONSTEXPR T* - get_pointer(std::auto_ptr const& p) SPROUT_NOEXCEPT { - return p.get(); - } -#endif - -#if !defined(SPROUT_NO_CXX11_SMART_PTR) - template - inline SPROUT_NON_CONSTEXPR T* - get_pointer(std::unique_ptr const& p) SPROUT_NOEXCEPT { - return p.get(); - } - - template - inline SPROUT_NON_CONSTEXPR T* - get_pointer(std::shared_ptr const& p) SPROUT_NOEXCEPT { - return p.get(); - } -#endif -} // namespace sprout - - -#endif // #ifndef SPROUT_MEMORY_GET_POINTER_HPP diff --git a/dsp/lib/sprout/sprout/memory/observer_ptr.hpp b/dsp/lib/sprout/sprout/memory/observer_ptr.hpp deleted file mode 100644 index 87bccb7..0000000 --- a/dsp/lib/sprout/sprout/memory/observer_ptr.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MEMORY_OBSERVER_PTR_HPP -#define SPROUT_MEMORY_OBSERVER_PTR_HPP - -#include -#include - -namespace sprout { - // - // make_observer - // - template - inline SPROUT_CONSTEXPR sprout::exempt_ptr - make_observer(T* p) SPROUT_NOEXCEPT { - return sprout::exempt_ptr(p); - } - -#if SPROUT_USE_TEMPLATE_ALIASES - // - // observer_ptr - // - template - using observer_ptr = sprout::exempt_ptr; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_MEMORY_OBSERVER_PTR_HPP diff --git a/dsp/lib/sprout/sprout/memory/pointer_cast.hpp b/dsp/lib/sprout/sprout/memory/pointer_cast.hpp deleted file mode 100644 index 5e87183..0000000 --- a/dsp/lib/sprout/sprout/memory/pointer_cast.hpp +++ /dev/null @@ -1,69 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_MEMORY_POINTER_CAST_HPP -#define SPROUT_MEMORY_POINTER_CAST_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // static_pointer_cast - // const_pointer_cast - // dynamic_pointer_cast - // reinterpret_pointer_cast - // - template - inline SPROUT_CONSTEXPR T* - static_pointer_cast(U* p) { - return static_cast(p); - } - template - inline SPROUT_CONSTEXPR T* - const_pointer_cast(U* p) { - return const_cast(p); - } - template - inline SPROUT_CONSTEXPR T* - dynamic_pointer_cast(U* p) { - return sprout::dyn_cast(p); - } - template - inline SPROUT_CONSTEXPR T* - reinterpret_pointer_cast(U* p) { - return sprout::reinter_cast(p); - } - -#if !defined(SPROUT_NO_CXX11_SMART_PTR) - template - inline SPROUT_NON_CONSTEXPR std::shared_ptr - static_pointer_cast(std::shared_ptr const& p) { - return std::static_pointer_cast(p); - } - template - inline SPROUT_NON_CONSTEXPR std::shared_ptr - const_pointer_cast(std::shared_ptr const& p) { - return std::const_pointer_cast(p); - } - template - inline SPROUT_NON_CONSTEXPR std::shared_ptr - dynamic_pointer_cast(std::shared_ptr const& p) { - return std::dynamic_pointer_cast(p); - } - template - inline SPROUT_NON_CONSTEXPR std::shared_ptr - reinterpret_pointer_cast(std::shared_ptr const& p) { - typedef typename std::shared_ptr::element_type element_type; - return std::shared_ptr(p, reinterpret_cast(p.get())); - } -#endif -} // namespace sprout - -#endif // #ifndef SPROUT_MEMORY_POINTER_CAST_HPP diff --git a/dsp/lib/sprout/sprout/net.hpp b/dsp/lib/sprout/sprout/net.hpp deleted file mode 100644 index b49e5ea..0000000 --- a/dsp/lib/sprout/sprout/net.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Copyright (c) 2015 Chris KAY - https://github.com/cjkay-cpp-utils/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NET_HPP -#define SPROUT_NET_HPP - -#include -#include - -#endif // #ifndef SPROUT_NET_HPP diff --git a/dsp/lib/sprout/sprout/net/endian.hpp b/dsp/lib/sprout/sprout/net/endian.hpp deleted file mode 100644 index ebd7432..0000000 --- a/dsp/lib/sprout/sprout/net/endian.hpp +++ /dev/null @@ -1,199 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Copyright (c) 2015 Chris KAY - https://github.com/cjkay-cpp-utils/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NET_ENDIAN_HPP -#define SPROUT_NET_ENDIAN_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace net { - namespace detail { - /* - * lshift_by - * Left shift 'val' by 'n' bytes - */ - template - inline SPROUT_CONSTEXPR T - lshift_by(T val, std::uint_fast8_t n) { - return val << (n * 8); - } - - /* - * rshift_by - * Right shift 'val' by 'n' bytes - */ - template - inline SPROUT_CONSTEXPR T - rshift_by(T val, std::uint_fast8_t n) { - return val >> (n * 8); - } - - /* - * mask_t - * Mask 'n'th byte - */ - template - inline SPROUT_CONSTEXPR T - mask_at(std::uint_fast8_t n) { - return sprout::net::detail::lshift_by(T(0xFF), n); - } - - /* - * byte_at - * Get 'n'th byte from 'val' - */ - template - inline SPROUT_CONSTEXPR std::uint_fast8_t - byte_at(T val, std::uint_fast8_t n) { - return static_cast( - sprout::net::detail::rshift_by((val & sprout::net::detail::mask_at(n)), n) - ); - } - - /* - * replace_at - * Replace, in 'val', 'n'th byte with 'byte_val' - */ - template - inline SPROUT_CONSTEXPR T - replace_at(T val, std::uint8_t byte_val, std::uint_fast8_t n) { - return (val & ~sprout::net::detail::mask_at(n)) | sprout::net::detail::lshift_by(T(byte_val), n); - } - - /* - * copy - * Copy, in 'val', byte at index 'from' to byte at index 'to' - */ - template - inline SPROUT_CONSTEXPR T - copy(T val, std::uint_fast8_t from, std::uint_fast8_t to) { - return sprout::net::detail::replace_at(val, sprout::net::detail::byte_at(val, from), to); - } - - /* - * swap - * Swap, in 'val', byte at index 'n1' with byte at index 'n2' - */ - template - inline SPROUT_CONSTEXPR T - swap(T val, std::uint_fast8_t n1, std::uint_fast8_t n2) { - return sprout::net::detail::replace_at(sprout::net::detail::copy(val, n1, n2), sprout::net::detail::byte_at(val, n2), n1); - } - - /* - * reverse_impl - * Swap, in 'val', byte at index 'n1' with byte at index 'n2' in 'val', increment n1, decrement n2 until n1 > n2 - */ - template - inline SPROUT_CONSTEXPR T - reverse_impl(T val, std::uint_fast8_t n1, std::uint_fast8_t n2) { - return n1 > n2 ? val : sprout::net::detail::reverse_impl(sprout::net::detail::swap(val, n1, n2), n1 + 1, n2 - 1); - } - - /* - * reverse - * Reverse 'val' - */ - template - inline SPROUT_CONSTEXPR T - reverse(T val) { - return sprout::net::detail::reverse_impl(val, 0, sizeof(T) - 1); - } - - /* - * reverse_words_impl - * Swap, in 'val', byte at index 'n' - 1 with byte at index 'n' - 2, decrement n by 2 until n == 0 - */ - template - inline SPROUT_CONSTEXPR T - reverse_words_impl(T val, std::uint_fast8_t n) { - return n == 0 ? val : sprout::net::detail::reverse_words_impl(swap(val, n - 1, n - 2), n - 2); - } - - /* - * reverse_words - * Reverse each word in 'val' - */ - template - inline SPROUT_CONSTEXPR T - reverse_words(T val) { - return sprout::net::detail::reverse_words_impl(val, sizeof(T)); - } - } // namespace detail - - // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3620.pdf - // template<> - // constexpr unsigned-integral hton(unsigned-integral host) - template - inline SPROUT_CONSTEXPR T - hton SPROUT_PREVENT_MACRO_SUBSTITUTION (T host) { -#if defined(SPROUT_BIG_ENDIAN) - return host; -#elif defined(SPROUT_LITTLE_ENDIAN) - return sprout::net::detail::reverse(host); -#elif defined(SPROUT_PDP_ENDIAN) - return sprout::net::detail::reverse_words(host); -#else - return SPROUT_ASSERT_MSG(0, "hton: unsupported endian"), host; -#endif - } - - // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3620.pdf - // template<> - // constexpr unsigned-integral ntoh(unsigned-integral net) - template - inline SPROUT_CONSTEXPR T - ntoh SPROUT_PREVENT_MACRO_SUBSTITUTION (T net) { -#if defined(SPROUT_BIG_ENDIAN) - return net; -#elif defined(SPROUT_LITTLE_ENDIAN) - return sprout::net::detail::reverse(net); -#elif defined(SPROUT_PDP_ENDIAN) - return sprout::net::detail::reverse_words(host); -#else - return SPROUT_ASSERT_MSG(0, "ntoh: unsupported endian"), net; -#endif - } - - // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3620.pdf - // uint32_t htonl(uint32_t host32) - inline SPROUT_CONSTEXPR std::uint32_t - htonl SPROUT_PREVENT_MACRO_SUBSTITUTION (std::uint32_t host32) { - return sprout::net::hton SPROUT_PREVENT_MACRO_SUBSTITUTION (host32); - } - - // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3620.pdf - // uint16_t htons(uint16_t host16) - inline SPROUT_CONSTEXPR std::uint16_t - htons SPROUT_PREVENT_MACRO_SUBSTITUTION (std::uint16_t host16) { - return sprout::net::hton SPROUT_PREVENT_MACRO_SUBSTITUTION (host16); - } - - // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3620.pdf - // uint32_t ntohl(uint32_t net32) - inline SPROUT_CONSTEXPR std::uint32_t - ntohl SPROUT_PREVENT_MACRO_SUBSTITUTION (std::uint32_t net32) { - return sprout::net::ntoh SPROUT_PREVENT_MACRO_SUBSTITUTION (net32); - } - - // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3620.pdf - // uint16_t ntohs(uint32_t net16) - inline SPROUT_CONSTEXPR std::uint16_t - ntohs SPROUT_PREVENT_MACRO_SUBSTITUTION (std::uint16_t net16) { - return sprout::net::ntoh SPROUT_PREVENT_MACRO_SUBSTITUTION (net16); - } - } //namespace net -} // namespace sprout - -#endif // #ifndef SPROUT_NET_ENDIAN_HPP diff --git a/dsp/lib/sprout/sprout/none.hpp b/dsp/lib/sprout/sprout/none.hpp deleted file mode 100644 index aa4f8bb..0000000 --- a/dsp/lib/sprout/sprout/none.hpp +++ /dev/null @@ -1,24 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NONE_HPP -#define SPROUT_NONE_HPP - -#include - -namespace sprout { - // - // none_t - // none - // - struct none_t {}; - namespace { - SPROUT_STATIC_CONSTEXPR none_t none = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_NONE_HPP diff --git a/dsp/lib/sprout/sprout/numeric.hpp b/dsp/lib/sprout/sprout/numeric.hpp deleted file mode 100644 index 3034e76..0000000 --- a/dsp/lib/sprout/sprout/numeric.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_HPP -#define SPROUT_NUMERIC_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_HPP diff --git a/dsp/lib/sprout/sprout/numeric/accumulate.hpp b/dsp/lib/sprout/sprout/numeric/accumulate.hpp deleted file mode 100644 index 644e946..0000000 --- a/dsp/lib/sprout/sprout/numeric/accumulate.hpp +++ /dev/null @@ -1,130 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_ACCUMLATE_HPP -#define SPROUT_NUMERIC_ACCUMLATE_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR T - accumulate_ra( - RandomAccessIterator const& first, RandomAccessIterator const& last, BinaryOperation binary_op, - typename std::iterator_traits::difference_type pivot, T const& init - ) - { - return pivot == 0 ? binary_op(init, *first) - : sprout::detail::accumulate_ra( - sprout::next(first, pivot), last, binary_op, - (sprout::distance(first, last) - pivot) / 2, - sprout::detail::accumulate_ra( - first, sprout::next(first, pivot), binary_op, - pivot / 2, - init - ) - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - T - >::type - accumulate( - RandomAccessIterator const& first, RandomAccessIterator const& last, T init, BinaryOperation binary_op, - std::random_access_iterator_tag* - ) - { - return first == last ? init - : sprout::detail::accumulate_ra( - first, last, binary_op, - sprout::distance(first, last) / 2, - init - ) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::pair - accumulate_impl_1( - sprout::pair const& current, - InputIterator const& last, BinaryOperation binary_op, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair type; - return current.first == last ? current - : n == 1 ? type(sprout::next(current.first), binary_op(current.second, *current.first)) - : sprout::detail::accumulate_impl_1( - sprout::detail::accumulate_impl_1( - current, - last, binary_op, n / 2 - ), - last, binary_op, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - accumulate_impl( - sprout::pair const& current, - InputIterator const& last, BinaryOperation binary_op, typename std::iterator_traits::difference_type n - ) - { - return current.first == last ? current - : sprout::detail::accumulate_impl( - sprout::detail::accumulate_impl_1( - current, - last, binary_op, n - ), - last, binary_op, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR T - accumulate( - InputIterator const& first, InputIterator const& last, T init, BinaryOperation binary_op, - std::input_iterator_tag* - ) - { - typedef sprout::pair type; - return sprout::detail::accumulate_impl(type(first, init), last, binary_op, 1).second; - } - } // namespace detail - - // - // accumulate - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR T - accumulate(InputIterator first, InputIterator last, T init, BinaryOperation binary_op) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::detail::accumulate(first, last, init, binary_op, category()); - } - - template - inline SPROUT_CONSTEXPR T - accumulate(InputIterator first, InputIterator last, T init) { - return sprout::accumulate( - first, last, init, - sprout::plus<>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_ACCUMLATE_HPP diff --git a/dsp/lib/sprout/sprout/numeric/adjacent_difference.hpp b/dsp/lib/sprout/sprout/numeric/adjacent_difference.hpp deleted file mode 100644 index 59ac4e5..0000000 --- a/dsp/lib/sprout/sprout/numeric/adjacent_difference.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_ADJACENT_DIFFERENCE_HPP -#define SPROUT_NUMERIC_ADJACENT_DIFFERENCE_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_ADJACENT_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/numeric/cxx14.hpp b/dsp/lib/sprout/sprout/numeric/cxx14.hpp deleted file mode 100644 index 3e0d75b..0000000 --- a/dsp/lib/sprout/sprout/numeric/cxx14.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_CXX14_HPP -#define SPROUT_NUMERIC_CXX14_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_CXX14_HPP diff --git a/dsp/lib/sprout/sprout/numeric/cxx14/adjacent_difference.hpp b/dsp/lib/sprout/sprout/numeric/cxx14/adjacent_difference.hpp deleted file mode 100644 index 402bff9..0000000 --- a/dsp/lib/sprout/sprout/numeric/cxx14/adjacent_difference.hpp +++ /dev/null @@ -1,54 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_CXX14_ADJACENT_DIFFERENCE_HPP -#define SPROUT_NUMERIC_CXX14_ADJACENT_DIFFERENCE_HPP - -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - // - // 26.7.5 Adjacent difference - // - template< - typename InputIterator, typename OutputIterator, typename BinaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - adjacent_difference(InputIterator first, InputIterator last, OutputIterator result, BinaryOperation binary_op) { - typedef typename std::iterator_traits::value_type value_type; - if (first == last) { - return result; - } - value_type acc = *first; - *result = acc; - while (++first != last) { - value_type val = *first; - *++result = binary_op(val, acc); - acc = sprout::move(val); - } - return ++result; - } - template< - typename InputIterator, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - adjacent_difference(InputIterator first, InputIterator last, OutputIterator result) { - return sprout::adjacent_difference( - first, last, result, - NS_SSCRISK_CEL_OR_SPROUT::minus::value_type>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_CXX14_ADJACENT_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/numeric/cxx14/exclusive_scan.hpp b/dsp/lib/sprout/sprout/numeric/cxx14/exclusive_scan.hpp deleted file mode 100644 index d370071..0000000 --- a/dsp/lib/sprout/sprout/numeric/cxx14/exclusive_scan.hpp +++ /dev/null @@ -1,53 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_CXX14_EXCLUSIVE_SCAN_HPP -#define SPROUT_NUMERIC_CXX14_EXCLUSIVE_SCAN_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // 29.8.7 Exclusive scan - // - template< - typename InputIterator, typename OutputIterator, typename T, typename BinaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - exclusive_scan(InputIterator first, InputIterator last, OutputIterator result, T init, BinaryOperation binary_op) { - typedef typename std::iterator_traits::value_type value_type; - value_type sum = sprout::move(init); - *result = sum; - if (first == last) { - return ++result; - } - value_type temp = *first; - while (++first != last) { - sum = binary_op(sum, temp); - *++result = sum; - temp = *first; - } - return ++result; - } - template< - typename InputIterator, typename OutputIterator, typename T, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - exclusive_scan(InputIterator first, InputIterator last, OutputIterator result, T init) { - return sprout::exclusive_scan( - first, last, result, init, - NS_SSCRISK_CEL_OR_SPROUT::plus::value_type>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_CXX14_EXCLUSIVE_SCAN_HPP diff --git a/dsp/lib/sprout/sprout/numeric/cxx14/inclusive_scan.hpp b/dsp/lib/sprout/sprout/numeric/cxx14/inclusive_scan.hpp deleted file mode 100644 index d6cb6ce..0000000 --- a/dsp/lib/sprout/sprout/numeric/cxx14/inclusive_scan.hpp +++ /dev/null @@ -1,59 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_CXX14_INCLUSIVE_SCAN_HPP -#define SPROUT_NUMERIC_CXX14_INCLUSIVE_SCAN_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // 29.8.8 Inclusive scan - // - template< - typename InputIterator, typename OutputIterator, typename BinaryOperation, typename T, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - inclusive_scan(InputIterator first, InputIterator last, OutputIterator result, BinaryOperation binary_op, T init) { - typedef typename std::iterator_traits::value_type value_type; - value_type sum = sprout::move(init); - *result = sum; - if (first == last) { - return ++result; - } - sum = binary_op(sum, *first); - *++result = sum; - while (++first != last) { - sum = binary_op(sum, *first); - *++result = sum; - } - return ++result; - } - template< - typename InputIterator, typename OutputIterator, typename BinaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - inclusive_scan(InputIterator first, InputIterator last, OutputIterator result, BinaryOperation binary_op) { - return sprout::partial_sum(first, last, result, binary_op); - } - template< - typename InputIterator, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - inclusive_scan(InputIterator first, InputIterator last, OutputIterator result) { - return sprout::partial_sum(first, last, result); - } -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_CXX14_INCLUSIVE_SCAN_HPP diff --git a/dsp/lib/sprout/sprout/numeric/cxx14/iota.hpp b/dsp/lib/sprout/sprout/numeric/cxx14/iota.hpp deleted file mode 100644 index 21f3e36..0000000 --- a/dsp/lib/sprout/sprout/numeric/cxx14/iota.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_CXX14_IOTA_HPP -#define SPROUT_NUMERIC_CXX14_IOTA_HPP - -#include - -namespace sprout { - // - // 26.7.6 Iota - // - template - inline SPROUT_CXX14_CONSTEXPR void - iota(ForwardIterator first, ForwardIterator last, T value) { - while (first != last) { - *first++ = value; - ++value; - } - } -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_CXX14_IOTA_HPP diff --git a/dsp/lib/sprout/sprout/numeric/cxx14/partial_sum.hpp b/dsp/lib/sprout/sprout/numeric/cxx14/partial_sum.hpp deleted file mode 100644 index 55ad82b..0000000 --- a/dsp/lib/sprout/sprout/numeric/cxx14/partial_sum.hpp +++ /dev/null @@ -1,52 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_CXX14_PARTIAL_SUM_HPP -#define SPROUT_NUMERIC_CXX14_PARTIAL_SUM_HPP - -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - // - // 26.7.4 Partial sum - // - template< - typename InputIterator, typename OutputIterator, typename BinaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - partial_sum(InputIterator first, InputIterator last, OutputIterator result, BinaryOperation binary_op) { - typedef typename std::iterator_traits::value_type value_type; - if (first == last) { - return result; - } - value_type sum = *first; - *result = sum; - while (++first != last) { - sum = binary_op(sum, *first); - *++result = sum; - } - return ++result; - } - template< - typename InputIterator, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - partial_sum(InputIterator first, InputIterator last, OutputIterator result) { - return sprout::partial_sum( - first, last, result, - NS_SSCRISK_CEL_OR_SPROUT::plus::value_type>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_CXX14_PARTIAL_SUM_HPP diff --git a/dsp/lib/sprout/sprout/numeric/cxx14/transform_exclusive_scan.hpp b/dsp/lib/sprout/sprout/numeric/cxx14/transform_exclusive_scan.hpp deleted file mode 100644 index 729adc6..0000000 --- a/dsp/lib/sprout/sprout/numeric/cxx14/transform_exclusive_scan.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_CXX14_TRANSFORM_EXCLUSIVE_SCAN_HPP -#define SPROUT_NUMERIC_CXX14_TRANSFORM_EXCLUSIVE_SCAN_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // 29.8.9 Transform exclusive scan - // - template< - typename InputIterator, typename OutputIterator, typename T, typename BinaryOperation, typename UnaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - transform_exclusive_scan(InputIterator first, InputIterator last, OutputIterator result, T init, BinaryOperation binary_op, UnaryOperation unary_op) { - typedef typename std::iterator_traits::value_type value_type; - value_type sum = sprout::move(init); - *result = sum; - if (first == last) { - return ++result; - } - value_type temp = unary_op(*first); - while (++first != last) { - sum = binary_op(sum, temp); - *++result = sum; - temp = unary_op(*first); - } - return ++result; - } -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_CXX14_TRANSFORM_EXCLUSIVE_SCAN_HPP diff --git a/dsp/lib/sprout/sprout/numeric/cxx14/transform_inclusive_scan.hpp b/dsp/lib/sprout/sprout/numeric/cxx14/transform_inclusive_scan.hpp deleted file mode 100644 index 18becf2..0000000 --- a/dsp/lib/sprout/sprout/numeric/cxx14/transform_inclusive_scan.hpp +++ /dev/null @@ -1,60 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_CXX14_TRANSFORM_INCLUSIVE_SCAN_HPP -#define SPROUT_NUMERIC_CXX14_TRANSFORM_INCLUSIVE_SCAN_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // 29.8.10 Transform inclusive scan - // - template< - typename InputIterator, typename OutputIterator, typename BinaryOperation, typename UnaryOperation, typename T, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - transform_inclusive_scan(InputIterator first, InputIterator last, OutputIterator result, BinaryOperation binary_op, UnaryOperation unary_op, T init) { - typedef typename std::iterator_traits::value_type value_type; - value_type sum = sprout::move(init); - *result = sum; - if (first == last) { - return ++result; - } - sum = binary_op(sum, unary_op(*first)); - *++result = sum; - while (++first != last) { - sum = binary_op(sum, unary_op(*first)); - *++result = sum; - } - return ++result; - } - template< - typename InputIterator, typename OutputIterator, typename BinaryOperation, typename UnaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - transform_inclusive_scan(InputIterator first, InputIterator last, OutputIterator result, BinaryOperation binary_op, UnaryOperation unary_op) { - typedef typename std::iterator_traits::value_type value_type; - if (first == last) { - return result; - } - value_type sum = unary_op(*first); - *result = sum; - while (++first != last) { - sum = binary_op(sum, unary_op(*first)); - *++result = sum; - } - return ++result; - } -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_CXX14_TRANSFORM_INCLUSIVE_SCAN_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft.hpp b/dsp/lib/sprout/sprout/numeric/dft.hpp deleted file mode 100644 index e86d7b9..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_HPP -#define SPROUT_NUMERIC_DFT_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_DFT_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/amplitude_spectrum.hpp b/dsp/lib/sprout/sprout/numeric/dft/amplitude_spectrum.hpp deleted file mode 100644 index 398d4a4..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/amplitude_spectrum.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_AMPLITUDE_SPECTRUM_HPP -#define SPROUT_NUMERIC_DFT_AMPLITUDE_SPECTRUM_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_DFT_AMPLITUDE_SPECTRUM_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/amplitude_spectrum_value.hpp b/dsp/lib/sprout/sprout/numeric/dft/amplitude_spectrum_value.hpp deleted file mode 100644 index f86b1b6..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/amplitude_spectrum_value.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_AMPLITUDE_SPECTRUM_VALUE_HPP -#define SPROUT_NUMERIC_DFT_AMPLITUDE_SPECTRUM_VALUE_HPP - -#include -#include -#include - -namespace sprout { - // - // amplitude_spectrum_value - // - template - inline SPROUT_CONSTEXPR typename T::value_type - amplitude_spectrum_value(T const& x) { - using sprout::real; - using sprout::imag; - return sprout::sqrt(real(x) * real(x) + imag(x) * imag(x)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_AMPLITUDE_SPECTRUM_VALUE_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/cxx14.hpp b/dsp/lib/sprout/sprout/numeric/dft/cxx14.hpp deleted file mode 100644 index 1ecbd10..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/cxx14.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_CXX14_HPP -#define SPROUT_NUMERIC_DFT_CXX14_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_DFT_CXX14_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/cxx14/amplitude_spectrum.hpp b/dsp/lib/sprout/sprout/numeric/dft/cxx14/amplitude_spectrum.hpp deleted file mode 100644 index bf8afba..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/cxx14/amplitude_spectrum.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_CXX14_AMPLITUDE_SPECTRUM_HPP -#define SPROUT_NUMERIC_DFT_CXX14_AMPLITUDE_SPECTRUM_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // amplitude_spectrum - // - template< - typename InputIterator, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - amplitude_spectrum(InputIterator first, InputIterator last, OutputIterator result) { - while (first != last) { - *result++ = sprout::amplitude_spectrum_value(*first++); - } - return result; - } -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_CXX14_AMPLITUDE_SPECTRUM_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/cxx14/phase_spectrum.hpp b/dsp/lib/sprout/sprout/numeric/dft/cxx14/phase_spectrum.hpp deleted file mode 100644 index 767c788..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/cxx14/phase_spectrum.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_CXX14_PHASE_SPECTRUM_HPP -#define SPROUT_NUMERIC_DFT_CXX14_PHASE_SPECTRUM_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // phase_spectrum - // - template< - typename InputIterator, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - phase_spectrum(InputIterator first, InputIterator last, OutputIterator result) { - while (first != last) { - *result++ = sprout::phase_spectrum_value(*first++); - } - return result; - } -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_CXX14_PHASE_SPECTRUM_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/cxx14/sawtooth.hpp b/dsp/lib/sprout/sprout/numeric/dft/cxx14/sawtooth.hpp deleted file mode 100644 index c05b435..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/cxx14/sawtooth.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_CXX14_SAWTOOTH_HPP -#define SPROUT_NUMERIC_DFT_CXX14_SAWTOOTH_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // sawtooth - // - template - inline SPROUT_CXX14_CONSTEXPR void - sawtooth( - ForwardIterator first, ForwardIterator last, - typename std::iterator_traits::value_type const& frequency = 1, - typename std::iterator_traits::value_type const& amplitude = 1, - typename std::iterator_traits::value_type const& phase = 0 - ) - { - typedef typename std::iterator_traits::difference_type difference_type; - difference_type i = 0; - while (first != last) { - *first++ = sprout::detail::sawtooth_value(frequency, amplitude, phase, i); - ++i; - } - } -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_CXX14_SAWTOOTH_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/cxx14/sinusoid.hpp b/dsp/lib/sprout/sprout/numeric/dft/cxx14/sinusoid.hpp deleted file mode 100644 index 8853d52..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/cxx14/sinusoid.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_CXX14_SINUSOID_HPP -#define SPROUT_NUMERIC_DFT_CXX14_SINUSOID_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // sinusoid - // - template - inline SPROUT_CXX14_CONSTEXPR void - sinusoid( - ForwardIterator first, ForwardIterator last, - typename std::iterator_traits::value_type const& frequency = 1, - typename std::iterator_traits::value_type const& amplitude = 1, - typename std::iterator_traits::value_type const& phase = 0 - ) - { - typedef typename std::iterator_traits::value_type value_type; - typedef typename std::iterator_traits::difference_type difference_type; - value_type const d = sprout::detail::sinusoid_value_d(frequency, sprout::distance(first, last)); - difference_type i = 0; - while (first != last) { - *first++ = sprout::detail::sinusoid_value(amplitude, phase, d, i); - ++i; - } - } -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_CXX14_SINUSOID_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/cxx14/spectrum.hpp b/dsp/lib/sprout/sprout/numeric/dft/cxx14/spectrum.hpp deleted file mode 100644 index e017ac3..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/cxx14/spectrum.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_CXX14_SPECTRUM_HPP -#define SPROUT_NUMERIC_DFT_CXX14_SPECTRUM_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // spectrum - // - template< - typename InputIterator, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - spectrum(InputIterator first, InputIterator last, OutputIterator result) { - return sprout::amplitude_spectrum(first, last, result); - } -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_CXX14_SPECTRUM_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/cxx14/square.hpp b/dsp/lib/sprout/sprout/numeric/dft/cxx14/square.hpp deleted file mode 100644 index efd5ecb..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/cxx14/square.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_CXX14_SQUARE_HPP -#define SPROUT_NUMERIC_DFT_CXX14_SQUARE_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // square - // - template - inline SPROUT_CXX14_CONSTEXPR void - square( - ForwardIterator first, ForwardIterator last, - typename std::iterator_traits::value_type const& frequency = 1, - typename std::iterator_traits::value_type const& amplitude = 1, - typename std::iterator_traits::value_type const& phase = 0 - ) - { - typedef typename std::iterator_traits::difference_type difference_type; - difference_type i = 0; - while (first != last) { - *first++ = sprout::detail::square_value(frequency, amplitude, phase, i); - ++i; - } - } -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_CXX14_SQUARE_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/cxx14/triangle.hpp b/dsp/lib/sprout/sprout/numeric/dft/cxx14/triangle.hpp deleted file mode 100644 index aa084f2..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/cxx14/triangle.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_CXX14_TRIANGLE_HPP -#define SPROUT_NUMERIC_DFT_CXX14_TRIANGLE_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // triangle - // - template - inline SPROUT_CXX14_CONSTEXPR void - triangle( - ForwardIterator first, ForwardIterator last, - typename std::iterator_traits::value_type const& frequency = 1, - typename std::iterator_traits::value_type const& amplitude = 1, - typename std::iterator_traits::value_type const& phase = 0, - typename std::iterator_traits::value_type const& duty = 0.5 - ) - { - typedef typename std::iterator_traits::difference_type difference_type; - difference_type i = 0; - while (first != last) { - *first++ = sprout::detail::triangle_value(frequency, amplitude, phase, duty, i); - ++i; - } - } -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_CXX14_TRIANGLE_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/cxx14/wave.hpp b/dsp/lib/sprout/sprout/numeric/dft/cxx14/wave.hpp deleted file mode 100644 index 94e3415..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/cxx14/wave.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_CXX14_WAVE_HPP -#define SPROUT_NUMERIC_DFT_CXX14_WAVE_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_DFT_CXX14_WAVE_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/detail/dft_element_gen.hpp b/dsp/lib/sprout/sprout/numeric/dft/detail/dft_element_gen.hpp deleted file mode 100644 index ab1e765..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/detail/dft_element_gen.hpp +++ /dev/null @@ -1,104 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_DETAIL_DFT_ELEMENT_GEN_HPP -#define SPROUT_NUMERIC_DFT_DETAIL_DFT_ELEMENT_GEN_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::value_type - dft_element_gen_impl_ra( - RandomAccessIterator const& first, RandomAccessIterator const& last, - typename std::iterator_traits::value_type::value_type arg, - typename std::iterator_traits::difference_type pivot, - typename std::iterator_traits::difference_type k = 0 - ) - { - typedef typename std::iterator_traits::value_type value_type; - using sprout::cos; - using sprout::sin; - return pivot == 0 ? *first * value_type(cos(arg * k), sin(arg * k)) - : sprout::detail::dft_element_gen_impl_ra( - first, sprout::next(first, pivot), arg, pivot / 2, k - ) - + sprout::detail::dft_element_gen_impl_ra( - sprout::next(first, pivot), last, arg, (sprout::distance(first, last) - pivot) / 2, k + pivot - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::value_type - dft_element_gen_impl( - RandomAccessIterator const& first, RandomAccessIterator const& last, - typename std::iterator_traits::value_type::value_type arg, - std::random_access_iterator_tag* - ) - { - typedef typename std::iterator_traits::value_type value_type; - return first == last ? value_type() - : sprout::detail::dft_element_gen_impl_ra(first, last, arg, sprout::distance(first, last) / 2) - ; - } - - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::value_type - dft_element_gen_impl_1( - InputIterator const& first, InputIterator const& last, - typename std::iterator_traits::value_type::value_type arg, - typename std::iterator_traits::difference_type k = 0, - typename std::iterator_traits::value_type value - = typename std::iterator_traits::value_type(), - typename std::iterator_traits::value_type::value_type theta - = typename std::iterator_traits::value_type::value_type() - ) - { - typedef typename std::iterator_traits::value_type value_type; - using sprout::cos; - using sprout::sin; - return first == last ? value - : value + sprout::detail::dft_element_gen_impl_1( - sprout::next(first), last, - arg, - k + 1, - *first * value_type(cos(theta), sin(theta)), - arg * (k + 1) - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::value_type - dft_element_gen_impl( - InputIterator const& first, InputIterator const& last, - typename std::iterator_traits::value_type::value_type arg, - std::input_iterator_tag* - ) - { - return sprout::detail::dft_element_gen_impl_1(first, last, arg); - } - - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::value_type - dft_element_gen( - InputIterator const& first, InputIterator const& last, - typename std::iterator_traits::value_type::value_type arg - ) - { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::detail::dft_element_gen_impl(first, last, arg, category()); - } - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_DETAIL_DFT_ELEMENT_GEN_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/detail/sawtooth.hpp b/dsp/lib/sprout/sprout/numeric/dft/detail/sawtooth.hpp deleted file mode 100644 index 3336e60..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/detail/sawtooth.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_DETAIL_SAWTOOTH_HPP -#define SPROUT_NUMERIC_DFT_DETAIL_SAWTOOTH_HPP - -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR T - sawtooth_value_impl(T const& t) { - using sprout::floor; - return 2 * (t - floor(t + T(0.5))); - } - template - inline SPROUT_CONSTEXPR T - sawtooth_value(T const& frequency, T const& amplitude, T const& phase, Index i) { - return amplitude * sprout::detail::sawtooth_value_impl(frequency * T(i) + phase); - } - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_DETAIL_SAWTOOTH_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/detail/sinusoid.hpp b/dsp/lib/sprout/sprout/numeric/dft/detail/sinusoid.hpp deleted file mode 100644 index 3e86197..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/detail/sinusoid.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_DETAIL_SINUSOID_HPP -#define SPROUT_NUMERIC_DFT_DETAIL_SINUSOID_HPP - -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR T - sinusoid_value(T const& amplitude, T const& phase, T const& d, Index i) { - using sprout::sin; - return amplitude * sin(d * T(i) + phase); - } - template - inline SPROUT_CONSTEXPR T - sinusoid_value_d(T const& frequency, Size size) { - return sprout::math::two_pi() * frequency / T(size); - } - template - inline SPROUT_CONSTEXPR T - sinusoid_value_d(T const& frequency) { - return sprout::math::two_pi() * frequency; - } - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_DETAIL_SINUSOID_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/detail/square.hpp b/dsp/lib/sprout/sprout/numeric/dft/detail/square.hpp deleted file mode 100644 index e489302..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/detail/square.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_DETAIL_SQUARE_HPP -#define SPROUT_NUMERIC_DFT_DETAIL_SQUARE_HPP - -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR T - square_value_impl(T const& t, T const& duty) { - return sprout::detail::sawtooth_value_impl(t) - sprout::detail::sawtooth_value_impl(t - duty); - } - template - inline SPROUT_CONSTEXPR T - square_value(T const& frequency, T const& amplitude, T const& phase, T const& duty, Index i) { - return amplitude * sprout::detail::square_value_impl(frequency * T(i) + phase, duty); - } - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_DETAIL_SQUARE_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/detail/triangle.hpp b/dsp/lib/sprout/sprout/numeric/dft/detail/triangle.hpp deleted file mode 100644 index 1a53932..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/detail/triangle.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_DETAIL_TRINAGLE_HPP -#define SPROUT_NUMERIC_DFT_DETAIL_TRINAGLE_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR T - triangle_value_impl(T const& t) { - typedef double elem_type; - using sprout::sin; - using sprout::asin; - return T(sprout::math::two_div_pi()) * asin(sin(T(sprout::math::two_pi()) * t)); - } - template - inline SPROUT_CONSTEXPR T - triangle_value(T const& frequency, T const& amplitude, T const& phase, Index i) { - return amplitude * sprout::detail::triangle_value_impl(frequency * T(i) + phase); - } - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_DETAIL_TRINAGLE_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/dft.hpp b/dsp/lib/sprout/sprout/numeric/dft/dft.hpp deleted file mode 100644 index 8612fc7..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/dft.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_DFT_HPP -#define SPROUT_NUMERIC_DFT_DFT_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_DFT_DFT_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/dft_element.hpp b/dsp/lib/sprout/sprout/numeric/dft/dft_element.hpp deleted file mode 100644 index b87c5f0..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/dft_element.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_DFT_ELEMENT_HPP -#define SPROUT_NUMERIC_DFT_DFT_ELEMENT_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::value_type - dft_element_impl( - InputIterator const& first, InputIterator const& last, typename std::iterator_traits::difference_type i, - Size size - ) - { - typedef typename std::iterator_traits::value_type value_type; - typedef typename value_type::value_type elem_type; - return sprout::detail::dft_element_gen( - first, last, - -(sprout::math::two_pi() * i / size) - ); - } - } // namespace detail - // - // dft_element - // - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::value_type - dft_element(InputIterator first, InputIterator last, typename std::iterator_traits::difference_type i) { - return sprout::detail::dft_element_impl( - first, last, i, - sprout::distance(first, last) - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_DFT_ELEMENT_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/fit.hpp b/dsp/lib/sprout/sprout/numeric/dft/fit.hpp deleted file mode 100644 index 9efcc3d..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/fit.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_FIT_HPP -#define SPROUT_NUMERIC_DFT_FIT_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_DFT_FIT_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/fit/amplitude_spectrum.hpp b/dsp/lib/sprout/sprout/numeric/dft/fit/amplitude_spectrum.hpp deleted file mode 100644 index d0e4aa6..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/fit/amplitude_spectrum.hpp +++ /dev/null @@ -1,57 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_FIT_AMPLITUDE_SPECTRUM_HPP -#define SPROUT_NUMERIC_DFT_FIT_AMPLITUDE_SPECTRUM_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - amplitude_spectrum_impl( - InputIterator const& first, InputIterator const& last, Result const& result, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::amplitude_spectrum(first, last, result)), - offset, - offset + sprout::fit_size(result, sprout::distance(first, last)) - ); - } - } // namespace detail - // - // amplitude_spectrum - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - amplitude_spectrum(InputIterator first, InputIterator last, Result const& result) { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::fit::detail::amplitude_spectrum_impl(first, last, result, sprout::internal_begin_offset(result)); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - amplitude_spectrum(InputIterator first, InputIterator last) { - return sprout::fit::amplitude_spectrum(first, last, sprout::pit()); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_FIT_AMPLITUDE_SPECTRUM_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/fit/dft.hpp b/dsp/lib/sprout/sprout/numeric/dft/fit/dft.hpp deleted file mode 100644 index 31a49e8..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/fit/dft.hpp +++ /dev/null @@ -1,55 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_FIT_DFT_HPP -#define SPROUT_NUMERIC_DFT_FIT_DFT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - dft_impl( - ForwardIterator const& first, ForwardIterator const& last, Result const& result, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::dft(first, last, result)), - offset, - offset + sprout::fit_size(result, sprout::distance(first, last)) - ); - } - } // namespace detail - // - // dft - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - dft(ForwardIterator first, ForwardIterator last, Result const& result) { - return sprout::fit::detail::dft_impl(first, last, result, sprout::internal_begin_offset(result)); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - dft(ForwardIterator first, ForwardIterator last) { - return sprout::fit::dft(first, last, sprout::pit()); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_FIT_DFT_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/fit/idft.hpp b/dsp/lib/sprout/sprout/numeric/dft/fit/idft.hpp deleted file mode 100644 index 091a423..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/fit/idft.hpp +++ /dev/null @@ -1,55 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_FIT_IDFT_HPP -#define SPROUT_NUMERIC_DFT_FIT_IDFT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - idft_impl( - ForwardIterator const& first, ForwardIterator const& last, Result const& result, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::idft(first, last, result)), - offset, - offset + sprout::fit_size(result, sprout::distance(first, last)) - ); - } - } // namespace detail - // - // idft - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - idft(ForwardIterator first, ForwardIterator last, Result const& result) { - return sprout::fit::detail::idft_impl(first, last, result, sprout::internal_begin_offset(result)); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - idft(ForwardIterator first, ForwardIterator last) { - return sprout::fit::idft(first, last, sprout::pit()); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_FIT_IDFT_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/fit/phase_spectrum.hpp b/dsp/lib/sprout/sprout/numeric/dft/fit/phase_spectrum.hpp deleted file mode 100644 index 7ec7518..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/fit/phase_spectrum.hpp +++ /dev/null @@ -1,57 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_FIT_PHASE_SPECTRUM_HPP -#define SPROUT_NUMERIC_DFT_FIT_PHASE_SPECTRUM_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - phase_spectrum_impl( - InputIterator const& first, InputIterator const& last, Result const& result, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::phase_spectrum(first, last, result)), - offset, - offset + sprout::fit_size(result, sprout::distance(first, last)) - ); - } - } // namespace detail - // - // phase_spectrum - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - phase_spectrum(InputIterator first, InputIterator last, Result const& result) { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::fit::detail::phase_spectrum_impl(first, last, result, sprout::internal_begin_offset(result)); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - phase_spectrum(InputIterator first, InputIterator last) { - return sprout::fit::phase_spectrum(first, last, sprout::pit()); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_FIT_PHASE_SPECTRUM_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/fit/sawtooth.hpp b/dsp/lib/sprout/sprout/numeric/dft/fit/sawtooth.hpp deleted file mode 100644 index da5455c..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/fit/sawtooth.hpp +++ /dev/null @@ -1,68 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_FIT_SAWTOOTH_HPP -#define SPROUT_NUMERIC_DFT_FIT_SAWTOOTH_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - sawtooth_impl( - Container const& cont, - typename sprout::container_traits::value_type const& frequency, - typename sprout::container_traits::value_type const& amplitude, - typename sprout::container_traits::value_type const& phase, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::sawtooth(cont, frequency, amplitude, phase)), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // sawtooth - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - sawtooth( - Container const& cont, - typename sprout::container_traits::value_type const& frequency = 1, - typename sprout::container_traits::value_type const& amplitude = 1, - typename sprout::container_traits::value_type const& phase = 0 - ) - { - return sprout::fit::detail::sawtooth_impl(cont, frequency, amplitude, phase, sprout::internal_begin_offset(cont)); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - sawtooth( - typename sprout::container_traits::value_type const& frequency = 1, - typename sprout::container_traits::value_type const& amplitude = 1, - typename sprout::container_traits::value_type const& phase = 0 - ) - { - return sprout::fit::sawtooth(sprout::pit(), frequency, amplitude, phase); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_FIT_SAWTOOTH_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/fit/sinusoid.hpp b/dsp/lib/sprout/sprout/numeric/dft/fit/sinusoid.hpp deleted file mode 100644 index 5a93ff2..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/fit/sinusoid.hpp +++ /dev/null @@ -1,68 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_FIT_SINUSOID_HPP -#define SPROUT_NUMERIC_DFT_FIT_SINUSOID_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - sinusoid_impl( - Container const& cont, - typename sprout::container_traits::value_type const& frequency, - typename sprout::container_traits::value_type const& amplitude, - typename sprout::container_traits::value_type const& phase, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::sinusoid(cont, frequency, amplitude, phase)), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // sinusoid - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - sinusoid( - Container const& cont, - typename sprout::container_traits::value_type const& frequency = 1, - typename sprout::container_traits::value_type const& amplitude = 1, - typename sprout::container_traits::value_type const& phase = 0 - ) - { - return sprout::fit::detail::sinusoid_impl(cont, frequency, amplitude, phase, sprout::internal_begin_offset(cont)); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - sinusoid( - typename sprout::container_traits::value_type const& frequency = 1, - typename sprout::container_traits::value_type const& amplitude = 1, - typename sprout::container_traits::value_type const& phase = 0 - ) - { - return sprout::fit::sinusoid(sprout::pit(), frequency, amplitude, phase); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_FIT_SINUSOID_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/fit/spectrum.hpp b/dsp/lib/sprout/sprout/numeric/dft/fit/spectrum.hpp deleted file mode 100644 index c517000..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/fit/spectrum.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_FIT_SPECTRUM_HPP -#define SPROUT_NUMERIC_DFT_FIT_SPECTRUM_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace fit { - // - // spectrum - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - spectrum(InputIterator first, InputIterator last, Result const& result) { - return sprout::fit::amplitude_spectrum(first, last, result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - spectrum(InputIterator first, InputIterator last) { - return sprout::fit::amplitude_spectrum(first, last); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_FIT_SPECTRUM_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/fit/square.hpp b/dsp/lib/sprout/sprout/numeric/dft/fit/square.hpp deleted file mode 100644 index 5336645..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/fit/square.hpp +++ /dev/null @@ -1,71 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_FIT_SQUARE_HPP -#define SPROUT_NUMERIC_DFT_FIT_SQUARE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - square_impl( - Container const& cont, - typename sprout::container_traits::value_type const& frequency, - typename sprout::container_traits::value_type const& amplitude, - typename sprout::container_traits::value_type const& phase, - typename sprout::container_traits::value_type const& duty, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::square(cont, frequency, amplitude, phase, duty)), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // square - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - square( - Container const& cont, - typename sprout::container_traits::value_type const& frequency = 1, - typename sprout::container_traits::value_type const& amplitude = 1, - typename sprout::container_traits::value_type const& phase = 0, - typename sprout::container_traits::value_type const& duty = 0.5 - ) - { - return sprout::fit::detail::square_impl(cont, frequency, amplitude, phase, duty, sprout::internal_begin_offset(cont)); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - square( - typename sprout::container_traits::value_type const& frequency = 1, - typename sprout::container_traits::value_type const& amplitude = 1, - typename sprout::container_traits::value_type const& phase = 0, - typename sprout::container_traits::value_type const& duty = 0.5 - ) - { - return sprout::fit::square(sprout::pit(), frequency, amplitude, phase, duty); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_FIT_SQUARE_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/fit/triangle.hpp b/dsp/lib/sprout/sprout/numeric/dft/fit/triangle.hpp deleted file mode 100644 index c518118..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/fit/triangle.hpp +++ /dev/null @@ -1,68 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_FIT_TRINAGLE_HPP -#define SPROUT_NUMERIC_DFT_FIT_TRINAGLE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - triangle_impl( - Container const& cont, - typename sprout::container_traits::value_type const& frequency, - typename sprout::container_traits::value_type const& amplitude, - typename sprout::container_traits::value_type const& phase, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::triangle(cont, frequency, amplitude, phase)), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // triangle - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - triangle( - Container const& cont, - typename sprout::container_traits::value_type const& frequency = 1, - typename sprout::container_traits::value_type const& amplitude = 1, - typename sprout::container_traits::value_type const& phase = 0 - ) - { - return sprout::fit::detail::triangle_impl(cont, frequency, amplitude, phase, sprout::internal_begin_offset(cont)); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - triangle( - typename sprout::container_traits::value_type const& frequency = 1, - typename sprout::container_traits::value_type const& amplitude = 1, - typename sprout::container_traits::value_type const& phase = 0 - ) - { - return sprout::fit::triangle(sprout::pit(), frequency, amplitude, phase); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_FIT_TRINAGLE_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/fit/wave.hpp b/dsp/lib/sprout/sprout/numeric/dft/fit/wave.hpp deleted file mode 100644 index 2ae93ee..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/fit/wave.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_FIT_WAVE_HPP -#define SPROUT_NUMERIC_DFT_FIT_WAVE_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_DFT_FIT_WAVE_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/fixed.hpp b/dsp/lib/sprout/sprout/numeric/dft/fixed.hpp deleted file mode 100644 index 32ef620..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/fixed.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_FIXED_HPP -#define SPROUT_NUMERIC_DFT_FIXED_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_DFT_FIXED_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/fixed/amplitude_spectrum.hpp b/dsp/lib/sprout/sprout/numeric/dft/fixed/amplitude_spectrum.hpp deleted file mode 100644 index cdd1909..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/fixed/amplitude_spectrum.hpp +++ /dev/null @@ -1,162 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_FIXED_AMPLITUDE_SPECTRUM_HPP -#define SPROUT_NUMERIC_DFT_FIXED_AMPLITUDE_SPECTRUM_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - amplitude_spectrum_impl_ra( - RandomAccessIterator const& first, RandomAccessIterator const&, Result const& result, - sprout::index_tuple, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::size_type size, - typename sprout::container_traits::size_type input_size - ) - { - return sprout::remake( - result, size, - (Indexes >= offset && sprout::math::less(Indexes, offset + size) && sprout::math::less(Indexes, offset + input_size) - ? sprout::amplitude_spectrum_value(first[Indexes]) - : *sprout::next(sprout::internal_begin(result), Indexes) - )... - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - amplitude_spectrum( - RandomAccessIterator const& first, RandomAccessIterator const& last, Result const& result, - std::random_access_iterator_tag* - ) - { - return sprout::fixed::detail::amplitude_spectrum_impl_ra( - first, last, result, - sprout::container_indexes::make(), - sprout::internal_begin_offset(result), - sprout::size(result), - sprout::distance(first, last) - ); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - amplitude_spectrum_impl( - InputIterator const&, InputIterator const&, Result const& result, - typename sprout::container_traits::size_type, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - amplitude_spectrum_impl( - InputIterator const& first, InputIterator const& last, Result const& result, - typename sprout::container_traits::size_type size, - Args const&... args - ) - { - return first != last && sizeof...(Args) < size - ? sprout::fixed::detail::amplitude_spectrum_impl( - sprout::next(first), last, result, size, - args..., sprout::amplitude_spectrum_value(*first) - ) - : sprout::detail::container_complate(result, args...) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - amplitude_spectrum( - InputIterator const& first, InputIterator const& last, Result const& result, - std::forward_iterator_tag* - ) - { - return sprout::fixed::detail::amplitude_spectrum_impl(first, last, result, sprout::size(result)); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - amplitude_spectrum(InputIterator const& first, InputIterator const& last, Result const& result) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::fixed::detail::amplitude_spectrum(first, last, result, category()); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - amplitude_spectrum(InputIterator const& first, InputIterator const& last, Result const& result) { - return sprout::remake( - result, sprout::size(result), - sprout::make_amplitude_spectrum_iterator(first), - sprout::make_amplitude_spectrum_iterator(last) - ); - } - } // namespace detail - // - // amplitude_spectrum - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - amplitude_spectrum(InputIterator first, InputIterator last, Result const& result) { - return sprout::fixed::detail::amplitude_spectrum(first, last, result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - amplitude_spectrum(InputIterator first, InputIterator last) { - return sprout::fixed::amplitude_spectrum(first, last, sprout::pit()); - } - } // namespace fixed - - template< - typename InputIterator, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - amplitude_spectrum(InputIterator first, InputIterator last, Result const& result) { - return sprout::fixed::amplitude_spectrum(first, last, result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - amplitude_spectrum(InputIterator first, InputIterator last) { - return sprout::fixed::amplitude_spectrum(first, last); - } -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_FIXED_AMPLITUDE_SPECTRUM_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/fixed/dft.hpp b/dsp/lib/sprout/sprout/numeric/dft/fixed/dft.hpp deleted file mode 100644 index 8d6ce75..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/fixed/dft.hpp +++ /dev/null @@ -1,149 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_FIXED_DFT_HPP -#define SPROUT_NUMERIC_DFT_FIXED_DFT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - dft_impl_ra( - RandomAccessIterator const& first, RandomAccessIterator const& last, Result const& result, - sprout::index_tuple, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::size_type size, - typename sprout::container_traits::size_type input_size - ) - { - return sprout::remake( - result, size, - (Indexes >= offset && sprout::math::less(Indexes, offset + size) && sprout::math::less(Indexes, offset + input_size) - ? sprout::detail::dft_element_impl(first, last, Indexes - offset, input_size) - : *sprout::next(sprout::internal_begin(result), Indexes) - )... - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - dft( - RandomAccessIterator const& first, RandomAccessIterator const& last, Result const& result, - std::random_access_iterator_tag* - ) - { - return sprout::fixed::detail::dft_impl_ra( - first, last, result, - sprout::container_indexes::make(), - sprout::internal_begin_offset(result), - sprout::size(result), - sprout::distance(first, last) - ); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - dft_impl( - ForwardIterator, ForwardIterator, Result const& result, - typename sprout::container_traits::size_type, - ForwardIterator, typename sprout::container_traits::difference_type, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - dft_impl( - ForwardIterator const& first, ForwardIterator const& last, Result const& result, - typename sprout::container_traits::size_type size, - ForwardIterator const& first_, typename sprout::container_traits::difference_type i, - Args const&... args - ) - { - return first != last && sizeof...(Args) < size - ? sprout::fixed::detail::dft_impl( - sprout::next(first), last, result, size, first_, i + 1, - args..., sprout::detail::dft_element_impl(first_, last, i, size) - ) - : sprout::detail::container_complate(result, args...) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - dft( - ForwardIterator const& first, ForwardIterator const& last, Result const& result, - std::forward_iterator_tag* - ) - { - return sprout::fixed::detail::dft_impl(first, last, result, sprout::size(result), first, 0); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - dft(ForwardIterator const& first, ForwardIterator const& last, Result const& result) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::fixed::detail::dft(first, last, result, category()); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - dft(ForwardIterator const& first, ForwardIterator const& last, Result const& result) { - return sprout::remake( - result, sprout::size(result), - sprout::make_dft_iterator(first, last), - sprout::make_dft_iterator(first, last, sprout::distance(first, last)) - ); - } - } // namespace detail - // - // dft - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - dft(ForwardIterator first, ForwardIterator last, Result const& result) { - return sprout::fixed::detail::dft(first, last, result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - dft(ForwardIterator first, ForwardIterator last) { - return sprout::fixed::dft(first, last, sprout::pit()); - } - } // namespace fixed - - using sprout::fixed::dft; -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_FIXED_DFT_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/fixed/idft.hpp b/dsp/lib/sprout/sprout/numeric/dft/fixed/idft.hpp deleted file mode 100644 index 0fcdde9..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/fixed/idft.hpp +++ /dev/null @@ -1,149 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_FIXED_IDFT_HPP -#define SPROUT_NUMERIC_DFT_FIXED_IDFT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - idft_impl_ra( - RandomAccessIterator const& first, RandomAccessIterator const& last, Result const& result, - sprout::index_tuple, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::size_type size, - typename sprout::container_traits::size_type input_size - ) - { - return sprout::remake( - result, size, - (Indexes >= offset && sprout::math::less(Indexes, offset + size) && sprout::math::less(Indexes, offset + input_size) - ? sprout::detail::idft_element_impl(first, last, Indexes - offset, input_size) - : *sprout::next(sprout::internal_begin(result), Indexes) - )... - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - idft( - RandomAccessIterator const& first, RandomAccessIterator const& last, Result const& result, - std::random_access_iterator_tag* - ) - { - return sprout::fixed::detail::idft_impl_ra( - first, last, result, - sprout::container_indexes::make(), - sprout::internal_begin_offset(result), - sprout::size(result), - sprout::distance(first, last) - ); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - idft_impl( - ForwardIterator, ForwardIterator, Result const& result, - typename sprout::container_traits::size_type, - ForwardIterator, typename sprout::container_traits::difference_type, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - idft_impl( - ForwardIterator const& first, ForwardIterator const& last, Result const& result, - typename sprout::container_traits::size_type size, - ForwardIterator const& first_, typename sprout::container_traits::difference_type i, - Args const&... args - ) - { - return first != last && sizeof...(Args) < size - ? sprout::fixed::detail::idft_impl( - sprout::next(first), last, result, size, first_, i + 1, - args..., sprout::detail::idft_element_impl(first_, last, i, size) - ) - : sprout::detail::container_complate(result, args...) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - idft( - ForwardIterator const& first, ForwardIterator const& last, Result const& result, - std::forward_iterator_tag* - ) - { - return sprout::fixed::detail::idft_impl(first, last, result, sprout::size(result), first, 0); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - idft(ForwardIterator const& first, ForwardIterator const& last, Result const& result) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::fixed::detail::idft(first, last, result, category()); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - idft(ForwardIterator const& first, ForwardIterator const& last, Result const& result) { - return sprout::remake( - result, sprout::size(result), - sprout::make_idft_iterator(first, last), - sprout::make_idft_iterator(first, last, sprout::distance(first, last)) - ); - } - } // namespace detail - // - // idft - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - idft(ForwardIterator first, ForwardIterator last, Result const& result) { - return sprout::fixed::detail::idft(first, last, result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - idft(ForwardIterator first, ForwardIterator last) { - return sprout::fixed::idft(first, last, sprout::pit()); - } - } // namespace fixed - - using sprout::fixed::idft; -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_FIXED_IDFT_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/fixed/phase_spectrum.hpp b/dsp/lib/sprout/sprout/numeric/dft/fixed/phase_spectrum.hpp deleted file mode 100644 index ee33748..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/fixed/phase_spectrum.hpp +++ /dev/null @@ -1,162 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_FIXED_PHASE_SPECTRUM_HPP -#define SPROUT_NUMERIC_DFT_FIXED_PHASE_SPECTRUM_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - phase_spectrum_impl_ra( - RandomAccessIterator const& first, RandomAccessIterator const&, Result const& result, - sprout::index_tuple, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::size_type size, - typename sprout::container_traits::size_type input_size - ) - { - return sprout::remake( - result, size, - (Indexes >= offset && sprout::math::less(Indexes, offset + size) && sprout::math::less(Indexes, offset + input_size) - ? sprout::phase_spectrum_value(first[Indexes]) - : *sprout::next(sprout::internal_begin(result), Indexes) - )... - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - phase_spectrum( - RandomAccessIterator const& first, RandomAccessIterator const& last, Result const& result, - std::random_access_iterator_tag* - ) - { - return sprout::fixed::detail::phase_spectrum_impl_ra( - first, last, result, - sprout::container_indexes::make(), - sprout::internal_begin_offset(result), - sprout::size(result), - sprout::distance(first, last) - ); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - phase_spectrum_impl( - InputIterator const&, InputIterator const&, Result const& result, - typename sprout::container_traits::size_type, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - phase_spectrum_impl( - InputIterator const& first, InputIterator const& last, Result const& result, - typename sprout::container_traits::size_type size, - Args const&... args - ) - { - return first != last && sizeof...(Args) < size - ? sprout::fixed::detail::phase_spectrum_impl( - sprout::next(first), last, result, size, - args..., sprout::phase_spectrum_value(*first) - ) - : sprout::detail::container_complate(result, args...) - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - phase_spectrum( - InputIterator const& first, InputIterator const& last, Result const& result, - std::forward_iterator_tag* - ) - { - return sprout::fixed::detail::phase_spectrum_impl(first, last, result, sprout::size(result)); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - phase_spectrum(InputIterator const& first, InputIterator const& last, Result const& result) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::fixed::detail::phase_spectrum(first, last, result, category()); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - phase_spectrum(InputIterator const& first, InputIterator const& last, Result const& result) { - return sprout::remake( - result, sprout::size(result), - sprout::make_phase_spectrum_iterator(first), - sprout::make_phase_spectrum_iterator(last) - ); - } - } // namespace detail - // - // phase_spectrum - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - phase_spectrum(InputIterator first, InputIterator last, Result const& result) { - return sprout::fixed::detail::phase_spectrum(first, last, result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - phase_spectrum(InputIterator first, InputIterator last) { - return sprout::fixed::phase_spectrum(first, last, sprout::pit()); - } - } // namespace fixed - - template< - typename InputIterator, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - phase_spectrum(InputIterator first, InputIterator last, Result const& result) { - return sprout::fixed::phase_spectrum(first, last, result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - phase_spectrum(InputIterator first, InputIterator last) { - return sprout::fixed::phase_spectrum(first, last); - } -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_FIXED_PHASE_SPECTRUM_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/fixed/sawtooth.hpp b/dsp/lib/sprout/sprout/numeric/dft/fixed/sawtooth.hpp deleted file mode 100644 index 1af9b82..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/fixed/sawtooth.hpp +++ /dev/null @@ -1,94 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_FIXED_SAWTOOTH_HPP -#define SPROUT_NUMERIC_DFT_FIXED_SAWTOOTH_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - sawtooth_impl( - Container const& cont, - typename sprout::container_traits::value_type const& frequency, - typename sprout::container_traits::value_type const& amplitude, - typename sprout::container_traits::value_type const& phase, - sprout::index_tuple, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::size_type size - ) - { - return sprout::remake( - cont, size, - (Indexes >= offset && Indexes < offset + size - ? sprout::detail::sawtooth_value(frequency, amplitude, phase, Indexes) - : *sprout::next(sprout::internal_begin(cont), Indexes) - )... - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - sawtooth( - Container const& cont, - typename sprout::container_traits::value_type const& frequency, - typename sprout::container_traits::value_type const& amplitude, - typename sprout::container_traits::value_type const& phase - ) - { - return sprout::fixed::detail::sawtooth_impl( - cont, - frequency, - amplitude, - phase, - sprout::container_indexes::make(), - sprout::internal_begin_offset(cont), - sprout::size(cont) - ); - } - } // namespace detail - // - // sawtooth - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - sawtooth( - Container const& cont, - typename sprout::container_traits::value_type const& frequency = 1, - typename sprout::container_traits::value_type const& amplitude = 1, - typename sprout::container_traits::value_type const& phase = 0 - ) - { - return sprout::fixed::detail::sawtooth(cont, frequency, amplitude, phase); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - sawtooth( - typename sprout::container_traits::value_type const& frequency = 1, - typename sprout::container_traits::value_type const& amplitude = 1, - typename sprout::container_traits::value_type const& phase = 0 - ) - { - return sprout::fixed::sawtooth(sprout::pit(), frequency, amplitude, phase); - } - } // namespace fixed - - using sprout::fixed::sawtooth; -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_FIXED_SAWTOOTH_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/fixed/sinusoid.hpp b/dsp/lib/sprout/sprout/numeric/dft/fixed/sinusoid.hpp deleted file mode 100644 index 7b59343..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/fixed/sinusoid.hpp +++ /dev/null @@ -1,94 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_FIXED_SINUSOID_HPP -#define SPROUT_NUMERIC_DFT_FIXED_SINUSOID_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - sinusoid_impl( - Container const& cont, - typename sprout::container_traits::value_type const& d, - typename sprout::container_traits::value_type const& amplitude, - typename sprout::container_traits::value_type const& phase, - sprout::index_tuple, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::size_type size - ) - { - return sprout::remake( - cont, size, - (Indexes >= offset && Indexes < offset + size - ? sprout::detail::sinusoid_value(amplitude, phase, d, Indexes) - : *sprout::next(sprout::internal_begin(cont), Indexes) - )... - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - sinusoid( - Container const& cont, - typename sprout::container_traits::value_type const& frequency, - typename sprout::container_traits::value_type const& amplitude, - typename sprout::container_traits::value_type const& phase - ) - { - return sprout::fixed::detail::sinusoid_impl( - cont, - sprout::detail::sinusoid_value_d(frequency, sprout::size(cont)), - amplitude, - phase, - sprout::container_indexes::make(), - sprout::internal_begin_offset(cont), - sprout::size(cont) - ); - } - } // namespace detail - // - // sinusoid - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - sinusoid( - Container const& cont, - typename sprout::container_traits::value_type const& frequency = 1, - typename sprout::container_traits::value_type const& amplitude = 1, - typename sprout::container_traits::value_type const& phase = 0 - ) - { - return sprout::fixed::detail::sinusoid(cont, frequency, amplitude, phase); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - sinusoid( - typename sprout::container_traits::value_type const& frequency = 1, - typename sprout::container_traits::value_type const& amplitude = 1, - typename sprout::container_traits::value_type const& phase = 0 - ) - { - return sprout::fixed::sinusoid(sprout::pit(), frequency, amplitude, phase); - } - } // namespace fixed - - using sprout::fixed::sinusoid; -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_FIXED_SINUSOID_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/fixed/spectrum.hpp b/dsp/lib/sprout/sprout/numeric/dft/fixed/spectrum.hpp deleted file mode 100644 index 0f078cf..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/fixed/spectrum.hpp +++ /dev/null @@ -1,52 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_FIXED_SPECTRUM_HPP -#define SPROUT_NUMERIC_DFT_FIXED_SPECTRUM_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - // - // spectrum - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - spectrum(InputIterator first, InputIterator last, Result const& result) { - return sprout::fixed::amplitude_spectrum(first, last, result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - spectrum(InputIterator first, InputIterator last) { - return sprout::fixed::amplitude_spectrum(first, last); - } - } // namespace fixed - - template< - typename InputIterator, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - spectrum(InputIterator first, InputIterator last, Result const& result) { - return sprout::fixed::spectrum(first, last, result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - spectrum(InputIterator first, InputIterator last) { - return sprout::fixed::spectrum(first, last); - } -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_FIXED_SPECTRUM_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/fixed/square.hpp b/dsp/lib/sprout/sprout/numeric/dft/fixed/square.hpp deleted file mode 100644 index 8ac77a6..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/fixed/square.hpp +++ /dev/null @@ -1,99 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_FIXED_SQUARE_HPP -#define SPROUT_NUMERIC_DFT_FIXED_SQUARE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - square_impl( - Container const& cont, - typename sprout::container_traits::value_type const& frequency, - typename sprout::container_traits::value_type const& amplitude, - typename sprout::container_traits::value_type const& phase, - typename sprout::container_traits::value_type const& duty, - sprout::index_tuple, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::size_type size - ) - { - return sprout::remake( - cont, size, - (Indexes >= offset && Indexes < offset + size - ? sprout::detail::square_value(frequency, amplitude, phase, duty, Indexes) - : *sprout::next(sprout::internal_begin(cont), Indexes) - )... - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - square( - Container const& cont, - typename sprout::container_traits::value_type const& frequency, - typename sprout::container_traits::value_type const& amplitude, - typename sprout::container_traits::value_type const& phase, - typename sprout::container_traits::value_type const& duty - ) - { - return sprout::fixed::detail::square_impl( - cont, - frequency, - amplitude, - phase, - duty, - sprout::container_indexes::make(), - sprout::internal_begin_offset(cont), - sprout::size(cont) - ); - } - } // namespace detail - // - // square - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - square( - Container const& cont, - typename sprout::container_traits::value_type const& frequency = 1, - typename sprout::container_traits::value_type const& amplitude = 1, - typename sprout::container_traits::value_type const& phase = 0, - typename sprout::container_traits::value_type const& duty = 0.5 - ) - { - return sprout::fixed::detail::square(cont, frequency, amplitude, phase, duty); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - square( - typename sprout::container_traits::value_type const& frequency = 1, - typename sprout::container_traits::value_type const& amplitude = 1, - typename sprout::container_traits::value_type const& phase = 0, - typename sprout::container_traits::value_type const& duty = 0.5 - ) - { - return sprout::fixed::square(sprout::pit(), frequency, amplitude, phase, duty); - } - } // namespace fixed - - using sprout::fixed::square; -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_FIXED_SQUARE_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/fixed/triangle.hpp b/dsp/lib/sprout/sprout/numeric/dft/fixed/triangle.hpp deleted file mode 100644 index b9812d9..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/fixed/triangle.hpp +++ /dev/null @@ -1,94 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_FIXED_TRINAGLE_HPP -#define SPROUT_NUMERIC_DFT_FIXED_TRINAGLE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - triangle_impl( - Container const& cont, - typename sprout::container_traits::value_type const& frequency, - typename sprout::container_traits::value_type const& amplitude, - typename sprout::container_traits::value_type const& phase, - sprout::index_tuple, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::size_type size - ) - { - return sprout::remake( - cont, size, - (Indexes >= offset && Indexes < offset + size - ? sprout::detail::triangle_value(frequency, amplitude, phase, Indexes) - : *sprout::next(sprout::internal_begin(cont), Indexes) - )... - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - triangle( - Container const& cont, - typename sprout::container_traits::value_type const& frequency, - typename sprout::container_traits::value_type const& amplitude, - typename sprout::container_traits::value_type const& phase - ) - { - return sprout::fixed::detail::triangle_impl( - cont, - frequency, - amplitude, - phase, - sprout::container_indexes::make(), - sprout::internal_begin_offset(cont), - sprout::size(cont) - ); - } - } // namespace detail - // - // triangle - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - triangle( - Container const& cont, - typename sprout::container_traits::value_type const& frequency = 1, - typename sprout::container_traits::value_type const& amplitude = 1, - typename sprout::container_traits::value_type const& phase = 0 - ) - { - return sprout::fixed::detail::triangle(cont, frequency, amplitude, phase); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - triangle( - typename sprout::container_traits::value_type const& frequency = 1, - typename sprout::container_traits::value_type const& amplitude = 1, - typename sprout::container_traits::value_type const& phase = 0 - ) - { - return sprout::fixed::triangle(sprout::pit(), frequency, amplitude, phase); - } - } // namespace fixed - - using sprout::fixed::triangle; -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_FIXED_TRINAGLE_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/fixed/wave.hpp b/dsp/lib/sprout/sprout/numeric/dft/fixed/wave.hpp deleted file mode 100644 index 5dc0a2d..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/fixed/wave.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_FIXED_WAVE_HPP -#define SPROUT_NUMERIC_DFT_FIXED_WAVE_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_DFT_FIXED_WAVE_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/idft.hpp b/dsp/lib/sprout/sprout/numeric/dft/idft.hpp deleted file mode 100644 index 3cdfae8..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/idft.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_IDFT_HPP -#define SPROUT_NUMERIC_DFT_IDFT_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_DFT_IDFT_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/idft_element.hpp b/dsp/lib/sprout/sprout/numeric/dft/idft_element.hpp deleted file mode 100644 index 07599f5..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/idft_element.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_IDFT_ELEMENT_HPP -#define SPROUT_NUMERIC_DFT_IDFT_ELEMENT_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::value_type - idft_element_impl( - InputIterator const& first, InputIterator const& last, typename std::iterator_traits::difference_type i, - Size size - ) - { - typedef typename std::iterator_traits::value_type value_type; - typedef typename value_type::value_type elem_type; - return sprout::detail::dft_element_gen( - first, last, - sprout::math::two_pi() * i / size - ) - / static_cast(size) - ; - } - } // namespace detail - // - // idft_element - // - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::value_type - idft_element( InputIterator first, InputIterator last, typename std::iterator_traits::difference_type i) { - return sprout::detail::idft_element_impl( - first, last, i, - sprout::distance(first, last) - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_IDFT_ELEMENT_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/modifying.hpp b/dsp/lib/sprout/sprout/numeric/dft/modifying.hpp deleted file mode 100644 index 61f0a8b..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/modifying.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_MODIFYIING_HPP -#define SPROUT_NUMERIC_DFT_MODIFYIING_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_DFT_MODIFYIING_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/non_modifying.hpp b/dsp/lib/sprout/sprout/numeric/dft/non_modifying.hpp deleted file mode 100644 index 19b36be..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/non_modifying.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_NON_MODIFYIING_HPP -#define SPROUT_NUMERIC_DFT_NON_MODIFYIING_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_DFT_NON_MODIFYIING_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/phase_spectrum.hpp b/dsp/lib/sprout/sprout/numeric/dft/phase_spectrum.hpp deleted file mode 100644 index 1881e27..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/phase_spectrum.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_PHASE_SPECTRUM_HPP -#define SPROUT_NUMERIC_DFT_PHASE_SPECTRUM_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_DFT_PHASE_SPECTRUM_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/phase_spectrum_value.hpp b/dsp/lib/sprout/sprout/numeric/dft/phase_spectrum_value.hpp deleted file mode 100644 index b287d70..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/phase_spectrum_value.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_PHASE_SPECTRUM_VALUE_HPP -#define SPROUT_NUMERIC_DFT_PHASE_SPECTRUM_VALUE_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // phase_spectrum_value - // - template - inline SPROUT_CONSTEXPR typename T::value_type - phase_spectrum_value(T const& x) { - using sprout::real; - using sprout::imag; - return sprout::atan2(sprout::llround(imag(x)), sprout::llround(real(x))); - } -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_DFT_PHASE_SPECTRUM_VALUE_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/sawtooth.hpp b/dsp/lib/sprout/sprout/numeric/dft/sawtooth.hpp deleted file mode 100644 index b092d8b..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/sawtooth.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_SAWTOOTH_HPP -#define SPROUT_NUMERIC_DFT_SAWTOOTH_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_DFT_SAWTOOTH_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/sinusoid.hpp b/dsp/lib/sprout/sprout/numeric/dft/sinusoid.hpp deleted file mode 100644 index 889be56..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/sinusoid.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_SINUSOID_HPP -#define SPROUT_NUMERIC_DFT_SINUSOID_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_DFT_SINUSOID_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/spectrum.hpp b/dsp/lib/sprout/sprout/numeric/dft/spectrum.hpp deleted file mode 100644 index 5dbbe58..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/spectrum.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_SPECTRUM_HPP -#define SPROUT_NUMERIC_DFT_SPECTRUM_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_DFT_SPECTRUM_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/square.hpp b/dsp/lib/sprout/sprout/numeric/dft/square.hpp deleted file mode 100644 index 4f49e4f..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/square.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_SQUARE_HPP -#define SPROUT_NUMERIC_DFT_SQUARE_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_DFT_SQUARE_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/triangle.hpp b/dsp/lib/sprout/sprout/numeric/dft/triangle.hpp deleted file mode 100644 index 203656f..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/triangle.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_TRINAGLE_HPP -#define SPROUT_NUMERIC_DFT_TRINAGLE_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_DFT_TRINAGLE_HPP diff --git a/dsp/lib/sprout/sprout/numeric/dft/wave.hpp b/dsp/lib/sprout/sprout/numeric/dft/wave.hpp deleted file mode 100644 index 401e25c..0000000 --- a/dsp/lib/sprout/sprout/numeric/dft/wave.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_DFT_WAVE_HPP -#define SPROUT_NUMERIC_DFT_WAVE_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_DFT_WAVE_HPP diff --git a/dsp/lib/sprout/sprout/numeric/exclusive_scan.hpp b/dsp/lib/sprout/sprout/numeric/exclusive_scan.hpp deleted file mode 100644 index 102ad3e..0000000 --- a/dsp/lib/sprout/sprout/numeric/exclusive_scan.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_EXCLUSIVE_SCAN_HPP -#define SPROUT_NUMERIC_EXCLUSIVE_SCAN_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_EXCLUSIVE_SCAN_HPP diff --git a/dsp/lib/sprout/sprout/numeric/fft.hpp b/dsp/lib/sprout/sprout/numeric/fft.hpp deleted file mode 100644 index 071c144..0000000 --- a/dsp/lib/sprout/sprout/numeric/fft.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_FFT_HPP -#define SPROUT_NUMERIC_FFT_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_FFT_HPP diff --git a/dsp/lib/sprout/sprout/numeric/fft/bitrev_table.hpp b/dsp/lib/sprout/sprout/numeric/fft/bitrev_table.hpp deleted file mode 100644 index e2965a4..0000000 --- a/dsp/lib/sprout/sprout/numeric/fft/bitrev_table.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_FFT_BITREV_TABLE_HPP -#define SPROUT_NUMERIC_FFT_BITREV_TABLE_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_FFT_BITREV_TABLE_HPP diff --git a/dsp/lib/sprout/sprout/numeric/fft/coefficients.hpp b/dsp/lib/sprout/sprout/numeric/fft/coefficients.hpp deleted file mode 100644 index 7d1d002..0000000 --- a/dsp/lib/sprout/sprout/numeric/fft/coefficients.hpp +++ /dev/null @@ -1,81 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_FFT_COEFFICIENT_ARRAY_HPP -#define SPROUT_NUMERIC_FFT_COEFFICIENT_ARRAY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail - { - template - inline SPROUT_CONSTEXPR sprout::array, sizeof...(Indexes)*2> - make_fft_coefficients_impl( - sprout::array, sizeof...(Indexes)> const& arr, - sprout::complex mul, sprout::index_tuple - ) - { - return sprout::array, sizeof...(Indexes)*2>{ { - arr[Indexes]..., (arr[Indexes] * mul)... - } }; - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - N == 0, - typename sprout::array, 1> - >::type - make_fft_coefficients_loop( bool ) { - return typename sprout::array, 1>{ { - { static_cast( 1 ) } - } }; - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - N != 0, - typename sprout::array, 1 << N> - >::type - make_fft_coefficients_loop(bool inverse) - { - return make_fft_coefficients_impl( - make_fft_coefficients_loop(inverse), - { - sprout::cos((inverse?-1:1)*sprout::math::two_pi() / (1 << Size >> (N - 1))), - sprout::sin((inverse?-1:1)*sprout::math::two_pi() / (1 << Size >> (N - 1))) - }, - sprout::make_index_tuple<1 << (N - 1)>() - ); - } - - template - inline SPROUT_CONSTEXPR sprout::array, 1 << Size> - make_fft_coefficients(bool inverse) { - return make_fft_coefficients_loop(inverse); - } - } // namespace detail - template - inline SPROUT_CONSTEXPR sprout::array, Size> - make_fft_coefficients() { - return sprout::detail::make_fft_coefficients(false); - } - template - inline SPROUT_CONSTEXPR sprout::array, Size> - make_ifft_coefficients() { - return sprout::detail::make_fft_coefficients(true); - } -} // namespce sprout - -#endif // SPROUT_NUMERIC_FFT_COEFFICIENT_ARRAY_HPP diff --git a/dsp/lib/sprout/sprout/numeric/fft/cxx14/fft.hpp b/dsp/lib/sprout/sprout/numeric/fft/cxx14/fft.hpp deleted file mode 100644 index dc4e605..0000000 --- a/dsp/lib/sprout/sprout/numeric/fft/cxx14/fft.hpp +++ /dev/null @@ -1,137 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_FFT_CXX14_FFT_HPP -#define SPROUT_NUMERIC_FFT_CXX14_FFT_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // fft - // - template - inline SPROUT_CXX14_CONSTEXPR void - fft(RandomAccessIterator first, RandomAccessIterator last) { - typedef typename std::iterator_traits::difference_type difference_type; - typedef typename std::iterator_traits::value_type value_type; - typedef typename value_type::value_type elem_type; - using sprout::real; - using sprout::imag; - difference_type const size = last - first; - // scrambler - for (difference_type i = 0, j = 1; j < size - 1; ++j) { - for (difference_type k = size >> 1; k > (i ^= k); k >>= 1) - ; - if (j < i) { - sprout::swap(first[i], first[j]); - } - } - // L shaped butterflies - elem_type const theta = -(sprout::math::half_pi() / size); - for (difference_type m = 4; m <= size; m <<= 1) { - difference_type mq = m >> 2; - // W == 1 - for (difference_type k = mq; k >= 1; k >>= 2) { - for (difference_type j = mq - k; j < mq - (k >> 1); ++j) { - difference_type j1 = j + mq; - difference_type j2 = j1 + mq; - difference_type j3 = j2 + mq; - value_type x1 = first[j] - first[j1]; - first[j] += first[j1]; - value_type x3 = first[j3] - first[j2]; - first[j2] += first[j3]; - first[j1] = value_type( - real(x1) - imag(x3), - imag(x1) + real(x3) - ); - first[j3] = value_type( - real(x1) + imag(x3), - imag(x1) - real(x3) - ); - } - } - if (m == size) { - continue; - } - difference_type irev = size >> 1; - elem_type w1r = sprout::cos(theta * irev); - for (difference_type k = mq; k >= 1; k >>= 2) { - for (difference_type j = m + mq - k; j < m + mq - (k >> 1); ++j) { - difference_type j1 = j + mq; - difference_type j2 = j1 + mq; - difference_type j3 = j2 + mq; - value_type x1 = first[j] - first[j1]; - first[j] += first[j1]; - value_type x3 = first[j3] - first[j2]; - first[j2] += first[j3]; - elem_type x0r = real(x1) - imag(x3); - elem_type x0i = imag(x1) + real(x3); - first[j1] = value_type( - w1r * (x0r + x0i), - w1r * (x0i - x0r) - ); - x0r = real(x1) + imag(x3); - x0i = imag(x1) - real(x3); - first[j3] = value_type( - w1r * (-x0r + x0i), - w1r * (-x0i - x0r) - ); - } - } - for (difference_type i = 2 * m; i < size; i += m) { - for (difference_type k = size >> 1; k > (irev ^= k); k >>= 1) - ; - elem_type w1r = sprout::cos(theta * irev); - elem_type w1i = sprout::sin(theta * irev); - elem_type w3r = sprout::cos(theta * 3 * irev); - elem_type w3i = sprout::sin(theta * 3 * irev); - for (difference_type k = mq; k >= 1; k >>= 2) { - for (difference_type j = i + mq - k; j < i + mq - (k >> 1); ++j) { - difference_type j1 = j + mq; - difference_type j2 = j1 + mq; - difference_type j3 = j2 + mq; - value_type x1 = first[j] - first[j1]; - first[j] += first[j1]; - value_type x3 = first[j3] - first[j2]; - first[j2] += first[j3]; - elem_type x0r = real(x1) - imag(x3); - elem_type x0i = imag(x1) + real(x3); - first[j1] = value_type( - w1r * x0r - w1i * x0i, - w1r * x0i + w1i * x0r - ); - x0r = real(x1) + imag(x3); - x0i = imag(x1) - real(x3); - first[j3] = value_type( - w3r * x0r - w3i * x0i, - w3r * x0i + w3i * x0r - ); - } - } - } - } - // radix 2 butterflies - difference_type mq = size >> 1; - for (difference_type k = mq; k >= 1; k >>= 2) { - for (difference_type j = mq - k; j < mq - (k >> 1); ++j) { - difference_type j1 = mq + j; - value_type x0 = first[j] - first[j1]; - first[j] += first[j1]; - first[j1] = x0; - } - } - } -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_FFT_CXX14_FFT_HPP diff --git a/dsp/lib/sprout/sprout/numeric/fft/cxx14/ifft.hpp b/dsp/lib/sprout/sprout/numeric/fft/cxx14/ifft.hpp deleted file mode 100644 index 725e1ce..0000000 --- a/dsp/lib/sprout/sprout/numeric/fft/cxx14/ifft.hpp +++ /dev/null @@ -1,58 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_FFT_CXX14_IFFT_HPP -#define SPROUT_NUMERIC_FFT_CXX14_IFFT_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - struct conj_value { - public: - template - SPROUT_CONSTEXPR Complex operator()(Complex const& x) const { - return conj(x); - } - }; - - template - struct conj_div_value { - private: - Size n_; - public: - explicit SPROUT_CONSTEXPR conj_div_value(Size n) - : n_(n) - {} - template - SPROUT_CONSTEXPR Complex operator()(Complex const& x) const { - return conj(x) / typename Complex::value_type(n_); - } - }; - template - SPROUT_CONSTEXPR sprout::detail::conj_div_value - conj_div(Size n) { - return sprout::detail::conj_div_value(n); - } - } // namespace detail - // - // ifft - // - template - inline SPROUT_CXX14_CONSTEXPR void - ifft(RandomAccessIterator first, RandomAccessIterator last) { - sprout::transform(first, last, first, sprout::detail::conj_value()); - sprout::fft(first, last); - sprout::transform(first, last, first, sprout::detail::conj_div(last - first)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_FFT_CXX14_IFFT_HPP diff --git a/dsp/lib/sprout/sprout/numeric/fft/fft.hpp b/dsp/lib/sprout/sprout/numeric/fft/fft.hpp deleted file mode 100644 index 5af7b8c..0000000 --- a/dsp/lib/sprout/sprout/numeric/fft/fft.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_FFT_FFT_HPP -#define SPROUT_NUMERIC_FFT_FFT_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_FFT_FFT_HPP diff --git a/dsp/lib/sprout/sprout/numeric/fft/fit/bitrev_table.hpp b/dsp/lib/sprout/sprout/numeric/fft/fit/bitrev_table.hpp deleted file mode 100644 index b563415..0000000 --- a/dsp/lib/sprout/sprout/numeric/fft/fit/bitrev_table.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_FFT_FIT_BITREV_TABLE_HPP -#define SPROUT_NUMERIC_FFT_FIT_BITREV_TABLE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - bitrev_table_impl(Container const& cont, typename sprout::container_traits::difference_type offset) { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::bitrev_table(cont)), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // bitrev_table - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - bitrev_table(Container const& cont) { - return sprout::fit::detail::bitrev_table_impl(cont, sprout::internal_begin_offset(cont)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_FFT_FIT_BITREV_TABLE_HPP diff --git a/dsp/lib/sprout/sprout/numeric/fft/fit/fft.hpp b/dsp/lib/sprout/sprout/numeric/fft/fit/fft.hpp deleted file mode 100644 index 68ee124..0000000 --- a/dsp/lib/sprout/sprout/numeric/fft/fit/fft.hpp +++ /dev/null @@ -1,55 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_FFT_FIT_FFT_HPP -#define SPROUT_NUMERIC_FFT_FIT_FFT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - fft_impl( - ForwardIterator const& first, ForwardIterator const& last, Result const& result, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::fft(first, last, result)), - offset, - offset + sprout::fit_size(result, sprout::distance(first, last)) - ); - } - } // namespace detail - // - // fft - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - fft(ForwardIterator first, ForwardIterator last, Result const& result) { - return sprout::fit::detail::fft_impl(first, last, result, sprout::internal_begin_offset(result)); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - fft(ForwardIterator first, ForwardIterator last) { - return sprout::fit::fft(first, last, sprout::pit()); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_FFT_FIT_FFT_HPP diff --git a/dsp/lib/sprout/sprout/numeric/fft/fit/ifft.hpp b/dsp/lib/sprout/sprout/numeric/fft/fit/ifft.hpp deleted file mode 100644 index 526cd1b..0000000 --- a/dsp/lib/sprout/sprout/numeric/fft/fit/ifft.hpp +++ /dev/null @@ -1,55 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_FFT_FIT_IFFT_HPP -#define SPROUT_NUMERIC_FFT_FIT_IFFT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - ifft_impl( - ForwardIterator const& first, ForwardIterator const& last, Result const& result, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::ifft(first, last, result)), - offset, - offset + sprout::fit_size(result, sprout::distance(first, last)) - ); - } - } // namespace detail - // - // ifft - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - ifft(ForwardIterator first, ForwardIterator last, Result const& result) { - return sprout::fit::detail::ifft_impl(first, last, result, sprout::internal_begin_offset(result)); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - ifft(ForwardIterator first, ForwardIterator last) { - return sprout::fit::ifft(first, last, sprout::pit()); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_FFT_FIT_IFFT_HPP diff --git a/dsp/lib/sprout/sprout/numeric/fft/fixed/bitrev_table.hpp b/dsp/lib/sprout/sprout/numeric/fft/fixed/bitrev_table.hpp deleted file mode 100644 index b924a2b..0000000 --- a/dsp/lib/sprout/sprout/numeric/fft/fixed/bitrev_table.hpp +++ /dev/null @@ -1,69 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_FFT_FIXED_BITREV_TABLE_HPP -#define SPROUT_NUMERIC_FFT_FIXED_BITREV_TABLE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - bitrev_table_impl( - Container const& cont, sprout::index_tuple, - std::size_t bit_length, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::size_type size - ) - { - return sprout::remake( - cont, - sprout::size(cont), - (Indexes >= offset && Indexes < offset + size - ? sprout::bit_reverse_in( - static_cast::value_type>(Indexes - offset), - bit_length - ) - : *sprout::next(sprout::internal_begin(cont), Indexes) - )... - ); - } - } // namespace detail - // - // bitrev_table - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - bitrev_table(Container const& cont) { - return sprout::fixed::detail::bitrev_table_impl( - cont, - sprout::container_indexes::make(), - sprout::empty(cont) ? 0 - : sprout::bit_length(sprout::size(cont) - 1) - , - sprout::internal_begin_offset(cont), - sprout::size(cont) - ); - } - } // namespace fixed - - using sprout::fixed::bitrev_table; -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_FFT_FIXED_BITREV_TABLE_HPP diff --git a/dsp/lib/sprout/sprout/numeric/fft/fixed/fft.hpp b/dsp/lib/sprout/sprout/numeric/fft/fixed/fft.hpp deleted file mode 100644 index 66b88ca..0000000 --- a/dsp/lib/sprout/sprout/numeric/fft/fixed/fft.hpp +++ /dev/null @@ -1,118 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_FFT_FIXED_FFT_HPP -#define SPROUT_NUMERIC_FFT_FIXED_FFT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::complex - fft_element( - sprout::array, Size> const& arr, - std::size_t step, std::size_t i, std::size_t j, bool sub, - sprout::array, Size> const& coeffs - ) - { - return sub - ? arr[i * step + j] - coeffs[j * (Size / 2 / step)] * arr[i * step + j + Size / 2] - : arr[i * step + j] + coeffs[j * (Size / 2 / step)] * arr[i * step + j + Size / 2] - ; - } - - template - inline SPROUT_CONSTEXPR sprout::array, Size> - butterfly( - sprout::array, Size> const& arr, - std::size_t step, - sprout::array, Size> const& coeffs, - sprout::index_tuple - ) - { - return sprout::array, Size> { { - fft_element(arr, step, Indexes / (step * 2), Indexes%step, (Indexes&step) != 0, coeffs)... - } }; - } - - template - inline SPROUT_CONSTEXPR sprout::array, Size> - fft_loop( - sprout::array, Size> const& arr, - std::size_t step, - sprout::array, Size> const& coeffs - ) - { - return step == Size ? arr - : fft_loop(butterfly(arr, step, coeffs, sprout::make_index_tuple()), step * 2, coeffs); - } - - template - inline SPROUT_CONSTEXPR sprout::array, Size> - fft(sprout::array, Size> const& arr) { - return fft_loop(arr, 1, sprout::make_fft_coefficients()); - } - - - template - inline SPROUT_CONSTEXPR sprout::array::value_type, sizeof...(Indexes)> - make_input_impl(Container const& cont, sprout::index_tuple) { - return sprout::array::value_type, sizeof...(Indexes)> { { - (sprout::math::less(Indexes, cont.size()) - ? *sprout::next(sprout::begin(cont), Indexes) - : static_cast::value_type>(0) - )... - } }; - } - template - inline SPROUT_CONSTEXPR sprout::array::value_type, Size> - make_input(Container const& cont) { - return make_input_impl(cont, sprout::make_index_tuple()); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - make_fft_result_impl(sprout::array, Size> const& cont, Result const& result, sprout::index_tuple) { - return remake(result, sprout::size(result), cont[Indexes]...); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - make_fft_result(sprout::array, Size> const& cont, Result const& result) { - return make_fft_result_impl(cont, result, sprout::make_index_tuple::static_size>()); - } - } // namespace detail - // - // fft - // Algorithm: Stockham decimation-in-time - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - fft(Container const& cont, Result const& result) { - return sprout::fixed::detail::make_fft_result( - sprout::fixed::detail::fft(sprout::fixed::detail::make_input::static_size>(cont)), result - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - fft(Container const& cont) { - return sprout::fixed::fft(cont, sprout::pit()); - } - } // namespace fixed - - using sprout::fixed::fft; -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_FFT_FIXED_FFT_HPP diff --git a/dsp/lib/sprout/sprout/numeric/fft/fixed/ifft.hpp b/dsp/lib/sprout/sprout/numeric/fft/fixed/ifft.hpp deleted file mode 100644 index afd21db..0000000 --- a/dsp/lib/sprout/sprout/numeric/fft/fixed/ifft.hpp +++ /dev/null @@ -1,65 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_FFT_FIXED_IFFT_HPP -#define SPROUT_NUMERIC_FFT_FIXED_IFFT_HPP - -#include -#include -#include -#include -#include -#include - - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - make_ifft_result_impl(sprout::array, Size> const& container, Result const& result, sprout::index_tuple) { - return remake(result, sprout::size(result), (container[Indexes] / static_cast(Size))...); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - make_ifft_result(sprout::array, Size> const& container, Result const& result) { - return make_ifft_result_impl(container, result, sprout::make_index_tuple::static_size>()); - } - - template - inline SPROUT_CONSTEXPR sprout::array, Size> - ifft(sprout::array, Size> const& arr) { - return sprout::fixed::detail::fft_loop(arr, 1, sprout::make_ifft_coefficients()); - } - } // namespace detail - // - // ifft - // Algorithm: Stockham decimation-in-time - // - template< - typename ForwardIterator, typename Result, - typename sprout::container_traits::size_type Size - = sprout::container_traits::static_size - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - ifft(ForwardIterator first, ForwardIterator last, Result const& result) { - return sprout::fixed::detail::make_ifft_result( - sprout::fixed::detail::ifft(sprout::fixed::detail::make_input(first, last)), result - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - ifft(ForwardIterator first, ForwardIterator last) { - return sprout::fixed::ifft(first, last, sprout::pit()); - } - } // namespace fixed - - using sprout::fixed::ifft; -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_FFT_FIXED_IFFT_HPP diff --git a/dsp/lib/sprout/sprout/numeric/fft/ifft.hpp b/dsp/lib/sprout/sprout/numeric/fft/ifft.hpp deleted file mode 100644 index dff5350..0000000 --- a/dsp/lib/sprout/sprout/numeric/fft/ifft.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_FFT_IFFT_HPP -#define SPROUT_NUMERIC_FFT_IFFT_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_FFT_IFFT_HPP diff --git a/dsp/lib/sprout/sprout/numeric/fit.hpp b/dsp/lib/sprout/sprout/numeric/fit.hpp deleted file mode 100644 index 77f8d92..0000000 --- a/dsp/lib/sprout/sprout/numeric/fit.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_FIT_HPP -#define SPROUT_NUMERIC_FIT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_FIT_HPP diff --git a/dsp/lib/sprout/sprout/numeric/fit/adjacent_difference.hpp b/dsp/lib/sprout/sprout/numeric/fit/adjacent_difference.hpp deleted file mode 100644 index c5fccd7..0000000 --- a/dsp/lib/sprout/sprout/numeric/fit/adjacent_difference.hpp +++ /dev/null @@ -1,75 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_FIT_ADJACENT_DIFFERENCE_HPP -#define SPROUT_NUMERIC_FIT_ADJACENT_DIFFERENCE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - adjacent_difference_impl( - InputIterator const& first, InputIterator const& last, Result const& result, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::adjacent_difference(first, last, result)), - offset, - offset + sprout::fit_size(result, sprout::distance(first, last)) - ); - } - } // namespace detail - // - // adjacent_difference - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - adjacent_difference(InputIterator first, InputIterator last, Result const& result) { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::fit::detail::adjacent_difference_impl(first, last, result, sprout::internal_begin_offset(result)); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - adjacent_difference_impl( - InputIterator const& first, InputIterator const& last, Result const& result, BinaryOperation binary_op, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::adjacent_difference(first, last, result, binary_op)), - offset, - offset + NS_SSCRISK_CEL_OR_SPROUT::min(sprout::distance(first, last), sprout::size(result)) - ); - } - } // namespace detail - // - // adjacent_difference - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - adjacent_difference(InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op) { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::fit::detail::adjacent_difference_impl(first, last, result, binary_op, sprout::internal_begin_offset(result)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_FIT_ADJACENT_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/numeric/fit/exclusive_scan.hpp b/dsp/lib/sprout/sprout/numeric/fit/exclusive_scan.hpp deleted file mode 100644 index 80b9d0c..0000000 --- a/dsp/lib/sprout/sprout/numeric/fit/exclusive_scan.hpp +++ /dev/null @@ -1,77 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_FIT_EXCLUSIVE_SCAN_HPP -#define SPROUT_NUMERIC_FIT_EXCLUSIVE_SCAN_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - exclusive_scan_impl( - InputIterator const& first, InputIterator const& last, Result const& result, T init, - typename sprout::container_traits::difference_type offset - ) - { - typedef typename std::iterator_traits::difference_type diff_type; - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::exclusive_scan(first, last, result, init)), - offset, - offset + NS_SSCRISK_CEL_OR_SPROUT::min(sprout::distance(first, last), sprout::size(result)) - ); - } - } // namespace detail - // - // exclusive_scan - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - exclusive_scan(InputIterator first, InputIterator last, Result const& result, T init) { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::fit::detail::exclusive_scan_impl(first, last, result, init, sprout::internal_begin_offset(result)); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - exclusive_scan_impl( - InputIterator const& first, InputIterator const& last, Result const& result, T init, BinaryOperation binary_op, - typename sprout::container_traits::difference_type offset - ) - { - typedef typename std::iterator_traits::difference_type diff_type; - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::exclusive_scan(first, last, result, init, binary_op)), - offset, - offset + NS_SSCRISK_CEL_OR_SPROUT::min(sprout::distance(first, last), sprout::size(result)) - ); - } - } // namespace detail - // - // exclusive_scan - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - exclusive_scan(InputIterator first, InputIterator last, Result const& result, T init, BinaryOperation binary_op) { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::fit::detail::exclusive_scan_impl(first, last, result, init, binary_op, sprout::internal_begin_offset(result)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_FIT_EXCLUSIVE_SCAN_HPP diff --git a/dsp/lib/sprout/sprout/numeric/fit/inclusive_scan.hpp b/dsp/lib/sprout/sprout/numeric/fit/inclusive_scan.hpp deleted file mode 100644 index 853aeb1..0000000 --- a/dsp/lib/sprout/sprout/numeric/fit/inclusive_scan.hpp +++ /dev/null @@ -1,102 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_FIT_INCLUSIVE_SCAN_HPP -#define SPROUT_NUMERIC_FIT_INCLUSIVE_SCAN_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - inclusive_scan_impl( - InputIterator const& first, InputIterator const& last, Result const& result, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::inclusive_scan(first, last, result)), - offset, - offset + sprout::fit_size(result, sprout::distance(first, last)) - ); - } - } // namespace detail - // - // inclusive_scan - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - inclusive_scan(InputIterator first, InputIterator last, Result const& result) { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::fit::detail::inclusive_scan_impl(first, last, result, sprout::internal_begin_offset(result)); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - inclusive_scan_impl( - InputIterator const& first, InputIterator const& last, Result const& result, BinaryOperation binary_op, - typename sprout::container_traits::difference_type offset - ) - { - typedef typename std::iterator_traits::difference_type diff_type; - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::inclusive_scan(first, last, result, binary_op)), - offset, - offset + NS_SSCRISK_CEL_OR_SPROUT::min(sprout::distance(first, last), sprout::size(result)) - ); - } - } // namespace detail - // - // inclusive_scan - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - inclusive_scan(InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op) { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::fit::detail::inclusive_scan_impl(first, last, result, binary_op, sprout::internal_begin_offset(result)); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - inclusive_scan_impl( - InputIterator const& first, InputIterator const& last, Result const& result, BinaryOperation binary_op, T init, - typename sprout::container_traits::difference_type offset - ) - { - typedef typename std::iterator_traits::difference_type diff_type; - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::inclusive_scan(first, last, result, binary_op, init)), - offset, - offset + NS_SSCRISK_CEL_OR_SPROUT::min(sprout::distance(first, last) + 1, sprout::size(result)) - ); - } - } // namespace detail - // - // inclusive_scan - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - inclusive_scan(InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op, T init) { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::fit::detail::inclusive_scan_impl(first, last, result, binary_op, init, sprout::internal_begin_offset(result)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_FIT_INCLUSIVE_SCAN_HPP diff --git a/dsp/lib/sprout/sprout/numeric/fit/iota.hpp b/dsp/lib/sprout/sprout/numeric/fit/iota.hpp deleted file mode 100644 index c13a094..0000000 --- a/dsp/lib/sprout/sprout/numeric/fit/iota.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_FIT_IOTA_HPP -#define SPROUT_NUMERIC_FIT_IOTA_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - iota_impl( - Container const& cont, T const& value, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::iota(cont, value)), - offset, - offset + sprout::size(cont) - ); - } - } // namespace detail - // - // iota - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - iota(Container const& cont, T const& value) { - return sprout::fit::detail::iota_impl(cont, value, sprout::internal_begin_offset(cont)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_FIT_IOTA_HPP diff --git a/dsp/lib/sprout/sprout/numeric/fit/partial_sum.hpp b/dsp/lib/sprout/sprout/numeric/fit/partial_sum.hpp deleted file mode 100644 index 35f8d4a..0000000 --- a/dsp/lib/sprout/sprout/numeric/fit/partial_sum.hpp +++ /dev/null @@ -1,75 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_FIT_PARTIAL_SUM_HPP -#define SPROUT_NUMERIC_FIT_PARTIAL_SUM_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - partial_sum_impl( - InputIterator const& first, InputIterator const& last, Result const& result, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::partial_sum(first, last, result)), - offset, - offset + sprout::fit_size(result, sprout::distance(first, last)) - ); - } - } // namespace detail - // - // partial_sum - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - partial_sum(InputIterator first, InputIterator last, Result const& result) { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::fit::detail::partial_sum_impl(first, last, result, sprout::internal_begin_offset(result)); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - partial_sum_impl( - InputIterator const& first, InputIterator const& last, Result const& result, BinaryOperation binary_op, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::partial_sum(first, last, result, binary_op)), - offset, - offset + NS_SSCRISK_CEL_OR_SPROUT::min(sprout::distance(first, last), sprout::size(result)) - ); - } - } // namespace detail - // - // partial_sum - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - partial_sum(InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op) { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::fit::detail::partial_sum_impl(first, last, result, binary_op, sprout::internal_begin_offset(result)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_FIT_PARTIAL_SUM_HPP diff --git a/dsp/lib/sprout/sprout/numeric/fit/transform_exclusive_scan.hpp b/dsp/lib/sprout/sprout/numeric/fit/transform_exclusive_scan.hpp deleted file mode 100644 index 781011c..0000000 --- a/dsp/lib/sprout/sprout/numeric/fit/transform_exclusive_scan.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_FIT_TRANSFORM_EXCLUSIVE_SCAN_HPP -#define SPROUT_NUMERIC_FIT_TRANSFORM_EXCLUSIVE_SCAN_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - transform_exclusive_scan_impl( - InputIterator const& first, InputIterator const& last, Result const& result, T init, BinaryOperation binary_op, UnaryOperation unary_op, - typename sprout::container_traits::difference_type offset - ) - { - typedef typename std::iterator_traits::difference_type diff_type; - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::transform_exclusive_scan(first, last, result, init, binary_op, unary_op)), - offset, - offset + NS_SSCRISK_CEL_OR_SPROUT::min(sprout::distance(first, last), sprout::size(result)) - ); - } - } // namespace detail - // - // transform_exclusive_scan - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - transform_exclusive_scan(InputIterator first, InputIterator last, Result const& result, T init, BinaryOperation binary_op, UnaryOperation unary_op) { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::fit::detail::transform_exclusive_scan_impl(first, last, result, init, binary_op, unary_op, sprout::internal_begin_offset(result)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_FIT_TRANSFORM_EXCLUSIVE_SCAN_HPP diff --git a/dsp/lib/sprout/sprout/numeric/fit/transform_inclusive_scan.hpp b/dsp/lib/sprout/sprout/numeric/fit/transform_inclusive_scan.hpp deleted file mode 100644 index a57da8b..0000000 --- a/dsp/lib/sprout/sprout/numeric/fit/transform_inclusive_scan.hpp +++ /dev/null @@ -1,77 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_FIT_TRANSFORM_INCLUSIVE_SCAN_HPP -#define SPROUT_NUMERIC_FIT_TRANSFORM_INCLUSIVE_SCAN_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - transform_inclusive_scan_impl( - InputIterator const& first, InputIterator const& last, Result const& result, BinaryOperation binary_op, UnaryOperation unary_op, - typename sprout::container_traits::difference_type offset - ) - { - typedef typename std::iterator_traits::difference_type diff_type; - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::transform_inclusive_scan(first, last, result, binary_op, unary_op)), - offset, - offset + NS_SSCRISK_CEL_OR_SPROUT::min(sprout::distance(first, last), sprout::size(result)) - ); - } - } // namespace detail - // - // transform_inclusive_scan - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - transform_inclusive_scan(InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op, UnaryOperation unary_op) { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::fit::detail::transform_inclusive_scan_impl(first, last, result, binary_op, unary_op, sprout::internal_begin_offset(result)); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - transform_inclusive_scan_impl( - InputIterator const& first, InputIterator const& last, Result const& result, BinaryOperation binary_op, UnaryOperation unary_op, T init, - typename sprout::container_traits::difference_type offset - ) - { - typedef typename std::iterator_traits::difference_type diff_type; - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::transform_inclusive_scan(first, last, result, binary_op, unary_op, init)), - offset, - offset + NS_SSCRISK_CEL_OR_SPROUT::min(sprout::distance(first, last) + 1, sprout::size(result)) - ); - } - } // namespace detail - // - // transform_inclusive_scan - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - transform_inclusive_scan(InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op, UnaryOperation unary_op, T init) { - static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); - return sprout::fit::detail::transform_inclusive_scan_impl(first, last, result, binary_op, unary_op, init, sprout::internal_begin_offset(result)); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_FIT_TRANSFORM_INCLUSIVE_SCAN_HPP diff --git a/dsp/lib/sprout/sprout/numeric/fixed.hpp b/dsp/lib/sprout/sprout/numeric/fixed.hpp deleted file mode 100644 index 0e07291..0000000 --- a/dsp/lib/sprout/sprout/numeric/fixed.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_FIXED_HPP -#define SPROUT_NUMERIC_FIXED_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_FIXED_HPP diff --git a/dsp/lib/sprout/sprout/numeric/fixed/adjacent_difference.hpp b/dsp/lib/sprout/sprout/numeric/fixed/adjacent_difference.hpp deleted file mode 100644 index deb5ae0..0000000 --- a/dsp/lib/sprout/sprout/numeric/fixed/adjacent_difference.hpp +++ /dev/null @@ -1,202 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_FIXED_ADJACENT_DIFFERENCE_HPP -#define SPROUT_NUMERIC_FIXED_ADJACENT_DIFFERENCE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - adjacent_difference_impl_1( - InputIterator const&, InputIterator const&, Result const& result, - typename sprout::container_traits::size_type, - typename sprout::container_traits::value_type const&, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - adjacent_difference_impl_1( - InputIterator const& first, InputIterator const& last, Result const& result, - typename sprout::container_traits::size_type size, - typename sprout::container_traits::value_type const& value, - Args const&... args - ) - { - return first != last && sizeof...(Args) < size - ? adjacent_difference_impl_1(sprout::next(first), last, result, size, *first, args..., *first - value) - : sprout::detail::container_complate(result, args...) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == 0, - typename sprout::fixed::results::algorithm::type - >::type - adjacent_difference_impl( - InputIterator const&, InputIterator const&, Result const& result, - typename sprout::container_traits::size_type - ) - { - return sprout::remake(result, sprout::size(result)); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != 0, - typename sprout::fixed::results::algorithm::type - >::type - adjacent_difference_impl_1( - InputIterator const& first, InputIterator const& last, Result const& result, - typename sprout::container_traits::size_type size - ) - { - return first != last - ? adjacent_difference_impl_1(sprout::next(first), last, result, size, *first, *first) - : sprout::detail::container_complate(result) - ; - } - } // namespace detail - // - // adjacent_difference - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - adjacent_difference(InputIterator first, InputIterator last, Result const& result) { - return sprout::fixed::detail::adjacent_difference_impl(first, last, result, sprout::size(result)); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - adjacent_difference(InputIterator first, InputIterator last) { - return sprout::fixed::adjacent_difference(first, last, sprout::pit()); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - adjacent_difference_impl_1( - InputIterator const&, InputIterator const&, Result const& result, BinaryOperation, - typename sprout::container_traits::size_type, - typename sprout::container_traits::value_type const&, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args), - typename sprout::fixed::results::algorithm::type - >::type - adjacent_difference_impl_1( - InputIterator const& first, InputIterator const& last, Result const& result, BinaryOperation binary_op, - typename sprout::container_traits::size_type size, - typename sprout::container_traits::value_type const& value, - Args const&... args - ) - { - return first != last && sizeof...(Args) < size - ? adjacent_difference_impl_1(sprout::next(first), last, result, binary_op, size, *first, args..., binary_op(*first, value)) - : sprout::detail::container_complate(result, args...) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == 0, - typename sprout::fixed::results::algorithm::type - >::type - adjacent_difference_impl( - InputIterator const&, InputIterator const&, Result const& result, BinaryOperation, - typename sprout::container_traits::size_type - ) - { - return sprout::remake(result, sprout::size(result)); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != 0, - typename sprout::fixed::results::algorithm::type - >::type - adjacent_difference_impl_1( - InputIterator const& first, InputIterator const& last, Result const& result, BinaryOperation binary_op, - typename sprout::container_traits::size_type size - ) - { - return first != last - ? adjacent_difference_impl_1(sprout::next(first), last, result, binary_op, size, *first, *first) - : sprout::detail::container_complate(result) - ; - } - } // namespace detail - // - // adjacent_difference - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - adjacent_difference(InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op) { - return sprout::fixed::detail::adjacent_difference_impl(first, last, result, binary_op, sprout::size(result)); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - adjacent_difference(InputIterator first, InputIterator last, BinaryOperation binary_op) { - return sprout::fixed::adjacent_difference(first, last, sprout::pit(), binary_op); - } - } // namespace fixed - - template< - typename InputIterator, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - adjacent_difference(InputIterator first, InputIterator last, Result const& result) { - return sprout::fixed::adjacent_difference(first, last, result); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - adjacent_difference(InputIterator first, InputIterator last) { - return sprout::fixed::adjacent_difference(first, last); - } - - template< - typename InputIterator, typename Result, typename BinaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - adjacent_difference(InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op) { - return sprout::fixed::adjacent_difference(first, last, result, binary_op); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - adjacent_difference(InputIterator first, InputIterator last, BinaryOperation binary_op) { - return sprout::fixed::adjacent_difference(first, last, binary_op); - } -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_FIXED_ADJACENT_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/numeric/fixed/exclusive_scan.hpp b/dsp/lib/sprout/sprout/numeric/fixed/exclusive_scan.hpp deleted file mode 100644 index 7be345b..0000000 --- a/dsp/lib/sprout/sprout/numeric/fixed/exclusive_scan.hpp +++ /dev/null @@ -1,228 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_FIXED_EXCLUSIVE_SCAN_HPP -#define SPROUT_NUMERIC_FIXED_EXCLUSIVE_SCAN_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args) + 1, - typename sprout::fixed::results::algorithm::type - >::type - exclusive_scan_impl_1( - InputIterator const&, InputIterator const&, Result const& result, - typename sprout::container_traits::size_type, - typename sprout::container_traits::value_type const& value, - typename sprout::container_traits::value_type const& temp, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args..., value); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args) + 1, - typename sprout::fixed::results::algorithm::type - >::type - exclusive_scan_impl_1( - InputIterator const& first, InputIterator const& last, Result const& result, - typename sprout::container_traits::size_type size, - typename sprout::container_traits::value_type const& value, - typename sprout::container_traits::value_type const& temp, - Args const&... args - ) - { - return first != last && sizeof...(Args) + 1 < size - ? exclusive_scan_impl_1(sprout::next(first), last, result, size, value + temp, *first, args..., value) - : sprout::detail::container_complate(result, args..., value) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == 0, - typename sprout::fixed::results::algorithm::type - >::type - exclusive_scan_impl( - InputIterator const&, InputIterator const&, Result const& result, T, - typename sprout::container_traits::size_type - ) - { - return sprout::detail::container_complate(result); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == 1, - typename sprout::fixed::results::algorithm::type - >::type - exclusive_scan_impl( - InputIterator const&, InputIterator const&, Result const& result, T init, - typename sprout::container_traits::size_type - ) - { - return sprout::detail::container_complate(result, init); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - (sprout::container_traits::static_size > 1), - typename sprout::fixed::results::algorithm::type - >::type - exclusive_scan_impl( - InputIterator const& first, InputIterator const& last, Result const& result, T init, - typename sprout::container_traits::size_type size - ) - { - return first != last - ? exclusive_scan_impl_1(sprout::next(first), last, result, size, init, *first) - : sprout::detail::container_complate(result, init) - ; - } - } // namespace detail - // - // exclusive_scan - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - exclusive_scan(InputIterator first, InputIterator last, Result const& result, T init) { - return sprout::fixed::detail::exclusive_scan_impl(first, last, result, init, sprout::size(result)); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - exclusive_scan(InputIterator first, InputIterator last, T init) { - return sprout::fixed::exclusive_scan(first, last, sprout::pit(), init); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args) + 1, - typename sprout::fixed::results::algorithm::type - >::type - exclusive_scan_impl_1( - InputIterator const&, InputIterator const&, Result const& result, BinaryOperation, - typename sprout::container_traits::size_type, - typename sprout::container_traits::value_type const& value, - typename sprout::container_traits::value_type const& temp, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args..., value); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args) + 1, - typename sprout::fixed::results::algorithm::type - >::type - exclusive_scan_impl_1( - InputIterator const& first, InputIterator const& last, Result const& result, BinaryOperation binary_op, - typename sprout::container_traits::size_type size, - typename sprout::container_traits::value_type const& value, - typename sprout::container_traits::value_type const& temp, - Args const&... args - ) - { - return first != last && sizeof...(Args) + 1 < size - ? exclusive_scan_impl_1(sprout::next(first), last, result, binary_op, size, binary_op(value, temp), *first, args..., value) - : sprout::detail::container_complate(result, args..., value) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == 0, - typename sprout::fixed::results::algorithm::type - >::type - exclusive_scan_impl( - InputIterator const&, InputIterator const&, Result const& result, T, BinaryOperation, - typename sprout::container_traits::size_type - ) - { - return sprout::detail::container_complate(result); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == 1, - typename sprout::fixed::results::algorithm::type - >::type - exclusive_scan_impl( - InputIterator const&, InputIterator const&, Result const& result, T init, BinaryOperation, - typename sprout::container_traits::size_type - ) - { - return sprout::detail::container_complate(result, init); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - (sprout::container_traits::static_size > 1), - typename sprout::fixed::results::algorithm::type - >::type - exclusive_scan_impl( - InputIterator const& first, InputIterator const& last, Result const& result, T init, BinaryOperation binary_op, - typename sprout::container_traits::size_type size - ) - { - return first != last - ? exclusive_scan_impl_1(sprout::next(first), last, result, binary_op, size, init, *first) - : sprout::detail::container_complate(result, init) - ; - } - } // namespace detail - // - // exclusive_scan - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - exclusive_scan(InputIterator first, InputIterator last, Result const& result, T init, BinaryOperation binary_op) { - return sprout::fixed::detail::exclusive_scan_impl(first, last, result, init, binary_op, sprout::size(result)); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - exclusive_scan(InputIterator first, InputIterator last, T init, BinaryOperation binary_op) { - return sprout::fixed::exclusive_scan(first, last, sprout::pit(), init, binary_op); - } - } // namespace fixed - - template< - typename InputIterator, typename Result, typename T, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - exclusive_scan(InputIterator first, InputIterator last, Result const& result, T init) { - return sprout::fixed::exclusive_scan(first, last, result, init); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - exclusive_scan(InputIterator first, InputIterator last, T init) { - return sprout::fixed::exclusive_scan(first, last, init); - } - - template< - typename InputIterator, typename Result, typename T, typename BinaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - exclusive_scan(InputIterator first, InputIterator last, Result const& result, T init, BinaryOperation binary_op) { - return sprout::fixed::exclusive_scan(first, last, result, init, binary_op); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - exclusive_scan(InputIterator first, InputIterator last, T init, BinaryOperation binary_op) { - return sprout::fixed::exclusive_scan(first, last, init, binary_op); - } -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_FIXED_EXCLUSIVE_SCAN_HPP diff --git a/dsp/lib/sprout/sprout/numeric/fixed/inclusive_scan.hpp b/dsp/lib/sprout/sprout/numeric/fixed/inclusive_scan.hpp deleted file mode 100644 index 207a5f5..0000000 --- a/dsp/lib/sprout/sprout/numeric/fixed/inclusive_scan.hpp +++ /dev/null @@ -1,148 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_FIXED_INCLUSIVE_SCAN_HPP -#define SPROUT_NUMERIC_FIXED_INCLUSIVE_SCAN_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - // - // inclusive_scan - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - inclusive_scan(InputIterator first, InputIterator last, Result const& result) { - return sprout::fixed::partial_sum(first, last, result); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - inclusive_scan(InputIterator first, InputIterator last) { - return sprout::fixed::partial_sum(first, last); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - inclusive_scan(InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op) { - return sprout::fixed::partial_sum(first, last, result, binary_op); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - inclusive_scan(InputIterator first, InputIterator last, BinaryOperation binary_op) { - return sprout::fixed::partial_sum(first, last, binary_op); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == 0, - typename sprout::fixed::results::algorithm::type - >::type - inclusive_scan_impl( - InputIterator const&, InputIterator const&, Result const& result, BinaryOperation, T, - typename sprout::container_traits::size_type - ) - { - return sprout::remake(result, sprout::size(result)); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == 1, - typename sprout::fixed::results::algorithm::type - >::type - inclusive_scan_impl( - InputIterator const&, InputIterator const&, Result const& result, BinaryOperation, T init, - typename sprout::container_traits::size_type - ) - { - return sprout::remake(result, sprout::size(result), init); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - (sprout::container_traits::static_size > 1), - typename sprout::fixed::results::algorithm::type - >::type - inclusive_scan_impl( - InputIterator const& first, InputIterator const& last, Result const& result, BinaryOperation binary_op, T init, - typename sprout::container_traits::size_type size - ) - { - return first != last - ? partial_sum_impl_1(first, last, result, binary_op, size, init) - : sprout::detail::container_complate(result, init) - ; - } - } // namespace detail - // - // inclusive_scan - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - inclusive_scan(InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op, T init) { - return sprout::fixed::detail::inclusive_scan_impl(first, last, result, binary_op, init, sprout::size(result)); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - inclusive_scan(InputIterator first, InputIterator last, BinaryOperation binary_op, T init) { - return sprout::fixed::inclusive_scan(first, last, sprout::pit(), binary_op, init); - } - } // namespace fixed - - template< - typename InputIterator, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - inclusive_scan(InputIterator first, InputIterator last, Result const& result) { - return sprout::fixed::inclusive_scan(first, last, result); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - inclusive_scan(InputIterator first, InputIterator last) { - return sprout::fixed::inclusive_scan(first, last); - } - - template< - typename InputIterator, typename Result, typename BinaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - inclusive_scan(InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op) { - return sprout::fixed::inclusive_scan(first, last, result, binary_op); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - inclusive_scan(InputIterator first, InputIterator last, BinaryOperation binary_op) { - return sprout::fixed::inclusive_scan(first, last, binary_op); - } - - template< - typename InputIterator, typename Result, typename BinaryOperation, typename T, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - inclusive_scan(InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op, T init) { - return sprout::fixed::inclusive_scan(first, last, result, binary_op, init); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - inclusive_scan(InputIterator first, InputIterator last, BinaryOperation binary_op, T init) { - return sprout::fixed::inclusive_scan(first, last, binary_op, init); - } -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_FIXED_INCLUSIVE_SCAN_HPP diff --git a/dsp/lib/sprout/sprout/numeric/fixed/iota.hpp b/dsp/lib/sprout/sprout/numeric/fixed/iota.hpp deleted file mode 100644 index 59817f5..0000000 --- a/dsp/lib/sprout/sprout/numeric/fixed/iota.hpp +++ /dev/null @@ -1,89 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_FIXED_IOTA_HPP -#define SPROUT_NUMERIC_FIXED_IOTA_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - iota_impl( - Container const& cont, sprout::index_tuple, - T value, - typename sprout::container_traits::difference_type offset, - typename sprout::container_traits::size_type size - ) - { - return sprout::remake( - cont, - sprout::size(cont), - (Indexes >= offset && Indexes < offset + size - ? static_cast::value_type>(value + (Indexes - offset)) - : *sprout::next(sprout::internal_begin(cont), Indexes) - )... - ); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - iota(Container const& cont, T value) { - return sprout::fixed::detail::iota_impl( - cont, sprout::container_indexes::make(), - value, - sprout::internal_begin_offset(cont), - sprout::size(cont) - ); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_fixed_container::value, - typename sprout::fixed::results::algorithm::type - >::type - iota(Container const& cont, T value) { - return sprout::remake( - cont, sprout::size(cont), - sprout::make_counting_iterator(value), - sprout::next(sprout::make_counting_iterator(value), sprout::size(cont)) - ); - } - } // namespace detail - // - // iota - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - iota(Container const& cont, T value) { - return sprout::fixed::detail::iota(cont, value); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - iota(T value) { - return sprout::fixed::detail::iota(sprout::pit(), value); - } - } // namespace fixed - - using sprout::fixed::iota; -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_FIXED_IOTA_HPP diff --git a/dsp/lib/sprout/sprout/numeric/fixed/partial_sum.hpp b/dsp/lib/sprout/sprout/numeric/fixed/partial_sum.hpp deleted file mode 100644 index 4b24cec..0000000 --- a/dsp/lib/sprout/sprout/numeric/fixed/partial_sum.hpp +++ /dev/null @@ -1,202 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_FIXED_PARTIAL_SUM_HPP -#define SPROUT_NUMERIC_FIXED_PARTIAL_SUM_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args) + 1, - typename sprout::fixed::results::algorithm::type - >::type - partial_sum_impl_1( - InputIterator const&, InputIterator const&, Result const& result, - typename sprout::container_traits::size_type, - typename sprout::container_traits::value_type const& value, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args..., value); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args) + 1, - typename sprout::fixed::results::algorithm::type - >::type - partial_sum_impl_1( - InputIterator const& first, InputIterator const& last, Result const& result, - typename sprout::container_traits::size_type size, - typename sprout::container_traits::value_type const& value, - Args const&... args - ) - { - return first != last && sizeof...(Args) + 1 < size - ? partial_sum_impl_1(sprout::next(first), last, result, size, value + *first, args..., value) - : sprout::detail::container_complate(result, args..., value) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == 0, - typename sprout::fixed::results::algorithm::type - >::type - partial_sum_impl( - InputIterator const&, InputIterator const&, Result const& result, - typename sprout::container_traits::size_type - ) - { - return sprout::remake(result, sprout::size(result)); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != 0, - typename sprout::fixed::results::algorithm::type - >::type - partial_sum_impl( - InputIterator const& first, InputIterator const& last, Result const& result, - typename sprout::container_traits::size_type size - ) - { - return first != last - ? partial_sum_impl_1(sprout::next(first), last, result, size, *first) - : sprout::detail::container_complate(result) - ; - } - } // namespace detail - // - // partial_sum - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - partial_sum(InputIterator first, InputIterator last, Result const& result) { - return sprout::fixed::detail::partial_sum_impl(first, last, result, sprout::size(result)); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - partial_sum(InputIterator first, InputIterator last) { - return sprout::fixed::partial_sum(first, last, sprout::pit()); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args) + 1, - typename sprout::fixed::results::algorithm::type - >::type - partial_sum_impl_1( - InputIterator const&, InputIterator const&, Result const& result, BinaryOperation, - typename sprout::container_traits::size_type, - typename sprout::container_traits::value_type const& value, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args..., value); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args) + 1, - typename sprout::fixed::results::algorithm::type - >::type - partial_sum_impl_1( - InputIterator const& first, InputIterator const& last, Result const& result, BinaryOperation binary_op, - typename sprout::container_traits::size_type size, - typename sprout::container_traits::value_type const& value, - Args const&... args - ) - { - return first != last && sizeof...(Args) + 1 < size - ? partial_sum_impl_1(sprout::next(first), last, result, binary_op, size, binary_op(value, *first), args..., value) - : sprout::detail::container_complate(result, args..., value) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == 0, - typename sprout::fixed::results::algorithm::type - >::type - partial_sum_impl( - InputIterator const&, InputIterator const&, Result const& result, BinaryOperation, - typename sprout::container_traits::size_type - ) - { - return sprout::remake(result, sprout::size(result)); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != 0, - typename sprout::fixed::results::algorithm::type - >::type - partial_sum_impl( - InputIterator const& first, InputIterator const& last, Result const& result, BinaryOperation binary_op, - typename sprout::container_traits::size_type size - ) - { - return first != last - ? partial_sum_impl_1(sprout::next(first), last, result, binary_op, size, *first) - : sprout::detail::container_complate(result) - ; - } - } // namespace detail - // - // partial_sum - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - partial_sum(InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op) { - return sprout::fixed::detail::partial_sum_impl(first, last, result, binary_op, sprout::size(result)); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - partial_sum(InputIterator first, InputIterator last, BinaryOperation binary_op) { - return sprout::fixed::partial_sum(first, last, sprout::pit(), binary_op); - } - } // namespace fixed - - template< - typename InputIterator, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - partial_sum(InputIterator first, InputIterator last, Result const& result) { - return sprout::fixed::partial_sum(first, last, result); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - partial_sum(InputIterator first, InputIterator last) { - return sprout::fixed::partial_sum(first, last); - } - - template< - typename InputIterator, typename Result, typename BinaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - partial_sum(InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op) { - return sprout::fixed::partial_sum(first, last, result, binary_op); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - partial_sum(InputIterator first, InputIterator last, BinaryOperation binary_op) { - return sprout::fixed::partial_sum(first, last, binary_op); - } -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_FIXED_PARTIAL_SUM_HPP diff --git a/dsp/lib/sprout/sprout/numeric/fixed/transform_exclusive_scan.hpp b/dsp/lib/sprout/sprout/numeric/fixed/transform_exclusive_scan.hpp deleted file mode 100644 index eb89af9..0000000 --- a/dsp/lib/sprout/sprout/numeric/fixed/transform_exclusive_scan.hpp +++ /dev/null @@ -1,126 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_FIXED_TRANSFORM_EXCLUSIVE_SCAN_HPP -#define SPROUT_NUMERIC_FIXED_TRANSFORM_EXCLUSIVE_SCAN_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args) + 1, - typename sprout::fixed::results::algorithm::type - >::type - transform_exclusive_scan_impl_1( - InputIterator const&, InputIterator const&, Result const& result, BinaryOperation, UnaryOperation, - typename sprout::container_traits::size_type, - typename sprout::container_traits::value_type const& value, - typename sprout::container_traits::value_type const& temp, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args..., value); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args) + 1, - typename sprout::fixed::results::algorithm::type - >::type - transform_exclusive_scan_impl_1( - InputIterator const& first, InputIterator const& last, Result const& result, BinaryOperation binary_op, UnaryOperation unary_op, - typename sprout::container_traits::size_type size, - typename sprout::container_traits::value_type const& value, - typename sprout::container_traits::value_type const& temp, - Args const&... args - ) - { - return first != last && sizeof...(Args) + 1 < size - ? transform_exclusive_scan_impl_1(sprout::next(first), last, result, binary_op, unary_op, size, binary_op(value, temp), unary_op(*first), args..., value) - : sprout::detail::container_complate(result, args..., value) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == 0, - typename sprout::fixed::results::algorithm::type - >::type - transform_exclusive_scan_impl( - InputIterator const&, InputIterator const&, Result const& result, T, BinaryOperation, UnaryOperation, - typename sprout::container_traits::size_type - ) - { - return sprout::detail::container_complate(result); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == 1, - typename sprout::fixed::results::algorithm::type - >::type - transform_exclusive_scan_impl( - InputIterator const&, InputIterator const&, Result const& result, T init, BinaryOperation, UnaryOperation, - typename sprout::container_traits::size_type - ) - { - return sprout::detail::container_complate(result, init); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - (sprout::container_traits::static_size > 1), - typename sprout::fixed::results::algorithm::type - >::type - transform_exclusive_scan_impl( - InputIterator const& first, InputIterator const& last, Result const& result, T init, BinaryOperation binary_op, UnaryOperation unary_op, - typename sprout::container_traits::size_type size - ) - { - return first != last - ? transform_exclusive_scan_impl_1(sprout::next(first), last, result, binary_op, unary_op, size, init, unary_op(*first)) - : sprout::detail::container_complate(result, init) - ; - } - } // namespace detail - // - // transform_exclusive_scan - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform_exclusive_scan(InputIterator first, InputIterator last, Result const& result, T init, BinaryOperation binary_op, UnaryOperation unary_op) { - return sprout::fixed::detail::transform_exclusive_scan_impl(first, last, result, init, binary_op, unary_op, sprout::size(result)); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform_exclusive_scan(InputIterator first, InputIterator last, T init, BinaryOperation binary_op, UnaryOperation unary_op) { - return sprout::fixed::transform_exclusive_scan(first, last, sprout::pit(), init, binary_op, unary_op); - } - } // namespace fixed - - template< - typename InputIterator, typename Result, typename T, typename BinaryOperation, typename UnaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform_exclusive_scan(InputIterator first, InputIterator last, Result const& result, T init, BinaryOperation binary_op, UnaryOperation unary_op) { - return sprout::fixed::transform_exclusive_scan(first, last, result, init, binary_op, unary_op); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform_exclusive_scan(InputIterator first, InputIterator last, T init, BinaryOperation binary_op, UnaryOperation unary_op) { - return sprout::fixed::transform_exclusive_scan(first, last, init, binary_op, unary_op); - } -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_FIXED_TRANSFORM_EXCLUSIVE_SCAN_HPP diff --git a/dsp/lib/sprout/sprout/numeric/fixed/transform_inclusive_scan.hpp b/dsp/lib/sprout/sprout/numeric/fixed/transform_inclusive_scan.hpp deleted file mode 100644 index 75278c7..0000000 --- a/dsp/lib/sprout/sprout/numeric/fixed/transform_inclusive_scan.hpp +++ /dev/null @@ -1,183 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_FIXED_TRANSFORM_INCLUSIVE_SCAN_HPP -#define SPROUT_NUMERIC_FIXED_TRANSFORM_INCLUSIVE_SCAN_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == sizeof...(Args) + 1, - typename sprout::fixed::results::algorithm::type - >::type - transform_inclusive_scan_impl_1( - InputIterator const&, InputIterator const&, Result const& result, BinaryOperation, UnaryOperation, - typename sprout::container_traits::size_type, - typename sprout::container_traits::value_type const& value, - Args const&... args - ) - { - return sprout::remake(result, sprout::size(result), args..., value); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != sizeof...(Args) + 1, - typename sprout::fixed::results::algorithm::type - >::type - transform_inclusive_scan_impl_1( - InputIterator const& first, InputIterator const& last, Result const& result, BinaryOperation binary_op, UnaryOperation unary_op, - typename sprout::container_traits::size_type size, - typename sprout::container_traits::value_type const& value, - Args const&... args - ) - { - return first != last && sizeof...(Args) + 1 < size - ? transform_inclusive_scan_impl_1(sprout::next(first), last, result, binary_op, unary_op, size, binary_op(value, unary_op(*first)), args..., value) - : sprout::detail::container_complate(result, args..., value) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == 0, - typename sprout::fixed::results::algorithm::type - >::type - transform_inclusive_scan_impl( - InputIterator const&, InputIterator const&, Result const& result, BinaryOperation, UnaryOperation, - typename sprout::container_traits::size_type - ) - { - return sprout::remake(result, sprout::size(result)); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size != 0, - typename sprout::fixed::results::algorithm::type - >::type - transform_inclusive_scan_impl( - InputIterator const& first, InputIterator const& last, Result const& result, BinaryOperation binary_op, UnaryOperation unary_op, - typename sprout::container_traits::size_type size - ) - { - return first != last - ? transform_inclusive_scan_impl_1(sprout::next(first), last, result, binary_op, unary_op, size, unary_op(*first)) - : sprout::detail::container_complate(result) - ; - } - } // namespace detail - // - // transform_inclusive_scan - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform_inclusive_scan(InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op, UnaryOperation unary_op) { - return sprout::fixed::detail::transform_inclusive_scan_impl(first, last, result, binary_op, unary_op, sprout::size(result)); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform_inclusive_scan(InputIterator first, InputIterator last, BinaryOperation binary_op, UnaryOperation unary_op) { - return sprout::fixed::transform_inclusive_scan(first, last, sprout::pit(), binary_op, unary_op); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == 0, - typename sprout::fixed::results::algorithm::type - >::type - transform_inclusive_scan_impl( - InputIterator const&, InputIterator const&, Result const& result, BinaryOperation, T, - typename sprout::container_traits::size_type - ) - { - return sprout::remake(result, sprout::size(result)); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::container_traits::static_size == 1, - typename sprout::fixed::results::algorithm::type - >::type - transform_inclusive_scan_impl( - InputIterator const&, InputIterator const&, Result const& result, BinaryOperation, T init, - typename sprout::container_traits::size_type - ) - { - return sprout::remake(result, sprout::size(result), init); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - (sprout::container_traits::static_size > 1), - typename sprout::fixed::results::algorithm::type - >::type - transform_inclusive_scan_impl( - InputIterator const& first, InputIterator const& last, Result const& result, BinaryOperation binary_op, UnaryOperation unary_op, T init, - typename sprout::container_traits::size_type size - ) - { - return first != last - ? transform_inclusive_scan_impl_1(first, last, result, binary_op, unary_op, size, init) - : sprout::detail::container_complate(result, init) - ; - } - } // namespace detail - // - // transform_inclusive_scan - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform_inclusive_scan(InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op, UnaryOperation unary_op, T init) { - return sprout::fixed::detail::transform_inclusive_scan_impl(first, last, result, binary_op, unary_op, init, sprout::size(result)); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform_inclusive_scan(InputIterator first, InputIterator last, BinaryOperation binary_op, UnaryOperation unary_op, T init) { - return sprout::fixed::transform_inclusive_scan(first, last, sprout::pit(), binary_op, unary_op, init); - } - } // namespace fixed - - template< - typename InputIterator, typename Result, typename BinaryOperation, typename UnaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform_inclusive_scan(InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op, UnaryOperation unary_op) { - return sprout::fixed::transform_inclusive_scan(first, last, result, binary_op, unary_op); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform_inclusive_scan(InputIterator first, InputIterator last, BinaryOperation binary_op, UnaryOperation unary_op) { - return sprout::fixed::transform_inclusive_scan(first, last, binary_op, unary_op); - } - - template< - typename InputIterator, typename Result, typename BinaryOperation, typename UnaryOperation, typename T, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform_inclusive_scan(InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op, UnaryOperation unary_op, T init) { - return sprout::fixed::transform_inclusive_scan(first, last, result, binary_op, unary_op, init); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform_inclusive_scan(InputIterator first, InputIterator last, BinaryOperation binary_op, UnaryOperation unary_op, T init) { - return sprout::fixed::transform_inclusive_scan(first, last, binary_op, unary_op, unary_op, init); - } -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_FIXED_TRANSFORM_INCLUSIVE_SCAN_HPP diff --git a/dsp/lib/sprout/sprout/numeric/inclusive_scan.hpp b/dsp/lib/sprout/sprout/numeric/inclusive_scan.hpp deleted file mode 100644 index dd318ec..0000000 --- a/dsp/lib/sprout/sprout/numeric/inclusive_scan.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_INCLUSIVE_SCAN_HPP -#define SPROUT_NUMERIC_INCLUSIVE_SCAN_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_INCLUSIVE_SCAN_HPP diff --git a/dsp/lib/sprout/sprout/numeric/inner_product.hpp b/dsp/lib/sprout/sprout/numeric/inner_product.hpp deleted file mode 100644 index 4872246..0000000 --- a/dsp/lib/sprout/sprout/numeric/inner_product.hpp +++ /dev/null @@ -1,144 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_INNNER_PRODUCT_HPP -#define SPROUT_NUMERIC_INNNER_PRODUCT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR T - inner_product_ra( - RandomAccessIterator1 first1, RandomAccessIterator1 last1, RandomAccessIterator2 first2, - BinaryOperation1 binary_op1, BinaryOperation2 binary_op2, - typename std::iterator_traits::difference_type pivot, T init - ) - { - return pivot == 0 ? binary_op(init, binary_op2(*first1, *first2)) - : sprout::detail::inner_product_ra( - sprout::next(first1, pivot), last1, sprout::next(first2, pivot), binary_op1, binary_op2, - (sprout::distance(first1, last1) - pivot) / 2, - sprout::detail::inner_product_ra( - first1, sprout::next(first1, pivot), first2, binary_op1, binary_op2, - pivot / 2, - init - ) - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - T - >::type - inner_product( - RandomAccessIterator1 first1, RandomAccessIterator1 last1, RandomAccessIterator2 first2, T init, - BinaryOperation1 binary_op1, BinaryOperation2 binary_op2, - std::random_access_iterator_tag* - ) - { - return first1 == last1 ? init - : sprout::detail::inner_product_ra( - first1, last1, first2, binary_op1, binary_op2, - sprout::distance(first1, last1) / 2, - init - ) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - inner_product_impl_1( - sprout::tuples::tuple const& current, - InputIterator1 last1, BinaryOperation1 binary_op1, BinaryOperation2 binary_op2, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::tuples::tuple type; - return sprout::tuples::get<0>(current) == last1 ? current - : n == 1 ? type( - sprout::next(sprout::tuples::get<0>(current)), sprout::next(sprout::tuples::get<1>(current)), - binary_op1(sprout::tuples::get<2>(current), binary_op2(*sprout::tuples::get<0>(current), *sprout::tuples::get<1>(current))) - ) - : sprout::detail::inner_product_impl_1( - sprout::detail::inner_product_impl_1( - current, - last1, binary_op1, binary_op2, n / 2 - ), - last1, binary_op1, binary_op2, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - inner_product_impl( - sprout::tuples::tuple const& current, - InputIterator1 last1, BinaryOperation1 binary_op1, BinaryOperation2 binary_op2, typename std::iterator_traits::difference_type n - ) - { - return sprout::tuples::get<0>(current) == last1 ? current - : sprout::detail::inner_product_impl( - sprout::detail::inner_product_impl_1( - current, - last1, binary_op1, binary_op2, n - ), - last1, binary_op1, binary_op2, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR T - inner_product( - InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, T init, - BinaryOperation1 binary_op1, BinaryOperation2 binary_op2, - std::input_iterator_tag* - ) - { - typedef sprout::tuples::tuple type; - return sprout::tuples::get<2>(sprout::detail::inner_product_impl(type(first1, first2, init), last1, binary_op1, binary_op2)); - } - } // namespace detail - - // - // inner_product - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR T - inner_product( - InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, T init, - BinaryOperation1 binary_op1, BinaryOperation2 binary_op2 - ) - { - typedef typename sprout::common_iterator_category::type* category; - return sprout::detail::inner_product(first1, last1, first2, init, binary_op1, binary_op2, category()); - } - - template - inline SPROUT_CONSTEXPR T - inner_product(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, T init) { - return sprout::inner_product( - first1, last1, first2, init, - sprout::plus<>(), - sprout::multiplies<>() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_INNNER_PRODUCT_HPP diff --git a/dsp/lib/sprout/sprout/numeric/iota.hpp b/dsp/lib/sprout/sprout/numeric/iota.hpp deleted file mode 100644 index a35f225..0000000 --- a/dsp/lib/sprout/sprout/numeric/iota.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_IOTA_HPP -#define SPROUT_NUMERIC_IOTA_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_IOTA_HPP diff --git a/dsp/lib/sprout/sprout/numeric/modifying.hpp b/dsp/lib/sprout/sprout/numeric/modifying.hpp deleted file mode 100644 index ba8efc1..0000000 --- a/dsp/lib/sprout/sprout/numeric/modifying.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_MODIFYIING_HPP -#define SPROUT_NUMERIC_MODIFYIING_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_MODIFYIING_HPP diff --git a/dsp/lib/sprout/sprout/numeric/non_modifying.hpp b/dsp/lib/sprout/sprout/numeric/non_modifying.hpp deleted file mode 100644 index 489df8e..0000000 --- a/dsp/lib/sprout/sprout/numeric/non_modifying.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_NON_MODIFYIING_HPP -#define SPROUT_NUMERIC_NON_MODIFYIING_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_NON_MODIFYIING_HPP diff --git a/dsp/lib/sprout/sprout/numeric/partial_sum.hpp b/dsp/lib/sprout/sprout/numeric/partial_sum.hpp deleted file mode 100644 index b9aaa6b..0000000 --- a/dsp/lib/sprout/sprout/numeric/partial_sum.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_PARTIAL_SUM_HPP -#define SPROUT_NUMERIC_PARTIAL_SUM_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_PARTIAL_SUM_HPP diff --git a/dsp/lib/sprout/sprout/numeric/reduce.hpp b/dsp/lib/sprout/sprout/numeric/reduce.hpp deleted file mode 100644 index 440c6e6..0000000 --- a/dsp/lib/sprout/sprout/numeric/reduce.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_REDUCE_HPP -#define SPROUT_NUMERIC_REDUCE_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // reduce - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::value_type - reduce(InputIterator first, InputIterator last) { - return sprout::accumulate(first, last, typename std::iterator_traits::value_type()); - } - - template - inline SPROUT_CONSTEXPR T - reduce(InputIterator first, InputIterator last, T init) { - return sprout::accumulate(first, last, init); - } - - template - inline SPROUT_CONSTEXPR T - reduce(InputIterator first, InputIterator last, T init, BinaryOperation binary_op) { - return sprout::accumulate(first, last, init, binary_op); - } -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_REDUCE_HPP diff --git a/dsp/lib/sprout/sprout/numeric/transform_exclusive_scan.hpp b/dsp/lib/sprout/sprout/numeric/transform_exclusive_scan.hpp deleted file mode 100644 index 031f047..0000000 --- a/dsp/lib/sprout/sprout/numeric/transform_exclusive_scan.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_TRANSFORM_EXCLUSIVE_SCAN_HPP -#define SPROUT_NUMERIC_TRANSFORM_EXCLUSIVE_SCAN_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_TRANSFORM_EXCLUSIVE_SCAN_HPP diff --git a/dsp/lib/sprout/sprout/numeric/transform_inclusive_scan.hpp b/dsp/lib/sprout/sprout/numeric/transform_inclusive_scan.hpp deleted file mode 100644 index 8207c35..0000000 --- a/dsp/lib/sprout/sprout/numeric/transform_inclusive_scan.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_TRANSFORM_INCLUSIVE_SCAN_HPP -#define SPROUT_NUMERIC_TRANSFORM_INCLUSIVE_SCAN_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_NUMERIC_TRANSFORM_INCLUSIVE_SCAN_HPP diff --git a/dsp/lib/sprout/sprout/numeric/transform_reduce.hpp b/dsp/lib/sprout/sprout/numeric/transform_reduce.hpp deleted file mode 100644 index d4b4078..0000000 --- a/dsp/lib/sprout/sprout/numeric/transform_reduce.hpp +++ /dev/null @@ -1,243 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_NUMERIC_TRANSFORM_REDUCE_HPP -#define SPROUT_NUMERIC_TRANSFORM_REDUCE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR T - transform_reduce_ra( - RandomAccessIterator1 const& first1, RandomAccessIterator1 const& last1, RandomAccessIterator2 const& first2, - BinaryOperation1 binary_op1, BinaryOperation2 binary_op2, - typename std::iterator_traits::difference_type pivot, T const& init - ) - { - return pivot == 0 ? binary_op1(init, binary_op2(*first1, *first2)) - : sprout::detail::transform_reduce_ra( - sprout::next(first1, pivot), last1, sprout::next(first2, pivot), binary_op1, binary_op2, - (sprout::distance(first1, last1) - pivot) / 2, - sprout::detail::transform_reduce_ra( - first1, sprout::next(first1, pivot), first2, binary_op1, binary_op2, - pivot / 2, - init - ) - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - T - >::type - transform_reduce( - RandomAccessIterator1 const& first1, RandomAccessIterator1 const& last1, RandomAccessIterator2 const& first2, - T init, BinaryOperation1 binary_op1, BinaryOperation2 binary_op2, - std::random_access_iterator_tag* - ) - { - return first1 == last1 ? init - : sprout::detail::transform_reduce_ra( - first1, last1, first2, binary_op1, binary_op2, - sprout::distance(first1, last1) / 2, - init - ) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::tuple - transform_reduce_impl_1( - sprout::tuple const& current, - InputIterator1 const& last1, BinaryOperation1 binary_op1, BinaryOperation2 binary_op2, - typename std::iterator_traits::difference_type n - ) - { - typedef sprout::tuple type; - return sprout::get<0>(current) == last1 ? current - : n == 1 ? type( - sprout::next(sprout::get<0>(current)), sprout::next(sprout::get<1>(current)), - binary_op1(sprout::get<2>(current), binary_op2(*sprout::get<0>(current), *sprout::get<1>(current))) - ) - : sprout::detail::transform_reduce_impl_1( - sprout::detail::transform_reduce_impl_1( - current, - last1, binary_op1, binary_op2, n / 2 - ), - last1, binary_op1, binary_op2, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::tuple - transform_reduce_impl( - sprout::tuple const& current, - InputIterator1 const& last1, BinaryOperation1 binary_op1, BinaryOperation2 binary_op2, - typename std::iterator_traits::difference_type n - ) - { - return sprout::get<0>(current) == last1 ? current - : sprout::detail::transform_reduce_impl( - sprout::detail::transform_reduce_impl_1( - current, - last1, binary_op1, binary_op2, n - ), - last1, binary_op1, binary_op2, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR T - transform_reduce( - InputIterator1 const& first1, InputIterator1 const& last1, InputIterator2 const& first2, - T init, BinaryOperation1 binary_op1, BinaryOperation2 binary_op2, - std::input_iterator_tag* - ) - { - typedef sprout::tuple type; - return sprout::get<2>(sprout::detail::transform_reduce_impl(type(first1, first2, init), last1, binary_op1, binary_op2, 1)); - } - } // namespace detail - - // - // transform_reduce - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR T - transform_reduce( - InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, - T init, BinaryOperation1 binary_op1, BinaryOperation2 binary_op2 - ) - { - typedef typename sprout::common_iterator_category::type* category; - return sprout::detail::transform_reduce(first1, last1, first2, init, binary_op1, binary_op2, category()); - } - - template - inline SPROUT_CONSTEXPR T - transform_reduce(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, T init) { - typedef typename sprout::common_iterator_category::type* category; - return sprout::detail::transform_reduce(first1, last1, first2, init, sprout::plus<>(), sprout::multiplies<>(), category()); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR T - transform_reduce_ra( - RandomAccessIterator const& first, RandomAccessIterator const& last, BinaryOperation binary_op, UnaryOperation unary_op, - typename std::iterator_traits::difference_type pivot, T const& init - ) - { - return pivot == 0 ? binary_op(init, unary_op(*first)) - : sprout::detail::transform_reduce_ra( - sprout::next(first, pivot), last, binary_op, unary_op, - (sprout::distance(first, last) - pivot) / 2, - sprout::detail::transform_reduce_ra( - first, sprout::next(first, pivot), binary_op, unary_op, - pivot / 2, - init - ) - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - T - >::type - transform_reduce( - RandomAccessIterator const& first, RandomAccessIterator const& last, T init, BinaryOperation binary_op, UnaryOperation unary_op, - std::random_access_iterator_tag* - ) - { - return first == last ? init - : sprout::detail::transform_reduce_ra( - first, last, binary_op, unary_op, - sprout::distance(first, last) / 2, - init - ) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::pair - transform_reduce_impl_1( - sprout::pair const& current, - InputIterator const& last, BinaryOperation binary_op, UnaryOperation unary_op, - typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair type; - return current.first == last ? current - : n == 1 ? type(sprout::next(current.first), binary_op(current.second, unary_op(*current.first))) - : sprout::detail::transform_reduce_impl_1( - sprout::detail::transform_reduce_impl_1( - current, - last, binary_op, unary_op, n / 2 - ), - last, binary_op, unary_op, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - transform_reduce_impl( - sprout::pair const& current, - InputIterator const& last, BinaryOperation binary_op, UnaryOperation unary_op, - typename std::iterator_traits::difference_type n - ) - { - return current.first == last ? current - : sprout::detail::transform_reduce_impl( - sprout::detail::transform_reduce_impl_1( - current, - last, binary_op, unary_op, n - ), - last, binary_op, unary_op, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR T - transform_reduce( - InputIterator const& first, InputIterator const& last, T init, BinaryOperation binary_op, UnaryOperation unary_op, - std::input_iterator_tag* - ) - { - typedef sprout::pair type; - return sprout::detail::transform_reduce_impl(type(first, init), last, binary_op, unary_op, 1).second; - } - } // namespace detail - - // - // transform_reduce - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR T - transform_reduce(InputIterator first, InputIterator last, T init, BinaryOperation binary_op, UnaryOperation unary_op) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::detail::transform_reduce(first, last, init, binary_op, unary_op, category()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_NUMERIC_TRANSFORM_REDUCE_HPP diff --git a/dsp/lib/sprout/sprout/operation.hpp b/dsp/lib/sprout/sprout/operation.hpp deleted file mode 100644 index 3ab89ce..0000000 --- a/dsp/lib/sprout/sprout/operation.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_HPP -#define SPROUT_OPERATION_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_OPERATION_HPP diff --git a/dsp/lib/sprout/sprout/operation/append.hpp b/dsp/lib/sprout/sprout/operation/append.hpp deleted file mode 100644 index 787c290..0000000 --- a/dsp/lib/sprout/sprout/operation/append.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_APPEND_HPP -#define SPROUT_OPERATION_APPEND_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_OPERATION_APPEND_HPP diff --git a/dsp/lib/sprout/sprout/operation/append_back.hpp b/dsp/lib/sprout/sprout/operation/append_back.hpp deleted file mode 100644 index f49568a..0000000 --- a/dsp/lib/sprout/sprout/operation/append_back.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_APPEND_BACK_HPP -#define SPROUT_OPERATION_APPEND_BACK_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_OPERATION_APPEND_BACK_HPP diff --git a/dsp/lib/sprout/sprout/operation/append_front.hpp b/dsp/lib/sprout/sprout/operation/append_front.hpp deleted file mode 100644 index 03588ae..0000000 --- a/dsp/lib/sprout/sprout/operation/append_front.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_APPEND_FRONT_HPP -#define SPROUT_OPERATION_APPEND_FRONT_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_OPERATION_APPEND_FRONT_HPP diff --git a/dsp/lib/sprout/sprout/operation/erase.hpp b/dsp/lib/sprout/sprout/operation/erase.hpp deleted file mode 100644 index 7294a16..0000000 --- a/dsp/lib/sprout/sprout/operation/erase.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_ERASE_HPP -#define SPROUT_OPERATION_ERASE_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_OPERATION_ERASE_HPP diff --git a/dsp/lib/sprout/sprout/operation/erase_n.hpp b/dsp/lib/sprout/sprout/operation/erase_n.hpp deleted file mode 100644 index d563ab5..0000000 --- a/dsp/lib/sprout/sprout/operation/erase_n.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_ERASE_N_HPP -#define SPROUT_OPERATION_ERASE_N_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_OPERATION_ERASE_N_HPP diff --git a/dsp/lib/sprout/sprout/operation/fit.hpp b/dsp/lib/sprout/sprout/operation/fit.hpp deleted file mode 100644 index de44930..0000000 --- a/dsp/lib/sprout/sprout/operation/fit.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIT_HPP -#define SPROUT_OPERATION_FIT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_OPERATION_FIT_HPP diff --git a/dsp/lib/sprout/sprout/operation/fit/append.hpp b/dsp/lib/sprout/sprout/operation/fit/append.hpp deleted file mode 100644 index b5edfd8..0000000 --- a/dsp/lib/sprout/sprout/operation/fit/append.hpp +++ /dev/null @@ -1,67 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIT_APPEND_HPP -#define SPROUT_OPERATION_FIT_APPEND_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace results { - // - // append - // - template - struct append { - public: - typedef sprout::sub_array< - typename sprout::container_traits< - typename sprout::fixed::results::append::type - >::internal_type - > type; - }; - } // namespace results - - // - // append - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::append::type - append( - Container const& cont, typename sprout::container_traits::const_iterator pos, - Input const& input - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::append(cont, pos, input)), - sprout::internal_begin_offset(cont), - sprout::internal_end_offset(cont) + sprout::size(input) - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::append::type - append( - Container const& cont, typename sprout::container_traits::difference_type pos, - Input const& input - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::append(cont, pos, input)), - sprout::internal_begin_offset(cont), - sprout::internal_end_offset(cont) + sprout::size(input) - ); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIT_APPEND_HPP diff --git a/dsp/lib/sprout/sprout/operation/fit/append_back.hpp b/dsp/lib/sprout/sprout/operation/fit/append_back.hpp deleted file mode 100644 index 9469a59..0000000 --- a/dsp/lib/sprout/sprout/operation/fit/append_back.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIT_APPEND_BACK_HPP -#define SPROUT_OPERATION_FIT_APPEND_BACK_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace results { - // - // append_back - // - template - struct append_back { - typedef sprout::sub_array< - typename sprout::container_traits< - typename sprout::fixed::results::append_back::type - >::internal_type - > type; - }; - } // namespace results - - // - // append_back - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::append_back::type - append_back(Container const& cont, Input const& input) { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::append_back(cont, input)), - sprout::internal_begin_offset(cont), - sprout::internal_end_offset(cont) + sprout::size(input) - ); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIT_APPEND_BACK_HPP diff --git a/dsp/lib/sprout/sprout/operation/fit/append_front.hpp b/dsp/lib/sprout/sprout/operation/fit/append_front.hpp deleted file mode 100644 index f78650c..0000000 --- a/dsp/lib/sprout/sprout/operation/fit/append_front.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIT_APPEND_FRONT_HPP -#define SPROUT_OPERATION_FIT_APPEND_FRONT_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace results { - // - // append_front - // - template - struct append_front { - typedef sprout::sub_array< - typename sprout::container_traits< - typename sprout::fixed::results::append_front::type - >::internal_type - > type; - }; - } // namespace results - - // - // append_front - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::append_front::type - append_front(Container const& cont, Input const& input) { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::append_front(cont, input)), - sprout::internal_begin_offset(cont), - sprout::internal_end_offset(cont) + sprout::size(input) - ); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIT_APPEND_FRONT_HPP diff --git a/dsp/lib/sprout/sprout/operation/fit/erase.hpp b/dsp/lib/sprout/sprout/operation/fit/erase.hpp deleted file mode 100644 index 6731788..0000000 --- a/dsp/lib/sprout/sprout/operation/fit/erase.hpp +++ /dev/null @@ -1,60 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIT_ERASE_HPP -#define SPROUT_OPERATION_FIT_ERASE_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace results { - // - // erase - // - template - struct erase { - public: - typedef sprout::sub_array< - typename sprout::container_traits< - typename sprout::fixed::results::erase::type - >::internal_type - > type; - }; - } // namespace results - - // - // erase - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::erase::type - erase(Container const& cont, typename sprout::container_traits::const_iterator pos) { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::erase(cont, pos)), - sprout::internal_begin_offset(cont), - sprout::internal_end_offset(cont) - 1 - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::erase::type - erase(Container const& cont, typename sprout::container_traits::difference_type pos) { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::erase(cont, pos)), - sprout::internal_begin_offset(cont), - sprout::internal_end_offset(cont) - 1 - ); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIT_ERASE_HPP diff --git a/dsp/lib/sprout/sprout/operation/fit/erase_n.hpp b/dsp/lib/sprout/sprout/operation/fit/erase_n.hpp deleted file mode 100644 index 43e0a99..0000000 --- a/dsp/lib/sprout/sprout/operation/fit/erase_n.hpp +++ /dev/null @@ -1,60 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIT_ERASE_N_HPP -#define SPROUT_OPERATION_FIT_ERASE_N_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace results { - // - // erase_n - // - template - struct erase_n { - public: - typedef sprout::sub_array< - typename sprout::container_traits< - typename sprout::fixed::results::erase_n::type - >::internal_type - > type; - }; - } // namespace results - - // - // erase_n - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::erase_n::type - erase_n(Container const& cont, typename sprout::container_traits::const_iterator pos) { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::erase_n(cont, pos)), - sprout::internal_begin_offset(cont), - sprout::internal_end_offset(cont) - 1 - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::erase_n::type - erase_n(Container const& cont, typename sprout::container_traits::difference_type pos) { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::erase_n(cont, pos)), - sprout::internal_begin_offset(cont), - sprout::internal_end_offset(cont) - 1 - ); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIT_ERASE_N_HPP diff --git a/dsp/lib/sprout/sprout/operation/fit/insert.hpp b/dsp/lib/sprout/sprout/operation/fit/insert.hpp deleted file mode 100644 index c3843d8..0000000 --- a/dsp/lib/sprout/sprout/operation/fit/insert.hpp +++ /dev/null @@ -1,68 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIT_INSERT_HPP -#define SPROUT_OPERATION_FIT_INSERT_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace results { - // - // insert - // - template - struct insert { - public: - typedef sprout::sub_array< - typename sprout::container_traits< - typename sprout::fixed::results::insert::type - >::internal_type - > type; - }; - } // namespace results - - // - // insert - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::insert::type - insert( - Container const& cont, typename sprout::container_traits::const_iterator pos, - T const& v, Values const&... values - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::insert(cont, pos, v, values...)), - sprout::internal_begin_offset(cont), - sprout::internal_end_offset(cont) + 1 + sizeof...(Values) - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::insert::type - insert( - Container const& cont, typename sprout::container_traits::difference_type pos, - T const& v, Values const&... values - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::insert(cont, pos, v, values...)), - sprout::internal_begin_offset(cont), - sprout::internal_end_offset(cont) + 1 + sizeof...(Values) - ); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIT_INSERT_HPP diff --git a/dsp/lib/sprout/sprout/operation/fit/insert_n.hpp b/dsp/lib/sprout/sprout/operation/fit/insert_n.hpp deleted file mode 100644 index 690a16b..0000000 --- a/dsp/lib/sprout/sprout/operation/fit/insert_n.hpp +++ /dev/null @@ -1,68 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIT_INSERT_N_HPP -#define SPROUT_OPERATION_FIT_INSERT_N_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace results { - // - // insert_n - // - template - struct insert_n { - public: - typedef sprout::sub_array< - typename sprout::container_traits< - typename sprout::fixed::results::insert_n::type - >::internal_type - > type; - }; - } // namespace results - - // - // insert_n - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::insert_n::type - insert_n( - Container const& cont, typename sprout::container_traits::const_iterator pos, - T const& v, Values const&... values - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::insert_n(cont, pos, v, values...)), - sprout::internal_begin_offset(cont), - sprout::internal_end_offset(cont) + (1 + sizeof...(Values)) * N - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::insert_n::type - insert_n( - Container const& cont, typename sprout::container_traits::difference_type pos, - T const& v, Values const&... values - ) - { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::insert_n(cont, pos, v, values...)), - sprout::internal_begin_offset(cont), - sprout::internal_end_offset(cont) + (1 + sizeof...(Values)) * N - ); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIT_INSERT_N_HPP diff --git a/dsp/lib/sprout/sprout/operation/fit/pop_back.hpp b/dsp/lib/sprout/sprout/operation/fit/pop_back.hpp deleted file mode 100644 index c2dc217..0000000 --- a/dsp/lib/sprout/sprout/operation/fit/pop_back.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIT_POP_BACK_HPP -#define SPROUT_OPERATION_FIT_POP_BACK_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace results { - // - // pop_back - // - template - struct pop_back { - public: - typedef sprout::sub_array< - typename sprout::container_traits< - typename sprout::fixed::results::pop_back::type - >::internal_type - > type; - }; - } // namespace results - - // - // pop_back - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::pop_back::type - pop_back(Container const& cont) { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::pop_back(cont)), - sprout::internal_begin_offset(cont), - sprout::internal_end_offset(cont) - 1 - ); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIT_POP_BACK_HPP diff --git a/dsp/lib/sprout/sprout/operation/fit/pop_back_n.hpp b/dsp/lib/sprout/sprout/operation/fit/pop_back_n.hpp deleted file mode 100644 index fffa9b2..0000000 --- a/dsp/lib/sprout/sprout/operation/fit/pop_back_n.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIT_POP_BACK_N_HPP -#define SPROUT_OPERATION_FIT_POP_BACK_N_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace results { - // - // pop_back_n - // - template - struct pop_back_n { - public: - typedef sprout::sub_array< - typename sprout::container_traits< - typename sprout::fixed::results::pop_back_n::type - >::internal_type - > type; - }; - } // namespace results - - // - // pop_back_n - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::pop_back_n::type - pop_back_n(Container const& cont) { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::pop_back_n(cont)), - sprout::internal_begin_offset(cont), - sprout::internal_end_offset(cont) - N - ); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIT_POP_BACK_N_HPP diff --git a/dsp/lib/sprout/sprout/operation/fit/pop_front.hpp b/dsp/lib/sprout/sprout/operation/fit/pop_front.hpp deleted file mode 100644 index 90a7529..0000000 --- a/dsp/lib/sprout/sprout/operation/fit/pop_front.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIT_POP_FRONT_HPP -#define SPROUT_OPERATION_FIT_POP_FRONT_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace results { - // - // pop_front - // - template - struct pop_front { - public: - typedef sprout::sub_array< - typename sprout::container_traits< - typename sprout::fixed::results::pop_front::type - >::internal_type - > type; - }; - } // namespace results - - // - // pop_front - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::pop_front::type - pop_front(Container const& cont) { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::pop_front(cont)), - sprout::internal_begin_offset(cont), - sprout::internal_end_offset(cont) - 1 - ); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIT_POP_FRONT_HPP diff --git a/dsp/lib/sprout/sprout/operation/fit/pop_front_n.hpp b/dsp/lib/sprout/sprout/operation/fit/pop_front_n.hpp deleted file mode 100644 index 712951d..0000000 --- a/dsp/lib/sprout/sprout/operation/fit/pop_front_n.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIT_POP_FRONT_N_HPP -#define SPROUT_OPERATION_FIT_POP_FRONT_N_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace results { - // - // pop_front_n - // - template - struct pop_front_n { - public: - typedef sprout::sub_array< - typename sprout::container_traits< - typename sprout::fixed::results::pop_front_n::type - >::internal_type - > type; - }; - } // namespace results - - // - // pop_front_n - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::pop_front_n::type - pop_front_n(Container const& cont) { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::pop_front_n(cont)), - sprout::internal_begin_offset(cont), - sprout::internal_end_offset(cont) - N - ); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIT_POP_FRONT_N_HPP diff --git a/dsp/lib/sprout/sprout/operation/fit/push_back.hpp b/dsp/lib/sprout/sprout/operation/fit/push_back.hpp deleted file mode 100644 index 0bda26d..0000000 --- a/dsp/lib/sprout/sprout/operation/fit/push_back.hpp +++ /dev/null @@ -1,50 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIT_PUSH_BACK_HPP -#define SPROUT_OPERATION_FIT_PUSH_BACK_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace results { - // - // push_back - // - template - struct push_back { - public: - typedef sprout::sub_array< - typename sprout::container_traits< - typename sprout::fixed::results::push_back::type - >::internal_type - > type; - }; - } // namespace results - - // - // push_back - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::push_back::type - push_back(Container const& cont, T const& v, Values const&... values) { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::push_back(cont, v, values...)), - sprout::internal_begin_offset(cont), - sprout::internal_end_offset(cont) + 1 + sizeof...(Values) - ); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIT_PUSH_BACK_HPP diff --git a/dsp/lib/sprout/sprout/operation/fit/push_back_n.hpp b/dsp/lib/sprout/sprout/operation/fit/push_back_n.hpp deleted file mode 100644 index f65f661..0000000 --- a/dsp/lib/sprout/sprout/operation/fit/push_back_n.hpp +++ /dev/null @@ -1,50 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIT_PUSH_BACK_N_HPP -#define SPROUT_OPERATION_FIT_PUSH_BACK_N_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace results { - // - // push_back_n - // - template - struct push_back_n { - public: - typedef sprout::sub_array< - typename sprout::container_traits< - typename sprout::fixed::results::push_back_n::type - >::internal_type - > type; - }; - } // namespace results - - // - // push_back_n - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::push_back_n::type - push_back_n(Container const& cont, T const& v, Values const&... values) { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::push_back_n(cont, v, values...)), - sprout::internal_begin_offset(cont), - sprout::internal_end_offset(cont) + (1 + sizeof...(Values)) * N - ); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIT_PUSH_BACK_N_HPP diff --git a/dsp/lib/sprout/sprout/operation/fit/push_front.hpp b/dsp/lib/sprout/sprout/operation/fit/push_front.hpp deleted file mode 100644 index 39b1f92..0000000 --- a/dsp/lib/sprout/sprout/operation/fit/push_front.hpp +++ /dev/null @@ -1,50 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIT_PUSH_FRONT_HPP -#define SPROUT_OPERATION_FIT_PUSH_FRONT_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace results { - // - // push_front - // - template - struct push_front { - public: - typedef sprout::sub_array< - typename sprout::container_traits< - typename sprout::fixed::results::push_front::type - >::internal_type - > type; - }; - } // namespace results - - // - // push_front - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::push_front::type - push_front(Container const& cont, T const& v, Values const&... values) { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::push_front(cont, v, values...)), - sprout::internal_begin_offset(cont), - sprout::internal_end_offset(cont) + 1 + sizeof...(Values) - ); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIT_PUSH_FRONT_HPP diff --git a/dsp/lib/sprout/sprout/operation/fit/push_front_n.hpp b/dsp/lib/sprout/sprout/operation/fit/push_front_n.hpp deleted file mode 100644 index 513b228..0000000 --- a/dsp/lib/sprout/sprout/operation/fit/push_front_n.hpp +++ /dev/null @@ -1,50 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIT_PUSH_FRONT_N_HPP -#define SPROUT_OPERATION_FIT_PUSH_FRONT_N_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace results { - // - // push_front_n - // - template - struct push_front_n { - public: - typedef sprout::sub_array< - typename sprout::container_traits< - typename sprout::fixed::results::push_front_n::type - >::internal_type - > type; - }; - } // namespace results - - // - // push_front_n - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::push_front_n::type - push_front_n(Container const& cont, T const& v, Values const&... values) { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::push_front_n(cont, v, values...)), - sprout::internal_begin_offset(cont), - sprout::internal_end_offset(cont) + (1 + sizeof...(Values)) * N - ); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIT_PUSH_FRONT_N_HPP diff --git a/dsp/lib/sprout/sprout/operation/fit/realign.hpp b/dsp/lib/sprout/sprout/operation/fit/realign.hpp deleted file mode 100644 index a666cc0..0000000 --- a/dsp/lib/sprout/sprout/operation/fit/realign.hpp +++ /dev/null @@ -1,59 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIT_REALIGN_HPP -#define SPROUT_OPERATION_FIT_REALIGN_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace results { - // - // realign - // - template - struct realign { - public: - typedef sprout::sub_array< - typename sprout::container_traits< - typename sprout::fixed::results::realign::type - >::internal_type - > type; - }; - } // namespace results - - // - // realign - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::realign::type - realign(Container const& cont, T const& v) { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::realign(cont, v)), - 0, - sprout::size(cont) - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::realign::type - realign(Container const& cont) { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::realign(cont)), - 0, - sprout::size(cont) - ); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIT_REALIGN_HPP diff --git a/dsp/lib/sprout/sprout/operation/fit/realign_to.hpp b/dsp/lib/sprout/sprout/operation/fit/realign_to.hpp deleted file mode 100644 index e054e60..0000000 --- a/dsp/lib/sprout/sprout/operation/fit/realign_to.hpp +++ /dev/null @@ -1,59 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIT_REALIGN_TO_HPP -#define SPROUT_OPERATION_FIT_REALIGN_TO_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace results { - // - // realign_to - // - template - struct realign_to { - public: - typedef sprout::sub_array< - typename sprout::container_traits< - typename sprout::fixed::results::realign_to::type - >::internal_type - > type; - }; - } // namespace results - - // - // realign_to - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::realign_to::type - realign_to(Container const& cont, T const& v) { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::realign_to(cont, v)), - 0, - sprout::size(cont) - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::realign_to::type - realign_to(Container const& cont) { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::realign_to(cont)), - 0, - sprout::size(cont) - ); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIT_REALIGN_TO_HPP diff --git a/dsp/lib/sprout/sprout/operation/fit/resize.hpp b/dsp/lib/sprout/sprout/operation/fit/resize.hpp deleted file mode 100644 index c9a2725..0000000 --- a/dsp/lib/sprout/sprout/operation/fit/resize.hpp +++ /dev/null @@ -1,60 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIT_RESIZE_HPP -#define SPROUT_OPERATION_FIT_RESIZE_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace results { - // - // resize - // - template - struct resize { - public: - typedef sprout::sub_array< - typename sprout::container_traits< - typename sprout::fixed::results::resize::type - >::internal_type - > type; - }; - } // namespace results - - // - // resize - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::resize::type - resize(Container const& cont, T const& v) { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::resize(cont, v)), - 0, - sprout::container_traits::type>::static_size - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::resize::type - resize(Container const& cont) { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::resize(cont)), - 0, - sprout::container_traits::type>::static_size - ); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIT_RESIZE_HPP diff --git a/dsp/lib/sprout/sprout/operation/fit/resize_backward.hpp b/dsp/lib/sprout/sprout/operation/fit/resize_backward.hpp deleted file mode 100644 index 76da5b7..0000000 --- a/dsp/lib/sprout/sprout/operation/fit/resize_backward.hpp +++ /dev/null @@ -1,60 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIT_RESIZE_BACKWARD_HPP -#define SPROUT_OPERATION_FIT_RESIZE_BACKWARD_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace results { - // - // resize_backward - // - template - struct resize_backward { - public: - typedef sprout::sub_array< - typename sprout::container_traits< - typename sprout::fixed::results::resize_backward::type - >::internal_type - > type; - }; - } // namespace results - - // - // resize_backward - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::resize_backward::type - resize_backward(Container const& cont, T const& v) { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::resize_backward(cont, v)), - 0, - sprout::container_traits::type>::static_size - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::resize_backward::type - resize_backward(Container const& cont) { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::resize_backward(cont)), - 0, - sprout::container_traits::type>::static_size - ); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIT_RESIZE_BACKWARD_HPP diff --git a/dsp/lib/sprout/sprout/operation/fit/set.hpp b/dsp/lib/sprout/sprout/operation/fit/set.hpp deleted file mode 100644 index ff35779..0000000 --- a/dsp/lib/sprout/sprout/operation/fit/set.hpp +++ /dev/null @@ -1,60 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIT_SET_HPP -#define SPROUT_OPERATION_FIT_SET_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fit { - namespace results { - // - // set - // - template - struct set { - public: - typedef sprout::sub_array< - typename sprout::container_traits< - typename sprout::fixed::results::set::type - >::internal_type - > type; - }; - } // namespace results - - // - // set - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::set::type - set(Container const& cont, typename sprout::container_traits::const_iterator pos, T const& v) { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::set(cont, pos, v)), - sprout::internal_begin_offset(cont), - sprout::internal_end_offset(cont) - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::set::type - set(Container const& cont, typename sprout::container_traits::difference_type pos, T const& v) { - return sprout::sub_copy( - sprout::get_internal(sprout::fixed::set(cont, pos, v)), - sprout::internal_begin_offset(cont), - sprout::internal_end_offset(cont) - ); - } - } // namespace fit -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIT_SET_HPP diff --git a/dsp/lib/sprout/sprout/operation/fixed.hpp b/dsp/lib/sprout/sprout/operation/fixed.hpp deleted file mode 100644 index 8ac5870..0000000 --- a/dsp/lib/sprout/sprout/operation/fixed.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIXED_HPP -#define SPROUT_OPERATION_FIXED_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_OPERATION_FIXED_HPP diff --git a/dsp/lib/sprout/sprout/operation/fixed/append.hpp b/dsp/lib/sprout/sprout/operation/fixed/append.hpp deleted file mode 100644 index b271c52..0000000 --- a/dsp/lib/sprout/sprout/operation/fixed/append.hpp +++ /dev/null @@ -1,101 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIXED_APPEND_HPP -#define SPROUT_OPERATION_FIXED_APPEND_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace results { - // - // append - // - template - struct append - : public sprout::container_transform_traits< - Container - >::template rebind_size< - sprout::container_traits::static_size + sprout::container_traits::static_size - > - {}; - } // namespace results - - namespace detail { - template - inline SPROUT_CONSTEXPR Result - append_impl( - Container const& cont, sprout::index_tuple, - typename sprout::container_traits::difference_type pos, - typename sprout::container_traits::difference_type size, - Input const& input - ) - { - return sprout::remake( - cont, - sprout::size(cont) + sprout::size(input), - (Indexes < sprout::container_traits::static_size + size - ? (Indexes < pos - ? *sprout::next(sprout::internal_begin(cont), Indexes) - : Indexes < pos + size - ? *sprout::next(sprout::begin(input), Indexes - pos) - : *sprout::next(sprout::internal_begin(cont), Indexes - size) - ) - : typename sprout::container_traits::value_type() - )... - ); - } - } // namespace detail - // - // append - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::append::type - append( - Container const& cont, typename sprout::container_traits::const_iterator pos, - Input const& input - ) - { - return sprout::fixed::detail::append_impl::type>( - cont, - sprout::container_indexes::type>::make(), - sprout::distance(sprout::internal_begin(cont), pos), - sprout::size(input), - input - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::append::type - append( - Container const& cont, typename sprout::container_traits::difference_type pos, - Input const& input - ) - { - return sprout::fixed::detail::append_impl::type>( - cont, - sprout::container_indexes::type>::make(), - sprout::distance(sprout::internal_begin(cont), sprout::next(sprout::begin(cont), pos)), - sprout::size(input), - input - ); - } - } // namespace fixed - - namespace results { - using sprout::fixed::results::append; - } // namespace results - - using sprout::fixed::append; -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIXED_APPEND_HPP diff --git a/dsp/lib/sprout/sprout/operation/fixed/append_back.hpp b/dsp/lib/sprout/sprout/operation/fixed/append_back.hpp deleted file mode 100644 index 2fefcbb..0000000 --- a/dsp/lib/sprout/sprout/operation/fixed/append_back.hpp +++ /dev/null @@ -1,54 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIXED_APPEND_BACK_HPP -#define SPROUT_OPERATION_FIXED_APPEND_BACK_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace results { - // - // append_back - // - template - struct append_back - : public sprout::fixed::results::append - {}; - } // namespace results - - // - // append_back - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::append_back::type - append_back(Container const& cont, Input const& input) { - return sprout::fixed::detail::append_impl::type>( - cont, - sprout::container_indexes::type>::make(), - sprout::internal_end_offset(cont), - sprout::size(input), - input - ); - } - } // namespace fixed - - namespace results { - using sprout::fixed::results::append_back; - } // namespace results - - using sprout::fixed::append_back; -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIXED_APPEND_BACK_HPP diff --git a/dsp/lib/sprout/sprout/operation/fixed/append_front.hpp b/dsp/lib/sprout/sprout/operation/fixed/append_front.hpp deleted file mode 100644 index e35b1f9..0000000 --- a/dsp/lib/sprout/sprout/operation/fixed/append_front.hpp +++ /dev/null @@ -1,54 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIXED_APPEND_FRONT_HPP -#define SPROUT_OPERATION_FIXED_APPEND_FRONT_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace results { - // - // append_front - // - template - struct append_front - : public sprout::fixed::results::append - {}; - } // namespace results - - // - // append_front - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::append_front::type - append_front(Container const& cont, Input const& input) { - return sprout::fixed::detail::append_impl::type>( - cont, - sprout::container_indexes::type>::make(), - sprout::internal_begin_offset(cont), - sprout::size(input), - input - ); - } - } // namespace fixed - - namespace results { - using sprout::fixed::results::append_front; - } // namespace results - - using sprout::fixed::append_front; -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIXED_APPEND_FRONT_HPP diff --git a/dsp/lib/sprout/sprout/operation/fixed/erase.hpp b/dsp/lib/sprout/sprout/operation/fixed/erase.hpp deleted file mode 100644 index f4a152a..0000000 --- a/dsp/lib/sprout/sprout/operation/fixed/erase.hpp +++ /dev/null @@ -1,90 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIXED_ERASE_HPP -#define SPROUT_OPERATION_FIXED_ERASE_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace results { - // - // erase - // - template - struct erase - : public sprout::container_transform_traits< - Container - >::template rebind_size< - sprout::container_traits::static_size - 1 - > - { - static_assert(sprout::container_traits::static_size >= 1, "static_size >= 1"); - }; - } // namespace results - - namespace detail { - template - inline SPROUT_CONSTEXPR Result - erase_impl( - Container const& cont, sprout::index_tuple, - typename sprout::container_traits::difference_type pos - ) - { - return sprout::remake( - cont, - sprout::size(cont) - 1, - (Indexes < sprout::container_traits::static_size - 1 - ? (Indexes < pos - ? *sprout::next(sprout::internal_begin(cont), Indexes) - : *sprout::next(sprout::internal_begin(cont), Indexes + 1) - ) - : typename sprout::container_traits::value_type() - )... - ); - } - } // namespace detail - // - // erase - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::erase::type - erase(Container const& cont, typename sprout::container_traits::const_iterator pos) { - return sprout::fixed::detail::erase_impl::type>( - cont, - sprout::container_indexes::type>::make(), - sprout::distance(sprout::internal_begin(cont), pos) - ); - } - // - // erase - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::erase::type - erase(Container const& cont, typename sprout::container_traits::difference_type pos) { - return sprout::fixed::detail::erase_impl::type>( - cont, - sprout::container_indexes::type>::make(), - sprout::distance(sprout::internal_begin(cont), sprout::next(sprout::begin(cont), pos)) - ); - } - } // namespace fixed - - namespace results { - using sprout::fixed::results::erase; - } // namespace results - - using sprout::fixed::erase; -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIXED_ERASE_HPP diff --git a/dsp/lib/sprout/sprout/operation/fixed/erase_n.hpp b/dsp/lib/sprout/sprout/operation/fixed/erase_n.hpp deleted file mode 100644 index 5197b3e..0000000 --- a/dsp/lib/sprout/sprout/operation/fixed/erase_n.hpp +++ /dev/null @@ -1,88 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIXED_ERASE_N_HPP -#define SPROUT_OPERATION_FIXED_ERASE_N_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace results { - // - // erase_n - // - template - struct erase_n - : public sprout::container_transform_traits< - Container - >::template rebind_size< - sprout::container_traits::static_size - N - > - { - static_assert(sprout::container_traits::static_size >= N, "static_size >= N"); - }; - } // namespace results - - namespace detail { - template - inline SPROUT_CONSTEXPR Result - erase_n_impl( - Container const& cont, sprout::index_tuple, - typename sprout::container_traits::difference_type pos - ) - { - return sprout::remake( - cont, - sprout::size(cont) - N, - (Indexes < sprout::container_traits::static_size - N - ? (Indexes < pos - ? *sprout::next(sprout::internal_begin(cont), Indexes) - : *sprout::next(sprout::internal_begin(cont), Indexes + N) - ) - : typename sprout::container_traits::value_type() - )... - ); - } - } // namespace detail - // - // erase_n - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::erase_n::type - erase_n(Container const& cont, typename sprout::container_traits::const_iterator pos) { - return sprout::fixed::detail::erase_n_impl::type>( - cont, - sprout::container_indexes::type>::make(), - sprout::distance(sprout::internal_begin(cont), pos) - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::erase_n::type - erase_n(Container const& cont, typename sprout::container_traits::difference_type pos) { - return sprout::fixed::detail::erase_n_impl::type>( - cont, - sprout::container_indexes::type>::make(), - sprout::distance(sprout::internal_begin(cont), sprout::next(sprout::begin(cont), pos)) - ); - } - } // namespace fixed - - namespace results { - using sprout::fixed::results::erase_n; - } // namespace results - - using sprout::fixed::erase_n; -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIXED_ERASE_N_HPP diff --git a/dsp/lib/sprout/sprout/operation/fixed/insert.hpp b/dsp/lib/sprout/sprout/operation/fixed/insert.hpp deleted file mode 100644 index f4b11e1..0000000 --- a/dsp/lib/sprout/sprout/operation/fixed/insert.hpp +++ /dev/null @@ -1,101 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIXED_INSERT_HPP -#define SPROUT_OPERATION_FIXED_INSERT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace results { - // - // insert - // - template - struct insert - : public sprout::container_transform_traits< - Container - >::template rebind_size< - sprout::container_traits::static_size + 1 + sizeof...(Values) - > - {}; - } // namespace results - - namespace detail { - template - inline SPROUT_CONSTEXPR Result - insert_impl( - Container const& cont, sprout::index_tuple, - typename sprout::container_traits::difference_type pos, T const& v, Values const&... values - ) - { - return sprout::remake( - cont, - sprout::size(cont) + 1 + sizeof...(Values), - (Indexes < sprout::container_traits::static_size + 1 + sizeof...(Values) - ? (Indexes < pos - ? *sprout::next(sprout::internal_begin(cont), Indexes) - : Indexes < pos + 1 + sizeof...(Values) - ? sprout::detail::param_at::value_type>(Indexes - pos, v, values...) - : *sprout::next(sprout::internal_begin(cont), Indexes - (1 + sizeof...(Values))) - ) - : typename sprout::container_traits::value_type() - )... - ); - } - } // namespace detail - // - // insert - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::insert::type - insert( - Container const& cont, typename sprout::container_traits::const_iterator pos, - T const& v, Values const&... values - ) - { - return sprout::fixed::detail::insert_impl::type>( - cont, - sprout::container_indexes::type>::make(), - sprout::distance(sprout::internal_begin(cont), pos), - v, - values... - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::insert::type - insert( - Container const& cont, typename sprout::container_traits::difference_type pos, - T const& v, Values const&... values - ) - { - return sprout::fixed::detail::insert_impl::type>( - cont, - sprout::container_indexes::type>::make(), - sprout::distance(sprout::internal_begin(cont), sprout::next(sprout::begin(cont), pos)), - v, - values... - ); - } - } // namespace fixed - - namespace results { - using sprout::fixed::results::insert; - } // namespace results - - using sprout::fixed::insert; -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIXED_INSERT_HPP diff --git a/dsp/lib/sprout/sprout/operation/fixed/insert_n.hpp b/dsp/lib/sprout/sprout/operation/fixed/insert_n.hpp deleted file mode 100644 index eea5c07..0000000 --- a/dsp/lib/sprout/sprout/operation/fixed/insert_n.hpp +++ /dev/null @@ -1,107 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIXED_INSERT_N_HPP -#define SPROUT_OPERATION_FIXED_INSERT_N_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace results { - // - // insert_n - // - template - struct insert_n - : public sprout::container_transform_traits< - Container - >::template rebind_size< - sprout::container_traits::static_size + (1 + sizeof...(Values)) * N - > - {}; - } // namespace results - - namespace detail { - template - inline SPROUT_CONSTEXPR Result - insert_n_impl( - Container const& cont, sprout::index_tuple, - typename sprout::container_traits::difference_type pos, T const& v, Values const&... values - ) - { - return sprout::remake( - cont, - sprout::size(cont) + (1 + sizeof...(Values)) * N, - (Indexes < sprout::container_traits::static_size + (1 + sizeof...(Values)) * N - ? (Indexes < pos ? *(sprout::internal_begin(cont) + Indexes) - : Indexes < pos + (1 + sizeof...(Values)) * N - ? sprout::detail::param_at::value_type>( - (Indexes - pos) % (1 + sizeof...(Values)), v, values... - ) - : *sprout::next(sprout::internal_begin(cont), Indexes - (1 + sizeof...(Values)) * N) - ) - : typename sprout::container_traits::value_type() - )... - ); - } - } // namespace detail - // - // insert_n - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::insert_n::type - insert_n( - Container const& cont, typename sprout::container_traits::const_iterator pos, - T const& v, Values const&... values - ) - { - return sprout::fixed::detail::insert_n_impl::type>( - cont, - sprout::container_indexes::type>::make(), - sprout::distance(sprout::internal_begin(cont), pos), - v, - values... - ); - } - // - // insert_n - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::insert_n::type - insert_n( - Container const& cont, typename sprout::container_traits::difference_type pos, - T const& v, Values const&... values - ) - { - return sprout::fixed::detail::insert_n_impl::type>( - cont, - sprout::container_indexes::type>::make(), - sprout::distance(sprout::internal_begin(cont), sprout::next(sprout::begin(cont), pos)), - v, - values... - ); - } - } // namespace fixed - - namespace results { - using sprout::fixed::results::insert_n; - } // namespace results - - using sprout::fixed::insert_n; -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIXED_INSERT_N_HPP diff --git a/dsp/lib/sprout/sprout/operation/fixed/pop_back.hpp b/dsp/lib/sprout/sprout/operation/fixed/pop_back.hpp deleted file mode 100644 index 7a1a07c..0000000 --- a/dsp/lib/sprout/sprout/operation/fixed/pop_back.hpp +++ /dev/null @@ -1,52 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIXED_POP_BACK_HPP -#define SPROUT_OPERATION_FIXED_POP_BACK_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace results { - // - // pop_back - // - template - struct pop_back - : public sprout::fixed::results::erase - {}; - } // namespace results - - // - // pop_back - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::pop_back::type - pop_back(Container const& cont) { - return sprout::fixed::detail::erase_impl::type>( - cont, - sprout::container_indexes::type>::make(), - sprout::internal_end_offset(cont) - 1 - ); - } - } // namespace fixed - - namespace results { - using sprout::fixed::results::pop_back; - } // namespace results - - using sprout::fixed::pop_back; -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIXED_POP_BACK_HPP diff --git a/dsp/lib/sprout/sprout/operation/fixed/pop_back_n.hpp b/dsp/lib/sprout/sprout/operation/fixed/pop_back_n.hpp deleted file mode 100644 index 07c421a..0000000 --- a/dsp/lib/sprout/sprout/operation/fixed/pop_back_n.hpp +++ /dev/null @@ -1,52 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIXED_POP_BACK_N_HPP -#define SPROUT_OPERATION_FIXED_POP_BACK_N_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace results { - // - // pop_back_n - // - template - struct pop_back_n - : public sprout::fixed::results::erase_n - {}; - } // namespace results - - // - // pop_back_n - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::pop_back_n::type - pop_back_n(Container const& cont) { - return sprout::fixed::detail::erase_n_impl::type>( - cont, - sprout::container_indexes::type>::make(), - sprout::internal_end_offset(cont) - N - ); - } - } // namespace fixed - - namespace results { - using sprout::fixed::results::pop_back_n; - } // namespace results - - using sprout::fixed::pop_back_n; -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIXED_POP_BACK_N_HPP diff --git a/dsp/lib/sprout/sprout/operation/fixed/pop_front.hpp b/dsp/lib/sprout/sprout/operation/fixed/pop_front.hpp deleted file mode 100644 index c55f122..0000000 --- a/dsp/lib/sprout/sprout/operation/fixed/pop_front.hpp +++ /dev/null @@ -1,52 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIXED_POP_FRONT_HPP -#define SPROUT_OPERATION_FIXED_POP_FRONT_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace results { - // - // pop_front - // - template - struct pop_front - : public sprout::fixed::results::erase - {}; - } // namespace results - - // - // pop_front - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::pop_front::type - pop_front(Container const& cont) { - return sprout::fixed::detail::erase_impl::type>( - cont, - sprout::container_indexes::type>::make(), - sprout::internal_begin_offset(cont) - ); - } - } // namespace fixed - - namespace results { - using sprout::fixed::results::pop_front; - } // namespace results - - using sprout::fixed::pop_front; -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIXED_POP_FRONT_HPP diff --git a/dsp/lib/sprout/sprout/operation/fixed/pop_front_n.hpp b/dsp/lib/sprout/sprout/operation/fixed/pop_front_n.hpp deleted file mode 100644 index 9b3e1bf..0000000 --- a/dsp/lib/sprout/sprout/operation/fixed/pop_front_n.hpp +++ /dev/null @@ -1,52 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIXED_POP_FRONT_N_HPP -#define SPROUT_OPERATION_FIXED_POP_FRONT_N_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace results { - // - // pop_front_n - // - template - struct pop_front_n - : public sprout::fixed::results::erase_n - {}; - } // namespace results - - // - // pop_front_n - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::pop_front_n::type - pop_front_n(Container const& cont) { - return sprout::fixed::detail::erase_n_impl::type>( - cont, - sprout::container_indexes::type>::make(), - sprout::internal_begin_offset(cont) - ); - } - } // namespace fixed - - namespace results { - using sprout::fixed::results::pop_front_n; - } // namespace results - - using sprout::fixed::pop_front_n; -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIXED_POP_FRONT_N_HPP diff --git a/dsp/lib/sprout/sprout/operation/fixed/push_back.hpp b/dsp/lib/sprout/sprout/operation/fixed/push_back.hpp deleted file mode 100644 index 2c8aa09..0000000 --- a/dsp/lib/sprout/sprout/operation/fixed/push_back.hpp +++ /dev/null @@ -1,54 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIXED_PUSH_BACK_HPP -#define SPROUT_OPERATION_FIXED_PUSH_BACK_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace results { - // - // push_back - // - template - struct push_back - : public sprout::fixed::results::insert - {}; - } // namespace results - - // - // push_back - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::push_back::type - push_back(Container const& cont, T const& v, Values const&... values) { - return sprout::fixed::detail::insert_impl::type>( - cont, - sprout::container_indexes::type>::make(), - sprout::internal_end_offset(cont), - v, - values... - ); - } - } // namespace fixed - - namespace results { - using sprout::fixed::results::push_back; - } // namespace results - - using sprout::fixed::push_back; -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIXED_PUSH_BACK_HPP diff --git a/dsp/lib/sprout/sprout/operation/fixed/push_back_n.hpp b/dsp/lib/sprout/sprout/operation/fixed/push_back_n.hpp deleted file mode 100644 index 3abd1b6..0000000 --- a/dsp/lib/sprout/sprout/operation/fixed/push_back_n.hpp +++ /dev/null @@ -1,54 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIXED_PUSH_BACK_N_HPP -#define SPROUT_OPERATION_FIXED_PUSH_BACK_N_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace results { - // - // push_back_n - // - template - struct push_back_n - : public sprout::fixed::results::insert_n - {}; - } // namespace results - - // - // push_back_n - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::push_back_n::type - push_back_n(Container const& cont, T const& v, Values const&... values) { - return sprout::fixed::detail::insert_n_impl::type>( - cont, - sprout::container_indexes::type>::make(), - sprout::internal_end_offset(cont), - v, - values... - ); - } - } // namespace fixed - - namespace results { - using sprout::fixed::results::push_back_n; - } // namespace results - - using sprout::fixed::push_back_n; -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIXED_PUSH_BACK_N_HPP diff --git a/dsp/lib/sprout/sprout/operation/fixed/push_front.hpp b/dsp/lib/sprout/sprout/operation/fixed/push_front.hpp deleted file mode 100644 index 6a2fd02..0000000 --- a/dsp/lib/sprout/sprout/operation/fixed/push_front.hpp +++ /dev/null @@ -1,54 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIXED_PUSH_FRONT_HPP -#define SPROUT_OPERATION_FIXED_PUSH_FRONT_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace results { - // - // push_front - // - template - struct push_front - : public sprout::fixed::results::insert - {}; - } // namespace results - - // - // push_front - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::push_front::type - push_front(Container const& cont, T const& v, Values const&... values) { - return sprout::fixed::detail::insert_impl::type>( - cont, - sprout::container_indexes::type>::make(), - sprout::internal_begin_offset(cont), - v, - values... - ); - } - } // namespace fixed - - namespace results { - using sprout::fixed::results::push_front; - } // namespace results - - using sprout::fixed::push_front; -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIXED_PUSH_FRONT_HPP diff --git a/dsp/lib/sprout/sprout/operation/fixed/push_front_n.hpp b/dsp/lib/sprout/sprout/operation/fixed/push_front_n.hpp deleted file mode 100644 index 2086eed..0000000 --- a/dsp/lib/sprout/sprout/operation/fixed/push_front_n.hpp +++ /dev/null @@ -1,54 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIXED_PUSH_FRONT_N_HPP -#define SPROUT_OPERATION_FIXED_PUSH_FRONT_N_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace results { - // - // push_front_n - // - template - struct push_front_n - : public sprout::fixed::results::insert_n - {}; - } // namespace results - - // - // push_front_n - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::push_front_n::type - push_front_n(Container const& cont, T const& v, Values const&... values) { - return sprout::fixed::detail::insert_n_impl::type>( - cont, - sprout::container_indexes::type>::make(), - sprout::internal_begin_offset(cont), - v, - values... - ); - } - } // namespace fixed - - namespace results { - using sprout::fixed::results::push_front_n; - } // namespace results - - using sprout::fixed::push_front_n; -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIXED_PUSH_FRONT_N_HPP diff --git a/dsp/lib/sprout/sprout/operation/fixed/realign.hpp b/dsp/lib/sprout/sprout/operation/fixed/realign.hpp deleted file mode 100644 index 62b5325..0000000 --- a/dsp/lib/sprout/sprout/operation/fixed/realign.hpp +++ /dev/null @@ -1,98 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIXED_REALIGN_HPP -#define SPROUT_OPERATION_FIXED_REALIGN_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace results { - // - // realign - // - template - struct realign { - public: - typedef typename sprout::container_construct_traits::copied_type type; - }; - } // namespace results - - namespace detail { - template - inline SPROUT_CONSTEXPR Result - realign_impl( - Container const& cont, sprout::index_tuple, - typename sprout::container_traits::difference_type size, T const& v - ) - { - return sprout::make( - (Indexes < size - ? *sprout::next(sprout::begin(cont), Indexes) - : v - )... - ); - } - } // namespace detail - // - // realign - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::realign::type - realign(Container const& cont, T const& v) { - return sprout::fixed::detail::realign_impl::type>( - cont, - sprout::container_indexes::type>::make(), - sprout::size(cont), - v - ); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR Result - realign_impl( - Container const& cont, sprout::index_tuple, - typename sprout::container_traits::difference_type size - ) - { - return sprout::make( - (Indexes < size - ? *sprout::next(sprout::begin(cont), Indexes) - : typename sprout::container_traits::value_type() - )... - ); - } - } // namespace detail - // - // realign - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::realign::type - realign(Container const& cont) { - return sprout::fixed::detail::realign_impl::type>( - cont, - sprout::container_indexes::type>::make(), - sprout::size(cont) - ); - } - } // namespace fixed - - namespace results { - using sprout::fixed::results::realign; - } // namespace results - - using sprout::fixed::realign; -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIXED_REALIGN_HPP diff --git a/dsp/lib/sprout/sprout/operation/fixed/realign_to.hpp b/dsp/lib/sprout/sprout/operation/fixed/realign_to.hpp deleted file mode 100644 index d4d43bc..0000000 --- a/dsp/lib/sprout/sprout/operation/fixed/realign_to.hpp +++ /dev/null @@ -1,67 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIXED_REALIGN_TO_HPP -#define SPROUT_OPERATION_FIXED_REALIGN_TO_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace results { - // - // realign_to - // - template - struct realign_to { - public: - typedef typename sprout::container_construct_traits::copied_type type; - }; - } // namespace results - - // - // realign_to - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::realign_to::type - realign_to(Container const& cont, T const& v) { - return sprout::fixed::detail::realign_impl::type>( - cont, - sprout::container_indexes::type>::make(), - sprout::size(cont), - v - ); - } - - // - // realign_to - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::realign_to::type - realign_to(Container const& cont) { - return sprout::fixed::detail::realign_impl::type>( - cont, - sprout::container_indexes::type>::make(), - sprout::size(cont) - ); - } - } // namespace fixed - - namespace results { - using sprout::fixed::results::realign_to; - } // namespace results - - using sprout::fixed::realign_to; -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIXED_REALIGN_TO_HPP diff --git a/dsp/lib/sprout/sprout/operation/fixed/resize.hpp b/dsp/lib/sprout/sprout/operation/fixed/resize.hpp deleted file mode 100644 index 7f7bd18..0000000 --- a/dsp/lib/sprout/sprout/operation/fixed/resize.hpp +++ /dev/null @@ -1,102 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIXED_RESIZE_HPP -#define SPROUT_OPERATION_FIXED_RESIZE_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace results { - // - // resize - // - template - struct resize - : public sprout::container_transform_traits< - Container - >::template rebind_size< - N - > - {}; - } // namespace results - - namespace detail { - template - inline SPROUT_CONSTEXPR Result - resize_impl( - Container const& cont, sprout::index_tuple, - typename sprout::container_traits::difference_type size, T const& v - ) - { - return sprout::make( - (Indexes < size - ? *sprout::next(sprout::begin(cont), Indexes) - : v - )... - ); - } - } // namespace detail - // - // resize - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::resize::type - resize(Container const& cont, T const& v) { - return sprout::fixed::detail::resize_impl::type>( - cont, - sprout::container_indexes::type>::make(), - sprout::size(cont), - v - ); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR Result - resize_impl( - Container const& cont, sprout::index_tuple, - typename sprout::container_traits::difference_type size - ) - { - return sprout::make( - (Indexes < size - ? *sprout::next(sprout::begin(cont), Indexes) - : typename sprout::container_traits::value_type() - )... - ); - } - } // namespace detail - // - // resize - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::resize::type - resize(Container const& cont) { - return sprout::fixed::detail::resize_impl::type>( - cont, - sprout::container_indexes::type>::make(), - sprout::size(cont) - ); - } - } // namespace fixed - - namespace results { - using sprout::fixed::results::resize; - } // namespace results - - using sprout::fixed::resize; -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIXED_RESIZE_HPP diff --git a/dsp/lib/sprout/sprout/operation/fixed/resize_backward.hpp b/dsp/lib/sprout/sprout/operation/fixed/resize_backward.hpp deleted file mode 100644 index f5d5e0d..0000000 --- a/dsp/lib/sprout/sprout/operation/fixed/resize_backward.hpp +++ /dev/null @@ -1,110 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIXED_RESIZE_BACKWARD_HPP -#define SPROUT_OPERATION_FIXED_RESIZE_BACKWARD_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace results { - // - // resize_backward - // - template - struct resize_backward - : public sprout::fixed::results::resize - {}; - } // namespace results - - namespace detail { - template - inline SPROUT_CONSTEXPR Result - resize_backward_impl( - Container const& cont, sprout::index_tuple, - typename sprout::container_traits::difference_type size, - typename sprout::container_traits::difference_type offset, - T const& v - ) - { - return sprout::make( - (Indexes >= offset && Indexes < offset + size - ? *sprout::next(sprout::begin(cont), Indexes - offset) - : v - )... - ); - } - } // namespace detail - // - // resize_backward - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::resize_backward::type - resize_backward(Container const& cont, T const& v) { - return sprout::fixed::detail::resize_backward_impl::type>( - cont, - sprout::container_indexes::type>::make(), - sprout::size(cont), - static_cast::difference_type>( - sprout::container_traits::type>::static_size - ) - - sprout::size(cont), - v - ); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR Result - resize_backward_impl( - Container const& cont, sprout::index_tuple, - typename sprout::container_traits::difference_type size, - typename sprout::container_traits::difference_type offset - ) - { - return sprout::make( - (Indexes >= offset && Indexes < offset + size - ? *sprout::next(sprout::begin(cont), Indexes - offset) - : typename sprout::container_traits::value_type() - )... - ); - } - } // namespace detail - // - // resize_backward - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::resize_backward::type - resize_backward(Container const& cont) { - return sprout::fixed::detail::resize_backward_impl::type>( - cont, - sprout::container_indexes::type>::make(), - sprout::size(cont), - static_cast::difference_type>( - sprout::container_traits::type>::static_size - ) - - sprout::size(cont) - ); - } - } // namespace fixed - - namespace results { - using sprout::fixed::results::resize_backward; - } // namespace results - - using sprout::fixed::resize_backward; -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIXED_RESIZE_BACKWARD_HPP diff --git a/dsp/lib/sprout/sprout/operation/fixed/set.hpp b/dsp/lib/sprout/sprout/operation/fixed/set.hpp deleted file mode 100644 index 9a7239a..0000000 --- a/dsp/lib/sprout/sprout/operation/fixed/set.hpp +++ /dev/null @@ -1,81 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_FIXED_SET_HPP -#define SPROUT_OPERATION_FIXED_SET_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace fixed { - namespace results { - // - // set - // - template - struct set { - public: - typedef typename sprout::container_construct_traits::copied_type type; - }; - } // namespace results - - namespace detail { - template - inline SPROUT_CONSTEXPR Result - set_impl( - Container const& cont, sprout::index_tuple, - typename sprout::container_traits::difference_type pos, T const& v - ) - { - return sprout::remake( - cont, - sprout::size(cont), - (Indexes != pos - ? *sprout::next(sprout::internal_begin(cont), Indexes) - : v - )... - ); - } - } // namespace detail - // - // set - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::set::type - set(Container const& cont, typename sprout::container_traits::const_iterator pos, T const& v) { - return sprout::fixed::detail::set_impl::type>( - cont, - sprout::container_indexes::type>::make(), - sprout::distance(sprout::internal_begin(cont), pos), - v - ); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::set::type - set(Container const& cont, typename sprout::container_traits::difference_type pos, T const& v) { - return sprout::fixed::detail::set_impl::type>( - cont, - sprout::container_indexes::type>::make(), - sprout::distance(sprout::internal_begin(cont), sprout::next(sprout::begin(cont), pos)), - v - ); - } - } // namespace fixed - - namespace results { - using sprout::fixed::results::set; - } // namespace results - - using sprout::fixed::set; -} // namespace sprout - -#endif // #ifndef SPROUT_OPERATION_FIXED_SET_HPP diff --git a/dsp/lib/sprout/sprout/operation/insert.hpp b/dsp/lib/sprout/sprout/operation/insert.hpp deleted file mode 100644 index 4607088..0000000 --- a/dsp/lib/sprout/sprout/operation/insert.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_INSERT_HPP -#define SPROUT_OPERATION_INSERT_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_OPERATION_INSERT_HPP diff --git a/dsp/lib/sprout/sprout/operation/insert_n.hpp b/dsp/lib/sprout/sprout/operation/insert_n.hpp deleted file mode 100644 index f3c8cb7..0000000 --- a/dsp/lib/sprout/sprout/operation/insert_n.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_INSERT_N_HPP -#define SPROUT_OPERATION_INSERT_N_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_OPERATION_INSERT_N_HPP diff --git a/dsp/lib/sprout/sprout/operation/pop_back.hpp b/dsp/lib/sprout/sprout/operation/pop_back.hpp deleted file mode 100644 index e95d820..0000000 --- a/dsp/lib/sprout/sprout/operation/pop_back.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_POP_BACK_HPP -#define SPROUT_OPERATION_POP_BACK_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_OPERATION_POP_BACK_HPP diff --git a/dsp/lib/sprout/sprout/operation/pop_back_n.hpp b/dsp/lib/sprout/sprout/operation/pop_back_n.hpp deleted file mode 100644 index fab3ac2..0000000 --- a/dsp/lib/sprout/sprout/operation/pop_back_n.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_POP_BACK_N_HPP -#define SPROUT_OPERATION_POP_BACK_N_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_OPERATION_POP_BACK_N_HPP diff --git a/dsp/lib/sprout/sprout/operation/pop_front.hpp b/dsp/lib/sprout/sprout/operation/pop_front.hpp deleted file mode 100644 index 0232d2d..0000000 --- a/dsp/lib/sprout/sprout/operation/pop_front.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_POP_FRONT_HPP -#define SPROUT_OPERATION_POP_FRONT_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_OPERATION_POP_FRONT_HPP diff --git a/dsp/lib/sprout/sprout/operation/pop_front_n.hpp b/dsp/lib/sprout/sprout/operation/pop_front_n.hpp deleted file mode 100644 index 3b7ece9..0000000 --- a/dsp/lib/sprout/sprout/operation/pop_front_n.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_POP_FRONT_N_HPP -#define SPROUT_OPERATION_POP_FRONT_N_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_OPERATION_POP_FRONT_N_HPP diff --git a/dsp/lib/sprout/sprout/operation/push_back.hpp b/dsp/lib/sprout/sprout/operation/push_back.hpp deleted file mode 100644 index f8993c2..0000000 --- a/dsp/lib/sprout/sprout/operation/push_back.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_PUSH_BACK_HPP -#define SPROUT_OPERATION_PUSH_BACK_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_OPERATION_PUSH_BACK_HPP diff --git a/dsp/lib/sprout/sprout/operation/push_back_n.hpp b/dsp/lib/sprout/sprout/operation/push_back_n.hpp deleted file mode 100644 index 2da0345..0000000 --- a/dsp/lib/sprout/sprout/operation/push_back_n.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_PUSH_BACK_N_HPP -#define SPROUT_OPERATION_PUSH_BACK_N_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_OPERATION_PUSH_BACK_N_HPP diff --git a/dsp/lib/sprout/sprout/operation/push_front.hpp b/dsp/lib/sprout/sprout/operation/push_front.hpp deleted file mode 100644 index 3fd9f69..0000000 --- a/dsp/lib/sprout/sprout/operation/push_front.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_PUSH_FRONT_HPP -#define SPROUT_OPERATION_PUSH_FRONT_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_OPERATION_PUSH_FRONT_HPP diff --git a/dsp/lib/sprout/sprout/operation/push_front_n.hpp b/dsp/lib/sprout/sprout/operation/push_front_n.hpp deleted file mode 100644 index 72cbb82..0000000 --- a/dsp/lib/sprout/sprout/operation/push_front_n.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_PUSH_FRONT_N_HPP -#define SPROUT_OPERATION_PUSH_FRONT_N_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_OPERATION_PUSH_FRONT_N_HPP diff --git a/dsp/lib/sprout/sprout/operation/realign.hpp b/dsp/lib/sprout/sprout/operation/realign.hpp deleted file mode 100644 index d248764..0000000 --- a/dsp/lib/sprout/sprout/operation/realign.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_REALIGN_HPP -#define SPROUT_OPERATION_REALIGN_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_OPERATION_REALIGN_HPP diff --git a/dsp/lib/sprout/sprout/operation/realign_to.hpp b/dsp/lib/sprout/sprout/operation/realign_to.hpp deleted file mode 100644 index e995340..0000000 --- a/dsp/lib/sprout/sprout/operation/realign_to.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_REALIGN_TO_HPP -#define SPROUT_OPERATION_REALIGN_TO_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_OPERATION_REALIGN_TO_HPP diff --git a/dsp/lib/sprout/sprout/operation/resize.hpp b/dsp/lib/sprout/sprout/operation/resize.hpp deleted file mode 100644 index f24234b..0000000 --- a/dsp/lib/sprout/sprout/operation/resize.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_RESIZE_HPP -#define SPROUT_OPERATION_RESIZE_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_OPERATION_RESIZE_HPP diff --git a/dsp/lib/sprout/sprout/operation/resize_backward.hpp b/dsp/lib/sprout/sprout/operation/resize_backward.hpp deleted file mode 100644 index 1034c52..0000000 --- a/dsp/lib/sprout/sprout/operation/resize_backward.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_RESIZE_BACKWARD_HPP -#define SPROUT_OPERATION_RESIZE_BACKWARD_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_OPERATION_RESIZE_BACKWARD_HPP diff --git a/dsp/lib/sprout/sprout/operation/set.hpp b/dsp/lib/sprout/sprout/operation/set.hpp deleted file mode 100644 index 2e334b7..0000000 --- a/dsp/lib/sprout/sprout/operation/set.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPERATION_SET_HPP -#define SPROUT_OPERATION_SET_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_OPERATION_SET_HPP diff --git a/dsp/lib/sprout/sprout/optional.hpp b/dsp/lib/sprout/sprout/optional.hpp deleted file mode 100644 index fdf4565..0000000 --- a/dsp/lib/sprout/sprout/optional.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2016 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPTIONAL_HPP -#define SPROUT_OPTIONAL_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_OPTIONAL_HPP diff --git a/dsp/lib/sprout/sprout/optional/comparison.hpp b/dsp/lib/sprout/sprout/optional/comparison.hpp deleted file mode 100644 index dbeea8b..0000000 --- a/dsp/lib/sprout/sprout/optional/comparison.hpp +++ /dev/null @@ -1,126 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPTIONAL_COMPARISON_HPP -#define SPROUT_OPTIONAL_COMPARISON_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // operator== - // operator!= - // operator< - // operator> - // operator<= - // operator>= - // - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::optional const& lhs, sprout::optional const& rhs) { - return sprout::equal_pointees(lhs, rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::optional const& lhs, sprout::optional const& rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator<(sprout::optional const& lhs, sprout::optional const& rhs) { - return sprout::less_pointees(lhs, rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>(sprout::optional const& lhs, sprout::optional const& rhs) { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator<=(sprout::optional const& lhs, sprout::optional const& rhs) { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(sprout::optional const& lhs, sprout::optional const& rhs) { - return !(lhs < rhs); - } - - // - // operator== - // operator!= - // operator< - // operator> - // operator<= - // operator>= - // - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::optional const& lhs, sprout::nullopt_t) SPROUT_NOEXCEPT { - return !lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::nullopt_t, sprout::optional const& rhs) SPROUT_NOEXCEPT { - return !rhs; - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::optional const& lhs, sprout::nullopt_t) SPROUT_NOEXCEPT { - return bool(lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::nullopt_t, sprout::optional const& rhs) SPROUT_NOEXCEPT { - return bool(rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator<(sprout::optional const&, sprout::nullopt_t) SPROUT_NOEXCEPT { - return false; - } - template - inline SPROUT_CONSTEXPR bool - operator<(sprout::nullopt_t, sprout::optional const& rhs) SPROUT_NOEXCEPT { - return bool(rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>(sprout::optional const& lhs, sprout::nullopt_t) SPROUT_NOEXCEPT { - return bool(lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>(sprout::nullopt_t, sprout::optional const&) SPROUT_NOEXCEPT { - return false; - } - template - inline SPROUT_CONSTEXPR bool - operator<=(sprout::optional const& lhs, sprout::nullopt_t) SPROUT_NOEXCEPT { - return !lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator<=(sprout::nullopt_t, sprout::optional const&) SPROUT_NOEXCEPT { - return true; - } - template - inline SPROUT_CONSTEXPR bool - operator>=(sprout::optional const&, sprout::nullopt_t) SPROUT_NOEXCEPT { - return true; - } - template - inline SPROUT_CONSTEXPR bool - operator>=(sprout::nullopt_t, sprout::optional const& rhs) SPROUT_NOEXCEPT { - return !rhs; - } -} // namespace sprout - -#endif // #ifndef SPROUT_OPTIONAL_COMPARISON_HPP diff --git a/dsp/lib/sprout/sprout/optional/container.hpp b/dsp/lib/sprout/sprout/optional/container.hpp deleted file mode 100644 index a2c347d..0000000 --- a/dsp/lib/sprout/sprout/optional/container.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPTIONAL_CONTAINER_HPP -#define SPROUT_OPTIONAL_CONTAINER_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // container_construct_traits - // - template - struct container_construct_traits > { - public: - typedef sprout::optional copied_type; - public: - template - static SPROUT_CONSTEXPR copied_type - deep_copy(Cont&& cont) { - return SPROUT_FORWARD(Cont, cont); - } - template - static SPROUT_CONSTEXPR copied_type - make(Args&&... args) { - return copied_type(SPROUT_FORWARD(Args, args)...); - } - template - static SPROUT_CONSTEXPR copied_type - remake(Cont&&, typename sprout::container_traits >::difference_type, Args&&... args) { - return copied_type(SPROUT_FORWARD(Args, args)...); - } - }; - - // - // container_transform_traits - // - template - struct container_transform_traits > { - public: - template - struct rebind_type { - public: - typedef sprout::optional type; - }; - }; -} // namespace sprout - -#endif // #ifndef SPROUT_OPTIONAL_CONTAINER_HPP diff --git a/dsp/lib/sprout/sprout/optional/exceptions.hpp b/dsp/lib/sprout/sprout/optional/exceptions.hpp deleted file mode 100644 index 672b0af..0000000 --- a/dsp/lib/sprout/sprout/optional/exceptions.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPTIONAL_EXCEPTIONS_HPP -#define SPROUT_OPTIONAL_EXCEPTIONS_HPP - -#include -#include -#include - -namespace sprout { - // - // bad_optional_access - // - class bad_optional_access - : public std::logic_error - { - public: - explicit bad_optional_access(std::string const& what_arg) - : std::logic_error(what_arg) - {} - explicit bad_optional_access(char const* what_arg) - : std::logic_error(what_arg) - {} - }; -} // namespace sprout - -#endif // SPROUT_OPTIONAL_EXCEPTIONS_HPP diff --git a/dsp/lib/sprout/sprout/optional/get.hpp b/dsp/lib/sprout/sprout/optional/get.hpp deleted file mode 100644 index 1dbccff..0000000 --- a/dsp/lib/sprout/sprout/optional/get.hpp +++ /dev/null @@ -1,83 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPTIONAL_GET_HPP -#define SPROUT_OPTIONAL_GET_HPP - -#include -#include - -namespace sprout { - // - // get - // - template - inline SPROUT_CONSTEXPR typename sprout::optional::reference_type - get(sprout::optional& x) { - return sprout::optional::get(x); - } - template - inline SPROUT_CONSTEXPR typename sprout::optional::rvalue_reference_type - get(sprout::optional&& x) { - return sprout::optional::get(sprout::move(x)); - } - template - inline SPROUT_CONSTEXPR typename sprout::optional::reference_const_type - get(sprout::optional const& x) { - return sprout::optional::get(x); - } - template - inline SPROUT_CONSTEXPR typename sprout::optional::pointer_type - get(sprout::optional* x) { - return sprout::optional::get_pointer(*x); - } - template - inline SPROUT_CONSTEXPR typename sprout::optional::pointer_const_type - get(sprout::optional const* x) { - return sprout::optional::get_pointer(*x); - } - - // - // get_pointer - // - template - inline SPROUT_CONSTEXPR typename sprout::optional::pointer_type - get_pointer(sprout::optional& x) { - return sprout::optional::get_pointer(x); - } - template - inline SPROUT_CONSTEXPR typename sprout::optional::pointer_type - get_pointer(sprout::optional&& x) { - return sprout::optional::get_pointer(sprout::move(x)); - } - template - inline SPROUT_CONSTEXPR typename sprout::optional::pointer_const_type - get_pointer(sprout::optional const& x) { - return sprout::optional::get_pointer(x); - } - - // - // get_value_or - // - template - inline SPROUT_CONSTEXPR typename sprout::optional::reference_type - get_value_or(sprout::optional& x, typename sprout::optional::reference_type v) { - return sprout::optional::get_value_or(x, v); - } - template - inline SPROUT_CONSTEXPR typename sprout::optional::rvalue_reference_type - get_value_or(sprout::optional&& x, typename sprout::optional::rvalue_reference_type v) { - return sprout::optional::get_value_or(sprout::move(x), static_cast::rvalue_reference_type>(v)); - } - template - inline SPROUT_CONSTEXPR typename sprout::optional::reference_const_type - get_value_or(sprout::optional const& x, typename sprout::optional::reference_const_type v) { - return sprout::optional::get_value_or(x, v); - } -} // namespace sprout - -#endif // #ifndef SPROUT_OPTIONAL_GET_HPP diff --git a/dsp/lib/sprout/sprout/optional/hash.hpp b/dsp/lib/sprout/sprout/optional/hash.hpp deleted file mode 100644 index 242124f..0000000 --- a/dsp/lib/sprout/sprout/optional/hash.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPTIONAL_HASH_HPP -#define SPROUT_OPTIONAL_HASH_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // hash_value - // - template - inline SPROUT_CONSTEXPR std::size_t - hash_value(sprout::optional const& v) { - return v.is_initialized() ? sprout::to_hash(*v) - : 0 - ; - } -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // hash - // - template - struct hash > - : public sprout::hash > - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -#endif // #ifndef SPROUT_OPTIONAL_HASH_HPP diff --git a/dsp/lib/sprout/sprout/optional/in_place.hpp b/dsp/lib/sprout/sprout/optional/in_place.hpp deleted file mode 100644 index ebfd046..0000000 --- a/dsp/lib/sprout/sprout/optional/in_place.hpp +++ /dev/null @@ -1,24 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPTIONAL_IN_PLACE_HPP -#define SPROUT_OPTIONAL_IN_PLACE_HPP - -#include - -namespace sprout { - // - // in_place_t - // in_place - // - struct in_place_t {}; - namespace { - SPROUT_STATIC_CONSTEXPR in_place_t in_place{}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_OPTIONAL_IN_PLACE_HPP diff --git a/dsp/lib/sprout/sprout/optional/io.hpp b/dsp/lib/sprout/sprout/optional/io.hpp deleted file mode 100644 index 07399ec..0000000 --- a/dsp/lib/sprout/sprout/optional/io.hpp +++ /dev/null @@ -1,60 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPTIONAL_IO_HPP -#define SPROUT_OPTIONAL_IO_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // operator>> - // - template - inline SPROUT_NON_CONSTEXPR std::basic_istream& - operator>>(std::basic_istream& lhs, sprout::optional& rhs) { - if (lhs.good()) { - int d = lhs.get(); - if (d == ' ') { - T x; - lhs >> x; - rhs = x; - } else { - if (d == '-') { - d = lhs.get(); - if (d == '-') { - rhs = sprout::none; - return lhs; - } - } - lhs.setstate(std::ios::failbit); - } - } - return lhs; - } - // - // operator<< - // - template - inline SPROUT_NON_CONSTEXPR std::basic_ostream& - operator<<(std::basic_ostream& lhs, sprout::optional const& rhs) { - if (lhs.good()) { - if (!rhs) { - lhs << "--"; - } else { - lhs << ' ' << *rhs; - } - } - return lhs; - } -} // namespace sprout - -#endif // #ifndef SPROUT_OPTIONAL_IO_HPP diff --git a/dsp/lib/sprout/sprout/optional/make_optional.hpp b/dsp/lib/sprout/sprout/optional/make_optional.hpp deleted file mode 100644 index b97f3a8..0000000 --- a/dsp/lib/sprout/sprout/optional/make_optional.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPTIONAL_MAKE_OPTIONAL_HPP -#define SPROUT_OPTIONAL_MAKE_OPTIONAL_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // make_optional - // - template - inline SPROUT_CONSTEXPR sprout::optional::type> - make_optional(T&& v) { - return sprout::optional::type>(SPROUT_FORWARD(T, v)); - } - template - inline SPROUT_CONSTEXPR sprout::optional::type> - make_optional(bool cond, T&& v) { - return sprout::optional::type>(cond, SPROUT_FORWARD(T, v)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_OPTIONAL_MAKE_OPTIONAL_HPP diff --git a/dsp/lib/sprout/sprout/optional/nullopt.hpp b/dsp/lib/sprout/sprout/optional/nullopt.hpp deleted file mode 100644 index a116d36..0000000 --- a/dsp/lib/sprout/sprout/optional/nullopt.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPTIONAL_NULLOPT_HPP -#define SPROUT_OPTIONAL_NULLOPT_HPP - -#include -#include - -namespace sprout { - // - // nullopt_t - // nullopt - // - typedef sprout::none_t nullopt_t; - namespace { - SPROUT_STATIC_CONSTEXPR nullopt_t nullopt{}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_OPTIONAL_NULLOPT_HPP diff --git a/dsp/lib/sprout/sprout/optional/optional.hpp b/dsp/lib/sprout/sprout/optional/optional.hpp deleted file mode 100644 index 90b2a8a..0000000 --- a/dsp/lib/sprout/sprout/optional/optional.hpp +++ /dev/null @@ -1,468 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_OPTIONAL_OPTIONAL_HPP -#define SPROUT_OPTIONAL_OPTIONAL_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // optional - // - template - class optional { - public: - typedef T type; - private: - typedef sprout::value_holder holder_type; - public: - typedef typename holder_type::value_type value_type; - typedef typename holder_type::lvalue_reference lvalue_reference; - typedef typename holder_type::rvalue_reference rvalue_reference; - typedef typename holder_type::reference reference; - typedef typename holder_type::const_lvalue_reference const_lvalue_reference; - typedef typename holder_type::const_rvalue_reference const_rvalue_reference; - typedef typename holder_type::const_reference const_reference; - typedef typename holder_type::pointer pointer; - typedef typename holder_type::const_pointer const_pointer; - typedef typename holder_type::lvalue_reference_type lvalue_reference_type; - typedef typename holder_type::rvalue_reference_type rvalue_reference_type; - typedef typename holder_type::reference_type reference_type; - typedef typename holder_type::reference_const_type reference_const_type; - typedef typename holder_type::pointer_type pointer_type; - typedef typename holder_type::pointer_const_type pointer_const_type; - // - typedef typename sprout::value_iterator iterator; - typedef typename sprout::value_iterator const_iterator; - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - typedef typename sprout::reverse_iterator reverse_iterator; - typedef typename sprout::reverse_iterator const_reverse_iterator; - public: - template - struct is_constructible_args - : public sprout::is_constructible - {}; - public: - SPROUT_STATIC_CONSTEXPR size_type static_size = 1; - public: - static SPROUT_CONSTEXPR reference_type get(optional& t) SPROUT_NOEXCEPT { - return sprout::get(t.val); - } - static SPROUT_CONSTEXPR rvalue_reference_type get(optional&& t) SPROUT_NOEXCEPT { - return static_cast(get(t)); - } - static SPROUT_CONSTEXPR reference_const_type get(optional const& t) SPROUT_NOEXCEPT { - return sprout::get(t.val); - } - static SPROUT_CONSTEXPR pointer_type get_pointer(optional& t) SPROUT_NOEXCEPT { - return sprout::get_pointer(t.val); - } - static SPROUT_CONSTEXPR pointer_type get_pointer(optional&& t) SPROUT_NOEXCEPT { - return get_pointer(t); - } - static SPROUT_CONSTEXPR pointer_const_type get_pointer(optional const& t) SPROUT_NOEXCEPT { - return sprout::get_pointer(t.val); - } - static SPROUT_CONSTEXPR reference_type get_value_or(optional& t, reference_type v) SPROUT_NOEXCEPT { - return t.is_initialized() ? sprout::get(t.val) - : v - ; - } - static SPROUT_CONSTEXPR rvalue_reference_type get_value_or(optional&& t, rvalue_reference_type v) SPROUT_NOEXCEPT { - return static_cast(get_value_or(t, v)); - } - static SPROUT_CONSTEXPR reference_const_type get_value_or(optional const& t, reference_const_type v) SPROUT_NOEXCEPT { - return t.is_initialized() ? sprout::get(t.val) - : v - ; - } - private: - bool init; - holder_type val; - private: - SPROUT_CXX14_CONSTEXPR void destroy() SPROUT_NOEXCEPT { - init = false; - } - public: - // 20.6.4.1, constructors - SPROUT_CONSTEXPR optional() SPROUT_NOEXCEPT - : init(false) - {} - SPROUT_CONSTEXPR optional(sprout::nullopt_t) SPROUT_NOEXCEPT - : init(false) - {} - SPROUT_CONSTEXPR optional(optional const& v) - : init(v.init) - , val(v.is_initialized() ? holder_type(*v) : holder_type()) - {} -#if SPROUT_GCC_IN_RANGE((4, 8, 0), (4, 8, 2)) - optional(optional&&) = default; -#else - SPROUT_CONSTEXPR optional(optional&& v) - SPROUT_NOEXCEPT_IF(std::is_nothrow_move_constructible::value) - : init(v.init) - , val(v.is_initialized() ? holder_type(sprout::move(get(v))) : holder_type()) - {} -#endif - SPROUT_CONSTEXPR optional(T const& v) - : init(true) - , val(v) - {} - // !!! TEMP: for T const& -// SPROUT_CONSTEXPR optional(T&& v) -// : init(true) -// , val(sprout::move(v)) -// {} - template< - typename... Args, - typename = typename std::enable_if::value>::type - > - explicit SPROUT_CONSTEXPR optional(sprout::in_place_t, Args&&... args) - : init(true) - , val(sprout::in_place, SPROUT_FORWARD(Args, args)...) - {} - template< - typename U, typename... Args, - typename = typename std::enable_if&, Args...>::value>::type - > - explicit SPROUT_CONSTEXPR optional(sprout::in_place_t, std::initializer_list il, Args&&... args) - : init(true) - , val(sprout::in_place, il, SPROUT_FORWARD(Args, args)...) - {} - SPROUT_CONSTEXPR optional(bool cond, T const& v) - : init(cond) - , val(cond ? holder_type(v) : holder_type()) - {} - // !!! TEMP: for T const& -// SPROUT_CONSTEXPR optional(bool cond, T&& v) -// : init(cond) -// , val(cond ? holder_type(sprout::move(v)) : holder_type()) -// {} - template - explicit SPROUT_CONSTEXPR optional(optional const& v) - : init(v.is_initialized()) - , val(v.is_initialized() ? holder_type(*v) : holder_type()) - {} - template - explicit SPROUT_CONSTEXPR optional(optional&& v) - : init(v.is_initialized()) - , val(v.is_initialized() ? holder_type(sprout::move(optional::get(v))) : holder_type()) - {} - // 20.6.4.3, assignment - SPROUT_CXX14_CONSTEXPR optional& operator=(sprout::nullopt_t v) SPROUT_NOEXCEPT { - assign(v); - return *this; - } - SPROUT_CXX14_CONSTEXPR optional& operator=(optional const& v) { - assign(v); - return *this; - } - SPROUT_CXX14_CONSTEXPR optional& operator=(optional&& v) - SPROUT_NOEXCEPT_IF(std::is_move_constructible::value && std::is_move_assignable::value) - { - assign(SPROUT_FORWARD(optional, v)); - return *this; - } - template< - typename U, -// typename = typename std::enable_if::value && std::is_assignable::value>::type - typename = typename std::enable_if::value>::type - > - SPROUT_CXX14_CONSTEXPR optional& operator=(U&& v) { - assign(SPROUT_FORWARD(U, v)); - return *this; - } - template - SPROUT_CXX14_CONSTEXPR optional& operator=(optional const& v) { - assign(v); - return *this; - } - template - SPROUT_CXX14_CONSTEXPR optional& operator=(optional&& v) { - assign(SPROUT_FORWARD(optional, v)); - return *this; - } - - template< - typename... Args, - typename = typename std::enable_if::value>::type - > - SPROUT_CXX14_CONSTEXPR void emplace(Args&&... args) { - optional temp(sprout::in_place, SPROUT_FORWARD(Args, args)...); - temp.swap(*this); - } - template< - typename U, typename... Args, - typename = typename std::enable_if&, Args...>::value>::type - > - SPROUT_CXX14_CONSTEXPR void emplace(std::initializer_list il, Args&&... args) { - optional temp(sprout::in_place, il, SPROUT_FORWARD(Args, args)...); - temp.swap(*this); - } - - SPROUT_CXX14_CONSTEXPR void assign(sprout::nullopt_t) SPROUT_NOEXCEPT { - destroy(); - } - SPROUT_CXX14_CONSTEXPR void assign(optional const& v) { - optional temp(v); - temp.swap(*this); - } - SPROUT_CXX14_CONSTEXPR void assign(optional&& v) - SPROUT_NOEXCEPT_IF(std::is_move_constructible::value && std::is_move_assignable::value) - { - optional temp(SPROUT_FORWARD(optional, v)); - temp.swap(*this); - } - template< - typename U, -// typename = typename std::enable_if::value && std::is_assignable::value>::type - typename = typename std::enable_if::value>::type - > - SPROUT_CXX14_CONSTEXPR void assign(U&& v) { - optional temp(SPROUT_FORWARD(U, v)); - temp.swap(*this); - } - template - SPROUT_CXX14_CONSTEXPR void assign(optional const& v) { - optional temp(v); - temp.swap(*this); - } - template - SPROUT_CXX14_CONSTEXPR void assign(optional&& v) { - optional temp(SPROUT_FORWARD(optional, v)); - temp.swap(*this); - } - - SPROUT_CXX14_CONSTEXPR void reset() SPROUT_NOEXCEPT { - destroy(); - } - SPROUT_CXX14_CONSTEXPR void reset(sprout::nullopt_t v) SPROUT_NOEXCEPT { - assign(v); - } - template< - typename U, -// typename = typename std::enable_if::value && std::is_assignable::value>::type - typename = typename std::enable_if::value>::type - > - SPROUT_CXX14_CONSTEXPR void reset(U&& v) { - assign(SPROUT_FORWARD(U, v)); - } - // 20.6.4.4, swap - SPROUT_CXX14_CONSTEXPR void swap(optional& other) - SPROUT_NOEXCEPT_IF_EXPR(sprout::swap(val, other.val)) - { - sprout::swap(init, other.init); - sprout::swap(val, other.val); - } - // 20.6.4.5, observers - SPROUT_CONSTEXPR pointer_const_type operator->() const { - return SPROUT_ASSERT(is_initialized()), - val.get_pointer() - ; - } - SPROUT_CXX14_CONSTEXPR pointer_type operator->() { - return SPROUT_ASSERT(is_initialized()), - val.get_pointer() - ; - } - SPROUT_CONSTEXPR pointer_const_type get_pointer() const { - return is_initialized() ? val.get_pointer() - : 0 - ; - } - SPROUT_CXX14_CONSTEXPR pointer_type get_pointer() { - return is_initialized() ? val.get_pointer() - : 0 - ; - } - SPROUT_CONSTEXPR pointer_const_type get_ptr() const { - return get_pointer(); - } - SPROUT_CXX14_CONSTEXPR pointer_type get_ptr() { - return get_pointer(); - } - - SPROUT_CONSTEXPR reference_const_type operator*() const { - return (SPROUT_ASSERT(is_initialized()), true) ? val.get() - : val.get() - ; - } - SPROUT_CXX14_CONSTEXPR reference_type operator*() { - return (SPROUT_ASSERT(is_initialized()), true) ? val.get() - : val.get() - ; - } - SPROUT_CONSTEXPR reference_const_type value() const { - return get(); - } - SPROUT_CXX14_CONSTEXPR reference_type value() { - return get(); - } - SPROUT_CONSTEXPR reference_const_type get() const { - return is_initialized() ? val.get() - : (throw sprout::bad_optional_access("optional<>: bad optional access"), val.get()) - ; - } - SPROUT_CXX14_CONSTEXPR reference_type get() { - return is_initialized() ? val.get() - : (throw sprout::bad_optional_access("optional<>: bad optional access"), val.get()) - ; - } - - SPROUT_CONSTEXPR reference_const_type value_or(reference_const_type& v) const { - return get_value_or(v); - } - SPROUT_CXX14_CONSTEXPR reference_type value_or(reference_type& v) { - return get_value_or(v); - } - SPROUT_CONSTEXPR reference_const_type get_value_or(reference_const_type& v) const { - return is_initialized() ? val.get() - : v - ; - } - SPROUT_CXX14_CONSTEXPR reference_type get_value_or(reference_type& v) { - return is_initialized() ? val.get() - : v - ; - } - - SPROUT_EXPLICIT_CONVERSION SPROUT_CONSTEXPR operator bool() const SPROUT_NOEXCEPT { - return is_initialized(); - } - SPROUT_CONSTEXPR bool operator!() const SPROUT_NOEXCEPT { - return !is_initialized(); - } - SPROUT_CONSTEXPR bool is_initialized() const SPROUT_NOEXCEPT { - return init; - } - // iterators: - SPROUT_CXX14_CONSTEXPR iterator begin() { - return is_initialized() ? iterator(val, static_size) - : iterator() - ; - } - SPROUT_CONSTEXPR const_iterator begin() const { - return is_initialized() ? const_iterator(val, static_size) - : const_iterator() - ; - } - SPROUT_CXX14_CONSTEXPR iterator end() SPROUT_NOEXCEPT { - return iterator(); - } - SPROUT_CONSTEXPR const_iterator end() const SPROUT_NOEXCEPT { - return const_iterator(); - } - SPROUT_CXX14_CONSTEXPR reverse_iterator rbegin() SPROUT_NOEXCEPT { - return reverse_iterator(end()); - } - SPROUT_CONSTEXPR const_reverse_iterator rbegin() const SPROUT_NOEXCEPT { - return const_reverse_iterator(end()); - } - SPROUT_CXX14_CONSTEXPR reverse_iterator rend() SPROUT_NOEXCEPT { - return reverse_iterator(begin()); - } - SPROUT_CONSTEXPR const_reverse_iterator rend() const SPROUT_NOEXCEPT { - return const_reverse_iterator(begin()); - } - SPROUT_CONSTEXPR const_iterator cbegin() const SPROUT_NOEXCEPT { - return is_initialized() ? const_iterator(val, static_size) - : const_iterator() - ; - } - SPROUT_CONSTEXPR const_iterator cend() const SPROUT_NOEXCEPT { - return const_iterator(); - } - SPROUT_CONSTEXPR const_reverse_iterator crbegin() const SPROUT_NOEXCEPT { - return const_reverse_iterator(end()); - } - SPROUT_CONSTEXPR const_reverse_iterator crend() const SPROUT_NOEXCEPT { - return const_reverse_iterator(begin()); - } - // capacity: - SPROUT_CONSTEXPR size_type size() const SPROUT_NOEXCEPT { - return is_initialized() ? static_size - : 0 - ; - } - SPROUT_CONSTEXPR size_type max_size() const SPROUT_NOEXCEPT { - return size(); - } - SPROUT_CONSTEXPR bool empty() const SPROUT_NOEXCEPT { - return !is_initialized(); - } - // element access: - SPROUT_CXX14_CONSTEXPR reference operator[](size_type) { - return val.get(); - } - SPROUT_CONSTEXPR const_reference operator[](size_type) const { - return val.get(); - } - SPROUT_CXX14_CONSTEXPR reference at(size_type i) { - return i < size() ? val.get() - : (throw std::out_of_range("optional<>: index out of range"), val.get()) - ; - } - SPROUT_CONSTEXPR const_reference at(size_type i) const { - return i < size() ? val.get() - : (throw std::out_of_range("optional<>: index out of range"), val.get()) - ; - } - SPROUT_CXX14_CONSTEXPR reference front() { - return val.get(); - } - SPROUT_CONSTEXPR const_reference front() const { - return val.get(); - } - SPROUT_CXX14_CONSTEXPR reference back() { - return val.get(); - } - SPROUT_CONSTEXPR const_reference back() const { - return val.get(); - } - // others: - SPROUT_CXX14_CONSTEXPR void rangecheck(size_type i) const { - return i >= size() ? throw std::out_of_range("optional<>: index out of range") - : (void)0 - ; - } - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::optional::size_type sprout::optional::static_size; - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::optional& lhs, sprout::optional& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } -} // namespace sprout - -#endif // #ifndef SPROUT_OPTIONAL_OPTIONAL_HPP diff --git a/dsp/lib/sprout/sprout/pit.hpp b/dsp/lib/sprout/sprout/pit.hpp deleted file mode 100644 index 962ebf5..0000000 --- a/dsp/lib/sprout/sprout/pit.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PIT_HPP -#define SPROUT_PIT_HPP - -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_PIT_HPP diff --git a/dsp/lib/sprout/sprout/pit/comparison.hpp b/dsp/lib/sprout/sprout/pit/comparison.hpp deleted file mode 100644 index 59f5c88..0000000 --- a/dsp/lib/sprout/sprout/pit/comparison.hpp +++ /dev/null @@ -1,55 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PIT_COMPARISON_HPP -#define SPROUT_PIT_COMPARISON_HPP - -#include -#include - -namespace sprout { - // - // operator== - // operator!= - // operator< - // operator> - // operator<= - // operator>= - // - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::pit const& lhs, sprout::pit const& rhs) { - return lhs.front() == rhs.front(); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::pit const& lhs, sprout::pit const& rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator<(sprout::pit const& lhs, sprout::pit const& rhs) { - return lhs.front() < rhs.front(); - } - template - inline SPROUT_CONSTEXPR bool - operator>(sprout::pit const& lhs, sprout::pit const& rhs) { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator<=(sprout::pit const& lhs, sprout::pit const& rhs) { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(sprout::pit const& lhs, sprout::pit const& rhs) { - return !(lhs < rhs); - } -} // namespace sprout - -#endif // #ifndef SPROUT_PIT_COMPARISON_HPP diff --git a/dsp/lib/sprout/sprout/pit/container.hpp b/dsp/lib/sprout/sprout/pit/container.hpp deleted file mode 100644 index 6caec4e..0000000 --- a/dsp/lib/sprout/sprout/pit/container.hpp +++ /dev/null @@ -1,108 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PIT_CONTAINER_HPP -#define SPROUT_PIT_CONTAINER_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - struct pit_container_construct_traits; - - template - struct pit_container_construct_traits< - sprout::pit, - typename std::enable_if::value>::type - > { - public: - typedef typename sprout::container_construct_traits::copied_type copied_type; - public: - template - static SPROUT_CONSTEXPR copied_type - deep_copy(Cont&&) { - return copied_type(); - } - template - static SPROUT_CONSTEXPR copied_type - make(Args&&... args) { - return sprout::make(SPROUT_FORWARD(Args, args)...); - } - template - static SPROUT_CONSTEXPR copied_type - remake(Cont&& cont, typename sprout::container_traits >::difference_type size, Args&&... args) { - return sprout::remake(SPROUT_FORWARD(Cont, cont), size, SPROUT_FORWARD(Args, args)...); - } - }; - - template - struct pit_container_construct_traits< - sprout::pit, - typename std::enable_if::value>::type - > { - public: - typedef typename sprout::container_construct_traits::copied_type copied_type; - public: - template - static SPROUT_CONSTEXPR copied_type - deep_copy(Cont&&) { - return copied_type(); - } - template - static SPROUT_CONSTEXPR copied_type - make(Args&&... args) { - return sprout::make(SPROUT_FORWARD(Args, args)...); - } - template - static SPROUT_CONSTEXPR copied_type - remake(Cont&& cont, typename sprout::container_traits >::difference_type size, Args&&... args) { - return sprout::remake(SPROUT_FORWARD(Cont, cont), size, SPROUT_FORWARD(Args, args)...); - } - template - static SPROUT_CONSTEXPR copied_type - remake(Cont&&, typename sprout::container_traits >::difference_type, InputIterator first, InputIterator last) { - return copied_type(first, last); - } - }; - } // namespace detail - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::detail::pit_container_construct_traits > - {}; - - // - // container_transform_traits - // - template - struct container_transform_traits > { - public: - template >::size_type Size> - struct rebind_size { - public: - typedef sprout::pit< - typename sprout::container_transform_traits::template rebind_size::type - > type; - }; - template - struct rebind_type { - public: - typedef sprout::pit< - typename sprout::container_transform_traits::template rebind_type::type - > type; - }; - }; -} // namespace sprout - -#endif // #ifndef SPROUT_PIT_CONTAINER_HPP diff --git a/dsp/lib/sprout/sprout/pit/hash.hpp b/dsp/lib/sprout/sprout/pit/hash.hpp deleted file mode 100644 index 0221908..0000000 --- a/dsp/lib/sprout/sprout/pit/hash.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PIT_HASH_HPP -#define SPROUT_PIT_HASH_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // hash_value - // - template - inline SPROUT_CONSTEXPR std::size_t - hash_value(sprout::pit const& v) { - return sprout::to_hash(v.elem); - } -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // hash - // - template - struct hash > - : public sprout::hash > - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -#endif // #ifndef SPROUT_PIT_HASH_HPP diff --git a/dsp/lib/sprout/sprout/pit/pit.hpp b/dsp/lib/sprout/sprout/pit/pit.hpp deleted file mode 100644 index d8834c3..0000000 --- a/dsp/lib/sprout/sprout/pit/pit.hpp +++ /dev/null @@ -1,178 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PIT_PIT_HPP -#define SPROUT_PIT_PIT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // pit - // - template - class pit - : public sprout::container_traits_facade - { - private: - typedef sprout::container_traits_facade::type> facade_type; - public: - typedef Container container_type; - typedef typename facade_type::value_type value_type; - typedef typename facade_type::reference reference; - typedef typename facade_type::const_reference const_reference; - typedef typename sprout::value_iterator iterator; - typedef typename sprout::value_iterator const_iterator; - typedef typename facade_type::size_type size_type; - typedef typename facade_type::difference_type difference_type; - typedef typename facade_type::pointer pointer; - typedef typename facade_type::const_pointer const_pointer; - typedef typename sprout::reverse_iterator reverse_iterator; - typedef typename sprout::reverse_iterator const_reverse_iterator; - public: - SPROUT_STATIC_CONSTEXPR size_type enumerable_size = sprout::detail::static_size_or_zero::value; - private: - value_type elem; - public: - SPROUT_CONSTEXPR pit() - : elem() - {} - pit(pit const&) = default; - explicit SPROUT_CONSTEXPR pit(value_type const& t) - : elem(t) - {} - SPROUT_CXX14_CONSTEXPR pit& operator=(pit const& rhs) { - elem = rhs.elem; - return *this; - } - SPROUT_CXX14_CONSTEXPR pit& operator=(pit&& rhs) { - elem = sprout::move(rhs.elem); - return *this; - } - SPROUT_CXX14_CONSTEXPR pit& operator=(value_type const& rhs) { - elem = rhs; - return *this; - } - SPROUT_CXX14_CONSTEXPR pit& operator=(value_type&& rhs) { - elem = sprout::move(rhs); - return *this; - } - SPROUT_CXX14_CONSTEXPR void swap(pit& other) - SPROUT_NOEXCEPT_IF_EXPR(sprout::swap(elem, other.elem)) - { - sprout::swap(elem, other.elem); - } - // iterators: - SPROUT_CXX14_CONSTEXPR iterator begin() { - return iterator(elem, enumerable_size); - } - SPROUT_CONSTEXPR const_iterator begin() const { - return const_iterator(elem, enumerable_size); - } - SPROUT_CXX14_CONSTEXPR iterator end() SPROUT_NOEXCEPT { - return iterator(elem, 0); - } - SPROUT_CONSTEXPR const_iterator end() const SPROUT_NOEXCEPT { - return const_iterator(elem, 0); - } - SPROUT_CXX14_CONSTEXPR reverse_iterator rbegin() SPROUT_NOEXCEPT { - return reverse_iterator(end()); - } - SPROUT_CONSTEXPR const_reverse_iterator rbegin() const SPROUT_NOEXCEPT { - return const_reverse_iterator(end()); - } - SPROUT_CXX14_CONSTEXPR reverse_iterator rend() SPROUT_NOEXCEPT { - return reverse_iterator(begin()); - } - SPROUT_CONSTEXPR const_reverse_iterator rend() const SPROUT_NOEXCEPT { - return const_reverse_iterator(begin()); - } - SPROUT_CONSTEXPR const_iterator cbegin() const SPROUT_NOEXCEPT { - return const_iterator(elem, enumerable_size); - } - SPROUT_CONSTEXPR const_iterator cend() const SPROUT_NOEXCEPT { - return const_iterator(elem, 0); - } - SPROUT_CONSTEXPR const_reverse_iterator crbegin() const SPROUT_NOEXCEPT { - return const_reverse_iterator(end()); - } - SPROUT_CONSTEXPR const_reverse_iterator crend() const SPROUT_NOEXCEPT { - return const_reverse_iterator(begin()); - } - // capacity: - SPROUT_CONSTEXPR size_type size() const SPROUT_NOEXCEPT { - return max_size(); - } - SPROUT_CONSTEXPR size_type max_size() const SPROUT_NOEXCEPT { - return enumerable_size; - } - SPROUT_CONSTEXPR bool empty() const SPROUT_NOEXCEPT { - return size() == 0; - } - // element access: - SPROUT_CXX14_CONSTEXPR reference operator[](size_type) { - return elem; - } - SPROUT_CONSTEXPR const_reference operator[](size_type) const { - return elem; - } - SPROUT_CXX14_CONSTEXPR reference at(size_type i) { - return i < size() ? elem - : (throw std::out_of_range("pit<>: index out of range"), elem) - ; - } - SPROUT_CONSTEXPR const_reference at(size_type i) const { - return i < size() ? elem - : (throw std::out_of_range("pit<>: index out of range"), elem) - ; - } - SPROUT_CXX14_CONSTEXPR reference front() { - return elem; - } - SPROUT_CONSTEXPR const_reference front() const { - return elem; - } - SPROUT_CXX14_CONSTEXPR reference back() { - return elem; - } - SPROUT_CONSTEXPR const_reference back() const { - return elem; - } - // others: - SPROUT_CXX14_CONSTEXPR void rangecheck(size_type i) const { - return i >= size() ? throw std::out_of_range("pit<>: index out of range") - : (void)0 - ; - } - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::pit::size_type sprout::pit::enumerable_size; - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::pit& lhs, sprout::pit& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } -} // namespace sprout - -#include - -#endif // #ifndef SPROUT_PIT_PIT_HPP diff --git a/dsp/lib/sprout/sprout/pit/tuple.hpp b/dsp/lib/sprout/sprout/pit/tuple.hpp deleted file mode 100644 index 8d21de6..0000000 --- a/dsp/lib/sprout/sprout/pit/tuple.hpp +++ /dev/null @@ -1,70 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PIT_TUPLE_HPP -#define SPROUT_PIT_TUPLE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // tuple_get - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits >::value_type& - tuple_get(sprout::pit& t) SPROUT_NOEXCEPT { - static_assert(I < sprout::container_traits >::static_size, "tuple_get: index out of range"); - return t[I]; - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits >::value_type const& - tuple_get(sprout::pit const& t) SPROUT_NOEXCEPT { - static_assert(I < sprout::container_traits >::static_size, "tuple_get: index out of range"); - return t[I]; - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits >::value_type&& - tuple_get(sprout::pit&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::move(sprout::tuples::get(t))) - { - return sprout::move(sprout::tuples::get(t)); - } -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // tuple_size - // - template - struct tuple_size > - : public std::tuple_size - {}; - - // - // tuple_element - // - template - struct tuple_element > - : public sprout::tuples::tuple_element - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -#endif // #ifndef SPROUT_PIT_TUPLE_HPP diff --git a/dsp/lib/sprout/sprout/pit/type_traits.hpp b/dsp/lib/sprout/sprout/pit/type_traits.hpp deleted file mode 100644 index f1e475d..0000000 --- a/dsp/lib/sprout/sprout/pit/type_traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PIT_TYPE_TRAITS_HPP -#define SPROUT_PIT_TYPE_TRAITS_HPP - -#include -#include -#include - -namespace sprout { - // - // is_pit - // - template - struct is_pit - : public sprout::false_type - {}; - template - struct is_pit - : public sprout::is_pit - {}; - template - struct is_pit - : public sprout::is_pit - {}; - template - struct is_pit > - : public sprout::true_type - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_pit_v = sprout::is_pit::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_PIT_TYPE_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/predef.hpp b/dsp/lib/sprout/sprout/predef.hpp deleted file mode 100644 index 09102da..0000000 --- a/dsp/lib/sprout/sprout/predef.hpp +++ /dev/null @@ -1,21 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_HPP -#define SPROUT_PREDEF_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_PREDEF_HPP diff --git a/dsp/lib/sprout/sprout/predef/architecture.hpp b/dsp/lib/sprout/sprout/predef/architecture.hpp deleted file mode 100644 index 00ba753..0000000 --- a/dsp/lib/sprout/sprout/predef/architecture.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_ARCHITECTURE_HPP -#define SPROUT_PREDEF_ARCHITECTURE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_HPP diff --git a/dsp/lib/sprout/sprout/predef/architecture/alpha.hpp b/dsp/lib/sprout/sprout/predef/architecture/alpha.hpp deleted file mode 100644 index f13684d..0000000 --- a/dsp/lib/sprout/sprout/predef/architecture/alpha.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_ARCHITECTURE_ALPHA_HPP -#define SPROUT_PREDEF_ARCHITECTURE_ALPHA_HPP - -#include -#include - -#define SPROUT_ARCH_ALPHA 0 - -#if defined(__alpha__) || defined(__alpha) || defined(_M_ALPHA) -# undef SPROUT_ARCH_ALPHA -# if !defined(SPROUT_ARCH_ALPHA) && defined(__alpha_ev4__) -# define SPROUT_ARCH_ALPHA SPROUT_VERSION_NUMBER(4, 0, 0) -# endif -# if !defined(SPROUT_ARCH_ALPHA) && defined(__alpha_ev5__) -# define SPROUT_ARCH_ALPHA SPROUT_VERSION_NUMBER(5, 0, 0) -# endif -# if !defined(SPROUT_ARCH_ALPHA) && defined(__alpha_ev6__) -# define SPROUT_ARCH_ALPHA SPROUT_VERSION_NUMBER(6, 0, 0) -# endif -# if !defined(SPROUT_ARCH_ALPHA) -# define SPROUT_ARCH_ALPHA 1 -# endif -#endif - -#if SPROUT_ARCH_ALPHA -# define SPROUT_ARCH_ALPHA_AVAILABLE -#endif - -#define SPROUT_ARCH_ALPHA_NAME "DEC Alpha" - -#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_ALPHA_HPP diff --git a/dsp/lib/sprout/sprout/predef/architecture/arm.hpp b/dsp/lib/sprout/sprout/predef/architecture/arm.hpp deleted file mode 100644 index 0233234..0000000 --- a/dsp/lib/sprout/sprout/predef/architecture/arm.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_ARCHITECTURE_ARM_HPP -#define SPROUT_PREDEF_ARCHITECTURE_ARM_HPP - -#include -#include - -#define SPROUT_ARCH_ARM 0 - -#if defined(__arm__) || defined(__arm64) || defined(__thumb__) || defined(__TARGET_ARCH_ARM) || defined(__TARGET_ARCH_THUMB) || defined(_M_ARM) -# undef SPROUT_ARCH_ARM -# if !defined(SPROUT_ARCH_ARM) && defined(__arm64) -# define SPROUT_ARCH_ARM SPROUT_VERSION_NUMBER(8, 0, 0) -# endif -# if !defined(SPROUT_ARCH_ARM) && defined(__TARGET_ARCH_ARM) -# define SPROUT_ARCH_ARM SPROUT_VERSION_NUMBER(__TARGET_ARCH_ARM, 0, 0) -# endif -# if !defined(SPROUT_ARCH_ARM) && defined(__TARGET_ARCH_THUMB) -# define SPROUT_ARCH_ARM SPROUT_VERSION_NUMBER(__TARGET_ARCH_THUMB, 0, 0) -# endif -# if !defined(SPROUT_ARCH_ARM) && defined(_M_ARM) -# define SPROUT_ARCH_ARM SPROUT_VERSION_NUMBER(_M_ARM, 0, 0) -# endif -# if !defined(SPROUT_ARCH_ARM) -# define SPROUT_ARCH_ARM 1 -# endif -#endif - -#if SPROUT_ARCH_ARM -# define SPROUT_ARCH_ARM_AVAILABLE -#endif - -#define SPROUT_ARCH_ARM_NAME "ARM" - -#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_ARM_HPP diff --git a/dsp/lib/sprout/sprout/predef/architecture/blackfin.hpp b/dsp/lib/sprout/sprout/predef/architecture/blackfin.hpp deleted file mode 100644 index bb52333..0000000 --- a/dsp/lib/sprout/sprout/predef/architecture/blackfin.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_ARCHITECTURE_BLACKFIN_HPP -#define SPROUT_PREDEF_ARCHITECTURE_BLACKFIN_HPP - -#include - -#define SPROUT_ARCH_BLACKFIN 0 - -#if defined(__bfin__) || defined(__BFIN__) || defined(bfin) || defined(BFIN) -# undef SPROUT_ARCH_BLACKFIN -# define SPROUT_ARCH_BLACKFIN 1 -#endif - -#if SPROUT_ARCH_BLACKFIN -# define SPROUT_ARCH_BLACKFIN_AVAILABLE -#endif - -#define SPROUT_ARCH_BLACKFIN_NAME "Blackfin" - -#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_BLACKFIN_HPP diff --git a/dsp/lib/sprout/sprout/predef/architecture/convex.hpp b/dsp/lib/sprout/sprout/predef/architecture/convex.hpp deleted file mode 100644 index a117fb3..0000000 --- a/dsp/lib/sprout/sprout/predef/architecture/convex.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_ARCHITECTURE_CONVEX_HPP -#define SPROUT_PREDEF_ARCHITECTURE_CONVEX_HPP - -#include -#include - -#define SPROUT_ARCH_CONVEX 0 - -#if defined(__convex__) -# undef SPROUT_ARCH_CONVEX -# if !defined(SPROUT_ARCH_CONVEX) && defined(__convex_c1__) -# define SPROUT_ARCH_CONVEX SPROUT_VERSION_NUMBER(1, 0, 0) -# endif -# if !defined(SPROUT_ARCH_CONVEX) && defined(__convex_c2__) -# define SPROUT_ARCH_CONVEX SPROUT_VERSION_NUMBER(2, 0, 0) -# endif -# if !defined(SPROUT_ARCH_CONVEX) && defined(__convex_c32__) -# define SPROUT_ARCH_CONVEX SPROUT_VERSION_NUMBER(3, 2, 0) -# endif -# if !defined(SPROUT_ARCH_CONVEX) && defined(__convex_c34__) -# define SPROUT_ARCH_CONVEX SPROUT_VERSION_NUMBER(3, 4, 0) -# endif -# if !defined(SPROUT_ARCH_CONVEX) && defined(__convex_c38__) -# define SPROUT_ARCH_CONVEX SPROUT_VERSION_NUMBER(3, 8 ,0) -# endif -# if !defined(SPROUT_ARCH_CONVEX) -# define SPROUT_ARCH_CONVEX 1 -# endif -#endif - -#if SPROUT_ARCH_CONVEX -# define SPROUT_ARCH_CONVEX_AVAILABLE -#endif - -#define SPROUT_ARCH_CONVEX_NAME "Convex Computer" - -#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_CONVEX_HPP diff --git a/dsp/lib/sprout/sprout/predef/architecture/ia64.hpp b/dsp/lib/sprout/sprout/predef/architecture/ia64.hpp deleted file mode 100644 index cc26d94..0000000 --- a/dsp/lib/sprout/sprout/predef/architecture/ia64.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_ARCHITECTURE_IA64_HPP -#define SPROUT_PREDEF_ARCHITECTURE_IA64_HPP - -#include - -#define SPROUT_ARCH_IA64 0 - -#if defined(__ia64__) || defined(_IA64) || defined(__IA64__) || defined(__ia64) || defined(_M_IA64) || defined(__itanium__) -# undef SPROUT_ARCH_IA64 -# define SPROUT_ARCH_IA64 1 -#endif - -#if SPROUT_ARCH_IA64 -# define SPROUT_ARCH_IA64_AVAILABLE -#endif - -#define SPROUT_ARCH_IA64_NAME "Intel Itanium 64" - -#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_IA64_HPP diff --git a/dsp/lib/sprout/sprout/predef/architecture/m68k.hpp b/dsp/lib/sprout/sprout/predef/architecture/m68k.hpp deleted file mode 100644 index 1a435f2..0000000 --- a/dsp/lib/sprout/sprout/predef/architecture/m68k.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_ARCHITECTURE_M68K_HPP -#define SPROUT_PREDEF_ARCHITECTURE_M68K_HPP - -#include -#include - -#define SPROUT_ARCH_M68K 0 - -#if defined(__m68k__) || defined(M68000) -# undef SPROUT_ARCH_M68K -# if !defined(SPROUT_ARCH_M68K) && (defined(__mc68060__) || defined(mc68060) || defined(__mc68060)) -# define SPROUT_ARCH_M68K SPROUT_VERSION_NUMBER(6, 0, 0) -# endif -# if !defined(SPROUT_ARCH_M68K) && (defined(__mc68040__) || defined(mc68040) || defined(__mc68040)) -# define SPROUT_ARCH_M68K SPROUT_VERSION_NUMBER(4, 0, 0) -# endif -# if !defined(SPROUT_ARCH_M68K) && (defined(__mc68030__) || defined(mc68030) || defined(__mc68030)) -# define SPROUT_ARCH_M68K SPROUT_VERSION_NUMBER(3, 0, 0) -# endif -# if !defined(SPROUT_ARCH_M68K) && (defined(__mc68020__) || defined(mc68020) || defined(__mc68020)) -# define SPROUT_ARCH_M68K SPROUT_VERSION_NUMBER(2, 0, 0) -# endif -# if !defined(SPROUT_ARCH_M68K) && (defined(__mc68010__) || defined(mc68010) || defined(__mc68010)) -# define SPROUT_ARCH_M68K SPROUT_VERSION_NUMBER(1, 0, 0) -# endif -# if !defined(SPROUT_ARCH_M68K) && (defined(__mc68000__) || defined(mc68000) || defined(__mc68000)) -# define SPROUT_ARCH_M68K 1 -# endif -# if !defined(SPROUT_ARCH_M68K) -# define SPROUT_ARCH_M68K 1 -# endif -#endif - -#if SPROUT_ARCH_M68K -# define SPROUT_ARCH_M68K_AVAILABLE -#endif - -#define SPROUT_ARCH_M68K_NAME "Motorola 68k" - -#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_M68K_HPP diff --git a/dsp/lib/sprout/sprout/predef/architecture/mips.hpp b/dsp/lib/sprout/sprout/predef/architecture/mips.hpp deleted file mode 100644 index 2dec79b..0000000 --- a/dsp/lib/sprout/sprout/predef/architecture/mips.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_ARCHITECTURE_MIPS_HPP -#define SPROUT_PREDEF_ARCHITECTURE_MIPS_HPP - -#include -#include - -#define SPROUT_ARCH_MIPS 0 - -#if defined(__mips__) || defined(__mips) || \ - defined(__MIPS__) -# undef SPROUT_ARCH_MIPS -# if !defined(SPROUT_ARCH_MIPS) && (defined(__mips)) -# define SPROUT_ARCH_MIPS SPROUT_VERSION_NUMBER(__mips, 0, 0) -# endif -# if !defined(SPROUT_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS1) || defined(_R3000)) -# define SPROUT_ARCH_MIPS SPROUT_VERSION_NUMBER(1, 0, 0) -# endif -# if !defined(SPROUT_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS2) || defined(__MIPS_ISA2__) || defined(_R4000)) -# define SPROUT_ARCH_MIPS SPROUT_VERSION_NUMBER(2, 0, 0) -# endif -# if !defined(SPROUT_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS3) || defined(__MIPS_ISA3__)) -# define SPROUT_ARCH_MIPS SPROUT_VERSION_NUMBER(3, 0, 0) -# endif -# if !defined(SPROUT_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS4) || defined(__MIPS_ISA4__)) -# define SPROUT_ARCH_MIPS SPROUT_VERSION_NUMBER(4, 0, 0) -# endif -# if !defined(SPROUT_ARCH_MIPS) -# define SPROUT_ARCH_MIPS 1 -# endif -#endif - -#if SPROUT_ARCH_MIPS -# define SPROUT_ARCH_MIPS_AVAILABLE -#endif - -#define SPROUT_ARCH_MIPS_NAME "MIPS" - -#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_MIPS_HPP diff --git a/dsp/lib/sprout/sprout/predef/architecture/parisc.hpp b/dsp/lib/sprout/sprout/predef/architecture/parisc.hpp deleted file mode 100644 index f0490b5..0000000 --- a/dsp/lib/sprout/sprout/predef/architecture/parisc.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_ARCHITECTURE_PARISC_HPP -#define SPROUT_PREDEF_ARCHITECTURE_PARISC_HPP - -#include -#include - -#define SPROUT_ARCH_PARISC 0 - -#if defined(__hppa__) || defined(__hppa) || defined(__HPPA__) -# undef SPROUT_ARCH_PARISC -# if !defined(SPROUT_ARCH_PARISC) && (defined(_PA_RISC1_0)) -# define SPROUT_ARCH_PARISC SPROUT_VERSION_NUMBER(1, 0, 0) -# endif -# if !defined(SPROUT_ARCH_PARISC) && (defined(_PA_RISC1_1) || defined(__HPPA11__) || defined(__PA7100__)) -# define SPROUT_ARCH_PARISC SPROUT_VERSION_NUMBER(1, 1, 0) -# endif -# if !defined(SPROUT_ARCH_PARISC) && (defined(_PA_RISC2_0) || defined(__RISC2_0__) || defined(__HPPA20__) || defined(__PA8000__)) -# define SPROUT_ARCH_PARISC SPROUT_VERSION_NUMBER(2, 0, 0) -# endif -# if !defined(SPROUT_ARCH_PARISC) -# define SPROUT_ARCH_PARISC 1 -# endif -#endif - -#if SPROUT_ARCH_PARISC -# define SPROUT_ARCH_PARISC_AVAILABLE -#endif - -#define SPROUT_ARCH_PARISC_NAME "HP/PA RISC" - -#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_PARISC_HPP diff --git a/dsp/lib/sprout/sprout/predef/architecture/ppc.hpp b/dsp/lib/sprout/sprout/predef/architecture/ppc.hpp deleted file mode 100644 index 58af3d3..0000000 --- a/dsp/lib/sprout/sprout/predef/architecture/ppc.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_ARCHITECTURE_PPC_HPP -#define SPROUT_PREDEF_ARCHITECTURE_PPC_HPP - -#include -#include - -#define SPROUT_ARCH_PPC 0 - -#if defined(__powerpc) || defined(__powerpc__) || defined(__POWERPC__) || defined(__ppc__) \ - || defined(_M_PPC) || defined(_ARCH_PPC) || defined(__PPCGECKO__) || defined(__PPCBROADWAY__) || defined(_XENON) -# undef SPROUT_ARCH_PPC -# if !defined (SPROUT_ARCH_PPC) && (defined(__ppc601__) || defined(_ARCH_601)) -# define SPROUT_ARCH_PPC SPROUT_VERSION_NUMBER(6, 1, 0) -# endif -# if !defined (SPROUT_ARCH_PPC) && (defined(__ppc603__) || defined(_ARCH_603)) -# define SPROUT_ARCH_PPC SPROUT_VERSION_NUMBER(6, 3, 0) -# endif -# if !defined (SPROUT_ARCH_PPC) && (defined(__ppc604__) || defined(__ppc604__)) -# define SPROUT_ARCH_PPC SPROUT_VERSION_NUMBER(6, 4, 0) -# endif -# if !defined (SPROUT_ARCH_PPC) -# define SPROUT_ARCH_PPC 1 -# endif -#endif - -#if SPROUT_ARCH_PPC -# define SPROUT_ARCH_PPC_AVAILABLE -#endif - -#define SPROUT_ARCH_PPC_NAME "PowerPC" - -#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_PPC_HPP diff --git a/dsp/lib/sprout/sprout/predef/architecture/pyramid.hpp b/dsp/lib/sprout/sprout/predef/architecture/pyramid.hpp deleted file mode 100644 index 448a421..0000000 --- a/dsp/lib/sprout/sprout/predef/architecture/pyramid.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_ARCHITECTURE_PYRAMID_HPP -#define SPROUT_PREDEF_ARCHITECTURE_PYRAMID_HPP - -#include - -#define SPROUT_ARCH_PYRAMID 0 - -#if defined(pyr) -# undef SPROUT_ARCH_PYRAMID -# define SPROUT_ARCH_PYRAMID 1 -#endif - -#if SPROUT_ARCH_PYRAMID -# define SPROUT_ARCH_PYRAMID_AVAILABLE -#endif - -#define SPROUT_ARCH_PYRAMID_NAME "Pyramid 9810" - -#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_PYRAMID_HPP diff --git a/dsp/lib/sprout/sprout/predef/architecture/rs6k.hpp b/dsp/lib/sprout/sprout/predef/architecture/rs6k.hpp deleted file mode 100644 index ed43907..0000000 --- a/dsp/lib/sprout/sprout/predef/architecture/rs6k.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_ARCHITECTURE_RS6K_HPP -#define SPROUT_PREDEF_ARCHITECTURE_RS6K_HPP - -#include - -#define SPROUT_ARCH_RS6000 0 - -#if defined(__THW_RS6000) || defined(_IBMR2) || defined(_POWER) || defined(_ARCH_PWR) || defined(_ARCH_PWR2) -# undef SPROUT_ARCH_RS6000 -# define SPROUT_ARCH_RS6000 1 -#endif - -#if SPROUT_ARCH_RS6000 -# define SPROUT_ARCH_RS6000_AVAILABLE -#endif - -#define SPROUT_ARCH_RS6000_NAME "RS/6000" - -#define SPROUT_ARCH_PWR SPROUT_ARCH_RS6000 - -#if SPROUT_ARCH_PWR -# define SPROUT_ARCH_PWR_AVAILABLE -#endif - -#define SPROUT_ARCH_PWR_NAME SPROUT_ARCH_RS6000_NAME - -#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_RS6K_HPP diff --git a/dsp/lib/sprout/sprout/predef/architecture/sparc.hpp b/dsp/lib/sprout/sprout/predef/architecture/sparc.hpp deleted file mode 100644 index 5b636ec..0000000 --- a/dsp/lib/sprout/sprout/predef/architecture/sparc.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_ARCHITECTURE_SPARC_HPP -#define SPROUT_PREDEF_ARCHITECTURE_SPARC_HPP - -#include -#include - -#define SPROUT_ARCH_SPARC 0 - -#if defined(__sparc__) || defined(__sparc) -# undef SPROUT_ARCH_SPARC -# if !defined(SPROUT_ARCH_SPARC) && defined(__sparcv9) -# define SPROUT_ARCH_SPARC SPROUT_VERSION_NUMBER(9, 0, 0) -# endif -# if !defined(SPROUT_ARCH_SPARC) && defined(__sparcv8) -# define SPROUT_ARCH_SPARC SPROUT_VERSION_NUMBER(8, 0, 0) -# endif -# if !defined(SPROUT_ARCH_SPARC) -# define SPROUT_ARCH_SPARC 1 -# endif -#endif - -#if SPROUT_ARCH_SPARC -# define SPROUT_ARCH_SPARC_AVAILABLE -#endif - -#define SPROUT_ARCH_SPARC_NAME "SPARC" - -#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_SPARC_HPP diff --git a/dsp/lib/sprout/sprout/predef/architecture/superh.hpp b/dsp/lib/sprout/sprout/predef/architecture/superh.hpp deleted file mode 100644 index eeed926..0000000 --- a/dsp/lib/sprout/sprout/predef/architecture/superh.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_ARCHITECTURE_SUPERH_HPP -#define SPROUT_PREDEF_ARCHITECTURE_SUPERH_HPP - -#include -#include - -#define SPROUT_ARCH_SH 0 - -#if defined(__sh__) -# undef SPROUT_ARCH_SH -# if !defined(SPROUT_ARCH_SH) && (defined(__SH5__)) -# define SPROUT_ARCH_SH SPROUT_VERSION_NUMBER(5, 0, 0) -# endif -# if !defined(SPROUT_ARCH_SH) && (defined(__SH4__)) -# define SPROUT_ARCH_SH SPROUT_VERSION_NUMBER(4, 0, 0) -# endif -# if !defined(SPROUT_ARCH_SH) && (defined(__sh3__) || defined(__SH3__)) -# define SPROUT_ARCH_SH SPROUT_VERSION_NUMBER(3, 0, 0) -# endif -# if !defined(SPROUT_ARCH_SH) && (defined(__sh2__)) -# define SPROUT_ARCH_SH SPROUT_VERSION_NUMBER(2, 0, 0) -# endif -# if !defined(SPROUT_ARCH_SH) && (defined(__sh1__)) -# define SPROUT_ARCH_SH SPROUT_VERSION_NUMBER(1, 0, 0) -# endif -# if !defined(SPROUT_ARCH_SH) -# define SPROUT_ARCH_SH 1 -# endif -#endif - -#if SPROUT_ARCH_SH -# define SPROUT_ARCH_SH_AVAILABLE -#endif - -#define SPROUT_ARCH_SH_NAME "SuperH" - -#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_SUPERH_HPP diff --git a/dsp/lib/sprout/sprout/predef/architecture/sys370.hpp b/dsp/lib/sprout/sprout/predef/architecture/sys370.hpp deleted file mode 100644 index 25deb35..0000000 --- a/dsp/lib/sprout/sprout/predef/architecture/sys370.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_ARCHITECTURE_SYS370_HPP -#define SPROUT_PREDEF_ARCHITECTURE_SYS370_HPP - -#include - -#define SPROUT_ARCH_SYS370 0 - -#if defined(__370__) || defined(__THW_370__) -# undef SPROUT_ARCH_SYS370 -# define SPROUT_ARCH_SYS370 1 -#endif - -#if SPROUT_ARCH_SYS370 -# define SPROUT_ARCH_SYS370_AVAILABLE -#endif - -#define SPROUT_ARCH_SYS370_NAME "System/370" - -#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_SYS370_HPP diff --git a/dsp/lib/sprout/sprout/predef/architecture/sys390.hpp b/dsp/lib/sprout/sprout/predef/architecture/sys390.hpp deleted file mode 100644 index 7162749..0000000 --- a/dsp/lib/sprout/sprout/predef/architecture/sys390.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_ARCHITECTURE_SYS390_HPP -#define SPROUT_PREDEF_ARCHITECTURE_SYS390_HPP - -#include - -#define SPROUT_ARCH_SYS390 0 - -#if defined(__s390__) || defined(__s390x__) -# undef SPROUT_ARCH_SYS390 -# define SPROUT_ARCH_SYS390 1 -#endif - -#if SPROUT_ARCH_SYS390 -# define SPROUT_ARCH_SYS390_AVAILABLE -#endif - -#define SPROUT_ARCH_SYS390_NAME "System/390" - -#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_SYS390_HPP diff --git a/dsp/lib/sprout/sprout/predef/architecture/x86.hpp b/dsp/lib/sprout/sprout/predef/architecture/x86.hpp deleted file mode 100644 index 9d78a78..0000000 --- a/dsp/lib/sprout/sprout/predef/architecture/x86.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_ARCHITECTURE_X86_HPP -#define SPROUT_PREDEF_ARCHITECTURE_X86_HPP - -#include -#include -#include - -#define SPROUT_ARCH_X86 0 - -#if SPROUT_ARCH_X86_32 || SPROUT_ARCH_X86_64 -# undef SPROUT_ARCH_X86 -# define SPROUT_ARCH_X86 1 -#endif - -#if SPROUT_ARCH_X86 -# define SPROUT_ARCH_X86_AVAILABLE -#endif - -#define SPROUT_ARCH_X86_NAME "Intel x86" - -#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_X86_HPP diff --git a/dsp/lib/sprout/sprout/predef/architecture/x86/32.hpp b/dsp/lib/sprout/sprout/predef/architecture/x86/32.hpp deleted file mode 100644 index 4c59e25..0000000 --- a/dsp/lib/sprout/sprout/predef/architecture/x86/32.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_ARCHITECTURE_X86_32_HPP -#define SPROUT_PREDEF_ARCHITECTURE_X86_32_HPP - -#include -#include -#include - -#define SPROUT_ARCH_X86_32 0 - -#if defined(i386) || defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__) || defined(__i386) \ - || defined(_M_IX86) || defined(_X86_) || defined(__THW_INTEL__) || defined(__I86__) || defined(__INTEL__) -# undef SPROUT_ARCH_X86_32 -# if !defined(SPROUT_ARCH_X86_32) && defined(__I86__) -# define SPROUT_ARCH_X86_32 SPROUT_VERSION_NUMBER(__I86__, 0, 0) -# endif -# if !defined(SPROUT_ARCH_X86_32) && defined(_M_IX86) -# define SPROUT_ARCH_X86_32 SPROUT_PREDEF_MAKE_10_VV00(_M_IX86) -# endif -# if !defined(SPROUT_ARCH_X86_32) && defined(__i686__) -# define SPROUT_ARCH_X86_32 SPROUT_VERSION_NUMBER(6, 0, 0) -# endif -# if !defined(SPROUT_ARCH_X86_32) && defined(__i586__) -# define SPROUT_ARCH_X86_32 SPROUT_VERSION_NUMBER(5, 0, 0) -# endif -# if !defined(SPROUT_ARCH_X86_32) && defined(__i486__) -# define SPROUT_ARCH_X86_32 SPROUT_VERSION_NUMBER(4, 0, 0) -# endif -# if !defined(SPROUT_ARCH_X86_32) && defined(__i386__) -# define SPROUT_ARCH_X86_32 SPROUT_VERSION_NUMBER(3, 0, 0) -# endif -# if !defined(SPROUT_ARCH_X86_32) -# define SPROUT_ARCH_X86_32 1 -# endif -#endif - -#if SPROUT_ARCH_X86_32 -# define SPROUT_ARCH_X86_32_AVAILABLE -#endif - -#define SPROUT_ARCH_X86_32_NAME "Intel x86-32" - -#include - -#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_X86_32_HPP diff --git a/dsp/lib/sprout/sprout/predef/architecture/x86/64.hpp b/dsp/lib/sprout/sprout/predef/architecture/x86/64.hpp deleted file mode 100644 index b19d768..0000000 --- a/dsp/lib/sprout/sprout/predef/architecture/x86/64.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_ARCHITECTURE_X86_64_HPP -#define SPROUT_PREDEF_ARCHITECTURE_X86_64_HPP - -#include - -#define SPROUT_ARCH_X86_64 0 - -#if defined(__x86_64) || defined(__x86_64__) || defined(__amd64__) || defined(__amd64) || defined(_M_X64) -# undef SPROUT_ARCH_X86_64 -# define SPROUT_ARCH_X86_64 1 -#endif - -#if SPROUT_ARCH_X86_64 -# define SPROUT_ARCH_X86_64_AVAILABLE -#endif - -#define SPROUT_ARCH_X86_64_NAME "Intel x86-64" - -#include - -#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_X86_64_HPP diff --git a/dsp/lib/sprout/sprout/predef/architecture/z.hpp b/dsp/lib/sprout/sprout/predef/architecture/z.hpp deleted file mode 100644 index 4d1b08b..0000000 --- a/dsp/lib/sprout/sprout/predef/architecture/z.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_ARCHITECTURE_Z_HPP -#define SPROUT_PREDEF_ARCHITECTURE_Z_HPP - -#include - -#define SPROUT_ARCH_Z 0 - -#if defined(__SYSC_ZARCH__) -# undef SPROUT_ARCH_Z -# define SPROUT_ARCH_Z 1 -#endif - -#if SPROUT_ARCH_Z -# define SPROUT_ARCH_Z_AVAILABLE -#endif - -#define SPROUT_ARCH_Z_NAME "z/Architecture" - -#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_Z_HPP diff --git a/dsp/lib/sprout/sprout/predef/compiler.hpp b/dsp/lib/sprout/sprout/predef/compiler.hpp deleted file mode 100644 index 3835f22..0000000 --- a/dsp/lib/sprout/sprout/predef/compiler.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_COMPILER_HPP -#define SPROUT_PREDEF_COMPILER_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif //#ifndef SPROUT_PREDEF_COMPILER_HPP diff --git a/dsp/lib/sprout/sprout/predef/compiler/borland.hpp b/dsp/lib/sprout/sprout/predef/compiler/borland.hpp deleted file mode 100644 index 84b0fd0..0000000 --- a/dsp/lib/sprout/sprout/predef/compiler/borland.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_COMPILER_BORLAND_HPP -#define SPROUT_PREDEF_COMPILER_BORLAND_HPP - -#include -#include - -#define SPROUT_COMP_BORLAND 0 - -#if defined(__BORLANDC__) || defined(__CODEGEARC__) -# if !defined(SPROUT_COMP_BORLAND_DETECTION) && (defined(__CODEGEARC__)) -# define SPROUT_COMP_BORLAND_DETECTION SPROUT_PREDEF_MAKE_0X_VVRP(__CODEGEARC__) -# endif -# if !defined(SPROUT_COMP_BORLAND_DETECTION) -# define SPROUT_COMP_BORLAND_DETECTION SPROUT_PREDEF_MAKE_0X_VVRP(__BORLANDC__) -# endif -#endif - -#ifdef SPROUT_COMP_BORLAND_DETECTION -# define SPROUT_COMP_BORLAND_AVAILABLE -# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) -# define SPROUT_COMP_BORLAND_EMULATED SPROUT_COMP_BORLAND_DETECTION -# else -# undef SPROUT_COMP_BORLAND -# define SPROUT_COMP_BORLAND SPROUT_COMP_BORLAND_DETECTION -# endif -# include -#endif - -#define SPROUT_COMP_BORLAND_NAME "Borland C++" - -#endif //#ifndef SPROUT_PREDEF_COMPILER_BORLAND_HPP diff --git a/dsp/lib/sprout/sprout/predef/compiler/clang.hpp b/dsp/lib/sprout/sprout/predef/compiler/clang.hpp deleted file mode 100644 index 4c6226d..0000000 --- a/dsp/lib/sprout/sprout/predef/compiler/clang.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_COMPILER_CLANG_HPP -#define SPROUT_PREDEF_COMPILER_CLANG_HPP - -#include -#include - -#define SPROUT_COMP_CLANG 0 - -#if defined(__clang__) -# define SPROUT_COMP_CLANG_DETECTION \ - SPROUT_VERSION_NUMBER(__clang_major__, __clang_minor__, __clang_patchlevel__) -#endif - -#ifdef SPROUT_COMP_CLANG_DETECTION -# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) -# define SPROUT_COMP_CLANG_EMULATED SPROUT_COMP_CLANG_DETECTION -# else -# undef SPROUT_COMP_CLANG -# define SPROUT_COMP_CLANG SPROUT_COMP_CLANG_DETECTION -# endif -# define SPROUT_COMP_CLANG_AVAILABLE -# include -#endif - -#define SPROUT_COMP_CLANG_NAME "Clang" - -#endif //#ifndef SPROUT_PREDEF_COMPILER_CLANG_HPP diff --git a/dsp/lib/sprout/sprout/predef/compiler/comeau.hpp b/dsp/lib/sprout/sprout/predef/compiler/comeau.hpp deleted file mode 100644 index 023e675..0000000 --- a/dsp/lib/sprout/sprout/predef/compiler/comeau.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_COMPILER_COMEAU_HPP -#define SPROUT_PREDEF_COMPILER_COMEAU_HPP - -#include -#include - -#define SPROUT_COMP_COMO 0 - -#if defined(__COMO__) -# if !defined(SPROUT_COMP_COMO_DETECTION) && defined(__COMO_VERSION__) -# define SPROUT_COMP_COMO_DETECTION SPROUT_PREDEF_MAKE_0X_VRP(__COMO_VERSION__) -# endif -# if !defined(SPROUT_COMP_COMO_DETECTION) -# define SPROUT_COMP_COMO_DETECTION 1 -# endif -#endif - -#ifdef SPROUT_COMP_COMO_DETECTION -# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) -# define SPROUT_COMP_COMO_EMULATED SPROUT_COMP_COMO_DETECTION -# else -# undef SPROUT_COMP_COMO -# define SPROUT_COMP_COMO SPROUT_COMP_COMO_DETECTION -# endif -# define SPROUT_COMP_COMO_AVAILABLE -# include -#endif - -#define SPROUT_COMP_COMO_NAME "Comeau C++" - -#endif //#ifndef SPROUT_PREDEF_COMPILER_COMEAU_HPP diff --git a/dsp/lib/sprout/sprout/predef/compiler/compaq.hpp b/dsp/lib/sprout/sprout/predef/compiler/compaq.hpp deleted file mode 100644 index 5b2aa28..0000000 --- a/dsp/lib/sprout/sprout/predef/compiler/compaq.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_COMPILER_COMPAQ_HPP -#define SPROUT_PREDEF_COMPILER_COMPAQ_HPP - -#include -#include - -#define SPROUT_COMP_DEC 0 - -#if defined(__DECC) || defined(__DECCXX) -# if !defined(SPROUT_COMP_DEC_DETECTION) && defined(__DECCXX_VER) -# define SPROUT_COMP_DEC_DETECTION SPROUT_PREDEF_MAKE_10_VVRR0PP00(__DECCXX_VER) -# endif -# if !defined(SPROUT_COMP_DEC_DETECTION) && defined(__DECC_VER) -# define SPROUT_COMP_DEC_DETECTION SPROUT_PREDEF_MAKE_10_VVRR0PP00(__DECC_VER) -# endif -# if !defined(SPROUT_COMP_DEC_DETECTION) -# define SPROUT_COM_DEC_DETECTION 1 -# endif -#endif - -#ifdef SPROUT_COMP_DEC_DETECTION -# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) -# define SPROUT_COMP_DEC_EMULATED SPROUT_COMP_DEC_DETECTION -# else -# undef SPROUT_COMP_DEC -# define SPROUT_COMP_DEC SPROUT_COMP_DEC_DETECTION -# endif -# define SPROUT_COMP_DEC_AVAILABLE -# include -#endif - -#define SPROUT_COMP_DEC_NAME "Compaq C/C++" - -#endif //#ifndef SPROUT_PREDEF_COMPILER_COMPAQ_HPP diff --git a/dsp/lib/sprout/sprout/predef/compiler/diab.hpp b/dsp/lib/sprout/sprout/predef/compiler/diab.hpp deleted file mode 100644 index 885d3ef..0000000 --- a/dsp/lib/sprout/sprout/predef/compiler/diab.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_COMPILER_DIAB_HPP -#define SPROUT_PREDEF_COMPILER_DIAB_HPP - -#include -#include - -#define SPROUT_COMP_DIAB 0 - -#if defined(__DCC__) -# define SPROUT_COMP_DIAB_DETECTION SPROUT_PREDEF_MAKE_10_VRPP(__VERSION_NUMBER__) -#endif - -#ifdef SPROUT_COMP_DIAB_DETECTION -# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) -# define SPROUT_COMP_DIAB_EMULATED SPROUT_COMP_DIAB_DETECTION -# else -# undef SPROUT_COMP_DIAB -# define SPROUT_COMP_DIAB SPROUT_COMP_DIAB_DETECTION -# endif -# define SPROUT_COMP_DIAB_AVAILABLE -# include -#endif - -#define SPROUT_COMP_DIAB_NAME "Diab C/C++" - -#endif //#ifndef SPROUT_PREDEF_COMPILER_DIAB_HPP diff --git a/dsp/lib/sprout/sprout/predef/compiler/digitalmars.hpp b/dsp/lib/sprout/sprout/predef/compiler/digitalmars.hpp deleted file mode 100644 index 4a28d40..0000000 --- a/dsp/lib/sprout/sprout/predef/compiler/digitalmars.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_COMPILER_DIGITALMARS_HPP -#define SPROUT_PREDEF_COMPILER_DIGITALMARS_HPP - -#include -#include - -#define SPROUT_COMP_DMC 0 - -#if defined(__DMC__) -# define SPROUT_COMP_DMC_DETECTION SPROUT_PREDEF_MAKE_0X_VRP(__DMC__) -#endif - -#ifdef SPROUT_COMP_DMC_DETECTION -# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) -# define SPROUT_COMP_DMC_EMULATED SPROUT_COMP_DMC_DETECTION -# else -# undef SPROUT_COMP_DMC -# define SPROUT_COMP_DMC SPROUT_COMP_DMC_DETECTION -# endif -# define SPROUT_COMP_DMC_AVAILABLE -# include -#endif - -#define SPROUT_COMP_DMC_NAME "Digital Mars" - -#endif //#ifndef SPROUT_PREDEF_COMPILER_DIGITALMARS_HPP diff --git a/dsp/lib/sprout/sprout/predef/compiler/dignus.hpp b/dsp/lib/sprout/sprout/predef/compiler/dignus.hpp deleted file mode 100644 index f089d59..0000000 --- a/dsp/lib/sprout/sprout/predef/compiler/dignus.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_COMPILER_DIGNUS_HPP -#define SPROUT_PREDEF_COMPILER_DIGNUS_HPP - -#include -#include - -#define SPROUT_COMP_SYSC 0 - -#if defined(__SYSC__) -# define SPROUT_COMP_SYSC_DETECTION SPROUT_PREDEF_MAKE_10_VRRPP(__SYSC_VER__) -#endif - -#ifdef SPROUT_COMP_SYSC_DETECTION -# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) -# define SPROUT_COMP_SYSC_EMULATED SPROUT_COMP_SYSC_DETECTION -# else -# undef SPROUT_COMP_SYSC -# define SPROUT_COMP_SYSC SPROUT_COMP_SYSC_DETECTION -# endif -# define SPROUT_COMP_SYSC_AVAILABLE -# include -#endif - -#define SPROUT_COMP_SYSC_NAME "Dignus Systems/C++" - -#endif //#ifndef SPROUT_PREDEF_COMPILER_DIGNUS_HPP diff --git a/dsp/lib/sprout/sprout/predef/compiler/edg.hpp b/dsp/lib/sprout/sprout/predef/compiler/edg.hpp deleted file mode 100644 index a69a037..0000000 --- a/dsp/lib/sprout/sprout/predef/compiler/edg.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_COMPILER_EDG_HPP -#define SPROUT_PREDEF_COMPILER_EDG_HPP - -#include -#include - -#define SPROUT_COMP_EDG 0 - -#if defined(__EDG__) -# define SPROUT_COMP_EDG_DETECTION SPROUT_PREDEF_MAKE_10_VRR(__EDG_VERSION__) -#endif - -#ifdef SPROUT_COMP_EDG_DETECTION -# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) -# define SPROUT_COMP_EDG_EMULATED SPROUT_COMP_EDG_DETECTION -# else -# undef SPROUT_COMP_EDG -# define SPROUT_COMP_EDG SPROUT_COMP_EDG_DETECTION -# endif -# define SPROUT_COMP_EDG_AVAILABLE -# include -#endif - -#define SPROUT_COMP_EDG_NAME "EDG C++ Frontend" - -#endif //#ifndef SPROUT_PREDEF_COMPILER_EDG_HPP diff --git a/dsp/lib/sprout/sprout/predef/compiler/ekopath.hpp b/dsp/lib/sprout/sprout/predef/compiler/ekopath.hpp deleted file mode 100644 index de5c895..0000000 --- a/dsp/lib/sprout/sprout/predef/compiler/ekopath.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_COMPILER_EKOPATH_HPP -#define SPROUT_PREDEF_COMPILER_EKOPATH_HPP - -#include -#include - -#define SPROUT_COMP_PATH 0 - -#if defined(__PATHCC__) -# define SPROUT_COMP_PATH_DETECTION \ - SPROUT_VERSION_NUMBER(__PATHCC__, __PATHCC_MINOR__, __PATHCC_PATCHLEVEL__) -#endif - -#ifdef SPROUT_COMP_PATH_DETECTION -# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) -# define SPROUT_COMP_PATH_EMULATED SPROUT_COMP_PATH_DETECTION -# else -# undef SPROUT_COMP_PATH -# define SPROUT_COMP_PATH SPROUT_COMP_PATH_DETECTION -# endif -# define SPROUT_COMP_PATH_AVAILABLE -# include -#endif - -#define SPROUT_COMP_PATH_NAME "EKOpath" - -#endif //#ifndef SPROUT_PREDEF_COMPILER_EKOPATH_HPP diff --git a/dsp/lib/sprout/sprout/predef/compiler/gcc.hpp b/dsp/lib/sprout/sprout/predef/compiler/gcc.hpp deleted file mode 100644 index 584d065..0000000 --- a/dsp/lib/sprout/sprout/predef/compiler/gcc.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_COMPILER_GCC_HPP -#define SPROUT_PREDEF_COMPILER_GCC_HPP - -#include -#include -#include - -#define SPROUT_COMP_GNUC 0 - -#if defined(__GNUC__) -# if !defined(SPROUT_COMP_GNUC_DETECTION) && defined(__GNUC_PATCHLEVEL__) -# define SPROUT_COMP_GNUC_DETECTION \ - SPROUT_VERSION_NUMBER(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__) -# endif -# if !defined(SPROUT_COMP_GNUC_DETECTION) -# define SPROUT_COMP_GNUC_DETECTION \ - SPROUT_VERSION_NUMBER(__GNUC__, __GNUC_MINOR__, 0) -# endif -#endif - -#ifdef SPROUT_COMP_GNUC_DETECTION -# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) -# define SPROUT_COMP_GNUC_EMULATED SPROUT_COMP_GNUC_DETECTION -# else -# undef SPROUT_COMP_GNUC -# define SPROUT_COMP_GNUC SPROUT_COMP_GNUC_DETECTION -# endif -# define SPROUT_COMP_GNUC_AVAILABLE -# include -#endif - -#define SPROUT_COMP_GNUC_NAME "Gnu GCC C/C++" - -#endif //#ifndef SPROUT_PREDEF_COMPILER_GCC_HPP diff --git a/dsp/lib/sprout/sprout/predef/compiler/gcc_xml.hpp b/dsp/lib/sprout/sprout/predef/compiler/gcc_xml.hpp deleted file mode 100644 index c6bc2cd..0000000 --- a/dsp/lib/sprout/sprout/predef/compiler/gcc_xml.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_COMPILER_GCC_XML_HPP -#define SPROUT_PREDEF_COMPILER_GCC_XML_HPP - -#include - -#define SPROUT_COMP_GCCXML 0 - -#if defined(__GCCXML__) -# define SPROUT_COMP_GCCXML_DETECTION 1 -#endif - -#ifdef SPROUT_COMP_GCCXML_DETECTION -# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) -# define SPROUT_COMP_GCCXML_EMULATED SPROUT_COMP_GCCXML_DETECTION -# else -# undef SPROUT_COMP_GCCXML -# define SPROUT_COMP_GCCXML SPROUT_COMP_GCCXML_DETECTION -# endif -# define SPROUT_COMP_GCCXML_AVAILABLE -# include -#endif - -#define SPROUT_COMP_GCCXML_NAME "GCC XML" - -#endif //#ifndef SPROUT_PREDEF_COMPILER_GCC_XML_HPP diff --git a/dsp/lib/sprout/sprout/predef/compiler/greenhills.hpp b/dsp/lib/sprout/sprout/predef/compiler/greenhills.hpp deleted file mode 100644 index ed51568..0000000 --- a/dsp/lib/sprout/sprout/predef/compiler/greenhills.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_COMPILER_GREENHILLS_HPP -#define SPROUT_PREDEF_COMPILER_GREENHILLS_HPP - -#include -#include - -#define SPROUT_COMP_GHS 0 - -#if defined(__ghs) || defined(__ghs__) -# if !defined(SPROUT_COMP_GHS_DETECTION) && defined(__GHS_VERSION_NUMBER__) -# define SPROUT_COMP_GHS_DETECTION SPROUT_PREDEF_MAKE_10_VRP(__GHS_VERSION_NUMBER__) -# endif -# if !defined(SPROUT_COMP_GHS_DETECTION) && defined(__ghs) -# define SPROUT_COMP_GHS_DETECTION SPROUT_PREDEF_MAKE_10_VRP(__ghs) -# endif -# if !defined(SPROUT_COMP_GHS_DETECTION) -# define SPROUT_COMP_GHS_DETECTION 1 -# endif -#endif - -#ifdef SPROUT_COMP_GHS_DETECTION -# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) -# define SPROUT_COMP_GHS_EMULATED SPROUT_COMP_GHS_DETECTION -# else -# undef SPROUT_COMP_GHS -# define SPROUT_COMP_GHS SPROUT_COMP_GHS_DETECTION -# endif -# define SPROUT_COMP_GHS_AVAILABLE -# include -#endif - -#define SPROUT_COMP_GHS_NAME "Green Hills C/C++" - -#endif //#ifndef SPROUT_PREDEF_COMPILER_GREENHILLS_HPP diff --git a/dsp/lib/sprout/sprout/predef/compiler/hp_acc.hpp b/dsp/lib/sprout/sprout/predef/compiler/hp_acc.hpp deleted file mode 100644 index cb1622a..0000000 --- a/dsp/lib/sprout/sprout/predef/compiler/hp_acc.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_COMPILER_HP_ACC_HPP -#define SPROUT_PREDEF_COMPILER_HP_ACC_HPP - -#include -#include - -#define SPROUT_COMP_HPACC 0 - -#if defined(__HP_aCC) -# if !defined(SPROUT_COMP_HPACC_DETECTION) && (__HP_aCC > 1) -# define SPROUT_COMP_HPACC_DETECTION SPROUT_PREDEF_MAKE_10_VVRRPP(__HP_aCC) -# endif -# if !defined(SPROUT_COMP_HPACC_DETECTION) -# define SPROUT_COMP_HPACC_DETECTION 1 -# endif -#endif - -#ifdef SPROUT_COMP_HPACC_DETECTION -# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) -# define SPROUT_COMP_HPACC_EMULATED SPROUT_COMP_HPACC_DETECTION -# else -# undef SPROUT_COMP_HPACC -# define SPROUT_COMP_HPACC SPROUT_COMP_HPACC_DETECTION -# endif -# define SPROUT_COMP_HPACC_AVAILABLE -# include -#endif - -#define SPROUT_COMP_HPACC_NAME "HP aC++" - -#endif //#ifndef SPROUT_PREDEF_COMPILER_HP_ACC_HPP diff --git a/dsp/lib/sprout/sprout/predef/compiler/iar.hpp b/dsp/lib/sprout/sprout/predef/compiler/iar.hpp deleted file mode 100644 index 755ec0b..0000000 --- a/dsp/lib/sprout/sprout/predef/compiler/iar.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_COMPILER_IAR_HPP -#define SPROUT_PREDEF_COMPILER_IAR_HPP - -#include -#include - -#define SPROUT_COMP_IAR 0 - -#if defined(__IAR_SYSTEMS_ICC__) -# define SPROUT_COMP_IAR_DETECTION SPROUT_PREDEF_MAKE_10_VVRR(__VER__) -#endif - -#ifdef SPROUT_COMP_IAR_DETECTION -# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) -# define SPROUT_COMP_IAR_EMULATED SPROUT_COMP_IAR_DETECTION -# else -# undef SPROUT_COMP_IAR -# define SPROUT_COMP_IAR SPROUT_COMP_IAR_DETECTION -# endif -# define SPROUT_COMP_IAR_AVAILABLE -# include -#endif - -#define SPROUT_COMP_IAR_NAME "IAR C/C++" - -#endif //#ifndef SPROUT_PREDEF_COMPILER_IAR_HPP diff --git a/dsp/lib/sprout/sprout/predef/compiler/ibm.hpp b/dsp/lib/sprout/sprout/predef/compiler/ibm.hpp deleted file mode 100644 index ae3a13f..0000000 --- a/dsp/lib/sprout/sprout/predef/compiler/ibm.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_COMPILER_IBM_HPP -#define SPROUT_PREDEF_COMPILER_IBM_HPP - -#include -#include - -#define SPROUT_COMP_IBM 0 - -#if defined(__IBMCPP__) || defined(__xlC__) || defined(__xlc__) -# if !defined(SPROUT_COMP_IBM_DETECTION) && defined(__COMPILER_VER__) -# define SPROUT_COMP_IBM_DETECTION SPROUT_PREDEF_MAKE_0X_VRRPPPP(__COMPILER_VER__) -# endif -# if !defined(SPROUT_COMP_IBM_DETECTION) && defined(__xlC__) -# define SPROUT_COMP_IBM_DETECTION SPROUT_PREDEF_MAKE_0X_VVRR(__xlC__) -# endif -# if !defined(SPROUT_COMP_IBM_DETECTION) && defined(__xlc__) -# define SPROUT_COMP_IBM_DETECTION SPROUT_PREDEF_MAKE_0X_VVRR(__xlc__) -# endif -# if !defined(SPROUT_COMP_IBM_DETECTION) -# define SPROUT_COMP_IBM_DETECTION SPROUT_PREDEF_MAKE_10_VRP(__IBMCPP__) -# endif -#endif - -#ifdef SPROUT_COMP_IBM_DETECTION -# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) -# define SPROUT_COMP_IBM_EMULATED SPROUT_COMP_IBM_DETECTION -# else -# undef SPROUT_COMP_IBM -# define SPROUT_COMP_IBM SPROUT_COMP_IBM_DETECTION -# endif -# define SPROUT_COMP_IBM_AVAILABLE -# include -#endif - -#define SPROUT_COMP_IBM_NAME "IBM XL C/C++" - -#endif //#ifndef SPROUT_PREDEF_COMPILER_IBM_HPP diff --git a/dsp/lib/sprout/sprout/predef/compiler/intel.hpp b/dsp/lib/sprout/sprout/predef/compiler/intel.hpp deleted file mode 100644 index 33de3de..0000000 --- a/dsp/lib/sprout/sprout/predef/compiler/intel.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_COMPILER_INTEL_HPP -#define SPROUT_PREDEF_COMPILER_INTEL_HPP - -#include -#include - -#define SPROUT_COMP_INTEL 0 - -#if defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || \ - defined(__ECC) -# if !defined(SPROUT_COMP_INTEL_DETECTION) && defined(__INTEL_COMPILER) -# define SPROUT_COMP_INTEL_DETECTION SPROUT_PREDEF_MAKE_10_VRP(__INTEL_COMPILER) -# endif -# if !defined(SPROUT_COMP_INTEL_DETECTION) -# define SPROUT_COMP_INTEL_DETECTION 1 -# endif -#endif - -#ifdef SPROUT_COMP_INTEL_DETECTION -# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) -# define SPROUT_COMP_INTEL_EMULATED SPROUT_COMP_INTEL_DETECTION -# else -# undef SPROUT_COMP_INTEL -# define SPROUT_COMP_INTEL SPROUT_COMP_INTEL_DETECTION -# endif -# define SPROUT_COMP_INTEL_AVAILABLE -# include -#endif - -#define SPROUT_COMP_INTEL_NAME "Intel C/C++" - -#endif //#ifndef SPROUT_PREDEF_COMPILER_INTEL_HPP diff --git a/dsp/lib/sprout/sprout/predef/compiler/kai.hpp b/dsp/lib/sprout/sprout/predef/compiler/kai.hpp deleted file mode 100644 index bb69165..0000000 --- a/dsp/lib/sprout/sprout/predef/compiler/kai.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_COMPILER_KAI_HPP -#define SPROUT_PREDEF_COMPILER_KAI_HPP - -#include -#include - -#define SPROUT_COMP_KCC 0 - -#if defined(__KCC) -# define SPROUT_COMP_KCC_DETECTION SPROUT_PREDEF_MAKE_0X_VRPP(__KCC_VERSION) -#endif - -#ifdef SPROUT_COMP_KCC_DETECTION -# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) -# define SPROUT_COMP_KCC_EMULATED SPROUT_COMP_KCC_DETECTION -# else -# undef SPROUT_COMP_KCC -# define SPROUT_COMP_KCC SPROUT_COMP_KCC_DETECTION -# endif -# define SPROUT_COMP_KCC_AVAILABLE -# include -#endif - -#define SPROUT_COMP_KCC_NAME "Kai C++" - -#endif //#ifndef SPROUT_PREDEF_COMPILER_KAI_HPP diff --git a/dsp/lib/sprout/sprout/predef/compiler/llvm.hpp b/dsp/lib/sprout/sprout/predef/compiler/llvm.hpp deleted file mode 100644 index c77c21d..0000000 --- a/dsp/lib/sprout/sprout/predef/compiler/llvm.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_COMPILER_LLVM_HPP -#define SPROUT_PREDEF_COMPILER_LLVM_HPP - -#include -#include - -#define SPROUT_COMP_LLVM 0 - -#if defined(__llvm__) -# define SPROUT_COMP_LLVM_DETECTION 1 -#endif - -#ifdef SPROUT_COMP_LLVM_DETECTION -# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) -# define SPROUT_COMP_LLVM_EMULATED SPROUT_COMP_LLVM_DETECTION -# else -# undef SPROUT_COMP_LLVM -# define SPROUT_COMP_LLVM SPROUT_COMP_LLVM_DETECTION -# endif -# define SPROUT_COMP_LLVM_AVAILABLE -# include -#endif - -#define SPROUT_COMP_LLVM_NAME "LLVM" - -#endif //#ifndef SPROUT_PREDEF_COMPILER_LLVM_HPP diff --git a/dsp/lib/sprout/sprout/predef/compiler/metaware.hpp b/dsp/lib/sprout/sprout/predef/compiler/metaware.hpp deleted file mode 100644 index 9f83039..0000000 --- a/dsp/lib/sprout/sprout/predef/compiler/metaware.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_COMPILER_METAWARE_HPP -#define SPROUT_PREDEF_COMPILER_METAWARE_HPP - -#include - -#define SPROUT_COMP_HIGHC 0 - -#if defined(__HIGHC__) -# define SPROUT_COMP_HIGHC_DETECTION 1 -#endif - -#ifdef SPROUT_COMP_HIGHC_DETECTION -# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) -# define SPROUT_COMP_HIGHC_EMULATED SPROUT_COMP_HIGHC_DETECTION -# else -# undef SPROUT_COMP_HIGHC -# define SPROUT_COMP_HIGHC SPROUT_COMP_HIGHC_DETECTION -# endif -# define SPROUT_COMP_HIGHC_AVAILABLE -# include -#endif - -#define SPROUT_COMP_HIGHC_NAME "MetaWare High C/C++" - -#endif //#ifndef SPROUT_PREDEF_COMPILER_METAWARE_HPP diff --git a/dsp/lib/sprout/sprout/predef/compiler/metrowerks.hpp b/dsp/lib/sprout/sprout/predef/compiler/metrowerks.hpp deleted file mode 100644 index a4c7934..0000000 --- a/dsp/lib/sprout/sprout/predef/compiler/metrowerks.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_COMPILER_METROWERKS_HPP -#define SPROUT_PREDEF_COMPILER_METROWERKS_HPP - -#include -#include -#include - -#define SPROUT_COMP_MWERKS 0 - -#if defined(__MWERKS__) || defined(__CWCC__) -# if !defined(SPROUT_COMP_MWERKS_DETECTION) && defined(__CWCC__) -# define SPROUT_COMP_MWERKS_DETECTION SPROUT_PREDEF_MAKE_0X_VRPP(__CWCC__) -# endif -# if !defined(SPROUT_COMP_MWERKS_DETECTION) && (__MWERKS__ >= 0x4200) -# define SPROUT_COMP_MWERKS_DETECTION SPROUT_PREDEF_MAKE_0X_VRPP(__MWERKS__) -# endif -# if !defined(SPROUT_COMP_MWERKS_DETECTION) && (__MWERKS__ >= 0x3204) -# define SPROUT_COMP_MWERKS_DETECTION SPROUT_VERSION_NUMBER(9, (__MWERKS__) % 100 - 1, 0) -# endif -# if !defined(SPROUT_COMP_MWERKS_DETECTION) && (__MWERKS__ >= 0x3200) -# define SPROUT_COMP_MWERKS_DETECTION SPROUT_VERSION_NUMBER(9, (__MWERKS__) % 100, 0) -# endif -# if !defined(SPROUT_COMP_MWERKS_DETECTION) && (__MWERKS__ >= 0x3000) -# define SPROUT_COMP_MWERKS_DETECTION SPROUT_VERSION_NUMBER(8, (__MWERKS__) % 100, 0) -# endif -# if !defined(SPROUT_COMP_MWERKS_DETECTION) -# define SPROUT_COMP_MWERKS_DETECTION 1 -# endif -#endif - -#ifdef SPROUT_COMP_MWERKS_DETECTION -# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) -# define SPROUT_COMP_MWERKS_EMULATED SPROUT_COMP_MWERKS_DETECTION -# else -# undef SPROUT_COMP_MWERKS -# define SPROUT_COMP_MWERKS SPROUT_COMP_MWERKS_DETECTION -# endif -# define SPROUT_COMP_MWERKS_AVAILABLE -# include -#endif - -#define SPROUT_COMP_MWERKS_NAME "Metrowerks CodeWarrior" - -#endif //#ifndef SPROUT_PREDEF_COMPILER_METROWERKS_HPP diff --git a/dsp/lib/sprout/sprout/predef/compiler/microtec.hpp b/dsp/lib/sprout/sprout/predef/compiler/microtec.hpp deleted file mode 100644 index a48bc11..0000000 --- a/dsp/lib/sprout/sprout/predef/compiler/microtec.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_COMPILER_MICROTEC_HPP -#define SPROUT_PREDEF_COMPILER_MICROTEC_HPP - -#include - -#define SPROUT_COMP_MRI 0 - -#if defined(_MRI) -# define SPROUT_COMP_MRI_DETECTION 1 -#endif - -#ifdef SPROUT_COMP_MRI_DETECTION -# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) -# define SPROUT_COMP_MRI_EMULATED SPROUT_COMP_MRI_DETECTION -# else -# undef SPROUT_COMP_MRI -# define SPROUT_COMP_MRI SPROUT_COMP_MRI_DETECTION -# endif -# define SPROUT_COMP_MRI_AVAILABLE -# include -#endif - -#define SPROUT_COMP_MRI_NAME "Microtec C/C++" - -#endif //#ifndef SPROUT_PREDEF_COMPILER_MICROTEC_HPP diff --git a/dsp/lib/sprout/sprout/predef/compiler/mpw.hpp b/dsp/lib/sprout/sprout/predef/compiler/mpw.hpp deleted file mode 100644 index 547548d..0000000 --- a/dsp/lib/sprout/sprout/predef/compiler/mpw.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_COMPILER_MPW_HPP -#define SPROUT_PREDEF_COMPILER_MPW_HPP - -#include -#include - -#define SPROUT_COMP_MPW 0 - -#if defined(__MRC__) || defined(MPW_C) || defined(MPW_CPLUS) -# if !defined(SPROUT_COMP_MPW_DETECTION) && defined(__MRC__) -# define SPROUT_COMP_MPW_DETECTION SPROUT_PREDEF_MAKE_0X_VVRR(__MRC__) -# endif -# if !defined(SPROUT_COMP_MPW_DETECTION) -# define SPROUT_COMP_MPW_DETECTION 1 -# endif -#endif - -#ifdef SPROUT_COMP_MPW_DETECTION -# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) -# define SPROUT_COMP_MPW_EMULATED SPROUT_COMP_MPW_DETECTION -# else -# undef SPROUT_COMP_MPW -# define SPROUT_COMP_MPW SPROUT_COMP_MPW_DETECTION -# endif -# define SPROUT_COMP_MPW_AVAILABLE -# include -#endif - -#define SPROUT_COMP_MPW_NAME "MPW C++" - -#endif //#ifndef SPROUT_PREDEF_COMPILER_MPW_HPP diff --git a/dsp/lib/sprout/sprout/predef/compiler/palm.hpp b/dsp/lib/sprout/sprout/predef/compiler/palm.hpp deleted file mode 100644 index 7fc32f2..0000000 --- a/dsp/lib/sprout/sprout/predef/compiler/palm.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_COMPILER_PALM_HPP -#define SPROUT_PREDEF_COMPILER_PALM_HPP - -#include -#include - -#define SPROUT_COMP_PALM 0 - -#if defined(_PACC_VER) -# define SPROUT_COMP_PALM_DETECTION SPROUT_PREDEF_MAKE_0X_VRRPP000(_PACC_VER) -#endif - -#ifdef SPROUT_COMP_PALM_DETECTION -# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) -# define SPROUT_COMP_PALM_EMULATED SPROUT_COMP_PALM_DETECTION -# else -# undef SPROUT_COMP_PALM -# define SPROUT_COMP_PALM SPROUT_COMP_PALM_DETECTION -# endif -# define SPROUT_COMP_PALM_AVAILABLE -# include -#endif - -#define SPROUT_COMP_PALM_NAME "Palm C/C++" - -#endif //#ifndef SPROUT_PREDEF_COMPILER_PALM_HPP diff --git a/dsp/lib/sprout/sprout/predef/compiler/pgi.hpp b/dsp/lib/sprout/sprout/predef/compiler/pgi.hpp deleted file mode 100644 index 7be0bdd..0000000 --- a/dsp/lib/sprout/sprout/predef/compiler/pgi.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_COMPILER_PGI_HPP -#define SPROUT_PREDEF_COMPILER_PGI_HPP - -#include -#include - -#define SPROUT_COMP_PGI 0 - -#if defined(__PGI) -# if !defined(SPROUT_COMP_PGI_DETECTION) && (defined(__PGIC__) && defined(__PGIC_MINOR__) && defined(__PGIC_PATCHLEVEL__)) -# define SPROUT_COMP_PGI_DETECTION SPROUT_VERSION_NUMBER(__PGIC__, __PGIC_MINOR__, __PGIC_PATCHLEVEL__) -# endif -# if !defined(SPROUT_COMP_PGI_DETECTION) -# define SPROUT_COMP_PGI_DETECTION 1 -# endif -#endif - -#ifdef SPROUT_COMP_PGI_DETECTION -# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) -# define SPROUT_COMP_PGI_EMULATED SPROUT_COMP_PGI_DETECTION -# else -# undef SPROUT_COMP_PGI -# define SPROUT_COMP_PGI SPROUT_COMP_PGI_DETECTION -# endif -# define SPROUT_COMP_PGI_AVAILABLE -# include -#endif - -#define SPROUT_COMP_PGI_NAME "Portland Group C/C++" - -#endif //#ifndef SPROUT_PREDEF_COMPILER_PGI_HPP diff --git a/dsp/lib/sprout/sprout/predef/compiler/sgi_mipspro.hpp b/dsp/lib/sprout/sprout/predef/compiler/sgi_mipspro.hpp deleted file mode 100644 index 396aeab..0000000 --- a/dsp/lib/sprout/sprout/predef/compiler/sgi_mipspro.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_COMPILER_SGI_MIPSPRO_HPP -#define SPROUT_PREDEF_COMPILER_SGI_MIPSPRO_HPP - -#include -#include - -#define SPROUT_COMP_SGI 0 - -#if defined(__sgi) || defined(sgi) -# if !defined(SPROUT_COMP_SGI_DETECTION) && defined(_SGI_COMPILER_VERSION) -# define SPROUT_COMP_SGI_DETECTION SPROUT_PREDEF_MAKE_10_VRP(_SGI_COMPILER_VERSION) -# endif -# if !defined(SPROUT_COMP_SGI_DETECTION) && defined(_COMPILER_VERSION) -# define SPROUT_COMP_SGI_DETECTION SPROUT_PREDEF_MAKE_10_VRP(_COMPILER_VERSION) -# endif -# if !defined(SPROUT_COMP_SGI_DETECTION) -# define SPROUT_COMP_SGI_DETECTION 1 -# endif -#endif - -#ifdef SPROUT_COMP_SGI_DETECTION -# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) -# define SPROUT_COMP_SGI_EMULATED SPROUT_COMP_SGI_DETECTION -# else -# undef SPROUT_COMP_SGI -# define SPROUT_COMP_SGI SPROUT_COMP_SGI_DETECTION -# endif -# define SPROUT_COMP_SGI_AVAILABLE -# include -#endif - -#define SPROUT_COMP_SGI_NAME "SGI MIPSpro" - -#endif //#ifndef SPROUT_PREDEF_COMPILER_SGI_MIPSPRO_HPP diff --git a/dsp/lib/sprout/sprout/predef/compiler/sunpro.hpp b/dsp/lib/sprout/sprout/predef/compiler/sunpro.hpp deleted file mode 100644 index d4dadcd..0000000 --- a/dsp/lib/sprout/sprout/predef/compiler/sunpro.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_COMPILER_SUNPRO_HPP -#define SPROUT_PREDEF_COMPILER_SUNPRO_HPP - -#include -#include - -#define SPROUT_COMP_SUNPRO 0 - -#if defined(__SUNPRO_CC) || defined(__SUNPRO_C) -# if !defined(SPROUT_COMP_SUNPRO_DETECTION) && defined(__SUNPRO_CC) -# if (__SUNPRO_CC < 0x5100) -# define SPROUT_COMP_SUNPRO_DETECTION SPROUT_PREDEF_MAKE_0X_VRP(__SUNPRO_CC) -# else -# define SPROUT_COMP_SUNPRO_DETECTION SPROUT_PREDEF_MAKE_0X_VVRRP(__SUNPRO_CC) -# endif -# endif -# if !defined(SPROUT_COMP_SUNPRO_DETECTION) && defined(__SUNPRO_C) -# if (__SUNPRO_C < 0x5100) -# define SPROUT_COMP_SUNPRO_DETECTION SPROUT_PREDEF_MAKE_0X_VRP(__SUNPRO_C) -# else -# define SPROUT_COMP_SUNPRO_DETECTION SPROUT_PREDEF_MAKE_0X_VVRRP(__SUNPRO_C) -# endif -# endif -# if !defined(SPROUT_COMP_SUNPRO_DETECTION) -# define SPROUT_COMP_SUNPRO_DETECTION 1 -# endif -#endif - -#ifdef SPROUT_COMP_SUNPRO_DETECTION -# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) -# define SPROUT_COMP_SUNPRO_EMULATED SPROUT_COMP_SUNPRO_DETECTION -# else -# undef SPROUT_COMP_SUNPRO -# define SPROUT_COMP_SUNPRO SPROUT_COMP_SUNPRO_DETECTION -# endif -# define SPROUT_COMP_SUNPRO_AVAILABLE -# include -#endif - -#define SPROUT_COMP_SUNPRO_NAME "Oracle Solaris Studio" - -#endif //#ifndef SPROUT_PREDEF_COMPILER_SUNPRO_HPP diff --git a/dsp/lib/sprout/sprout/predef/compiler/tendra.hpp b/dsp/lib/sprout/sprout/predef/compiler/tendra.hpp deleted file mode 100644 index 67e0451..0000000 --- a/dsp/lib/sprout/sprout/predef/compiler/tendra.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_COMPILER_TENDRA_HPP -#define SPROUT_PREDEF_COMPILER_TENDRA_HPP - -#include - -#define SPROUT_COMP_TENDRA 0 - -#if defined(__TenDRA__) -# define SPROUT_COMP_TENDRA_DETECTION 1 -#endif - -#ifdef SPROUT_COMP_TENDRA_DETECTION -# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) -# define SPROUT_COMP_TENDRA_EMULATED SPROUT_COMP_TENDRA_DETECTION -# else -# undef SPROUT_COMP_TENDRA -# define SPROUT_COMP_TENDRA SPROUT_COMP_TENDRA_DETECTION -# endif -# define SPROUT_COMP_TENDRA_AVAILABLE -# include -#endif - -#define SPROUT_COMP_TENDRA_NAME "TenDRA C/C++" - -#endif //#ifndef SPROUT_PREDEF_COMPILER_TENDRA_HPP diff --git a/dsp/lib/sprout/sprout/predef/compiler/visualc.hpp b/dsp/lib/sprout/sprout/predef/compiler/visualc.hpp deleted file mode 100644 index ffe1bc7..0000000 --- a/dsp/lib/sprout/sprout/predef/compiler/visualc.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_COMPILER_VISUALC_HPP -#define SPROUT_PREDEF_COMPILER_VISUALC_HPP - -#include -#include -#include - -#define SPROUT_COMP_MSVC 0 - -#if defined(_MSC_VER) -# if !defined (_MSC_FULL_VER) -# define SPROUT_COMP_MSVC_BUILD 0 -# else -# if _MSC_FULL_VER / 10000 == _MSC_VER -# define SPROUT_COMP_MSVC_BUILD (_MSC_FULL_VER % 10000) -# elif _MSC_FULL_VER / 100000 == _MSC_VER -# define SPROUT_COMP_MSVC_BUILD (_MSC_FULL_VER % 100000) -# else -# error "Cannot determine build number from _MSC_FULL_VER" -# endif -# endif -# if (_MSC_VER >= 1900) -# define SPROUT_COMP_MSVC_DETECTION \ - SPROUT_VERSION_NUMBER(_MSC_VER / 100 - 5, _MSC_VER % 100, SPROUT_COMP_MSVC_BUILD) -# else -# define SPROUT_COMP_MSVC_DETECTION \ - SPROUT_VERSION_NUMBER(_MSC_VER / 100 - 6, _MSC_VER % 100, SPROUT_COMP_MSVC_BUILD) -# endif -#endif - -#ifdef SPROUT_COMP_MSVC_DETECTION -# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) -# define SPROUT_COMP_MSVC_EMULATED SPROUT_COMP_MSVC_DETECTION -# else -# undef SPROUT_COMP_MSVC -# define SPROUT_COMP_MSVC SPROUT_COMP_MSVC_DETECTION -# endif -# define SPROUT_COMP_MSVC_AVAILABLE -# include -#endif - -#define SPROUT_COMP_MSVC_NAME "Microsoft Visual C/C++" - -#endif //#ifndef SPROUT_PREDEF_COMPILER_VISUALC_HPP diff --git a/dsp/lib/sprout/sprout/predef/compiler/watcom.hpp b/dsp/lib/sprout/sprout/predef/compiler/watcom.hpp deleted file mode 100644 index ed2c09e..0000000 --- a/dsp/lib/sprout/sprout/predef/compiler/watcom.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_COMPILER_WATCOM_HPP -#define SPROUT_PREDEF_COMPILER_WATCOM_HPP - -#include -#include - -#define SPROUT_COMP_WATCOM 0 - -#if defined(__WATCOMC__) -# define SPROUT_COMP_WATCOM_DETECTION SPROUT_PREDEF_MAKE_10_VVRR(__WATCOMC__) -#endif - -#ifdef SPROUT_COMP_WATCOM_DETECTION -# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) -# define SPROUT_COMP_WATCOM_EMULATED SPROUT_COMP_WATCOM_DETECTION -# else -# undef SPROUT_COMP_WATCOM -# define SPROUT_COMP_WATCOM SPROUT_COMP_WATCOM_DETECTION -# endif -# define SPROUT_COMP_WATCOM_AVAILABLE -# include -#endif - -#define SPROUT_COMP_WATCOM_NAME "Watcom C++" - -#endif //#ifndef SPROUT_PREDEF_COMPILER_WATCOM_HPP diff --git a/dsp/lib/sprout/sprout/predef/detail/comp_detected.hpp b/dsp/lib/sprout/sprout/predef/detail/comp_detected.hpp deleted file mode 100644 index 3b79de0..0000000 --- a/dsp/lib/sprout/sprout/predef/detail/comp_detected.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_DETAIL_COMP_DETECTED_HPP -#define SPROUT_PREDEF_DETAIL_COMP_DETECTED_HPP - -#include - -#ifndef SPROUT_PREDEF_DETAIL_COMP_DETECTED -# define SPROUT_PREDEF_DETAIL_COMP_DETECTED 1 -#endif - -#endif // #ifndef SPROUT_PREDEF_DETAIL_COMP_DETECTED_HPP diff --git a/dsp/lib/sprout/sprout/predef/detail/endian_compat.hpp b/dsp/lib/sprout/sprout/predef/detail/endian_compat.hpp deleted file mode 100644 index 7e403cc..0000000 --- a/dsp/lib/sprout/sprout/predef/detail/endian_compat.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_DETAIL_ENDIAN_COMPAT_HPP -#define SPROUT_PREDEF_DETAIL_ENDIAN_COMPAT_HPP - -#include -#include - -#if SPROUT_ENDIAN_BIG_BYTE -# define SPROUT_BIG_ENDIAN -# define SPROUT_BYTE_ORDER 4321 -#endif -#if SPROUT_ENDIAN_LITTLE_BYTE -# define SPROUT_LITTLE_ENDIAN -# define SPROUT_BYTE_ORDER 1234 -#endif -#if SPROUT_ENDIAN_LITTLE_WORD -# define SPROUT_PDP_ENDIAN -# define SPROUT_BYTE_ORDER 2134 -#endif - -#endif // #ifndef SPROUT_PREDEF_HPP diff --git a/dsp/lib/sprout/sprout/predef/detail/os_detected.hpp b/dsp/lib/sprout/sprout/predef/detail/os_detected.hpp deleted file mode 100644 index 7478a5e..0000000 --- a/dsp/lib/sprout/sprout/predef/detail/os_detected.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_DETAIL_OS_DETECTED_HPP -#define SPROUT_PREDEF_DETAIL_OS_DETECTED_HPP - -#include - -#ifndef SPROUT_PREDEF_DETAIL_OS_DETECTED -# define SPROUT_PREDEF_DETAIL_OS_DETECTED 1 -#endif - -#endif // #ifndef SPROUT_PREDEF_DETAIL_OS_DETECTED_HPP diff --git a/dsp/lib/sprout/sprout/predef/detail/platform_detected.hpp b/dsp/lib/sprout/sprout/predef/detail/platform_detected.hpp deleted file mode 100644 index 11860d8..0000000 --- a/dsp/lib/sprout/sprout/predef/detail/platform_detected.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_DETAIL_PLATFORM_DETECTED_HPP -#define SPROUT_PREDEF_DETAIL_PLATFORM_DETECTED_HPP - -#include - -#ifndef SPROUT_PREDEF_DETAIL_PLAT_DETECTED -# define SPROUT_PREDEF_DETAIL_PLAT_DETECTED 1 -#endif - -#endif // #ifndef SPROUT_PREDEF_DETAIL_PLATFORM_DETECTED_HPP diff --git a/dsp/lib/sprout/sprout/predef/hardware.hpp b/dsp/lib/sprout/sprout/predef/hardware.hpp deleted file mode 100644 index b52a33f..0000000 --- a/dsp/lib/sprout/sprout/predef/hardware.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_HARDWARE_HPP -#define SPROUT_PREDEF_HARDWARE_HPP - -#include -#include - -#endif // #ifndef SPROUT_PREDEF_HARDWARE_HPP diff --git a/dsp/lib/sprout/sprout/predef/hardware/simd.hpp b/dsp/lib/sprout/sprout/predef/hardware/simd.hpp deleted file mode 100644 index 0e81d8f..0000000 --- a/dsp/lib/sprout/sprout/predef/hardware/simd.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_HARDWARE_SIMD_HPP -#define SPROUT_PREDEF_HARDWARE_SIMD_HPP - -#include -#include -#include -#include -#include - -#if defined(SPROUT_HW_SIMD_ARM_AVAILABLE) && defined(SPROUT_HW_SIMD_PPC_AVAILABLE) \ - || defined(SPROUT_HW_SIMD_ARM_AVAILABLE) && defined(SPROUT_HW_SIMD_X86_AVAILABLE) \ - || defined(SPROUT_HW_SIMD_PPC_AVAILABLE) && defined(SPROUT_HW_SIMD_X86_AVAILABLE) -# error "Multiple SIMD architectures detected, this cannot happen!" -#endif - -#if defined(SPROUT_HW_SIMD_X86_AVAILABLE) -# define SPROUT_HW_SIMD SPROUT_HW_SIMD_X86 -#endif - -#if defined(SPROUT_HW_SIMD_X86_AMD_AVAILABLE) -# define SPROUT_HW_SIMD SPROUT_HW_SIMD_X86_AMD -#endif - -#if defined(SPROUT_HW_SIMD_ARM_AVAILABLE) -# define SPROUT_HW_SIMD SPROUT_HW_SIMD_ARM -#endif - -#if defined(SPROUT_HW_SIMD_PPC_AVAILABLE) -# define SPROUT_HW_SIMD SPROUT_HW_SIMD_PPC -#endif - -#if defined(SPROUT_HW_SIMD) -# define SPROUT_HW_SIMD_AVAILABLE -#else -# define SPROUT_HW_SIMD 0 -#endif - -#define SPROUT_HW_SIMD_NAME "Hardware SIMD" - -#endif // #ifndef SPROUT_PREDEF_HARDWARE_SIMD_HPP diff --git a/dsp/lib/sprout/sprout/predef/hardware/simd/arm.hpp b/dsp/lib/sprout/sprout/predef/hardware/simd/arm.hpp deleted file mode 100644 index 300c6ef..0000000 --- a/dsp/lib/sprout/sprout/predef/hardware/simd/arm.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_HARDWARE_SIMD_ARM_HPP -#define SPROUT_PREDEF_HARDWARE_SIMD_ARM_HPP - -#include -#include - -#define SPROUT_HW_SIMD_ARM 0 - -#undef SPROUT_HW_SIMD_ARM -#if !defined(SPROUT_HW_SIMD_ARM) && (defined(__ARM_NEON__) || defined(__aarch64__) || defined (_M_ARM)) -# define SPROUT_HW_SIMD_ARM SPROUT_HW_SIMD_ARM_NEON_VERSION -#endif - -#if !defined(SPROUT_HW_SIMD_ARM) -# define SPROUT_HW_SIMD_ARM 0 -#else -# define SPROUT_HW_SIMD_ARM_AVAILABLE -#endif - -#define SPROUT_HW_SIMD_ARM_NAME "ARM SIMD" - -#endif // #ifndef SPROUT_PREDEF_HARDWARE_SIMD_ARM_HPP diff --git a/dsp/lib/sprout/sprout/predef/hardware/simd/arm/versions.hpp b/dsp/lib/sprout/sprout/predef/hardware/simd/arm/versions.hpp deleted file mode 100644 index d58f8c2..0000000 --- a/dsp/lib/sprout/sprout/predef/hardware/simd/arm/versions.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_HARDWARE_SIMD_ARM_VERSIONS_HPP -#define SPROUT_PREDEF_HARDWARE_SIMD_ARM_VERSIONS_HPP - -#include -#include - -#define SPROUT_HW_SIMD_ARM_NEON_VERSION SPROUT_VERSION_NUMBER(1, 0, 0) - -#endif // #ifndef SPROUT_PREDEF_HARDWARE_SIMD_ARM_VERSIONS_HPP diff --git a/dsp/lib/sprout/sprout/predef/hardware/simd/ppc.hpp b/dsp/lib/sprout/sprout/predef/hardware/simd/ppc.hpp deleted file mode 100644 index bb52c2f..0000000 --- a/dsp/lib/sprout/sprout/predef/hardware/simd/ppc.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_HARDWARE_SIMD_PPC_HPP -#define SPROUT_PREDEF_HARDWARE_SIMD_PPC_HPP - -#include -#include - -#define SPROUT_HW_SIMD_PPC 0 - -#undef SPROUT_HW_SIMD_PPC -#if !defined(SPROUT_HW_SIMD_PPC) && defined(__VECTOR4DOUBLE__) -# define SPROUT_HW_SIMD_PPC SPROUT_HW_SIMD_PPC_QPX_VERSION -#endif -#if !defined(SPROUT_HW_SIMD_PPC) && defined(__VSX__) -# define SPROUT_HW_SIMD_PPC SPROUT_HW_SIMD_PPC_VSX_VERSION -#endif -#if !defined(SPROUT_HW_SIMD_PPC) && (defined(__ALTIVEC__) || defined(__VEC__)) -# define SPROUT_HW_SIMD_PPC SPROUT_HW_SIMD_PPC_VMX_VERSION -#endif - -#if !defined(SPROUT_HW_SIMD_PPC) -# define SPROUT_HW_SIMD_PPC 0 -#else -# define SPROUT_HW_SIMD_PPC_AVAILABLE -#endif - -#define SPROUT_HW_SIMD_PPC_NAME "PPC SIMD" - -#endif // #ifndef SPROUT_PREDEF_HARDWARE_SIMD_PPC_HPP diff --git a/dsp/lib/sprout/sprout/predef/hardware/simd/ppc/versions.hpp b/dsp/lib/sprout/sprout/predef/hardware/simd/ppc/versions.hpp deleted file mode 100644 index 80626f0..0000000 --- a/dsp/lib/sprout/sprout/predef/hardware/simd/ppc/versions.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_HARDWARE_SIMD_PPC_VERSIONS_HPP -#define SPROUT_PREDEF_HARDWARE_SIMD_PPC_VERSIONS_HPP - -#include -#include - -#define SPROUT_HW_SIMD_PPC_VMX_VERSION SPROUT_VERSION_NUMBER(1, 0, 0) - -#define SPROUT_HW_SIMD_PPC_VSX_VERSION SPROUT_VERSION_NUMBER(1, 1, 0) - -#define SPROUT_HW_SIMD_PPC_QPX_VERSION SPROUT_VERSION_NUMBER(2, 0, 0) - -#endif // #ifndef SPROUT_PREDEF_HARDWARE_SIMD_PPC_VERSIONS_HPP diff --git a/dsp/lib/sprout/sprout/predef/hardware/simd/x86.hpp b/dsp/lib/sprout/sprout/predef/hardware/simd/x86.hpp deleted file mode 100644 index ae0c7fa..0000000 --- a/dsp/lib/sprout/sprout/predef/hardware/simd/x86.hpp +++ /dev/null @@ -1,59 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_HARDWARE_SIMD_X86_HPP -#define SPROUT_PREDEF_HARDWARE_SIMD_X86_HPP - -#include -#include - -#define SPROUT_HW_SIMD_X86 0 - -#undef SPROUT_HW_SIMD_X86 -#if !defined(SPROUT_HW_SIMD_X86) && defined(__MIC__) -# define SPROUT_HW_SIMD_X86 SPROUT_HW_SIMD_X86_MIC_VERSION -#endif -#if !defined(SPROUT_HW_SIMD_X86) && defined(__AVX2__) -# define SPROUT_HW_SIMD_X86 SPROUT_HW_SIMD_X86_AVX2_VERSION -#endif -#if !defined(SPROUT_HW_SIMD_X86) && defined(__AVX__) -# define SPROUT_HW_SIMD_X86 SPROUT_HW_SIMD_X86_AVX_VERSION -#endif -#if !defined(SPROUT_HW_SIMD_X86) && defined(__FMA__) -# define SPROUT_HW_SIMD_X86 SPROUT_HW_SIMD_X86_FMA_VERSION -#endif -#if !defined(SPROUT_HW_SIMD_X86) && defined(__SSE4_2__) -# define SPROUT_HW_SIMD_X86 SPROUT_HW_SIMD_X86_SSE4_2_VERSION -#endif -#if !defined(SPROUT_HW_SIMD_X86) && defined(__SSE4_1__) -# define SPROUT_HW_SIMD_X86 SPROUT_HW_SIMD_X86_SSE4_1_VERSION -#endif -#if !defined(SPROUT_HW_SIMD_X86) && defined(__SSSE3__) -# define SPROUT_HW_SIMD_X86 SPROUT_HW_SIMD_X86_SSSE3_VERSION -#endif -#if !defined(SPROUT_HW_SIMD_X86) && defined(__SSE3__) -# define SPROUT_HW_SIMD_X86 SPROUT_HW_SIMD_X86_SSE3_VERSION -#endif -#if !defined(SPROUT_HW_SIMD_X86) && (defined(__SSE2__) || defined(_M_X64) || _M_IX86_FP >= 2) -# define SPROUT_HW_SIMD_X86 SPROUT_HW_SIMD_X86_SSE2_VERSION -#endif -#if !defined(SPROUT_HW_SIMD_X86) && (defined(__SSE__) || defined(_M_X64) || _M_IX86_FP >= 1) -# define SPROUT_HW_SIMD_X86 SPROUT_HW_SIMD_X86_SSE_VERSION -#endif -#if !defined(SPROUT_HW_SIMD_X86) && defined(__MMX__) -# define SPROUT_HW_SIMD_X86 SPROUT_HW_SIMD_X86_MMX_VERSION -#endif - -#if !defined(SPROUT_HW_SIMD_X86) -# define SPROUT_HW_SIMD_X86 0 -#else -# define SPROUT_HW_SIMD_X86_AVAILABLE -#endif - -#define SPROUT_HW_SIMD_X86_NAME "x86 SIMD" - -#endif // #ifndef SPROUT_PREDEF_HARDWARE_SIMD_X86_HPP diff --git a/dsp/lib/sprout/sprout/predef/hardware/simd/x86/versions.hpp b/dsp/lib/sprout/sprout/predef/hardware/simd/x86/versions.hpp deleted file mode 100644 index 9c22dca..0000000 --- a/dsp/lib/sprout/sprout/predef/hardware/simd/x86/versions.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_HARDWARE_SIMD_X86_VERSIONS_HPP -#define SPROUT_PREDEF_HARDWARE_SIMD_X86_VERSIONS_HPP - -#include -#include - -#define SPROUT_HW_SIMD_X86_MMX_VERSION SPROUT_VERSION_NUMBER(0, 99, 0) - -#define SPROUT_HW_SIMD_X86_SSE_VERSION SPROUT_VERSION_NUMBER(1, 0, 0) - -#define SPROUT_HW_SIMD_X86_SSE2_VERSION SPROUT_VERSION_NUMBER(2, 0, 0) - -#define SPROUT_HW_SIMD_X86_SSE3_VERSION SPROUT_VERSION_NUMBER(3, 0, 0) - -#define SPROUT_HW_SIMD_X86_SSSE3_VERSION SPROUT_VERSION_NUMBER(3, 1, 0) - -#define SPROUT_HW_SIMD_X86_SSE4_1_VERSION SPROUT_VERSION_NUMBER(4, 1, 0) - -#define SPROUT_HW_SIMD_X86_SSE4_2_VERSION SPROUT_VERSION_NUMBER(4, 2, 0) - -#define SPROUT_HW_SIMD_X86_AVX_VERSION SPROUT_VERSION_NUMBER(5, 0, 0) - -#define SPROUT_HW_SIMD_X86_FMA3_VERSION SPROUT_VERSION_NUMBER(5, 2, 0) - -#define SPROUT_HW_SIMD_X86_AVX2_VERSION SPROUT_VERSION_NUMBER(5, 3, 0) - -#define SPROUT_HW_SIMD_X86_MIC_VERSION SPROUT_VERSION_NUMBER(9, 0, 0) - -#endif // #ifndef SPROUT_PREDEF_HARDWARE_SIMD_X86_VERSIONS_HPP diff --git a/dsp/lib/sprout/sprout/predef/hardware/simd/x86_amd.hpp b/dsp/lib/sprout/sprout/predef/hardware/simd/x86_amd.hpp deleted file mode 100644 index 3a6330f..0000000 --- a/dsp/lib/sprout/sprout/predef/hardware/simd/x86_amd.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_HARDWARE_SIMD_X86_AMD_HPP -#define SPROUT_PREDEF_HARDWARE_SIMD_X86_AMD_HPP - -#include -#include - -#define SPROUT_HW_SIMD_X86_AMD 0 - -#undef SPROUT_HW_SIMD_X86_AMD -#if !defined(SPROUT_HW_SIMD_X86_AMD) && defined(__XOP__) -# define SPROUT_HW_SIMD_X86_AMD SPROUT_HW_SIMD_X86_AMD_XOP_VERSION -#endif -#if !defined(SPROUT_HW_SIMD_X86_AMD) && defined(__FMA4__) -# define SPROUT_HW_SIMD_X86_AMD SPROUT_HW_SIMD_X86_AMD_FMA4_VERSION -#endif -#if !defined(SPROUT_HW_SIMD_X86_AMD) && defined(__SSE4A__) -# define SPROUT_HW_SIMD_X86_AMD SPROUT_HW_SIMD_X86_AMD_SSE4A_VERSION -#endif - -#if !defined(SPROUT_HW_SIMD_X86_AMD) -# define SPROUT_HW_SIMD_X86_AMD 0 -#else -# include -# if SPROUT_HW_SIMD_X86 > SPROUT_HW_SIMD_X86_AMD -# undef SPROUT_HW_SIMD_X86_AMD -# define SPROUT_HW_SIMD_X86_AMD SPROUT_HW_SIMD_X86 -# endif -# define SPROUT_HW_SIMD_X86_AMD_AVAILABLE -#endif - -#define SPROUT_HW_SIMD_X86_AMD_NAME "x86 (AMD) SIMD" - -#endif // #ifndef SPROUT_PREDEF_HARDWARE_SIMD_X86_AMD_HPP diff --git a/dsp/lib/sprout/sprout/predef/hardware/simd/x86_amd/versions.hpp b/dsp/lib/sprout/sprout/predef/hardware/simd/x86_amd/versions.hpp deleted file mode 100644 index 823dce9..0000000 --- a/dsp/lib/sprout/sprout/predef/hardware/simd/x86_amd/versions.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_HARDWARE_SIMD_X86_AMD_VERSIONS_HPP -#define SPROUT_PREDEF_HARDWARE_SIMD_X86_AMD_VERSIONS_HPP - -#include -#include - -#define SPROUT_HW_SIMD_X86_AMD_SSE4A_VERSION SPROUT_VERSION_NUMBER(4, 0, 0) - -#define SPROUT_HW_SIMD_X86_AMD_FMA4_VERSION SPROUT_VERSION_NUMBER(5, 1, 0) - -#define SPROUT_HW_SIMD_X86_AMD_XOP_VERSION SPROUT_VERSION_NUMBER(5, 1, 1) - -#endif // #ifndef SPROUT_PREDEF_HARDWARE_SIMD_X86_AMD_VERSIONS_HPP diff --git a/dsp/lib/sprout/sprout/predef/language.hpp b/dsp/lib/sprout/sprout/predef/language.hpp deleted file mode 100644 index ae5c97b..0000000 --- a/dsp/lib/sprout/sprout/predef/language.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_LANGUAGE_HPP -#define SPROUT_PREDEF_LANGUAGE_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_PREDEF_LANGUAGE_HPP diff --git a/dsp/lib/sprout/sprout/predef/language/objc.hpp b/dsp/lib/sprout/sprout/predef/language/objc.hpp deleted file mode 100644 index 3307890..0000000 --- a/dsp/lib/sprout/sprout/predef/language/objc.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_LANGUAGE_OBJC_HPP -#define SPROUT_PREDEF_LANGUAGE_OBJC_HPP - -#include - -#define SPROUT_LANG_OBJC 0 - -#if defined(__OBJC__) -# undef SPROUT_LANG_OBJC -# define SPROUT_LANG_OBJC 1 -#endif - -#if SPROUT_LANG_OBJC -# define SPROUT_LANG_OBJC_AVAILABLE -#endif - -#define SPROUT_LANG_OBJC_NAME "Objective-C" - -#endif // #ifndef SPROUT_PREDEF_LANGUAGE_OBJC_HPP diff --git a/dsp/lib/sprout/sprout/predef/language/stdc.hpp b/dsp/lib/sprout/sprout/predef/language/stdc.hpp deleted file mode 100644 index 4d5d5e7..0000000 --- a/dsp/lib/sprout/sprout/predef/language/stdc.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_LANGUAGE_STDC_HPP -#define SPROUT_PREDEF_LANGUAGE_STDC_HPP - -#include -#include - -#define SPROUT_LANG_STDC 0 - -#if defined(__STDC__) -# undef SPROUT_LANG_STDC -# if defined(__STDC_VERSION__) -# if (__STDC_VERSION__ > 100) -# define SPROUT_LANG_STDC SPROUT_PREDEF_MAKE_YYYYMM(__STDC_VERSION__) -# else -# define SPROUT_LANG_STDC 1 -# endif -# else -# define SPROUT_LANG_STDC 1 -# endif -#endif - -#if SPROUT_LANG_STDC -# define SPROUT_LANG_STDC_AVAILABLE -#endif - -#define SPROUT_LANG_STDC_NAME "Standard C" - -#endif // #ifndef SPROUT_PREDEF_LANGUAGE_STDC_HPP diff --git a/dsp/lib/sprout/sprout/predef/language/stdcpp.hpp b/dsp/lib/sprout/sprout/predef/language/stdcpp.hpp deleted file mode 100644 index 952ec33..0000000 --- a/dsp/lib/sprout/sprout/predef/language/stdcpp.hpp +++ /dev/null @@ -1,61 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_LANGUAGE_STDCPP_HPP -#define SPROUT_PREDEF_LANGUAGE_STDCPP_HPP - -#include -#include - -#define SPROUT_LANG_STDCPP 0 - -#if defined(__cplusplus) -# undef SPROUT_LANG_STDCPP -# if (__cplusplus > 100) -# define SPROUT_LANG_STDCPP SPROUT_PREDEF_MAKE_YYYYMM(__cplusplus) -# else -# define SPROUT_LANG_STDCPP 1 -# endif -#endif - -#if SPROUT_LANG_STDCPP -# define SPROUT_LANG_STDCPP_AVAILABLE -#endif - -#define SPROUT_LANG_STDCPP_NAME "Standard C++" - -#define SPROUT_LANG_STDCPPCLI 0 - -#if defined(__cplusplus_cli) -# undef SPROUT_LANG_STDCPPCLI -# if (__cplusplus_cli > 100) -# define SPROUT_LANG_STDCPPCLI SPROUT_PREDEF_MAKE_YYYYMM(__cplusplus_cli) -# else -# define SPROUT_LANG_STDCPPCLI 1 -# endif -#endif - -#if SPROUT_LANG_STDCPPCLI -# define SPROUT_LANG_STDCPPCLI_AVAILABLE -#endif - -#define SPROUT_LANG_STDCPPCLI_NAME "Standard C++/CLI" - -#define SPROUT_LANG_STDECPP 0 - -#if defined(__embedded_cplusplus) -# undef SPROUT_LANG_STDECPP -# define SPROUT_LANG_STDECPP 1 -#endif - -#if SPROUT_LANG_STDECPP -# define SPROUT_LANG_STDECPP_AVAILABLE -#endif - -#define SPROUT_LANG_STDECPP_NAME "Standard Embedded C++" - -#endif // #ifndef SPROUT_PREDEF_LANGUAGE_STDCPP_HPP diff --git a/dsp/lib/sprout/sprout/predef/library.hpp b/dsp/lib/sprout/sprout/predef/library.hpp deleted file mode 100644 index 93c57fc..0000000 --- a/dsp/lib/sprout/sprout/predef/library.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_LIBRARY_HPP -#define SPROUT_PREDEF_LIBRARY_HPP - -#include -#include -#include - -#endif //#ifndef SPROUT_PREDEF_LIBRARY_HPP diff --git a/dsp/lib/sprout/sprout/predef/library/c.hpp b/dsp/lib/sprout/sprout/predef/library/c.hpp deleted file mode 100644 index fe50210..0000000 --- a/dsp/lib/sprout/sprout/predef/library/c.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_LIBRARY_C_HPP -#define SPROUT_PREDEF_LIBRARY_C_HPP - -#include -#include -#include -#include -#include -#include - -#endif //#ifndef SPROUT_PREDEF_LIBRARY_C_HPP diff --git a/dsp/lib/sprout/sprout/predef/library/c/gnu.hpp b/dsp/lib/sprout/sprout/predef/library/c/gnu.hpp deleted file mode 100644 index b76eb2f..0000000 --- a/dsp/lib/sprout/sprout/predef/library/c/gnu.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_LIBRARY_C_GNU_HPP -#define SPROUT_PREDEF_LIBRARY_C_GNU_HPP - -#include -#include -#include - -#if defined(__STDC__) -# include -#elif defined(__cplusplus) -# include -#endif - -#define SPROUT_LIB_C_GNU 0 - -#if defined(__GLIBC__) || defined(__GNU_LIBRARY__) -# undef SPROUT_LIB_C_GNU -# if defined(__GLIBC__) -# define SPROUT_LIB_C_GNU \ - SPROUT_VERSION_NUMBER(__GLIBC__, __GLIBC_MINOR__, 0) -# else -# define SPROUT_LIB_C_GNU \ - SPROUT_VERSION_NUMBER(__GNU_LIBRARY__, __GNU_LIBRARY_MINOR__, 0) -# endif -#endif - -#if SPROUT_LIB_C_GNU -# define SPROUT_LIB_C_GNU_AVAILABLE -#endif - -#define SPROUT_LIB_C_GNU_NAME "GNU" - -#endif //#ifndef SPROUT_PREDEF_LIBRARY_C_GNU_HPP diff --git a/dsp/lib/sprout/sprout/predef/library/c/prefix.hpp b/dsp/lib/sprout/sprout/predef/library/c/prefix.hpp deleted file mode 100644 index 4c4e818..0000000 --- a/dsp/lib/sprout/sprout/predef/library/c/prefix.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_LIBRARY_C_PREFIX_HPP -#define SPROUT_PREDEF_LIBRARY_C_PREFIX_HPP - -#include -#include - -#endif //#ifndef SPROUT_PREDEF_LIBRARY_C_PREFIX_HPP diff --git a/dsp/lib/sprout/sprout/predef/library/c/uc.hpp b/dsp/lib/sprout/sprout/predef/library/c/uc.hpp deleted file mode 100644 index ab7d821..0000000 --- a/dsp/lib/sprout/sprout/predef/library/c/uc.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_LIBRARY_C_UC_HPP -#define SPROUT_PREDEF_LIBRARY_C_UC_HPP - -#include -#include -#include - -#define SPROUT_LIB_C_UC 0 - -#if defined(__UCLIBC__) -# undef SPROUT_LIB_C_UC -# define SPROUT_LIB_C_UC \ - SPROUT_VERSION_NUMBER(__UCLIBC_MAJOR__, __UCLIBC_MINOR__, __UCLIBC_SUBLEVEL__) -#endif - -#if SPROUT_LIB_C_UC -# define SPROUT_LIB_C_UC_AVAILABLE -#endif - -#define SPROUT_LIB_C_UC_NAME "uClibc" - -#endif //#ifndef SPROUT_PREDEF_LIBRARY_C_UC_HPP diff --git a/dsp/lib/sprout/sprout/predef/library/c/vms.hpp b/dsp/lib/sprout/sprout/predef/library/c/vms.hpp deleted file mode 100644 index 06c903e..0000000 --- a/dsp/lib/sprout/sprout/predef/library/c/vms.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_LIBRARY_C_VMS_HPP -#define SPROUT_PREDEF_LIBRARY_C_VMS_HPP - -#include -#include -#include - -#define SPROUT_LIB_C_VMS 0 - -#if defined(__CRTL_VER) -# undef SPROUT_LIB_C_VMS -# define SPROUT_LIB_C_VMS SPROUT_PREDEF_MAKE_10_VVRR0PP00(__CRTL_VER) -#endif - -#if SPROUT_LIB_C_VMS -# define SPROUT_LIB_C_VMS_AVAILABLE -#endif - -#define SPROUT_LIB_C_VMS_NAME "VMS" - -#endif //#ifndef SPROUT_PREDEF_LIBRARY_C_VMS_HPP diff --git a/dsp/lib/sprout/sprout/predef/library/c/zos.hpp b/dsp/lib/sprout/sprout/predef/library/c/zos.hpp deleted file mode 100644 index d5a95f8..0000000 --- a/dsp/lib/sprout/sprout/predef/library/c/zos.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_LIBRARY_C_ZOS_HPP -#define SPROUT_PREDEF_LIBRARY_C_ZOS_HPP - -#include -#include -#include - -#define SPROUT_LIB_C_ZOS 0 - -#if defined(__LIBREL__) -# undef SPROUT_LIB_C_ZOS -# if !defined(SPROUT_LIB_C_ZOS) && defined(__LIBREL__) -# define SPROUT_LIB_C_ZOS SPROUT_PREDEF_MAKE_0X_VRRPPPP(__LIBREL__) -# endif -# if !defined(SPROUT_LIB_C_ZOS) && defined(__TARGET_LIB__) -# define SPROUT_LIB_C_ZOS SPROUT_PREDEF_MAKE_0X_VRRPPPP(__TARGET_LIB__) -# endif -# if !defined(SPROUT_LIB_C_ZOS) -# define SPROUT_LIB_C_ZOS 1 -# endif -#endif - -#if SPROUT_LIB_C_ZOS -# define SPROUT_LIB_C_ZOS_AVAILABLE -#endif - -#define SPROUT_LIB_C_ZOS_NAME "z/OS" - -#endif //#ifndef SPROUT_PREDEF_LIBRARY_C_ZOS_HPP diff --git a/dsp/lib/sprout/sprout/predef/library/std.hpp b/dsp/lib/sprout/sprout/predef/library/std.hpp deleted file mode 100644 index a4b1afa..0000000 --- a/dsp/lib/sprout/sprout/predef/library/std.hpp +++ /dev/null @@ -1,24 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_LIBRARY_STD_HPP -#define SPROUT_PREDEF_LIBRARY_STD_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif //#ifndef SPROUT_PREDEF_LIBRARY_STD_HPP diff --git a/dsp/lib/sprout/sprout/predef/library/std/cxx.hpp b/dsp/lib/sprout/sprout/predef/library/std/cxx.hpp deleted file mode 100644 index 594dac8..0000000 --- a/dsp/lib/sprout/sprout/predef/library/std/cxx.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_LIBRARY_STD_CXX_HPP -#define SPROUT_PREDEF_LIBRARY_STD_CXX_HPP - -#include -#include -#include - -#define SPROUT_LIB_STD_CXX 0 - -#if defined(_LIBCPP_VERSION) -# undef SPROUT_LIB_STD_CXX -# define SPROUT_LIB_STD_CXX SPROUT_PREDEF_MAKE_10_VPPP(_LIBCPP_VERSION) -#endif - -#if SPROUT_LIB_STD_CXX -# define SPROUT_LIB_STD_CXX_AVAILABLE -#endif - -#define SPROUT_LIB_STD_CXX_NAME "libc++" - -#endif //#ifndef SPROUT_PREDEF_LIBRARY_STD_CXX_HPP diff --git a/dsp/lib/sprout/sprout/predef/library/std/dinkumware.hpp b/dsp/lib/sprout/sprout/predef/library/std/dinkumware.hpp deleted file mode 100644 index 01a8237..0000000 --- a/dsp/lib/sprout/sprout/predef/library/std/dinkumware.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_LIBRARY_STD_DINKUMWARE_HPP -#define SPROUT_PREDEF_LIBRARY_STD_DINKUMWARE_HPP - -#include -#include -#include - -#define SPROUT_LIB_STD_DINKUMWARE 0 - -#if (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER) -# undef SPROUT_LIB_STD_DINKUMWARE -# if defined(_CPPLIB_VER) -# define SPROUT_LIB_STD_DINKUMWARE SPROUT_PREDEF_MAKE_10_VVRR(_CPPLIB_VER) -# else -# define SPROUT_LIB_STD_DINKUMWARE 1 -# endif -#endif - -#if SPROUT_LIB_STD_DINKUMWARE -# define SPROUT_LIB_STD_DINKUMWARE_AVAILABLE -#endif - -#define SPROUT_LIB_STD_DINKUMWARE_NAME "Dinkumware" - -#endif //#ifndef SPROUT_PREDEF_LIBRARY_STD_DINKUMWARE_HPP diff --git a/dsp/lib/sprout/sprout/predef/library/std/libcomo.hpp b/dsp/lib/sprout/sprout/predef/library/std/libcomo.hpp deleted file mode 100644 index e4ae0c8..0000000 --- a/dsp/lib/sprout/sprout/predef/library/std/libcomo.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_LIBRARY_STD_LIBCOMO_HPP -#define SPROUT_PREDEF_LIBRARY_STD_LIBCOMO_HPP - -#include -#include -#include - -#define SPROUT_LIB_STD_COMO 0 - -#if defined(__LIBCOMO__) -# undef SPROUT_LIB_STD_COMO -# define SPROUT_LIB_STD_COMO SPROUT_VERSION_NUMBER(__LIBCOMO_VERSION__, 0, 0) -#endif - -#if SPROUT_LIB_STD_COMO -# define SPROUT_LIB_STD_COMO_AVAILABLE -#endif - -#define SPROUT_LIB_STD_COMO_NAME "Comeau Computing" - -#endif //#ifndef SPROUT_PREDEF_LIBRARY_STD_LIBCOMO_HPP diff --git a/dsp/lib/sprout/sprout/predef/library/std/modena.hpp b/dsp/lib/sprout/sprout/predef/library/std/modena.hpp deleted file mode 100644 index 4eebf4f..0000000 --- a/dsp/lib/sprout/sprout/predef/library/std/modena.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_LIBRARY_STD_MODENA_HPP -#define SPROUT_PREDEF_LIBRARY_STD_MODENA_HPP - -#include -#include - -#define SPROUT_LIB_STD_MSIPL 0 - -#if defined(MSIPL_COMPILE_H) || defined(__MSIPL_COMPILE_H) -# undef SPROUT_LIB_STD_MSIPL -# define SPROUT_LIB_STD_MSIPL 1 -#endif - -#if SPROUT_LIB_STD_MSIPL -# define SPROUT_LIB_STD_MSIPL_AVAILABLE -#endif - -#define SPROUT_LIB_STD_MSIPL_NAME "Modena Software Lib++" - -#endif //#ifndef SPROUT_PREDEF_LIBRARY_STD_MODENA_HPP diff --git a/dsp/lib/sprout/sprout/predef/library/std/msl.hpp b/dsp/lib/sprout/sprout/predef/library/std/msl.hpp deleted file mode 100644 index 4dcf35e..0000000 --- a/dsp/lib/sprout/sprout/predef/library/std/msl.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_LIBRARY_STD_MSL_HPP -#define SPROUT_PREDEF_LIBRARY_STD_MSL_HPP - -#include -#include -#include - -#define SPROUT_LIB_STD_MSL 0 - -#if defined(__MSL_CPP__) || defined(__MSL__) -# undef SPROUT_LIB_STD_MSL -# if defined(__MSL_CPP__) -# define SPROUT_LIB_STD_MSL SPROUT_PREDEF_MAKE_0X_VRPP(__MSL_CPP__) -# else -# define SPROUT_LIB_STD_MSL SPROUT_PREDEF_MAKE_0X_VRPP(__MSL__) -# endif -#endif - -#if SPROUT_LIB_STD_MSL -# define SPROUT_LIB_STD_MSL_AVAILABLE -#endif - -#define SPROUT_LIB_STD_MSL_NAME "Metrowerks" - -#endif //#ifndef SPROUT_PREDEF_LIBRARY_STD_MSL_HPP diff --git a/dsp/lib/sprout/sprout/predef/library/std/prefix.hpp b/dsp/lib/sprout/sprout/predef/library/std/prefix.hpp deleted file mode 100644 index 388d1ac..0000000 --- a/dsp/lib/sprout/sprout/predef/library/std/prefix.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_LIBRARY_STD_PREFIX_HPP -#define SPROUT_PREDEF_LIBRARY_STD_PREFIX_HPP - -#include -#include - -#endif //#ifndef SPROUT_PREDEF_LIBRARY_STD_PREFIX_HPP diff --git a/dsp/lib/sprout/sprout/predef/library/std/roguewave.hpp b/dsp/lib/sprout/sprout/predef/library/std/roguewave.hpp deleted file mode 100644 index 85d2aad..0000000 --- a/dsp/lib/sprout/sprout/predef/library/std/roguewave.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_LIBRARY_STD_ROGUEWAVE_HPP -#define SPROUT_PREDEF_LIBRARY_STD_ROGUEWAVE_HPP - -#include -#include -#include - -#define SPROUT_LIB_STD_RW 0 - -#if defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER) -# undef SPROUT_LIB_STD_RW -# if defined(_RWSTD_VER) -# if _RWSTD_VER < 0x010000 -# define SPROUT_LIB_STD_RW SPROUT_PREDEF_MAKE_0X_VVRRP(_RWSTD_VER) -# else -# define SPROUT_LIB_STD_RW SPROUT_PREDEF_MAKE_0X_VVRRPP(_RWSTD_VER) -# endif -# else -# define SPROUT_LIB_STD_RW 1 -# endif -#endif - -#if SPROUT_LIB_STD_RW -# define SPROUT_LIB_STD_RW_AVAILABLE -#endif - -#define SPROUT_LIB_STD_RW_NAME "Roguewave" - -#endif //#ifndef SPROUT_PREDEF_LIBRARY_STD_ROGUEWAVE_HPP diff --git a/dsp/lib/sprout/sprout/predef/library/std/sgi.hpp b/dsp/lib/sprout/sprout/predef/library/std/sgi.hpp deleted file mode 100644 index f925896..0000000 --- a/dsp/lib/sprout/sprout/predef/library/std/sgi.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_LIBRARY_STD_SGI_HPP -#define SPROUT_PREDEF_LIBRARY_STD_SGI_HPP - -#include -#include -#include - -#define SPROUT_LIB_STD_SGI 0 - -#if defined(__STL_CONFIG_H) -# undef SPROUT_LIB_STD_SGI -# if defined(__SGI_STL) -# define SPROUT_LIB_STD_SGI SPROUT_PREDEF_MAKE_0X_VRP(__SGI_STL) -# else -# define SPROUT_LIB_STD_SGI 1 -# endif -#endif - -#if SPROUT_LIB_STD_SGI -# define SPROUT_LIB_STD_SGI_AVAILABLE -#endif - -#define SPROUT_LIB_STD_SGI_NAME "SGI" - -#endif //#ifndef SPROUT_PREDEF_LIBRARY_STD_SGI_HPP diff --git a/dsp/lib/sprout/sprout/predef/library/std/stdcpp3.hpp b/dsp/lib/sprout/sprout/predef/library/std/stdcpp3.hpp deleted file mode 100644 index 6c012e7..0000000 --- a/dsp/lib/sprout/sprout/predef/library/std/stdcpp3.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_LIBRARY_STD_STDCPP3_HPP -#define SPROUT_PREDEF_LIBRARY_STD_STDCPP3_HPP - -#include -#include -#include - -#define SPROUT_LIB_STD_GNU 0 - -#if defined(__GLIBCPP__) || defined(__GLIBCXX__) -# undef SPROUT_LIB_STD_GNU -# if defined(__GLIBCXX__) -# define SPROUT_LIB_STD_GNU SPROUT_PREDEF_MAKE_YYYYMMDD(__GLIBCXX__) -# else -# define SPROUT_LIB_STD_GNU SPROUT_PREDEF_MAKE_YYYYMMDD(__GLIBCPP__) -# endif -#endif - -#if SPROUT_LIB_STD_GNU -# define SPROUT_LIB_STD_GNU_AVAILABLE -#endif - -#define SPROUT_LIB_STD_GNU_NAME "GNU" - -#endif //#ifndef SPROUT_PREDEF_LIBRARY_STD_STDCPP3_HPP diff --git a/dsp/lib/sprout/sprout/predef/library/std/stlport.hpp b/dsp/lib/sprout/sprout/predef/library/std/stlport.hpp deleted file mode 100644 index b639901..0000000 --- a/dsp/lib/sprout/sprout/predef/library/std/stlport.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_LIBRARY_STD_STLPORT_HPP -#define SPROUT_PREDEF_LIBRARY_STD_STLPORT_HPP - -#include -#include -#include -#include - -#define SPROUT_LIB_STD_STLPORT 0 - -#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) -# undef SPROUT_LIB_STD_STLPORT -# if !defined(SPROUT_LIB_STD_STLPORT) && defined(_STLPORT_MAJOR) -# define SPROUT_LIB_STD_STLPORT \ - SPROUT_VERSION_NUMBER(_STLPORT_MAJOR, _STLPORT_MINOR, _STLPORT_PATCHLEVEL) -# endif -# if !defined(SPROUT_LIB_STD_STLPORT) && defined(_STLPORT_VERSION) -# define SPROUT_LIB_STD_STLPORT SPROUT_PREDEF_MAKE_0X_VRP(_STLPORT_VERSION) -# endif -# if !defined(SPROUT_LIB_STD_STLPORT) -# define SPROUT_LIB_STD_STLPORT SPROUT_PREDEF_MAKE_0X_VRP(__SGI_STL_PORT) -# endif -#endif - -#if SPROUT_LIB_STD_STLPORT -# define SPROUT_LIB_STD_STLPORT_AVAILABLE -#endif - -#define SPROUT_LIB_STD_STLPORT_NAME "STLport" - -#endif //#ifndef SPROUT_PREDEF_LIBRARY_STD_STLPORT_HPP diff --git a/dsp/lib/sprout/sprout/predef/library/std/vacpp.hpp b/dsp/lib/sprout/sprout/predef/library/std/vacpp.hpp deleted file mode 100644 index 0067fe8..0000000 --- a/dsp/lib/sprout/sprout/predef/library/std/vacpp.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_LIBRARY_STD_VACPP_HPP -#define SPROUT_PREDEF_LIBRARY_STD_VACPP_HPP - -#include -#include - -#define SPROUT_LIB_STD_IBM 0 - -#if defined(__IBMCPP__) -# undef SPROUT_LIB_STD_IBM -# define SPROUT_LIB_STD_IBM 1 -#endif - -#if SPROUT_LIB_STD_IBM -# define SPROUT_LIB_STD_IBM_AVAILABLE -#endif - -#define SPROUT_LIB_STD_IBM_NAME "IBM VACPP" - -#endif //#ifndef SPROUT_PREDEF_LIBRARY_STD_VACPP_HPP diff --git a/dsp/lib/sprout/sprout/predef/make.hpp b/dsp/lib/sprout/sprout/predef/make.hpp deleted file mode 100644 index 8cb98cb..0000000 --- a/dsp/lib/sprout/sprout/predef/make.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_MAKE_HPP -#define SPROUT_PREDEF_MAKE_HPP - -#include -#include - -#define SPROUT_PREDEF_MAKE_0X_VRP(V) SPROUT_VERSION_NUMBER((V & 0xF00) >> 8, (V & 0xF0) >> 4, (V & 0xF)) -#define SPROUT_PREDEF_MAKE_0X_VVRP(V) SPROUT_VERSION_NUMBER((V & 0xFF00) >> 8, (V & 0xF0) >> 4, (V & 0xF)) -#define SPROUT_PREDEF_MAKE_0X_VRPP(V) SPROUT_VERSION_NUMBER((V & 0xF000) >> 12, (V & 0xF00) >> 8, (V & 0xFF)) -#define SPROUT_PREDEF_MAKE_0X_VVRR(V) SPROUT_VERSION_NUMBER((V & 0xFF00) >> 8, (V & 0xFF), 0) -#define SPROUT_PREDEF_MAKE_0X_VRRPPPP(V) SPROUT_VERSION_NUMBER((V & 0xF000000) >> 24, (V & 0xFF0000) >> 16, (V & 0xFFFF)) -#define SPROUT_PREDEF_MAKE_0X_VVRRP(V) SPROUT_VERSION_NUMBER((V & 0xFF000) >> 12, (V & 0xFF0) >> 4, (V & 0xF)) -#define SPROUT_PREDEF_MAKE_0X_VRRPP000(V) SPROUT_VERSION_NUMBER((V & 0xF0000000) >> 28, (V & 0xFF00000) >> 20, (V & 0xFF000) >> 12) -#define SPROUT_PREDEF_MAKE_0X_VVRRPP(V) SPROUT_VERSION_NUMBER((V & 0xFF0000) >> 16, (V & 0xFF00) >> 8, (V & 0xFF)) -#define SPROUT_PREDEF_MAKE_10_VPPP(V) SPROUT_VERSION_NUMBER(((V) / 1000) % 10, 0, (V) % 1000) -#define SPROUT_PREDEF_MAKE_10_VRP(V) SPROUT_VERSION_NUMBER(((V) / 100) % 10, ((V) / 10) % 10, (V) % 10) -#define SPROUT_PREDEF_MAKE_10_VRP000(V) SPROUT_VERSION_NUMBER(((V) / 100000) % 10, ((V) / 10000) % 10, ((V) / 1000) % 10) -#define SPROUT_PREDEF_MAKE_10_VRPP(V) SPROUT_VERSION_NUMBER(((V) / 1000) % 10, ((V) / 100) % 10, (V) % 100) -#define SPROUT_PREDEF_MAKE_10_VRR(V) SPROUT_VERSION_NUMBER(((V) / 100) % 10, (V) % 100, 0) -#define SPROUT_PREDEF_MAKE_10_VRRPP(V) SPROUT_VERSION_NUMBER(((V) / 10000) % 10, ((V) / 100) % 100, (V) % 100) -#define SPROUT_PREDEF_MAKE_10_VRR000(V) SPROUT_VERSION_NUMBER(((V) / 100000) % 10, ((V) / 1000) % 100, 0) -#define SPROUT_PREDEF_MAKE_10_VV00(V) SPROUT_VERSION_NUMBER(((V) / 100) % 100, 0, 0) -#define SPROUT_PREDEF_MAKE_10_VVRR(V) SPROUT_VERSION_NUMBER(((V) / 100) % 100, (V) % 100, 0) -#define SPROUT_PREDEF_MAKE_10_VVRRPP(V) SPROUT_VERSION_NUMBER(((V) / 10000) % 100, ((V) / 100) % 100, (V) % 100) -#define SPROUT_PREDEF_MAKE_10_VVRR0PP00(V) SPROUT_VERSION_NUMBER(((V) / 10000000) % 100, ((V) / 100000) % 100, ((V) / 100) % 100) -#define SPROUT_PREDEF_MAKE_10_VVRR0PPPP(V) SPROUT_VERSION_NUMBER(((V) / 10000000) % 100, ((V) / 100000) % 100, (V) % 10000) -#define SPROUT_PREDEF_MAKE_10_VVRR00PP00(V) SPROUT_VERSION_NUMBER(((V) / 100000000) % 100, ((V) / 1000000) % 100, ((V) / 100) % 100) - -#define SPROUT_PREDEF_MAKE_DATE(Y, M, D) SPROUT_VERSION_NUMBER((Y) % 10000 - 1970, (M) % 100, (D) % 100) -#define SPROUT_PREDEF_MAKE_YYYYMMDD(V) SPROUT_PREDEF_MAKE_DATE(((V) / 10000) % 10000, ((V) / 100) % 100, (V) % 100) -#define SPROUT_PREDEF_MAKE_YYYY(V) SPROUT_PREDEF_MAKE_DATE(V, 1, 1) -#define SPROUT_PREDEF_MAKE_YYYYMM(V) SPROUT_PREDEF_MAKE_DATE((V) / 100, (V) % 100, 1) - -#endif // #ifndef SPROUT_PREDEF_MAKE_HPP diff --git a/dsp/lib/sprout/sprout/predef/os.hpp b/dsp/lib/sprout/sprout/predef/os.hpp deleted file mode 100644 index 640267a..0000000 --- a/dsp/lib/sprout/sprout/predef/os.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_OS_HPP -#define SPROUT_PREDEF_OS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_PREDEF_OS_HPP diff --git a/dsp/lib/sprout/sprout/predef/os/aix.hpp b/dsp/lib/sprout/sprout/predef/os/aix.hpp deleted file mode 100644 index 890106f..0000000 --- a/dsp/lib/sprout/sprout/predef/os/aix.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_OS_AIX_HPP -#define SPROUT_PREDEF_OS_AIX_HPP - -#include -#include - -#define SPROUT_OS_AIX 0 - -#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && (defined(_AIX) || defined(__TOS_AIX__)) -# undef SPROUT_OS_AIX -# if !defined(SPROUT_OS_AIX) && defined(_AIX43) -# define SPROUT_OS_AIX SPROUT_VERSION_NUMBER(4, 3, 0) -# endif -# if !defined(SPROUT_OS_AIX) && defined(_AIX41) -# define SPROUT_OS_AIX SPROUT_VERSION_NUMBER(4, 1, 0) -# endif -# if !defined(SPROUT_OS_AIX) && defined(_AIX32) -# define SPROUT_OS_AIX SPROUT_VERSION_NUMBER(3, 2, 0) -# endif -# if !defined(SPROUT_OS_AIX) && defined(_AIX3) -# define SPROUT_OS_AIX SPROUT_VERSION_NUMBER(3, 0, 0) -# endif -# if !defined(SPROUT_OS_AIX) -# define SPROUT_OS_AIX 1 -# endif -#endif - -#if SPROUT_OS_AIX -# define SPROUT_OS_AIX_AVAILABLE -# include -#endif - -#define SPROUT_OS_AIX_NAME "IBM AIX" - -#endif // #ifndef SPROUT_PREDEF_OS_AIX_HPP diff --git a/dsp/lib/sprout/sprout/predef/os/amigaos.hpp b/dsp/lib/sprout/sprout/predef/os/amigaos.hpp deleted file mode 100644 index c60c544..0000000 --- a/dsp/lib/sprout/sprout/predef/os/amigaos.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_OS_AMIGAOS_HPP -#define SPROUT_PREDEF_OS_AMIGAOS_HPP - -#include - -#define SPROUT_OS_AMIGAOS 0 - -#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && (defined(AMIGA) || defined(__amigaos__)) -# undef SPROUT_OS_AMIGAOS -# define SPROUT_OS_AMIGAOS 1 -#endif - -#if SPROUT_OS_AMIGAOS -# define SPROUT_OS_AMIGAOS_AVAILABLE -# include -#endif - -#define SPROUT_OS_AMIGAOS_NAME "AmigaOS" - -#endif // #ifndef SPROUT_PREDEF_OS_AMIGAOS_HPP diff --git a/dsp/lib/sprout/sprout/predef/os/android.hpp b/dsp/lib/sprout/sprout/predef/os/android.hpp deleted file mode 100644 index d550c65..0000000 --- a/dsp/lib/sprout/sprout/predef/os/android.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_OS_ADROID_HPP -#define SPROUT_PREDEF_OS_ADROID_HPP - -#include - -#define SPROUT_OS_ANDROID 0 - -#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && defined(__ANDROID__) -# undef SPROUT_OS_ANDROID -# define SPROUT_OS_ANDROID 1 -#endif - -#if SPROUT_OS_ANDROID -# define SPROUT_OS_ANDROID_AVAILABLE -# include -#endif - -#define SPROUT_OS_ANDROID_NAME "Android" - -#endif // #ifndef SPROUT_PREDEF_OS_ADROID_HPP diff --git a/dsp/lib/sprout/sprout/predef/os/beos.hpp b/dsp/lib/sprout/sprout/predef/os/beos.hpp deleted file mode 100644 index 6e2d461..0000000 --- a/dsp/lib/sprout/sprout/predef/os/beos.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_OS_BEOS_HPP -#define SPROUT_PREDEF_OS_BEOS_HPP - -#include - -#define SPROUT_OS_BEOS 0 - -#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && defined(__BEOS__) -# undef SPROUT_OS_BEOS -# define SPROUT_OS_BEOS 1 -#endif - -#if SPROUT_OS_BEOS -# define SPROUT_OS_BEOS_AVAILABLE -# include -#endif - -#define SPROUT_OS_BEOS_NAME "BeOS" - -#endif // #ifndef SPROUT_PREDEF_OS_BEOS_HPP diff --git a/dsp/lib/sprout/sprout/predef/os/bsd.hpp b/dsp/lib/sprout/sprout/predef/os/bsd.hpp deleted file mode 100644 index e8d3328..0000000 --- a/dsp/lib/sprout/sprout/predef/os/bsd.hpp +++ /dev/null @@ -1,60 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_OS_BSD_HPP -#define SPROUT_PREDEF_OS_BSD_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef SPROUT_OS_BSD -#define SPROUT_OS_BSD 0 -#endif - -#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && (defined(BSD) || defined(_SYSTYPE_BSD)) -# undef SPROUT_OS_BSD -# include -# if !defined(SPROUT_OS_BSD) && defined(BSD4_4) -# define SPROUT_OS_BSD SPROUT_VERSION_NUMBER(4, 4, 0) -# endif -# if !defined(SPROUT_OS_BSD) && defined(BSD4_3) -# define SPROUT_OS_BSD SPROUT_VERSION_NUMBER(4, 3, 0) -# endif -# if !defined(SPROUT_OS_BSD) && defined(BSD4_2) -# define SPROUT_OS_BSD SPROUT_VERSION_NUMBER(4, 2, 0) -# endif -# if !defined(SPROUT_OS_BSD) && defined(BSD) -# define SPROUT_OS_BSD SPROUT_PREDEF_MAKE_10_VVRR(BSD) -# endif -# if !defined(SPROUT_OS_BSD) -# define SPROUT_OS_BSD 1 -# endif -#endif - -#if SPROUT_OS_BSD -# define SPROUT_OS_BSD_AVAILABLE -# include -#endif - -#define SPROUT_OS_BSD_NAME "BSD" - -#else // #ifndef SPROUT_PREDEF_OS_BSD_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_PREDEF_OS_BSD_HPP diff --git a/dsp/lib/sprout/sprout/predef/os/bsd/bsdi.hpp b/dsp/lib/sprout/sprout/predef/os/bsd/bsdi.hpp deleted file mode 100644 index 7474319..0000000 --- a/dsp/lib/sprout/sprout/predef/os/bsd/bsdi.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_OS_BSD_BSDI_HPP -#define SPROUT_PREDEF_OS_BSD_BSDI_HPP - -#include -#include - -#define SPROUT_OS_BSD_BSDI 0 - -#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && defined(__bsdi__) -# ifndef SPROUT_OS_BSD_AVAILABLE -# define SPROUT_OS_BSD 1 -# define SPROUT_OS_BSD_AVAILABLE -# endif -# undef SPROUT_OS_BSD_BSDI -# define SPROUT_OS_BSD_BSDI 1 -#endif - -#if SPROUT_OS_BSD_BSDI -# define SPROUT_OS_BSD_BSDI_AVAILABLE -# include -#endif - -#define SPROUT_OS_BSD_BSDI_NAME "BSDi BSD/OS" - -#endif // #ifndef SPROUT_PREDEF_OS_BSD_BSDI_HPP diff --git a/dsp/lib/sprout/sprout/predef/os/bsd/dragonfly.hpp b/dsp/lib/sprout/sprout/predef/os/bsd/dragonfly.hpp deleted file mode 100644 index 703fd77..0000000 --- a/dsp/lib/sprout/sprout/predef/os/bsd/dragonfly.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_OS_BSD_DRADONFLY_HPP -#define SPROUT_PREDEF_OS_BSD_DRADONFLY_HPP - -#include -#include - -#define SPROUT_OS_BSD_DRAGONFLY 0 - -#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && defined(__DragonFly__) -# ifndef SPROUT_OS_BSD_AVAILABLE -# define SPROUT_OS_BSD 1 -# define SPROUT_OS_BSD_AVAILABLE -# endif -# undef SPROUT_OS_BSD_DRAGONFLY -# if defined(__DragonFly__) -# define SPROUT_OS_DRAGONFLY_BSD 1 -# endif -#endif - -#if SPROUT_OS_BSD_DRAGONFLY -# define SPROUT_OS_BSD_DRAGONFLY_AVAILABLE -# include -#endif - -#define SPROUT_OS_BSD_DRAGONFLY_NAME "DragonFly BSD" - -#endif // #ifndef SPROUT_PREDEF_OS_BSD_DRADONFLY_HPP diff --git a/dsp/lib/sprout/sprout/predef/os/bsd/free.hpp b/dsp/lib/sprout/sprout/predef/os/bsd/free.hpp deleted file mode 100644 index 9853018..0000000 --- a/dsp/lib/sprout/sprout/predef/os/bsd/free.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_OS_BSD_FREE_HPP -#define SPROUT_PREDEF_OS_BSD_FREE_HPP - -#include -#include -#include - -#define SPROUT_OS_BSD_FREE 0 - -#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && defined(__FreeBSD__) -# ifndef SPROUT_OS_BSD_AVAILABLE -# define SPROUT_OS_BSD 1 -# define SPROUT_OS_BSD_AVAILABLE -# endif -# undef SPROUT_OS_BSD_FREE -# if defined(__FreeBSD_version) -# if __FreeBSD_version < 500000 -# define SPROUT_OS_BSD_FREE \ - SPROUT_PREDEF_MAKE_10_VRP000(__FreeBSD_version) -# else -# define SPROUT_OS_BSD_FREE \ - SPROUT_PREDEF_MAKE_10_VRR000(__FreeBSD_version) -# endif -# else -# define SPROUT_OS_BSD_FREE 1 -# endif -#endif - -#if SPROUT_OS_BSD_FREE -# define SPROUT_OS_BSD_FREE_AVAILABLE -# include -#endif - -#define SPROUT_OS_BSD_FREE_NAME "Free BSD" - -#endif // #ifndef SPROUT_PREDEF_OS_BSD_BSDI_HPP diff --git a/dsp/lib/sprout/sprout/predef/os/bsd/net.hpp b/dsp/lib/sprout/sprout/predef/os/bsd/net.hpp deleted file mode 100644 index 3e182b1..0000000 --- a/dsp/lib/sprout/sprout/predef/os/bsd/net.hpp +++ /dev/null @@ -1,63 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_OS_BSD_NET_HPP -#define SPROUT_PREDEF_OS_BSD_NET_HPP - -#include -#include -#include -#include - -#define SPROUT_OS_BSD_NET 0 - -#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && defined(__NETBSD__) || defined(__NetBSD__) -# ifndef SPROUT_OS_BSD_AVAILABLE -# define SPROUT_OS_BSD 1 -# define SPROUT_OS_BSD_AVAILABLE -# endif -# undef SPROUT_OS_BSD_NET -# if defined(__NETBSD__) -# if defined(__NETBSD_version) -# if __NETBSD_version < 500000 -# define SPROUT_OS_BSD_NET \ - SPROUT_PREDEF_MAKE_10_VRP000(__NETBSD_version) -# else -# define SPROUT_OS_BSD_NET \ - SPROUT_PREDEF_MAKE_10_VRR000(__NETBSD_version) -# endif -# else -# define SPROUT_OS_BSD_NET 1 -# endif -# elif defined(__NetBSD__) -# if !defined(SPROUT_OS_BSD_NET) && defined(NetBSD0_8) -# define SPROUT_OS_BSD_NET SPROUT_VERSION_NUMBER(0, 8, 0) -# endif -# if !defined(SPROUT_OS_BSD_NET) && defined(NetBSD0_9) -# define SPROUT_OS_BSD_NET SPROUT_VERSION_NUMBER(0, 9, 0) -# endif -# if !defined(SPROUT_OS_BSD_NET) && defined(NetBSD1_0) -# define SPROUT_OS_BSD_NET SPROUT_VERSION_NUMBER(1, 0, 0) -# endif -# if !defined(SPROUT_OS_BSD_NET) && defined(__NetBSD_Version) -# define SPROUT_OS_BSD_NET \ - SPROUT_PREDEF_MAKE_10_VVRR00PP00(__NetBSD_Version) -# endif -# if !defined(SPROUT_OS_BSD_NET) -# define SPROUT_OS_BSD_NET 1 -# endif -# endif -#endif - -#if SPROUT_OS_BSD_NET -# define SPROUT_OS_BSD_NET_AVAILABLE -# include -#endif - -#define SPROUT_OS_BSD_NET_NAME "DragonFly BSD" - -#endif // #ifndef SPROUT_PREDEF_OS_BSD_NET_HPP diff --git a/dsp/lib/sprout/sprout/predef/os/bsd/open.hpp b/dsp/lib/sprout/sprout/predef/os/bsd/open.hpp deleted file mode 100644 index 5df2688..0000000 --- a/dsp/lib/sprout/sprout/predef/os/bsd/open.hpp +++ /dev/null @@ -1,127 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_OS_BSD_OPEN_HPP -#define SPROUT_PREDEF_OS_BSD_OPEN_HPP - -#include -#include -#include - -#define SPROUT_OS_BSD_OPEN 0 - -#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && ( \ - defined(__OpenBSD__) \ - ) -# ifndef SPROUT_OS_BSD_AVAILABLE -# define SPROUT_OS_BSD 1 -# define SPROUT_OS_BSD_AVAILABLE -# endif -# undef SPROUT_OS_BSD_OPEN -# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD2_0) -# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(2, 0, 0) -# endif -# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD2_1) -# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(2, 1, 0) -# endif -# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD2_2) -# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(2, 2, 0) -# endif -# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD2_3) -# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(2, 3, 0) -# endif -# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD2_4) -# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(2, 4, 0) -# endif -# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD2_5) -# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(2, 5, 0) -# endif -# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD2_6) -# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(2, 6, 0) -# endif -# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD2_7) -# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(2, 7, 0) -# endif -# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD2_8) -# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(2, 8, 0) -# endif -# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD2_9) -# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(2, 9, 0) -# endif -# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD3_0) -# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(3, 0, 0) -# endif -# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD3_1) -# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(3, 1, 0) -# endif -# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD3_2) -# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(3, 2, 0) -# endif -# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD3_3) -# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(3, 3, 0) -# endif -# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD3_4) -# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(3, 4, 0) -# endif -# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD3_5) -# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(3, 5, 0) -# endif -# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD3_6) -# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(3, 6, 0) -# endif -# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD3_7) -# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(3, 7, 0) -# endif -# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD3_8) -# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(3, 8, 0) -# endif -# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD3_9) -# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(3, 9, 0) -# endif -# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD4_0) -# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(4, 0, 0) -# endif -# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD4_1) -# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(4, 1, 0) -# endif -# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD4_2) -# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(4, 2, 0) -# endif -# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD4_3) -# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(4, 3, 0) -# endif -# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD4_4) -# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(4, 4, 0) -# endif -# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD4_5) -# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(4, 5, 0) -# endif -# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD4_6) -# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(4, 6, 0) -# endif -# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD4_7) -# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(4, 7, 0) -# endif -# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD4_8) -# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(4, 8, 0) -# endif -# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD4_9) -# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(4, 9, 0) -# endif -# if !defined(SPROUT_OS_BSD_OPEN) -# define SPROUT_OS_BSD_OPEN 1 -# endif -#endif - -#if SPROUT_OS_BSD_OPEN -# define SPROUT_OS_BSD_OPEN_AVAILABLE -# include -#endif - -#define SPROUT_OS_BSD_OPEN_NAME "OpenBSD" - -#endif // #ifndef SPROUT_PREDEF_OS_BSD_OPEN_HPP diff --git a/dsp/lib/sprout/sprout/predef/os/cygwin.hpp b/dsp/lib/sprout/sprout/predef/os/cygwin.hpp deleted file mode 100644 index b7a1415..0000000 --- a/dsp/lib/sprout/sprout/predef/os/cygwin.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_OS_CYGWIN_HPP -#define SPROUT_PREDEF_OS_CYGWIN_HPP - -#include - -#define SPROUT_OS_CYGWIN 0 - -#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && defined(__CYGWIN__) -# undef SPROUT_OS_CYGWIN -# define SPROUT_OS_CGYWIN 1 -#endif - -#if SPROUT_OS_CYGWIN -# define SPROUT_OS_CYGWIN_AVAILABLE -# include -#endif - -#define SPROUT_OS_CYGWIN_NAME "Cygwin" - -#endif // #ifndef SPROUT_PREDEF_OS_CYGWIN_HPP diff --git a/dsp/lib/sprout/sprout/predef/os/haiku.hpp b/dsp/lib/sprout/sprout/predef/os/haiku.hpp deleted file mode 100644 index b31ca13..0000000 --- a/dsp/lib/sprout/sprout/predef/os/haiku.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_OS_HAIKU_HPP -#define SPROUT_PREDEF_OS_HAIKU_HPP - -#include - -#define SPROUT_OS_HAIKU 0 - -#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && defined(__HAIKU__) -# undef SPROUT_OS_HAIKU -# define SPROUT_OS_HAIKU 1 -#endif - -#if SPROUT_OS_HAIKU -# define SPROUT_OS_HAIKU_AVAILABLE -# include -#endif - -#define SPROUT_OS_HAIKU_NAME "Haiku" - -#endif // #ifndef SPROUT_PREDEF_OS_HAIKU_HPP diff --git a/dsp/lib/sprout/sprout/predef/os/hpux.hpp b/dsp/lib/sprout/sprout/predef/os/hpux.hpp deleted file mode 100644 index 034c073..0000000 --- a/dsp/lib/sprout/sprout/predef/os/hpux.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_OS_HPUX_HPP -#define SPROUT_PREDEF_OS_HPUX_HPP - -#include - -#define SPROUT_OS_HPUX 0 - -#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && (defined(hpux) || defined(_hpux) || defined(__hpux)) -# undef SPROUT_OS_HPUX -# define SPROUT_OS_HPUX 1 -#endif - -#if SPROUT_OS_HPUX -# define SPROUT_OS_HPUX_AVAILABLE -# include -#endif - -#define SPROUT_OS_HPUX_NAME "HP-UX" - -#endif // #ifndef SPROUT_PREDEF_OS_HPUX_HPP diff --git a/dsp/lib/sprout/sprout/predef/os/ios.hpp b/dsp/lib/sprout/sprout/predef/os/ios.hpp deleted file mode 100644 index 8eb4795..0000000 --- a/dsp/lib/sprout/sprout/predef/os/ios.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_OS_IOS_HPP -#define SPROUT_PREDEF_OS_IOS_HPP - -#include - -#define SPROUT_OS_IOS 0 - -#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && (defined(__APPLE__) && defined(__MACH__) && defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__)) -# undef SPROUT_OS_IOS -# define SPROUT_OS_IOS (__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ * 1000) -#endif - -#if SPROUT_OS_IOS -# define SPROUT_OS_IOS_AVAILABLE -# include -#endif - -#define SPROUT_OS_IOS_NAME "iOS" - -#endif // #ifndef SPROUT_PREDEF_OS_IOS_HPP diff --git a/dsp/lib/sprout/sprout/predef/os/irix.hpp b/dsp/lib/sprout/sprout/predef/os/irix.hpp deleted file mode 100644 index b51144f..0000000 --- a/dsp/lib/sprout/sprout/predef/os/irix.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_OS_IRIX_HPP -#define SPROUT_PREDEF_OS_IRIX_HPP - -#include - -#define SPROUT_OS_IRIX 0 - -#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && (defined(sgi) || defined(__sgi)) -# undef SPROUT_OS_IRIX -# define SPROUT_OS_IRIX 1 -#endif - -#if SPROUT_OS_IRIX -# define SPROUT_OS_IRIX_AVAILABLE -# include -#endif - -#define SPROUT_OS_IRIX_NAME "IRIX" - -#endif // #ifndef SPROUT_PREDEF_OS_IRIX_HPP diff --git a/dsp/lib/sprout/sprout/predef/os/linux.hpp b/dsp/lib/sprout/sprout/predef/os/linux.hpp deleted file mode 100644 index 768055c..0000000 --- a/dsp/lib/sprout/sprout/predef/os/linux.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_OS_LINUX_HPP -#define SPROUT_PREDEF_OS_LINUX_HPP - -#include - -#define SPROUT_OS_LINUX 0 - -#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && (defined(linux) || defined(__linux)) -# undef SPROUT_OS_LINUX -# define SPROUT_OS_LINUX 1 -#endif - -#if SPROUT_OS_LINUX -# define SPROUT_OS_LINUX_AVAILABLE -# include -#endif - -#define SPROUT_OS_LINUX_NAME "Linux" - -#endif // #ifndef SPROUT_PREDEF_OS_LINUX_HPP diff --git a/dsp/lib/sprout/sprout/predef/os/macos.hpp b/dsp/lib/sprout/sprout/predef/os/macos.hpp deleted file mode 100644 index c505683..0000000 --- a/dsp/lib/sprout/sprout/predef/os/macos.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_OS_MACOS_HPP -#define SPROUT_PREDEF_OS_MACOS_HPP - -#include -#include -#include - -#define SPROUT_OS_MACOS 0 - -#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && (defined(macintosh) || defined(Macintosh) || (defined(__APPLE__) && defined(__MACH__))) -# undef SPROUT_OS_MACOS -# if !defined(SPROUT_OS_MACOS) && defined(__APPLE__) && defined(__MACH__) -# define SPROUT_OS_MACOS SPROUT_VERSION_NUMBER(10, 0, 0) -# endif -# if !defined(SPROUT_OS_MACOS) -# define SPROUT_OS_MACOS SPROUT_VERSION_NUMBER(9, 0, 0) -# endif -#endif - -#if SPROUT_OS_MACOS -# define SPROUT_OS_MACOS_AVAILABLE -# include -#endif - -#define SPROUT_OS_MACOS_NAME "Mac OS" - -#endif // #ifndef SPROUT_PREDEF_OS_MACOS_HPP diff --git a/dsp/lib/sprout/sprout/predef/os/os400.hpp b/dsp/lib/sprout/sprout/predef/os/os400.hpp deleted file mode 100644 index 4923341..0000000 --- a/dsp/lib/sprout/sprout/predef/os/os400.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_OS_OS400_HPP -#define SPROUT_PREDEF_OS_OS400_HPP - -#include - -#define SPROUT_OS_OS400 0 - -#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && defined(__OS400__) -# undef SPROUT_OS_OS400 -# define SPROUT_OS_OS400 1 -#endif - -#if SPROUT_OS_OS400 -# define SPROUT_OS_OS400_AVAILABLE -# include -#endif - -#define SPROUT_OS_OS400_NAME "IBM OS/400" - -#endif // #ifndef SPROUT_PREDEF_OS_OS400_HPP diff --git a/dsp/lib/sprout/sprout/predef/os/qnxnto.hpp b/dsp/lib/sprout/sprout/predef/os/qnxnto.hpp deleted file mode 100644 index 1eec9ef..0000000 --- a/dsp/lib/sprout/sprout/predef/os/qnxnto.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_OS_QNXNTO_HPP -#define SPROUT_PREDEF_OS_QNXNTO_HPP - -#include -#include - -#define SPROUT_OS_QNX 0 - -#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && (defined(__QNX__) || defined(__QNXNTO__)) -# undef SPROUT_OS_QNX -# if !defined(SPROUT_OS_QNX) && defined(_NTO_VERSION) -# define SPROUT_OS_QNX SPROUT_PREDEF_MAKE_10_VVRR(_NTO_VERSION) -# endif -# if !defined(SPROUT_OS_QNX) && defined(__QNX__) -# define SPROUT_OS_QNX SPROUT_VERSION_NUMBER(4, 0, 0) -# endif -# if !defined(SPROUT_OS_QNX) -# define SPROUT_OS_QNX 1 -# endif -#endif - -#if SPROUT_OS_QNX -# define SPROUT_OS_QNX_AVAILABLE -# include -#endif - -#define SPROUT_OS_QNX_NAME "QNX" - -#endif // #ifndef SPROUT_PREDEF_OS_QNXNTO_HPP diff --git a/dsp/lib/sprout/sprout/predef/os/solaris.hpp b/dsp/lib/sprout/sprout/predef/os/solaris.hpp deleted file mode 100644 index bcdda73..0000000 --- a/dsp/lib/sprout/sprout/predef/os/solaris.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_OS_SOLARIS_HPP -#define SPROUT_PREDEF_OS_SOLARIS_HPP - -#include - -#define SPROUT_OS_SOLARIS 0 - -#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && (defined(sun) || defined(__sun)) -# undef SPROUT_OS_SOLARIS -# define SPROUT_OS_SOLARIS 1 -#endif - -#if SPROUT_OS_SOLARIS -# define SPROUT_OS_SOLARIS_AVAILABLE -# include -#endif - -#define SPROUT_OS_SOLARIS_NAME "Solaris" - -#endif // #ifndef SPROUT_PREDEF_OS_SOLARIS_HPP diff --git a/dsp/lib/sprout/sprout/predef/os/unix.hpp b/dsp/lib/sprout/sprout/predef/os/unix.hpp deleted file mode 100644 index 813f8b5..0000000 --- a/dsp/lib/sprout/sprout/predef/os/unix.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_OS_UNIX_HPP -#define SPROUT_PREDEF_OS_UNIX_HPP - -#include - -#define SPROUT_OS_UNIX 0 - -#if defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE) -# undef SPROUT_OS_UNIX -# define SPROUT_OS_UNIX 1 -#endif - -#if SPROUT_OS_UNIX -# define SPROUT_OS_UNIX_AVAILABLE -#endif - -#define SPROUT_OS_UNIX_NAME "Unix Environment" - -#define SPROUT_OS_SVR4 0 - -#if defined(__sysv__) || defined(__SVR4) || defined(__svr4__) || defined(_SYSTYPE_SVR4) -# undef SPROUT_OS_SVR4 -# define SPROUT_OS_SVR4 1 -#endif - -#if SPROUT_OS_SVR4 -# define SPROUT_OS_SVR4_AVAILABLE -#endif - -#define SPROUT_OS_SVR4_NAME "SVR4 Environment" - -#endif // #ifndef SPROUT_PREDEF_OS_UNIX_HPP diff --git a/dsp/lib/sprout/sprout/predef/os/vms.hpp b/dsp/lib/sprout/sprout/predef/os/vms.hpp deleted file mode 100644 index ce06cf9..0000000 --- a/dsp/lib/sprout/sprout/predef/os/vms.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_OS_VMS_HPP -#define SPROUT_PREDEF_OS_VMS_HPP - -#include -#include - -#define SPROUT_OS_VMS 0 - -#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && (defined(VMS) || defined(__VMS)) -# undef SPROUT_OS_VMS -# if defined(__VMS_VER) -# define SPROUT_OS_VMS SPROUT_PREDEF_MAKE_10_VVRR00PP00(__VMS_VER) -# else -# define SPROUT_OS_VMS 1 -# endif -#endif - -#if SPROUT_OS_VMS -# define SPROUT_OS_VMS_AVAILABLE -# include -#endif - -#define SPROUT_OS_VMS_NAME "VMS" - -#endif // #ifndef SPROUT_PREDEF_OS_VMS_HPP diff --git a/dsp/lib/sprout/sprout/predef/os/windows.hpp b/dsp/lib/sprout/sprout/predef/os/windows.hpp deleted file mode 100644 index 30c9262..0000000 --- a/dsp/lib/sprout/sprout/predef/os/windows.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_OS_WINDOWS_HPP -#define SPROUT_PREDEF_OS_WINDOWS_HPP - -#include - -#define SPROUT_OS_WINDOWS 0 - -#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) \ - && (defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(__TOS_WIN__) || defined(__WINDOWS__)) -# undef SPROUT_OS_WINDOWS -# define SPROUT_OS_WINDOWS 1 -#endif - -#if SPROUT_OS_WINDOWS -# define SPROUT_OS_WINDOWS_AVAILABLE -# include -#endif - -#define SPROUT_OS_WINDOWS_NAME "Microsoft Windows" - -#endif // #ifndef SPROUT_PREDEF_OS_WINDOWS_HPP diff --git a/dsp/lib/sprout/sprout/predef/other.hpp b/dsp/lib/sprout/sprout/predef/other.hpp deleted file mode 100644 index 1d5e9f1..0000000 --- a/dsp/lib/sprout/sprout/predef/other.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_OTHER_HPP -#define SPROUT_PREDEF_OTHER_HPP - -#include -#include - -#endif // #ifndef SPROUT_PREDEF_OTHER_HPP diff --git a/dsp/lib/sprout/sprout/predef/other/endian.hpp b/dsp/lib/sprout/sprout/predef/other/endian.hpp deleted file mode 100644 index 9e344f8..0000000 --- a/dsp/lib/sprout/sprout/predef/other/endian.hpp +++ /dev/null @@ -1,142 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_OTHER_ENDIAN_HPP -#define SPROUT_PREDEF_OTHER_ENDIAN_HPP - -#include -#include -#include -#include -#include - -// -// SPROUT_ENDIAN_BIG_BYTE -// SPROUT_ENDIAN_BIG_WORD -// SPROUT_ENDIAN_LITTLE_BYTE -// SPROUT_ENDIAN_LITTLE_WORD -// -#define SPROUT_ENDIAN_BIG_BYTE 0 -#define SPROUT_ENDIAN_BIG_WORD 0 -#define SPROUT_ENDIAN_LITTLE_BYTE 0 -#define SPROUT_ENDIAN_LITTLE_WORD 0 - -#if !SPROUT_ENDIAN_BIG_BYTE && !SPROUT_ENDIAN_BIG_WORD && !SPROUT_ENDIAN_LITTLE_BYTE && !SPROUT_ENDIAN_LITTLE_WORD -# if SPROUT_LIB_C_GNU || SPROUT_OS_ANDROID -# include -# else -# if SPROUT_OS_MACOS -# include -# else -# if SPROUT_OS_BSD -# if SPROUT_OS_BSD_OPEN -# include -# else -# include -# endif -# endif -# endif -# endif -# if defined(__BYTE_ORDER) -# if defined(__BIG_ENDIAN) && (__BYTE_ORDER == __BIG_ENDIAN) -# undef SPROUT_ENDIAN_BIG_BYTE -# define SPROUT_ENDIAN_BIG_BYTE 1 -# endif -# if defined(__LITTLE_ENDIAN) && (__BYTE_ORDER == __LITTLE_ENDIAN) -# undef SPROUT_ENDIAN_LITTLE_BYTE -# define SPROUT_ENDIAN_LITTLE_BYTE 1 -# endif -# if defined(__PDP_ENDIAN) && (__BYTE_ORDER == __PDP_ENDIAN) -# undef SPROUT_ENDIAN_LITTLE_WORD -# define SPROUT_ENDIAN_LITTLE_WORD 1 -# endif -# endif -# if !defined(__BYTE_ORDER) && defined(_BYTE_ORDER) -# if defined(_BIG_ENDIAN) && (_BYTE_ORDER == _BIG_ENDIAN) -# undef SPROUT_ENDIAN_BIG_BYTE -# define SPROUT_ENDIAN_BIG_BYTE 1 -# endif -# if defined(_LITTLE_ENDIAN) && (_BYTE_ORDER == _LITTLE_ENDIAN) -# undef SPROUT_ENDIAN_LITTLE_BYTE -# define SPROUT_ENDIAN_LITTLE_BYTE 1 -# endif -# if defined(_PDP_ENDIAN) && (_BYTE_ORDER == _PDP_ENDIAN) -# undef SPROUT_ENDIAN_LITTLE_WORD -# define SPROUT_ENDIAN_LITTLE_WORD 1 -# endif -# endif -#endif - -#if !SPROUT_ENDIAN_BIG_BYTE && !SPROUT_ENDIAN_BIG_WORD && !SPROUT_ENDIAN_LITTLE_BYTE && !SPROUT_ENDIAN_LITTLE_WORD -# if (defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)) || (defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN)) \ - || defined(__ARMEB__) || defined(__THUMBEB__) || defined(__AARCH64EB__) || defined(_MIPSEB) || defined(__MIPSEB) || defined(__MIPSEB__) -# undef SPROUT_ENDIAN_BIG_BYTE -# define SPROUT_ENDIAN_BIG_BYTE 1 -# endif -#endif - -#if !SPROUT_ENDIAN_BIG_BYTE && !SPROUT_ENDIAN_BIG_WORD && !SPROUT_ENDIAN_LITTLE_BYTE && !SPROUT_ENDIAN_LITTLE_WORD -# if (defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)) || (defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN)) \ - || defined(__ARMEL__) || defined(__THUMBEL__) || defined(__AARCH64EL__) || defined(_MIPSEL) || defined(__MIPSEL) || defined(__MIPSEL__) -# undef SPROUT_ENDIAN_LITTLE_BYTE -# define SPROUT_ENDIAN_LITTLE_BYTE 1 -# endif -#endif - -#if !SPROUT_ENDIAN_BIG_BYTE && !SPROUT_ENDIAN_BIG_WORD && !SPROUT_ENDIAN_LITTLE_BYTE && !SPROUT_ENDIAN_LITTLE_WORD -# include -# if SPROUT_ARCH_M68K || SPROUT_ARCH_PARISC || SPROUT_ARCH_SPARC || SPROUT_ARCH_SYS370 || SPROUT_ARCH_SYS390 || SPROUT_ARCH_Z -# undef SPROUT_ENDIAN_BIG_BYTE -# define SPROUT_ENDIAN_BIG_BYTE 1 -# endif -# if SPROUT_ARCH_AMD64 || SPROUT_ARCH_IA64 || SPROUT_ARCH_X86 || SPROUT_ARCH_BLACKFIN -# undef SPROUT_ENDIAN_LITTLE_BYTE -# define SPROUT_ENDIAN_LITTLE_BYTE 1 -# endif -#endif - -#if !SPROUT_ENDIAN_BIG_BYTE && !SPROUT_ENDIAN_BIG_WORD && !SPROUT_ENDIAN_LITTLE_BYTE && !SPROUT_ENDIAN_LITTLE_WORD -# if SPROUT_ARCH_ARM -# include -# if SPROUT_OS_WINDOWS -# undef SPROUT_ENDIAN_LITTLE_BYTE -# define SPROUT_ENDIAN_LITTLE_BYTE 1 -# endif -# endif -#endif - -// -// SPROUT_ENDIAN_BIG_BYTE_AVAILABLE -// SPROUT_ENDIAN_BIG_WORD_BYTE_AVAILABLE -// SPROUT_ENDIAN_LITTLE_BYTE_AVAILABLE -// SPROUT_ENDIAN_LITTLE_WORD_BYTE_AVAILABLE -// -#if SPROUT_ENDIAN_BIG_BYTE -# define SPROUT_ENDIAN_BIG_BYTE_AVAILABLE -#endif -#if SPROUT_ENDIAN_BIG_WORD -# define SPROUT_ENDIAN_BIG_WORD_BYTE_AVAILABLE -#endif -#if SPROUT_ENDIAN_LITTLE_BYTE -# define SPROUT_ENDIAN_LITTLE_BYTE_AVAILABLE -#endif -#if SPROUT_ENDIAN_LITTLE_WORD -# define SPROUT_ENDIAN_LITTLE_WORD_BYTE_AVAILABLE -#endif - -// -// SPROUT_ENDIAN_BIG_BYTE_NAME -// SPROUT_ENDIAN_BIG_WORD_NAME -// SPROUT_ENDIAN_LITTLE_BYTE_NAME -// SPROUT_ENDIAN_LITTLE_WORD_NAME -// -#define SPROUT_ENDIAN_BIG_BYTE_NAME "Byte-Swapped Big-Endian" -#define SPROUT_ENDIAN_BIG_WORD_NAME "Word-Swapped Big-Endian" -#define SPROUT_ENDIAN_LITTLE_BYTE_NAME "Byte-Swapped Little-Endian" -#define SPROUT_ENDIAN_LITTLE_WORD_NAME "Word-Swapped Little-Endian" - -#endif // #ifndef SPROUT_PREDEF_OTHER_ENDIAN_HPP diff --git a/dsp/lib/sprout/sprout/predef/platform.hpp b/dsp/lib/sprout/sprout/predef/platform.hpp deleted file mode 100644 index bbad1dc..0000000 --- a/dsp/lib/sprout/sprout/predef/platform.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_PLATFORM_HPP -#define SPROUT_PREDEF_PLATFORM_HPP - -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_PREDEF_PLATFORM_HPP diff --git a/dsp/lib/sprout/sprout/predef/platform/mingw.hpp b/dsp/lib/sprout/sprout/predef/platform/mingw.hpp deleted file mode 100644 index 2e429aa..0000000 --- a/dsp/lib/sprout/sprout/predef/platform/mingw.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_PLATFORM_MINGW_HPP -#define SPROUT_PREDEF_PLATFORM_MINGW_HPP - -#include -#include - -#define SPROUT_PLAT_MINGW 0 - -#if defined(__MINGW32__) || defined(__MINGW64__) -# include <_mingw.h> -# if !defined(SPROUT_PLAT_MINGW_DETECTION) && (defined(__MINGW64_VERSION_MAJOR) && defined(__MINGW64_VERSION_MINOR)) -# define SPROUT_PLAT_MINGW_DETECTION \ - SPROUT_VERSION_NUMBER(__MINGW64_VERSION_MAJOR, __MINGW64_VERSION_MINOR, 0) -# endif -# if !defined(SPROUT_PLAT_MINGW_DETECTION) && (defined(__MINGW32_VERSION_MAJOR) && defined(__MINGW32_VERSION_MINOR)) -# define SPROUT_PLAT_MINGW_DETECTION \ - SPROUT_VERSION_NUMBER(__MINGW32_MAJOR_VERSION, __MINGW32_MINOR_VERSION, 0) -# endif -# if !defined(SPROUT_PLAT_MINGW_DETECTION) -# define SPROUT_PLAT_MINGW_DETECTION 1 -# endif -#endif - -#ifdef SPROUT_PLAT_MINGW_DETECTION -# define SPROUT_PLAT_MINGW_AVAILABLE -# if defined(SPROUT_PREDEF_DETAIL_PLAT_DETECTED) -# define SPROUT_PLAT_MINGW_EMULATED SPROUT_PLAT_MINGW_DETECTION -# else -# undef SPROUT_PLAT_MINGW -# define SPROUT_PLAT_MINGW SPROUT_PLAT_MINGW_DETECTION -# endif -# include -#endif - -#define SPROUT_PLAT_MINGW_NAME "MinGW" - -#endif // #ifndef SPROUT_PREDEF_PLATFORM_MINGW_HPP diff --git a/dsp/lib/sprout/sprout/predef/platform/windows_desktop.hpp b/dsp/lib/sprout/sprout/predef/platform/windows_desktop.hpp deleted file mode 100644 index 8ce209f..0000000 --- a/dsp/lib/sprout/sprout/predef/platform/windows_desktop.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_PLATFORM_WINDOWS_DESKTOP_HPP -#define SPROUT_PREDEF_PLATFORM_WINDOWS_DESKTOP_HPP - -#include -#include - -#define SPROUT_PLAT_WINDOWS_DESKTOP 0 - -#if SPROUT_OS_WINDOWS && (!defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)) -# undef SPROUT_PLAT_WINDOWS_DESKTOP -# define SPROUT_PLAT_WINDOWS_DESKTOP 1 -#endif - -#if SPROUT_PLAT_WINDOWS_DESKTOP -# define SPROUT_PLAT_WINDOWS_DESKTOP_AVALIABLE -# include -#endif - -#define SPROUT_PLAT_WINDOWS_DESKTOP_NAME "Windows Desktop" - -#endif // #ifndef SPROUT_PREDEF_PLATFORM_WINDOWS_DESKTOP_HPP diff --git a/dsp/lib/sprout/sprout/predef/platform/windows_phone.hpp b/dsp/lib/sprout/sprout/predef/platform/windows_phone.hpp deleted file mode 100644 index b1e8077..0000000 --- a/dsp/lib/sprout/sprout/predef/platform/windows_phone.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_PLATFORM_WINDOWS_PHONE_HPP -#define SPROUT_PREDEF_PLATFORM_WINDOWS_PHONE_HPP - -#include -#include - -#define SPROUT_PLAT_WINDOWS_PHONE 0 - -#if SPROUT_OS_WINDOWS && defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP -# undef SPROUT_PLAT_WINDOWS_PHONE -# define SPROUT_PLAT_WINDOWS_PHONE 1 -#endif - -#if SPROUT_PLAT_WINDOWS_PHONE -# define SPROUT_PLAT_WINDOWS_PHONE_AVALIABLE -# include -#endif - -#define SPROUT_PLAT_WINDOWS_PHONE_NAME "Windows Phone" - -#endif // #ifndef SPROUT_PREDEF_PLATFORM_WINDOWS_PHONE_HPP diff --git a/dsp/lib/sprout/sprout/predef/platform/windows_runtime.hpp b/dsp/lib/sprout/sprout/predef/platform/windows_runtime.hpp deleted file mode 100644 index 56ee471..0000000 --- a/dsp/lib/sprout/sprout/predef/platform/windows_runtime.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_PLATFORM_WINDOWS_RUNTIME_HPP -#define SPROUT_PREDEF_PLATFORM_WINDOWS_RUNTIME_HPP - -#include -#include - -#define SPROUT_PLAT_WINDOWS_RUNTIME 0 - -#if SPROUT_OS_WINDOWS && defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP || WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) -# undef SPROUT_PLAT_WINDOWS_RUNTIME -# define SPROUT_PLAT_WINDOWS_RUNTIME 1 -#endif - -#if SPROUT_PLAT_WINDOWS_RUNTIME -# define SPROUT_PLAT_WINDOWS_RUNTIME_AVALIABLE -# include -#endif - -#define SPROUT_PLAT_WINDOWS_RUNTIME_NAME "Windows Runtime" - -#endif // #ifndef SPROUT_PREDEF_PLATFORM_WINDOWS_RUNTIME_HPP diff --git a/dsp/lib/sprout/sprout/predef/platform/windows_store.hpp b/dsp/lib/sprout/sprout/predef/platform/windows_store.hpp deleted file mode 100644 index 0f9d85d..0000000 --- a/dsp/lib/sprout/sprout/predef/platform/windows_store.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the sprout Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_PLATFORM_WINDOWS_STORE_HPP -#define SPROUT_PREDEF_PLATFORM_WINDOWS_STORE_HPP - -#include -#include - -#define SPROUT_PLAT_WINDOWS_STORE 0 - -#if SPROUT_OS_WINDOWS && defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_APP -# undef SPROUT_PLAT_WINDOWS_STORE -# define SPROUT_PLAT_WINDOWS_STORE 1 -#endif - -#if SPROUT_PLAT_WINDOWS_STORE -# define SPROUT_PLAT_WINDOWS_STORE_AVALIABLE -# include -#endif - -#define SPROUT_PLAT_WINDOWS_STORE_NAME "Windows Store" - -#endif // #ifndef SPROUT_PREDEF_PLATFORM_WINDOWS_STORE_HPP diff --git a/dsp/lib/sprout/sprout/predef/version_number.hpp b/dsp/lib/sprout/sprout/predef/version_number.hpp deleted file mode 100644 index 4ae8e08..0000000 --- a/dsp/lib/sprout/sprout/predef/version_number.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREDEF_VERSION_NUMBER_HPP -#define SPROUT_PREDEF_VERSION_NUMBER_HPP - -#include - -// -// SPROUT_VERSION_NUMBER -// -#define SPROUT_VERSION_NUMBER(MAJOR, MINOR, PATCH) \ - ( (((MAJOR) % 100) * 10000000) + (((MINOR) % 100) * 100000) + ((PATCH) % 100000) ) - -// -// SPROUT_VERSION_NUMBER_MAX -// SPROUT_VERSION_NUMBER_MIN -// SPROUT_VERSION_NUMBER_ZERO -// -#define SPROUT_VERSION_NUMBER_MAX \ - SPROUT_VERSION_NUMBER(99, 99, 99999) -#define SPROUT_VERSION_NUMBER_MIN \ - SPROUT_VERSION_NUMBER(0, 0, 1) -#define SPROUT_VERSION_NUMBER_ZERO \ - SPROUT_VERSION_NUMBER(0, 0, 0) - -// -// SPROUT_VERSION_NUMBER_AVAILABLE -// SPROUT_VERSION_NUMBER_NOT_AVAILABLE -// -#define SPROUT_VERSION_NUMBER_AVAILABLE \ - SPROUT_VERSION_NUMBER_MIN -#define SPROUT_VERSION_NUMBER_NOT_AVAILABLE \ - SPROUT_VERSION_NUMBER_ZERO - -#endif // #ifndef SPROUT_PREDEF_OS_BSD_BSDI_HPP diff --git a/dsp/lib/sprout/sprout/preprocessor.hpp b/dsp/lib/sprout/sprout/preprocessor.hpp deleted file mode 100644 index 742a8f6..0000000 --- a/dsp/lib/sprout/sprout/preprocessor.hpp +++ /dev/null @@ -1,21 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREPROCESSOR_HPP -#define SPROUT_PREPROCESSOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_PREPROCESSOR_HPP diff --git a/dsp/lib/sprout/sprout/preprocessor/cat.hpp b/dsp/lib/sprout/sprout/preprocessor/cat.hpp deleted file mode 100644 index e165225..0000000 --- a/dsp/lib/sprout/sprout/preprocessor/cat.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREPROCESSOR_CAT_HPP -#define SPROUT_PREPROCESSOR_CAT_HPP - -#include - -// -// SPROUT_PP_CAT -// -#define SPROUT_PP_CAT(a, b) SPROUT_PP_CAT_I(a, b) -#define SPROUT_PP_CAT_I(a, b) a ## b - -#endif // #ifndef SPROUT_PREPROCESSOR_CAT_HPP diff --git a/dsp/lib/sprout/sprout/preprocessor/comma.hpp b/dsp/lib/sprout/sprout/preprocessor/comma.hpp deleted file mode 100644 index febd518..0000000 --- a/dsp/lib/sprout/sprout/preprocessor/comma.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREPROCESSOR_COMMA_HPP -#define SPROUT_PREPROCESSOR_COMMA_HPP - -#include - -// -// SPROUT_PP_COMMA -// -#define SPROUT_PP_COMMA() , - -#endif // #ifndef SPROUT_PREPROCESSOR_COMMA_HPP diff --git a/dsp/lib/sprout/sprout/preprocessor/config.hpp b/dsp/lib/sprout/sprout/preprocessor/config.hpp deleted file mode 100644 index c8cacd9..0000000 --- a/dsp/lib/sprout/sprout/preprocessor/config.hpp +++ /dev/null @@ -1,57 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREPROCESSOR_CONFIG_HPP -#define SPROUT_PREPROCESSOR_CONFIG_HPP - -#include - -// -// SPROUT_PP_VARIADICS -// -#if !defined(SPROUT_PP_VARIADICS) -# if defined(__GCCXML__) || defined(__CUDACC__) || defined(__PATHSCALE__) || defined(__DMC__) || defined(__CODEGEARC__) || defined(__BORLANDC__) || defined(__MWERKS__) || defined(__SUNPRO_CC) || (defined(__HP_aCC) && !defined(__EDG__)) || defined(__MRC__) || defined(__SC__) || defined(__IBMCPP__) || defined(__PGI) -# define SPROUT_PP_VARIADICS 0 -# elif defined(__clang__) -# define SPROUT_PP_VARIADICS 1 -# elif defined(_MSC_VER) && _MSC_VER >= 1400 && !defined(__EDG__) -# if _MSC_VER >= 1400 -# define SPROUT_PP_VARIADICS 1 -# define SPROUT_PP_VARIADICS_MSVC 1 -# else -# define SPROUT_PP_VARIADICS 0 -# endif -# elif defined(__WAVE__) && __WAVE_HAS_VARIADICS__ || defined(__GNUC__) && __GXX_EXPERIMENTAL_CXX0X__ -# define SPROUT_PP_VARIADICS 1 -# elif !defined(__cplusplus) && __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L -# define SPROUT_PP_VARIADICS 1 -# else -# define SPROUT_PP_VARIADICS 0 -# endif -#elif !SPROUT_PP_VARIADICS + 1 < 2 -# undef SPROUT_PP_VARIADICS -# define SPROUT_PP_VARIADICS 1 -# if (defined(_MSC_VER) && _MSC_VER >= 1400 && !(defined(__EDG__)) || defined(__GCCXML__) || defined(__CUDACC__) || defined(__PATHSCALE__) || defined(__clang__) || defined(__DMC__) || defined(__CODEGEARC__) || defined(__BORLANDC__) || defined(__MWERKS__) || defined(__SUNPRO_CC) || defined(__HP_aCC) || defined(__MRC__) || defined(__SC__) || defined(__IBMCPP__) || defined(__PGI)) -# define SPROUT_PP_VARIADICS_MSVC 1 -# endif -#else -# undef SPROUT_PP_VARIADICS -# define SPROUT_PP_VARIADICS 0 -#endif - -// -// SPROUT_PP_HAS_COUNTER -// -#ifdef __COUNTER__ -# undef SPROUT_PP_HAS_COUNTER -# define SPROUT_PP_HAS_COUNTER 1 -#else -# undef SPROUT_PP_HAS_COUNTER -# define SPROUT_PP_HAS_COUNTER 0 -#endif - -#endif // #ifndef SPROUT_PREPROCESSOR_CONFIG_HPP diff --git a/dsp/lib/sprout/sprout/preprocessor/empty.hpp b/dsp/lib/sprout/sprout/preprocessor/empty.hpp deleted file mode 100644 index 8720f94..0000000 --- a/dsp/lib/sprout/sprout/preprocessor/empty.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREPROCESSOR_EMPTY_HPP -#define SPROUT_PREPROCESSOR_EMPTY_HPP - -#include - -// -// SPROUT_PP_EMPTY -// -#define SPROUT_PP_EMPTY() - -#endif // #ifndef SPROUT_PREPROCESSOR_EMPTY_HPP diff --git a/dsp/lib/sprout/sprout/preprocessor/some_number.hpp b/dsp/lib/sprout/sprout/preprocessor/some_number.hpp deleted file mode 100644 index 58d86e1..0000000 --- a/dsp/lib/sprout/sprout/preprocessor/some_number.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREPROCESSOR_SOME_NUMBER_HPP -#define SPROUT_PREPROCESSOR_SOME_NUMBER_HPP - -#include -#include -#include - -// -// SPROUT_PP_SOME_NUMBER_IS_UNIQUE_IN_LINE -// -#if SPROUT_PP_HAS_COUNTER -# undef SPROUT_PP_SOME_NUMBER_IS_UNIQUE_IN_LINE -# define SPROUT_PP_SOME_NUMBER_IS_UNIQUE_IN_LINE 1 -#else -# undef SPROUT_PP_SOME_NUMBER_IS_UNIQUE_IN_LINE -# define SPROUT_PP_SOME_NUMBER_IS_UNIQUE_IN_LINE 0 -#endif - -// -// SPROUT_PP_SOME_NUMBER -// SPROUT_PP_SOME_NUMBER_OR_EMPTY -// -#if SPROUT_PP_HAS_COUNTER -# define SPROUT_PP_SOME_NUMBER() __COUNTER__ -# define SPROUT_PP_SOME_NUMBER_OR_EMPTY() SPROUT_PP_SOME_NUMBER() -#else -# define SPROUT_PP_SOME_NUMBER() __LINE__ -# define SPROUT_PP_SOME_NUMBER_OR_EMPTY() SPROUT_PP_EMPTY() -#endif - -#endif // #ifndef SPROUT_PREPROCESSOR_SOME_NUMBER_HPP diff --git a/dsp/lib/sprout/sprout/preprocessor/str.hpp b/dsp/lib/sprout/sprout/preprocessor/str.hpp deleted file mode 100644 index 1a164ab..0000000 --- a/dsp/lib/sprout/sprout/preprocessor/str.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREPROCESSOR_STR_HPP -#define SPROUT_PREPROCESSOR_STR_HPP - -#include - -// -// SPROUT_PP_STR -// -#define SPROUT_PP_STR(str) str - -#endif // #ifndef SPROUT_PREPROCESSOR_STR_HPP diff --git a/dsp/lib/sprout/sprout/preprocessor/str_all.hpp b/dsp/lib/sprout/sprout/preprocessor/str_all.hpp deleted file mode 100644 index d779532..0000000 --- a/dsp/lib/sprout/sprout/preprocessor/str_all.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREPROCESSOR_STR_ALL_HPP -#define SPROUT_PREPROCESSOR_STR_ALL_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_PREPROCESSOR_STR_ALL_HPP diff --git a/dsp/lib/sprout/sprout/preprocessor/stringize.hpp b/dsp/lib/sprout/sprout/preprocessor/stringize.hpp deleted file mode 100644 index 2111a0d..0000000 --- a/dsp/lib/sprout/sprout/preprocessor/stringize.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREPROCESSOR_STRINGIZE_HPP -#define SPROUT_PREPROCESSOR_STRINGIZE_HPP - -#include - -// -// SPROUT_PP_STRINGIZE -// -#define SPROUT_PP_STRINGIZE(text) SPROUT_PP_STRINGIZE_I(text) -#define SPROUT_PP_STRINGIZE_I(text) #text - -#endif // #ifndef SPROUT_PREPROCESSOR_STRINGIZE_HPP diff --git a/dsp/lib/sprout/sprout/preprocessor/stringize_all.hpp b/dsp/lib/sprout/sprout/preprocessor/stringize_all.hpp deleted file mode 100644 index f61d0f4..0000000 --- a/dsp/lib/sprout/sprout/preprocessor/stringize_all.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREPROCESSOR_STRINGIZE_ALL_HPP -#define SPROUT_PREPROCESSOR_STRINGIZE_ALL_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_PREPROCESSOR_STRINGIZE_ALL_HPP diff --git a/dsp/lib/sprout/sprout/preprocessor/u16str.hpp b/dsp/lib/sprout/sprout/preprocessor/u16str.hpp deleted file mode 100644 index 8be613f..0000000 --- a/dsp/lib/sprout/sprout/preprocessor/u16str.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREPROCESSOR_U16STR_HPP -#define SPROUT_PREPROCESSOR_U16STR_HPP - -#include - -// -// SPROUT_PP_U16STR -// -#define SPROUT_PP_U16STR(str) SPROUT_PP_U16STR_I(str) -#define SPROUT_PP_U16STR_I(str) u ## str - -#endif // #ifndef SPROUT_PREPROCESSOR_U16STR_HPP diff --git a/dsp/lib/sprout/sprout/preprocessor/u16stringize.hpp b/dsp/lib/sprout/sprout/preprocessor/u16stringize.hpp deleted file mode 100644 index 6297da6..0000000 --- a/dsp/lib/sprout/sprout/preprocessor/u16stringize.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREPROCESSOR_U16STRINGIZE_HPP -#define SPROUT_PREPROCESSOR_U16STRINGIZE_HPP - -#include - -// -// SPROUT_PP_U16STRINGIZE -// -#define SPROUT_PP_U16STRINGIZE(text) SPROUT_PP_U16STRINGIZE_I(text) -#define SPROUT_PP_U16STRINGIZE_I(text) SPROUT_PP_U16STRINGIZE_II(#text) -#define SPROUT_PP_U16STRINGIZE_II(str) u ## str - -#endif // #ifndef SPROUT_PREPROCESSOR_U16STRINGIZE_HPP diff --git a/dsp/lib/sprout/sprout/preprocessor/u32str.hpp b/dsp/lib/sprout/sprout/preprocessor/u32str.hpp deleted file mode 100644 index a1ea2a4..0000000 --- a/dsp/lib/sprout/sprout/preprocessor/u32str.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREPROCESSOR_U32STR_HPP -#define SPROUT_PREPROCESSOR_U32STR_HPP - -#include - -// -// SPROUT_PP_U32STR -// -#define SPROUT_PP_U32STR(str) SPROUT_PP_U32STR_I(str) -#define SPROUT_PP_U32STR_I(str) U ## str - -#endif // #ifndef SPROUT_PREPROCESSOR_U32STR_HPP diff --git a/dsp/lib/sprout/sprout/preprocessor/u32stringize.hpp b/dsp/lib/sprout/sprout/preprocessor/u32stringize.hpp deleted file mode 100644 index 5c62bab..0000000 --- a/dsp/lib/sprout/sprout/preprocessor/u32stringize.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREPROCESSOR_U32STRINGIZE_HPP -#define SPROUT_PREPROCESSOR_U32STRINGIZE_HPP - -#include - -// -// SPROUT_PP_U32STRINGIZE -// -#define SPROUT_PP_U32STRINGIZE(text) SPROUT_PP_U32STRINGIZE_I(text) -#define SPROUT_PP_U32STRINGIZE_I(text) SPROUT_PP_U32STRINGIZE_II(#text) -#define SPROUT_PP_U32STRINGIZE_II(str) U ## str - -#endif // #ifndef SPROUT_PREPROCESSOR_U32STRINGIZE_HPP diff --git a/dsp/lib/sprout/sprout/preprocessor/unique_string.hpp b/dsp/lib/sprout/sprout/preprocessor/unique_string.hpp deleted file mode 100644 index 2dfdd1e..0000000 --- a/dsp/lib/sprout/sprout/preprocessor/unique_string.hpp +++ /dev/null @@ -1,54 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREPROCESSOR_UNIQUE_STRING_HPP -#define SPROUT_PREPROCESSOR_UNIQUE_STRING_HPP - -#include -#include -#include -#include - -// -// SPROUT_PP_UNIQUE_STRING_ -// SPROUT_PP_UNIQUE_WSTRING_ -// SPROUT_PP_UNIQUE_U16STRING_ -// SPROUT_PP_UNIQUE_U32STRING_ -// -#define SPROUT_PP_UNIQUE_STRING_(N) \ - SPROUT_PP_STRINGIZE(N) SPROUT_PP_STR(" ") SPROUT_PP_STRINGIZE(SPROUT_PP_SOME_NUMBER()) \ - SPROUT_PP_STR(" : ") SPROUT_PP_STR(__DATE__) SPROUT_PP_STR(" ") SPROUT_PP_STR(__TIME__) \ - SPROUT_PP_STR(" : ") SPROUT_PP_STR(__FILE__) SPROUT_PP_STR(":") SPROUT_PP_STRINGIZE(__LINE__) -#define SPROUT_PP_UNIQUE_WSTRING_(N) \ - SPROUT_PP_WSTRINGIZE(N) SPROUT_PP_STR(" ") SPROUT_PP_WSTRINGIZE(SPROUT_PP_SOME_NUMBER()) \ - SPROUT_PP_WSTR(" : ") SPROUT_PP_WSTR(__DATE__) SPROUT_PP_WSTR(" ") SPROUT_PP_WSTR(__TIME__) \ - SPROUT_PP_WSTR(" : ") SPROUT_PP_WSTR(__FILE__) SPROUT_PP_WSTR(":") SPROUT_PP_WSTRINGIZE(__LINE__) -#define SPROUT_PP_UNIQUE_U16STRING_(N) \ - SPROUT_PP_U16STRINGIZE(N) SPROUT_PP_STR(" ") SPROUT_PP_U16STRINGIZE(SPROUT_PP_SOME_NUMBER()) \ - SPROUT_PP_U16STR(" : ") SPROUT_PP_U16STR(__DATE__) SPROUT_PP_U16STR(" ") SPROUT_PP_U16STR(__TIME__) \ - SPROUT_PP_U16STR(" : ") SPROUT_PP_U16STR(__FILE__) SPROUT_PP_U16STR(":") SPROUT_PP_U16STRINGIZE(__LINE__) -#define SPROUT_PP_UNIQUE_U32STRING_(N) \ - SPROUT_PP_U32STRINGIZE(N) SPROUT_PP_STR(" ") SPROUT_PP_U32STRINGIZE(SPROUT_PP_SOME_NUMBER()) \ - SPROUT_PP_U32STR(" : ") SPROUT_PP_U32STR(__DATE__) SPROUT_PP_U32STR(" ") SPROUT_PP_U32STR(__TIME__) \ - SPROUT_PP_U32STR(" : ") SPROUT_PP_U32STR(__FILE__) SPROUT_PP_U32STR(":") SPROUT_PP_U32STRINGIZE(__LINE__) - -// -// SPROUT_PP_UNIQUE_STRING -// SPROUT_PP_UNIQUE_WSTRING -// SPROUT_PP_UNIQUE_U16STRING -// SPROUT_PP_UNIQUE_U32STRING -// -#define SPROUT_PP_UNIQUE_STRING \ - SPROUT_PP_UNIQUE_STRING_(SPROUT_PP_SOME_NUMBER()) -#define SPROUT_PP_UNIQUE_WSTRING \ - SPROUT_PP_UNIQUE_WSTRING_(SPROUT_PP_SOME_NUMBER()) -#define SPROUT_PP_UNIQUE_U16STRING \ - SPROUT_PP_UNIQUE_U16STRING_(SPROUT_PP_SOME_NUMBER()) -#define SPROUT_PP_UNIQUE_U32STRING \ - SPROUT_PP_UNIQUE_U32STRING_(SPROUT_PP_SOME_NUMBER()) - -#endif // #ifndef SPROUT_PREPROCESSOR_UNIQUE_STRING_HPP diff --git a/dsp/lib/sprout/sprout/preprocessor/variadic.hpp b/dsp/lib/sprout/sprout/preprocessor/variadic.hpp deleted file mode 100644 index 898fab1..0000000 --- a/dsp/lib/sprout/sprout/preprocessor/variadic.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREPROCESSOR_VARIADIC_HPP -#define SPROUT_PREPROCESSOR_VARIADIC_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_PREPROCESSOR_VARIADIC_HPP diff --git a/dsp/lib/sprout/sprout/preprocessor/variadic/elem.hpp b/dsp/lib/sprout/sprout/preprocessor/variadic/elem.hpp deleted file mode 100644 index 8d7fa92..0000000 --- a/dsp/lib/sprout/sprout/preprocessor/variadic/elem.hpp +++ /dev/null @@ -1,91 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREPROCESSOR_VARIADIC_ELEM_HPP -#define SPROUT_PREPROCESSOR_VARIADIC_ELEM_HPP - -#include -#include -#include - -// -// SPROUT_PP_VARIADIC_ELEM -// -#if SPROUT_PP_VARIADICS -# if SPROUT_PP_VARIADICS_MSVC -# define SPROUT_PP_VARIADIC_ELEM(n, ...) SPROUT_PP_VARIADIC_ELEM_I(n, __VA_ARGS__) -# define SPROUT_PP_VARIADIC_ELEM_I(n, ...) SPROUT_PP_CAT(SPROUT_PP_CAT(SPROUT_PP_VARIADIC_ELEM_, n)(__VA_ARGS__, ), ) -# else -# define SPROUT_PP_VARIADIC_ELEM(n, ...) SPROUT_PP_CAT(SPROUT_PP_VARIADIC_ELEM_, n)(__VA_ARGS__, ) -# endif -# define SPROUT_PP_VARIADIC_ELEM_0(e0, ...) e0 -# define SPROUT_PP_VARIADIC_ELEM_1(e0, e1, ...) e1 -# define SPROUT_PP_VARIADIC_ELEM_2(e0, e1, e2, ...) e2 -# define SPROUT_PP_VARIADIC_ELEM_3(e0, e1, e2, e3, ...) e3 -# define SPROUT_PP_VARIADIC_ELEM_4(e0, e1, e2, e3, e4, ...) e4 -# define SPROUT_PP_VARIADIC_ELEM_5(e0, e1, e2, e3, e4, e5, ...) e5 -# define SPROUT_PP_VARIADIC_ELEM_6(e0, e1, e2, e3, e4, e5, e6, ...) e6 -# define SPROUT_PP_VARIADIC_ELEM_7(e0, e1, e2, e3, e4, e5, e6, e7, ...) e7 -# define SPROUT_PP_VARIADIC_ELEM_8(e0, e1, e2, e3, e4, e5, e6, e7, e8, ...) e8 -# define SPROUT_PP_VARIADIC_ELEM_9(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, ...) e9 -# define SPROUT_PP_VARIADIC_ELEM_10(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, ...) e10 -# define SPROUT_PP_VARIADIC_ELEM_11(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, ...) e11 -# define SPROUT_PP_VARIADIC_ELEM_12(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, ...) e12 -# define SPROUT_PP_VARIADIC_ELEM_13(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, ...) e13 -# define SPROUT_PP_VARIADIC_ELEM_14(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, ...) e14 -# define SPROUT_PP_VARIADIC_ELEM_15(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, ...) e15 -# define SPROUT_PP_VARIADIC_ELEM_16(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, ...) e16 -# define SPROUT_PP_VARIADIC_ELEM_17(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, ...) e17 -# define SPROUT_PP_VARIADIC_ELEM_18(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, ...) e18 -# define SPROUT_PP_VARIADIC_ELEM_19(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, ...) e19 -# define SPROUT_PP_VARIADIC_ELEM_20(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, ...) e20 -# define SPROUT_PP_VARIADIC_ELEM_21(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, ...) e21 -# define SPROUT_PP_VARIADIC_ELEM_22(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, ...) e22 -# define SPROUT_PP_VARIADIC_ELEM_23(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, ...) e23 -# define SPROUT_PP_VARIADIC_ELEM_24(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, ...) e24 -# define SPROUT_PP_VARIADIC_ELEM_25(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, ...) e25 -# define SPROUT_PP_VARIADIC_ELEM_26(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, ...) e26 -# define SPROUT_PP_VARIADIC_ELEM_27(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, ...) e27 -# define SPROUT_PP_VARIADIC_ELEM_28(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, ...) e28 -# define SPROUT_PP_VARIADIC_ELEM_29(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, ...) e29 -# define SPROUT_PP_VARIADIC_ELEM_30(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, ...) e30 -# define SPROUT_PP_VARIADIC_ELEM_31(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, ...) e31 -# define SPROUT_PP_VARIADIC_ELEM_32(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, ...) e32 -# define SPROUT_PP_VARIADIC_ELEM_33(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, ...) e33 -# define SPROUT_PP_VARIADIC_ELEM_34(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, ...) e34 -# define SPROUT_PP_VARIADIC_ELEM_35(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, ...) e35 -# define SPROUT_PP_VARIADIC_ELEM_36(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, ...) e36 -# define SPROUT_PP_VARIADIC_ELEM_37(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, ...) e37 -# define SPROUT_PP_VARIADIC_ELEM_38(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, ...) e38 -# define SPROUT_PP_VARIADIC_ELEM_39(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, ...) e39 -# define SPROUT_PP_VARIADIC_ELEM_40(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, ...) e40 -# define SPROUT_PP_VARIADIC_ELEM_41(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, ...) e41 -# define SPROUT_PP_VARIADIC_ELEM_42(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, ...) e42 -# define SPROUT_PP_VARIADIC_ELEM_43(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, ...) e43 -# define SPROUT_PP_VARIADIC_ELEM_44(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, ...) e44 -# define SPROUT_PP_VARIADIC_ELEM_45(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, ...) e45 -# define SPROUT_PP_VARIADIC_ELEM_46(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, ...) e46 -# define SPROUT_PP_VARIADIC_ELEM_47(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, ...) e47 -# define SPROUT_PP_VARIADIC_ELEM_48(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, ...) e48 -# define SPROUT_PP_VARIADIC_ELEM_49(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, ...) e49 -# define SPROUT_PP_VARIADIC_ELEM_50(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, ...) e50 -# define SPROUT_PP_VARIADIC_ELEM_51(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, ...) e51 -# define SPROUT_PP_VARIADIC_ELEM_52(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, ...) e52 -# define SPROUT_PP_VARIADIC_ELEM_53(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, ...) e53 -# define SPROUT_PP_VARIADIC_ELEM_54(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, ...) e54 -# define SPROUT_PP_VARIADIC_ELEM_55(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, ...) e55 -# define SPROUT_PP_VARIADIC_ELEM_56(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, ...) e56 -# define SPROUT_PP_VARIADIC_ELEM_57(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, ...) e57 -# define SPROUT_PP_VARIADIC_ELEM_58(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, ...) e58 -# define SPROUT_PP_VARIADIC_ELEM_59(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, ...) e59 -# define SPROUT_PP_VARIADIC_ELEM_60(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, ...) e60 -# define SPROUT_PP_VARIADIC_ELEM_61(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, ...) e61 -# define SPROUT_PP_VARIADIC_ELEM_62(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, ...) e62 -# define SPROUT_PP_VARIADIC_ELEM_63(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63, ...) e63 -#endif // #if SPROUT_PP_VARIADICS - -#endif // #ifndef SPROUT_PREPROCESSOR_VARIADIC_ELEM_HPP diff --git a/dsp/lib/sprout/sprout/preprocessor/variadic/size.hpp b/dsp/lib/sprout/sprout/preprocessor/variadic/size.hpp deleted file mode 100644 index aa5a42c..0000000 --- a/dsp/lib/sprout/sprout/preprocessor/variadic/size.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREPROCESSOR_VARIADIC_SIZE_HPP -#define SPROUT_PREPROCESSOR_VARIADIC_SIZE_HPP - -#include -#include -#include - -// -// SPROUT_PP_VARIADIC_SIZE -// -#if SPROUT_PP_VARIADICS -# if SPROUT_PP_VARIADICS_MSVC -# define SPROUT_PP_VARIADIC_SIZE(...) SPROUT_PP_CAT(SPROUT_PP_VARIADIC_SIZE_I(__VA_ARGS__, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,),) -# else -# define SPROUT_PP_VARIADIC_SIZE(...) SPROUT_PP_VARIADIC_SIZE_I(__VA_ARGS__, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,) -# endif -# define SPROUT_PP_VARIADIC_SIZE_I(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63, size, ...) size -#endif // #if SPROUT_PP_VARIADICS - -#endif // #ifndef SPROUT_PREPROCESSOR_VARIADIC_SIZE_HPP diff --git a/dsp/lib/sprout/sprout/preprocessor/wstr.hpp b/dsp/lib/sprout/sprout/preprocessor/wstr.hpp deleted file mode 100644 index cf82ce7..0000000 --- a/dsp/lib/sprout/sprout/preprocessor/wstr.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREPROCESSOR_WSTR_HPP -#define SPROUT_PREPROCESSOR_WSTR_HPP - -#include - -// -// SPROUT_PP_WSTR -// -#define SPROUT_PP_WSTR(str) SPROUT_PP_WSTR_I(str) -#define SPROUT_PP_WSTR_I(str) L ## str - -#endif // #ifndef SPROUT_PREPROCESSOR_WSTR_HPP diff --git a/dsp/lib/sprout/sprout/preprocessor/wstringize.hpp b/dsp/lib/sprout/sprout/preprocessor/wstringize.hpp deleted file mode 100644 index d9ea62f..0000000 --- a/dsp/lib/sprout/sprout/preprocessor/wstringize.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_PREPROCESSOR_WSTRINGIZE_HPP -#define SPROUT_PREPROCESSOR_WSTRINGIZE_HPP - -#include - -// -// SPROUT_PP_WSTRINGIZE -// -#define SPROUT_PP_WSTRINGIZE(text) SPROUT_PP_WSTRINGIZE_I(text) -#define SPROUT_PP_WSTRINGIZE_I(text) SPROUT_PP_WSTRINGIZE_II(#text) -#define SPROUT_PP_WSTRINGIZE_II(str) L ## str - -#endif // #ifndef SPROUT_PREPROCESSOR_WSTRINGIZE_HPP diff --git a/dsp/lib/sprout/sprout/random.hpp b/dsp/lib/sprout/sprout/random.hpp deleted file mode 100644 index 085ade5..0000000 --- a/dsp/lib/sprout/sprout/random.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_HPP -#define SPROUT_RANDOM_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANDOM_HPP diff --git a/dsp/lib/sprout/sprout/random/additive_combine.hpp b/dsp/lib/sprout/sprout/random/additive_combine.hpp deleted file mode 100644 index a0a5572..0000000 --- a/dsp/lib/sprout/sprout/random/additive_combine.hpp +++ /dev/null @@ -1,179 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_ADDITIVE_COMBINE_HPP -#define SPROUT_RANDOM_ADDITIVE_COMBINE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace random { - // - // additive_combine_engine - // - template - class additive_combine_engine { - public: - typedef MLCG1 base1_type; - typedef MLCG2 base2_type; - typedef base1_type first_base; - typedef base2_type second_base; - typedef typename base1_type::result_type result_type; - private: - static SPROUT_CONSTEXPR result_type static_min() SPROUT_NOEXCEPT { - return 1; - } - static SPROUT_CONSTEXPR result_type static_max() SPROUT_NOEXCEPT { - return base1_type::modulus - 1; - } - public: - struct private_construct_t {}; - private: - base1_type mlcg1_; - base2_type mlcg2_; - private: - SPROUT_CONSTEXPR additive_combine_engine( - base1_type const& mlcg1, base2_type const& mlcg2, - private_construct_t - ) - : mlcg1_(mlcg1), mlcg2_(mlcg2) - {} - template - SPROUT_CONSTEXPR sprout::random::random_result generate(Random1 const& rnd1, Random2 const& rnd2) const { - return sprout::random::random_result( - sprout::random::result(rnd2) < sprout::random::result(rnd1) - ? sprout::random::result(rnd1) - sprout::random::result(rnd2) - : sprout::random::result(rnd1) - sprout::random::result(rnd2) + base1_type::modulus - 1 - , - additive_combine_engine( - sprout::random::next(rnd1), sprout::random::next(rnd2), - private_construct_t() - ) - ); - } - public: - SPROUT_CONSTEXPR additive_combine_engine() - : mlcg1_(), mlcg2_() - {} - additive_combine_engine(additive_combine_engine const&) = default; - explicit SPROUT_CONSTEXPR additive_combine_engine(result_type seed) - : mlcg1_(seed), mlcg2_(seed) - {} - template::value>::type = sprout::enabler> - explicit SPROUT_CXX14_CONSTEXPR additive_combine_engine(Sseq& seq) - : mlcg1_(seq), mlcg2_(seq) - {} - template::value>::type = sprout::enabler> - explicit SPROUT_CONSTEXPR additive_combine_engine(Sseq const& seq) - : mlcg1_(seq), mlcg2_(seq) - {} - template - SPROUT_CONSTEXPR additive_combine_engine(ForwardIterator first, ForwardIterator last) - : mlcg1_(first, last), mlcg2_(first, last) - {} - SPROUT_CONSTEXPR additive_combine_engine(typename base1_type::result_type seed1, typename base2_type::result_type seed2) - : mlcg1_(seed1), mlcg2_(seed2) - {} - SPROUT_CONSTEXPR additive_combine_engine(base1_type const& rng1, base2_type const& rng2) - : mlcg1_(rng1), mlcg2_(rng2) - {} - SPROUT_CXX14_CONSTEXPR void seed() { - mlcg1_.seed(); - mlcg2_.seed(); - } - SPROUT_CXX14_CONSTEXPR void seed(result_type seed) { - mlcg1_.seed(seed); - mlcg2_.seed(seed); - } - template::value>::type = sprout::enabler> - SPROUT_CXX14_CONSTEXPR void seed(Sseq& seq) { - mlcg1_.seed(seq); - mlcg2_.seed(seq); - } - template::value>::type = sprout::enabler> - SPROUT_CXX14_CONSTEXPR void seed(Sseq const& seq) { - mlcg1_.seed(seq); - mlcg2_.seed(seq); - } - template - SPROUT_CXX14_CONSTEXPR void seed(ForwardIterator first, ForwardIterator last) { - mlcg1_.seed(first, last); - mlcg2_.seed(first, last); - } - SPROUT_CXX14_CONSTEXPR void seed(typename base1_type::result_type seed1, typename base2_type::result_type seed2) { - mlcg1_.seed(seed1); - mlcg2_.seed(seed2); - } - SPROUT_CONSTEXPR result_type min() const SPROUT_NOEXCEPT { - return 1; - } - SPROUT_CONSTEXPR result_type max() const SPROUT_NOEXCEPT { - return base1_type::modulus - 1; - } - SPROUT_CXX14_CONSTEXPR result_type operator()() { - result_type val1 = static_cast(mlcg1_()); - result_type val2 = static_cast(mlcg2_()); - return val2 < val1 - ? val1 - val2 - : val1 - val2 + base1_type::modulus - 1 - ; - } - SPROUT_CONSTEXPR sprout::random::random_result const operator()() const { - return generate(mlcg1_(), mlcg2_()); - } - SPROUT_CONSTEXPR base1_type const& base1() const SPROUT_NOEXCEPT { - return mlcg1_; - } - SPROUT_CONSTEXPR base2_type const& base2() const SPROUT_NOEXCEPT { - return mlcg2_; - } - friend SPROUT_CONSTEXPR bool operator==(additive_combine_engine const& lhs, additive_combine_engine const& rhs) SPROUT_NOEXCEPT { - return lhs.mlcg1_ == rhs.mlcg1_ && lhs.mlcg2_ == rhs.mlcg2_; - } - friend SPROUT_CONSTEXPR bool operator!=(additive_combine_engine const& lhs, additive_combine_engine const& rhs) SPROUT_NOEXCEPT { - return !(lhs == rhs); - } - template - friend SPROUT_NON_CONSTEXPR std::basic_istream& operator>>( - std::basic_istream& lhs, - additive_combine_engine& rhs - ) - { - return lhs >> rhs.mlcg1_ >> std::ws >> rhs.mlcg2_; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_ostream& operator<<( - std::basic_ostream& lhs, - additive_combine_engine const& rhs - ) - { - return lhs << rhs.mlcg1_ << ' ' << rhs.mlcg2_; - } - }; - - // - // ecuyer1988 - // - typedef sprout::random::additive_combine_engine< - sprout::random::linear_congruential_engine, - sprout::random::linear_congruential_engine - > ecuyer1988; - } // namespace random - - using sprout::random::additive_combine_engine; - using sprout::random::ecuyer1988; -} // namespace sprout - -#endif // #ifndef SPROUT_RANDOM_ADDITIVE_COMBINE_HPP diff --git a/dsp/lib/sprout/sprout/random/bernoulli_distribution.hpp b/dsp/lib/sprout/sprout/random/bernoulli_distribution.hpp deleted file mode 100644 index 4cba3d7..0000000 --- a/dsp/lib/sprout/sprout/random/bernoulli_distribution.hpp +++ /dev/null @@ -1,176 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_BERNOULLI_DISTRIBUTION_HPP -#define SPROUT_RANDOM_BERNOULLI_DISTRIBUTION_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace random { - // - // bernoulli_distribution - // - template - class bernoulli_distribution { - public: - typedef int input_type; - typedef bool result_type; - public: - // - // param_type - // - class param_type { - public: - typedef bernoulli_distribution distribution_type; - private: - RealType p_; - public: - SPROUT_CONSTEXPR param_type() - : p_(RealType(0.5)) - {} - param_type(param_type const&) = default; - explicit SPROUT_CONSTEXPR param_type(RealType p_arg) - : p_((SPROUT_ASSERT(p_arg >= RealType(0)), SPROUT_ASSERT(p_arg <= RealType(1)), p_arg)) - {} - SPROUT_CONSTEXPR RealType p() const SPROUT_NOEXCEPT { - return p_; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_istream& operator>>( - std::basic_istream& lhs, - param_type& rhs - ) - { - RealType p; - if (lhs >> p) { - if (p >= RealType(0) && p <= RealType(1)) { - rhs.p_ = p; - } else { - lhs.setstate(std::ios_base::failbit); - } - } - return lhs; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_ostream& operator<<( - std::basic_ostream& lhs, - param_type const& rhs - ) - { - return lhs << rhs.p_; - } - friend SPROUT_CONSTEXPR bool operator==(param_type const& lhs, param_type const& rhs) SPROUT_NOEXCEPT { - return lhs.p_ == rhs.p_; - } - friend SPROUT_CONSTEXPR bool operator!=(param_type const& lhs, param_type const& rhs) SPROUT_NOEXCEPT { - return !(lhs == rhs); - } - }; - private: - RealType p_; - private: - template - SPROUT_CONSTEXPR sprout::random::random_result generate( - EngineResult const& rnd - ) const - { - return sprout::random::random_result( - RealType(sprout::random::result(rnd) - sprout::random::next(rnd).min()) - <= p_ * RealType(sprout::random::next(rnd).max() - sprout::random::next(rnd).min()) - , - sprout::random::next(rnd), - *this - ); - } - public: - SPROUT_CONSTEXPR bernoulli_distribution() SPROUT_NOEXCEPT - : p_(RealType(0.5)) - {} - bernoulli_distribution(bernoulli_distribution const&) = default; - explicit SPROUT_CONSTEXPR bernoulli_distribution(RealType p_arg) - : p_((SPROUT_ASSERT(p_arg >= RealType(0)), SPROUT_ASSERT(p_arg <= RealType(1)), p_arg)) - {} - explicit SPROUT_CONSTEXPR bernoulli_distribution(param_type const& parm) SPROUT_NOEXCEPT - : p_(parm.p()) - {} - SPROUT_CONSTEXPR RealType p() const SPROUT_NOEXCEPT { - return p_; - } - SPROUT_CONSTEXPR result_type min() const SPROUT_NOEXCEPT { - return false; - } - SPROUT_CONSTEXPR result_type max() const SPROUT_NOEXCEPT { - return true; - } - SPROUT_CXX14_CONSTEXPR void reset() SPROUT_NOEXCEPT {} - SPROUT_CONSTEXPR param_type param() const SPROUT_NOEXCEPT { - return param_type(p_); - } - SPROUT_CXX14_CONSTEXPR void param(param_type const& parm) { - p_ = parm.p(); - } - template - SPROUT_CXX14_CONSTEXPR result_type operator()(Engine& eng) const { - typedef typename Engine::result_type base_result; - return p_ == RealType(0) - ? false - : RealType(static_cast(eng()) - eng.min()) <= p_ * RealType(eng.max() - eng.min()) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result const operator()(Engine const& eng) const { - return p_ == RealType(0) - ? sprout::random::random_result(false, eng, *this) - : generate(eng()) - ; - } - template - SPROUT_CXX14_CONSTEXPR result_type operator()(Engine& eng, param_type const& parm) const { - return bernoulli_distribution(parm)(eng); - } - template - SPROUT_CONSTEXPR sprout::random::random_result const operator()(Engine const& eng, param_type const& parm) const { - return bernoulli_distribution(parm)(eng); - } - template - friend SPROUT_NON_CONSTEXPR std::basic_istream& operator>>( - std::basic_istream& lhs, - bernoulli_distribution& rhs - ) - { - param_type parm; - if (lhs >> parm) { - rhs.param(parm); - } - return lhs; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_ostream& operator<<( - std::basic_ostream& lhs, - bernoulli_distribution const& rhs - ) - { - return lhs << rhs.param(); - } - friend SPROUT_CONSTEXPR bool operator==(bernoulli_distribution const& lhs, bernoulli_distribution const& rhs) SPROUT_NOEXCEPT { - return lhs.param() == rhs.param(); - } - friend SPROUT_CONSTEXPR bool operator!=(bernoulli_distribution const& lhs, bernoulli_distribution const& rhs) SPROUT_NOEXCEPT { - return !(lhs == rhs); - } - }; - } // namespace random - - using sprout::random::bernoulli_distribution; -} // namespace sprout - -#endif // #ifndef SPROUT_RANDOM_BERNOULLI_DISTRIBUTION_HPP diff --git a/dsp/lib/sprout/sprout/random/binomial_distribution.hpp b/dsp/lib/sprout/sprout/random/binomial_distribution.hpp deleted file mode 100644 index 40e5cee..0000000 --- a/dsp/lib/sprout/sprout/random/binomial_distribution.hpp +++ /dev/null @@ -1,806 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_BINOMIAL_DISTRIBUTION_HPP -#define SPROUT_RANDOM_BINOMIAL_DISTRIBUTION_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef SPROUT_WORKAROUND_NOT_TERMINATE_RECURSIVE_CONSTEXPR_FUNCTION_TEMPLATE -# include -#endif - -namespace sprout { - namespace random { - namespace detail { -# define SPROUT_BINOMIAL_TABLE_DEF \ - {{ \ - 1, \ - 1, \ - 2, \ - 6, \ - 24, \ - 120 \ - }} - - template - struct binomial_table { - public: - typedef sprout::array table_type; - public: - SPROUT_STATIC_CONSTEXPR table_type table - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(SPROUT_BINOMIAL_TABLE_DEF) - ; - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::random::detail::binomial_table::table_type - sprout::random::detail::binomial_table::table - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(SPROUT_BINOMIAL_TABLE_DEF) - ; - -# undef SPROUT_BINOMIAL_TABLE_DEF - } // namespace detail - // - // binomial_distribution - // - template - class binomial_distribution { - public: - typedef RealType input_type; - typedef IntType result_type; - private: - struct btrd_type { - public: - RealType r; - RealType nr; - RealType npq; - RealType b; - RealType a; - RealType c; - RealType alpha; - RealType v_r; - RealType u_rv_r; - }; - public: - // - // param_type - // - class param_type { - public: - typedef binomial_distribution distribution_type; - private: - IntType t_; - RealType p_; - public: - SPROUT_CONSTEXPR param_type() - : t_(1) - , p_(0.5) - {} - param_type(param_type const&) = default; - explicit SPROUT_CONSTEXPR param_type(IntType t_arg, RealType p_arg = RealType(0.5)) - : t_((SPROUT_ASSERT(t_arg >= IntType(0)), t_arg)) - , p_((SPROUT_ASSERT(RealType(0) <= p_arg && p_arg <= RealType(1)), p_arg)) - {} - SPROUT_CONSTEXPR IntType t() const SPROUT_NOEXCEPT { - return t_; - } - SPROUT_CONSTEXPR RealType p() const SPROUT_NOEXCEPT { - return p_; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_istream& operator>>( - std::basic_istream& lhs, - param_type& rhs - ) - { - IntType t; - RealType p; - if (lhs >> t >> std::ws >> p) { - if (t >= IntType(0) && RealType(0) <= p && p <= RealType(1)) { - rhs.t_ = t; - rhs.p_ = p; - } else { - lhs.setstate(std::ios_base::failbit); - } - } - return lhs; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_ostream& operator<<( - std::basic_ostream& lhs, - param_type const& rhs - ) - { - return lhs << rhs.t_ << " " << rhs.p_; - } - friend SPROUT_CONSTEXPR bool operator==(param_type const& lhs, param_type const& rhs) SPROUT_NOEXCEPT { - return lhs.t_ == rhs.t_ && lhs.p_ == rhs.p_; - } - friend SPROUT_CONSTEXPR bool operator!=(param_type const& lhs, param_type const& rhs) SPROUT_NOEXCEPT { - return !(lhs == rhs); - } - }; - private: - static SPROUT_CONSTEXPR IntType init_t(IntType t) { - return t; - } - static SPROUT_CONSTEXPR RealType init_p(RealType p) { - return RealType(0.5) < p ? 1 - p : p; - } - static SPROUT_CONSTEXPR IntType init_m(IntType t, RealType p) { - return static_cast((init_t(t) + 1) * init_p(p)); - } - static SPROUT_CONSTEXPR btrd_type - init_btrd_6( - IntType, RealType, RealType r, RealType nr, RealType npq, - RealType b, RealType a, RealType c, RealType alpha, RealType v_r - ) - { - return btrd_type{ - r, nr, npq, - b, a, c, alpha, v_r, - RealType(0.86) * v_r - }; - } - static SPROUT_CONSTEXPR btrd_type - init_btrd_5( - IntType t, RealType p, RealType r, RealType nr, RealType npq, - RealType sqrt_npq, RealType b - ) - { - return init_btrd_6( - t, p, r, nr, npq, b, - RealType(-0.0873) + RealType(0.0248) * b + RealType(0.01) * p, - t * p + RealType(0.5), - (RealType(2.83) + RealType(5.1) / b) * sqrt_npq, RealType(0.92) - RealType(4.2) / b - ); - } - static SPROUT_CONSTEXPR btrd_type init_btrd_4(IntType t, RealType p, RealType r, RealType nr, RealType npq, RealType sqrt_npq) { - return init_btrd_5(t, p, r, nr, npq, sqrt_npq, RealType(1.15) + RealType(2.53) * sqrt_npq); - } - static SPROUT_CONSTEXPR btrd_type init_btrd_3(IntType t, RealType p, RealType r, RealType nr, RealType npq) { - return init_btrd_4(t, p, r, nr, npq, sprout::sqrt(npq)); - } - static SPROUT_CONSTEXPR btrd_type init_btrd_2(IntType t, RealType p, RealType r) { - return init_btrd_3(t, p, r, (t + 1) * r, t * p * (1 - p)); - } - static SPROUT_CONSTEXPR btrd_type init_btrd_1(IntType t, RealType p) { - return init_btrd_2(t, p, p / (1 - p)); - } - static SPROUT_CONSTEXPR btrd_type init_btrd(IntType t, RealType p) { - return init_btrd_1(init_t(t), init_p(p)); - } - static SPROUT_CONSTEXPR RealType init_q_n(IntType t, RealType p) { - return sprout::pow(1 - init_p(p), static_cast(init_t(t))); - } - static SPROUT_CONSTEXPR bool init_use_inversion(IntType t, RealType p) { - return init_m(t, p) < 11; - } - static SPROUT_CONSTEXPR RealType fc_1(RealType ikp1) { - return (RealType(1) / 12 - (RealType(1) / 360 - (RealType(1) / 1260) * (ikp1 * ikp1)) * (ikp1 * ikp1)) * ikp1; - } - static SPROUT_CONSTEXPR RealType fc(IntType k) { - return k < 10 - ? sprout::random::detail::binomial_table::table[k] - : fc_1(RealType(1) / (k + 1)) - ; - } - private: - IntType t_; - RealType p_; - IntType m_; - btrd_type btrd_; - RealType q_n_; - private: - SPROUT_CONSTEXPR bool use_inversion() const { - return m_ < 11; - } - template - SPROUT_CXX14_CONSTEXPR result_type - invert(IntType t, RealType p, Engine& eng) const { - RealType q = 1 - p; - RealType s = p / q; - RealType a = (t + 1) * s; - RealType r = q_n_; - RealType u = static_cast(sprout::random::uniform_01()(eng)); - IntType x = 0; - while (u > r) { - u = u - r; - ++x; - r = ((a / x) - s) * r; - } - return x; - } - template - SPROUT_CXX14_CONSTEXPR result_type - generate_cxx14(Engine& eng) const { - for (; ; ) { - RealType u = RealType(); - RealType v = static_cast(sprout::random::uniform_01()(eng)); - if (v <= btrd_.u_rv_r) { - RealType u = v / btrd_.v_r - RealType(0.43); - return static_cast(sprout::math::floor((2 * btrd_.a / (RealType(0.5) - sprout::math::abs(u)) + btrd_.b) * u + btrd_.c)); - } - - if (v >= btrd_.v_r) { - u = static_cast(sprout::random::uniform_01()(eng)) - RealType(0.5); - } else { - u = v / btrd_.v_r - RealType(0.93); - u = ((u < 0) ? -RealType(0.5) : RealType(0.5)) - u; - v = static_cast(sprout::random::uniform_01()(eng)) * btrd_.v_r; - } - RealType us = RealType(0.5) - sprout::math::abs(u); - IntType k = static_cast(sprout::math::floor((2 * btrd_.a / us + btrd_.b) * u + btrd_.c)); - if (k < 0 || k > t_) { - continue; - } - v = v * btrd_.alpha / (btrd_.a / (us * us) + btrd_.b); - RealType km = sprout::math::abs(k - m_); - if (km <= 15) { - RealType f = RealType(1); - if (m_ < k) { - IntType i = m_; - do { - ++i; - f = f * (btrd_.nr / i - btrd_.r); - } while (i != k); - } else if (m_ > k) { - IntType i = k; - do { - ++i; - v = v * (btrd_.nr / i - btrd_.r); - } while (i != m_); - } - if (v <= f) { - return k; - } else { - continue; - } - } else { - v = sprout::math::log(v); - RealType rho = (km / btrd_.npq) * (((km / RealType(3) + RealType(0.625)) * km + RealType(1) / 6) / btrd_.npq + RealType(0.5)); - RealType t = -km * km / (2 * btrd_.npq); - if (v < t - rho) { - return k; - } - if (v > t + rho) { - continue; - } - IntType nm = t_ - m_ + 1; - RealType h = (m_ + RealType(0.5)) * sprout::math::log((m_ + 1) / (btrd_.r * nm)) + fc(m_) + fc(t_ - m_); - IntType nk = t_ - k + 1; - if (v <= h + (t_ + 1) * sprout::math::log(static_cast(nm) / nk) - + (k + RealType(0.5)) * sprout::math::log(nk * btrd_.r / (k + 1)) - fc(k) - fc(t_ - k) - ) - { - return k; - } else { - continue; - } - } - } - } - template - SPROUT_CONSTEXPR sprout::random::random_result - invert_4(Engine const& eng, RealType u, RealType q, RealType s, RealType a, RealType r, IntType x = 0) const { - return u > r - ? invert_4(eng, u - r, q, s, a, ((a / (x + 1)) - s) * r, x + 1) - : sprout::random::random_result(x, eng, *this) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result - invert_3(IntType t, Engine const& eng, RealType u, RealType q, RealType s) const { - return invert_4(eng, u, q, s, (t + 1) * s, q_n_); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - invert_2(IntType t, RealType p, Engine const& eng, RealType u, RealType q) const { - return invert_3(t, eng, u, q, p / q); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - invert_1(IntType t, RealType p, Engine const& eng, RealType u) const { - return invert_2(t, p, eng, u, 1 - p); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - invert_0(IntType t, RealType p, Random const& rnd) const { - return invert_1(t, p, sprout::random::next(rnd).engine(), sprout::random::result(rnd)); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - invert(IntType t, RealType p, Engine const& eng) const { - return invert_0(t, p, sprout::random::uniform_01()(eng)); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - invert2_0(IntType t, sprout::random::random_result const& rnd) const { - return sprout::random::random_result( - t - sprout::random::result(rnd), - sprout::random::next(rnd).engine(), - sprout::random::next(rnd).distribution() - ); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - invert2(IntType t, RealType p, Engine const& eng) const { - return invert2_0(t, invert(t, p, eng)); - } -#ifdef SPROUT_WORKAROUND_NOT_TERMINATE_RECURSIVE_CONSTEXPR_FUNCTION_TEMPLATE - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_10(Engine const& eng, RealType v, IntType k, IntType nm, RealType h, IntType nk) const { - return v <= h + (t_ + 1) * sprout::math::log(static_cast(nm) / nk) - + (k + RealType(0.5)) * sprout::math::log(nk * btrd_.r / (k + 1)) - fc(k) - fc(t_ - k) - ? sprout::random::random_result(k, eng, *this) - : generate(eng) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_10(Engine const&, RealType, IntType, IntType, RealType, IntType) const { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_9(Engine const& eng, RealType v, IntType k, IntType nm) const { - return generate_10( - eng, v, k, nm, (m_ + RealType(0.5)) * sprout::math::log((m_ + 1) / (btrd_.r * nm)) + fc(m_) + fc(t_ - m_), t_ - k + 1 - ); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_9(Engine const&, RealType, IntType, IntType) const { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_8(Engine const& eng, RealType v, IntType k, RealType rho, RealType t) const { - return v < t - rho ? sprout::random::random_result(k, eng, *this) - : v > t + rho ? generate(eng) - : generate_9(eng, v, k, t_ - m_ + 1) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_8(Engine const&, RealType, IntType, RealType, RealType) const { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_7_3(Engine const& eng, RealType v, IntType k, RealType f) const { - return v <= f - ? sprout::random::random_result(k, eng, *this) - : generate(eng) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_7_3(Engine const&, RealType, IntType, RealType) const { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_7_2(Engine const& eng, RealType v, IntType k, RealType f, IntType i) const { - return i != k - ? generate_7_2(eng, v * (btrd_.nr / (i + 1) - btrd_.r), k, f, i + 1) - : generate_7_3(eng, v, k, f) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_7_2(Engine const&, RealType, IntType, RealType, IntType) const { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_7_1(Engine const& eng, RealType v, IntType k, RealType f, IntType i) const { - return i != k - ? generate_7_1(eng, v, k, f * (btrd_.nr / (i + 1) - btrd_.r), i + 1) - : generate_7_3(eng, v, k, f) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_7_1(Engine const&, RealType, IntType, RealType, IntType) const { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_7(Engine const& eng, RealType v, IntType k, RealType f = RealType(1)) const { - return m_ < k ? generate_7_1(eng, v, k, f * (btrd_.nr / (m_ + 1) - btrd_.r), m_ + 1) - : m_ > k ? generate_7_2(eng, v * (btrd_.nr / (k + 1) - btrd_.r), k, f, k + 1) - : generate_7_3(eng, v, k, f) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_7(Engine const&, RealType, IntType, RealType = RealType(1)) const { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_6(Engine const& eng, RealType v, IntType k, RealType km) const { - return km <= 15 - ? generate_7(eng, v, k) - : generate_8( - eng, sprout::math::log(v), k, - (km / btrd_.npq) * (((km / RealType(3) + RealType(0.625)) * km + RealType(1) / 6) / btrd_.npq + RealType(0.5)), - -km * km / (2 * btrd_.npq)) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_6(Engine const&, RealType, IntType, RealType) const { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_5(Engine const& eng, RealType v, RealType us, IntType k) const { - return k < 0 || k > t_ - ? generate(eng) - : generate_6(eng, v * btrd_.alpha / (btrd_.a / (us * us) + btrd_.b), k, sprout::abs(k - m_)) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_5(Engine const&, RealType, RealType, IntType) const { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_4(Engine const& eng, RealType v, RealType u, RealType us) const { - return generate_5(eng, v, us, static_cast(sprout::math::floor((2 * btrd_.a / us + btrd_.b) * u + btrd_.c))); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_4(Engine const&, RealType, RealType, RealType) const { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_3(Engine const& eng, RealType v, RealType u) const { - return generate_4(eng, v, u, 0.5 - sprout::abs(u)); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_3(Engine const&, RealType, RealType) const { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_2(Random const& rnd, RealType v) const { - return v >= btrd_.v_r - ? generate_3( - sprout::random::next(rnd).engine(), v, - sprout::random::result(rnd) - RealType(0.5) - ) - : generate_3( - sprout::random::next(rnd).engine(), sprout::random::result(rnd) * btrd_.v_r, - ((v / btrd_.v_r - RealType(0.93)) < 0 ? RealType(-0.5) : RealType(0.5)) - (v / btrd_.v_r - RealType(0.93)) - ) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_2(Random const&, RealType) const { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_1_1(Engine const& eng, RealType u) const { - return sprout::random::random_result( - static_cast(sprout::math::floor((2 * btrd_.a / (RealType(0.5) - sprout::abs(u)) + btrd_.b) * u + btrd_.c)), - eng, *this - ); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_1_1(Engine const&, RealType) const { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_1(Engine const& eng, RealType v) const { - return v <= btrd_.u_rv_r - ? generate_1_1(eng, v / btrd_.v_r - RealType(0.43)) - : generate_2(sprout::random::uniform_01()(eng), v) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_1(Engine const&, RealType) const { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_0(Random const& rnd) const { - return generate_1(sprout::random::next(rnd).engine(), sprout::random::result(rnd)); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_0(Random const&) const { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate(Engine const& eng) const { - return generate_0(sprout::random::uniform_01()(eng)); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate(Engine const&) const { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } -#else - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_10(Engine const& eng, RealType v, IntType k, IntType nm, RealType h, IntType nk) const { - return v <= h + (t_ + 1) * sprout::math::log(static_cast(nm) / nk) - + (k + RealType(0.5)) * sprout::math::log(nk * btrd_.r / (k + 1)) - fc(k) - fc(t_ - k) - ? sprout::random::random_result(k, eng, *this) - : generate(eng) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_9(Engine const& eng, RealType v, IntType k, IntType nm) const { - return generate_10( - eng, v, k, nm, (m_ + RealType(0.5)) * sprout::math::log((m_ + 1) / (btrd_.r * nm)) + fc(m_) + fc(t_ - m_), t_ - k + 1 - ); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_8(Engine const& eng, RealType v, IntType k, RealType rho, RealType t) const { - return v < t - rho ? sprout::random::random_result(k, eng, *this) - : v > t + rho ? generate(eng) - : generate_9(eng, v, k, t_ - m_ + 1) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_7_3(Engine const& eng, RealType v, IntType k, RealType f) const { - return v <= f - ? sprout::random::random_result(k, eng, *this) - : generate(eng) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_7_2(Engine const& eng, RealType v, IntType k, RealType f, IntType i) const { - return i != k - ? generate_7_2(eng, v * (btrd_.nr / (i + 1) - btrd_.r), k, f, i + 1) - : generate_7_3(eng, v, k, f) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_7_1(Engine const& eng, RealType v, IntType k, RealType f, IntType i) const { - return i != k - ? generate_7_1(eng, v, k, f * (btrd_.nr / (i + 1) - btrd_.r), i + 1) - : generate_7_3(eng, v, k, f) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_7(Engine const& eng, RealType v, IntType k, RealType f = RealType(1)) const { - return m_ < k ? generate_7_1(eng, v, k, f * (btrd_.nr / (m_ + 1) - btrd_.r), m_ + 1) - : m_ > k ? generate_7_2(eng, v * (btrd_.nr / (k + 1) - btrd_.r), k, f, k + 1) - : generate_7_3(eng, v, k, f) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_6(Engine const& eng, RealType v, IntType k, RealType km) const { - return km <= 15 - ? generate_7(eng, v, k) - : generate_8( - eng, sprout::math::log(v), k, - (km / btrd_.npq) * (((km / RealType(3.0) + RealType(0.625)) * km + RealType(1.0) / 6) / btrd_.npq + RealType(0.5)), - -km * km / (2 * btrd_.npq)) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_5(Engine const& eng, RealType v, RealType, RealType us, IntType k) const { - return k < 0 || k > t_ - ? generate(eng) - : generate_6(eng, v * btrd_.alpha / (btrd_.a / (us * us) + btrd_.b), k, sprout::abs(k - m_)) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_4(Engine const& eng, RealType v, RealType u, RealType us) const { - return generate_5(eng, v, u, us, static_cast(sprout::math::floor((2 * btrd_.a / us + btrd_.b) * u + btrd_.c))); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_3(Engine const& eng, RealType v, RealType u) const { - return generate_4(eng, v, u, 0.5 - sprout::abs(u)); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_2(Random const& rnd, RealType v) const { - return v >= btrd_.v_r - ? generate_3( - sprout::random::next(rnd).engine(), - v, - sprout::random::result(rnd) - RealType(0.5) - ) - : generate_3( - sprout::random::next(rnd).engine(), - sprout::random::result(rnd) * btrd_.v_r, - ((v / btrd_.v_r - RealType(0.93)) < 0 ? RealType(-0.5) : RealType(0.5)) - (v / btrd_.v_r - RealType(0.93)) - ) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_1_1(Engine const& eng, RealType u) const { - return sprout::random::random_result( - static_cast(sprout::math::floor((2 * btrd_.a / (RealType(0.5) - sprout::abs(u)) + btrd_.b) * u + btrd_.c)), - eng, - *this - ); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_1(Engine const& eng, RealType v) const { - return v <= btrd_.u_rv_r - ? generate_1_1(eng, v / btrd_.v_r - RealType(0.43)) - : generate_2(sprout::random::uniform_01()(eng), v) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_0(Random const& rnd) const { - return generate_1(sprout::random::next(rnd).engine(), sprout::random::result(rnd)); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate(Engine const& eng) const { - return generate_0(sprout::random::uniform_01()(eng)); - } -#endif - template - SPROUT_CONSTEXPR sprout::random::random_result - generate2_0(IntType t, sprout::random::random_result const& rnd) const { - return sprout::random::random_result( - t - sprout::random::result(rnd), - sprout::random::next(rnd).engine(), - sprout::random::next(rnd).distribution() - ); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate2(IntType t, Engine const& eng) const { - return generate2_0(t, generate(eng)); - } - SPROUT_CXX14_CONSTEXPR void init() { - m_ = init_m(t_, p_); - if (use_inversion()) { - q_n_ = init_q_n(t_, p_); - } else { - btrd_ = init_btrd(t_, p_); - } - } - public: - SPROUT_CONSTEXPR binomial_distribution() - : t_(1) - , p_(RealType(0.5)) - , m_(init_m(1, RealType(0.5))) - , btrd_(!init_use_inversion(1, RealType(0.5)) ? init_btrd(1, RealType(0.5)) : btrd_type()) - , q_n_(init_use_inversion(1, RealType(0.5)) ? init_q_n(1, RealType(0.5)) : RealType()) - {} - binomial_distribution(binomial_distribution const&) = default; - explicit SPROUT_CONSTEXPR binomial_distribution(IntType t_arg, RealType p_arg = RealType(0.5)) - : t_((SPROUT_ASSERT(t_arg >= IntType(0)), t_arg)) - , p_((SPROUT_ASSERT(RealType(0) <= p_arg && p_arg <= RealType(1)), p_arg)) - , m_(init_m(t_arg, p_arg)) - , btrd_(!init_use_inversion(t_arg, p_arg) ? init_btrd(t_arg, p_arg) : btrd_type()) - , q_n_(init_use_inversion(t_arg, p_arg) ? init_q_n(t_arg, p_arg) : RealType()) - {} - explicit SPROUT_CONSTEXPR binomial_distribution(param_type const& parm) - : t_(parm.t()) - , p_(parm.p()) - , m_(init_m(parm.t(), parm.p())) - , btrd_(!init_use_inversion(parm.t(), parm.p()) ? init_btrd(parm.t(), parm.p()) : btrd_type()) - , q_n_(init_use_inversion(parm.t(), parm.p()) ? init_q_n(parm.t(), parm.p()) : RealType()) - {} - SPROUT_CONSTEXPR result_type t() const SPROUT_NOEXCEPT { - return t_; - } - SPROUT_CONSTEXPR result_type p() const SPROUT_NOEXCEPT { - return p_; - } - SPROUT_CONSTEXPR result_type min() const SPROUT_NOEXCEPT { - return 0; - } - SPROUT_CONSTEXPR result_type max() const SPROUT_NOEXCEPT { - return t_; - } - SPROUT_CXX14_CONSTEXPR void reset() SPROUT_NOEXCEPT {} - SPROUT_CONSTEXPR param_type param() const SPROUT_NOEXCEPT { - return param_type(t_, p_); - } - SPROUT_CXX14_CONSTEXPR void param(param_type const& parm) { - t_ = parm.t(); - p_ = parm.p(); - init(); - } - template - SPROUT_CXX14_CONSTEXPR result_type operator()(Engine& eng) const { - return use_inversion() ? RealType(0.5) < p_ - ? t_ - invert(t_, 1 - p_, eng) - : invert(t_, p_, eng) - : RealType(0.5) < p_ ? t_ - generate_cxx14(eng) - : generate_cxx14(eng) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result const operator()(Engine const& eng) const { - return use_inversion() ? RealType(0.5) < p_ - ? invert2(t_, 1 - p_, eng) - : invert(t_, p_, eng) - : RealType(0.5) < p_ ? generate2(t_, eng) - : generate(eng) - ; - } - template - SPROUT_CXX14_CONSTEXPR result_type operator()(Engine& eng, param_type const& parm) const { - return binomial_distribution(parm)(eng); - } - template - SPROUT_CONSTEXPR sprout::random::random_result const operator()(Engine const& eng, param_type const& parm) const { - return binomial_distribution(parm)(eng); - } - template - friend SPROUT_NON_CONSTEXPR std::basic_istream& operator>>( - std::basic_istream& lhs, - binomial_distribution& rhs - ) - { - param_type parm; - if (lhs >> parm) { - rhs.param(parm); - } - return lhs; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_ostream& operator<<( - std::basic_ostream& lhs, - binomial_distribution const& rhs - ) - { - return lhs << rhs.param(); - } - friend SPROUT_CONSTEXPR bool operator==(binomial_distribution const& lhs, binomial_distribution const& rhs) SPROUT_NOEXCEPT { - return lhs.param() == rhs.param(); - } - friend SPROUT_CONSTEXPR bool operator!=(binomial_distribution const& lhs, binomial_distribution const& rhs) SPROUT_NOEXCEPT { - return !(lhs == rhs); - } - }; - } // namespace random - - using sprout::random::binomial_distribution; -} // namespace sprout - -#endif // #ifndef SPROUT_RANDOM_BINOMIAL_DISTRIBUTION_HPP diff --git a/dsp/lib/sprout/sprout/random/default_random_engine.hpp b/dsp/lib/sprout/sprout/random/default_random_engine.hpp deleted file mode 100644 index b446766..0000000 --- a/dsp/lib/sprout/sprout/random/default_random_engine.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_DEFAULT_RANDOM_ENGINE_HPP -#define SPROUT_RANDOM_DEFAULT_RANDOM_ENGINE_HPP - -#include -#include - -namespace sprout { - namespace random { - // - // default_random_engine - // - typedef sprout::random::minstd_rand0 default_random_engine; - } // namespace random - - using sprout::random::default_random_engine; -} // namespace sprout - -#endif // #ifndef SPROUT_RANDOM_DEFAULT_RANDOM_ENGINE_HPP diff --git a/dsp/lib/sprout/sprout/random/detail/const_mod.hpp b/dsp/lib/sprout/sprout/random/detail/const_mod.hpp deleted file mode 100644 index f0c6551..0000000 --- a/dsp/lib/sprout/sprout/random/detail/const_mod.hpp +++ /dev/null @@ -1,218 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_DETAIL_CONST_MOD_HPP -#define SPROUT_RANDOM_DETAIL_CONST_MOD_HPP - -#include -#include -#include -#include -#ifdef SPROUT_WORKAROUND_NOT_TERMINATE_RECURSIVE_CONSTEXPR_FUNCTION_TEMPLATE -# include -#endif - -namespace sprout { - namespace random { - namespace detail { - template - class const_mod { - private: - typedef typename std::make_unsigned::type unsigned_type; - private: - SPROUT_STATIC_CONSTEXPR IntType supress_warnings = m == 0; - SPROUT_STATIC_CONSTEXPR IntType modulus = m + supress_warnings; - private: - static_assert(supress_warnings == 0, "supress_warnings == 0"); - static_assert(modulus == m, "modulus == m"); - private: - static SPROUT_CONSTEXPR IntType pow_1(IntType a, std::uintmax_t exponent, IntType result = 1) { - return exponent != 0 - ? pow_1(mult(a, a), exponent / 2, exponent % 2 == 1 ? mult(result, a) : result) - : result - ; - } - static SPROUT_CONSTEXPR IntType mult_small(IntType a, IntType x) { - return a * x % (m + supress_warnings); - } - static SPROUT_CONSTEXPR IntType mult_schrage_1(IntType a, IntType value, IntType q, IntType r) { - return SPROUT_ASSERT(r < q), - sub(a * (value % q), r * (value / q)) - ; - } - static SPROUT_CONSTEXPR IntType mult_schrage(IntType a, IntType value) { - return mult_schrage_1(a, value, m / a, m % a); - } - static SPROUT_CONSTEXPR IntType mult_general(IntType a, IntType b) { - return std::uintmax_t(modulus) <= sprout::numeric_limits::max() / modulus - ? static_cast(std::uintmax_t(a) * b % modulus) - //: static_cast(sprout::random::detail::mulmod(a, b, modulus)) // ??? - : (SPROUT_ASSERT_MSG(0, "Sorry, not implemented."), IntType()) - ; - } - static SPROUT_CONSTEXPR IntType sub(IntType a, IntType b) { - return a < b ? m - (b - a) : a - b; - } - static SPROUT_CONSTEXPR unsigned_type unsigned_m() { - return m == 0 ? unsigned_type((sprout::numeric_limits::max)()) + 1 : unsigned_type(m); - } -#ifdef SPROUT_WORKAROUND_NOT_TERMINATE_RECURSIVE_CONSTEXPR_FUNCTION_TEMPLATE - template - static SPROUT_CONSTEXPR IntType invert_euclidian_3(IntType c, IntType l1, IntType l2, IntType n, IntType p) { - return n == 0 ? m - l1 : invert_euclidian_1(c, l1, l2, n, p); - } - template - static SPROUT_CONSTEXPR IntType invert_euclidian_3(IntType, IntType, IntType, IntType, IntType) { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - static SPROUT_CONSTEXPR IntType invert_euclidian_2(IntType c, IntType l1, IntType l2, IntType n, IntType p) { - return p == 0 ? l2 : invert_euclidian_3(c, l1, l2 + (n / p) * l1, n - (n / p) * p, p); - } - template - static SPROUT_CONSTEXPR IntType invert_euclidian_2(IntType, IntType, IntType, IntType, IntType) { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - static SPROUT_CONSTEXPR IntType invert_euclidian_1(IntType c, IntType l1, IntType l2, IntType n, IntType p) { - return invert_euclidian_2(c, l1 + (p / n) * l2, l2, n, p - (p / n) * n); - } - template - static SPROUT_CONSTEXPR IntType invert_euclidian_1(IntType, IntType, IntType, IntType, IntType) { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - static SPROUT_CONSTEXPR IntType invert_euclidian(IntType c) { - return SPROUT_ASSERT(c > 0), - c == 1 ? 1 : invert_euclidian_1(c, 0, 1, c, m) - ; - } - template - static SPROUT_CONSTEXPR IntType invert_euclidian(IntType) { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - static SPROUT_CONSTEXPR IntType invert_euclidian0_3(IntType c, IntType l1, IntType l2, IntType n, IntType p) { - return n == 0 ? m - l1 : invert_euclidian0_2(c, l1 + (p / n) * l2, l2, n, p - (p / n) * n); - } - template - static SPROUT_CONSTEXPR IntType invert_euclidian0_3(IntType, IntType, IntType, IntType, IntType) { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - static SPROUT_CONSTEXPR IntType invert_euclidian0_2(IntType c, IntType l1, IntType l2, IntType n, IntType p) { - return p == 0 ? l2 : invert_euclidian0_3(c, l1, l2 + (n / p) * l1, n - (n / p) * p, p); - } - template - static SPROUT_CONSTEXPR IntType invert_euclidian0_2(IntType, IntType, IntType, IntType, IntType) { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - static SPROUT_CONSTEXPR IntType invert_euclidian0_1(IntType c, IntType l1, IntType l2, IntType n) { - return SPROUT_ASSERT_MSG(sprout::numeric_limits::max() % n != n - 1, "c must be relatively prime to m."), - invert_euclidian0_2( - c, l1 + (sprout::numeric_limits::max() / n) * l2, l2, n, - sprout::numeric_limits::max() - (sprout::numeric_limits::max() / n) * n + 1 - ) - ; - } - template - static SPROUT_CONSTEXPR IntType invert_euclidian0_1(IntType, IntType, IntType, IntType) { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - static SPROUT_CONSTEXPR IntType invert_euclidian0(IntType c) { - return SPROUT_ASSERT(c > 0), - c == 1 ? 1 : invert_euclidian0_1(c, 0, 1, c) - ; - } - template - static SPROUT_CONSTEXPR IntType invert_euclidian0(IntType) { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } -#else - static SPROUT_CONSTEXPR IntType invert_euclidian_3(IntType c, IntType l1, IntType l2, IntType n, IntType p) { - return n == 0 ? m - l1 : invert_euclidian_1(c, l1, l2, n, p); - } - static SPROUT_CONSTEXPR IntType invert_euclidian_2(IntType c, IntType l1, IntType l2, IntType n, IntType p) { - return p == 0 ? l2 : invert_euclidian_3(c, l1, l2 + (n / p) * l1, n - (n / p) * p, p); - } - static SPROUT_CONSTEXPR IntType invert_euclidian_1(IntType c, IntType l1, IntType l2, IntType n, IntType p) { - return invert_euclidian_2(c, l1 + (p / n) * l2, l2, n, p - (p / n) * n); - } - static SPROUT_CONSTEXPR IntType invert_euclidian(IntType c) { - return SPROUT_ASSERT(c > 0), - c == 1 ? 1 : invert_euclidian_1(c, 0, 1, c, m) - ; - } - static SPROUT_CONSTEXPR IntType invert_euclidian0_3(IntType c, IntType l1, IntType l2, IntType n, IntType p) { - return n == 0 ? m - l1 : invert_euclidian0_2(c, l1 + (p / n) * l2, l2, n, p - (p / n) * n); - } - static SPROUT_CONSTEXPR IntType invert_euclidian0_2(IntType c, IntType l1, IntType l2, IntType n, IntType p) { - return p == 0 ? l2 : invert_euclidian0_3(c, l1, l2 + (n / p) * l1, n - (n / p) * p, p); - } - static SPROUT_CONSTEXPR IntType invert_euclidian0_1(IntType c, IntType l1, IntType l2, IntType n) { - return SPROUT_ASSERT_MSG(sprout::numeric_limits::max() % n != n - 1, "c must be relatively prime to m."), - invert_euclidian0_2( - c, l1 + (sprout::numeric_limits::max() / n) * l2, l2, n, - sprout::numeric_limits::max() - (sprout::numeric_limits::max() / n) * n + 1 - ) - ; - } - static SPROUT_CONSTEXPR IntType invert_euclidian0(IntType c) { - return SPROUT_ASSERT(c > 0), - c == 1 ? 1 : invert_euclidian0_1(c, 0, 1, c) - ; - } -#endif - public: - static SPROUT_CONSTEXPR IntType apply(IntType x) { - return ((unsigned_m() - 1) & unsigned_m()) == 0 - ? (unsigned_type(x)) & (unsigned_m() - 1) - : x % (m + supress_warnings) - ; - } - static SPROUT_CONSTEXPR IntType add(IntType x, IntType c) { - return ((unsigned_m() - 1) & unsigned_m()) == 0 ? (unsigned_type(x) + unsigned_type(c)) & (unsigned_m() - 1) - : c == 0 ? x - : x < m - c ? x + c - : x - (m - c) - ; - } - static SPROUT_CONSTEXPR IntType mult(IntType a, IntType x) { - return ((unsigned_m() - 1) & unsigned_m()) == 0 ? unsigned_type(a) * unsigned_type(x) & (unsigned_m() - 1) - : a == 0 ? 0 - : a == 1 ? x - : m <= sprout::numeric_limits::max() / a ? mult_small(a, x) - : sprout::numeric_limits::is_signed && (m % a < m / a) ? mult_schrage(a, x) - : mult_general(a, x) - ; - } - static SPROUT_CONSTEXPR IntType mult_add(IntType a, IntType x, IntType c) { - return ((unsigned_m() - 1) & unsigned_m()) == 0 ? (unsigned_type(a) * unsigned_type(x) + unsigned_type(c)) & (unsigned_m() - 1) - : a == 0 ? c - : m <= (sprout::numeric_limits::max() - c) / a ? (a * x + c) % (m + supress_warnings) - : add(mult(a, x), c) - ; - } - static SPROUT_CONSTEXPR IntType pow(IntType a, std::uintmax_t exponent) { - return pow_1(a, exponent); - } - static SPROUT_CONSTEXPR IntType invert(IntType x) { - return x == 0 ? 0 - : m == 0 ? invert_euclidian0(x) - : invert_euclidian(x) - ; - } - private: - const_mod() SPROUT_DELETED_FUNCTION_DECL - }; - } // namespace detail - } // namespace random -} // namespace sprout - -#endif // #ifndef SPROUT_RANDOM_DETAIL_CONST_MOD_HPP diff --git a/dsp/lib/sprout/sprout/random/detail/generator_bits.hpp b/dsp/lib/sprout/sprout/random/detail/generator_bits.hpp deleted file mode 100644 index d11ef7a..0000000 --- a/dsp/lib/sprout/sprout/random/detail/generator_bits.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_DETAIL_GENERATOR_BITS_HPP -#define SPROUT_RANDOM_DETAIL_GENERATOR_BITS_HPP - -#include -#include -#include - -namespace sprout { - namespace random { - namespace detail { - template - struct generator_bits { - public: - static SPROUT_CONSTEXPR std::size_t value() { - return sprout::numeric_limits::digits; - } - }; - } // namespace detail - } // namespace random -} // namespace sprout - -#endif // #ifndef SPROUT_RANDOM_DETAIL_GENERATOR_BITS_HPP diff --git a/dsp/lib/sprout/sprout/random/detail/ptr_helper.hpp b/dsp/lib/sprout/sprout/random/detail/ptr_helper.hpp deleted file mode 100644 index 13b0f39..0000000 --- a/dsp/lib/sprout/sprout/random/detail/ptr_helper.hpp +++ /dev/null @@ -1,79 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_DETAIL_PTR_HELPER_HPP -#define SPROUT_RANDOM_DETAIL_PTR_HELPER_HPP - -#include - -namespace sprout { - namespace random { - namespace detail { - template - struct ptr_helper { - typedef T value_type; - typedef T& reference_type; - typedef T const& const_reference_type; - typedef T const& rvalue_type; - static reference_type ref(T& r) { - return r; - } - static SPROUT_CONSTEXPR const_reference_type ref(T const& r) { - return r; - } - }; - template - struct ptr_helper { - typedef T value_type; - typedef T& reference_type; - typedef T const& const_reference_type; - typedef T& rvalue_type; - static reference_type ref(T& r) { - return r; - } - static SPROUT_CONSTEXPR const_reference_type ref(T const& r) { - return r; - } - }; - template - struct ptr_helper { - typedef T value_type; - typedef T const& reference_type; - typedef T const& const_reference_type; - typedef T const& rvalue_type; - static SPROUT_CONSTEXPR const_reference_type ref(T const& r) { - return r; - } - }; - template - struct ptr_helper { - typedef T value_type; - typedef T& reference_type; - typedef T const& const_reference_type; - typedef T* rvalue_type; - static reference_type ref(T* p) { - return *p; - } - static SPROUT_CONSTEXPR const_reference_type ref(T const* p) { - return *p; - } - }; - template - struct ptr_helper { - typedef T value_type; - typedef T const& reference_type; - typedef T const& const_reference_type; - typedef T const* rvalue_type; - static SPROUT_CONSTEXPR const_reference_type ref(T const* p) { - return *p; - } - }; - } // namespace detail - } // namespace random -} // namespace sprout - -#endif // #ifndef SPROUT_RANDOM_DETAIL_PTR_HELPER_HPP diff --git a/dsp/lib/sprout/sprout/random/detail/seed_impl.hpp b/dsp/lib/sprout/sprout/random/detail/seed_impl.hpp deleted file mode 100644 index 2b7409c..0000000 --- a/dsp/lib/sprout/sprout/random/detail/seed_impl.hpp +++ /dev/null @@ -1,115 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_DETAIL_SEED_IMPL_HPP -#define SPROUT_RANDOM_DETAIL_SEED_IMPL_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace random { - namespace detail { - template - struct seed_log - : public std::conditional< - m == 0, - sprout::integral_constant::digits>, - sprout::integral_constant::value> - >::type - {}; - template - struct seed_k - : public sprout::integral_constant< - int, - (log + ((~(IntType(2) << (log - 1)) & m) ? 32 : 31)) / 32 - > - {}; - - template - inline SPROUT_CONSTEXPR IntType - seed_one_int_impl(Array const& arr, IntType s, int j) { - return j < k ? sprout::random::detail::seed_one_int_impl( - arr, - sprout::random::detail::const_mod::mult_add( - IntType(1) << 32 * j, - sprout::random::detail::const_mod::apply(IntType(arr[j + 3])), - s - ), - j + 1 - ) - : s - ; - } - template - inline SPROUT_CONSTEXPR IntType - seed_one_int(Sseq const& seq) { - typedef typename sprout::random::detail::seed_log::type log_t; - typedef typename sprout::random::detail::seed_k::type k_t; - return sprout::random::detail::seed_one_int_impl( - seq.generate(sprout::pit >()), - 0, 0 - ); - } - template - inline SPROUT_CXX14_CONSTEXPR IntType - seed_one_int(Sseq& seq) { - typedef typename sprout::random::detail::seed_log::type log_t; - typedef typename sprout::random::detail::seed_k::type k_t; - sprout::array arr{{}}; - seq.generate(arr.begin(), arr.begin() + (k_t::value + 3)); - IntType s = 0; - for (int j = 0; j < k_t::value; ++j) { - IntType digit = sprout::random::detail::const_mod::apply(IntType(arr[j + 3])); - IntType mult = IntType(1) << 32 * j; - s = sprout::random::detail::const_mod::mult_add(mult, digit, s); - } - return s; - } - - template - inline SPROUT_CONSTEXPR IntType - get_one_int_impl(InputIterator first, InputIterator last, IntType s, int j) { - return j < k - ? first != last - ? sprout::random::detail::get_one_int_impl( - sprout::next(first), last, - sprout::random::detail::const_mod::mult_add( - IntType(1) << 32 * j, - sprout::random::detail::const_mod::apply(IntType(*first)), - s - ), - j + 1 - ) - : throw std::invalid_argument("Not enough elements in call to seed.") - : s - ; - } - template - inline SPROUT_CONSTEXPR IntType - get_one_int(InputIterator first, InputIterator last) { - typedef typename sprout::random::detail::seed_log::type log_t; - typedef typename sprout::random::detail::seed_k::type k_t; - return sprout::random::detail::get_one_int_impl( - first, last, - 0, 0 - ); - } - } // namespace detail - } // namespace random -} // namespace sprout - -#endif // #ifndef SPROUT_RANDOM_DETAIL_SEED_IMPL_HPP diff --git a/dsp/lib/sprout/sprout/random/detail/signed_unsigned_tools.hpp b/dsp/lib/sprout/sprout/random/detail/signed_unsigned_tools.hpp deleted file mode 100644 index 4fc9dc5..0000000 --- a/dsp/lib/sprout/sprout/random/detail/signed_unsigned_tools.hpp +++ /dev/null @@ -1,69 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_DETAIL_SIGNED_UNSIGNED_TOOLS_HPP -#define SPROUT_RANDOM_DETAIL_SIGNED_UNSIGNED_TOOLS_HPP - -#include -#include -#include - -namespace sprout { - namespace random { - namespace detail { - template::is_signed> - struct subtract {}; - template - struct subtract { - public: - typedef T result_type; - public: - SPROUT_CONSTEXPR result_type operator()(T x, T y) const { - return x - y; - } - }; - template - struct subtract { - public: - typedef typename std::make_unsigned::type result_type; - public: - SPROUT_CONSTEXPR result_type operator()(T x, T y) const { - return y >= 0 ? result_type(x) - result_type(y) - : x >= 0 ? result_type(x) + result_type(-(y + 1)) + 1 - : result_type(x - y) - ; - } - }; - - template::is_signed> - struct add {}; - template - struct add { - public: - typedef T2 result_type; - public: - SPROUT_CONSTEXPR result_type operator()(T1 x, T2 y) const { - return T2(x) + y; - } - }; - template - struct add { - public: - typedef T2 result_type; - public: - SPROUT_CONSTEXPR result_type operator()(T1 x, T2 y) const { - return y >= 0 ? T2(x) + y - : x >= T1(-(y + 1)) ? T2(x - T1(-(y + 1)) - 1) - : T2(x) + y - ; - } - }; - } // namespace detail - } // namespace random -} // namespace sprout - -#endif // SPROUT_RANDOM_DETAIL_SIGNED_UNSIGNED_TOOLS_HPP diff --git a/dsp/lib/sprout/sprout/random/detail/uniform_int_float.hpp b/dsp/lib/sprout/sprout/random/detail/uniform_int_float.hpp deleted file mode 100644 index ce43cc1..0000000 --- a/dsp/lib/sprout/sprout/random/detail/uniform_int_float.hpp +++ /dev/null @@ -1,84 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_DETAIL_UNIFORM_INT_FLOAT_HPP -#define SPROUT_RANDOM_DETAIL_UNIFORM_INT_FLOAT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace random { - namespace detail { - template - class uniform_int_float { - public: - typedef URNG base_type; - typedef typename base_type::result_type base_result; - typedef typename sprout::detail::uint_t< - (sprout::numeric_limits::digits < sprout::numeric_limits::digits) - ? sprout::numeric_limits::digits - : sprout::numeric_limits::digits - >::fast result_type; - private: - base_type rng_; - private: - SPROUT_CONSTEXPR sprout::random::random_result generate( - sprout::random::random_result const& rnd - ) const - { - return sprout::random::random_result( - static_cast(sprout::random::result(rnd) * (static_cast(max()) + 1)), - uniform_int_float(sprout::random::next(rnd)) - ); - } - public: - SPROUT_CONSTEXPR uniform_int_float() - : rng_() - {} - explicit SPROUT_CONSTEXPR uniform_int_float(base_type const& rng) - : rng_(rng) - {} - SPROUT_CONSTEXPR result_type min() const { - return 0; - } - SPROUT_CONSTEXPR result_type max() const { - return ( - result_type(2) << ( - NS_SSCRISK_CEL_OR_SPROUT::min( - sprout::numeric_limits::digits, - sprout::random::detail::generator_bits::value() - ) - 1 - ) - ) - 1 - ; - } - base_type& base() { - return rng_; - } - SPROUT_CONSTEXPR base_type const& base() const { - return rng_; - } - SPROUT_CXX14_CONSTEXPR result_type operator()() { - return static_cast(static_cast(rng_()) * static_cast(max()) + 1); - } - SPROUT_CONSTEXPR sprout::random::random_result const operator()() const { - return generate(rng_()); - } - }; - } // namespace detail - } // namespace random -} // namespace sprout - -#endif // #ifndef SPROUT_RANDOM_DETAIL_UNIFORM_INT_FLOAT_HPP diff --git a/dsp/lib/sprout/sprout/random/distribution.hpp b/dsp/lib/sprout/sprout/random/distribution.hpp deleted file mode 100644 index eb7de5e..0000000 --- a/dsp/lib/sprout/sprout/random/distribution.hpp +++ /dev/null @@ -1,22 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_DISTRIBUTION_HPP -#define SPROUT_RANDOM_DISTRIBUTION_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANDOM_DISTRIBUTION_HPP diff --git a/dsp/lib/sprout/sprout/random/engine.hpp b/dsp/lib/sprout/sprout/random/engine.hpp deleted file mode 100644 index dda034d..0000000 --- a/dsp/lib/sprout/sprout/random/engine.hpp +++ /dev/null @@ -1,22 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_ENGINE_HPP -#define SPROUT_RANDOM_ENGINE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANDOM_ENGINE_HPP diff --git a/dsp/lib/sprout/sprout/random/generate_array.hpp b/dsp/lib/sprout/sprout/random/generate_array.hpp deleted file mode 100644 index b1c1f9c..0000000 --- a/dsp/lib/sprout/sprout/random/generate_array.hpp +++ /dev/null @@ -1,90 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_GENERATE_ARRAY_HPP -#define SPROUT_RANDOM_GENERATE_ARRAY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace random { - // - // generate_array - // - template - inline SPROUT_CXX14_CONSTEXPR sprout::array - generate_array(RandomNumberGenerator& rng) { - sprout::array result{{}}; - for (std::size_t i = 0; i != N; ++i) { - result[i] = rng(); - } - return result; - } - template - inline SPROUT_CXX14_CONSTEXPR sprout::array::type::result_type, N> - generate_array(RandomNumberGenerator& rng, Distribution&& dist) { - sprout::array::type::result_type, N> result{{}}; - for (std::size_t i = 0; i != N; ++i) { - result[i] = SPROUT_FORWARD(Distribution, dist)(rng); - } - return result; - } - - namespace detail { - template - static SPROUT_CONSTEXPR typename std::enable_if< - (sizeof...(Args) + 1 == N), - sprout::pair< - sprout::array::type, N>, - typename sprout::generators::results::next_generator::type - > const - >::type generate_array_impl(Random const& rnd, Args const&... args) { - typedef sprout::pair< - sprout::array::type, N>, - typename sprout::generators::results::next_generator::type - > const pair_type; - return pair_type{ - sprout::array{{args..., sprout::random::result(rnd)}}, - sprout::random::next(rnd) - }; - } - template - static SPROUT_CONSTEXPR typename std::enable_if< - (sizeof...(Args) + 1 < N), - sprout::pair< - sprout::array::type, N>, - typename sprout::generators::results::next_generator::type - > const - >::type generate_array_impl(Random const& rnd, Args const&... args) { - return sprout::random::detail::generate_array_impl( - sprout::random::next(rnd)(), - args..., sprout::random::result(rnd) - ); - } - } // namespace detail - // - // generate_array - // - template - inline SPROUT_CONSTEXPR sprout::pair< - sprout::array::type, N>, - typename sprout::generators::results::next_generator::type - > const - generate_array(RandomNumberGenerator const& rng) { - return sprout::random::detail::generate_array_impl(rng()); - } - } // namespace random -} // namespace sprout - -#endif // #ifndef SPROUT_RANDOM_GENERATE_ARRAY_HPP diff --git a/dsp/lib/sprout/sprout/random/generate_canonical.hpp b/dsp/lib/sprout/sprout/random/generate_canonical.hpp deleted file mode 100644 index 8b73069..0000000 --- a/dsp/lib/sprout/sprout/random/generate_canonical.hpp +++ /dev/null @@ -1,240 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_GENERATE_CANONICAL_HPP -#define SPROUT_RANDOM_GENERATE_CANONICAL_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace random { - namespace detail { - template - inline SPROUT_CXX14_CONSTEXPR RealType - generate_canonical_impl(URNG& rng, std::true_type) { - typedef typename URNG::result_type base_result; - RealType r = RealType(rng.max()) - RealType(rng.min()) + 1; - RealType mult = r; - RealType limit = sprout::math::pow( - RealType(2), - RealType(NS_SSCRISK_CEL_OR_SPROUT::min(bits, static_cast(sprout::numeric_limits::digits))) - ); - RealType s = RealType(sprout::random::detail::subtract()(static_cast(rng()), rng.min())); - while (mult < limit) { - s += RealType(sprout::random::detail::subtract()(static_cast(rng()), rng.min())) * mult; - mult *= r; - } - return s / mult; - } - - template - inline SPROUT_CXX14_CONSTEXPR RealType - generate_canonical_impl(URNG& rng, std::false_type) { - typedef typename URNG::result_type base_result; - SPROUT_ASSERT(rng.min() == 0); - SPROUT_ASSERT(rng.max() == 1); - RealType r = sprout::math::pow(RealType(2), RealType(sprout::random::detail::generator_bits::value())); - RealType limit = sprout::math::pow( - RealType(2), - RealType(NS_SSCRISK_CEL_OR_SPROUT::min(bits, static_cast(sprout::numeric_limits::digits))) - ); - RealType s = RealType(static_cast(rng()) - rng.min()); - RealType mult = r; - while (mult < limit) { - s += sprout::math::floor((RealType(static_cast(rng())) - RealType(rng.min())) * r) * mult; - mult *= r; - } - return s / mult; - } - } // namespace detail - // - // generate_canonical - // - template::digits, typename URNG> - inline SPROUT_CXX14_CONSTEXPR RealType - generate_canonical(URNG& rng) { - RealType result = sprout::random::detail::generate_canonical_impl( - rng, - std::is_integral() - ); - SPROUT_ASSERT(result >= 0); - SPROUT_ASSERT(result <= 1); - if (result == 1) { - result -= sprout::numeric_limits::epsilon() / 2; - SPROUT_ASSERT(result != 1); - } - return result; - } - - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::pair const - generate_canonical_impl_1_1(RealType r, RealType limit, RealType s, RealType mult, Random const& rnd) { - typedef typename URNG::result_type base_result; - typedef sprout::pair const pair_type; - return mult * r < limit ? sprout::random::detail::generate_canonical_impl_1_1( - r, limit, - s + RealType( - sprout::random::detail::subtract()( - sprout::random::result(rnd), - sprout::random::next(rnd).min() - ) - ) * mult, - mult * r, - rnd() - ) - : pair_type( - (s + RealType( - sprout::random::detail::subtract()( - sprout::random::result(rnd), - sprout::random::next(rnd).min() - ) - ) * mult) / (mult * r), - sprout::random::next(rnd) - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair const - generate_canonical_impl_1_0(RealType r, RealType limit, Random const& rnd) { - typedef typename URNG::result_type base_result; - typedef sprout::pair const pair_type; - return r < limit ? sprout::random::detail::generate_canonical_impl_1_1( - r, limit, - RealType( - sprout::random::detail::subtract()( - sprout::random::result(rnd), - sprout::random::next(rnd).min() - ) - ), - r, - rnd() - ) - : pair_type( - RealType( - sprout::random::detail::subtract()( - sprout::random::result(rnd), - sprout::random::next(rnd).min() - ) - ) / r, - sprout::random::next(rnd) - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair const - generate_canonical_impl(URNG const& rng, std::true_type) { - return sprout::random::detail::generate_canonical_impl_1_0( - RealType(rng.max()) - RealType(rng.min()) + 1, - sprout::math::pow( - RealType(2), - RealType(NS_SSCRISK_CEL_OR_SPROUT::min(bits, static_cast(sprout::numeric_limits::digits))) - ), - rng() - ); - } - - template - inline SPROUT_CONSTEXPR sprout::pair const - generate_canonical_impl_0_1(RealType r, RealType limit, RealType s, RealType mult, Random const& rnd) { - typedef sprout::pair const pair_type; - return mult * r < limit ? sprout::random::detail::generate_canonical_impl_0_1( - r, limit, - s + sprout::math::floor( - (RealType(sprout::random::result(rnd)) - RealType(sprout::random::next(rnd).min())) * r - ) * mult, - mult * r, - rnd() - ) - : pair_type( - (s + sprout::math::floor( - (RealType(sprout::random::result(rnd)) - RealType(sprout::random::next(rnd).min())) * r - ) * mult) / (mult * r), - sprout::random::next(rnd) - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair const - generate_canonical_impl_0_0(RealType r, RealType limit, Random const& rnd) { - typedef sprout::pair const pair_type; - return r < limit ? sprout::random::detail::generate_canonical_impl_0_1( - r, limit, - RealType(sprout::random::result(rnd) - sprout::random::next(rnd).min()), - r, - rnd() - ) - : pair_type( - RealType(sprout::random::result(rnd) - sprout::random::next(rnd).min()) / r, - sprout::random::next(rnd) - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair const - generate_canonical_impl(URNG const& rng, std::false_type) { - return SPROUT_ASSERT(rng.min() == 0), SPROUT_ASSERT(rng.max() == 1), - sprout::random::detail::generate_canonical_impl_0_0( - sprout::math::pow(RealType(2), RealType(sprout::random::detail::generator_bits::value())), - sprout::math::pow( - RealType(2), - RealType(NS_SSCRISK_CEL_OR_SPROUT::min(bits, static_cast(sprout::numeric_limits::digits))) - ), - rng() - ); - } - - template - inline SPROUT_CONSTEXPR sprout::pair const - generate_canonical_check_1(sprout::pair const& res) { - return SPROUT_ASSERT(res.first != 1), - res - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair const - generate_canonical_check(sprout::pair const& res) { - typedef sprout::pair const pair_type; - return SPROUT_ASSERT(res.first >= 0), SPROUT_ASSERT(res.first <= 1), - res.first == 0 ? generate_canonical_check_1( - pair_type(res.first - sprout::numeric_limits::epsilon() / 2, res.second) - ) - : res - ; - } - } // namespace detail - // - // generate_canonical - // - template::digits, typename URNG> - inline SPROUT_CONSTEXPR sprout::pair const - generate_canonical(URNG const& rng) { - return sprout::random::detail::generate_canonical_check( - sprout::random::detail::generate_canonical_impl( - rng, - std::is_integral() - ) - ); - } - } // namespace random - - using sprout::random::generate_canonical; -} // namespace sprout - -#endif // #ifndef SPROUT_RANDOM_GENERATE_CANONICAL_HPP diff --git a/dsp/lib/sprout/sprout/random/geometric_distribution.hpp b/dsp/lib/sprout/sprout/random/geometric_distribution.hpp deleted file mode 100644 index 6135ac3..0000000 --- a/dsp/lib/sprout/sprout/random/geometric_distribution.hpp +++ /dev/null @@ -1,184 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_GEOMETRIC_DISTRIBUTION_HPP -#define SPROUT_RANDOM_GEOMETRIC_DISTRIBUTION_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace random { - // - // geometric_distribution - // - template - class geometric_distribution { - public: - typedef RealType input_type; - typedef IntType result_type; - public: - // - // param_type - // - class param_type { - public: - typedef geometric_distribution distribution_type; - private: - RealType p_; - public: - SPROUT_CONSTEXPR param_type() - : p_(RealType(0.5)) - {} - param_type(param_type const&) = default; - explicit SPROUT_CONSTEXPR param_type(RealType p_arg) - : p_((SPROUT_ASSERT(RealType(0) < p_arg), SPROUT_ASSERT(p_arg < RealType(1)), p_arg)) - {} - SPROUT_CONSTEXPR RealType p() const SPROUT_NOEXCEPT { - return p_; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_istream& operator>>( - std::basic_istream& lhs, - param_type& rhs - ) - { - RealType p; - if (lhs >> p) { - if (RealType(0) < p && p < RealType(1)) { - rhs.p_ = p; - } else { - lhs.setstate(std::ios_base::failbit); - } - } - return lhs; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_ostream& operator<<( - std::basic_ostream& lhs, - param_type const& rhs - ) - { - return lhs << rhs.p_; - } - friend SPROUT_CONSTEXPR bool operator==(param_type const& lhs, param_type const& rhs) SPROUT_NOEXCEPT { - return lhs.p_ == rhs.p_; - } - friend SPROUT_CONSTEXPR bool operator!=(param_type const& lhs, param_type const& rhs) SPROUT_NOEXCEPT { - return !(lhs == rhs); - } - }; - private: - static SPROUT_CONSTEXPR RealType init_log_1mp(RealType p) { - return sprout::math::log(1 - p); - } - private: - RealType p_; - RealType log_1mp_; - private: - template - SPROUT_CONSTEXPR sprout::random::random_result generate_1(Random const& rnd) const { - return sprout::random::random_result( - static_cast(sprout::math::floor(sprout::math::log(RealType(1) - sprout::random::result(rnd)) / log_1mp_)), - sprout::random::next(rnd).engine(), - *this - ); - } - template - SPROUT_CONSTEXPR sprout::random::random_result generate(Engine const& eng) const { - return generate_1(sprout::random::uniform_01()(eng)); - } - public: - SPROUT_CONSTEXPR geometric_distribution() - : p_(RealType(0.5)) - , log_1mp_(init_log_1mp(RealType(0.5))) - {} - geometric_distribution(geometric_distribution const&) = default; - explicit SPROUT_CONSTEXPR geometric_distribution(RealType p_arg) - : p_((SPROUT_ASSERT(RealType(0) < p_arg), SPROUT_ASSERT(p_arg < RealType(1)), p_arg)) - , log_1mp_(init_log_1mp(p_arg)) - {} - explicit SPROUT_CONSTEXPR geometric_distribution(param_type const& parm) - : p_(parm.p()) - , log_1mp_(init_log_1mp(parm.p())) - {} - SPROUT_CONSTEXPR result_type p() const SPROUT_NOEXCEPT { - return p_; - } - SPROUT_CONSTEXPR result_type min() const SPROUT_NOEXCEPT { - return 0; - } - SPROUT_CONSTEXPR result_type max() const SPROUT_NOEXCEPT { - return sprout::numeric_limits::max(); - } - SPROUT_CXX14_CONSTEXPR void reset() SPROUT_NOEXCEPT {} - SPROUT_CONSTEXPR param_type param() const SPROUT_NOEXCEPT { - return param_type(p_); - } - SPROUT_CXX14_CONSTEXPR void param(param_type const& parm) { - p_ = parm.p(); - log_1mp_ = init_log_1mp(p_); - } - template - SPROUT_CXX14_CONSTEXPR result_type operator()(Engine& eng) const { - return static_cast( - sprout::math::floor(sprout::math::log(RealType(1) - static_cast(sprout::random::uniform_01()(eng))) / log_1mp_) - ); - } - template - SPROUT_CONSTEXPR sprout::random::random_result const operator()(Engine const& eng) const { - return generate(eng); - } - template - SPROUT_CXX14_CONSTEXPR result_type operator()(Engine& eng, param_type const& parm) const { - return geometric_distribution(parm)(eng); - } - template - SPROUT_CONSTEXPR sprout::random::random_result const operator()(Engine const& eng, param_type const& parm) const { - return geometric_distribution(parm)(eng); - } - template - friend SPROUT_NON_CONSTEXPR std::basic_istream& operator>>( - std::basic_istream& lhs, - geometric_distribution& rhs - ) - { - param_type parm; - if (lhs >> parm) { - rhs.param(parm); - } - return lhs; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_ostream& operator<<( - std::basic_ostream& lhs, - geometric_distribution const& rhs - ) - { - return lhs << rhs.param(); - } - friend SPROUT_CONSTEXPR bool operator==(geometric_distribution const& lhs, geometric_distribution const& rhs) SPROUT_NOEXCEPT { - return lhs.param() == rhs.param(); - } - friend SPROUT_CONSTEXPR bool operator!=(geometric_distribution const& lhs, geometric_distribution const& rhs) SPROUT_NOEXCEPT { - return !(lhs == rhs); - } - }; - } // namespace random - - using sprout::random::geometric_distribution; -} // namespace sprout - -#endif // #ifndef SPROUT_RANDOM_GEOMETRIC_DISTRIBUTION_HPP diff --git a/dsp/lib/sprout/sprout/random/inversive_congruential.hpp b/dsp/lib/sprout/sprout/random/inversive_congruential.hpp deleted file mode 100644 index eda6daf..0000000 --- a/dsp/lib/sprout/sprout/random/inversive_congruential.hpp +++ /dev/null @@ -1,185 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_INVERSIVE_CONGRUENTIAL_HPP -#define SPROUT_RANDOM_INVERSIVE_CONGRUENTIAL_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace random { - // - // inversive_congruential_engine - // - template - class inversive_congruential_engine { - public: - typedef IntType result_type; - private: - struct private_construct_t {}; - public: - SPROUT_STATIC_CONSTEXPR result_type multiplier = a; - SPROUT_STATIC_CONSTEXPR result_type increment = b; - SPROUT_STATIC_CONSTEXPR result_type modulus = p; - SPROUT_STATIC_CONSTEXPR result_type default_seed = 1; - public: - static SPROUT_CONSTEXPR result_type static_min() SPROUT_NOEXCEPT { - return increment == 0 ? 1 : 0; - } - static SPROUT_CONSTEXPR result_type static_max() SPROUT_NOEXCEPT { - return modulus - 1; - } - static SPROUT_CONSTEXPR result_type init_seed_3(result_type x0) { - return SPROUT_ASSERT(sprout::math::greater_equal(x0, static_min())), SPROUT_ASSERT(x0 <= static_max()), x0; - } - static SPROUT_CONSTEXPR result_type init_seed_2(result_type x0) { - return init_seed_3(increment == 0 && x0 == 0 ? 1 : x0); - } - static SPROUT_CONSTEXPR result_type init_seed_1(result_type x0) { - return init_seed_2(x0 <= 0 && x0 != 0 ? x0 + modulus : x0); - } - static SPROUT_CONSTEXPR result_type init_seed(result_type x0 = default_seed) { - return init_seed_1(modulus == 0 ? x0 : x0 % modulus); - } - template::value>::type = sprout::enabler> - static SPROUT_CXX14_CONSTEXPR result_type init_seed(Sseq& seq) { - return init_seed(sprout::random::detail::seed_one_int(seq)); - } - template::value>::type = sprout::enabler> - static SPROUT_CONSTEXPR result_type init_seed(Sseq const& seq) { - return init_seed(sprout::random::detail::seed_one_int(seq)); - } - template - static SPROUT_CONSTEXPR result_type init_seed(InputIterator first, InputIterator last) { - return init_seed(sprout::random::detail::get_one_int(first, last)); - } - private: - result_type x_; - private: - SPROUT_CONSTEXPR inversive_congruential_engine(result_type x, private_construct_t) - : x_(x) - {} - SPROUT_CONSTEXPR sprout::random::random_result - generate(result_type result) const { - return sprout::random::random_result( - result, - inversive_congruential_engine(result, private_construct_t()) - ); - } - public: - SPROUT_CONSTEXPR inversive_congruential_engine() - : x_(init_seed(default_seed)) - {} - inversive_congruential_engine(inversive_congruential_engine const&) = default; - explicit SPROUT_CONSTEXPR inversive_congruential_engine(result_type x0) - : x_(init_seed(x0)) - {} - template::value>::type = sprout::enabler> - explicit SPROUT_CXX14_CONSTEXPR inversive_congruential_engine(Sseq& seq) - : x_(init_seed(seq)) - {} - template::value>::type = sprout::enabler> - explicit SPROUT_CONSTEXPR inversive_congruential_engine(Sseq const& seq) - : x_(init_seed(seq)) - {} - template - SPROUT_CONSTEXPR inversive_congruential_engine(InputIterator first, InputIterator last) - : x_(init_seed(first, last)) - {} - SPROUT_CXX14_CONSTEXPR void seed(result_type x0 = default_seed) { - x_ = init_seed(x0); - } - template::value>::type = sprout::enabler> - SPROUT_CXX14_CONSTEXPR void seed(Sseq& seq) { - x_ = init_seed(seq); - } - template::value>::type = sprout::enabler> - SPROUT_CXX14_CONSTEXPR void seed(Sseq const& seq) { - x_ = init_seed(seq); - } - template - SPROUT_CXX14_CONSTEXPR void seed(InputIterator first, InputIterator last) { - x_ = init_seed(first, last); - } - SPROUT_CONSTEXPR result_type min() const SPROUT_NOEXCEPT { - return static_min(); - } - SPROUT_CONSTEXPR result_type max() const SPROUT_NOEXCEPT { - return static_max(); - } - SPROUT_CXX14_CONSTEXPR result_type operator()() { - typedef sprout::random::detail::const_mod do_mod; - x_ = do_mod::mult_add(a, do_mod::invert(x_), b); - return x_; - } - SPROUT_CONSTEXPR sprout::random::random_result const operator()() const { - typedef sprout::random::detail::const_mod do_mod; - return generate(do_mod::mult_add(a, do_mod::invert(x_), b)); - } - friend SPROUT_CONSTEXPR bool operator==(inversive_congruential_engine const& lhs, inversive_congruential_engine const& rhs) SPROUT_NOEXCEPT { - return lhs.x_ == rhs.x_; - } - friend SPROUT_CONSTEXPR bool operator!=(inversive_congruential_engine const& lhs, inversive_congruential_engine const& rhs) SPROUT_NOEXCEPT { - return !(lhs == rhs); - } - template - friend SPROUT_NON_CONSTEXPR std::basic_istream& operator>>( - std::basic_istream& lhs, - inversive_congruential_engine& rhs - ) - { - result_type x; - if (lhs >> x) { - if (sprout::math::greater_equal(x, static_min()) && x <= static_max()) { - rhs.x_ = x; - } else { - lhs.setstate(std::ios_base::failbit); - } - } - return lhs; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_ostream& operator<<( - std::basic_ostream& lhs, - inversive_congruential_engine const& rhs - ) - { - return lhs << rhs.x_; - } - }; - template - SPROUT_CONSTEXPR_OR_CONST IntType sprout::random::inversive_congruential_engine::multiplier; - template - SPROUT_CONSTEXPR_OR_CONST IntType sprout::random::inversive_congruential_engine::increment; - template - SPROUT_CONSTEXPR_OR_CONST IntType sprout::random::inversive_congruential_engine::modulus; - template - SPROUT_CONSTEXPR_OR_CONST IntType sprout::random::inversive_congruential_engine::default_seed; - - // - // hellekalek1995 - // - typedef sprout::random::inversive_congruential_engine hellekalek1995; - } // namespace random - - using sprout::random::inversive_congruential_engine; - using sprout::random::hellekalek1995; -} // namespace sprout - -#endif // #ifndef SPROUT_RANDOM_INVERSIVE_CONGRUENTIAL_HPP diff --git a/dsp/lib/sprout/sprout/random/iterator.hpp b/dsp/lib/sprout/sprout/random/iterator.hpp deleted file mode 100644 index e8a52ae..0000000 --- a/dsp/lib/sprout/sprout/random/iterator.hpp +++ /dev/null @@ -1,74 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_ITERATOR_HPP -#define SPROUT_RANDOM_ITERATOR_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace random { - // - // begin - // - template< - typename Engine, typename Distribution, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR auto - begin( - Engine const& engine, Distribution const& distribution, - typename sprout::generator_iterator::type>::difference_type count = -1 - ) - -> sprout::generator_iterator::type> - { - return count >= 0 - ? sprout::generator_iterator::type>(distribution(engine), count) - : sprout::generator_iterator::type>(distribution(engine)) - ; - } - template - inline SPROUT_CONSTEXPR auto - begin( - Engine const& engine, - typename sprout::generator_iterator::type>::difference_type count = -1 - ) - -> sprout::generator_iterator::type> - { - return count >= 0 - ? sprout::generator_iterator::type>(engine(), count) - : sprout::generator_iterator::type>(engine()) - ; - } - - // - // end - // - template< - typename Engine, typename Distribution, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR auto - end(Engine const& engine, Distribution const& distribution) - -> sprout::generator_iterator::type> - { - return sprout::generator_iterator::type>(); - } - template - inline SPROUT_CONSTEXPR auto - end(Engine const& engine) - -> sprout::generator_iterator::type> - { - return sprout::generator_iterator::type>(); - } - } // namespace random -} // namespace sprout - -#endif // #ifndef SPROUT_RANDOM_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/random/linear_congruential.hpp b/dsp/lib/sprout/sprout/random/linear_congruential.hpp deleted file mode 100644 index 43130ef..0000000 --- a/dsp/lib/sprout/sprout/random/linear_congruential.hpp +++ /dev/null @@ -1,382 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_LINEAR_CONGRUENTIAL_HPP -#define SPROUT_RANDOM_LINEAR_CONGRUENTIAL_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace random { - // - // linear_congruential_engine - // - template - class linear_congruential_engine { - static_assert(sprout::numeric_limits::is_integer, "sprout::numeric_limits::is_integer"); - static_assert(m == 0 || a < m, "m == 0 || a < m"); - static_assert(m == 0 || c < m, "m == 0 || c < m"); - public: - typedef UIntType result_type; - private: - struct private_construct_t {}; - public: - SPROUT_STATIC_CONSTEXPR result_type multiplier = a; - SPROUT_STATIC_CONSTEXPR result_type increment = c; - SPROUT_STATIC_CONSTEXPR result_type modulus = m; - SPROUT_STATIC_CONSTEXPR result_type default_seed = 1; - public: - static SPROUT_CONSTEXPR result_type static_min() SPROUT_NOEXCEPT { - return increment == 0 ? 1 : 0; - } - static SPROUT_CONSTEXPR result_type static_max() SPROUT_NOEXCEPT { - return modulus - 1; - } - private: - static SPROUT_CONSTEXPR result_type init_seed_3(result_type x0) { - return SPROUT_ASSERT(sprout::math::greater_equal(x0, static_min())), SPROUT_ASSERT(x0 <= static_max()), x0; - } - static SPROUT_CONSTEXPR result_type init_seed_2(result_type x0) { - return init_seed_3(increment == 0 && x0 == 0 ? 1 : x0); - } - static SPROUT_CONSTEXPR result_type init_seed_1(result_type x0) { - return init_seed_2(x0 <= 0 && x0 != 0 ? x0 + modulus : x0); - } - static SPROUT_CONSTEXPR result_type init_seed(result_type x0 = default_seed) { - return init_seed_1(modulus == 0 ? x0 : x0 % modulus); - } - template::value>::type = sprout::enabler> - static SPROUT_CXX14_CONSTEXPR result_type init_seed(Sseq& seq) { - return init_seed(sprout::random::detail::seed_one_int(seq)); - } - template::value>::type = sprout::enabler> - static SPROUT_CONSTEXPR result_type init_seed(Sseq const& seq) { - return init_seed(sprout::random::detail::seed_one_int(seq)); - } - template - static SPROUT_CONSTEXPR result_type init_seed(InputIterator first, InputIterator last) { - return init_seed(sprout::random::detail::get_one_int(first, last)); - } - private: - result_type x_; - private: - SPROUT_CONSTEXPR linear_congruential_engine(result_type x, private_construct_t) - : x_(x) - {} - SPROUT_CONSTEXPR sprout::random::random_result generate(result_type result) const { - return sprout::random::random_result( - result, - linear_congruential_engine(result, private_construct_t()) - ); - } - struct discard_init { - public: - unsigned long long exponent; - result_type b_gcd; - result_type a_zm1_over_gcd; - result_type a_km1_over_gcd; - }; - struct discard_pred { - public: - SPROUT_CONSTEXPR bool operator()(discard_init const& init) const { - return static_cast(init.exponent); - } - }; - struct discard_op { - public: - SPROUT_CONSTEXPR discard_init operator()(discard_init const& init) const { - typedef sprout::random::detail::const_mod mod_type; - return discard_init{ - init.exponent / 2, - init.b_gcd, - !(init.exponent % 2 == 1) ? init.a_zm1_over_gcd - : mod_type::mult_add( - init.b_gcd, - mod_type::mult(init.a_zm1_over_gcd, init.a_km1_over_gcd), - mod_type::add(init.a_zm1_over_gcd, init.a_km1_over_gcd) - ) - , - mod_type::mult_add( - init.b_gcd, - mod_type::mult(init.a_km1_over_gcd, init.a_km1_over_gcd), - mod_type::add(init.a_km1_over_gcd, init.a_km1_over_gcd) - ) - }; - } - }; - SPROUT_CONSTEXPR linear_congruential_engine const discard_impl_1_2(result_type b_gcd, result_type a_zm1_over_gcd) const { - typedef sprout::random::detail::const_mod mod_type; - return linear_congruential_engine( - mod_type::mult_add( - mod_type::mult_add(b_gcd, a_zm1_over_gcd, 1), - x_, - mod_type::mult(mod_type::invert((multiplier - 1) / b_gcd), mod_type::mult(increment, a_zm1_over_gcd)) - ), - private_construct_t() - ); - } - SPROUT_CONSTEXPR linear_congruential_engine const discard_impl_1_1(result_type b_inv, result_type a_z) const { - typedef sprout::random::detail::const_mod mod_type; - return linear_congruential_engine( - mod_type::mult_add(a_z, x_, mod_type::mult(mod_type::mult(increment, b_inv), a_z - 1)), - private_construct_t() - ); - } - SPROUT_CONSTEXPR linear_congruential_engine const discard_impl_1(unsigned long long z, result_type b_inv, result_type b_gcd) const { - typedef sprout::random::detail::const_mod mod_type; - return b_gcd == 1 ? discard_impl_1_1(b_inv, mod_type::pow(multiplier, z)) - : discard_impl_1_2( - b_gcd, - sprout::while_loop( - discard_init{z, b_gcd, 0, (multiplier - 1) / b_gcd}, - discard_pred(), - discard_op() - ).a_zm1_over_gcd - ) - ; - } - SPROUT_CONSTEXPR linear_congruential_engine const discard_impl(unsigned long long z, result_type b_inv) const { - typedef sprout::random::detail::const_mod mod_type; - return discard_impl_1( - z, b_inv, - mod_type::mult(multiplier - 1, b_inv) - ); - } - public: - SPROUT_CONSTEXPR linear_congruential_engine() - : x_(init_seed()) - {} - linear_congruential_engine(linear_congruential_engine const&) = default; - explicit SPROUT_CONSTEXPR linear_congruential_engine(result_type x0) - : x_(init_seed(x0)) - {} - template::value>::type = sprout::enabler> - explicit SPROUT_CXX14_CONSTEXPR linear_congruential_engine(Sseq& seq) - : x_(init_seed(seq)) - {} - template::value>::type = sprout::enabler> - explicit SPROUT_CONSTEXPR linear_congruential_engine(Sseq const& seq) - : x_(init_seed(seq)) - {} - template - SPROUT_CONSTEXPR linear_congruential_engine(InputIterator first, InputIterator last) - : x_(init_seed(first, last)) - {} - SPROUT_CXX14_CONSTEXPR void seed(result_type x0 = default_seed) { - x_ = init_seed(x0); - } - template::value>::type = sprout::enabler> - SPROUT_CXX14_CONSTEXPR void seed(Sseq& seq) { - x_ = init_seed(seq); - } - template::value>::type = sprout::enabler> - SPROUT_CXX14_CONSTEXPR void seed(Sseq const& seq) { - x_ = init_seed(seq); - } - template - SPROUT_CXX14_CONSTEXPR void seed(InputIterator first, InputIterator last) { - x_ = init_seed(first, last); - } - SPROUT_CONSTEXPR result_type min() const SPROUT_NOEXCEPT { - return static_min(); - } - SPROUT_CONSTEXPR result_type max() const SPROUT_NOEXCEPT { - return static_max(); - } - SPROUT_CXX14_CONSTEXPR result_type operator()() { - x_ = sprout::random::detail::const_mod::mult_add(a, x_, c); - return x_; - } - SPROUT_CONSTEXPR sprout::random::random_result const operator()() const { - return generate(sprout::random::detail::const_mod::mult_add(a, x_, c)); - } - SPROUT_CONSTEXPR linear_congruential_engine const discard(unsigned long long z) const { - typedef sprout::random::detail::const_mod mod_type; - return discard_impl(z, mod_type::invert(multiplier - 1)); - } - SPROUT_CXX14_CONSTEXPR void discard(unsigned long long z) { - typedef sprout::random::detail::const_mod mod_type; - result_type b_inv = mod_type::invert(multiplier - 1); - result_type b_gcd = mod_type::mult(multiplier - 1, b_inv); - if (b_gcd == 1) { - result_type a_z = mod_type::pow(multiplier, z); - x_ = mod_type::mult_add(a_z, x_, mod_type::mult(mod_type::mult(increment, b_inv), a_z - 1)); - } else { - result_type a_zm1_over_gcd = 0; - result_type a_km1_over_gcd = (multiplier - 1) / b_gcd; - unsigned long long exponent = z; - while (exponent) { - if (exponent % 2 == 1) { - a_zm1_over_gcd = mod_type::mult_add( - b_gcd, - mod_type::mult(a_zm1_over_gcd, a_km1_over_gcd), - mod_type::add(a_zm1_over_gcd, a_km1_over_gcd) - ); - } - a_km1_over_gcd = mod_type::mult_add( - b_gcd, - mod_type::mult(a_km1_over_gcd, a_km1_over_gcd), - mod_type::add(a_km1_over_gcd, a_km1_over_gcd) - ); - exponent /= 2; - } - x_ = mod_type::mult_add( - mod_type::mult_add(b_gcd, a_zm1_over_gcd, 1), - x_, - mod_type::mult(mod_type::invert((multiplier - 1) / b_gcd), mod_type::mult(increment, a_zm1_over_gcd)) - ); - } - } - friend SPROUT_CONSTEXPR bool operator==(linear_congruential_engine const& lhs, linear_congruential_engine const& rhs) SPROUT_NOEXCEPT { - return lhs.x_ == rhs.x_; - } - friend SPROUT_CONSTEXPR bool operator!=(linear_congruential_engine const& lhs, linear_congruential_engine const& rhs) SPROUT_NOEXCEPT { - return !(lhs == rhs); - } - template - friend SPROUT_NON_CONSTEXPR std::basic_istream& operator>>( - std::basic_istream& lhs, - linear_congruential_engine& rhs - ) - { - result_type x; - if (lhs >> x) { - if (sprout::math::greater_equal(x, static_min()) && x <= static_max()) { - rhs.x_ = x; - } else { - lhs.setstate(std::ios_base::failbit); - } - } - return lhs; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_ostream& operator<<( - std::basic_ostream& lhs, - linear_congruential_engine const& rhs - ) - { - return lhs << rhs.x_; - } - }; - template - SPROUT_CONSTEXPR_OR_CONST UIntType sprout::random::linear_congruential_engine::multiplier; - template - SPROUT_CONSTEXPR_OR_CONST UIntType sprout::random::linear_congruential_engine::increment; - template - SPROUT_CONSTEXPR_OR_CONST UIntType sprout::random::linear_congruential_engine::modulus; - template - SPROUT_CONSTEXPR_OR_CONST UIntType sprout::random::linear_congruential_engine::default_seed; - - // - // minstd_rand0 - // minstd_rand - // - typedef sprout::random::linear_congruential_engine minstd_rand0; - typedef sprout::random::linear_congruential_engine minstd_rand; - - // - // rand48 - // - class rand48 { - public: - typedef std::uint32_t result_type; - private: - struct private_construct_t {}; - typedef sprout::random::linear_congruential_engine< - std::uint64_t, - std::uint64_t(0xDEECE66DUL) | (std::uint64_t(0x5) << 32), - 0xB, - std::uint64_t(1) << 48 - > lcf_type; - private: - static SPROUT_CONSTEXPR result_type static_min() { - return 0; - } - static SPROUT_CONSTEXPR result_type static_max() { - return 0x7FFFFFFF; - } - static SPROUT_CONSTEXPR std::uint64_t cnv(std::uint32_t x) { - return (static_cast(x) << 16) | 0x330e; - } - private: - lcf_type lcf_; - private: - SPROUT_CONSTEXPR rand48(lcf_type const& lcf, private_construct_t) - : lcf_(lcf) - {} - template - SPROUT_CONSTEXPR sprout::random::random_result generate(EngineResult const& rnd) const { - return sprout::random::random_result( - static_cast(sprout::random::result(rnd)) >> 17, - rand48(sprout::random::next(rnd), private_construct_t()) - ); - } - public: - SPROUT_CONSTEXPR rand48() - : lcf_(cnv(static_cast(1))) - {} - explicit SPROUT_CONSTEXPR rand48(result_type x0) - : lcf_(cnv(x0)) - {} - SPROUT_CONSTEXPR result_type min() const { - return static_min(); - } - SPROUT_CONSTEXPR result_type max() const { - return static_max(); - } - SPROUT_CXX14_CONSTEXPR result_type operator()() { - return static_cast(static_cast(lcf_()) >> 17); - } - SPROUT_CONSTEXPR sprout::random::random_result const operator()() const { - return generate(lcf_()); - } - friend SPROUT_CONSTEXPR bool operator==(rand48 const& lhs, rand48 const& rhs) { - return lhs.lcf_ == rhs.lcf_; - } - friend SPROUT_CONSTEXPR bool operator!=(rand48 const& lhs, rand48 const& rhs) { - return !(lhs == rhs); - } - template - friend SPROUT_NON_CONSTEXPR std::basic_istream& operator>>( - std::basic_istream& lhs, - rand48& rhs - ) - { - return lhs >> rhs.lcf_; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_ostream& operator<<( - std::basic_ostream& lhs, - rand48 const& rhs - ) - { - return lhs << rhs.lcf_; - } - }; - } // namespace random - - using sprout::random::linear_congruential_engine; - using sprout::random::minstd_rand0; - using sprout::random::minstd_rand; - using sprout::random::rand48; -} // namespace sprout - -#endif // #ifndef SPROUT_RANDOM_LINEAR_CONGRUENTIAL_HPP diff --git a/dsp/lib/sprout/sprout/random/linear_feedback_shift.hpp b/dsp/lib/sprout/sprout/random/linear_feedback_shift.hpp deleted file mode 100644 index 94d3ae9..0000000 --- a/dsp/lib/sprout/sprout/random/linear_feedback_shift.hpp +++ /dev/null @@ -1,170 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_LINEAR_FEEDBACK_SHIFT_HPP -#define SPROUT_RANDOM_LINEAR_FEEDBACK_SHIFT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace random { - // - // linear_feedback_shift_engine - // - template - class linear_feedback_shift_engine { - public: - typedef UIntType result_type; - private: - struct private_construct_t {}; - public: - SPROUT_STATIC_CONSTEXPR int word_size = w; - SPROUT_STATIC_CONSTEXPR int exponent1 = k; - SPROUT_STATIC_CONSTEXPR int exponent2 = q; - SPROUT_STATIC_CONSTEXPR int step_size = s; - SPROUT_STATIC_CONSTEXPR result_type default_seed = 341; - public: - static_assert(w > 0, "w > 0"); - static_assert(q > 0, "q > 0"); - static_assert(k < w, "k < w"); - static_assert(0 < 2 * q && 2 * q < k, "0 < 2 * q && 2 * q < k"); - static_assert(0 < s && s <= k - q, "0 < s && s <= k - q"); - public: - static SPROUT_CONSTEXPR result_type static_min() SPROUT_NOEXCEPT { - return 0; - } - static SPROUT_CONSTEXPR result_type static_max() SPROUT_NOEXCEPT { - return wordmask(); - } - private: - static SPROUT_CONSTEXPR result_type wordmask() { - return sprout::detail::low_bits_mask_t::sig_bits; - } - static SPROUT_CONSTEXPR result_type init_seed_1(result_type x0) { - return x0 < (1 << (w - k)) ? x0 + (1 << (w - k)) : x0; - } - static SPROUT_CONSTEXPR result_type init_seed(result_type x0 = default_seed) { - return init_seed_1(x0 & wordmask()); - } - template::value>::type = sprout::enabler> - static SPROUT_CXX14_CONSTEXPR result_type init_seed(Sseq& seq) { - return init_seed(sprout::random::detail::seed_one_int(seq)); - } - template::value>::type = sprout::enabler> - static SPROUT_CONSTEXPR result_type init_seed(Sseq const& seq) { - return init_seed(sprout::random::detail::seed_one_int(seq)); - } - template - static SPROUT_CONSTEXPR result_type init_seed(InputIterator first, InputIterator last) { - return init_seed(sprout::random::detail::get_one_int(first, last)); - } - private: - result_type x_; - private: - SPROUT_CONSTEXPR linear_feedback_shift_engine(result_type x, private_construct_t) - : x_(x) - {} - SPROUT_CONSTEXPR sprout::random::random_result generate(result_type result) const { - return sprout::random::random_result( - result, - linear_feedback_shift_engine(result, private_construct_t()) - ); - } - public: - SPROUT_CONSTEXPR linear_feedback_shift_engine() - : x_(init_seed(default_seed)) - {} - linear_feedback_shift_engine(linear_feedback_shift_engine const&) = default; - explicit SPROUT_CONSTEXPR linear_feedback_shift_engine(result_type x0) - : x_(init_seed(x0)) - {} - template::value>::type = sprout::enabler> - explicit SPROUT_CXX14_CONSTEXPR linear_feedback_shift_engine(Sseq& seq) - : x_(init_seed(seq)) - {} - template::value>::type = sprout::enabler> - explicit SPROUT_CONSTEXPR linear_feedback_shift_engine(Sseq const& seq) - : x_(init_seed(seq)) - {} - template - SPROUT_CONSTEXPR linear_feedback_shift_engine(InputIterator first, InputIterator last) - : x_(init_seed(first, last)) - {} - SPROUT_CXX14_CONSTEXPR void seed(result_type x0 = default_seed) { - x_ = init_seed(x0); - } - template::value>::type = sprout::enabler> - SPROUT_CXX14_CONSTEXPR void seed(Sseq& seq) { - x_ = init_seed(seq); - } - template::value>::type = sprout::enabler> - SPROUT_CXX14_CONSTEXPR void seed(Sseq const& seq) { - x_ = init_seed(seq); - } - template - SPROUT_CXX14_CONSTEXPR void seed(InputIterator first, InputIterator last) { - x_ = init_seed(first, last); - } - SPROUT_CONSTEXPR result_type min() const SPROUT_NOEXCEPT { - return static_min(); - } - SPROUT_CONSTEXPR result_type max() const SPROUT_NOEXCEPT { - return static_max(); - } - SPROUT_CXX14_CONSTEXPR result_type operator()() { - x_ = ((x_ & ((wordmask() << (w - k)) & wordmask())) << s) ^ ((((x_ << q) ^ x_) & wordmask()) >> (k - s)); - return x_; - } - SPROUT_CONSTEXPR sprout::random::random_result const operator()() const { - return generate(((x_ & ((wordmask() << (w - k)) & wordmask())) << s) ^ ((((x_ << q) ^ x_) & wordmask()) >> (k - s))); - } - friend SPROUT_CONSTEXPR bool operator==(linear_feedback_shift_engine const& lhs, linear_feedback_shift_engine const& rhs) SPROUT_NOEXCEPT { - return lhs.x_ == rhs.x_; - } - friend SPROUT_CONSTEXPR bool operator!=(linear_feedback_shift_engine const& lhs, linear_feedback_shift_engine const& rhs) SPROUT_NOEXCEPT { - return !(lhs == rhs); - } - template - friend SPROUT_NON_CONSTEXPR std::basic_istream& operator>>( - std::basic_istream& lhs, - linear_feedback_shift_engine& rhs - ) - { - return lhs >> rhs.x_; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_ostream& operator<<( - std::basic_ostream& lhs, - linear_feedback_shift_engine const& rhs - ) - { - return lhs << rhs.x_; - } - }; - template - SPROUT_CONSTEXPR_OR_CONST int sprout::random::linear_feedback_shift_engine::word_size; - template - SPROUT_CONSTEXPR_OR_CONST int sprout::random::linear_feedback_shift_engine::exponent1; - template - SPROUT_CONSTEXPR_OR_CONST int sprout::random::linear_feedback_shift_engine::exponent2; - template - SPROUT_CONSTEXPR_OR_CONST int sprout::random::linear_feedback_shift_engine::step_size; - template - SPROUT_CONSTEXPR_OR_CONST UIntType sprout::random::linear_feedback_shift_engine::default_seed; - } // namespace random - - using sprout::random::linear_feedback_shift_engine; -} // namespace sprout - -#endif // #ifndef SPROUT_RANDOM_LINEAR_FEEDBACK_SHIFT_HPP diff --git a/dsp/lib/sprout/sprout/random/mersenne_twister.hpp b/dsp/lib/sprout/sprout/random/mersenne_twister.hpp deleted file mode 100644 index d8f0e48..0000000 --- a/dsp/lib/sprout/sprout/random/mersenne_twister.hpp +++ /dev/null @@ -1,712 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_MERSENNE_TWISTER_HPP -#define SPROUT_RANDOM_MERSENNE_TWISTER_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace random { - // - // mersenne_twister_engine - // - template< - typename UIntType, - std::size_t w, std::size_t n, std::size_t m, std::size_t r, UIntType a, std::size_t u, UIntType d, - std::size_t s, UIntType b, std::size_t t, UIntType c, std::size_t l, UIntType f - > - class mersenne_twister_engine { - public: - typedef UIntType result_type; - private: - struct private_construct_t {}; - public: - SPROUT_STATIC_CONSTEXPR std::size_t word_size = w; - SPROUT_STATIC_CONSTEXPR std::size_t state_size = n; - SPROUT_STATIC_CONSTEXPR std::size_t shift_size = m; - SPROUT_STATIC_CONSTEXPR std::size_t mask_bits = r; - SPROUT_STATIC_CONSTEXPR result_type xor_mask = a; - SPROUT_STATIC_CONSTEXPR std::size_t tempering_u = u; - SPROUT_STATIC_CONSTEXPR result_type tempering_d = d; - SPROUT_STATIC_CONSTEXPR std::size_t tempering_s = s; - SPROUT_STATIC_CONSTEXPR result_type tempering_b = b; - SPROUT_STATIC_CONSTEXPR std::size_t tempering_t = t; - SPROUT_STATIC_CONSTEXPR result_type tempering_c = c; - SPROUT_STATIC_CONSTEXPR std::size_t tempering_l = l; - SPROUT_STATIC_CONSTEXPR result_type initialization_multiplier = f; - SPROUT_STATIC_CONSTEXPR result_type default_seed = 5489u; - private: - SPROUT_STATIC_CONSTEXPR result_type upper_mask = (~static_cast(0)) << r; - SPROUT_STATIC_CONSTEXPR result_type lower_mask = ~upper_mask; - SPROUT_STATIC_CONSTEXPR std::size_t unroll_factor = 6; - SPROUT_STATIC_CONSTEXPR std::size_t unroll_extra1 = (n - m) % unroll_factor; - SPROUT_STATIC_CONSTEXPR std::size_t unroll_extra2 = (m - 1) % unroll_factor; - public: - static SPROUT_CONSTEXPR result_type static_min() SPROUT_NOEXCEPT { - return 0; - } - static SPROUT_CONSTEXPR result_type static_max() SPROUT_NOEXCEPT { - return sprout::detail::low_bits_mask_t::sig_bits; - } - private: - template - static SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Args) + 1 == n, - sprout::array - >::type init_seed_1(result_type value, Args const&... args) { - return sprout::array{{args..., value}}; - } - template - static SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Args) + 1 < n, - sprout::array - >::type init_seed_1(result_type value, Args const&... args) { - return init_seed_1( - (f * (value ^ (value >> (w - 2))) + (sizeof...(Args) + 1)) & static_max(), - args..., - value - ); - } - static SPROUT_CONSTEXPR sprout::array init_seed(result_type value = default_seed) { - return init_seed_1(value & static_max()); - } - private: - sprout::array x_; - std::size_t i_; - private: - SPROUT_CONSTEXPR mersenne_twister_engine(sprout::array const& x, std::size_t i, private_construct_t) - : x_(x) - , i_(i) - {} - SPROUT_CONSTEXPR result_type - rewind_find_1(result_type const* last, std::size_t size, std::size_t index) const { - return index < n - size - ? x_[index] - : *(last - (n - 1 - index)) - ; - } - SPROUT_CONSTEXPR result_type - rewind_find(result_type const* last, std::size_t size, std::size_t i) const { - return rewind_find_1(last, size, (i + n - size + n - 1) % n); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Args) == n, - sprout::array - >::type - rewind_finish_1(sprout::array const&, Args const&... args) const { - return sprout::array{{args...}}; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Args) < n, - sprout::array - >::type - rewind_finish_1(sprout::array const& data, Args const&... args) const { - return rewind_finish_1(data, args..., data[sizeof...(args)]); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Args) == n, - sprout::array - >::type - rewind_finish( - sprout::array const&, result_type const*, std::size_t, std::size_t, - Args const&... args - ) const - { - return sprout::array{{args...}}; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Args) < n, - sprout::array - >::type - rewind_finish( - sprout::array const& data, result_type const* last, std::size_t z, std::size_t i, - Args const&... args - ) const - { - return &data[0] + i == last - z - ? rewind_finish_1(data, data[i], args...) - : rewind_finish(data, last, z, i + 1, data[i], args...) - ; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Args) == n, - sprout::array - >::type - rewind_4( - sprout::array const&, result_type const*, std::size_t, result_type, result_type, std::size_t, - Args const&... args - ) const - { - return sprout::array{{args...}}; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Args) < n, - sprout::array - >::type - rewind_4( - sprout::array const& data, result_type const* last, std::size_t z, result_type y0, result_type y1, std::size_t i, - Args const&... args - ) const - { - return rewind_2( - data, last, z, y1, i, (y0 & upper_mask) | (y1 & lower_mask), - args... - ); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Args) == n, - sprout::array - >::type - rewind_3( - sprout::array const&, result_type const*, std::size_t, result_type, result_type, std::size_t, - Args const&... args - ) const - { - return sprout::array{{args...}}; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Args) < n, - sprout::array - >::type - rewind_3( - sprout::array const& data, result_type const* last, std::size_t z, result_type y0, result_type y1, std::size_t i, - Args const&... args - ) const - { - return rewind_4( - data, last, z, y0, - y1 & (static_cast(1) << (w - 1)) - ? ((y1 ^ a) << 1) | 1 - : y1 << 1 - , - i, - args... - ); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Args) == n, - sprout::array - >::type - rewind_2( - sprout::array const&, result_type const*, std::size_t, result_type, std::size_t, - Args const&... args - ) const - { - return sprout::array{{args...}}; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Args) < n, - sprout::array - >::type - rewind_2( - sprout::array const& data, result_type const* last, std::size_t z, result_type y0, std::size_t i, - Args const&... args - ) const - { - return i < z - ? rewind_3(data, last, z, y0, rewind_find(last, i, m - 1) ^ rewind_find(last, i, n - 1), i, args...) - : rewind_finish(data, last, z, 0, args...) - ; - } - SPROUT_CONSTEXPR sprout::array - rewind_1(sprout::array const& data, result_type const* last, std::size_t z, result_type y0) const { - return rewind_2( - data, - last, - z, - y0 & (static_cast(1) << (w - 1)) - ? ((y0 ^ a) << 1) | 1 - : y0 << 1 - , - 0 - ); - } - SPROUT_CONSTEXPR sprout::array - rewind(sprout::array const& data, result_type const* last, std::size_t z) const { - return rewind_1(data, last, z, x_[m - 1] ^ x_[n - 1]); - } - SPROUT_CONSTEXPR bool - equal_impl_2(mersenne_twister_engine const& other, sprout::array const& back, std::size_t offset, std::size_t i = 0) const { - return i < offset - ? back[i + n - offset] != other.x_[i] - ? false - : equal_impl_2(other, back, offset, i + 1) - : true - ; - } - SPROUT_CONSTEXPR bool - equal_impl_1(mersenne_twister_engine const& other, sprout::array const& back, std::size_t offset, std::size_t i = 0) const { - return i + offset < n - ? x_[i] != other.x_[i + offset] - ? false - : equal_impl_1(other, back, offset, i + 1) - : equal_impl_2(other, rewind(back, &back[n - 1], offset), offset) - ; - } - SPROUT_CONSTEXPR bool - equal_impl(mersenne_twister_engine const& other) const { - return equal_impl_1(other, sprout::array(), other.i_ - i_); - } - SPROUT_CONSTEXPR result_type generate_impl_4(result_type z) const { - return z ^ (z >> l); - } - SPROUT_CONSTEXPR result_type generate_impl_3(result_type z) const { - return z ^ generate_impl_4((z << t) & c); - } - SPROUT_CONSTEXPR result_type generate_impl_2(result_type z) const { - return z ^ generate_impl_3((z << s) & b); - } - SPROUT_CONSTEXPR result_type generate_impl_1(result_type z) const { - return z ^ generate_impl_2((z >> u) & d); - } - SPROUT_CONSTEXPR result_type generate_impl() const { - return generate_impl_1(x_[i_]); - } - SPROUT_CONSTEXPR sprout::random::random_result generate() const { - return sprout::random::random_result( - generate_impl(), - mersenne_twister_engine( - x_, - i_ + 1, - private_construct_t() - ) - ); - } - template - SPROUT_CONSTEXPR mersenne_twister_engine twist_5(Args const&... args) const { - return mersenne_twister_engine( - sprout::array{{ - args..., x_[m - 1] ^ ((x_[n - 1] & upper_mask) | (x_[0] & lower_mask) >> 1) ^ ((x_[0] & 1) * a) - }}, - 0, - private_construct_t() - ); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Args) == n - 1, - mersenne_twister_engine - >::type twist_4(std::size_t, Args const&... args) const { - return twist_5(args...); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Args) < n - 1, - mersenne_twister_engine - >::type twist_4(std::size_t i, Args const&... args) const { - return twist_4( - i + 1, args..., x_[i - (n - m)] ^ ((x_[i] & upper_mask) | (x_[i + 1] & lower_mask) >> 1) ^ ((x_[i + 1] & 1) * a) - ); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Args) == n - 1 - unroll_extra2, - mersenne_twister_engine - >::type twist_3(std::size_t, Args const&... args) const { - return twist_4(n - 1 - unroll_extra2, args...); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Args) < n - 1 - unroll_extra2, - mersenne_twister_engine - >::type twist_3(std::size_t i, Args const&... args) const { - return twist_3( - i + 1, args..., x_[i - (n - m)] ^ ((x_[i] & upper_mask) | (x_[i + 1] & lower_mask) >> 1) ^ ((x_[i + 1] & 1) * a) - ); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Args) == n - m, - mersenne_twister_engine - >::type twist_2(std::size_t, Args const&... args) const { - return twist_3(n - m, args...); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Args) < n - m, - mersenne_twister_engine - >::type twist_2(std::size_t i, Args const&... args) const { - return twist_2( - i + 1, args..., x_[i + m] ^ ((x_[i] & upper_mask) | (x_[i + 1] & lower_mask) >> 1) ^ ((x_[i + 1] & 1) * a) - ); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Args) == n - m - unroll_extra1, - mersenne_twister_engine - >::type twist_1(std::size_t, Args const&... args) const { - return twist_2(n - m - unroll_extra1, args...); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Args) < n - m - unroll_extra1, - mersenne_twister_engine - >::type twist_1(std::size_t i, Args const&... args) const { - return twist_1( - i + 1, args..., x_[i + m] ^ ((x_[i] & upper_mask) | (x_[i + 1] & lower_mask) >> 1) ^ ((x_[i + 1] & 1) * a) - ); - } - SPROUT_CONSTEXPR mersenne_twister_engine twist() const { - return twist_1(0); - } - SPROUT_CXX14_CONSTEXPR void do_twist() { - UIntType const upper_mask = (~static_cast(0)) << r; - UIntType const lower_mask = ~upper_mask; - std::size_t const unroll_factor = 6; - std::size_t const unroll_extra1 = (n - m) % unroll_factor; - std::size_t const unroll_extra2 = (m - 1) % unroll_factor; - for (std::size_t j = 0; j < n - m - unroll_extra1; ++j) { - UIntType y = (x_[j] & upper_mask) | (x_[j + 1] & lower_mask); - x_[j] = x_[j+m] ^ (y >> 1) ^ ((x_[j + 1] & 1) * a); - } - for (std::size_t j = n - m - unroll_extra1; j < n-m; ++j) { - UIntType y = (x_[j] & upper_mask) | (x_[j + 1] & lower_mask); - x_[j] = x_[j + m] ^ (y >> 1) ^ ((x_[j + 1] & 1) * a); - } - for (std::size_t j = n - m; j < n - 1 - unroll_extra2; ++j) { - UIntType y = (x_[j] & upper_mask) | (x_[j + 1] & lower_mask); - x_[j] = x_[j - (n - m)] ^ (y >> 1) ^ ((x_[j + 1] & 1) * a); - } - for (std::size_t j = n - 1 - unroll_extra2; j < n - 1; ++j) { - UIntType y = (x_[j] & upper_mask) | (x_[j + 1] & lower_mask); - x_[j] = x_[j - (n - m)] ^ (y >> 1) ^ ((x_[j + 1] & 1) * a); - } - { - UIntType y = (x_[n - 1] & upper_mask) | (x_[0] & lower_mask); - x_[n - 1] = x_[m - 1] ^ (y >> 1) ^ ((x_[0] & 1) * a); - } - i_ = 0; - } - SPROUT_CXX14_CONSTEXPR void do_rewind(UIntType* last, std::size_t z) const { - UIntType const upper_mask = (~static_cast(0)) << r; - UIntType const lower_mask = ~upper_mask; - UIntType y0 = x_[m - 1] ^ x_[n - 1]; - if (y0 & (static_cast(1) << (w - 1))) { - y0 = ((y0 ^ a) << 1) | 1; - } else { - y0 = y0 << 1; - } - for (std::size_t sz = 0; sz < z; ++sz) { - UIntType y1 = rewind_find(last, sz, m - 1) ^ rewind_find(last, sz, n - 1); - if (y1 & (static_cast(1) << (w - 1))) { - y1 = ((y1 ^ a) << 1) | 1; - } else { - y1 = y1 << 1; - } - *(last - sz) = (y0 & upper_mask) | (y1 & lower_mask); - y0 = y1; - } - } - SPROUT_CXX14_CONSTEXPR bool do_equal_impl(mersenne_twister_engine const& other) const { - UIntType back[n] = {}; - std::size_t offset = other.i_ - i_; - for (std::size_t j = 0; j + offset < n; ++j) { - if (x_[j] != other.x_[j + offset]) { - return false; - } - } - do_rewind(&back[n - 1], offset); - for (std::size_t j = 0; j < offset; ++j) { - if (back[j + n - offset] != other.x_[j]) { - return false; - } - } - return true; - } - public: - SPROUT_CONSTEXPR mersenne_twister_engine() - : x_(init_seed(default_seed)) - , i_(n) - {} - mersenne_twister_engine(mersenne_twister_engine const&) = default; - explicit SPROUT_CONSTEXPR mersenne_twister_engine(result_type value) - : x_(init_seed(value)) - , i_(n) - {} - SPROUT_CONSTEXPR result_type min() const SPROUT_NOEXCEPT { - return static_min(); - } - SPROUT_CONSTEXPR result_type max() const SPROUT_NOEXCEPT { - return static_max(); - } - SPROUT_CXX14_CONSTEXPR result_type operator()() { - if (i_ == n) { - do_twist(); - } - UIntType z = x_[i_]; - ++i_; - z ^= ((z >> u) & d); - z ^= ((z << s) & b); - z ^= ((z << t) & c); - z ^= (z >> l); - return z; - } -#ifndef SPROUT_CONFIG_DISABLE_CXX14_CONSTEXPR - SPROUT_CXX14_CONSTEXPR sprout::random::random_result const operator()() const { - mersenne_twister_engine eng(*this); - result_type value = eng(); - return sprout::random::random_result(value, eng); - } -#else // #ifndef SPROUT_CONFIG_DISABLE_CXX14_CONSTEXPR - SPROUT_CONSTEXPR sprout::random::random_result const operator()() const { - return i_ == n - ? twist().generate() - : generate() - ; - } -#endif // #ifndef SPROUT_CONFIG_DISABLE_CXX14_CONSTEXPR -#ifndef SPROUT_CONFIG_DISABLE_CXX14_CONSTEXPR - friend SPROUT_CXX14_CONSTEXPR bool operator==(mersenne_twister_engine const& lhs, mersenne_twister_engine const& rhs) SPROUT_NOEXCEPT { - return lhs.i_ < rhs.i_ - ? lhs.do_equal_impl(rhs) - : rhs.do_equal_impl(lhs) - ; - } - friend SPROUT_CXX14_CONSTEXPR bool operator!=(mersenne_twister_engine const& lhs, mersenne_twister_engine const& rhs) SPROUT_NOEXCEPT { - return !(lhs == rhs); - } -#else // #ifndef SPROUT_CONFIG_DISABLE_CXX14_CONSTEXPR - friend SPROUT_CONSTEXPR bool operator==(mersenne_twister_engine const& lhs, mersenne_twister_engine const& rhs) SPROUT_NOEXCEPT { - return lhs.i_ < rhs.i_ - ? lhs.equal_impl(rhs) - : rhs.equal_impl(lhs) - ; - } - friend SPROUT_CONSTEXPR bool operator!=(mersenne_twister_engine const& lhs, mersenne_twister_engine const& rhs) SPROUT_NOEXCEPT { - return !(lhs == rhs); - } -#endif // #ifndef SPROUT_CONFIG_DISABLE_CXX14_CONSTEXPR - template - friend SPROUT_NON_CONSTEXPR std::basic_istream& operator>>( - std::basic_istream& lhs, - mersenne_twister_engine& rhs - ) - { - for (std::size_t i = 0; i < state_size; ++i) { - lhs >> rhs.x_[i] >> std::ws; - } - rhs.i_ = state_size; - return lhs; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_ostream& operator<<( - std::basic_ostream& lhs, - mersenne_twister_engine const& rhs - ) - { - sprout::array data; - for (std::size_t i = 0; i < rhs.i_; ++i) { - data[i + n - rhs.i_] = rhs.x_[i]; - } - if (rhs.i_ != n) { - data = rhs.rewind(data, &data[n - rhs.i_ - 1], n - rhs.i_); - } - lhs << data[0]; - for (std::size_t i = 0; i < rhs.i_; ++i) { - lhs << ' ' << data[i]; - } - return lhs; - } - }; - template< - typename UIntType, - std::size_t w, std::size_t n, std::size_t m, std::size_t r, UIntType a, std::size_t u, UIntType d, - std::size_t s, UIntType b, std::size_t t, UIntType c, std::size_t l, UIntType f - > - SPROUT_CONSTEXPR_OR_CONST std::size_t - sprout::random::mersenne_twister_engine::word_size - ; - template< - typename UIntType, - std::size_t w, std::size_t n, std::size_t m, std::size_t r, UIntType a, std::size_t u, UIntType d, - std::size_t s, UIntType b, std::size_t t, UIntType c, std::size_t l, UIntType f - > - SPROUT_CONSTEXPR_OR_CONST std::size_t - sprout::random::mersenne_twister_engine::state_size - ; - template< - typename UIntType, - std::size_t w, std::size_t n, std::size_t m, std::size_t r, UIntType a, std::size_t u, UIntType d, - std::size_t s, UIntType b, std::size_t t, UIntType c, std::size_t l, UIntType f - > - SPROUT_CONSTEXPR_OR_CONST std::size_t - sprout::random::mersenne_twister_engine::shift_size - ; - template< - typename UIntType, - std::size_t w, std::size_t n, std::size_t m, std::size_t r, UIntType a, std::size_t u, UIntType d, - std::size_t s, UIntType b, std::size_t t, UIntType c, std::size_t l, UIntType f - > - SPROUT_CONSTEXPR_OR_CONST std::size_t - sprout::random::mersenne_twister_engine::mask_bits - ; - template< - typename UIntType, - std::size_t w, std::size_t n, std::size_t m, std::size_t r, UIntType a, std::size_t u, UIntType d, - std::size_t s, UIntType b, std::size_t t, UIntType c, std::size_t l, UIntType f - > - SPROUT_CONSTEXPR_OR_CONST UIntType - sprout::random::mersenne_twister_engine::xor_mask - ; - template< - typename UIntType, - std::size_t w, std::size_t n, std::size_t m, std::size_t r, UIntType a, std::size_t u, UIntType d, - std::size_t s, UIntType b, std::size_t t, UIntType c, std::size_t l, UIntType f - > - SPROUT_CONSTEXPR_OR_CONST std::size_t - sprout::random::mersenne_twister_engine::tempering_u - ; - template< - typename UIntType, - std::size_t w, std::size_t n, std::size_t m, std::size_t r, UIntType a, std::size_t u, UIntType d, - std::size_t s, UIntType b, std::size_t t, UIntType c, std::size_t l, UIntType f - > - SPROUT_CONSTEXPR_OR_CONST UIntType - sprout::random::mersenne_twister_engine::tempering_d - ; - template< - typename UIntType, - std::size_t w, std::size_t n, std::size_t m, std::size_t r, UIntType a, std::size_t u, UIntType d, - std::size_t s, UIntType b, std::size_t t, UIntType c, std::size_t l, UIntType f - > - SPROUT_CONSTEXPR_OR_CONST std::size_t - sprout::random::mersenne_twister_engine::tempering_s - ; - template< - typename UIntType, - std::size_t w, std::size_t n, std::size_t m, std::size_t r, UIntType a, std::size_t u, UIntType d, - std::size_t s, UIntType b, std::size_t t, UIntType c, std::size_t l, UIntType f - > - SPROUT_CONSTEXPR_OR_CONST UIntType - sprout::random::mersenne_twister_engine::tempering_b - ; - template< - typename UIntType, - std::size_t w, std::size_t n, std::size_t m, std::size_t r, UIntType a, std::size_t u, UIntType d, - std::size_t s, UIntType b, std::size_t t, UIntType c, std::size_t l, UIntType f - > - SPROUT_CONSTEXPR_OR_CONST std::size_t - sprout::random::mersenne_twister_engine::tempering_t - ; - template< - typename UIntType, - std::size_t w, std::size_t n, std::size_t m, std::size_t r, UIntType a, std::size_t u, UIntType d, - std::size_t s, UIntType b, std::size_t t, UIntType c, std::size_t l, UIntType f - > - SPROUT_CONSTEXPR_OR_CONST UIntType - sprout::random::mersenne_twister_engine::tempering_c - ; - template< - typename UIntType, - std::size_t w, std::size_t n, std::size_t m, std::size_t r, UIntType a, std::size_t u, UIntType d, - std::size_t s, UIntType b, std::size_t t, UIntType c, std::size_t l, UIntType f - > - SPROUT_CONSTEXPR_OR_CONST std::size_t - sprout::random::mersenne_twister_engine::tempering_l - ; - template< - typename UIntType, - std::size_t w, std::size_t n, std::size_t m, std::size_t r, UIntType a, std::size_t u, UIntType d, - std::size_t s, UIntType b, std::size_t t, UIntType c, std::size_t l, UIntType f - > - SPROUT_CONSTEXPR_OR_CONST UIntType - sprout::random::mersenne_twister_engine::initialization_multiplier - ; - template< - typename UIntType, - std::size_t w, std::size_t n, std::size_t m, std::size_t r, UIntType a, std::size_t u, UIntType d, - std::size_t s, UIntType b, std::size_t t, UIntType c, std::size_t l, UIntType f - > - SPROUT_CONSTEXPR_OR_CONST UIntType - sprout::random::mersenne_twister_engine::default_seed - ; - - // - // mt11213b - // - typedef sprout::random::mersenne_twister_engine< - std::uint_fast32_t, - 32, - 351, - 175, - 19, - 0xccab8ee7, - 11, - 0xffffffff, - 7, - 0x31b6ab00, - 15, - 0xffe50000, - 17, - 1812433253 - > mt11213b; - // - // mt19937 - // - typedef sprout::random::mersenne_twister_engine< - std::uint_fast32_t, - 32, - 624, - 397, - 31, - 0x9908b0df, - 11, - 0xffffffff, - 7, - 0x9d2c5680, - 15, - 0xefc60000, - 18, - 1812433253 - > mt19937; - // - // mt19937_64 - // - typedef sprout::random::mersenne_twister_engine< - std::uint_fast64_t, - 64, - 312, - 156, - 31, - SPROUT_UINT64_C(0xb5026f5aa96619e9), - 29, - SPROUT_UINT64_C(0x5555555555555555), - 17, - SPROUT_UINT64_C(0x71d67fffeda60000), - 37, - SPROUT_UINT64_C(0xfff7eee000000000), - 43, - SPROUT_UINT64_C(6364136223846793005) - > mt19937_64; - } // namespace random - - using sprout::random::mersenne_twister_engine; - using sprout::random::mt11213b; - using sprout::random::mt19937; - using sprout::random::mt19937_64; -} // namespace sprout - -#endif // #ifndef SPROUT_RANDOM_MERSENNE_TWISTER_HPP diff --git a/dsp/lib/sprout/sprout/random/normal_distribution.hpp b/dsp/lib/sprout/sprout/random/normal_distribution.hpp deleted file mode 100644 index 760c28c..0000000 --- a/dsp/lib/sprout/sprout/random/normal_distribution.hpp +++ /dev/null @@ -1,287 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_NORMAL_DISTRIBUTION_HPP -#define SPROUT_RANDOM_NORMAL_DISTRIBUTION_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace random { - // - // normal_distribution - // - template - class normal_distribution { - public: - typedef RealType input_type; - typedef RealType result_type; - private: - struct private_construct_t {}; - public: - // - // param_type - // - class param_type { - public: - typedef normal_distribution distribution_type; - private: - RealType mean_; - RealType sigma_; - public: - SPROUT_CONSTEXPR param_type() - : mean_(RealType(0.0)) - , sigma_(RealType(1.0)) - {} - param_type(param_type const&) = default; - explicit SPROUT_CONSTEXPR param_type(RealType mean_arg, RealType sigma_arg = RealType(1.0)) - : mean_(mean_arg) - , sigma_((SPROUT_ASSERT(sigma_arg >= RealType(0)), sigma_arg)) - {} - SPROUT_CONSTEXPR RealType mean() const SPROUT_NOEXCEPT { - return mean_; - } - SPROUT_CONSTEXPR RealType sigma() const SPROUT_NOEXCEPT { - return sigma_; - } - SPROUT_CONSTEXPR RealType stddev() const SPROUT_NOEXCEPT { - return sigma_; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_istream& operator>>( - std::basic_istream& lhs, - param_type& rhs - ) - { - RealType mean; - RealType sigma; - if (lhs >> mean >> std::ws >> sigma) { - if (sigma >= RealType(0)) { - rhs.mean_ = mean; - rhs.sigma_ = sigma; - } else { - lhs.setstate(std::ios_base::failbit); - } - } - return lhs; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_ostream& operator<<( - std::basic_ostream& lhs, - param_type const& rhs - ) - { - return lhs << rhs.mean_ << " " << rhs.sigma_; - } - friend SPROUT_CONSTEXPR bool operator==(param_type const& lhs, param_type const& rhs) SPROUT_NOEXCEPT { - return lhs.mean_ == rhs.mean_ && lhs.sigma_ == rhs.sigma_; - } - friend SPROUT_CONSTEXPR bool operator!=(param_type const& lhs, param_type const& rhs) SPROUT_NOEXCEPT { - return !(lhs == rhs); - } - }; - private: - RealType mean_; - RealType sigma_; - RealType r1_; - RealType r2_; - RealType cached_rho_; - bool valid_; - private: - SPROUT_CONSTEXPR normal_distribution( - RealType mean, RealType sigma, RealType r1, RealType r2, - RealType cached_rho, bool valid, - private_construct_t - ) - : mean_(mean) - , sigma_(sigma) - , r1_(r1) - , r2_(r2) - , cached_rho_(cached_rho) - , valid_(valid) - {} - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_2(Engine const& eng, RealType r1, RealType r2, RealType cached_rho, bool valid) const { - return sprout::random::random_result( - cached_rho - * (valid - ? sprout::cos(sprout::math::two_pi() * r1) - : sprout::sin(sprout::math::two_pi() * r1) - ) - * sigma_ + mean_, - eng, - normal_distribution( - mean_, - sigma_, - r1, - r2, - cached_rho, - valid, - private_construct_t() - ) - ); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_1_1(RealType r1, Random const& rnd) const { - return generate_2( - sprout::random::next(rnd).engine(), r1, sprout::random::result(rnd), - sprout::sqrt(-result_type(2) * sprout::math::log(result_type(1) - sprout::random::result(rnd))), true - ); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_1(Random const& rnd) const { - return generate_1_1(sprout::random::result(rnd), sprout::random::next(rnd)()); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate(Engine const& eng) const { - return !valid_ - ? generate_1(sprout::random::uniform_01()(eng)) - : generate_2(eng, r1_, r2_, cached_rho_, false) - ; - } - public: - SPROUT_CONSTEXPR normal_distribution() - : mean_(RealType(0.0)) - , sigma_(RealType(1.0)) - , r1_(0) - , r2_(0) - , cached_rho_(0) - , valid_(false) - {} - normal_distribution(normal_distribution const&) = default; - explicit SPROUT_CONSTEXPR normal_distribution(RealType mean_arg, RealType sigma_arg = RealType(1.0)) - : mean_(mean_arg) - , sigma_((SPROUT_ASSERT(sigma_arg >= RealType(0)), sigma_arg)) - , r1_(0) - , r2_(0) - , cached_rho_(0) - , valid_(false) - {} - explicit SPROUT_CONSTEXPR normal_distribution(param_type const& parm) - : mean_(parm.mean()) - , sigma_(parm.sigma()) - , r1_(0) - , r2_(0) - , cached_rho_(0) - , valid_(false) - {} - SPROUT_CONSTEXPR result_type mean() const SPROUT_NOEXCEPT { - return mean_; - } - SPROUT_CONSTEXPR result_type sigma() const SPROUT_NOEXCEPT { - return sigma_; - } - SPROUT_CONSTEXPR result_type stddev() const SPROUT_NOEXCEPT { - return sigma_; - } - SPROUT_CONSTEXPR result_type min() const SPROUT_NOEXCEPT { - return -sprout::numeric_limits::infinity(); - } - SPROUT_CONSTEXPR result_type max() const SPROUT_NOEXCEPT { - return sprout::numeric_limits::infinity(); - } - SPROUT_CXX14_CONSTEXPR void reset() SPROUT_NOEXCEPT { - valid_ = false; - } - SPROUT_CONSTEXPR param_type param() const SPROUT_NOEXCEPT { - return param_type(mean_, sigma_); - } - SPROUT_CXX14_CONSTEXPR void param(param_type const& parm) { - mean_ = parm.mean(); - sigma_ = parm.sigma(); - valid_ = false; - } - template - SPROUT_CXX14_CONSTEXPR result_type operator()(Engine& eng) { - if (!valid_) { - r1_ = static_cast(sprout::random::uniform_01()(eng)); - r2_ = static_cast(sprout::random::uniform_01()(eng)); - cached_rho_ = sprout::math::sqrt(-result_type(2) * sprout::math::log(result_type(1) - r2_)); - valid_ = true; - } else { - valid_ = false; - } - return cached_rho_ - * (valid_ - ? sprout::math::cos(sprout::math::two_pi() * r1_) - : sprout::math::sin(sprout::math::two_pi() * r1_)) - * sigma_ + mean_ - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result const operator()(Engine const& eng) const { - return generate(eng); - } - template - SPROUT_CXX14_CONSTEXPR result_type operator()(Engine& eng, param_type const& parm) const { - return normal_distribution(parm)(eng); - } - template - SPROUT_CONSTEXPR sprout::random::random_result const operator()(Engine const& eng, param_type const& parm) const { - return normal_distribution(parm)(eng); - } - template - friend SPROUT_NON_CONSTEXPR std::basic_istream& operator>>( - std::basic_istream& lhs, - normal_distribution& rhs - ) - { - param_type parm; - bool valid; - RealType cached_rho; - RealType r1; - RealType r2; - if (lhs >> parm >> std::ws >> valid >> std::ws >> cached_rho >> std::ws >> r1 >> std::ws >> r2) { - rhs.param(parm); - rhs.valid_ = valid; - rhs.cached_rho_ = cached_rho; - rhs.r1_ = r1; - rhs.r2_ = r2; - } - return lhs; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_ostream& operator<<( - std::basic_ostream& lhs, - normal_distribution const& rhs - ) - { - return lhs << rhs.param() << " " << rhs.valid_ << " " << rhs.cached_rho_ << " " << rhs.r1_ << " " << rhs.r2_; - } - friend SPROUT_CONSTEXPR bool operator==(normal_distribution const& lhs, normal_distribution const& rhs) SPROUT_NOEXCEPT { - return lhs.param() == rhs.param() - && lhs.valid_ == rhs.valid_ - && lhs.cached_rho_ == rhs.cached_rho_ - && lhs.r1_ == rhs.r1_ && lhs.r2_ == rhs.r2_ - ; - } - friend SPROUT_CONSTEXPR bool operator!=(normal_distribution const& lhs, normal_distribution const& rhs) SPROUT_NOEXCEPT { - return !(lhs == rhs); - } - }; - } // namespace random - - using sprout::random::normal_distribution; -} // namespace sprout - -#endif // #ifndef SPROUT_RANDOM_NORMAL_DISTRIBUTION_HPP diff --git a/dsp/lib/sprout/sprout/random/poisson_distribution.hpp b/dsp/lib/sprout/sprout/random/poisson_distribution.hpp deleted file mode 100644 index 0c810b7..0000000 --- a/dsp/lib/sprout/sprout/random/poisson_distribution.hpp +++ /dev/null @@ -1,417 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_POISSON_DISTRIBUTION_HPP -#define SPROUT_RANDOM_POISSON_DISTRIBUTION_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef SPROUT_WORKAROUND_NOT_TERMINATE_RECURSIVE_CONSTEXPR_FUNCTION_TEMPLATE -# include -#endif - -namespace sprout { - namespace random { - namespace detail { -# define SPROUT_POISSON_TABLE_DEF \ - {{ \ - 0.0, \ - 0.0, \ - 0.69314718055994529, \ - 1.7917594692280550, \ - 3.1780538303479458, \ - 4.7874917427820458, \ - 6.5792512120101012, \ - 8.5251613610654147, \ - 10.604602902745251, \ - 12.801827480081469 \ - }} - - template - struct poisson_table { - public: - typedef sprout::array table_type; - public: - SPROUT_STATIC_CONSTEXPR table_type table - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(SPROUT_POISSON_TABLE_DEF) - ; - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::random::detail::poisson_table::table_type - sprout::random::detail::poisson_table::table - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(SPROUT_POISSON_TABLE_DEF) - ; - -# undef SPROUT_POISSON_TABLE_DEF - } // namespace detail - // - // poisson_distribution - // - template - class poisson_distribution { - public: - typedef RealType input_type; - typedef IntType result_type; - public: - // - // param_type - // - class param_type { - public: - typedef poisson_distribution distribution_type; - private: - RealType mean_; - public: - SPROUT_CONSTEXPR param_type() - : mean_(RealType(1)) - {} - param_type(param_type const&) = default; - explicit SPROUT_CONSTEXPR param_type(RealType mean_arg) - : mean_((SPROUT_ASSERT(RealType(0) < mean_arg), mean_arg)) - {} - SPROUT_CONSTEXPR RealType mean() const SPROUT_NOEXCEPT { - return mean_; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_istream& operator>>( - std::basic_istream& lhs, - param_type& rhs - ) - { - RealType mean; - if (lhs >> mean) { - if (RealType(0) < mean) { - rhs.mean_ = mean; - } else { - lhs.setstate(std::ios_base::failbit); - } - } - return lhs; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_ostream& operator<<( - std::basic_ostream& lhs, - param_type const& rhs - ) - { - return lhs << rhs.mean_; - } - friend SPROUT_CONSTEXPR bool operator==(param_type const& lhs, param_type const& rhs) SPROUT_NOEXCEPT { - return lhs.mean_ == rhs.mean_; - } - friend SPROUT_CONSTEXPR bool operator!=(param_type const& lhs, param_type const& rhs) SPROUT_NOEXCEPT { - return !(lhs == rhs); - } - }; - struct ptrd_type { - public: - RealType v_r; - RealType a; - RealType b; - RealType smu; - RealType inv_alpha; - }; - private: - static SPROUT_CONSTEXPR bool use_inversion_check(RealType mean) { - return mean < 10; - } - static SPROUT_CONSTEXPR ptrd_type init_ptrd_2(RealType smu, RealType b) { - return ptrd_type{ - 0.9277 - 3.6224 / (b - 2), - -0.059 + 0.02483 * b, - b, - smu, - 1.1239 + 1.1328 / (b - 3.4) - }; - } - static SPROUT_CONSTEXPR ptrd_type init_ptrd_1(RealType smu) { - return init_ptrd_2(smu, 0.931 + 2.53 * smu); - } - static SPROUT_CONSTEXPR ptrd_type init_ptrd(RealType mean) { - return use_inversion_check(mean) ? ptrd_type() - : init_ptrd_1(sprout::sqrt(mean)) - ; - } - static SPROUT_CONSTEXPR RealType init_exp_mean(RealType mean) { - return !use_inversion_check(mean) ? RealType() - : sprout::exp(-mean) - ; - } - static SPROUT_CONSTEXPR RealType log_factorial(IntType k) { - return sprout::random::detail::poisson_table::table[k]; - } - static SPROUT_CONSTEXPR RealType log_sqrt_2pi() { - return 0.91893853320467267; - } - static SPROUT_CONSTEXPR RealType generate_us(RealType u) { - return 0.5 - sprout::abs(u); - } - private: - RealType mean_; - ptrd_type ptrd_; - RealType exp_mean_; - private: - SPROUT_CONSTEXPR bool use_inversion() const { - return use_inversion_check(mean_); - } - template - SPROUT_CXX14_CONSTEXPR result_type do_invert(Engine& eng) const { - RealType u = sprout::random::uniform_01()(eng); - IntType x = 0; - RealType p = exp_mean_; - while (u > p) { - u -= p; - ++x; - p = p * mean_ / x; - } - return x; - } - template - SPROUT_CONSTEXPR sprout::random::random_result invert_2(Random const& rnd, RealType u, IntType x, RealType p) const { - return !(u > p) ? sprout::random::random_result(x, sprout::random::next(rnd).engine(), *this) - : invert_2(rnd, u - p, x + 1, p * mean_ / (x + 1)) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result invert_1(Random const& rnd, IntType x, RealType p) const { - return invert_2(rnd, sprout::random::result(rnd), x, p); - } - template - SPROUT_CONSTEXPR sprout::random::random_result invert(Engine const& eng) const { - return invert_1(sprout::random::uniform_01()(eng), 0, exp_mean_); - } - template - SPROUT_CXX14_CONSTEXPR result_type do_generate(Engine& eng) const { - for (; ; ) { - RealType v = sprout::random::uniform_01()(eng); - if (v <= 0.86 * ptrd_.v_r) { - RealType u = v / ptrd_.v_r - 0.43; - return static_cast(sprout::floor((2 * ptrd_.a / (0.5 - sprout::abs(u)) + ptrd_.b) * u + mean_ + 0.445)); - } - RealType u = RealType(); - if (v >= ptrd_.v_r) { - u = sprout::random::uniform_01()(eng) - 0.5; - } else { - u = v / ptrd_.v_r - 0.93; - u = ((u < 0) ? -0.5 : 0.5) - u; - v = sprout::random::uniform_01()(eng) * ptrd_.v_r; - } - RealType us = 0.5 - sprout::abs(u); - if (us < 0.013 && v > us) { - continue; - } - RealType k = sprout::floor((2 * ptrd_.a / us + ptrd_.b) * u + mean_ + 0.445); - v = v * ptrd_.inv_alpha / (ptrd_.a / (us * us) + ptrd_.b); - if ((k >= 10 && sprout::log(v * ptrd_.smu) <= (k + 0.5) * sprout::log(mean_ / k) - mean_ - log_sqrt_2pi() + k - (1 / 12. - (1 / 360. - 1 / (1260. * k * k)) / (k * k)) / k) - || (k >= 0 && sprout::log(v) <= k * sprout::log(mean_) - mean_ - log_factorial(static_cast(k))) - ) - { - return static_cast(k); - } - } - } - template - SPROUT_CONSTEXPR sprout::random::random_result generate_4(Random const& rnd, RealType u) const { - return sprout::random::random_result( - static_cast(sprout::floor((2 * ptrd_.a / (0.5 - sprout::abs(u)) + ptrd_.b) * u + mean_ + 0.445)), - sprout::random::next(rnd).engine(), - *this - ); - } -#ifdef SPROUT_WORKAROUND_NOT_TERMINATE_RECURSIVE_CONSTEXPR_FUNCTION_TEMPLATE - template - SPROUT_CONSTEXPR sprout::random::random_result generate_3(Random const& rnd, RealType k, RealType v) const { - return (k >= 10 && sprout::log(v * ptrd_.smu) <= (k + 0.5) * sprout::log(mean_ / k) - mean_ - log_sqrt_2pi() + k - (1 / 12. - (1 / 360. - 1 / (1260. * k * k)) / (k * k)) / k) - || (k >= 0 && sprout::log(v) <= k * sprout::log(mean_) - mean_ - log_factorial(static_cast(k))) - ? sprout::random::random_result(static_cast(k), sprout::random::next(rnd).engine(), *this) - : generate_1(rnd()) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result generate_3(Random const&, RealType, RealType) const { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - SPROUT_CONSTEXPR sprout::random::random_result generate_2(Random const& rnd, RealType v, RealType u, RealType us) const { - return us < 0.013 && v > us ? generate_1(rnd()) - : generate_3( - rnd, - sprout::floor((2 * ptrd_.a / us + ptrd_.b) * u + mean_ + 0.445), - v * ptrd_.inv_alpha / (ptrd_.a / (us * us) + ptrd_.b) - ) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result generate_2(Random const&, RealType, RealType, RealType) const { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - SPROUT_CONSTEXPR sprout::random::random_result generate_1_3(Random const& rnd, RealType, RealType u) const { - return generate_2(rnd, sprout::random::result(rnd), ((u < 0) ? -0.5 : 0.5) - u, generate_us(((u < 0) ? -0.5 : 0.5) - u)); - } - template - SPROUT_CONSTEXPR sprout::random::random_result generate_1_3(Random const&, RealType, RealType) const { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - SPROUT_CONSTEXPR sprout::random::random_result generate_1_2(Random const& rnd, RealType v) const { - return generate_2(rnd, v, sprout::random::result(rnd) - 0.5, generate_us(sprout::random::result(rnd) - 0.5)); - } - template - SPROUT_CONSTEXPR sprout::random::random_result generate_1_2(Random const&, RealType) const { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - SPROUT_CONSTEXPR sprout::random::random_result generate_1(Random const& rnd) const { - return sprout::random::result(rnd) <= 0.86 * ptrd_.v_r ? generate_4(rnd, sprout::random::result(rnd) / ptrd_.v_r - 0.43) - : sprout::random::result(rnd) >= ptrd_.v_r - ? generate_1_2(rnd(), sprout::random::result(rnd)) - : generate_1_3(rnd(), sprout::random::result(rnd), sprout::random::result(rnd) / ptrd_.v_r - 0.93) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result generate_1(Random const&) const { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } -#else - template - SPROUT_CONSTEXPR sprout::random::random_result generate_3(Random const& rnd, RealType k, RealType v) const { - return (k >= 10 && sprout::log(v * ptrd_.smu) <= (k + 0.5) * sprout::log(mean_ / k) - mean_ - log_sqrt_2pi() + k - (1 / 12. - (1 / 360. - 1 / (1260. * k * k)) / (k * k)) / k) - || (k >= 0 && sprout::log(v) <= k * sprout::log(mean_) - mean_ - log_factorial(static_cast(k))) - ? sprout::random::random_result(static_cast(k), sprout::random::next(rnd).engine(), *this) - : generate_1(rnd()) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result generate_2(Random const& rnd, RealType v, RealType u, RealType us) const { - return us < 0.013 && v > us ? generate_1(rnd()) - : generate_3( - rnd, - sprout::floor((2 * ptrd_.a / us + ptrd_.b) * u + mean_ + 0.445), - v * ptrd_.inv_alpha / (ptrd_.a / (us * us) + ptrd_.b) - ) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result generate_1_3(Random const& rnd, RealType v, RealType u) const { - return generate_2(rnd, sprout::random::result(rnd), ((u < 0) ? -0.5 : 0.5) - u, generate_us(((u < 0) ? -0.5 : 0.5) - u)); - } - template - SPROUT_CONSTEXPR sprout::random::random_result generate_1_2(Random const& rnd, RealType v) const { - return generate_2(rnd, v, sprout::random::result(rnd) - 0.5, generate_us(sprout::random::result(rnd) - 0.5)); - } - template - SPROUT_CONSTEXPR sprout::random::random_result generate_1(Random const& rnd) const { - return sprout::random::result(rnd) <= 0.86 * ptrd_.v_r ? generate_4(rnd, sprout::random::result(rnd) / ptrd_.v_r - 0.43) - : sprout::random::result(rnd) >= ptrd_.v_r - ? generate_1_2(rnd(), sprout::random::result(rnd)) - : generate_1_3(rnd(), sprout::random::result(rnd), sprout::random::result(rnd) / ptrd_.v_r - 0.93) - ; - } -#endif - template - SPROUT_CONSTEXPR sprout::random::random_result generate(Engine const& eng) const { - return generate_1(sprout::random::uniform_01()(eng)); - } - public: - SPROUT_CONSTEXPR poisson_distribution() - : mean_(RealType(1)) - , ptrd_(init_ptrd(RealType(1))) - , exp_mean_(init_exp_mean(RealType(1))) - {} - poisson_distribution(poisson_distribution const&) = default; - explicit SPROUT_CONSTEXPR poisson_distribution(RealType mean_arg) - : mean_((SPROUT_ASSERT(RealType(0) < mean_arg), mean_arg)) - , ptrd_(init_ptrd(mean_arg)) - , exp_mean_(init_exp_mean(mean_arg)) - {} - explicit SPROUT_CONSTEXPR poisson_distribution(param_type const& parm) - : mean_(parm.mean()) - , ptrd_(init_ptrd(parm.mean())) - , exp_mean_(init_exp_mean(parm.mean())) - {} - SPROUT_CONSTEXPR result_type mean() const SPROUT_NOEXCEPT { - return mean_; - } - SPROUT_CONSTEXPR result_type min() const SPROUT_NOEXCEPT { - return 0; - } - SPROUT_CONSTEXPR result_type max() const SPROUT_NOEXCEPT { - return sprout::numeric_limits::max(); - } - SPROUT_CXX14_CONSTEXPR void reset() SPROUT_NOEXCEPT {} - SPROUT_CONSTEXPR param_type param() const SPROUT_NOEXCEPT { - return param_type(mean_); - } - SPROUT_CXX14_CONSTEXPR void param(param_type const& parm) { - mean_ = parm.mean(); - ptrd_ = init_ptrd(mean_); - exp_mean_ = init_exp_mean(mean_); - } - template - SPROUT_CXX14_CONSTEXPR result_type operator()(Engine& eng) const { - return use_inversion() ? do_invert(eng) - : do_generate(eng) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result const operator()(Engine const& eng) const { - return use_inversion() ? invert(eng) - : generate(eng) - ; - } - template - SPROUT_CXX14_CONSTEXPR result_type operator()(Engine& eng, param_type const& parm) const { - return poisson_distribution(parm)(eng); - } - template - SPROUT_CONSTEXPR sprout::random::random_result const operator()(Engine const& eng, param_type const& parm) const { - return poisson_distribution(parm)(eng); - } - template - friend SPROUT_NON_CONSTEXPR std::basic_istream& operator>>( - std::basic_istream& lhs, - poisson_distribution& rhs - ) - { - param_type parm; - if (lhs >> parm) { - rhs.param(parm); - } - return lhs; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_ostream& operator<<( - std::basic_ostream& lhs, - poisson_distribution const& rhs - ) - { - return lhs << rhs.param(); - } - friend SPROUT_CONSTEXPR bool operator==(poisson_distribution const& lhs, poisson_distribution const& rhs) SPROUT_NOEXCEPT { - return lhs.param() == rhs.param(); - } - friend SPROUT_CONSTEXPR bool operator!=(poisson_distribution const& lhs, poisson_distribution const& rhs) SPROUT_NOEXCEPT { - return !(lhs == rhs); - } - }; - } // namespace random - - using sprout::random::poisson_distribution; -} // namespace sprout - -#endif // #ifndef SPROUT_RANDOM_POISSON_DISTRIBUTION_HPP diff --git a/dsp/lib/sprout/sprout/random/random_result.hpp b/dsp/lib/sprout/sprout/random/random_result.hpp deleted file mode 100644 index b000b86..0000000 --- a/dsp/lib/sprout/sprout/random/random_result.hpp +++ /dev/null @@ -1,432 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_RANDOM_RESULT_HPP -#define SPROUT_RANDOM_RANDOM_RESULT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace random { - // - // random_result - // - template - class random_result< - Engine, - Distribution, - typename std::enable_if::value>::type - > - : public sprout::iterator< - std::input_iterator_tag, - typename std::remove_reference::type::result_type, - std::ptrdiff_t, - typename std::remove_reference::type::result_type const*, - typename std::remove_reference::type::result_type const& - > - { - public: - typedef Engine engine_type; - typedef Distribution distribution_type; - typedef typename std::remove_reference::type::result_type result_type; - typedef sprout::random::variate_generator generator_type; - private: - typedef sprout::iterator< - std::input_iterator_tag, - result_type, - std::ptrdiff_t, - result_type const*, - result_type const& - > base_type; - typedef sprout::random::detail::ptr_helper engine_helper_type; - typedef sprout::random::detail::ptr_helper distribution_helper_type; - public: - typedef typename base_type::iterator_category iterator_category; - typedef typename base_type::value_type value_type; - typedef typename base_type::difference_type difference_type; - typedef typename base_type::pointer pointer; - typedef typename base_type::reference reference; - typedef typename engine_helper_type::value_type engine_value_type; - typedef typename distribution_helper_type::value_type distribution_value_type; - typedef typename engine_helper_type::reference_type engine_reference_type; - typedef typename distribution_helper_type::reference_type distribution_reference_type; - typedef typename engine_helper_type::const_reference_type engine_const_reference_type; - typedef typename distribution_helper_type::const_reference_type distribution_const_reference_type; - typedef typename engine_helper_type::rvalue_type engine_param_type; - typedef typename distribution_helper_type::rvalue_type distribution_param_type; - typedef typename generator_type::random_result_type random_result_type; - private: - result_type result_; - generator_type generator_; - public: - SPROUT_CONSTEXPR random_result() - : result_(), generator_() - {} - random_result(random_result const&) = default; - SPROUT_CONSTEXPR random_result( - result_type const& result, - engine_param_type engine, distribution_param_type distribution - ) - : result_(result) - , generator_(engine, distribution) - {} - SPROUT_CONSTEXPR random_result_type operator()() const { - return generator_(); - } - SPROUT_CXX14_CONSTEXPR result_type& generated_value() SPROUT_NOEXCEPT { - return result_; - } - SPROUT_CONSTEXPR result_type const& generated_value() const SPROUT_NOEXCEPT { - return result_; - } - SPROUT_CXX14_CONSTEXPR generator_type& next_generator() SPROUT_NOEXCEPT { - return generator_; - } - SPROUT_CONSTEXPR generator_type const& next_generator() const SPROUT_NOEXCEPT { - return generator_; - } - SPROUT_CONSTEXPR random_result_type next_value() const SPROUT_NOEXCEPT { - return generator_(); - } - SPROUT_CXX14_CONSTEXPR result_type& result() SPROUT_NOEXCEPT { - return result_; - } - SPROUT_CONSTEXPR result_type const& result() const SPROUT_NOEXCEPT { - return result_; - } - SPROUT_CXX14_CONSTEXPR generator_type& next() SPROUT_NOEXCEPT { - return generator_; - } - SPROUT_CONSTEXPR generator_type const& next() const SPROUT_NOEXCEPT { - return generator_; - } - SPROUT_CXX14_CONSTEXPR engine_reference_type engine() SPROUT_NOEXCEPT { - return generator_.engine(); - } - SPROUT_CONSTEXPR engine_const_reference_type engine() const SPROUT_NOEXCEPT { - return generator_.engine(); - } - SPROUT_CXX14_CONSTEXPR distribution_reference_type distribution() SPROUT_NOEXCEPT { - return generator_.distribution(); - } - SPROUT_CONSTEXPR distribution_const_reference_type distribution() const SPROUT_NOEXCEPT { - return generator_.distribution(); - } - SPROUT_CXX14_CONSTEXPR operator result_type&() SPROUT_NOEXCEPT { - return result_; - } - SPROUT_CONSTEXPR operator result_type const&() const SPROUT_NOEXCEPT { - return result_; - } - SPROUT_CONSTEXPR result_type min() const SPROUT_NOEXCEPT { - return distribution().min(); - } - SPROUT_CONSTEXPR result_type max() const SPROUT_NOEXCEPT { - return distribution().max(); - } - SPROUT_CXX14_CONSTEXPR void swap(random_result& other) - SPROUT_NOEXCEPT_IF( - SPROUT_NOEXCEPT_EXPR(sprout::swap(result_, other.result_)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(generator_, other.generator_)) - ) - { - sprout::swap(result_, other.result_); - sprout::swap(generator_, other.generator_); - } - friend SPROUT_CONSTEXPR bool operator==(random_result const& lhs, random_result const& rhs) SPROUT_NOEXCEPT { - return lhs.result_ == rhs.result_ - && lhs.generator_ == rhs.generator_ - ; - } - friend SPROUT_CONSTEXPR bool operator!=(random_result const& lhs, random_result const& rhs) SPROUT_NOEXCEPT { - return !(lhs == rhs); - } - SPROUT_CONSTEXPR reference operator*() const SPROUT_NOEXCEPT { - return result_; - } - SPROUT_CONSTEXPR pointer operator->() const SPROUT_NOEXCEPT { - return &result_; - } - SPROUT_CXX14_CONSTEXPR random_result& operator++() { - random_result temp((*this)()); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR random_result operator++(int) { - random_result result(*this); - ++*this; - return result; - } - }; - template - class random_result< - Engine, - Distribution, - typename std::enable_if::value>::type - > - : public sprout::iterator< - std::input_iterator_tag, - typename std::remove_reference::type::result_type, - std::ptrdiff_t, - typename std::remove_reference::type::result_type const*, - typename std::remove_reference::type::result_type const& - > - { - public: - typedef Engine engine_type; - typedef typename std::remove_reference::type::result_type result_type; - typedef engine_type generator_type; - private: - typedef sprout::iterator< - std::input_iterator_tag, - result_type, - std::ptrdiff_t, - result_type const*, - result_type const& - > base_type; - typedef sprout::random::detail::ptr_helper engine_helper_type; - public: - typedef typename base_type::iterator_category iterator_category; - typedef typename base_type::value_type value_type; - typedef typename base_type::difference_type difference_type; - typedef typename base_type::pointer pointer; - typedef typename base_type::reference reference; - typedef typename engine_helper_type::value_type engine_value_type; - typedef typename engine_helper_type::reference_type engine_reference_type; - typedef typename engine_helper_type::const_reference_type engine_const_reference_type; - typedef typename engine_helper_type::rvalue_type engine_param_type; - typedef random_result random_result_type; - private: - result_type result_; - generator_type generator_; - public: - SPROUT_CONSTEXPR random_result() - : result_(), generator_() - {} - random_result(random_result const&) = default; - SPROUT_CONSTEXPR random_result(result_type result, engine_param_type engine) - : result_(result), generator_(engine) - {} - SPROUT_CONSTEXPR random_result_type operator()() const { - return generator_(); - } - SPROUT_CXX14_CONSTEXPR result_type& generated_value() SPROUT_NOEXCEPT { - return result_; - } - SPROUT_CONSTEXPR result_type const& generated_value() const SPROUT_NOEXCEPT { - return result_; - } - SPROUT_CXX14_CONSTEXPR generator_type& next_generator() SPROUT_NOEXCEPT { - return generator_; - } - SPROUT_CONSTEXPR generator_type const& next_generator() const SPROUT_NOEXCEPT { - return generator_; - } - SPROUT_CONSTEXPR random_result_type next_value() const SPROUT_NOEXCEPT { - return generator_(); - } - SPROUT_CXX14_CONSTEXPR result_type& result() SPROUT_NOEXCEPT { - return result_; - } - SPROUT_CONSTEXPR result_type const& result() const SPROUT_NOEXCEPT { - return result_; - } - SPROUT_CXX14_CONSTEXPR generator_type& next() SPROUT_NOEXCEPT { - return generator_; - } - SPROUT_CONSTEXPR generator_type const& next() const SPROUT_NOEXCEPT { - return generator_; - } - SPROUT_CXX14_CONSTEXPR engine_reference_type engine() SPROUT_NOEXCEPT { - return generator_; - } - SPROUT_CONSTEXPR engine_const_reference_type engine() const SPROUT_NOEXCEPT { - return generator_; - } - SPROUT_CXX14_CONSTEXPR operator result_type&() SPROUT_NOEXCEPT { - return result_; - } - SPROUT_CONSTEXPR operator result_type const&() const SPROUT_NOEXCEPT { - return result_; - } - SPROUT_CONSTEXPR result_type min() const SPROUT_NOEXCEPT { - return engine().min(); - } - SPROUT_CONSTEXPR result_type max() const SPROUT_NOEXCEPT { - return engine().max(); - } - friend SPROUT_CONSTEXPR bool operator==(random_result const& lhs, random_result const& rhs) SPROUT_NOEXCEPT { - return lhs.result_ == rhs.result_ - && lhs.generator_ == rhs.generator_ - ; - } - friend SPROUT_CONSTEXPR bool operator!=(random_result const& lhs, random_result const& rhs) SPROUT_NOEXCEPT { - return !(lhs == rhs); - } - SPROUT_CXX14_CONSTEXPR void swap(random_result& other) - SPROUT_NOEXCEPT_IF( - SPROUT_NOEXCEPT_EXPR(sprout::swap(result_, other.result_)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(generator_, other.generator_)) - ) - { - sprout::swap(result_, other.result_); - sprout::swap(generator_, other.generator_); - } - SPROUT_CONSTEXPR reference operator*() const SPROUT_NOEXCEPT { - return result_; - } - SPROUT_CONSTEXPR pointer operator->() const SPROUT_NOEXCEPT { - return &result_; - } - SPROUT_CXX14_CONSTEXPR random_result& operator++() { - random_result temp((*this)()); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR random_result operator++(int) { - random_result result(*this); - random_result temp((*this)()); - temp.swap(*this); - return result; - } - }; - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::random::random_result& lhs, sprout::random::random_result& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR sprout::random::random_result - iterator_next(sprout::random::random_result const& it) { - return it(); - } - } // namespace random - - namespace tuples { - namespace detail { - template - struct tuple_element_impl; - template - struct tuple_element_impl > - : public sprout::detail::nil_base - {}; - template - struct tuple_element_impl<0, sprout::random::random_result > - : public sprout::identity::result_type> - {}; - template - struct tuple_element_impl<1, sprout::random::random_result > - : public sprout::identity::generator_type> - {}; - - template - struct get_impl; - template - struct get_impl<0, sprout::random::random_result > { - public: - SPROUT_CONSTEXPR typename sprout::random::random_result::result_type& - operator()(sprout::random::random_result& t) const { - return t.generated_value(); - } - SPROUT_CONSTEXPR typename sprout::random::random_result::result_type const& - operator()(sprout::random::random_result const& t) const { - return t.generated_value(); - } - }; - template - struct get_impl<1, sprout::random::random_result > { - public: - SPROUT_CONSTEXPR typename sprout::random::random_result::generator_type& - operator()(sprout::random::random_result& t) const { - return t.next_generator(); - } - SPROUT_CONSTEXPR typename sprout::random::random_result::generator_type const& - operator()(sprout::random::random_result const& t) const { - return t.next_generator(); - } - }; - } // namespace detail - } // namespace tuples -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // tuple_size - // - template - struct tuple_size > - : public sprout::integral_constant - {}; - - // - // tuple_element - // - template - struct tuple_element > - : public sprout::tuples::detail::tuple_element_impl > - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -namespace sprout { - namespace random { - // - // tuple_get - // - template - inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element >::type& - tuple_get(sprout::random::random_result& t) SPROUT_NOEXCEPT { - static_assert(I < 2, "tuple_get: index out of range"); - return sprout::tuples::detail::get_impl >()(t); - } - template - inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element >::type const& - tuple_get(sprout::random::random_result const& t) SPROUT_NOEXCEPT { - static_assert(I < 2, "tuple_get: index out of range"); - return sprout::tuples::detail::get_impl >()(t); - } - template - inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element >::type&& - tuple_get(sprout::random::random_result&& t) SPROUT_NOEXCEPT { - return sprout::move(sprout::tuples::get(t)); - } - } // namespace random -} // namespace sprout - -#endif // #ifndef SPROUT_RANDOM_RANDOM_RESULT_HPP diff --git a/dsp/lib/sprout/sprout/random/random_result_fwd.hpp b/dsp/lib/sprout/sprout/random/random_result_fwd.hpp deleted file mode 100644 index a3ce144..0000000 --- a/dsp/lib/sprout/sprout/random/random_result_fwd.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_RANDOM_RESULT_FWD_HPP -#define SPROUT_RANDOM_RANDOM_RESULT_FWD_HPP - -#include - -namespace sprout { - namespace random { - // - // random_result - // - template - class random_result; - } // namespace random - - using sprout::random::random_result; -} // namespace sprout - -#endif // #ifndef SPROUT_RANDOM_RANDOM_RESULT_FWD_HPP diff --git a/dsp/lib/sprout/sprout/random/range.hpp b/dsp/lib/sprout/sprout/random/range.hpp deleted file mode 100644 index 5cd8138..0000000 --- a/dsp/lib/sprout/sprout/random/range.hpp +++ /dev/null @@ -1,55 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_RANGE_HPP -#define SPROUT_RANDOM_RANGE_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace random { - // - // make_range - // - template< - typename Engine, typename Distribution, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR auto - make_range( - Engine const& engine, Distribution const& distribution, - typename sprout::generator_iterator::type>::difference_type count = -1 - ) - -> sprout::range::range_container::type> > - { - return sprout::range::range_container::type> >( - sprout::random::begin(engine, distribution, count), - sprout::random::end(engine, distribution) - ); - } - template - inline SPROUT_CONSTEXPR auto - make_range( - Engine const& engine, - typename sprout::generator_iterator::type>::difference_type count = -1 - ) - -> sprout::range::range_container::type> > - { - return sprout::range::range_container::type> >( - sprout::random::begin(engine, count), - sprout::random::end(engine) - ); - } - } // namespace random -} // namespace sprout - -#endif // #ifndef SPROUT_RANDOM_RANGE_HPP diff --git a/dsp/lib/sprout/sprout/random/results.hpp b/dsp/lib/sprout/sprout/random/results.hpp deleted file mode 100644 index 5186845..0000000 --- a/dsp/lib/sprout/sprout/random/results.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_RESULTS_HPP -#define SPROUT_RANDOM_RESULTS_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace random { - // - // result - // - template - inline SPROUT_CONSTEXPR decltype(sprout::generators::generated_value(std::declval())) - result(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::generators::generated_value(std::declval())) - { - return sprout::generators::generated_value(SPROUT_FORWARD(T, t)); - } - - // - // next - // - template - inline SPROUT_CONSTEXPR decltype(sprout::generators::next_generator(std::declval())) - next(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::generators::next_generator(std::declval())) - { - return sprout::generators::next_generator(SPROUT_FORWARD(T, t)); - } - } // namespace random -} // namespace sprout - -#endif // #ifndef SPROUT_RANDOM_RESULTS_HPP diff --git a/dsp/lib/sprout/sprout/random/seed.hpp b/dsp/lib/sprout/sprout/random/seed.hpp deleted file mode 100644 index b0fddb4..0000000 --- a/dsp/lib/sprout/sprout/random/seed.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_SEED_HPP -#define SPROUT_RANDOM_SEED_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_RANDOM_SEED_HPP diff --git a/dsp/lib/sprout/sprout/random/seed_array.hpp b/dsp/lib/sprout/sprout/random/seed_array.hpp deleted file mode 100644 index 7c0cf88..0000000 --- a/dsp/lib/sprout/sprout/random/seed_array.hpp +++ /dev/null @@ -1,370 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_SEED_ARRAY_HPP -#define SPROUT_RANDOM_SEED_ARRAY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace random { - namespace detail { - template - class seed_array_init { - public: - template - SPROUT_CONSTEXPR UIntType operator()(IntType const& x) const { - return static_cast(x % (std::uint_least64_t(2) << 32)); - } - }; - - template - class seed_array_impl { - public: - typedef std::uint_least32_t result_type; - protected: - typedef sprout::array array_type; - protected: - array_type v; - public: - SPROUT_CONSTEXPR seed_array_impl() SPROUT_NOEXCEPT - : v{{}} - {} - template - SPROUT_CONSTEXPR seed_array_impl(InputIterator begin, InputIterator end) - : v(sprout::fixed::transform(begin, end, sprout::random::detail::seed_array_init())) - {} - }; - } // namespace detail - // - // seed_array - // - template - class seed_array - : public sprout::random::detail::seed_array_impl - { - private: - typedef sprout::random::detail::seed_array_impl impl_type; - public: - typedef typename impl_type::result_type result_type; - typedef result_type value_type; - typedef std::size_t size_type; - private: - using impl_type::v; - private: - static SPROUT_CONSTEXPR result_type tp(result_type x) { - return x ^ (x >> 27); - } - static SPROUT_CONSTEXPR size_type tval(size_type n) { - return (n >= 623) ? 11 - : (n >= 68) ? 7 - : (n >= 39) ? 5 - : (n >= 7) ? 3 - : (n - 1) / 2 - ; - } - template - static SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type set2_impl( - Result const& result, - size_type kpn, size_type kqn, size_type kn, - typename sprout::container_traits::value_type r3, - typename sprout::container_traits::value_type r4, - sprout::index_tuple - ) - { - return sprout::remake( - result, - sprout::size(result), - (Indexes == kn ? r4 - : (result[Indexes] - ^ (Indexes == kpn ? r3 : typename sprout::container_traits::value_type()) - ^ (Indexes == kqn ? r4 : typename sprout::container_traits::value_type()) - ) - )... - ); - } - template - static SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type set2( - Result const& result, - size_type kpn, size_type kqn, size_type kn, - typename sprout::container_traits::value_type r3, - typename sprout::container_traits::value_type r4_3 - ) - { - return set2_impl(result, kpn, kqn, kn, r3, r3 - r4_3, sprout::container_indexes::make()); - } - template - static SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type set1_impl( - Result const& result, - size_type kpn, size_type kqn, size_type kn, - typename sprout::container_traits::value_type r1, - typename sprout::container_traits::value_type r2, - sprout::index_tuple - ) - { - return sprout::remake( - result, - sprout::size(result), - (Indexes == kn ? r2 - : (result[Indexes] - + (Indexes == kpn ? r1 : typename sprout::container_traits::value_type()) - + (Indexes == kqn ? r2 : typename sprout::container_traits::value_type()) - ) - )... - ); - } - template - static SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type set1( - Result const& result, - size_type kpn, size_type kqn, size_type kn, - typename sprout::container_traits::value_type r1, - typename sprout::container_traits::value_type r2_1 - ) - { - return set1_impl(result, kpn, kqn, kn, r1, r1 + r2_1, sprout::container_indexes::make()); - } - template - SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type gen2( - Result const& result, - size_type n, size_type s, size_type m, size_type t, size_type p, size_type q, - size_type k - ) const - { - return k < m + n ? gen2( - set2( - result, (k + p) % n, (k + q) % n, k % n, - 1566083941 * tp(result[k % n] + result[(k + p) % n] + result[(k + n - 1) % n]), - k % n - ), - n, s, m, t, p, q, - k + 1 - ) - : sprout::deep_copy(result) - ; - } - template - SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type gen1_2( - Result const& result, - size_type n, size_type s, size_type m, size_type t, size_type p, size_type q, - size_type k - ) const - { - return k < m ? gen1_2( - set1( - result, (k + p) % n, (k + q) % n, k % n, - 1664525 * tp(result[k % n] ^ result[(k + p) % n] ^ result[(k - 1) % n]), - k % n - ), - n, s, m, t, p, q, - k + 1 - ) - : sprout::deep_copy(result) - ; - } - template - SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type gen1_1( - Result const& result, - size_type n, size_type s, size_type m, size_type t, size_type p, size_type q, - size_type k - ) const - { - return k <= s ? gen1_1( - set1( - result, (k + p) % n, (k + q) % n, k % n, - 1664525 * tp(result[k % n] ^ result[(k + p) % n] ^ result[(k - 1) % n]), - k % n + v[k - 1] - ), - n, s, m, t, p, q, - k + 1 - ) - : sprout::deep_copy(result) - ; - } - template - SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type gen1_0( - Result const& result, - size_type n, size_type s, size_type p, size_type q - ) const - { - return set1( - result, p, q, size_type(0), - 1664525 * tp(result[0] ^ result[p] ^ result[n - 1]), - s - ); - } - template - SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type gen_impl( - Result const& result, - size_type n, size_type s, size_type m, size_type t, size_type p, size_type q - ) const - { - return gen2( - gen1_2( - gen1_1( - gen1_0( - result, - n, s, p, q - ), - n, s, m, t, p, q, - 1 - ), - n, s, m, t, p, q, - s + 1 - ), - n, s, m, t, p, q, - m - ); - } - template - SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type gen( - Result const& result, TempResult const& temp_result, - size_type n, size_type s, size_type m, size_type t - ) const - { - return sprout::range::fixed::copy( - gen_impl(temp_result, n, s, m, t, (n - t) / 2, (n - t) / 2 + t), - result - ); - } - public: - SPROUT_CONSTEXPR seed_array() SPROUT_NOEXCEPT - : impl_type() - {} - seed_array(seed_array const&) = default; - template - SPROUT_INITIALIZER_LIST_CONSTEXPR seed_array(std::initializer_list il) - : impl_type(il.begin(), il.end()) - {} - template - SPROUT_CONSTEXPR seed_array(InputIterator begin, InputIterator end) - : impl_type(begin, end) - {} - template - explicit SPROUT_CONSTEXPR seed_array(InputRange const& rng) - : impl_type(sprout::begin(rng), sprout::end(rng)) - {} - template - SPROUT_CXX14_CONSTEXPR void generate(RandomAccessIterator begin, RandomAccessIterator end) const { - typedef typename std::iterator_traits::value_type value_type; - if (begin == end) { - return; - } - sprout::fill(begin, end, static_cast(0x8b8b8b8bu)); - size_type n = end - begin; - size_type s = size(); - size_type m = NS_SSCRISK_CEL_OR_SPROUT::max(s + 1, n); - size_type t = tval(n); - size_type p = (n - t) / 2; - size_type q = p + t; - for (size_type k = 0; k < m; ++k) { - size_type kn = k % n; - size_type kpn = (k + p) % n; - size_type kqn = (k + q) % n; - size_type k1n = (k + n - 1) % n; - value_type r1 = 1664525 * tp(begin[kn] ^ begin[kpn] ^ begin[k1n]); - value_type r2 = r1 + ( - k == 0 ? s - : k <= s ? (kn + v[k - 1]) - : kn - ); - begin[kpn] += r1; - begin[kqn] += r2; - begin[kn] = r2; - } - for (size_type k = m; k < m + n; ++k) { - size_type kn = k % n; - size_type kpn = (k + p) % n; - size_type kqn = (k + q) % n; - size_type k1n = (k + n - 1) % n; - value_type r3 = 1566083941 * tp(begin[kn] + begin[kpn] + begin[k1n]); - value_type r4 = r3 - kn; - begin[kpn] ^= r3; - begin[kqn] ^= r4; - begin[kn] = r4; - } - } - template - SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type generate(Result const& result) const { - typedef typename sprout::container_traits::value_type value_type; - typedef sprout::array::static_size> temp_type; - return !sprout::empty(result) ? gen( - result, sprout::pit(static_cast(0x8b8b8b8bu)), - sprout::size(result), size(), sprout::max(size() + 1, sprout::size(result)), - tval(sprout::size(result)) - ) - : sprout::detail::container_complate(result) - ; - } - template - SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type generate() const { - return generate(sprout::pit()); - } - SPROUT_CONSTEXPR size_type size() const SPROUT_NOEXCEPT { - return v.size(); - } - template< - typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - SPROUT_CXX14_CONSTEXPR void param(OutputIterator dest) const { - sprout::copy(v.begin(), v.end(), dest); - } - SPROUT_CONSTEXPR sprout::array const& param() const { - return v; - } - template< - typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type param(Result const& result) const { - return sprout::fixed::copy(v.begin(), v.end(), result); - } - template - SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type param() const { - return sprout::fixed::copy(v.begin(), v.end()); - } - }; - - // - // make_seed_array - // - template - inline SPROUT_CONSTEXPR sprout::random::seed_array - make_seed_array(Args&&... args) { - return sprout::random::seed_array( - sprout::make_common_array(SPROUT_FORWARD(Args, args)...) - ); - } - } // namespace random - - using sprout::random::seed_array; - using sprout::random::make_seed_array; -} // namespace sprout - -#endif // #ifndef SPROUT_RANDOM_SEED_ARRAY_HPP diff --git a/dsp/lib/sprout/sprout/random/shuffle_order.hpp b/dsp/lib/sprout/sprout/random/shuffle_order.hpp deleted file mode 100644 index 1128a65..0000000 --- a/dsp/lib/sprout/sprout/random/shuffle_order.hpp +++ /dev/null @@ -1,302 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_SHUFFLE_ORDER_HPP -#define SPROUT_RANDOM_SHUFFLE_ORDER_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace random { - namespace detail { - template - class shuffle_order_engine_member { - protected: - typedef UniformRandomNumberGenerator base_type; - typedef typename base_type::result_type result_type; - public: - base_type rng_; - sprout::array v_; - result_type y_; - public: - SPROUT_CXX14_CONSTEXPR shuffle_order_engine_member& operator=(shuffle_order_engine_member const& rhs) { - rng_ = rhs.rng_; - v_ = rhs.v_; - y_ = rhs.y_; - return *this; - } - }; - } // namespace detail - // - // shuffle_order_engine - // - template - class shuffle_order_engine - : private sprout::random::detail::shuffle_order_engine_member - { - static_assert( - sprout::numeric_limits::is_integer, - "sprout::numeric_limits::is_integer" - ); - static_assert(k > 0, "k > 0"); - private: - typedef sprout::random::detail::shuffle_order_engine_member member_type; - public: - typedef UniformRandomNumberGenerator base_type; - typedef typename base_type::result_type result_type; - private: - struct private_construct_t {}; - public: - SPROUT_STATIC_CONSTEXPR std::size_t buffer_size = k; - SPROUT_STATIC_CONSTEXPR std::size_t table_size = k; - public: - static SPROUT_CONSTEXPR result_type static_min() SPROUT_NOEXCEPT { - return base_type::static_min(); - } - static SPROUT_CONSTEXPR result_type static_max() SPROUT_NOEXCEPT { - return base_type::static_max(); - } - private: - template - static SPROUT_CONSTEXPR typename std::enable_if< - (M + sizeof...(Args) == k), - member_type - >::type init_member_4(sprout::index_tuple, sprout::array const& a, EngineResult const& rnd, Args const&... args) { - return member_type{ - sprout::random::next(rnd), - sprout::array{{a[Indexes]..., args...}}, - sprout::random::result(rnd) - }; - } - template - static SPROUT_CONSTEXPR typename std::enable_if< - (M + sizeof...(Args) == k), - member_type - >::type init_member_3(sprout::array const& a, EngineResult const& rnd, Args const&... args) { - return init_member_4(sprout::make_index_tuple::make(), a, rnd, args...); - } - template - static SPROUT_CONSTEXPR typename std::enable_if< - (M + sizeof...(Args) < k), - member_type - >::type init_member_3(sprout::array const& a, EngineResult const& rnd, Args const&... args) { - return init_member_3(a, sprout::random::next(rnd)(), args..., sprout::random::result(rnd)); - } - template - static SPROUT_CONSTEXPR member_type init_member_2(Pair const& p) { - return init_member_3(p.first, p.second()); - } - - template - static SPROUT_CONSTEXPR typename std::enable_if< - (sizeof...(Args) == k), - member_type - >::type init_member_1(EngineResult const& rnd, Args const&... args) { - return member_type{ - sprout::random::next(rnd), - sprout::array{{args...}}, - sprout::random::result(rnd) - }; - } - template - static SPROUT_CONSTEXPR typename std::enable_if< - (sizeof...(Args) < k), - member_type - >::type init_member_1(EngineResult const& rnd, Args const&... args) { - return init_member_1(sprout::random::next(rnd)(), args..., sprout::random::result(rnd)); - } - static SPROUT_CONSTEXPR member_type init_member_0(base_type const& rng, std::true_type) { - return init_member_2(sprout::random::generate_array(rng)); - } - static SPROUT_CONSTEXPR member_type init_member_0(base_type const& rng, std::false_type) { - return init_member_1(rng()); - } - static SPROUT_CONSTEXPR member_type init_member(base_type const& rng) { - return init_member_0(rng, std::integral_constant= SPROUT_RECURSIVE_FUNCTION_TEMPLATE_INSTANTIATION_LIMIT)>()); - } - private: - using member_type::rng_; - using member_type::v_; - using member_type::y_; - private: - SPROUT_CONSTEXPR shuffle_order_engine( - base_type const& rng, - sprout::array const& v, - result_type y, - private_construct_t - ) - : member_type{rng, v, y} - {} - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_1(EngineResult const& rnd, BaseUnsigned j) const { - return sprout::random::random_result( - v_[j], - shuffle_order_engine( - sprout::random::next(rnd), - sprout::fixed::set(v_, j, sprout::random::result(rnd)), - v_[j], - private_construct_t() - ) - ); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate(BaseUnsigned brange, BaseUnsigned off) const { - return generate_1( - rng_(), - k == 1 ? BaseUnsigned(0) - : sprout::math::less(brange, sprout::numeric_limits::max() / k) ? BaseUnsigned(k * off / (brange + 1)) - : sprout::math::less(brange, sprout::numeric_limits::max() / k) - ? static_cast(static_cast(off) * k / (static_cast(brange) + 1)) -// : static_cast(sprout::random::detail::muldiv(off, k, static_cast(brange) + 1)) // ??? - : (SPROUT_ASSERT_MSG(0, "Sorry, not implemented."), sprout::random::random_result()) - ); - } - public: - SPROUT_CONSTEXPR shuffle_order_engine() - : member_type(init_member(base_type())) - {} - shuffle_order_engine(shuffle_order_engine const&) = default; - explicit SPROUT_CONSTEXPR shuffle_order_engine(result_type seed) - : member_type(init_member(base_type(seed))) - {} - template::value>::type = sprout::enabler> - explicit SPROUT_CXX14_CONSTEXPR shuffle_order_engine(Sseq& seq) - : member_type(init_member(base_type(seq))) - {} - template::value>::type = sprout::enabler> - explicit SPROUT_CONSTEXPR shuffle_order_engine(Sseq const& seq) - : member_type(init_member(base_type(seq))) - {} - template - SPROUT_CONSTEXPR shuffle_order_engine(InputIterator first, InputIterator last) - : member_type(init_member(base_type(first, last))) - {} - explicit SPROUT_CONSTEXPR shuffle_order_engine(base_type const& rng) - : member_type(init_member(rng)) - {} - SPROUT_CXX14_CONSTEXPR void seed() { - member_type::operator=(init_member(base_type())); - } - SPROUT_CXX14_CONSTEXPR void seed(result_type seed) { - member_type::operator=(init_member(base_type(seed))); - } - template::value>::type = sprout::enabler> - SPROUT_CXX14_CONSTEXPR void seed(Sseq& seq) { - member_type::operator=(init_member(base_type(seq))); - } - template::value>::type = sprout::enabler> - SPROUT_CXX14_CONSTEXPR void seed(Sseq const& seq) { - member_type::operator=(init_member(base_type(seq))); - } - template - SPROUT_CXX14_CONSTEXPR void seed(InputIterator first, InputIterator last) { - member_type::operator=(init_member(base_type(first, last))); - } - SPROUT_CONSTEXPR result_type min() const SPROUT_NOEXCEPT { - return rng_.min(); - } - SPROUT_CONSTEXPR result_type max() const SPROUT_NOEXCEPT { - return rng_.max(); - } - SPROUT_CXX14_CONSTEXPR result_type operator()() { - typedef typename std::make_unsigned::type base_unsigned; - base_unsigned const brange = sprout::random::detail::subtract()(max(), min()); - base_unsigned const off = sprout::random::detail::subtract()(y_, min()); - base_unsigned j = k == 1 ? base_unsigned(0) - : sprout::math::less(brange, sprout::numeric_limits::max() / k) ? base_unsigned(k * off / (brange + 1)) - : sprout::math::less(brange, sprout::numeric_limits::max() / k) - ? static_cast(static_cast(off) * k / (static_cast(brange) + 1)) -// : static_cast(sprout::random::detail::muldiv(off, k, static_cast(brange) + 1)) // ??? - : (SPROUT_ASSERT_MSG(0, "Sorry, not implemented."), base_unsigned(0)) - ; - y_ = v_[j]; - v_[j] = static_cast(rng_()); - return y_; - } - SPROUT_CONSTEXPR sprout::random::random_result const operator()() const { - typedef typename std::make_unsigned::type base_unsigned; - return generate( - base_unsigned(sprout::random::detail::subtract()(max(), min())), - base_unsigned(sprout::random::detail::subtract()(y_, min())) - ); - } - SPROUT_CONSTEXPR base_type const& base() const SPROUT_NOEXCEPT { - return rng_; - } - friend SPROUT_CONSTEXPR bool operator==(shuffle_order_engine const& lhs, shuffle_order_engine const& rhs) SPROUT_NOEXCEPT { - return lhs.rng_ == rhs.rng_ && lhs.y_ == rhs.y_ && lhs.v_ == rhs.v_; - } - friend SPROUT_CONSTEXPR bool operator!=(shuffle_order_engine const& lhs, shuffle_order_engine const& rhs) SPROUT_NOEXCEPT { - return !(lhs == rhs); - } - template - friend SPROUT_NON_CONSTEXPR std::basic_istream& operator>>( - std::basic_istream& lhs, - shuffle_order_engine& rhs - ) - { - lhs >> rhs.rng_; - for (std::size_t i = 0; i < k; ++i) { - lhs >> std::ws >> rhs.v_[i]; - } - lhs >> std::ws >> rhs.y_; - return lhs; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_ostream& operator<<( - std::basic_ostream& lhs, - shuffle_order_engine const& rhs - ) - { - lhs << rhs.rng_; - for (std::size_t i = 0; i < k; ++i) { - lhs << ' ' << rhs.v_[i]; - } - lhs << ' ' << rhs.y_; - return lhs; - } - }; - template - SPROUT_CONSTEXPR_OR_CONST std::size_t sprout::random::shuffle_order_engine::buffer_size; - template - SPROUT_CONSTEXPR_OR_CONST std::size_t sprout::random::shuffle_order_engine::table_size; - - // - // knuth_b - // kreutzer1986 - // - typedef sprout::random::shuffle_order_engine knuth_b; - typedef sprout::random::shuffle_order_engine, 97> kreutzer1986; - } // namespace random - - using sprout::random::shuffle_order_engine; - using sprout::random::knuth_b; - using sprout::random::kreutzer1986; -} // namespace sprout - -#endif // #ifndef SPROUT_RANDOM_SHUFFLE_ORDER_HPP diff --git a/dsp/lib/sprout/sprout/random/taus88.hpp b/dsp/lib/sprout/sprout/random/taus88.hpp deleted file mode 100644 index 3ccaf41..0000000 --- a/dsp/lib/sprout/sprout/random/taus88.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_TAUS88_HPP -#define SPROUT_RANDOM_TAUS88_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace random { - // - // taus88 - // - typedef sprout::random::xor_combine_engine< - sprout::random::xor_combine_engine< - sprout::random::linear_feedback_shift_engine, - 0, - sprout::random::linear_feedback_shift_engine, - 0 - >, - 0, - sprout::random::linear_feedback_shift_engine, - 0 - > taus88; - } // namespace random - - using sprout::random::taus88; -} // namespace sprout - -#endif // #ifndef SPROUT_RANDOM_TAUS88_HPP diff --git a/dsp/lib/sprout/sprout/random/type_traits.hpp b/dsp/lib/sprout/sprout/random/type_traits.hpp deleted file mode 100644 index ded0ad5..0000000 --- a/dsp/lib/sprout/sprout/random/type_traits.hpp +++ /dev/null @@ -1,72 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_TYPE_TRAITS_HPP -#define SPROUT_RANDOM_TYPE_TRAITS_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace random { - // - // is_seed_seq - // - SPROUT_HAS_XXX_TYPE_DEF(is_seed_seq, result_type); - - // - // is_real_std_random_parameter - // is_int_std_random_parameter - // is_uint_std_random_parameter - // - template - struct is_real_std_random_parameter - : public sprout::bool_constant< - std::is_same::value - || std::is_same::value - || std::is_same::value - > - {}; - template - struct is_int_std_random_parameter - : public sprout::bool_constant< - std::is_same::value - || std::is_same::value - || std::is_same::value - || std::is_same::value - || std::is_same::value - || std::is_same::value - || std::is_same::value - || std::is_same::value - > - {}; - template - struct is_uint_std_random_parameter - : public sprout::bool_constant< - std::is_same::value - || std::is_same::value - || std::is_same::value - || std::is_same::value - > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_seed_seq_v = sprout::random::is_seed_seq::value; - template - SPROUT_STATIC_CONSTEXPR bool is_real_std_random_parameter_v = sprout::random::is_real_std_random_parameter::value; - template - SPROUT_STATIC_CONSTEXPR bool is_int_std_random_parameter_v = sprout::random::is_int_std_random_parameter::value; - template - SPROUT_STATIC_CONSTEXPR bool is_uint_std_random_parameter_v = sprout::random::is_uint_std_random_parameter::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - } // namespace random -} // namespace sprout - -#endif // #ifndef SPROUT_RANDOM_TYPE_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/random/uniform_01.hpp b/dsp/lib/sprout/sprout/random/uniform_01.hpp deleted file mode 100644 index 760fa9e..0000000 --- a/dsp/lib/sprout/sprout/random/uniform_01.hpp +++ /dev/null @@ -1,195 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_UNIFORM_01_HPP -#define SPROUT_RANDOM_UNIFORM_01_HPP - -#include -#include -#include -#include -#include -#include -#ifdef SPROUT_WORKAROUND_NOT_TERMINATE_RECURSIVE_CONSTEXPR_FUNCTION_TEMPLATE -# include -#endif - -namespace sprout { - namespace random { - // - // uniform_01 - // - template - class uniform_01 { - public: - typedef RealType input_type; - typedef RealType result_type; - public: - // - // param_type - // - class param_type { - public: - typedef uniform_01 distribution_type; - public: - template - friend SPROUT_NON_CONSTEXPR std::basic_istream& operator>>( - std::basic_istream& lhs, - param_type& - ) - { - return lhs; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_ostream& operator<<( - std::basic_ostream& lhs, - param_type const& - ) - { - return lhs; - } - friend SPROUT_CONSTEXPR bool operator==(param_type const&, param_type const&) SPROUT_NOEXCEPT { - return true; - } - friend SPROUT_CONSTEXPR bool operator!=(param_type const& lhs, param_type const& rhs) SPROUT_NOEXCEPT { - return !(lhs == rhs); - } - }; - private: -#ifdef SPROUT_WORKAROUND_NOT_TERMINATE_RECURSIVE_CONSTEXPR_FUNCTION_TEMPLATE - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_1(Engine const&, EngineResult const& rnd, result_type result) const { - return result < result_type(1) - ? sprout::random::random_result(result, rnd.engine(), *this) - : generate(sprout::random::next(rnd), sprout::random::next(rnd)()) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_1(Engine const&, EngineResult const&, result_type) const { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate(Engine const& eng, EngineResult const& rnd) const { - typedef typename Engine::result_type base_result; - return generate_1( - eng, - rnd, - result_type(sprout::random::result(rnd) - eng.min()) * ( - result_type(1) / ( - result_type(eng.max() - eng.min()) + result_type( - sprout::numeric_limits::is_integer ? 1 : 0 - ) - ) - ) - ); - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate(Engine const&, EngineResult const&) const { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } -#else - template - SPROUT_CONSTEXPR sprout::random::random_result - generate_1(Engine const&, EngineResult const& rnd, result_type result) const { - return result < result_type(1) - ? sprout::random::random_result(result, rnd.engine(), *this) - : generate(sprout::random::next(rnd), sprout::random::next(rnd)()) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result - generate(Engine const& eng, EngineResult const& rnd) const { - typedef typename Engine::result_type base_result; - return generate_1( - eng, - rnd, - result_type(sprout::random::result(rnd) - eng.min()) * ( - result_type(1) / ( - result_type(eng.max() - eng.min()) + result_type( - sprout::numeric_limits::is_integer ? 1 : 0 - ) - ) - ) - ); - } -#endif - public: - SPROUT_CONSTEXPR uniform_01() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - uniform_01(uniform_01 const&) = default; - explicit SPROUT_CONSTEXPR uniform_01(param_type const&) SPROUT_NOEXCEPT {} - SPROUT_CONSTEXPR result_type min() const SPROUT_NOEXCEPT { - return result_type(0); - } - SPROUT_CONSTEXPR result_type max() const SPROUT_NOEXCEPT { - return result_type(1); - } - SPROUT_CXX14_CONSTEXPR void reset() SPROUT_NOEXCEPT {} - SPROUT_CONSTEXPR param_type param() const SPROUT_NOEXCEPT { - return param_type(); - } - SPROUT_CXX14_CONSTEXPR void param(param_type const&) SPROUT_NOEXCEPT {} - template - SPROUT_CXX14_CONSTEXPR result_type operator()(Engine& eng) const { - for (; ; ) { - typedef typename Engine::result_type base_result; - result_type result = result_type(static_cast(eng()) - eng.min()) * ( - result_type(1) / ( - result_type(eng.max() - eng.min()) + result_type( - sprout::numeric_limits::is_integer ? 1 : 0 - ) - ) - ); - if (result < result_type(1)) { - return result; - } - } - } - template - SPROUT_CONSTEXPR sprout::random::random_result const operator()(Engine const& eng) const { - return generate(eng, eng()); - } - template - SPROUT_CXX14_CONSTEXPR result_type operator()(Engine& eng, param_type const&) const { - return operator()(eng); - } - template - SPROUT_CONSTEXPR sprout::random::random_result const operator()(Engine const& eng, param_type const&) const { - return operator()(eng); - } - template - friend SPROUT_NON_CONSTEXPR std::basic_istream& operator>>( - std::basic_istream& lhs, - uniform_01& - ) - { - return lhs; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_ostream& operator<<( - std::basic_ostream& lhs, - uniform_01 const& - ) - { - return lhs; - } - friend SPROUT_CONSTEXPR bool operator==(uniform_01 const&, uniform_01 const&) SPROUT_NOEXCEPT { - return true; - } - friend SPROUT_CONSTEXPR bool operator!=(uniform_01 const& lhs, uniform_01 const& rhs) SPROUT_NOEXCEPT { - return !(lhs == rhs); - } - }; - } // namespace random - - using sprout::random::uniform_01; -} // namespace sprout - -#endif // #ifndef SPROUT_RANDOM_UNIFORM_01_HPP diff --git a/dsp/lib/sprout/sprout/random/uniform_int_distribution.hpp b/dsp/lib/sprout/sprout/random/uniform_int_distribution.hpp deleted file mode 100644 index fd54f99..0000000 --- a/dsp/lib/sprout/sprout/random/uniform_int_distribution.hpp +++ /dev/null @@ -1,948 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_UNIFORM_INT_DISTRIBUTION_HPP -#define SPROUT_RANDOM_UNIFORM_INT_DISTRIBUTION_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef SPROUT_WORKAROUND_NOT_TERMINATE_RECURSIVE_CONSTEXPR_FUNCTION_TEMPLATE -# include -#endif - -namespace sprout { - namespace random { - namespace detail { - template - struct generate_uniform_int_result { - public: - T result; - Engine engine; - }; - - template - inline SPROUT_CXX14_CONSTEXPR T - generate_uniform_int_cxx14( - Engine& eng, T min_value, T max_value, std::true_type - ) - { - typedef T result_type; - typedef typename std::make_unsigned::type range_type; - typedef typename Engine::result_type base_result; - typedef typename std::make_unsigned::type base_unsigned; - range_type const range = sprout::random::detail::subtract()(max_value, min_value); - base_result const bmin = eng.min(); - base_unsigned const brange = sprout::random::detail::subtract()(eng.max(), eng.min()); - if (range == 0) { - return min_value; - } else if (brange == range) { - base_unsigned v = sprout::random::detail::subtract()(static_cast(eng()), bmin); - return sprout::random::detail::add()( - static_cast(sprout::random::detail::subtract()(static_cast(eng()), bmin)), - min_value - ); - } else if (brange < range) { - for (; ; ) { - range_type limit = range_type(); - if (range == sprout::numeric_limits::max()) { - limit = range / (range_type(brange) + 1); - if (range % (range_type(brange) + 1) == range_type(brange)) { - ++limit; - } - } else { - limit = (range + 1) / (range_type(brange) + 1); - } - range_type result = range_type(0); - range_type mult = range_type(1); - while (mult <= limit) { - result += static_cast(sprout::random::detail::subtract()(static_cast(eng()), bmin) * mult); - if (mult * range_type(brange) == range - mult + 1) { - return result; - } - mult *= range_type(brange) + range_type(1); - } - range_type result_increment = sprout::random::detail::generate_uniform_int_cxx14( - eng, - static_cast(0), - static_cast(range / mult), - std::true_type() - ); - if (sprout::numeric_limits::max() / mult < result_increment) { - continue; - } - result_increment *= mult; - result += result_increment; - if (result < result_increment) { - continue; - } - if (result > range) { - continue; - } - return sprout::random::detail::add()(result, min_value); - } - } else { - base_unsigned bucket_size = base_unsigned(); - if (brange == sprout::numeric_limits::max()) { - bucket_size = brange / (static_cast(range) + 1); - if (brange % (static_cast(range) + 1) == static_cast(range)) { - ++bucket_size; - } - } else { - bucket_size = (brange + 1) / (static_cast(range) + 1); - } - for (; ; ) { - base_unsigned result = sprout::random::detail::subtract()(static_cast(eng()), bmin) / bucket_size; - if (result <= static_cast(range)) { - return sprout::random::detail::add()(result, min_value); - } - } - } - } - template - inline SPROUT_CXX14_CONSTEXPR T - generate_uniform_int_cxx14( - Engine& eng, T min_value, T max_value, std::false_type - ) - { - sprout::random::detail::uniform_int_float wrapper(eng); - return sprout::random::detail::generate_uniform_int_cxx14(wrapper, min_value, max_value, std::true_type()); - } - template - inline SPROUT_CXX14_CONSTEXPR T - generate_uniform_int( - Engine& eng, T min_value, T max_value - ) - { - return sprout::random::detail::generate_uniform_int_cxx14( - eng, min_value, max_value, - std::is_integral() - ); - } - -#ifdef SPROUT_WORKAROUND_NOT_TERMINATE_RECURSIVE_CONSTEXPR_FUNCTION_TEMPLATE - template - SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int(Engine const& eng, T min_value, T max_value, std::true_type); - template - SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int(Engine const& eng, T min_value, T max_value, std::true_type); - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_3_1( - EngineResult const& rnd, T min_value, RangeType range, - BaseResult bmin, BaseUnsigned brange, BaseUnsigned bucket_size - ); - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_3_1( - EngineResult const& rnd, T min_value, RangeType range, - BaseResult bmin, BaseUnsigned brange, BaseUnsigned bucket_size - ); - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_3_1_1( - Engine const& eng, T min_value, RangeType range, - BaseResult bmin, BaseUnsigned brange, BaseUnsigned bucket_size, BaseUnsigned result - ) - { - typedef T result_type; - return result <= static_cast(range) - ? sprout::random::detail::generate_uniform_int_result{ - sprout::random::detail::add()(result, min_value), - eng - } - : sprout::random::detail::generate_uniform_int_true_3_1( - eng(), min_value, range, - bmin, brange, bucket_size - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_3_1_1( - Engine const&, T, RangeType, - BaseResult, BaseUnsigned, BaseUnsigned, BaseUnsigned - ) - { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_3_1( - EngineResult const& rnd, T min_value, RangeType range, - BaseResult bmin, BaseUnsigned brange, BaseUnsigned bucket_size - ) - { - return sprout::random::detail::generate_uniform_int_true_3_1_1( - sprout::random::next(rnd), min_value, range, - bmin, brange, bucket_size, - sprout::random::detail::subtract()(sprout::random::result(rnd), bmin) / bucket_size - ); - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_3_1( - EngineResult const&, T, RangeType, - BaseResult, BaseUnsigned, BaseUnsigned - ) - { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_3( - Engine const& eng, T min_value, RangeType range, - BaseResult bmin, BaseUnsigned brange - ) - { - return sprout::random::detail::generate_uniform_int_true_3_1( - eng(), min_value, range, - bmin, brange, - brange == sprout::numeric_limits::max() - ? brange / (static_cast(range) + 1) + ( - brange % (static_cast(range) + 1) == static_cast(range) ? 1 : 0 - ) - : (brange + 1) / (static_cast(range) + 1) - ); - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_3( - Engine const&, T, RangeType, - BaseResult, BaseUnsigned - ) - { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_2( - Engine const& eng, T min_value, RangeType range, - BaseResult bmin, BaseUnsigned brange - ); - template - SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_2( - Engine const& eng, T min_value, RangeType range, - BaseResult bmin, BaseUnsigned brange - ); - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_2_4( - Engine const& eng, T min_value, RangeType range, - BaseResult bmin, BaseUnsigned brange, RangeType result, RangeType result_increment - ) - { - typedef T result_type; - return result < result_increment || result > range - ? sprout::random::detail::generate_uniform_int_true_2(eng, min_value, range, bmin, brange) - : sprout::random::detail::generate_uniform_int_result{ - random::detail::add()(result, min_value), - eng - } - ; - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_2_4( - Engine const&, T, RangeType, - BaseResult, BaseUnsigned, RangeType, RangeType - ) - { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_2_3( - Engine const& eng, T min_value, RangeType range, - BaseResult bmin, BaseUnsigned brange, RangeType result, RangeType mult, RangeType result_increment - ) - { - return sprout::numeric_limits::max() / mult < result_increment - ? sprout::random::detail::generate_uniform_int_true_2(eng, min_value, range, bmin, brange) - : sprout::random::detail::generate_uniform_int_true_2_4( - eng, min_value, range, - bmin, brange, result + (result_increment * mult), result_increment * mult - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_2_3( - Engine const&, T, RangeType, - BaseResult, BaseUnsigned, RangeType, RangeType, RangeType - ) - { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_2_2( - Engine const&, T min_value, RangeType range, - BaseResult bmin, BaseUnsigned brange, RangeType result, RangeType mult, Result const& result_increment_base - ) - { - return sprout::random::detail::generate_uniform_int_true_2_3( - result_increment_base.engine, min_value, range, - bmin, brange, result, mult, result_increment_base.result - ); - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_2_2( - Engine const&, T, RangeType, - BaseResult, BaseUnsigned, RangeType, RangeType, Result const& - ) - { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_2_1( - Engine const& eng, T min_value, RangeType range, - BaseResult bmin, BaseUnsigned brange, RangeType limit, - RangeType result = RangeType(0), RangeType mult = RangeType(1) - ); - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_2_1( - Engine const& eng, T min_value, RangeType range, - BaseResult bmin, BaseUnsigned brange, RangeType limit, - RangeType result = RangeType(0), RangeType mult = RangeType(1) - ); - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_2_1_1( - EngineResult const& rnd, T min_value, RangeType range, - BaseResult bmin, BaseUnsigned brange, RangeType limit, RangeType result, RangeType mult - ) - { - return mult * RangeType(brange) == range - mult + 1 - ? sprout::random::detail::generate_uniform_int_result{ - static_cast( - result + static_cast(sprout::random::detail::subtract()(sprout::random::result(rnd), bmin) * mult) - ), - sprout::random::next(rnd) - } - : sprout::random::detail::generate_uniform_int_true_2_1( - sprout::random::next(rnd), min_value, range, - bmin, brange, limit, - result + static_cast(sprout::random::detail::subtract()(sprout::random::result(rnd), bmin) * mult), - mult * (RangeType(brange) + RangeType(1)) - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_2_1_1( - EngineResult const&, T, RangeType, - BaseResult, BaseUnsigned, RangeType, RangeType, RangeType - ) - { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_2_1( - Engine const& eng, T min_value, RangeType range, - BaseResult bmin, BaseUnsigned brange, RangeType limit, - RangeType result, RangeType mult - ) - { - return mult <= limit - ? sprout::random::detail::generate_uniform_int_true_2_1_1( - eng(), min_value, range, - bmin, brange, limit, - result, mult - ) - : sprout::random::detail::generate_uniform_int_true_2_2( - eng, min_value, range, - bmin, brange, - result, mult, - sprout::random::detail::generate_uniform_int( - eng, - static_cast(0), - static_cast(range / mult), - std::true_type() - ) - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_2_1( - Engine const&, T, RangeType, - BaseResult, BaseUnsigned, RangeType, - RangeType, RangeType - ) - { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_2( - Engine const& eng, T min_value, RangeType range, - BaseResult bmin, BaseUnsigned brange - ) - { - return sprout::random::detail::generate_uniform_int_true_2_1( - eng, min_value, range, - bmin, brange, - range == sprout::numeric_limits::max() - ? range / (RangeType(brange) + 1) + ( - range % (RangeType(brange) + 1) == RangeType(brange) ? 1 : 0 - ) - : (range + 1) / (RangeType(brange) + 1) - ); - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_2( - Engine const&, T, RangeType, - BaseResult, BaseUnsigned - ) - { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_1_1( - EngineResult const& rnd, T min_value, BaseResult bmin - ) - { - typedef T result_type; - typedef typename std::make_unsigned::type base_unsigned; - return sprout::random::detail::generate_uniform_int_result{ - sprout::random::detail::add()( - base_unsigned(sprout::random::detail::subtract()(sprout::random::result(rnd), bmin)), - min_value - ), - sprout::random::next(rnd) - }; - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_1_1( - EngineResult const&, T, BaseResult - ) - { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_1( - Engine const& eng, T min_value, T, RangeType range, - BaseResult bmin, BaseUnsigned brange - ) - { - return range == 0 ? sprout::random::detail::generate_uniform_int_result{min_value, eng} - : brange == range ? sprout::random::detail::generate_uniform_int_true_1_1(eng(), min_value, bmin) - : brange < range ? sprout::random::detail::generate_uniform_int_true_2(eng, min_value, range, bmin, brange) - : sprout::random::detail::generate_uniform_int_true_3(eng, min_value, range, bmin, brange) - ; - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_1( - Engine const&, T, T, RangeType, - BaseResult, BaseUnsigned - ) - { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int( - Engine const& eng, T min_value, T max_value, std::true_type - ) - { - typedef T result_type; - typedef typename std::make_unsigned::type range_type; - typedef typename Engine::result_type base_result; - typedef typename std::make_unsigned::type base_unsigned; - return sprout::random::detail::generate_uniform_int_true_1( - eng, min_value, max_value, - range_type(sprout::random::detail::subtract()(max_value, min_value)), - base_result(eng.min()), - base_unsigned(sprout::random::detail::subtract()(eng.max(), eng.min())) - ); - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int( - Engine const&, T, T, std::true_type - ) - { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_false_1(Result const& rnd) { - return sprout::random::detail::generate_uniform_int_result{ - rnd.result, rnd.engine.base() - }; - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_false_1(Result const& rnd) { - return sprout::random::detail::generate_uniform_int_result{ - rnd.result, rnd.engine.base() - }; - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int( - Engine const& eng, T min_value, T max_value, std::false_type - ) - { - return sprout::random::detail::generate_uniform_int_false_1( - sprout::random::detail::generate_uniform_int( - sprout::random::detail::uniform_int_float(eng), - min_value, max_value, - std::true_type() - ) - ); - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int( - Engine const&, T, T, std::false_type - ) - { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } -#else - template - SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int(Engine const& eng, T min_value, T max_value, std::true_type); - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_3_1( - EngineResult const& rnd, T min_value, RangeType range, - BaseResult bmin, BaseUnsigned brange, BaseUnsigned bucket_size - ); - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_3_1_1( - Engine const& eng, T min_value, RangeType range, - BaseResult bmin, BaseUnsigned brange, BaseUnsigned bucket_size, BaseUnsigned result - ) - { - typedef T result_type; - return result <= static_cast(range) - ? sprout::random::detail::generate_uniform_int_result{ - sprout::random::detail::add()(result, min_value), - eng - } - : sprout::random::detail::generate_uniform_int_true_3_1( - eng(), min_value, range, - bmin, brange, bucket_size - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_3_1( - EngineResult const& rnd, T min_value, RangeType range, - BaseResult bmin, BaseUnsigned brange, BaseUnsigned bucket_size - ) - { - return sprout::random::detail::generate_uniform_int_true_3_1_1( - sprout::random::next(rnd), min_value, range, - bmin, brange, bucket_size, - sprout::random::detail::subtract()(sprout::random::result(rnd), bmin) / bucket_size - ); - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_3( - Engine const& eng, T min_value, RangeType range, - BaseResult bmin, BaseUnsigned brange - ) - { - return sprout::random::detail::generate_uniform_int_true_3_1( - eng(), min_value, range, - bmin, brange, - brange == sprout::numeric_limits::max() - ? brange / (static_cast(range) + 1) + ( - brange % (static_cast(range) + 1) == static_cast(range) ? 1 : 0 - ) - : (brange + 1) / (static_cast(range) + 1) - ); - } - template - SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_2( - Engine const& eng, T min_value, RangeType range, - BaseResult bmin, BaseUnsigned brange - ); - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_2_4( - Engine const& eng, T min_value, RangeType range, - BaseResult bmin, BaseUnsigned brange, RangeType result, RangeType result_increment - ) - { - typedef T result_type; - return result < result_increment || result > range - ? sprout::random::detail::generate_uniform_int_true_2(eng, min_value, range, bmin, brange) - : sprout::random::detail::generate_uniform_int_result{ - random::detail::add()(result, min_value), - eng - } - ; - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_2_3( - Engine const& eng, T min_value, RangeType range, - BaseResult bmin, BaseUnsigned brange, RangeType result, RangeType mult, RangeType result_increment - ) - { - return sprout::numeric_limits::max() / mult < result_increment - ? sprout::random::detail::generate_uniform_int_true_2(eng, min_value, range, bmin, brange) - : sprout::random::detail::generate_uniform_int_true_2_4( - eng, min_value, range, - bmin, brange, result + (result_increment * mult), result_increment * mult - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_2_2( - Engine const&, T min_value, RangeType range, - BaseResult bmin, BaseUnsigned brange, RangeType result, RangeType mult, Result const& result_increment_base - ) - { - return sprout::random::detail::generate_uniform_int_true_2_3( - result_increment_base.engine, min_value, range, - bmin, brange, result, mult, result_increment_base.result - ); - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_2_1( - Engine const& eng, T min_value, RangeType range, - BaseResult bmin, BaseUnsigned brange, RangeType limit, - RangeType result = RangeType(0), RangeType mult = RangeType(1) - ); - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_2_1_1( - EngineResult const& rnd, T min_value, RangeType range, - BaseResult bmin, BaseUnsigned brange, RangeType limit, RangeType result, RangeType mult - ) - { - return mult * RangeType(brange) == range - mult + 1 - ? sprout::random::detail::generate_uniform_int_result{ - static_cast( - result + static_cast(sprout::random::detail::subtract()(sprout::random::result(rnd), bmin) * mult) - ), - sprout::random::next(rnd) - } - : sprout::random::detail::generate_uniform_int_true_2_1( - sprout::random::next(rnd), min_value, range, - bmin, brange, limit, - result + static_cast(sprout::random::detail::subtract()(sprout::random::result(rnd), bmin) * mult), - mult * (RangeType(brange) + RangeType(1)) - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_2_1( - Engine const& eng, T min_value, RangeType range, - BaseResult bmin, BaseUnsigned brange, RangeType limit, - RangeType result, RangeType mult - ) - { - return mult <= limit - ? sprout::random::detail::generate_uniform_int_true_2_1_1( - eng(), min_value, range, - bmin, brange, limit, - result, mult - ) - : sprout::random::detail::generate_uniform_int_true_2_2( - eng, min_value, range, - bmin, brange, - result, mult, - sprout::random::detail::generate_uniform_int( - eng, - static_cast(0), - static_cast(range / mult), - std::true_type() - ) - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_2( - Engine const& eng, T min_value, RangeType range, - BaseResult bmin, BaseUnsigned brange - ) - { - return sprout::random::detail::generate_uniform_int_true_2_1( - eng, min_value, range, - bmin, brange, - range == sprout::numeric_limits::max() - ? range / (RangeType(brange) + 1) + ( - range % (RangeType(brange) + 1) == RangeType(brange) ? 1 : 0 - ) - : (range + 1) / (RangeType(brange) + 1) - ); - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_1_1( - EngineResult const& rnd, T min_value, BaseResult bmin - ) - { - typedef T result_type; - typedef typename std::make_unsigned::type base_unsigned; - return sprout::random::detail::generate_uniform_int_result{ - sprout::random::detail::add()( - base_unsigned(sprout::random::detail::subtract()(sprout::random::result(rnd), bmin)), - min_value - ), - sprout::random::next(rnd) - }; - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_true_1( - Engine const& eng, T min_value, T, RangeType range, - BaseResult bmin, BaseUnsigned brange - ) - { - return range == 0 ? sprout::random::detail::generate_uniform_int_result{min_value, eng} - : brange == range ? sprout::random::detail::generate_uniform_int_true_1_1(eng(), min_value, bmin) - : brange < range ? sprout::random::detail::generate_uniform_int_true_2(eng, min_value, range, bmin, brange) - : sprout::random::detail::generate_uniform_int_true_3(eng, min_value, range, bmin, brange) - ; - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int( - Engine const& eng, T min_value, T max_value, std::true_type - ) - { - typedef T result_type; - typedef typename std::make_unsigned::type range_type; - typedef typename Engine::result_type base_result; - typedef typename std::make_unsigned::type base_unsigned; - return sprout::random::detail::generate_uniform_int_true_1( - eng, min_value, max_value, - range_type(sprout::random::detail::subtract()(max_value, min_value)), - base_result(eng.min()), - base_unsigned(sprout::random::detail::subtract()(eng.max(), eng.min())) - ); - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int_false_1(Result const& rnd) { - return sprout::random::detail::generate_uniform_int_result{ - rnd.result, rnd.engine.base() - }; - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int( - Engine const& eng, T min_value, T max_value, std::false_type - ) - { - return sprout::random::detail::generate_uniform_int_false_1( - sprout::random::detail::generate_uniform_int( - sprout::random::detail::uniform_int_float(eng), - min_value, max_value, - std::true_type() - ) - ); - } -#endif - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result - generate_uniform_int( - Engine const& eng, T min_value, T max_value - ) - { - return sprout::random::detail::generate_uniform_int( - eng, min_value, max_value, - std::is_integral() - ); - } - } // namespace detail - // - // uniform_int_distribution - // - template - class uniform_int_distribution { - public: - typedef IntType input_type; - typedef IntType result_type; - public: - // - // param_type - // - class param_type { - public: - typedef uniform_int_distribution distribution_type; - private: - IntType min_; - IntType max_; - public: - SPROUT_CONSTEXPR param_type() - : min_(0) - , max_(sprout::numeric_limits::max()) - {} - param_type(param_type const&) = default; - explicit SPROUT_CONSTEXPR param_type(IntType min_arg, IntType max_arg = sprout::numeric_limits::max()) - : min_((SPROUT_ASSERT(min_arg <= max_arg), min_arg)) - , max_(max_arg) - {} - SPROUT_CONSTEXPR IntType a() const SPROUT_NOEXCEPT { - return min_; - } - SPROUT_CONSTEXPR IntType b() const SPROUT_NOEXCEPT { - return max_; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_istream& operator>>( - std::basic_istream& lhs, - param_type& rhs - ) - { - IntType min; - IntType max; - if (lhs >> min >> std::ws >> max) { - if (min <= max) { - rhs.min_ = min; - rhs.max_ = max; - } else { - lhs.setstate(std::ios_base::failbit); - } - } - return lhs; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_ostream& operator<<( - std::basic_ostream& lhs, - param_type const& rhs - ) - { - return lhs << rhs.min_ << " " << rhs.max_; - } - friend SPROUT_CONSTEXPR bool operator==(param_type const& lhs, param_type const& rhs) SPROUT_NOEXCEPT { - return lhs.min_ == rhs.min_ && lhs.max_ == rhs.max_; - } - friend SPROUT_CONSTEXPR bool operator!=(param_type const& lhs, param_type const& rhs) SPROUT_NOEXCEPT { - return !(lhs == rhs); - } - }; - private: - IntType min_; - IntType max_; - private: - template - SPROUT_CONSTEXPR sprout::random::random_result generate(Result const& rnd) const { - return sprout::random::random_result( - rnd.result, - rnd.engine, - *this - ); - } - public: - SPROUT_CONSTEXPR uniform_int_distribution() SPROUT_NOEXCEPT - : min_(0) - , max_(sprout::numeric_limits::max()) - {} - uniform_int_distribution(uniform_int_distribution const&) = default; - explicit SPROUT_CONSTEXPR uniform_int_distribution(IntType min_arg, IntType max_arg = sprout::numeric_limits::max()) - : min_((SPROUT_ASSERT(min_arg <= max_arg), min_arg)) - , max_(max_arg) - {} - explicit SPROUT_CONSTEXPR uniform_int_distribution(param_type const& parm) SPROUT_NOEXCEPT - : min_(parm.a()) - , max_(parm.b()) - {} - SPROUT_CONSTEXPR result_type a() const SPROUT_NOEXCEPT { - return min_; - } - SPROUT_CONSTEXPR result_type b() const SPROUT_NOEXCEPT { - return max_; - } - SPROUT_CONSTEXPR result_type min() const SPROUT_NOEXCEPT { - return min_; - } - SPROUT_CONSTEXPR result_type max() const SPROUT_NOEXCEPT { - return max_; - } - SPROUT_CXX14_CONSTEXPR void reset() SPROUT_NOEXCEPT {} - SPROUT_CONSTEXPR param_type param() const SPROUT_NOEXCEPT { - return param_type(min_, max_); - } - SPROUT_CXX14_CONSTEXPR void param(param_type const& parm) { - min_ = parm.a(); - max_ = parm.b(); - } - template - SPROUT_CXX14_CONSTEXPR result_type operator()(Engine& eng) const { - return sprout::random::detail::generate_uniform_int(eng, min_, max_); - } - template - SPROUT_CONSTEXPR sprout::random::random_result const operator()(Engine const& eng) const { - return generate(sprout::random::detail::generate_uniform_int(eng, min_, max_)); - } - template - SPROUT_CXX14_CONSTEXPR result_type operator()(Engine& eng, param_type const& parm) const { - return sprout::random::detail::generate_uniform_int(eng, parm.a(), parm.b()); - } - template - SPROUT_CONSTEXPR sprout::random::random_result const operator()(Engine const& eng, param_type const& parm) const { - return generate(sprout::random::detail::generate_uniform_int(eng, parm.a(), parm.b())); - } - template - friend SPROUT_NON_CONSTEXPR std::basic_istream& operator>>( - std::basic_istream& lhs, - uniform_int_distribution& rhs - ) - { - param_type parm; - if (lhs >> parm) { - rhs.param(parm); - } - return lhs; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_ostream& operator<<( - std::basic_ostream& lhs, - uniform_int_distribution const& rhs - ) - { - return lhs << rhs.param(); - } - friend SPROUT_CONSTEXPR bool operator==(uniform_int_distribution const& lhs, uniform_int_distribution const& rhs) SPROUT_NOEXCEPT { - return lhs.param() == rhs.param(); - } - friend SPROUT_CONSTEXPR bool operator!=(uniform_int_distribution const& lhs, uniform_int_distribution const& rhs) SPROUT_NOEXCEPT { - return !(lhs == rhs); - } - }; - } // namespace random - - using sprout::random::uniform_int_distribution; -} // namespace sprout - -#endif // #ifndef SPROUT_RANDOM_UNIFORM_INT_DISTRIBUTION_HPP diff --git a/dsp/lib/sprout/sprout/random/uniform_real_distribution.hpp b/dsp/lib/sprout/sprout/random/uniform_real_distribution.hpp deleted file mode 100644 index 94302ce..0000000 --- a/dsp/lib/sprout/sprout/random/uniform_real_distribution.hpp +++ /dev/null @@ -1,557 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_UNIFORM_REAL_DISTRIBUTION_HPP -#define SPROUT_RANDOM_UNIFORM_REAL_DISTRIBUTION_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef SPROUT_WORKAROUND_NOT_TERMINATE_RECURSIVE_CONSTEXPR_FUNCTION_TEMPLATE -# include -#endif - -namespace sprout { - namespace random { - namespace detail { - template - struct generate_uniform_real_result { - public: - T result; - Engine engine; - }; - - template - inline SPROUT_CXX14_CONSTEXPR T - generate_uniform_real( - Engine& eng, T min_value, T max_value, - std::false_type - ) - { - for (; ; ) { - typedef T result_type; - typedef typename Engine::result_type base_result; - result_type numerator = static_cast(static_cast(eng()) - eng.min()); - result_type divisor = static_cast(eng.max() - eng.min()); - SPROUT_ASSERT(divisor > 0); - SPROUT_ASSERT(numerator >= 0 && numerator <= divisor); - result_type result = numerator / divisor * (max_value - min_value) + min_value; - if (result < max_value) { - return result; - } - } - } - template - inline SPROUT_CXX14_CONSTEXPR T - generate_uniform_real( - Engine& eng, T min_value, T max_value, - std::true_type - ) - { - for (; ; ) { - typedef T result_type; - typedef typename Engine::result_type base_result; - result_type numerator = static_cast(sprout::random::detail::subtract()(static_cast(eng()), eng.min())); - result_type divisor = static_cast(sprout::random::detail::subtract()(eng.max(), eng.min())) + 1; - SPROUT_ASSERT(divisor > 0); - SPROUT_ASSERT(numerator >= 0 && numerator <= divisor); - result_type result = numerator / divisor * (max_value - min_value) + min_value; - if (result < max_value) { - return result; - } - } - } - template - inline SPROUT_CXX14_CONSTEXPR T - generate_uniform_real( - Engine& eng, T min_value, T max_value - ) - { - return sprout::random::detail::generate_uniform_real( - eng, min_value, max_value, - typename std::is_integral::type() - ); - } - -#ifdef SPROUT_WORKAROUND_NOT_TERMINATE_RECURSIVE_CONSTEXPR_FUNCTION_TEMPLATE - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_real_result - generate_uniform_real_false_1( - EngineResult const& rnd, - T min_value, T max_value - ); - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_real_result - generate_uniform_real_false_1( - EngineResult const& rnd, - T min_value, T max_value - ); - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_real_result - generate_uniform_real_false_3( - Engine const& eng, - T min_value, T max_value, - T result - ) - { - return result < max_value - ? sprout::random::detail::generate_uniform_real_result{result, eng} - : sprout::random::detail::generate_uniform_real_false_1(eng(), min_value, max_value) - ; - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_real_result - generate_uniform_real_false_3( - Engine const&, - T, T, - T - ) - { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_real_result - generate_uniform_real_false_2( - Engine const& eng, - T min_value, T max_value, - T numerator, T divisor - ) - { - return SPROUT_ASSERT(divisor > 0), SPROUT_ASSERT(numerator >= 0 && numerator <= divisor), - sprout::random::detail::generate_uniform_real_false_3( - eng, - min_value, max_value, - numerator / divisor * (max_value - min_value) + min_value - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_real_result - generate_uniform_real_false_2( - Engine const&, - T, T, - T, T - ) - { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_real_result - generate_uniform_real_false_1( - EngineResult const& rnd, - T min_value, T max_value - ) - { - return sprout::random::detail::generate_uniform_real_false_2( - sprout::random::next(rnd), - min_value, max_value, - static_cast(sprout::random::result(rnd) - sprout::random::next(rnd).min()), - static_cast(sprout::random::next(rnd).max() - sprout::random::next(rnd).min()) - ); - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_real_result - generate_uniform_real_false_1( - EngineResult const&, - T, T - ) - { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_real_result - generate_uniform_real_true_1( - EngineResult const& rnd, - T min_value, T max_value - ); - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_real_result - generate_uniform_real_true_1( - EngineResult const& rnd, - T min_value, T max_value - ); - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_real_result - generate_uniform_real_true_3( - Engine const& eng, - T min_value, T max_value, - T result - ) - { - return result < max_value - ? sprout::random::detail::generate_uniform_real_result{result, eng} - : sprout::random::detail::generate_uniform_real_true_1(eng(), min_value, max_value) - ; - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_real_result - generate_uniform_real_true_3( - Engine const&, - T, T, - T - ) - { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_real_result - generate_uniform_real_true_2( - Engine const& eng, - T min_value, T max_value, - T numerator, T divisor - ) - { - return SPROUT_ASSERT(divisor > 0), SPROUT_ASSERT(numerator >= 0 && numerator <= divisor), - sprout::random::detail::generate_uniform_real_true_3( - eng, - min_value, max_value, - numerator / divisor * (max_value - min_value) + min_value - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_real_result - generate_uniform_real_true_2( - Engine const&, - T, T, - T, T - ) - { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_real_result - generate_uniform_real_true_1( - EngineResult const& rnd, - T min_value, T max_value - ) - { - typedef typename EngineResult::result_type base_result; - return sprout::random::detail::generate_uniform_real_true_2( - sprout::random::next(rnd), - min_value, max_value, - static_cast(sprout::random::detail::subtract()(sprout::random::result(rnd), sprout::random::next(rnd).min())), - static_cast(sprout::random::detail::subtract()(sprout::random::next(rnd).max(), sprout::random::next(rnd).min())) + 1 - ); - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_real_result - generate_uniform_real_true_1( - EngineResult const&, - T, T - ) - { - return sprout::throw_recursive_function_template_instantiation_exeeded(); - } -#else - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_real_result - generate_uniform_real_false_1( - EngineResult const& rnd, - T min_value, T max_value - ); - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_real_result - generate_uniform_real_false_3( - Engine const& eng, - T min_value, T max_value, - T result - ) - { - return result < max_value - ? sprout::random::detail::generate_uniform_real_result{result, eng} - : sprout::random::detail::generate_uniform_real_false_1(eng(), min_value, max_value) - ; - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_real_result - generate_uniform_real_false_2( - Engine const& eng, - T min_value, T max_value, - T numerator, T divisor - ) - { - return SPROUT_ASSERT(divisor > 0), SPROUT_ASSERT(numerator >= 0 && numerator <= divisor), - sprout::random::detail::generate_uniform_real_false_3( - eng, - min_value, max_value, - numerator / divisor * (max_value - min_value) + min_value - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_real_result - generate_uniform_real_false_1( - EngineResult const& rnd, - T min_value, T max_value - ) - { - return sprout::random::detail::generate_uniform_real_false_2( - sprout::random::next(rnd), - min_value, max_value, - static_cast(sprout::random::result(rnd) - sprout::random::next(rnd).min()), - static_cast(sprout::random::next(rnd).max() - sprout::random::next(rnd).min()) - ); - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_real_result - generate_uniform_real_true_1( - EngineResult const& rnd, - T min_value, T max_value - ); - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_real_result - generate_uniform_real_true_3( - Engine const& eng, - T min_value, T max_value, - T result - ) - { - return result < max_value - ? sprout::random::detail::generate_uniform_real_result{result, eng} - : sprout::random::detail::generate_uniform_real_true_1(eng(), min_value, max_value) - ; - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_real_result - generate_uniform_real_true_2( - Engine const& eng, - T min_value, T max_value, - T numerator, T divisor - ) - { - return SPROUT_ASSERT(divisor > 0), SPROUT_ASSERT(numerator >= 0 && numerator <= divisor), - sprout::random::detail::generate_uniform_real_true_3( - eng, - min_value, max_value, - numerator / divisor * (max_value - min_value) + min_value - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_real_result - generate_uniform_real_true_1( - EngineResult const& rnd, - T min_value, T max_value - ) - { - typedef typename EngineResult::result_type base_result; - return sprout::random::detail::generate_uniform_real_true_2( - sprout::random::next(rnd), - min_value, max_value, - static_cast(sprout::random::detail::subtract()(sprout::random::result(rnd), sprout::random::next(rnd).min())), - static_cast(sprout::random::detail::subtract()(sprout::random::next(rnd).max(), sprout::random::next(rnd).min())) + 1 - ); - } -#endif - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_real_result - generate_uniform_real( - Engine const& eng, - T min_value, T max_value, - std::false_type - ) - { - return sprout::random::detail::generate_uniform_real_false_1( - eng(), - min_value, max_value - ); - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_real_result - generate_uniform_real( - Engine const& eng, - T min_value, T max_value, - std::true_type - ) - { - return sprout::random::detail::generate_uniform_real_true_1( - eng(), - min_value, max_value - ); - } - template - inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_real_result - generate_uniform_real( - Engine const& eng, - T min_value, T max_value - ) - { - return sprout::random::detail::generate_uniform_real( - eng, - min_value, max_value, - typename std::is_integral::type() - ); - } - } // namespace detail - // - // uniform_real_distribution - // - template - class uniform_real_distribution { - public: - typedef RealType input_type; - typedef RealType result_type; - public: - // - // param_type - // - class param_type { - public: - typedef uniform_real_distribution distribution_type; - private: - RealType min_; - RealType max_; - public: - SPROUT_CONSTEXPR param_type() - : min_(RealType(0.0)) - , max_(RealType(1.0)) - {} - param_type(param_type const&) = default; - explicit SPROUT_CONSTEXPR param_type(RealType min_arg, RealType max_arg = RealType(1.0)) - : min_((SPROUT_ASSERT(min_arg <= max_arg), min_arg)) - , max_(max_arg) - {} - SPROUT_CONSTEXPR RealType a() const SPROUT_NOEXCEPT { - return min_; - } - SPROUT_CONSTEXPR RealType b() const SPROUT_NOEXCEPT { - return max_; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_istream& operator>>( - std::basic_istream& lhs, - param_type& rhs - ) - { - RealType min; - RealType max; - if (lhs >> min >> std::ws >> max) { - if (min <= max) { - rhs.min_ = min; - rhs.max_ = max; - } else { - lhs.setstate(std::ios_base::failbit); - } - } - return lhs; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_ostream& operator<<( - std::basic_ostream& lhs, - param_type const& rhs - ) - { - return lhs << rhs.min_ << " " << rhs.max_; - } - friend SPROUT_CONSTEXPR bool operator==(param_type const& lhs, param_type const& rhs) SPROUT_NOEXCEPT { - return lhs.min_ == rhs.min_ && lhs.max_ == rhs.max_; - } - friend SPROUT_CONSTEXPR bool operator!=(param_type const& lhs, param_type const& rhs) SPROUT_NOEXCEPT { - return !(lhs == rhs); - } - }; - private: - RealType min_; - RealType max_; - private: - template - SPROUT_CONSTEXPR sprout::random::random_result generate(Result const& rnd) const { - return sprout::random::random_result( - rnd.result, - rnd.engine, - *this - ); - } - public: - SPROUT_CONSTEXPR uniform_real_distribution() SPROUT_NOEXCEPT - : min_(RealType(0.0)) - , max_(RealType(1.0)) - {} - uniform_real_distribution(uniform_real_distribution const&) = default; - explicit SPROUT_CONSTEXPR uniform_real_distribution(RealType min_arg, RealType max_arg = RealType(1.0)) - : min_((SPROUT_ASSERT(min_arg <= max_arg), min_arg)) - , max_(max_arg) - {} - explicit SPROUT_CONSTEXPR uniform_real_distribution(param_type const& parm) SPROUT_NOEXCEPT - : min_(parm.a()) - , max_(parm.b()) - {} - SPROUT_CONSTEXPR result_type a() const SPROUT_NOEXCEPT { - return min_; - } - SPROUT_CONSTEXPR result_type b() const SPROUT_NOEXCEPT { - return max_; - } - SPROUT_CONSTEXPR result_type min() const SPROUT_NOEXCEPT { - return min_; - } - SPROUT_CONSTEXPR result_type max() const SPROUT_NOEXCEPT { - return max_; - } - SPROUT_CXX14_CONSTEXPR void reset() SPROUT_NOEXCEPT {} - SPROUT_CONSTEXPR param_type param() const SPROUT_NOEXCEPT { - return param_type(min_, max_); - } - SPROUT_CXX14_CONSTEXPR void param(param_type const& parm) { - min_ = parm.a(); - max_ = parm.b(); - } - template - SPROUT_CXX14_CONSTEXPR result_type operator()(Engine& eng) const { - return sprout::random::detail::generate_uniform_real(eng, min_, max_); - } - template - SPROUT_CONSTEXPR sprout::random::random_result const operator()(Engine const& eng) const { - return generate(sprout::random::detail::generate_uniform_real(eng, min_, max_)); - } - template - SPROUT_CXX14_CONSTEXPR result_type operator()(Engine& eng, param_type const& parm) const { - return sprout::random::detail::generate_uniform_real(eng, parm.a(), parm.b()); - } - template - SPROUT_CONSTEXPR sprout::random::random_result const operator()(Engine const& eng, param_type const& parm) const { - return generate(sprout::random::detail::generate_uniform_real(eng, parm.a(), parm.b())); - } - template - friend SPROUT_NON_CONSTEXPR std::basic_istream& operator>>( - std::basic_istream& lhs, - uniform_real_distribution& rhs - ) - { - param_type parm; - if (lhs >> parm) { - rhs.param(parm); - } - return lhs; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_ostream& operator<<( - std::basic_ostream& lhs, - uniform_real_distribution const& rhs - ) - { - return lhs << rhs.param(); - } - friend SPROUT_CONSTEXPR bool operator==(uniform_real_distribution const& lhs, uniform_real_distribution const& rhs) SPROUT_NOEXCEPT { - return lhs.param() == rhs.param(); - } - friend SPROUT_CONSTEXPR bool operator!=(uniform_real_distribution const& lhs, uniform_real_distribution const& rhs) SPROUT_NOEXCEPT { - return !(lhs == rhs); - } - }; - } // namespace random - - using sprout::random::uniform_real_distribution; -} // namespace sprout - -#endif // #ifndef SPROUT_RANDOM_UNIFORM_REAL_DISTRIBUTION_HPP diff --git a/dsp/lib/sprout/sprout/random/uniform_smallint.hpp b/dsp/lib/sprout/sprout/random/uniform_smallint.hpp deleted file mode 100644 index 5410381..0000000 --- a/dsp/lib/sprout/sprout/random/uniform_smallint.hpp +++ /dev/null @@ -1,317 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_UNIFORM_SMALLINT_HPP -#define SPROUT_RANDOM_UNIFORM_SMALLINT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace random { - // - // uniform_smallint - // - template - class uniform_smallint { - public: - typedef IntType input_type; - typedef IntType result_type; - public: - // - // param_type - // - class param_type { - public: - typedef uniform_smallint distribution_type; - private: - IntType min_; - IntType max_; - public: - SPROUT_CONSTEXPR param_type() - : min_(0) - , max_(sprout::numeric_limits::max()) - {} - param_type(param_type const&) = default; - explicit SPROUT_CONSTEXPR param_type(IntType min_arg, IntType max_arg = sprout::numeric_limits::max()) - : min_((SPROUT_ASSERT(min_arg <= max_arg), min_arg)) - , max_(max_arg) - {} - SPROUT_CONSTEXPR IntType a() const SPROUT_NOEXCEPT { - return min_; - } - SPROUT_CONSTEXPR IntType b() const SPROUT_NOEXCEPT { - return max_; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_istream& operator>>( - std::basic_istream& lhs, - param_type& rhs - ) - { - IntType min; - IntType max; - if (lhs >> min >> std::ws >> max) { - if (min <= max) { - rhs.min_ = min; - rhs.max_ = max; - } else { - lhs.setstate(std::ios_base::failbit); - } - } - return lhs; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_ostream& operator<<( - std::basic_ostream& lhs, - param_type const& rhs - ) - { - return lhs << rhs.min_ << " " << rhs.max_; - } - friend SPROUT_CONSTEXPR bool operator==(param_type const& lhs, param_type const& rhs) SPROUT_NOEXCEPT { - return lhs.min_ == rhs.min_ && lhs.max_ == rhs.max_; - } - friend SPROUT_CONSTEXPR bool operator!=(param_type const& lhs, param_type const& rhs) SPROUT_NOEXCEPT { - return !(lhs == rhs); - } - }; - private: - IntType min_; - IntType max_; - private: - template - SPROUT_CXX14_CONSTEXPR result_type generate( - Engine& eng, - std::true_type - ) const - { - typedef typename Engine::result_type base_result; - typedef typename std::make_unsigned::type base_unsigned; - typedef typename std::make_unsigned::type range_type; - range_type range = sprout::random::detail::subtract()(max_, min_); - base_unsigned base_range = sprout::random::detail::subtract()(eng.max(), eng.min()); - base_unsigned val = sprout::random::detail::subtract()(static_cast(eng()), eng.min()); - return range >= base_range - ? sprout::random::detail::add()(static_cast(val), min_) - : sprout::random::detail::add()(static_cast(val % (static_cast(range) + 1)), min_) - ; - } - template - SPROUT_CXX14_CONSTEXPR result_type generate( - Engine& eng, - std::false_type - ) const - { - typedef typename Engine::result_type base_result; - typedef typename std::make_unsigned::type range_type; - range_type range = sprout::random::detail::subtract()(max_, min_); - base_result val = sprout::random::uniform_01()(eng); - range_type offset = static_cast(val * (static_cast(range) + 1)); - return offset > range - ? max_ - : sprout::random::detail::add()(offset, min_) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result generate_true_2( - Engine const&, - EngineResult const& rnd, - RangeType range, - BaseUnsigned base_range, - BaseUnsigned val - ) const - { - return range >= base_range - ? sprout::random::random_result( - sprout::random::detail::add()(static_cast(val), min_), - sprout::random::next(rnd), - *this - ) - : sprout::random::random_result( - sprout::random::detail::add()(static_cast(val % (static_cast(range) + 1)), min_), - sprout::random::next(rnd), - *this - ) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result generate_true_1( - Engine const& eng, - EngineResult const& rnd, - RangeType range, - BaseUnsigned base_range - ) const - { - typedef typename Engine::result_type base_result; - return generate_true_2( - eng, - rnd, - range, - base_range, - BaseUnsigned(sprout::random::detail::subtract()(sprout::random::result(rnd), eng.min())) - ); - } - template - SPROUT_CONSTEXPR sprout::random::random_result generate( - Engine const& eng, - std::true_type - ) const - { - typedef typename Engine::result_type base_result; - typedef typename std::make_unsigned::type base_unsigned; - typedef typename std::make_unsigned::type range_type; - return generate_true_1( - eng, - eng(), - range_type(sprout::random::detail::subtract()(max_, min_)), - base_unsigned(sprout::random::detail::subtract()(eng.max(), eng.min())) - ); - } - template - SPROUT_CONSTEXPR sprout::random::random_result generate_false_2( - Engine const&, - Random const& rnd, - RangeType range, - RangeType offset - ) const - { - return offset > range - ? sprout::random::random_result( - max_, - sprout::random::next(rnd).engine(), - *this - ) - : sprout::random::random_result( - sprout::random::detail::add()(offset, min_), - sprout::random::next(rnd).engine(), - *this - ) - ; - } - template - SPROUT_CONSTEXPR sprout::random::random_result generate_false_1( - Engine const& eng, - Random const& rnd, - RangeType range - ) const - { - typedef typename Engine::result_type base_result; - return generate_false_2( - eng, - rnd, - static_cast(sprout::random::detail::subtract()(max_, min_)), - static_cast(sprout::random::result(rnd) * (static_cast(range) + 1)) - ); - } - template - SPROUT_CONSTEXPR sprout::random::random_result generate( - Engine const& eng, - std::false_type - ) const - { - typedef typename Engine::result_type base_result; - typedef typename std::make_unsigned::type range_type; - return generate_false_1( - eng, - sprout::random::uniform_01()(eng), - static_cast(sprout::random::detail::subtract()(max_, min_)) - ); - } - public: - SPROUT_CONSTEXPR uniform_smallint() SPROUT_NOEXCEPT - : min_(0) - , max_(sprout::numeric_limits::max()) - {} - uniform_smallint(uniform_smallint const&) = default; - explicit SPROUT_CONSTEXPR uniform_smallint(IntType min_arg, IntType max_arg = sprout::numeric_limits::max()) - : min_((SPROUT_ASSERT(min_arg <= max_arg), min_arg)) - , max_(max_arg) - {} - explicit SPROUT_CONSTEXPR uniform_smallint(param_type const& parm) SPROUT_NOEXCEPT - : min_(parm.a()) - , max_(parm.b()) - {} - SPROUT_CONSTEXPR result_type a() const SPROUT_NOEXCEPT { - return min_; - } - SPROUT_CONSTEXPR result_type b() const SPROUT_NOEXCEPT { - return max_; - } - SPROUT_CONSTEXPR result_type min() const SPROUT_NOEXCEPT { - return min_; - } - SPROUT_CONSTEXPR result_type max() const SPROUT_NOEXCEPT { - return max_; - } - SPROUT_CXX14_CONSTEXPR void reset() SPROUT_NOEXCEPT {} - SPROUT_CONSTEXPR param_type param() const SPROUT_NOEXCEPT { - return param_type(min_, max_); - } - SPROUT_CXX14_CONSTEXPR void param(param_type const& parm) { - min_ = parm.a(); - max_ = parm.b(); - } - template - SPROUT_CXX14_CONSTEXPR result_type operator()(Engine& eng) const { - typedef typename Engine::result_type base_result; - return generate(eng, typename std::is_integral::type()); - } - template - SPROUT_CONSTEXPR sprout::random::random_result const operator()(Engine const& eng) const { - typedef typename Engine::result_type base_result; - return generate(eng, typename std::is_integral::type()); - } - template - SPROUT_CXX14_CONSTEXPR result_type operator()(Engine& eng, param_type const& parm) const { - return uniform_smallint(parm)(eng); - } - template - SPROUT_CONSTEXPR sprout::random::random_result const operator()(Engine const& eng, param_type const& parm) const { - return uniform_smallint(parm)(eng); - } - template - friend SPROUT_NON_CONSTEXPR std::basic_istream& operator>>( - std::basic_istream& lhs, - uniform_smallint& rhs - ) - { - param_type parm; - if (lhs >> parm) { - rhs.param(parm); - } - return lhs; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_ostream& operator<<( - std::basic_ostream& lhs, - uniform_smallint const& rhs - ) - { - return lhs << rhs.param(); - } - friend SPROUT_CONSTEXPR bool operator==(uniform_smallint const& lhs, uniform_smallint const& rhs) SPROUT_NOEXCEPT { - return lhs.param() == rhs.param(); - } - friend SPROUT_CONSTEXPR bool operator!=(uniform_smallint const& lhs, uniform_smallint const& rhs) SPROUT_NOEXCEPT { - return !(lhs == rhs); - } - }; - } // namespace random - - using sprout::random::uniform_smallint; -} // namespace sprout - -#endif // #ifndef SPROUT_RANDOM_UNIFORM_SMALLINT_HPP diff --git a/dsp/lib/sprout/sprout/random/unique_seed.hpp b/dsp/lib/sprout/sprout/random/unique_seed.hpp deleted file mode 100644 index 03ff5d7..0000000 --- a/dsp/lib/sprout/sprout/random/unique_seed.hpp +++ /dev/null @@ -1,74 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_UNIQUE_SEED_HPP -#define SPROUT_RANDOM_UNIQUE_SEED_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // make_seed - // - template - SPROUT_CONSTEXPR std::uint_least32_t - make_seed(T const& v) { - return static_cast(sprout::to_hash(v)); - } - - namespace detail { - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Args) + 1 == N, - sprout::array - >::type - make_seed_seq_impl(T const&, std::size_t seed, Args const&... args) { - return sprout::array{{args..., static_cast(seed)}}; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Args) + 1 != N, - sprout::array - >::type - make_seed_seq_impl(T const& v, std::size_t seed, Args const&... args) { - return sprout::detail::make_seed_seq_impl(v, sprout::hash_combine(seed, v), args..., static_cast(seed)); - } - } // namespace detail - // - // make_seed_seq - // - template - SPROUT_CONSTEXPR sprout::array - make_seed_seq(T const& v) { - return sprout::detail::make_seed_seq_impl(v, sprout::to_hash(v)); - } -} // namespace sprout - -// -// SPROUT_UNIQUE_SEED_ -// -#define SPROUT_UNIQUE_SEED_(N) \ - (::sprout::make_seed(SPROUT_PP_UNIQUE_STRING_(N))) - -// -// SPROUT_UNIQUE_SEED -// -#define SPROUT_UNIQUE_SEED \ - (::sprout::make_seed(SPROUT_PP_UNIQUE_STRING)) - -// -// SPROUT_UNIQUE_SEED_SEQ -// -#define SPROUT_UNIQUE_SEED_SEQ(N) (::sprout::make_seed_seq(SPROUT_PP_UNIQUE_STRING)) - -#endif // #ifndef SPROUT_RANDOM_UNIQUE_SEED_HPP diff --git a/dsp/lib/sprout/sprout/random/utility.hpp b/dsp/lib/sprout/sprout/random/utility.hpp deleted file mode 100644 index 4770803..0000000 --- a/dsp/lib/sprout/sprout/random/utility.hpp +++ /dev/null @@ -1,21 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_UTILITY_HPP -#define SPROUT_RANDOM_UTILITY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANDOM_UTILITY_HPP diff --git a/dsp/lib/sprout/sprout/random/variate_generator.hpp b/dsp/lib/sprout/sprout/random/variate_generator.hpp deleted file mode 100644 index 8e84294..0000000 --- a/dsp/lib/sprout/sprout/random/variate_generator.hpp +++ /dev/null @@ -1,169 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_VARIATE_GENERATOR_HPP -#define SPROUT_RANDOM_VARIATE_GENERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace random { - // - // variate_generator - // - template - class variate_generator { - private: - typedef sprout::random::detail::ptr_helper engine_helper_type; - typedef sprout::random::detail::ptr_helper distribution_helper_type; - public: - typedef typename engine_helper_type::value_type engine_value_type; - typedef typename distribution_helper_type::value_type distribution_value_type; - typedef typename engine_helper_type::reference_type engine_reference_type; - typedef typename distribution_helper_type::reference_type distribution_reference_type; - typedef typename engine_helper_type::const_reference_type engine_const_reference_type; - typedef typename distribution_helper_type::const_reference_type distribution_const_reference_type; - typedef typename engine_helper_type::rvalue_type engine_param_type; - typedef typename distribution_helper_type::rvalue_type distribution_param_type; - public: - typedef Engine engine_type; - typedef Distribution distribution_type; - typedef typename distribution_value_type::result_type result_type; - typedef typename std::conditional< - std::is_reference::value && !std::is_const::type>::value, - sprout::random::random_result, - sprout::random::random_result - >::type random_result_type; - private: - static SPROUT_CONSTEXPR random_result_type call(variate_generator const& g, sprout::true_type) { - return random_result_type(g.distribution_(g.engine_), g.distribution_, g.engine_); - } - static SPROUT_CONSTEXPR random_result_type call(variate_generator const& g, sprout::false_type) { - return g.distribution_(sprout::as_const(g.engine_)); - } - private: - engine_type engine_; - distribution_type distribution_; - public: - SPROUT_CONSTEXPR variate_generator() - : engine_() - , distribution_() - {} - variate_generator(variate_generator const&) = default; - SPROUT_CONSTEXPR variate_generator( - engine_param_type engine, - distribution_param_type distribution - ) - : engine_(engine) - , distribution_(distribution) - {} - SPROUT_CONSTEXPR random_result_type operator()() const { - typedef sprout::bool_constant::value && !std::is_const::type>::value> tag; - return call(*this, tag()); - } - SPROUT_CONSTEXPR random_result_type next_value() const { - return (*this)(); - } - SPROUT_CXX14_CONSTEXPR engine_reference_type engine() SPROUT_NOEXCEPT { - return engine_helper_type::ref(engine_); - } - SPROUT_CONSTEXPR engine_const_reference_type engine() const SPROUT_NOEXCEPT { - return engine_helper_type::ref(engine_); - } - SPROUT_CXX14_CONSTEXPR distribution_reference_type distribution() SPROUT_NOEXCEPT { - return distribution_helper_type::ref(distribution_); - } - SPROUT_CONSTEXPR distribution_const_reference_type distribution() const SPROUT_NOEXCEPT { - return distribution_helper_type::ref(distribution_); - } - SPROUT_CONSTEXPR result_type min() const SPROUT_NOEXCEPT { - return distribution_.min(); - } - SPROUT_CONSTEXPR result_type max() const SPROUT_NOEXCEPT { - return distribution_.max(); - } - SPROUT_CXX14_CONSTEXPR void swap(variate_generator& other) - SPROUT_NOEXCEPT_IF( - SPROUT_NOEXCEPT_EXPR(sprout::swap(engine_, other.engine_)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(distribution_, other.distribution_)) - ) - { - sprout::swap(engine_, other.engine_); - sprout::swap(distribution_, other.distribution_); - } - friend SPROUT_CONSTEXPR bool operator==(variate_generator const& lhs, variate_generator const& rhs) SPROUT_NOEXCEPT { - return lhs.engine_ == rhs.engine_ - && lhs.distribution_ == rhs.distribution_ - ; - } - friend SPROUT_CONSTEXPR bool operator!=(variate_generator const& lhs, variate_generator const& rhs) SPROUT_NOEXCEPT { - return !(lhs == rhs); - } - }; - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::random::variate_generator& lhs, sprout::random::variate_generator& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // combine - // - template - inline SPROUT_CONSTEXPR sprout::random::variate_generator< - typename sprout::lvalue_reference::type, - typename sprout::lvalue_reference::type - > - combine(Engine&& engine, Distribution&& distribution) { - typedef sprout::random::variate_generator< - typename sprout::lvalue_reference::type, - typename sprout::lvalue_reference::type - > type; - return type( - sprout::lvalue_forward(engine), - sprout::lvalue_forward(distribution) - ); - } - - // - // ccombine - // - template - inline SPROUT_CONSTEXPR sprout::random::variate_generator - ccombine(Engine const& engine, Distribution const& distribution) { - return sprout::random::variate_generator(engine, distribution); - } - - // - // combine_copy - // - template - inline SPROUT_CONSTEXPR sprout::random::variate_generator - combine_copy(Engine const& engine, Distribution const& distribution) { - return sprout::random::variate_generator(engine, distribution); - } - } // namespace random - - using sprout::random::variate_generator; -} // namespace sprout - -#include - -#endif // #ifndef SPROUT_RANDOM_VARIATE_GENERATOR_HPP diff --git a/dsp/lib/sprout/sprout/random/xor_combine.hpp b/dsp/lib/sprout/sprout/random/xor_combine.hpp deleted file mode 100644 index 27efaa8..0000000 --- a/dsp/lib/sprout/sprout/random/xor_combine.hpp +++ /dev/null @@ -1,159 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANDOM_XOR_COMBINE_HPP -#define SPROUT_RANDOM_XOR_COMBINE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace random { - // - // xor_combine_engine - // - template - class xor_combine_engine { - public: - typedef URNG1 base1_type; - typedef URNG2 base2_type; - typedef base1_type first_base; - typedef base2_type second_base; - typedef typename base1_type::result_type result_type; - public: - SPROUT_STATIC_CONSTEXPR int shift1 = s1; - SPROUT_STATIC_CONSTEXPR int shift2 = s2; - public: - static SPROUT_CONSTEXPR result_type static_min() SPROUT_NOEXCEPT { - return NS_SSCRISK_CEL_OR_SPROUT::min(base1_type::static_min(), base2_type::static_min()); - } - static SPROUT_CONSTEXPR result_type static_max() SPROUT_NOEXCEPT { - return NS_SSCRISK_CEL_OR_SPROUT::max(base1_type::static_max(), base2_type::static_max()); - } - private: - base1_type rng1_; - base2_type rng2_; - private: - template - SPROUT_CONSTEXPR sprout::random::random_result generate(EngineResult1 const& rnd1, EngineResult2 const& rnd2) const { - return sprout::random::random_result( - (sprout::random::result(rnd1) << s1) ^ (sprout::random::result(rnd2) << s2), - xor_combine_engine( - sprout::random::next(rnd1), sprout::random::next(rnd2) - ) - ); - } - public: - SPROUT_CONSTEXPR xor_combine_engine() - : rng1_(), rng2_() - {} - xor_combine_engine(xor_combine_engine const&) = default; - explicit SPROUT_CONSTEXPR xor_combine_engine(result_type seed) - : rng1_(seed), rng2_(seed) - {} - template::value>::type = sprout::enabler> - explicit SPROUT_CXX14_CONSTEXPR xor_combine_engine(Sseq& seq) - : rng1_(seq), rng2_(seq) - {} - template::value>::type = sprout::enabler> - explicit SPROUT_CONSTEXPR xor_combine_engine(Sseq const& seq) - : rng1_(seq), rng2_(seq) - {} - template - SPROUT_CONSTEXPR xor_combine_engine(ForwardIterator first, ForwardIterator last) - : rng1_(first, last), rng2_(first, last) - {} - SPROUT_CONSTEXPR xor_combine_engine(typename base1_type::result_type seed1, typename base2_type::result_type seed2) - : rng1_(seed1), rng2_(seed2) - {} - SPROUT_CONSTEXPR xor_combine_engine(base1_type const& rng1, base2_type const& rng2) - : rng1_(rng1), rng2_(rng2) - {} - SPROUT_CXX14_CONSTEXPR void seed() { - rng1_.seed(); - rng2_.seed(); - } - SPROUT_CXX14_CONSTEXPR void seed(result_type seed) { - rng1_.seed(seed); - rng2_.seed(seed); - } - template::value>::type = sprout::enabler> - SPROUT_CXX14_CONSTEXPR void seed(Sseq& seq) { - rng1_.seed(seq); - rng2_.seed(seq); - } - template::value>::type = sprout::enabler> - SPROUT_CXX14_CONSTEXPR void seed(Sseq const& seq) { - rng1_.seed(seq); - rng2_.seed(seq); - } - template - SPROUT_CXX14_CONSTEXPR void seed(ForwardIterator first, ForwardIterator last) { - rng1_.seed(first, last); - rng2_.seed(first, last); - } - SPROUT_CXX14_CONSTEXPR void seed(typename base1_type::result_type seed1, typename base2_type::result_type seed2) { - rng1_.seed(seed1); - rng2_.seed(seed2); - } - SPROUT_CONSTEXPR result_type min() const SPROUT_NOEXCEPT { - return NS_SSCRISK_CEL_OR_SPROUT::min(rng1_.min(), rng2_.min()); - } - SPROUT_CONSTEXPR result_type max() const SPROUT_NOEXCEPT { - return NS_SSCRISK_CEL_OR_SPROUT::max(rng1_.max(), rng2_.max()); - } - SPROUT_CXX14_CONSTEXPR result_type operator()() { - return (static_cast(rng1_()) << s1) ^ (static_cast(rng2_()) << s2); - } - SPROUT_CONSTEXPR sprout::random::random_result const operator()() const { - return generate(rng1_(), rng2_()); - } - SPROUT_CONSTEXPR base1_type const& base1() const SPROUT_NOEXCEPT { - return rng1_; - } - SPROUT_CONSTEXPR base2_type const& base2() const SPROUT_NOEXCEPT { - return rng2_; - } - friend SPROUT_CONSTEXPR bool operator==(xor_combine_engine const& lhs, xor_combine_engine const& rhs) SPROUT_NOEXCEPT { - return lhs.rng1_ == rhs.rng1_ && lhs.rng2_ == rhs.rng2_; - } - friend SPROUT_CONSTEXPR bool operator!=(xor_combine_engine const& lhs, xor_combine_engine const& rhs) SPROUT_NOEXCEPT { - return !(lhs == rhs); - } - template - friend SPROUT_NON_CONSTEXPR std::basic_istream& operator>>( - std::basic_istream& lhs, - xor_combine_engine& rhs - ) - { - return lhs >> rhs.rng1_ >> std::ws >> rhs.rng2_; - } - template - friend SPROUT_NON_CONSTEXPR std::basic_ostream& operator<<( - std::basic_ostream& lhs, - xor_combine_engine const& rhs - ) - { - return lhs << rhs.rng1_ << ' ' << rhs.rng2_; - } - }; - template - SPROUT_CONSTEXPR_OR_CONST int sprout::random::xor_combine_engine::shift1; - template - SPROUT_CONSTEXPR_OR_CONST int sprout::random::xor_combine_engine::shift2; - } // namespace random - - using sprout::random::xor_combine_engine; -} // namespace sprout - -#endif // #ifndef SPROUT_RANDOM_XOR_COMBINE_HPP diff --git a/dsp/lib/sprout/sprout/range.hpp b/dsp/lib/sprout/sprout/range.hpp deleted file mode 100644 index c51a1f2..0000000 --- a/dsp/lib/sprout/sprout/range.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_HPP -#define SPROUT_RANGE_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor.hpp b/dsp/lib/sprout/sprout/range/adaptor.hpp deleted file mode 100644 index 084582b..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_HPP -#define SPROUT_RANGE_ADAPTOR_HPP - -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/adapted_dropped.hpp b/dsp/lib/sprout/sprout/range/adaptor/adapted_dropped.hpp deleted file mode 100644 index dd5a817..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/adapted_dropped.hpp +++ /dev/null @@ -1,79 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_ADAPTED_DROPPED_HPP -#define SPROUT_RANGE_ADAPTOR_ADAPTED_DROPPED_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // adapt_drop_holder - // - template - class adapt_drop_holder { - public: - typedef Adaptor adaptor_type; - typedef Difference difference_type; - private: - adaptor_type adaptor_; - difference_type distance_; - public: - SPROUT_CONSTEXPR adapt_drop_holder(adaptor_type const& adaptor, difference_type distance) - : adaptor_(adaptor), distance_(distance) - {} - SPROUT_CONSTEXPR adaptor_type const& adaptor() const { - return adaptor_; - } - SPROUT_CONSTEXPR difference_type const& distance() const { - return distance_; - } - }; - - // - // adapted_dropped_forwarder - // - class adapted_dropped_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::adapt_drop_holder - operator()(Adaptor const& adaptor, Difference distance) const { - return sprout::adaptors::adapt_drop_holder(adaptor, distance); - } - }; - - // - // adapted_dropped - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::adapted_dropped_forwarder adapted_dropped = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::adaptors::adapt_drop_holder const& rhs) - -> decltype( - sprout::lvalue_forward(lhs) | sprout::adaptors::taken(rhs.distance()) - | sprout::adaptors::jointed(sprout::lvalue_forward(lhs) | sprout::adaptors::dropped(rhs.distance()) | rhs.adaptor()) - ) - { - return sprout::lvalue_forward(lhs) | sprout::adaptors::taken(rhs.distance()) - | sprout::adaptors::jointed(sprout::lvalue_forward(lhs) | sprout::adaptors::dropped(rhs.distance()) | rhs.adaptor()) - ; - } - } // namespace adaptors -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_ADAPTED_DROPPED_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/adapted_dropped_end.hpp b/dsp/lib/sprout/sprout/range/adaptor/adapted_dropped_end.hpp deleted file mode 100644 index ff250bf..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/adapted_dropped_end.hpp +++ /dev/null @@ -1,79 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_ADAPTED_DROPPED_END_HPP -#define SPROUT_RANGE_ADAPTOR_ADAPTED_DROPPED_END_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // adapt_drop_end_holder - // - template - class adapt_drop_end_holder { - public: - typedef Adaptor adaptor_type; - typedef Difference difference_type; - private: - adaptor_type adaptor_; - difference_type distance_; - public: - SPROUT_CONSTEXPR adapt_drop_end_holder(adaptor_type const& adaptor, difference_type distance) - : adaptor_(adaptor), distance_(distance) - {} - SPROUT_CONSTEXPR adaptor_type const& adaptor() const { - return adaptor_; - } - SPROUT_CONSTEXPR difference_type const& distance() const { - return distance_; - } - }; - - // - // adapted_dropped_end_forwarder - // - class adapted_dropped_end_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::adapt_drop_end_holder - operator()(Adaptor const& adaptor, Difference distance) const { - return sprout::adaptors::adapt_drop_end_holder(adaptor, distance); - } - }; - - // - // adapted_dropped_end - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::adapted_dropped_end_forwarder adapted_dropped_end = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::adaptors::adapt_drop_end_holder const& rhs) - -> decltype( - sprout::lvalue_forward(lhs) | sprout::adaptors::dropped_end(rhs.distance()) | rhs.adaptor() - | sprout::adaptors::jointed(sprout::lvalue_forward(lhs) | sprout::adaptors::taken_end(rhs.distance())) - ) - { - return sprout::lvalue_forward(lhs) | sprout::adaptors::dropped_end(rhs.distance()) | rhs.adaptor() - | sprout::adaptors::jointed(sprout::lvalue_forward(lhs) | sprout::adaptors::taken_end(rhs.distance())) - ; - } - } // namespace adaptors -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_ADAPTED_DROPPED_END_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/adapted_offset.hpp b/dsp/lib/sprout/sprout/range/adaptor/adapted_offset.hpp deleted file mode 100644 index a00ef4b..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/adapted_offset.hpp +++ /dev/null @@ -1,123 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_ADAPTED_OFFSET_HPP -#define SPROUT_RANGE_ADAPTOR_ADAPTED_OFFSET_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // adapt_offset_holder - // - template - class adapt_offset_holder { - public: - typedef Adaptor adaptor_type; - typedef typename sprout::arithmetic_promote::type difference_type; - private: - adaptor_type adaptor_; - difference_type from_begin_; - difference_type from_end_; - public: - explicit SPROUT_CONSTEXPR adapt_offset_holder(adaptor_type const& adaptor, difference_type from_begin, difference_type from_end) - : adaptor_(adaptor), from_begin_(from_begin), from_end_(from_end) - {} - SPROUT_CONSTEXPR adaptor_type const& adaptor() const { - return adaptor_; - } - SPROUT_CONSTEXPR difference_type const& from_begin() const { - return from_begin_; - } - SPROUT_CONSTEXPR difference_type const& from_end() const { - return from_end_; - } - }; - template - class adapt_offset_holder { - public: - typedef Adaptor adaptor_type; - typedef Difference difference_type; - private: - adaptor_type adaptor_; - difference_type from_begin_; - public: - explicit SPROUT_CONSTEXPR adapt_offset_holder(adaptor_type const& adaptor, difference_type from_begin) - : adaptor_(adaptor), from_begin_(from_begin) - {} - SPROUT_CONSTEXPR adaptor_type const& adaptor() const { - return adaptor_; - } - SPROUT_CONSTEXPR difference_type const& from_begin() const { - return from_begin_; - } - }; - - // - // adapted_offset_forwarder - // - class adapted_offset_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::adapt_offset_holder - operator()(Adaptor const& adaptor, Difference1 from_begin, Difference2 from_end) const { - return sprout::adaptors::adapt_offset_holder(adaptor, from_begin, from_end); - } - template - SPROUT_CONSTEXPR sprout::adaptors::adapt_offset_holder - operator()(Adaptor const& adaptor, Difference from_begin) const { - return sprout::adaptors::adapt_offset_holder(adaptor, from_begin); - } - }; - - // - // adapted_offset - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::adapted_offset_forwarder adapted_offset = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::adaptors::adapt_offset_holder const& rhs) - -> decltype( - sprout::lvalue_forward(lhs) | sprout::adaptors::taken(rhs.from_begin()) - | sprout::adaptors::jointed(sprout::lvalue_forward(lhs) | sprout::adaptors::offset(rhs.from_begin(), rhs.from_end()) | rhs.adaptor()) - | sprout::adaptors::jointed(sprout::lvalue_forward(lhs) | sprout::adaptors::taken_end(rhs.from_end())) - ) - { - return sprout::lvalue_forward(lhs) | sprout::adaptors::taken(rhs.from_begin()) - | sprout::adaptors::jointed(sprout::lvalue_forward(lhs) | sprout::adaptors::offset(rhs.from_begin(), rhs.from_end()) | rhs.adaptor()) - | sprout::adaptors::jointed(sprout::lvalue_forward(lhs) | sprout::adaptors::taken_end(rhs.from_end())) - ; - } - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::adaptors::adapt_offset_holder const& rhs) - -> decltype( - sprout::lvalue_forward(lhs) | sprout::adaptors::taken(rhs.from_begin()) - | sprout::adaptors::jointed(sprout::lvalue_forward(lhs) | sprout::adaptors::offset(rhs.from_begin()) | rhs.adaptor()) - ) - { - return sprout::lvalue_forward(lhs) | sprout::adaptors::taken(rhs.from_begin()) - | sprout::adaptors::jointed(sprout::lvalue_forward(lhs) | sprout::adaptors::offset(rhs.from_begin()) | rhs.adaptor()) - ; - } - } // namespace adaptors -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_ADAPTED_OFFSET_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/adapted_taken.hpp b/dsp/lib/sprout/sprout/range/adaptor/adapted_taken.hpp deleted file mode 100644 index 2d31b41..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/adapted_taken.hpp +++ /dev/null @@ -1,79 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_ADAPTED_TAKEN_HPP -#define SPROUT_RANGE_ADAPTOR_ADAPTED_TAKEN_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // adapt_take_holder - // - template - class adapt_take_holder { - public: - typedef Adaptor adaptor_type; - typedef Difference difference_type; - private: - adaptor_type adaptor_; - difference_type distance_; - public: - SPROUT_CONSTEXPR adapt_take_holder(adaptor_type const& adaptor, difference_type distance) - : adaptor_(adaptor), distance_(distance) - {} - SPROUT_CONSTEXPR adaptor_type const& adaptor() const { - return adaptor_; - } - SPROUT_CONSTEXPR difference_type const& distance() const { - return distance_; - } - }; - - // - // adapted_taken_forwarder - // - class adapted_taken_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::adapt_take_holder - operator()(Adaptor const& adaptor, Difference distance) const { - return sprout::adaptors::adapt_take_holder(adaptor, distance); - } - }; - - // - // adapted_taken - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::adapted_taken_forwarder adapted_taken = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::adaptors::adapt_take_holder const& rhs) - -> decltype( - sprout::lvalue_forward(lhs) | sprout::adaptors::taken(rhs.distance()) | rhs.adaptor() - | sprout::adaptors::jointed(sprout::lvalue_forward(lhs) | sprout::adaptors::dropped(rhs.distance())) - ) - { - return sprout::lvalue_forward(lhs) | sprout::adaptors::taken(rhs.distance()) | rhs.adaptor() - | sprout::adaptors::jointed(sprout::lvalue_forward(lhs) | sprout::adaptors::dropped(rhs.distance())) - ; - } - } // namespace adaptors -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_ADAPTED_TAKEN_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/adapted_taken_end.hpp b/dsp/lib/sprout/sprout/range/adaptor/adapted_taken_end.hpp deleted file mode 100644 index f8bedc4..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/adapted_taken_end.hpp +++ /dev/null @@ -1,79 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_ADAPTED_TAKEN_END_HPP -#define SPROUT_RANGE_ADAPTOR_ADAPTED_TAKEN_END_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // adapt_take_end_holder - // - template - class adapt_take_end_holder { - public: - typedef Adaptor adaptor_type; - typedef Difference difference_type; - private: - adaptor_type adaptor_; - difference_type distance_; - public: - SPROUT_CONSTEXPR adapt_take_end_holder(adaptor_type const& adaptor, difference_type distance) - : adaptor_(adaptor), distance_(distance) - {} - SPROUT_CONSTEXPR adaptor_type const& adaptor() const { - return adaptor_; - } - SPROUT_CONSTEXPR difference_type const& distance() const { - return distance_; - } - }; - - // - // adapted_taken_end_forwarder - // - class adapted_taken_end_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::adapt_take_end_holder - operator()(Adaptor const& adaptor, Difference distance) const { - return sprout::adaptors::adapt_take_end_holder(adaptor, distance); - } - }; - - // - // adapted_taken_end - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::adapted_taken_end_forwarder adapted_taken_end = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::adaptors::adapt_take_end_holder const& rhs) - -> decltype( - sprout::lvalue_forward(lhs) | sprout::adaptors::dropped_end(rhs.distance()) - | sprout::adaptors::jointed(sprout::lvalue_forward(lhs) | sprout::adaptors::taken_end(rhs.distance()) | rhs.adaptor()) - ) - { - return sprout::lvalue_forward(lhs) | sprout::adaptors::dropped_end(rhs.distance()) - | sprout::adaptors::jointed(sprout::lvalue_forward(lhs) | sprout::adaptors::taken_end(rhs.distance()) | rhs.adaptor()) - ; - } - } // namespace adaptors -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_ADAPTED_TAKEN_END_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/adapted_window.hpp b/dsp/lib/sprout/sprout/range/adaptor/adapted_window.hpp deleted file mode 100644 index 007b56a..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/adapted_window.hpp +++ /dev/null @@ -1,123 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_ADAPTED_WINDOW_HPP -#define SPROUT_RANGE_ADAPTOR_ADAPTED_WINDOW_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // adapt_window_holder - // - template - class adapt_window_holder { - public: - typedef Adaptor adaptor_type; - typedef typename sprout::arithmetic_promote::type difference_type; - private: - adaptor_type adaptor_; - difference_type to_first_; - difference_type to_last_; - public: - explicit SPROUT_CONSTEXPR adapt_window_holder(adaptor_type const& adaptor, difference_type to_first, difference_type to_last) - : adaptor_(adaptor), to_first_(to_first), to_last_(to_last) - {} - SPROUT_CONSTEXPR adaptor_type const& adaptor() const { - return adaptor_; - } - SPROUT_CONSTEXPR difference_type const& to_first() const { - return to_first_; - } - SPROUT_CONSTEXPR difference_type const& to_last() const { - return to_last_; - } - }; - template - class adapt_window_holder { - public: - typedef Adaptor adaptor_type; - typedef Difference difference_type; - private: - adaptor_type adaptor_; - difference_type to_first_; - public: - explicit SPROUT_CONSTEXPR adapt_window_holder(adaptor_type const& adaptor, difference_type to_first) - : adaptor_(adaptor), to_first_(to_first) - {} - SPROUT_CONSTEXPR adaptor_type const& adaptor() const { - return adaptor_; - } - SPROUT_CONSTEXPR difference_type const& to_first() const { - return to_first_; - } - }; - - // - // adapted_window_forwarder - // - class adapted_window_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::adapt_window_holder - operator()(Adaptor const& adaptor, Difference1 to_first, Difference2 to_last) const { - return sprout::adaptors::adapt_window_holder(adaptor, to_first, to_last); - } - template - SPROUT_CONSTEXPR sprout::adaptors::adapt_window_holder - operator()(Adaptor const& adaptor, Difference to_first) const { - return sprout::adaptors::adapt_window_holder(adaptor, to_first); - } - }; - - // - // adapted_window - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::adapted_window_forwarder adapted_window = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::adaptors::adapt_window_holder const& rhs) - -> decltype( - sprout::lvalue_forward(lhs) | sprout::adaptors::taken(rhs.to_first()) - | sprout::adaptors::jointed(sprout::lvalue_forward(lhs) | sprout::adaptors::window(rhs.to_first(), rhs.to_last()) | rhs.adaptor()) - | sprout::adaptors::jointed(sprout::lvalue_forward(lhs) | sprout::adaptors::dropped(rhs.to_last())) - ) - { - return sprout::lvalue_forward(lhs) | sprout::adaptors::taken(rhs.to_first()) - | sprout::adaptors::jointed(sprout::lvalue_forward(lhs) | sprout::adaptors::window(rhs.to_first(), rhs.to_last()) | rhs.adaptor()) - | sprout::adaptors::jointed(sprout::lvalue_forward(lhs) | sprout::adaptors::dropped(rhs.to_last())) - ; - } - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::adaptors::adapt_window_holder const& rhs) - -> decltype( - sprout::lvalue_forward(lhs) | sprout::adaptors::taken(rhs.to_first()) - | sprout::adaptors::jointed(sprout::lvalue_forward(lhs) | sprout::adaptors::window(rhs.to_first()) | rhs.adaptor()) - ) - { - return sprout::lvalue_forward(lhs) | sprout::adaptors::taken(rhs.to_first()) - | sprout::adaptors::jointed(sprout::lvalue_forward(lhs) | sprout::adaptors::window(rhs.to_first()) | rhs.adaptor()) - ; - } - } // namespace adaptors -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_ADAPTED_WINDOW_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/adjacent_filtered.hpp b/dsp/lib/sprout/sprout/range/adaptor/adjacent_filtered.hpp deleted file mode 100644 index 369b2ef..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/adjacent_filtered.hpp +++ /dev/null @@ -1,125 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_ADJACENT_FILTERED_HPP -#define SPROUT_RANGE_ADAPTOR_ADJACENT_FILTERED_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // adjacent_filtered_range - // - template - class adjacent_filtered_range - : public sprout::adaptors::detail::adapted_range_default< - Range, - sprout::adjacent_filter_iterator< - Predicate, - typename sprout::container_traits::iterator - > - > - { - public: - typedef Predicate predicate_type; - typedef sprout::adaptors::detail::adapted_range_default< - Range, - sprout::adjacent_filter_iterator< - Predicate, - typename sprout::container_traits::iterator - > - > base_type; - typedef typename base_type::range_type range_type; - typedef typename base_type::iterator iterator; - public: - SPROUT_CONSTEXPR adjacent_filtered_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - adjacent_filtered_range(adjacent_filtered_range const&) = default; - SPROUT_CONSTEXPR adjacent_filtered_range(Predicate pred, range_type& range) - : base_type( - iterator(pred, sprout::begin(range), sprout::end(range)), - iterator(pred, sprout::end(range), sprout::end(range)) - ) - {} - }; - - // - // adjacent_filter_holder - // - template - class adjacent_filter_holder { - public: - typedef Predicate predicate_type; - private: - Predicate pred_; - public: - SPROUT_CONSTEXPR adjacent_filter_holder() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - adjacent_filter_holder(adjacent_filter_holder const&) = default; - SPROUT_CONSTEXPR adjacent_filter_holder(Predicate pred) - : pred_(pred) - {} - SPROUT_CONSTEXPR Predicate predicate() const { - return pred_; - } - }; - - // - // adjacent_filtered_forwarder - // - class adjacent_filtered_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::adjacent_filter_holder - operator()(Predicate pred) const { - return sprout::adaptors::adjacent_filter_holder(pred); - } - }; - - // - // adjacent_filtered - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::adjacent_filtered_forwarder adjacent_filtered = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::adjacent_filtered_range< - Predicate, - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::adjacent_filter_holder const& rhs) { - return sprout::adaptors::adjacent_filtered_range< - Predicate, - typename std::remove_reference::type>::type - >( - rhs.predicate(), - sprout::lvalue_forward(lhs) - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_ADJACENT_FILTERED_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/alternated.hpp b/dsp/lib/sprout/sprout/range/adaptor/alternated.hpp deleted file mode 100644 index d9d4f65..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/alternated.hpp +++ /dev/null @@ -1,137 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_ALTERNATED_HPP -#define SPROUT_RANGE_ADAPTOR_ALTERNATED_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace adaptors { - // - // alternated_range - // - template - class alternated_range - : public sprout::adaptors::detail::jointed_range_default< - LRange, RRange, - sprout::alternate_iterator< - typename sprout::container_traits::iterator, - typename sprout::container_traits::iterator - > - > - { - public: - typedef sprout::adaptors::detail::jointed_range_default< - LRange, RRange, - sprout::alternate_iterator< - typename sprout::container_traits::iterator, - typename sprout::container_traits::iterator - > - > base_type; - typedef typename base_type::range1_type range1_type; - typedef typename base_type::range2_type range2_type; - typedef typename base_type::iterator iterator; - public: - SPROUT_CONSTEXPR alternated_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - alternated_range(alternated_range const&) = default; - SPROUT_CONSTEXPR alternated_range(range1_type& range1, range2_type& range2) - : base_type( - iterator(sprout::begin(range1), sprout::begin(range2)), - iterator( - sprout::next(sprout::begin(range1), NS_SSCRISK_CEL_OR_SPROUT::min(sprout::size(range1), sprout::size(range2))), - sprout::next(sprout::begin(range2), NS_SSCRISK_CEL_OR_SPROUT::min(sprout::size(range1), sprout::size(range2))) - ) - ) - {} - }; - - // - // alternate_holder - // - template - class alternate_holder { - public: - typedef RRange range2_type; - private: - sprout::value_holder range_; - public: - SPROUT_CONSTEXPR alternate_holder() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - alternate_holder(alternate_holder const&) = default; - explicit SPROUT_CONSTEXPR alternate_holder(range2_type& range) - : range_(range) - {} - SPROUT_CONSTEXPR range2_type& range() const { - return range_; - } - }; - - // - // alternated_forwarder - // - class alternated_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::alternate_holder< - typename std::remove_reference::type>::type - > - operator()(RRange&& range) const { - return sprout::adaptors::alternate_holder< - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(range) - ); - } - }; - - // - // alternated - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::alternated_forwarder alternated = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::alternated_range< - typename std::remove_reference::type>::type, - RRange - > - operator|(LRange&& lhs, sprout::adaptors::alternate_holder const& rhs) { - return sprout::adaptors::alternated_range< - typename std::remove_reference::type>::type, - RRange - >( - sprout::lvalue_forward(lhs), - rhs.range() - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_ALTERNATED_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/amplitude_spectrum.hpp b/dsp/lib/sprout/sprout/range/adaptor/amplitude_spectrum.hpp deleted file mode 100644 index 88e8f8d..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/amplitude_spectrum.hpp +++ /dev/null @@ -1,97 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_AMPLITUDE_SPECTRUM_HPP -#define SPROUT_RANGE_ADAPTOR_AMPLITUDE_SPECTRUM_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // amplitude_spectrum_range - // - template - class amplitude_spectrum_range - : public sprout::adaptors::detail::adapted_range_default< - Range, - sprout::transform_iterator< - sprout::amplitude_value::value_type>, - typename sprout::container_traits::iterator - > - > - { - public: - typedef sprout::adaptors::detail::adapted_range_default< - Range, - sprout::transform_iterator< - sprout::amplitude_value::value_type>, - typename sprout::container_traits::iterator - > - > base_type; - typedef typename base_type::range_type range_type; - typedef typename base_type::iterator iterator; - typedef typename base_type::value_type value_type; - public: - SPROUT_CONSTEXPR amplitude_spectrum_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - amplitude_spectrum_range(amplitude_spectrum_range const&) = default; - explicit SPROUT_CONSTEXPR amplitude_spectrum_range(range_type& range) - : base_type( - iterator(sprout::begin(range), typename iterator::functor_type()), - iterator(sprout::end(range), typename iterator::functor_type()) - ) - {} - }; - - // - // amplitude_spectrum_forwarder - // - class amplitude_spectrum_forwarder {}; - - // - // amplitude_spectrum - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::amplitude_spectrum_forwarder amplitude_spectrum = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::amplitude_spectrum_range< - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, amplitude_spectrum_forwarder) { - return sprout::adaptors::amplitude_spectrum_range< - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(lhs) - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_AMPLITUDE_SPECTRUM_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/blanked.hpp b/dsp/lib/sprout/sprout/range/adaptor/blanked.hpp deleted file mode 100644 index c97ab9f..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/blanked.hpp +++ /dev/null @@ -1,175 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_BLANKED_HPP -#define SPROUT_RANGE_ADAPTOR_BLANKED_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - // - // blank_t - // - struct blank_t {}; - - namespace adaptors { - // - // blanked_range - // - template - class blanked_range - : public sprout::adaptors::detail::adapted_range_default< - Range, - sprout::value_iterator - > - { - public: - typedef sprout::adaptors::detail::adapted_range_default< - Range, - sprout::value_iterator - > base_type; - typedef typename base_type::range_type range_type; - typedef typename base_type::iterator iterator; - typedef typename base_type::value_type value_type; - typedef typename base_type::difference_type difference_type; - public: - SPROUT_CONSTEXPR blanked_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - blanked_range(blanked_range const&) = default; - explicit SPROUT_CONSTEXPR blanked_range(range_type& range) - : base_type( - iterator(value_type(), sprout::size(range)), - iterator(value_type(), 0) - ) - {} - SPROUT_CONSTEXPR blanked_range( - range_type& range, - difference_type n - ) - : base_type( - iterator(value_type(), NS_SSCRISK_CEL_OR_SPROUT::min(n, sprout::size(range))), - iterator(value_type(), 0) - ) - {} - SPROUT_CONSTEXPR blanked_range( - range_type& range, - difference_type n, - value_type const& value - ) - : base_type( - iterator(value, NS_SSCRISK_CEL_OR_SPROUT::min(n, sprout::size(range))), - iterator(value, 0) - ) - {} - }; - - template - class blanked_range - : public sprout::range::range_container< - sprout::value_iterator - > - { - public: - typedef sprout::range::range_container< - sprout::value_iterator - > base_type; - typedef typename base_type::iterator iterator; - typedef typename base_type::value_type value_type; - typedef typename base_type::difference_type difference_type; - public: - SPROUT_CONSTEXPR blanked_range() - : base_type( - iterator(value_type()), - iterator(value_type(), 0) - ) - {} - blanked_range(blanked_range const&) = default; - explicit SPROUT_CONSTEXPR blanked_range(difference_type n) - : base_type( - iterator(value_type(), n), - iterator(value_type(), 0) - ) - {} - SPROUT_CONSTEXPR blanked_range( - difference_type n, - value_type const& value - ) - : base_type( - iterator(value, n), - iterator(value, 0) - ) - {} - }; - - // - // blanked_forwarder - // - class blanked_forwarder { - public: - SPROUT_CONSTEXPR sprout::adaptors::blanked_range<> - operator()() const { - return sprout::adaptors::blanked_range<>(); - } - template - SPROUT_CONSTEXPR sprout::adaptors::blanked_range<> - operator()(Difference n) const { - return sprout::adaptors::blanked_range<>(n); - } - template - SPROUT_CONSTEXPR sprout::adaptors::blanked_range - operator()(Difference n, T const& value) const { - return sprout::adaptors::blanked_range(n, value); - } - }; - - // - // blanked - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::blanked_forwarder blanked = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::blanked_range< - T, - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::blanked_range const& rhs) { - return sprout::adaptors::blanked_range< - T, - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(lhs), - sprout::size(rhs), - !sprout::empty(rhs) ? *rhs.begin() - : typename sprout::container_traits >::value_type() - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_BLANKED_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/clamped.hpp b/dsp/lib/sprout/sprout/range/adaptor/clamped.hpp deleted file mode 100644 index 7c8882f..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/clamped.hpp +++ /dev/null @@ -1,150 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_CLAMPED_HPP -#define SPROUT_RANGE_ADAPTOR_CLAMPED_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace adaptors { - // - // clamped_range - // - template< - typename Range, - typename Compare = NS_SSCRISK_CEL_OR_SPROUT::less::value_type> - > - class clamped_range - : public sprout::adaptors::detail::adapted_range_default< - Range, - sprout::clamp_iterator::iterator, Compare> - > - { - public: - typedef sprout::adaptors::detail::adapted_range_default< - Range, - sprout::clamp_iterator::iterator, Compare> - > base_type; - typedef typename base_type::range_type range_type; - typedef typename base_type::iterator iterator; - typedef typename base_type::value_type value_type; - typedef typename iterator::compare_type compare_type; - public: - SPROUT_CONSTEXPR clamped_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - clamped_range(clamped_range const&) = default; - explicit SPROUT_CONSTEXPR clamped_range( - range_type& range, - value_type const& low, - value_type const& up, - Compare comp = Compare() - ) - : base_type( - iterator(sprout::begin(range), low, up, comp), - iterator(sprout::end(range), low, up, comp) - ) - {} - SPROUT_CONSTEXPR Compare compare() const { - return base_type::begin().compare(); - } - SPROUT_CONSTEXPR value_type lower() const { - return base_type::begin().lower(); - } - SPROUT_CONSTEXPR value_type upper() const { - return base_type::begin().upper(); - } - }; - - // - // clamp_holder - // - template > - class clamp_holder { - public: - typedef Value value_type; - typedef Compare compare_type; - private: - Compare comp_; - value_type low_; - value_type up_; - public: - SPROUT_CONSTEXPR clamp_holder(value_type const& low, value_type const& up, Compare comp = Compare()) - : comp_(comp), low_(low), up_(up) - {} - SPROUT_CONSTEXPR Compare const& compare() const { - return comp_; - } - SPROUT_CONSTEXPR value_type const& lower() const { - return low_; - } - SPROUT_CONSTEXPR value_type const& upper() const { - return up_; - } - }; - - // - // clamped_forwarder - // - class clamped_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::clamp_holder - operator()(Value const& low, Value const& up, Compare comp) const { - return sprout::adaptors::clamp_holder(low, up, comp); - } - template - SPROUT_CONSTEXPR sprout::adaptors::clamp_holder - operator()(Value const& low, Value const& up) const { - return sprout::adaptors::clamp_holder(low, up); - } - }; - - // - // clamped - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::clamped_forwarder clamped = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::clamped_range< - typename std::remove_reference::type>::type, - Compare - > - operator|(Range&& lhs, sprout::adaptors::clamp_holder const& rhs) { - return sprout::adaptors::clamped_range< - typename std::remove_reference::type>::type, - Compare - >( - sprout::lvalue_forward(lhs), - rhs.lower(), rhs.upper(), rhs.compare() - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_CLAMPED_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/copied.hpp b/dsp/lib/sprout/sprout/range/adaptor/copied.hpp deleted file mode 100644 index c0e8d01..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/copied.hpp +++ /dev/null @@ -1,119 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_COPIED_HPP -#define SPROUT_RANGE_ADAPTOR_COPIED_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // copied_range - // - template - class copied_range - : public sprout::adaptors::detail::adapted_range_default - { - public: - typedef sprout::adaptors::detail::adapted_range_default base_type; - typedef typename base_type::range_type range_type; - public: - SPROUT_CONSTEXPR copied_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - copied_range(copied_range const&) = default; - explicit SPROUT_CONSTEXPR copied_range(range_type& range) - : base_type( - sprout::begin(range), - sprout::end(range) - ) - {} - template - SPROUT_CONSTEXPR operator Result() const { - return sprout::range::fixed::copy(*this); - } - }; - - // - // copy_holder - // - template - class copy_holder { - public: - typedef Result result_type; - private: - sprout::value_holder result_; - public: - SPROUT_CONSTEXPR copy_holder() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - copy_holder(copy_holder const&) = default; - explicit SPROUT_CONSTEXPR copy_holder(result_type& result) - : result_(result) - {} - SPROUT_CONSTEXPR result_type const& result() const { - return result_; - } - }; - - // - // copied_forwarder - // - class copied_forwarder { - public: - template - SPROUT_CONSTEXPR typename sprout::adaptors::copy_holder - operator()(Result const& result) const { - return typename sprout::adaptors::copy_holder(result); - } - }; - - // - // copied - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::copied_forwarder copied = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - operator|(Range&& lhs, sprout::adaptors::copy_holder const& rhs) { - return sprout::range::fixed::copy(sprout::lvalue_forward(lhs), rhs.result()); - } - template - inline SPROUT_CONSTEXPR sprout::adaptors::copied_range< - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::copied_forwarder const&) { - return sprout::adaptors::copied_range< - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(lhs) - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_COPIED_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/counting.hpp b/dsp/lib/sprout/sprout/range/adaptor/counting.hpp deleted file mode 100644 index e3799a6..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/counting.hpp +++ /dev/null @@ -1,158 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_COUNTING_HPP -#define SPROUT_RANGE_ADAPTOR_COUNTING_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // counting_range - // - template - class counting_range - : public sprout::adaptors::detail::adapted_range_default< - Range, - sprout::counting_iterator - > - { - public: - typedef sprout::adaptors::detail::adapted_range_default< - Range, - sprout::counting_iterator - > base_type; - typedef typename base_type::range_type range_type; - typedef typename base_type::iterator iterator; - typedef typename base_type::value_type value_type; - public: - SPROUT_CONSTEXPR counting_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - counting_range(counting_range const&) = default; - explicit SPROUT_CONSTEXPR counting_range(range_type& range) - : base_type( - iterator(), - sprout::next(iterator(), sprout::size(range)) - ) - {} - SPROUT_CONSTEXPR counting_range( - range_type& range, - value_type const& first - ) - : base_type( - iterator(first), - sprout::next(iterator(first), sprout::size(range)) - ) - {} - SPROUT_CONSTEXPR counting_range( - range_type& range, - value_type const& first, - value_type const& last - ) - : base_type( - iterator(first), - sprout::size(range) < last - first ? sprout::next(iterator(first), sprout::size(range)) - : iterator(last) - ) - {} - }; - - template - class counting_range - : public sprout::range::range_container< - sprout::counting_iterator - > - { - public: - typedef sprout::range::range_container< - sprout::counting_iterator - > base_type; - typedef typename base_type::iterator iterator; - typedef typename base_type::value_type value_type; - public: - SPROUT_CONSTEXPR counting_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - counting_range(counting_range const&) = default; - explicit SPROUT_CONSTEXPR counting_range(value_type const& first) - : base_type( - iterator(first), - iterator() - ) - {} - SPROUT_CONSTEXPR counting_range( - value_type const& first, - value_type const& last - ) - : base_type( - iterator(first), - iterator(last) - ) - {} - }; - - // - // counting_forwarder - // - class counting_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::counting_range - operator()(Incrementable const& first) const { - return sprout::adaptors::counting_range(first); - } - template - SPROUT_CONSTEXPR sprout::adaptors::counting_range - operator()(Incrementable const& first, Incrementable const& last) const { - return sprout::adaptors::counting_range(first, last); - } - }; - - // - // counting - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::counting_forwarder counting = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::counting_range< - Incrementable, - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::counting_range const& rhs) { - return sprout::adaptors::counting_range< - Incrementable, - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(lhs), - *rhs.begin(), - *rhs.end() - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_COUNTING_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/deep_copied.hpp b/dsp/lib/sprout/sprout/range/adaptor/deep_copied.hpp deleted file mode 100644 index 10d967d..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/deep_copied.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_DEEP_COPIED_HPP -#define SPROUT_RANGE_ADAPTOR_DEEP_COPIED_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // deep_copied_forwarder - // - class deep_copied_forwarder {}; - - // - // deep_copied - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::deep_copied_forwarder deep_copied = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR typename sprout::container_construct_traits< - typename std::remove_reference::type - >::copied_type - operator|(Range&& lhs, sprout::adaptors::deep_copied_forwarder const&) { - return sprout::deep_copy(SPROUT_FORWARD(Range, lhs)); - } - } // namespace adaptors -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_DEEP_COPIED_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/detail/adapted_range_default.hpp b/dsp/lib/sprout/sprout/range/adaptor/detail/adapted_range_default.hpp deleted file mode 100644 index 99d3a1b..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/detail/adapted_range_default.hpp +++ /dev/null @@ -1,70 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_DETAIL_ADAPTED_RANGE_DEFAULT_HPP -#define SPROUT_RANGE_ADAPTOR_DETAIL_ADAPTED_RANGE_DEFAULT_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - namespace detail { - template::iterator> - class adapted_range_default - : public sprout::range::range_container - , public sprout::detail::container_nosy_static_size - , public sprout::detail::container_nosy_fixed_size - { - public: - typedef Range range_type; - typedef sprout::range::range_container base_type; - typedef typename base_type::iterator iterator; - public: - SPROUT_CONSTEXPR adapted_range_default() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - adapted_range_default(adapted_range_default const&) = default; - explicit SPROUT_CONSTEXPR adapted_range_default(iterator const& first, iterator const& last) - : base_type(first, last) - {} - }; - } // namespace detail - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > { - public: - typedef typename sprout::container_construct_traits::copied_type copied_type; - public: - template - static SPROUT_CONSTEXPR copied_type deep_copy(Cont&& cont) { - return sprout::range::fixed::copy(SPROUT_FORWARD(Cont, cont), sprout::pit()); - } - template - static SPROUT_CONSTEXPR copied_type make(Args&&... args) { - return sprout::make(SPROUT_FORWARD(Args, args)...); - } - template - static SPROUT_CONSTEXPR copied_type remake( - Cont&& cont, - typename sprout::container_traits >::difference_type size, - Args&&... args - ) - { - return sprout::remake(SPROUT_FORWARD(Cont, cont), size, SPROUT_FORWARD(Args, args)...); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_DETAIL_ADAPTED_RANGE_DEFAULT_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/detail/jointed_range_default.hpp b/dsp/lib/sprout/sprout/range/adaptor/detail/jointed_range_default.hpp deleted file mode 100644 index 6bd19ab..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/detail/jointed_range_default.hpp +++ /dev/null @@ -1,210 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_DETAIL_JOINTED_RANGE_DEFAULT_HPP -#define SPROUT_RANGE_ADAPTOR_DETAIL_JOINTED_RANGE_DEFAULT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - namespace detail { - template - class jointed_range_size; - - template - class jointed_range_size< - LRange, RRange, - typename std::enable_if< - sprout::detail::has_static_size >::value - && sprout::detail::has_static_size >::value - >::type - > { - public: - typedef typename sprout::arithmetic_promote< - typename sprout::container_traits::size_type, - typename sprout::container_traits::size_type - >::type size_type; - SPROUT_STATIC_CONSTEXPR size_type static_size - = sprout::container_traits::static_size + sprout::container_traits::static_size - ; - static SPROUT_CONSTEXPR size_type fixed_size() { - return static_size; - } - }; - - template - class jointed_range_size< - LRange, RRange, - typename std::enable_if< - sprout::detail::has_static_size >::value - && !sprout::detail::has_static_size >::value - >::type - > { - public: - typedef typename sprout::container_traits::size_type size_type; - SPROUT_STATIC_CONSTEXPR size_type static_size = sprout::container_traits::static_size; - static SPROUT_CONSTEXPR size_type fixed_size() { - return static_size; - } - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::adaptors::detail::jointed_range_size< - LRange, RRange, - typename std::enable_if< - sprout::detail::has_static_size >::value - && !sprout::detail::has_static_size >::value - >::type - >::size_type - sprout::adaptors::detail::jointed_range_size< - LRange, RRange, - typename std::enable_if< - sprout::detail::has_static_size >::value - && !sprout::detail::has_static_size >::value - >::type - >::static_size; - - template - class jointed_range_size< - LRange, RRange, - typename std::enable_if< - !sprout::detail::has_static_size >::value - && sprout::detail::has_static_size >::value - >::type - > { - public: - typedef typename sprout::container_traits::size_type size_type; - SPROUT_STATIC_CONSTEXPR size_type static_size = sprout::container_traits::static_size; - static SPROUT_CONSTEXPR size_type fixed_size() { - return static_size; - } - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::adaptors::detail::jointed_range_size< - LRange, RRange, - typename std::enable_if< - !sprout::detail::has_static_size >::value - && sprout::detail::has_static_size >::value - >::type - >::size_type - sprout::adaptors::detail::jointed_range_size< - LRange, RRange, - typename std::enable_if< - !sprout::detail::has_static_size >::value - && sprout::detail::has_static_size >::value - >::type - >::static_size; - - template - class jointed_range_size< - LRange, RRange, - typename std::enable_if< - !sprout::detail::has_static_size >::value - && !sprout::detail::has_static_size >::value - >::type - > {}; - - template< - typename LRange, typename RRange, - typename Iterator = typename sprout::container_traits::iterator - > - class jointed_range_default - : public sprout::range::range_container - , public sprout::adaptors::detail::jointed_range_size - { - public: - typedef LRange range_type; - typedef LRange range1_type; - typedef RRange range2_type; - typedef sprout::range::range_container base_type; - typedef typename base_type::iterator iterator; - public: - SPROUT_CONSTEXPR jointed_range_default() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - jointed_range_default(jointed_range_default const&) = default; - explicit SPROUT_CONSTEXPR jointed_range_default(iterator const& first, iterator const& last) - : base_type(first, last) - {} - }; - - template - struct jointed_range_copied_type; - template - struct jointed_range_copied_type< - LRange, RRange, - typename std::enable_if< - sprout::containers::is_rebindable_size::value - >::type - > - : public sprout::container_construct_traits< - typename sprout::containers::weak_rebind_size< - typename sprout::container_construct_traits::copied_type, - sprout::adaptors::detail::jointed_range_size::static_size - >::type - > - {}; - template - struct jointed_range_copied_type< - LRange, RRange, - typename std::enable_if< - !sprout::containers::is_rebindable_size::value && sprout::containers::is_rebindable_size::value - >::type - > - : public sprout::containers::weak_rebind_size< - typename sprout::container_construct_traits::copied_type, - sprout::adaptors::detail::jointed_range_size::static_size - > - {}; - template - struct jointed_range_copied_type< - LRange, RRange, - typename std::enable_if< - !sprout::containers::is_rebindable_size::value && !sprout::containers::is_rebindable_size::value - >::type - > { - public: - typedef typename sprout::container_construct_traits::copied_type type; - }; - } // namespace detail - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > { - public: - typedef typename sprout::adaptors::detail::jointed_range_copied_type::type copied_type; - public: - template - static SPROUT_CONSTEXPR copied_type deep_copy(Cont&& cont) { - return sprout::range::fixed::copy(SPROUT_FORWARD(Cont, cont), sprout::pit()); - } - template - static SPROUT_CONSTEXPR copied_type make(Args&&... args) { - return sprout::make(SPROUT_FORWARD(Args, args)...); - } - template - static SPROUT_CONSTEXPR copied_type remake( - Cont&& cont, - typename sprout::container_traits >::difference_type size, - Args&&... args - ) - { - return sprout::remake(SPROUT_FORWARD(Cont, cont), size, SPROUT_FORWARD(Args, args)...); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_DETAIL_JOINTED_RANGE_DEFAULT_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/detail/sized_range_default.hpp b/dsp/lib/sprout/sprout/range/adaptor/detail/sized_range_default.hpp deleted file mode 100644 index 188e9bd..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/detail/sized_range_default.hpp +++ /dev/null @@ -1,118 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_DETAIL_SIZED_RANGE_DEFAULT_HPP -#define SPROUT_RANGE_ADAPTOR_DETAIL_SIZED_RANGE_DEFAULT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - namespace detail { - template::size_type Size, typename = void> - class sized_range_size; - - template::size_type Size> - class sized_range_size< - Range, Size, - typename std::enable_if >::value>::type - > { - public: - SPROUT_STATIC_CONSTEXPR typename sprout::container_traits::size_type static_size - = Size < sprout::container_traits::static_size ? Size - : sprout::container_traits::static_size - ; - static SPROUT_CONSTEXPR typename sprout::container_traits::size_type fixed_size() { - return static_size; - } - }; - template::size_type Size> - SPROUT_CONSTEXPR_OR_CONST typename sprout::container_traits::size_type - sprout::adaptors::detail::sized_range_size< - Range, Size, - typename std::enable_if >::value>::type - >::static_size; - - template::size_type Size> - class sized_range_size< - Range, Size, - typename std::enable_if >::value>::type - > { - public: - SPROUT_STATIC_CONSTEXPR typename sprout::container_traits::size_type static_size = Size; - static SPROUT_CONSTEXPR typename sprout::container_traits::size_type fixed_size() { - return static_size; - } - }; - template::size_type Size> - SPROUT_CONSTEXPR_OR_CONST typename sprout::container_traits::size_type - sprout::adaptors::detail::sized_range_size< - Range, Size, - typename std::enable_if >::value>::type - >::static_size; - - template< - typename Range, typename sprout::container_traits::size_type Size, - typename Iterator = typename sprout::container_traits::iterator - > - class sized_range_default - : public sprout::range::range_container - , public sprout::adaptors::detail::sized_range_size - { - public: - typedef Range range_type; - typedef sprout::range::range_container base_type; - typedef typename base_type::iterator iterator; - public: - SPROUT_CONSTEXPR sized_range_default() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - sized_range_default(sized_range_default const&) = default; - explicit SPROUT_CONSTEXPR sized_range_default(iterator const& first, iterator const& last) - : base_type(first, last) - {} - }; - } // namespace detail - } // namespace adaptors - - // - // container_construct_traits - // - template::size_type Size, typename Iterator> - struct container_construct_traits > { - public: - typedef typename sprout::containers::weak_rebind_size< - typename sprout::container_construct_traits::copied_type, - sprout::adaptors::detail::sized_range_default::static_size - >::type copied_type; - public: - template - static SPROUT_CONSTEXPR copied_type deep_copy(Cont&& cont) { - return sprout::range::fixed::copy(SPROUT_FORWARD(Cont, cont), sprout::pit()); - } - template - static SPROUT_CONSTEXPR copied_type make(Args&&... args) { - return sprout::make(SPROUT_FORWARD(Args, args)...); - } - template - static SPROUT_CONSTEXPR copied_type remake( - Cont&& cont, - typename sprout::container_traits >::difference_type size, - Args&&... args - ) - { - return sprout::remake(SPROUT_FORWARD(Cont, cont), size, SPROUT_FORWARD(Args, args)...); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_DETAIL_SIZED_RANGE_DEFAULT_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/dft.hpp b/dsp/lib/sprout/sprout/range/adaptor/dft.hpp deleted file mode 100644 index 8567aa2..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/dft.hpp +++ /dev/null @@ -1,88 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_DFT_HPP -#define SPROUT_RANGE_ADAPTOR_DFT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // dft_range - // - template - class dft_range - : public sprout::adaptors::detail::adapted_range_default< - Range, - sprout::dft_iterator::iterator> - > - { - public: - typedef sprout::adaptors::detail::adapted_range_default< - Range, - sprout::dft_iterator::iterator> - > base_type; - typedef typename base_type::range_type range_type; - typedef typename base_type::iterator iterator; - public: - SPROUT_CONSTEXPR dft_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - dft_range(dft_range const&) = default; - explicit SPROUT_CONSTEXPR dft_range(range_type& range) - : base_type( - iterator(sprout::begin(range), sprout::end(range)), - iterator(sprout::begin(range), sprout::end(range), sprout::size(range)) - ) - {} - }; - - // - // dft_forwarder - // - class dft_forwarder {}; - - // - // dft - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::dft_forwarder dft = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::dft_range< - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::dft_forwarder) { - return sprout::adaptors::dft_range< - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(lhs) - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_DFT_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/dropped.hpp b/dsp/lib/sprout/sprout/range/adaptor/dropped.hpp deleted file mode 100644 index 9a8ef0b..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/dropped.hpp +++ /dev/null @@ -1,84 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_DROPPED_HPP -#define SPROUT_RANGE_ADAPTOR_DROPPED_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace adaptors { - // - // drop_holder - // - template - class drop_holder { - public: - typedef Difference difference_type; - private: - difference_type distance_; - public: - explicit SPROUT_CONSTEXPR drop_holder(difference_type distance) - : distance_(distance) - {} - SPROUT_CONSTEXPR difference_type const& distance() const { - return distance_; - } - }; - - // - // dropped_forwarder - // - class dropped_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::drop_holder - operator()(Difference distance) const { - return sprout::adaptors::drop_holder(distance); - } - }; - - // - // dropped - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::dropped_forwarder dropped = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::detail::adapted_range_default< - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::drop_holder const& rhs) { - typedef typename sprout::container_traits< - typename std::remove_reference::type>::type - >::difference_type difference_type; - return sprout::adaptors::detail::adapted_range_default< - typename std::remove_reference::type>::type - >( - sprout::next( - sprout::begin(sprout::lvalue_forward(lhs)), - NS_SSCRISK_CEL_OR_SPROUT::min(rhs.distance(), sprout::size(sprout::lvalue_forward(lhs))) - ), - sprout::end(sprout::lvalue_forward(lhs)) - ); - } - } // namespace adaptors -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_DROPPED_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/dropped_end.hpp b/dsp/lib/sprout/sprout/range/adaptor/dropped_end.hpp deleted file mode 100644 index ee3a484..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/dropped_end.hpp +++ /dev/null @@ -1,84 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_DROPPED_END_HPP -#define SPROUT_RANGE_ADAPTOR_DROPPED_END_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace adaptors { - // - // drop_end_holder - // - template - class drop_end_holder { - public: - typedef Difference difference_type; - private: - difference_type distance_; - public: - explicit SPROUT_CONSTEXPR drop_end_holder(difference_type distance) - : distance_(distance) - {} - SPROUT_CONSTEXPR difference_type const& distance() const { - return distance_; - } - }; - - // - // dropped_end_forwarder - // - class dropped_end_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::drop_end_holder - operator()(Difference distance) const { - return sprout::adaptors::drop_end_holder(distance); - } - }; - - // - // dropped_end - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::dropped_end_forwarder dropped_end = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::detail::adapted_range_default< - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::drop_end_holder const& rhs) { - typedef typename sprout::container_traits< - typename std::remove_reference::type>::type - >::difference_type difference_type; - return sprout::adaptors::detail::adapted_range_default< - typename std::remove_reference::type>::type - >( - sprout::begin(sprout::lvalue_forward(lhs)), - sprout::next( - sprout::end(sprout::lvalue_forward(lhs)), - NS_SSCRISK_CEL_OR_SPROUT::max(rhs.distance(), -sprout::size(sprout::lvalue_forward(lhs))) - ) - ); - } - } // namespace adaptors -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_DROPPED_END_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/filled.hpp b/dsp/lib/sprout/sprout/range/adaptor/filled.hpp deleted file mode 100644 index 977c517..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/filled.hpp +++ /dev/null @@ -1,119 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_FILLED_HPP -#define SPROUT_RANGE_ADAPTOR_FILLED_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // filled_range - // - template - class filled_range - : public sprout::adaptors::detail::adapted_range_default< - Range, - sprout::value_iterator::value_type> - > - { - public: - typedef sprout::adaptors::detail::adapted_range_default< - Range, - sprout::value_iterator::value_type> - > base_type; - typedef typename base_type::range_type range_type; - typedef typename base_type::iterator iterator; - typedef typename base_type::value_type value_type; - public: - SPROUT_CONSTEXPR filled_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - filled_range(filled_range const&) = default; - SPROUT_CONSTEXPR filled_range( - range_type& range, - value_type const& value - ) - : base_type( - iterator(value, sprout::size(range)), - iterator(value, 0) - ) - {} - }; - - // - // fill_holder - // - template - class fill_holder { - public: - typedef T value_type; - private: - value_type value_; - public: - explicit SPROUT_CONSTEXPR fill_holder(value_type const& value) - : value_(value) - {} - SPROUT_CONSTEXPR value_type const& value() const { - return value_; - } - }; - - // - // filled_forwarder - // - class filled_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::fill_holder - operator()(T const& value) const { - return sprout::adaptors::fill_holder(value); - } - }; - - // - // filled - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::filled_forwarder filled = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::filled_range< - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::fill_holder const& rhs) { - return sprout::adaptors::filled_range< - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(lhs), - rhs.value() - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_FILLED_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/filtered.hpp b/dsp/lib/sprout/sprout/range/adaptor/filtered.hpp deleted file mode 100644 index 920b2f6..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/filtered.hpp +++ /dev/null @@ -1,125 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_FILTERED_HPP -#define SPROUT_RANGE_ADAPTOR_FILTERED_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // filtered_range - // - template - class filtered_range - : public sprout::adaptors::detail::adapted_range_default< - Range, - sprout::filter_iterator< - Predicate, - typename sprout::container_traits::iterator - > - > - { - public: - typedef Predicate predicate_type; - typedef sprout::adaptors::detail::adapted_range_default< - Range, - sprout::filter_iterator< - Predicate, - typename sprout::container_traits::iterator - > - > base_type; - typedef typename base_type::range_type range_type; - typedef typename base_type::iterator iterator; - public: - SPROUT_CONSTEXPR filtered_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - filtered_range(filtered_range const&) = default; - SPROUT_CONSTEXPR filtered_range(Predicate pred, range_type& range) - : base_type( - iterator(pred, sprout::begin(range), sprout::end(range)), - iterator(pred, sprout::end(range), sprout::end(range)) - ) - {} - }; - - // - // filter_holder - // - template - class filter_holder { - public: - typedef Predicate predicate_type; - private: - Predicate pred_; - public: - SPROUT_CONSTEXPR filter_holder() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - filter_holder(filter_holder const&) = default; - SPROUT_CONSTEXPR filter_holder(Predicate pred) - : pred_(pred) - {} - SPROUT_CONSTEXPR Predicate predicate() const { - return pred_; - } - }; - - // - // filtered_forwarder - // - class filtered_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::filter_holder - operator()(Predicate pred) const { - return sprout::adaptors::filter_holder(pred); - } - }; - - // - // filtered - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::filtered_forwarder filtered = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::filtered_range< - Predicate, - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::filter_holder const& rhs) { - return sprout::adaptors::filtered_range< - Predicate, - typename std::remove_reference::type>::type - >( - rhs.predicate(), - sprout::lvalue_forward(lhs) - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_FILTERED_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/idft.hpp b/dsp/lib/sprout/sprout/range/adaptor/idft.hpp deleted file mode 100644 index 2692df6..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/idft.hpp +++ /dev/null @@ -1,88 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_IDFT_HPP -#define SPROUT_RANGE_ADAPTOR_IDFT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // idft_range - // - template - class idft_range - : public sprout::adaptors::detail::adapted_range_default< - Range, - sprout::idft_iterator::iterator> - > - { - public: - typedef sprout::adaptors::detail::adapted_range_default< - Range, - sprout::idft_iterator::iterator> - > base_type; - typedef typename base_type::range_type range_type; - typedef typename base_type::iterator iterator; - public: - SPROUT_CONSTEXPR idft_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - idft_range(idft_range const&) = default; - explicit SPROUT_CONSTEXPR idft_range(range_type& range) - : base_type( - iterator(sprout::begin(range), sprout::end(range)), - iterator(sprout::begin(range), sprout::end(range), sprout::size(range)) - ) - {} - }; - - // - // idft_forwarder - // - class idft_forwarder {}; - - // - // idft - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::idft_forwarder idft = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::idft_range< - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::idft_forwarder) { - return sprout::adaptors::idft_range< - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(lhs) - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_IDFT_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/indexed.hpp b/dsp/lib/sprout/sprout/range/adaptor/indexed.hpp deleted file mode 100644 index d8814a7..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/indexed.hpp +++ /dev/null @@ -1,134 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_INDEXED_HPP -#define SPROUT_RANGE_ADAPTOR_INDEXED_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // indexed_range - // - template - class indexed_range - : public sprout::adaptors::detail::adapted_range_default< - Range, - sprout::indexed_iterator::iterator> - > - { - public: - typedef sprout::adaptors::detail::adapted_range_default< - Range, - sprout::indexed_iterator::iterator> - > base_type; - typedef typename base_type::range_type range_type; - typedef typename base_type::iterator iterator; - typedef typename iterator::index_type index_type; - public: - SPROUT_CONSTEXPR indexed_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - indexed_range(indexed_range const&) = default; - explicit SPROUT_CONSTEXPR indexed_range(range_type& range) - : base_type( - iterator(sprout::begin(range)), - iterator(sprout::end(range)) - ) - {} - SPROUT_CONSTEXPR indexed_range(index_type index, range_type& range) - : base_type( - iterator(sprout::begin(range), index), - iterator(sprout::end(range), index) - ) - {} - }; - - // - // indexed_holder - // - template - class indexed_holder { - public: - typedef Index index_type; - private: - index_type index_; - public: - SPROUT_CONSTEXPR indexed_holder() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - indexed_holder(indexed_holder const&) = default; - explicit SPROUT_CONSTEXPR indexed_holder(index_type index) - : index_(index) - {} - SPROUT_CONSTEXPR index_type const& index() const { - return index_; - } - }; - - // - // indexed_forwarder - // - class indexed_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::indexed_holder - operator()(Index index) const { - return sprout::adaptors::indexed_holder(index); - } - }; - - // - // indexed - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::indexed_forwarder indexed = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::indexed_range< - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::indexed_forwarder const&) { - return sprout::adaptors::indexed_range< - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(lhs) - ); - } - template - inline SPROUT_CONSTEXPR sprout::adaptors::indexed_range< - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::indexed_holder const& rhs) { - return sprout::adaptors::indexed_range< - typename std::remove_reference::type>::type - >( - rhs.index(), - sprout::lvalue_forward(lhs) - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_INDEXED_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/jointed.hpp b/dsp/lib/sprout/sprout/range/adaptor/jointed.hpp deleted file mode 100644 index 0ec84b7..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/jointed.hpp +++ /dev/null @@ -1,132 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_JOINTED_HPP -#define SPROUT_RANGE_ADAPTOR_JOINTED_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // jointed_range - // - template - class jointed_range - : public sprout::adaptors::detail::jointed_range_default< - LRange, RRange, - sprout::joint_iterator< - typename sprout::container_traits::iterator, - typename sprout::container_traits::iterator - > - > - { - public: - typedef sprout::adaptors::detail::jointed_range_default< - LRange, RRange, - sprout::joint_iterator< - typename sprout::container_traits::iterator, - typename sprout::container_traits::iterator - > - > base_type; - typedef typename base_type::range1_type range1_type; - typedef typename base_type::range2_type range2_type; - typedef typename base_type::iterator iterator; - public: - SPROUT_CONSTEXPR jointed_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - jointed_range(jointed_range const&) = default; - SPROUT_CONSTEXPR jointed_range(range1_type& range1, range2_type& range2) - : base_type( - iterator(sprout::begin(range1), sprout::end(range1), sprout::begin(range2), sprout::begin(range2)), - iterator(sprout::end(range1), sprout::end(range1), sprout::begin(range2), sprout::end(range2)) - ) - {} - }; - - // - // joint_holder - // - template - class joint_holder { - public: - typedef RRange range2_type; - private: - sprout::value_holder range_; - public: - SPROUT_CONSTEXPR joint_holder() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - joint_holder(joint_holder const&) = default; - explicit SPROUT_CONSTEXPR joint_holder(range2_type& range) - : range_(range) - {} - SPROUT_CONSTEXPR range2_type& range() const { - return range_; - } - }; - - // - // jointed_forwarder - // - class jointed_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::joint_holder< - typename std::remove_reference::type>::type - > - operator()(RRange&& range) const { - return sprout::adaptors::joint_holder< - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(range) - ); - } - }; - - // - // jointed - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::jointed_forwarder jointed = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::jointed_range< - typename std::remove_reference::type>::type, - RRange - > - operator|(LRange&& lhs, sprout::adaptors::joint_holder const& rhs) { - return sprout::adaptors::jointed_range< - typename std::remove_reference::type>::type, - RRange - >( - sprout::lvalue_forward(lhs), - rhs.range() - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_JOINTED_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/merged.hpp b/dsp/lib/sprout/sprout/range/adaptor/merged.hpp deleted file mode 100644 index 70caa0e..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/merged.hpp +++ /dev/null @@ -1,158 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_MERGED_HPP -#define SPROUT_RANGE_ADAPTOR_MERGED_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // merged_range - // - template > - class merged_range - : public sprout::adaptors::detail::jointed_range_default< - LRange, RRange, - sprout::merge_iterator< - typename sprout::container_traits::iterator, - typename sprout::container_traits::iterator, - Compare - > - > - { - public: - typedef sprout::adaptors::detail::jointed_range_default< - LRange, RRange, - sprout::merge_iterator< - typename sprout::container_traits::iterator, - typename sprout::container_traits::iterator, - Compare - > - > base_type; - typedef typename base_type::range1_type range1_type; - typedef typename base_type::range2_type range2_type; - typedef typename base_type::iterator iterator; - public: - SPROUT_CONSTEXPR merged_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - merged_range(merged_range const&) = default; - SPROUT_CONSTEXPR merged_range(range1_type& range1, range2_type& range2, Compare comp = Compare()) - : base_type( - iterator(sprout::begin(range1), sprout::end(range1), sprout::begin(range2), sprout::end(range2), comp), - iterator(sprout::end(range1), sprout::end(range1), sprout::end(range2), sprout::end(range2), comp) - ) - {} - }; - - // - // merge_holder - // - template > - class merge_holder { - public: - typedef RRange range2_type; - typedef Compare compare_type; - private: - sprout::value_holder range_; - Compare comp_; - public: - SPROUT_CONSTEXPR merge_holder() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - merge_holder(merge_holder const&) = default; - explicit SPROUT_CONSTEXPR merge_holder(range2_type& range, Compare comp = Compare()) - : range_(range) - , comp_(comp) - {} - SPROUT_CONSTEXPR range2_type& range() const { - return range_; - } - SPROUT_CONSTEXPR Compare compare() const { - return comp_; - } - }; - - // - // merged_forwarder - // - class merged_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::merge_holder< - typename std::remove_reference::type>::type - > - operator()(RRange&& range) const { - return sprout::adaptors::merge_holder< - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(range) - ); - } - template - SPROUT_CONSTEXPR sprout::adaptors::merge_holder< - typename std::remove_reference::type>::type, - Compare - > - operator()(RRange&& range, Compare comp) const { - return sprout::adaptors::merge_holder< - typename std::remove_reference::type>::type, - Compare - >( - sprout::lvalue_forward(range), - comp - ); - } - }; - - // - // merged - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::merged_forwarder merged = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::merged_range< - typename std::remove_reference::type>::type, - RRange, - Compare - > - operator|(LRange&& lhs, sprout::adaptors::merge_holder const& rhs) { - return sprout::adaptors::merged_range< - typename std::remove_reference::type>::type, - RRange, - Compare - >( - sprout::lvalue_forward(lhs), - rhs.range(), - rhs.compare() - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_MERGED_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/modifying.hpp b/dsp/lib/sprout/sprout/range/adaptor/modifying.hpp deleted file mode 100644 index dbb4293..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/modifying.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_MODIFYING_HPP -#define SPROUT_RANGE_ADAPTOR_MODIFYING_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_MODIFYING_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/moved.hpp b/dsp/lib/sprout/sprout/range/adaptor/moved.hpp deleted file mode 100644 index 1348d8c..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/moved.hpp +++ /dev/null @@ -1,88 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_MOVED_HPP -#define SPROUT_RANGE_ADAPTOR_MOVED_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // moved_range - // - template - class moved_range - : public sprout::adaptors::detail::adapted_range_default< - Range, - sprout::move_iterator::iterator> - > - { - public: - typedef sprout::adaptors::detail::adapted_range_default< - Range, - sprout::move_iterator::iterator> - > base_type; - typedef typename base_type::range_type range_type; - typedef typename base_type::iterator iterator; - public: - SPROUT_CONSTEXPR moved_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - moved_range(moved_range const&) = default; - explicit SPROUT_CONSTEXPR moved_range(range_type& range) - : base_type( - iterator(sprout::end(range)), - iterator(sprout::begin(range)) - ) - {} - }; - - // - // moved_forwarder - // - class moved_forwarder {}; - - // - // moved - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::moved_forwarder moved = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::moved_range< - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::moved_forwarder) { - return sprout::adaptors::moved_range< - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(lhs) - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_MOVED_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/offset.hpp b/dsp/lib/sprout/sprout/range/adaptor/offset.hpp deleted file mode 100644 index 1182288..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/offset.hpp +++ /dev/null @@ -1,132 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_OFFSET_HPP -#define SPROUT_RANGE_ADAPTOR_OFFSET_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace adaptors { - // - // offset_holder - // - template - class offset_holder { - public: - typedef typename sprout::arithmetic_promote::type difference_type; - private: - difference_type from_begin_; - difference_type from_end_; - public: - SPROUT_CONSTEXPR offset_holder(difference_type from_begin, difference_type from_end) - : from_begin_(from_begin), from_end_(from_end) - {} - SPROUT_CONSTEXPR difference_type const& from_begin() const { - return from_begin_; - } - SPROUT_CONSTEXPR difference_type const& from_end() const { - return from_end_; - } - }; - template - class offset_holder { - public: - typedef Difference difference_type; - private: - difference_type from_begin_; - public: - explicit SPROUT_CONSTEXPR offset_holder(difference_type from_begin) - : from_begin_(from_begin) - {} - SPROUT_CONSTEXPR difference_type const& from_begin() const { - return from_begin_; - } - }; - - // - // offset_forwarder - // - class offset_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::offset_holder - operator()(Difference1 from_begin, Difference2 from_end) const { - return sprout::adaptors::offset_holder(from_begin, from_end); - } - template - SPROUT_CONSTEXPR sprout::adaptors::offset_holder - operator()(Difference from_begin) const { - return sprout::adaptors::offset_holder(from_begin); - } - }; - - // - // offset - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::offset_forwarder offset = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::detail::adapted_range_default< - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::offset_holder const& rhs) { - typedef typename sprout::container_traits< - typename std::remove_reference::type>::type - >::difference_type difference_type; - return sprout::adaptors::detail::adapted_range_default< - typename std::remove_reference::type>::type - >( - sprout::next( - sprout::begin(sprout::lvalue_forward(lhs)), - NS_SSCRISK_CEL_OR_SPROUT::min(rhs.from_begin(), sprout::size(sprout::lvalue_forward(lhs))) - ), - sprout::next( - sprout::end(sprout::lvalue_forward(lhs)), - NS_SSCRISK_CEL_OR_SPROUT::max( - rhs.from_end(), - NS_SSCRISK_CEL_OR_SPROUT::min(rhs.from_begin() - sprout::size(sprout::lvalue_forward(lhs)), 0) - ) - ) - ); - } - template - inline SPROUT_CONSTEXPR sprout::adaptors::detail::adapted_range_default< - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::offset_holder const& rhs) { - typedef typename sprout::container_traits< - typename std::remove_reference::type>::type - >::difference_type difference_type; - return sprout::adaptors::detail::adapted_range_default< - typename std::remove_reference::type>::type - >( - sprout::next( - sprout::begin(sprout::lvalue_forward(lhs)), - NS_SSCRISK_CEL_OR_SPROUT::min(rhs.from_begin(), sprout::size(sprout::lvalue_forward(lhs))) - ), - sprout::end(sprout::lvalue_forward(lhs)) - ); - } - } // namespace adaptors -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_OFFSET_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/outdirected.hpp b/dsp/lib/sprout/sprout/range/adaptor/outdirected.hpp deleted file mode 100644 index 579be36..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/outdirected.hpp +++ /dev/null @@ -1,88 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_OUTDIRECTED_HPP -#define SPROUT_RANGE_ADAPTOR_OUTDIRECTED_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // outdirected_range - // - template - class outdirected_range - : public sprout::adaptors::detail::adapted_range_default< - Range, - sprout::counting_iterator::iterator> - > - { - public: - typedef sprout::adaptors::detail::adapted_range_default< - Range, - sprout::counting_iterator::iterator> - > base_type; - typedef typename base_type::range_type range_type; - typedef typename base_type::iterator iterator; - public: - SPROUT_CONSTEXPR outdirected_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - outdirected_range(outdirected_range const&) = default; - explicit SPROUT_CONSTEXPR outdirected_range(range_type& range) - : base_type( - iterator(sprout::begin(range)), - iterator(sprout::end(range)) - ) - {} - }; - - // - // outdirected_forwarder - // - class outdirected_forwarder {}; - - // - // outdirected - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::outdirected_forwarder outdirected = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::outdirected_range< - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::outdirected_forwarder const&) { - return sprout::adaptors::outdirected_range< - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(lhs) - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_OUTDIRECTED_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/phase_spectrum.hpp b/dsp/lib/sprout/sprout/range/adaptor/phase_spectrum.hpp deleted file mode 100644 index 0d56005..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/phase_spectrum.hpp +++ /dev/null @@ -1,97 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_PHASE_SPECTRUM_HPP -#define SPROUT_RANGE_ADAPTOR_PHASE_SPECTRUM_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // phase_spectrum_range - // - template - class phase_spectrum_range - : public sprout::adaptors::detail::adapted_range_default< - Range, - sprout::transform_iterator< - sprout::phase_value::value_type>, - typename sprout::container_traits::iterator - > - > - { - public: - typedef sprout::adaptors::detail::adapted_range_default< - Range, - sprout::transform_iterator< - sprout::phase_value::value_type>, - typename sprout::container_traits::iterator - > - > base_type; - typedef typename base_type::range_type range_type; - typedef typename base_type::iterator iterator; - typedef typename base_type::value_type value_type; - public: - SPROUT_CONSTEXPR phase_spectrum_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - phase_spectrum_range(phase_spectrum_range const&) = default; - explicit SPROUT_CONSTEXPR phase_spectrum_range(range_type& range) - : base_type( - iterator(sprout::begin(range), typename iterator::functor_type()), - iterator(sprout::end(range), typename iterator::functor_type()) - ) - {} - }; - - // - // phase_spectrum_forwarder - // - class phase_spectrum_forwarder {}; - - // - // phase_spectrum - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::phase_spectrum_forwarder phase_spectrum = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::phase_spectrum_range< - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, phase_spectrum_forwarder) { - return sprout::adaptors::phase_spectrum_range< - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(lhs) - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_PHASE_SPECTRUM_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/piped.hpp b/dsp/lib/sprout/sprout/range/adaptor/piped.hpp deleted file mode 100644 index 12f6c30..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/piped.hpp +++ /dev/null @@ -1,138 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_PIPED_HPP -#define SPROUT_RANGE_ADAPTOR_PIPED_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - namespace detail { - template - inline SPROUT_CONSTEXPR auto - apply_adaptors_impl(Range&& range) - -> decltype(SPROUT_FORWARD(Range, range)) - { - return SPROUT_FORWARD(Range, range); - } - template - inline SPROUT_CONSTEXPR auto - apply_adaptors_impl(Range&& range, Adaptor const& adaptor) - -> decltype(SPROUT_FORWARD(Range, range) | adaptor) - { - return SPROUT_FORWARD(Range, range) | adaptor; - } - template - inline SPROUT_CONSTEXPR auto - apply_adaptors_impl(Range&& range, Adaptor const& adaptor, Tail const&... tail) - -> decltype(sprout::adaptors::detail::apply_adaptors_impl(SPROUT_FORWARD(Range, range) | adaptor, tail...)) - { - return sprout::adaptors::detail::apply_adaptors_impl(SPROUT_FORWARD(Range, range) | adaptor, tail...); - } - } // namespace detail - // - // apply_adaptors - // - template - SPROUT_CONSTEXPR auto - apply_adaptors(Range&& range, Adaptors const&... adaptors) - -> decltype(sprout::adaptors::detail::apply_adaptors_impl(SPROUT_FORWARD(Range, range), adaptors...)) - { - return sprout::adaptors::detail::apply_adaptors_impl(SPROUT_FORWARD(Range, range), adaptors...); - } - - namespace detail { - template - SPROUT_CONSTEXPR auto - apply_adaptors_tuple_impl(Range&& range, AdaptorsTuple const& adaptors, sprout::index_tuple) - -> decltype(sprout::adaptors::apply_adaptors(SPROUT_FORWARD(Range, range), sprout::tuples::get(adaptors)...)) - { - return sprout::adaptors::apply_adaptors(SPROUT_FORWARD(Range, range), sprout::tuples::get(adaptors)...); - } - template - SPROUT_CONSTEXPR auto - apply_adaptors_tuple(Range&& range, AdaptorsTuple const& adaptors) - -> decltype( - sprout::adaptors::detail::apply_adaptors_tuple_impl( - SPROUT_FORWARD(Range, range), adaptors, - sprout::make_index_tuple::value>::make() - ) - ) - { - return sprout::adaptors::detail::apply_adaptors_tuple_impl( - SPROUT_FORWARD(Range, range), adaptors, - sprout::make_index_tuple::value>::make() - ); - } - } // namespace detail - - // - // pipe_holder - // - template - class pipe_holder { - public: - typedef sprout::tuples::tuple adaptors_type; - private: - adaptors_type adaptors_; - public: - explicit SPROUT_CONSTEXPR pipe_holder(Adaptors const&... adaptors) - : adaptors_(adaptors...) - {} - SPROUT_CONSTEXPR adaptors_type const& adaptors() const { - return adaptors_; - } - template - SPROUT_CONSTEXPR auto - apply(Range&& range) const - -> decltype(sprout::adaptors::detail::apply_adaptors_tuple(SPROUT_FORWARD(Range, range), std::declval().adaptors())) - { - return sprout::adaptors::detail::apply_adaptors_tuple(SPROUT_FORWARD(Range, range), adaptors()); - } - }; - - // - // piped_forwarder - // - class piped_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::pipe_holder - operator()(Adaptors const&... adaptors) const { - return sprout::adaptors::pipe_holder(adaptors...); - } - }; - - // - // piped - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::piped_forwarder piped = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR auto - operator|(Range&& lhs, sprout::adaptors::pipe_holder const& rhs) - -> decltype(rhs.apply(sprout::lvalue_forward(lhs))) - { - return rhs.apply(sprout::lvalue_forward(lhs)); - } - } // namespace adaptors -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_PIPED_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/reduction.hpp b/dsp/lib/sprout/sprout/range/adaptor/reduction.hpp deleted file mode 100644 index eff0913..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/reduction.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_REDUCTION_HPP -#define SPROUT_RANGE_ADAPTOR_REDUCTION_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_REDUCTION_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/removed.hpp b/dsp/lib/sprout/sprout/range/adaptor/removed.hpp deleted file mode 100644 index 2727bc0..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/removed.hpp +++ /dev/null @@ -1,122 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_REMOVED_HPP -#define SPROUT_RANGE_ADAPTOR_REMOVED_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // removed_range - // - template - class removed_range - : public sprout::adaptors::detail::adapted_range_default< - Range, - sprout::filter_iterator< - sprout::remove_filter::value_type>, - typename sprout::container_traits::iterator - > - > - { - public: - typedef sprout::adaptors::detail::adapted_range_default< - Range, - sprout::filter_iterator< - sprout::remove_filter::value_type>, - typename sprout::container_traits::iterator - > - > base_type; - typedef typename base_type::range_type range_type; - typedef typename base_type::iterator iterator; - typedef typename base_type::value_type value_type; - public: - SPROUT_CONSTEXPR removed_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - removed_range(removed_range const&) = default; - SPROUT_CONSTEXPR removed_range(range_type& range, value_type const& value) - : base_type( - iterator(sprout::begin(range), typename iterator::predicate_type(value)), - iterator(sprout::end(range), typename iterator::predicate_type(value)) - ) - {} - }; - - // - // remove_holder - // - template - class remove_holder { - public: - typedef T value_type; - private: - value_type value_; - public: - explicit SPROUT_CONSTEXPR remove_holder(value_type const& value) - : value_(value) - {} - SPROUT_CONSTEXPR value_type const& value() const { - return value_; - } - }; - - // - // removed_forwarder - // - class removed_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::remove_holder - operator()(T const& value) const { - return sprout::adaptors::remove_holder(value); - } - }; - - // - // removed - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::removed_forwarder removed = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::removed_range< - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::remove_holder const& rhs) { - return sprout::adaptors::removed_range< - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(lhs), - rhs.value() - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_REMOVED_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/removed_if.hpp b/dsp/lib/sprout/sprout/range/adaptor/removed_if.hpp deleted file mode 100644 index a1c38ae..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/removed_if.hpp +++ /dev/null @@ -1,124 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_REMOVED_IF_HPP -#define SPROUT_RANGE_ADAPTOR_REMOVED_IF_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // removed_if_range - // - template - class removed_if_range - : public sprout::adaptors::detail::adapted_range_default< - Range, - sprout::filter_iterator< - sprout::remove_if_filter, - typename sprout::container_traits::iterator - > - > - { - public: - typedef Predicate predicate_type; - typedef sprout::adaptors::detail::adapted_range_default< - Range, - sprout::filter_iterator< - sprout::remove_if_filter, - typename sprout::container_traits::iterator - > - > base_type; - typedef typename base_type::range_type range_type; - typedef typename base_type::iterator iterator; - public: - SPROUT_CONSTEXPR removed_if_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - removed_if_range(removed_if_range const&) = default; - SPROUT_CONSTEXPR removed_if_range(range_type& range, Predicate pred) - : base_type( - iterator(sprout::begin(range), typename iterator::predicate_type(pred)), - iterator(sprout::end(range), typename iterator::predicate_type(pred)) - ) - {} - }; - - // - // remove_if_holder - // - template - class remove_if_holder { - public: - typedef Predicate predicate_type; - private: - Predicate pred_; - public: - explicit SPROUT_CONSTEXPR remove_if_holder(Predicate pred) - : pred_(pred) - {} - SPROUT_CONSTEXPR Predicate const& predicate() const { - return pred_; - } - }; - - // - // removed_if_forwarder - // - class removed_if_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::remove_if_holder - operator()(Predicate pred) const { - return sprout::adaptors::remove_if_holder(pred); - } - }; - - // - // removed_if - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::removed_if_forwarder removed_if = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::removed_if_range< - Predicate, - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::remove_if_holder const& rhs) { - return sprout::adaptors::removed_if_range< - Predicate, - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(lhs), - rhs.predicate() - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_REMOVED_IF_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/replaced.hpp b/dsp/lib/sprout/sprout/range/adaptor/replaced.hpp deleted file mode 100644 index 86429bf..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/replaced.hpp +++ /dev/null @@ -1,128 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_REPLACED_HPP -#define SPROUT_RANGE_ADAPTOR_REPLACED_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // replaced_range - // - template - class replaced_range - : public sprout::adaptors::detail::adapted_range_default< - Range, - sprout::transform_iterator< - sprout::replace_value::value_type>, - typename sprout::container_traits::iterator - > - > - { - public: - typedef sprout::adaptors::detail::adapted_range_default< - Range, - sprout::transform_iterator< - sprout::replace_value::value_type>, - typename sprout::container_traits::iterator - > - > base_type; - typedef typename base_type::range_type range_type; - typedef typename base_type::iterator iterator; - typedef typename base_type::value_type value_type; - public: - SPROUT_CONSTEXPR replaced_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - replaced_range(replaced_range const&) = default; - SPROUT_CONSTEXPR replaced_range(range_type& range, value_type const& old_value, value_type const& new_value) - : base_type( - iterator(sprout::begin(range), typename iterator::functor_type(old_value, new_value)), - iterator(sprout::end(range), typename iterator::functor_type(old_value, new_value)) - ) - {} - }; - - // - // replace_holder - // - template - class replace_holder { - public: - typedef T value_type; - private: - value_type old_; - value_type new_; - public: - SPROUT_CONSTEXPR replace_holder(value_type const& old_value, value_type const& new_value) - : old_(old_value) - , new_(new_value) - {} - SPROUT_CONSTEXPR value_type const& old_value() const { - return old_; - } - SPROUT_CONSTEXPR value_type const& new_value() const { - return new_; - } - }; - - // - // replaced_forwarder - // - class replaced_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::replace_holder - operator()(T const& old_value, T const& new_value) const { - return sprout::adaptors::replace_holder(old_value, new_value); - } - }; - - // - // replaced - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::replaced_forwarder replaced = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::replaced_range< - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::replace_holder const& rhs) { - return sprout::adaptors::replaced_range< - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(lhs), - rhs.old_value(), - rhs.new_value() - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_REPLACED_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/replaced_if.hpp b/dsp/lib/sprout/sprout/range/adaptor/replaced_if.hpp deleted file mode 100644 index 7d9dc46..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/replaced_if.hpp +++ /dev/null @@ -1,132 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_REPLACED_IF_HPP -#define SPROUT_RANGE_ADAPTOR_REPLACED_IF_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // replaced_if_range - // - template - class replaced_if_range - : public sprout::adaptors::detail::adapted_range_default< - Range, - sprout::transform_iterator< - sprout::replace_value_if::value_type>, - typename sprout::container_traits::iterator - > - > - { - public: - typedef Predicate predicate_type; - typedef sprout::adaptors::detail::adapted_range_default< - Range, - sprout::transform_iterator< - sprout::replace_value_if::value_type>, - typename sprout::container_traits::iterator - > - > base_type; - typedef typename base_type::range_type range_type; - typedef typename base_type::iterator iterator; - typedef typename base_type::value_type value_type; - public: - SPROUT_CONSTEXPR replaced_if_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - replaced_if_range(replaced_if_range const&) = default; - SPROUT_CONSTEXPR replaced_if_range(range_type& range, Predicate pred, value_type const& new_value) - : base_type( - iterator(sprout::begin(range), typename iterator::functor_type(pred, new_value)), - iterator(sprout::end(range), typename iterator::functor_type(pred, new_value)) - ) - {} - }; - - // - // replace_if_holder - // - template - class replace_if_holder { - public: - typedef Predicate predicate_type; - typedef T value_type; - private: - Predicate pred_; - value_type new_; - public: - SPROUT_CONSTEXPR replace_if_holder(Predicate pred, value_type const& new_value) - : pred_(pred) - , new_(new_value) - {} - SPROUT_CONSTEXPR Predicate const& predicate() const { - return pred_; - } - SPROUT_CONSTEXPR value_type const& new_value() const { - return new_; - } - }; - - // - // replaced_if_forwarder - // - class replaced_if_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::replace_if_holder - operator()(Predicate pred, T const& new_value) const { - return sprout::adaptors::replace_if_holder(pred, new_value); - } - }; - - // - // replaced_if - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::replaced_if_forwarder replaced_if = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::replaced_if_range< - Predicate, - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::replace_if_holder const& rhs) { - return sprout::adaptors::replaced_if_range< - Predicate, - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(lhs), - rhs.predicate(), - rhs.new_value() - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_REPLACED_IF_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/reversed.hpp b/dsp/lib/sprout/sprout/range/adaptor/reversed.hpp deleted file mode 100644 index 3377c4f..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/reversed.hpp +++ /dev/null @@ -1,88 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_REVERSED_HPP -#define SPROUT_RANGE_ADAPTOR_REVERSED_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // reversed_range - // - template - class reversed_range - : public sprout::adaptors::detail::adapted_range_default< - Range, - sprout::reverse_iterator::iterator> - > - { - public: - typedef sprout::adaptors::detail::adapted_range_default< - Range, - sprout::reverse_iterator::iterator> - > base_type; - typedef typename base_type::range_type range_type; - typedef typename base_type::iterator iterator; - public: - SPROUT_CONSTEXPR reversed_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - reversed_range(reversed_range const&) = default; - explicit SPROUT_CONSTEXPR reversed_range(range_type& range) - : base_type( - iterator(sprout::end(range)), - iterator(sprout::begin(range)) - ) - {} - }; - - // - // reversed_forwarder - // - class reversed_forwarder {}; - - // - // reversed - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::reversed_forwarder reversed = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::reversed_range< - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::reversed_forwarder) { - return sprout::adaptors::reversed_range< - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(lhs) - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_REVERSED_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/sawtooth_wave.hpp b/dsp/lib/sprout/sprout/range/adaptor/sawtooth_wave.hpp deleted file mode 100644 index 9d9e457..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/sawtooth_wave.hpp +++ /dev/null @@ -1,159 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_SAWTOOTH_WAVE_HPP -#define SPROUT_RANGE_ADAPTOR_SAWTOOTH_WAVE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // sawtooth_wave_range - // - template - class sawtooth_wave_range - : public sprout::adaptors::detail::adapted_range_default< - Range, - sprout::sawtooth_iterator - > - { - public: - typedef sprout::adaptors::detail::adapted_range_default< - Range, - sprout::sawtooth_iterator - > base_type; - typedef typename base_type::range_type range_type; - typedef typename base_type::iterator iterator; - typedef typename base_type::value_type value_type; - public: - SPROUT_CONSTEXPR sawtooth_wave_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - sawtooth_wave_range(sawtooth_wave_range const&) = default; - explicit SPROUT_CONSTEXPR sawtooth_wave_range( - range_type& range, - value_type const& frequency = 1, - value_type const& amplitude = 1, - value_type const& phase = 0 - ) - : base_type( - iterator(0, frequency, amplitude, phase), - iterator(sprout::size(range), frequency, amplitude, phase) - ) - {} - SPROUT_CONSTEXPR value_type frequency() const { - return base_type::begin().frequency(); - } - SPROUT_CONSTEXPR value_type amplitude() const { - return base_type::begin().amplitude(); - } - SPROUT_CONSTEXPR value_type phase() const { - return base_type::begin().phase(); - } - }; - - template - class sawtooth_wave_range - : public sprout::range::range_container< - sprout::sawtooth_iterator - > - { - public: - typedef sprout::range::range_container< - sprout::sawtooth_iterator - > base_type; - typedef typename base_type::iterator iterator; - typedef typename base_type::value_type value_type; - typedef typename base_type::difference_type difference_type; - public: - SPROUT_CONSTEXPR sawtooth_wave_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - sawtooth_wave_range(sawtooth_wave_range const&) = default; - explicit SPROUT_CONSTEXPR sawtooth_wave_range( - value_type const& frequency = 1, - value_type const& amplitude = 1, - value_type const& phase = 0 - ) - : base_type( - iterator(0, frequency, amplitude, phase), - iterator(sprout::numeric_limits::max(), frequency, amplitude, phase) - ) - {} - SPROUT_CONSTEXPR value_type const& frequency() const { - return base_type::begin().frequency(); - } - SPROUT_CONSTEXPR value_type const& amplitude() const { - return base_type::begin().amplitude(); - } - SPROUT_CONSTEXPR value_type const& phase() const { - return base_type::begin().phase(); - } - }; - - // - // sawtooth_wave_forwarder - // - class sawtooth_wave_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::sawtooth_wave_range - operator()( - Value const& frequency = 1, - Value const& amplitude = 1, - Value const& phase = 0 - ) const - { - return sprout::adaptors::sawtooth_wave_range(frequency, amplitude, phase); - } - }; - - // - // sawtooth_wave - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::sawtooth_wave_forwarder sawtooth_wave = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::sawtooth_wave_range< - Value, - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::sawtooth_wave_range const& rhs) { - return sprout::adaptors::sawtooth_wave_range< - Value, - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(lhs), - rhs.frequency(), - rhs.amplitude(), - rhs.phase() - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_SAWTOOTH_WAVE_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/set_difference.hpp b/dsp/lib/sprout/sprout/range/adaptor/set_difference.hpp deleted file mode 100644 index d279e40..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/set_difference.hpp +++ /dev/null @@ -1,158 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_SET_DIFFERENCE_HPP -#define SPROUT_RANGE_ADAPTOR_SET_DIFFERENCE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // set_difference_range - // - template > - class set_difference_range - : public sprout::adaptors::detail::jointed_range_default< - LRange, RRange, - sprout::set_difference_iterator< - typename sprout::container_traits::iterator, - typename sprout::container_traits::iterator, - Compare - > - > - { - public: - typedef sprout::adaptors::detail::jointed_range_default< - LRange, RRange, - sprout::set_difference_iterator< - typename sprout::container_traits::iterator, - typename sprout::container_traits::iterator, - Compare - > - > base_type; - typedef typename base_type::range1_type range1_type; - typedef typename base_type::range2_type range2_type; - typedef typename base_type::iterator iterator; - public: - SPROUT_CONSTEXPR set_difference_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - set_difference_range(set_difference_range const&) = default; - SPROUT_CONSTEXPR set_difference_range(range1_type& range1, range2_type& range2, Compare comp = Compare()) - : base_type( - iterator(sprout::begin(range1), sprout::end(range1), sprout::begin(range2), sprout::end(range2), comp), - iterator(sprout::end(range1), sprout::end(range1), sprout::end(range2), sprout::end(range2), comp) - ) - {} - }; - - // - // set_difference_holder - // - template > - class set_difference_holder { - public: - typedef RRange range2_type; - typedef Compare compare_type; - private: - sprout::value_holder range_; - Compare comp_; - public: - SPROUT_CONSTEXPR set_difference_holder() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - set_difference_holder(set_difference_holder const&) = default; - explicit SPROUT_CONSTEXPR set_difference_holder(range2_type& range, Compare comp = Compare()) - : range_(range) - , comp_(comp) - {} - SPROUT_CONSTEXPR range2_type& range() const { - return range_; - } - SPROUT_CONSTEXPR Compare compare() const { - return comp_; - } - }; - - // - // set_difference_forwarder - // - class set_difference_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::set_difference_holder< - typename std::remove_reference::type>::type - > - operator()(RRange&& range) const { - return sprout::adaptors::set_difference_holder< - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(range) - ); - } - template - SPROUT_CONSTEXPR sprout::adaptors::set_difference_holder< - typename std::remove_reference::type>::type, - Compare - > - operator()(RRange&& range, Compare comp) const { - return sprout::adaptors::set_difference_holder< - typename std::remove_reference::type>::type, - Compare - >( - sprout::lvalue_forward(range), - comp - ); - } - }; - - // - // set_difference - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::set_difference_forwarder set_difference = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::set_difference_range< - typename std::remove_reference::type>::type, - RRange, - Compare - > - operator|(LRange&& lhs, sprout::adaptors::set_difference_holder const& rhs) { - return sprout::adaptors::set_difference_range< - typename std::remove_reference::type>::type, - RRange, - Compare - >( - sprout::lvalue_forward(lhs), - rhs.range(), - rhs.compare() - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_SET_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/set_intersection.hpp b/dsp/lib/sprout/sprout/range/adaptor/set_intersection.hpp deleted file mode 100644 index c98d0ee..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/set_intersection.hpp +++ /dev/null @@ -1,158 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_SET_INTERSECTION_HPP -#define SPROUT_RANGE_ADAPTOR_SET_INTERSECTION_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // set_intersection_range - // - template > - class set_intersection_range - : public sprout::adaptors::detail::jointed_range_default< - LRange, RRange, - sprout::set_intersection_iterator< - typename sprout::container_traits::iterator, - typename sprout::container_traits::iterator, - Compare - > - > - { - public: - typedef sprout::adaptors::detail::jointed_range_default< - LRange, RRange, - sprout::set_intersection_iterator< - typename sprout::container_traits::iterator, - typename sprout::container_traits::iterator, - Compare - > - > base_type; - typedef typename base_type::range1_type range1_type; - typedef typename base_type::range2_type range2_type; - typedef typename base_type::iterator iterator; - public: - SPROUT_CONSTEXPR set_intersection_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - set_intersection_range(set_intersection_range const&) = default; - SPROUT_CONSTEXPR set_intersection_range(range1_type& range1, range2_type& range2, Compare comp = Compare()) - : base_type( - iterator(sprout::begin(range1), sprout::end(range1), sprout::begin(range2), sprout::end(range2), comp), - iterator(sprout::end(range1), sprout::end(range1), sprout::end(range2), sprout::end(range2), comp) - ) - {} - }; - - // - // set_intersection_holder - // - template > - class set_intersection_holder { - public: - typedef RRange range2_type; - typedef Compare compare_type; - private: - sprout::value_holder range_; - Compare comp_; - public: - SPROUT_CONSTEXPR set_intersection_holder() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - set_intersection_holder(set_intersection_holder const&) = default; - explicit SPROUT_CONSTEXPR set_intersection_holder(range2_type& range, Compare comp = Compare()) - : range_(range) - , comp_(comp) - {} - SPROUT_CONSTEXPR range2_type& range() const { - return range_; - } - SPROUT_CONSTEXPR Compare compare() const { - return comp_; - } - }; - - // - // set_intersection_forwarder - // - class set_intersection_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::set_intersection_holder< - typename std::remove_reference::type>::type - > - operator()(RRange&& range) const { - return sprout::adaptors::set_intersection_holder< - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(range) - ); - } - template - SPROUT_CONSTEXPR sprout::adaptors::set_intersection_holder< - typename std::remove_reference::type>::type, - Compare - > - operator()(RRange&& range, Compare comp) const { - return sprout::adaptors::set_intersection_holder< - typename std::remove_reference::type>::type, - Compare - >( - sprout::lvalue_forward(range), - comp - ); - } - }; - - // - // set_intersection - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::set_intersection_forwarder set_intersection = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::set_intersection_range< - typename std::remove_reference::type>::type, - RRange, - Compare - > - operator|(LRange&& lhs, sprout::adaptors::set_intersection_holder const& rhs) { - return sprout::adaptors::set_intersection_range< - typename std::remove_reference::type>::type, - RRange, - Compare - >( - sprout::lvalue_forward(lhs), - rhs.range(), - rhs.compare() - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_SET_INTERSECTION_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/set_symmetric_difference.hpp b/dsp/lib/sprout/sprout/range/adaptor/set_symmetric_difference.hpp deleted file mode 100644 index 4a8bc72..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/set_symmetric_difference.hpp +++ /dev/null @@ -1,158 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_SET_SYMMETRIC_DIFFERENCE_HPP -#define SPROUT_RANGE_ADAPTOR_SET_SYMMETRIC_DIFFERENCE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // set_symmetric_difference_range - // - template > - class set_symmetric_difference_range - : public sprout::adaptors::detail::jointed_range_default< - LRange, RRange, - sprout::set_symmetric_difference_iterator< - typename sprout::container_traits::iterator, - typename sprout::container_traits::iterator, - Compare - > - > - { - public: - typedef sprout::adaptors::detail::jointed_range_default< - LRange, RRange, - sprout::set_symmetric_difference_iterator< - typename sprout::container_traits::iterator, - typename sprout::container_traits::iterator, - Compare - > - > base_type; - typedef typename base_type::range1_type range1_type; - typedef typename base_type::range2_type range2_type; - typedef typename base_type::iterator iterator; - public: - SPROUT_CONSTEXPR set_symmetric_difference_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - set_symmetric_difference_range(set_symmetric_difference_range const&) = default; - SPROUT_CONSTEXPR set_symmetric_difference_range(range1_type& range1, range2_type& range2, Compare comp = Compare()) - : base_type( - iterator(sprout::begin(range1), sprout::end(range1), sprout::begin(range2), sprout::end(range2), comp), - iterator(sprout::end(range1), sprout::end(range1), sprout::end(range2), sprout::end(range2), comp) - ) - {} - }; - - // - // set_symmetric_difference_holder - // - template > - class set_symmetric_difference_holder { - public: - typedef RRange range2_type; - typedef Compare compare_type; - private: - sprout::value_holder range_; - Compare comp_; - public: - SPROUT_CONSTEXPR set_symmetric_difference_holder() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - set_symmetric_difference_holder(set_symmetric_difference_holder const&) = default; - explicit SPROUT_CONSTEXPR set_symmetric_difference_holder(range2_type& range, Compare comp = Compare()) - : range_(range) - , comp_(comp) - {} - SPROUT_CONSTEXPR range2_type& range() const { - return range_; - } - SPROUT_CONSTEXPR Compare compare() const { - return comp_; - } - }; - - // - // set_symmetric_difference_forwarder - // - class set_symmetric_difference_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::set_symmetric_difference_holder< - typename std::remove_reference::type>::type - > - operator()(RRange&& range) const { - return sprout::adaptors::set_symmetric_difference_holder< - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(range) - ); - } - template - SPROUT_CONSTEXPR sprout::adaptors::set_symmetric_difference_holder< - typename std::remove_reference::type>::type, - Compare - > - operator()(RRange&& range, Compare comp) const { - return sprout::adaptors::set_symmetric_difference_holder< - typename std::remove_reference::type>::type, - Compare - >( - sprout::lvalue_forward(range), - comp - ); - } - }; - - // - // set_symmetric_difference - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::set_symmetric_difference_forwarder set_symmetric_difference = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::set_symmetric_difference_range< - typename std::remove_reference::type>::type, - RRange, - Compare - > - operator|(LRange&& lhs, sprout::adaptors::set_symmetric_difference_holder const& rhs) { - return sprout::adaptors::set_symmetric_difference_range< - typename std::remove_reference::type>::type, - RRange, - Compare - >( - sprout::lvalue_forward(lhs), - rhs.range(), - rhs.compare() - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_SET_SYMMETRIC_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/set_union.hpp b/dsp/lib/sprout/sprout/range/adaptor/set_union.hpp deleted file mode 100644 index 5e0ddd6..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/set_union.hpp +++ /dev/null @@ -1,158 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_SET_UNION_HPP -#define SPROUT_RANGE_ADAPTOR_SET_UNION_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // set_union_range - // - template > - class set_union_range - : public sprout::adaptors::detail::jointed_range_default< - LRange, RRange, - sprout::set_union_iterator< - typename sprout::container_traits::iterator, - typename sprout::container_traits::iterator, - Compare - > - > - { - public: - typedef sprout::adaptors::detail::jointed_range_default< - LRange, RRange, - sprout::set_union_iterator< - typename sprout::container_traits::iterator, - typename sprout::container_traits::iterator, - Compare - > - > base_type; - typedef typename base_type::range1_type range1_type; - typedef typename base_type::range2_type range2_type; - typedef typename base_type::iterator iterator; - public: - SPROUT_CONSTEXPR set_union_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - set_union_range(set_union_range const&) = default; - SPROUT_CONSTEXPR set_union_range(range1_type& range1, range2_type& range2, Compare comp = Compare()) - : base_type( - iterator(sprout::begin(range1), sprout::end(range1), sprout::begin(range2), sprout::end(range2), comp), - iterator(sprout::end(range1), sprout::end(range1), sprout::end(range2), sprout::end(range2), comp) - ) - {} - }; - - // - // set_union_holder - // - template > - class set_union_holder { - public: - typedef RRange range2_type; - typedef Compare compare_type; - private: - sprout::value_holder range_; - Compare comp_; - public: - SPROUT_CONSTEXPR set_union_holder() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - set_union_holder(set_union_holder const&) = default; - explicit SPROUT_CONSTEXPR set_union_holder(range2_type& range, Compare comp = Compare()) - : range_(range) - , comp_(comp) - {} - SPROUT_CONSTEXPR range2_type& range() const { - return range_; - } - SPROUT_CONSTEXPR Compare compare() const { - return comp_; - } - }; - - // - // set_union_forwarder - // - class set_union_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::set_union_holder< - typename std::remove_reference::type>::type - > - operator()(RRange&& range) const { - return sprout::adaptors::set_union_holder< - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(range) - ); - } - template - SPROUT_CONSTEXPR sprout::adaptors::set_union_holder< - typename std::remove_reference::type>::type, - Compare - > - operator()(RRange&& range, Compare comp) const { - return sprout::adaptors::set_union_holder< - typename std::remove_reference::type>::type, - Compare - >( - sprout::lvalue_forward(range), - comp - ); - } - }; - - // - // set_union - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::set_union_forwarder set_union = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::set_union_range< - typename std::remove_reference::type>::type, - RRange, - Compare - > - operator|(LRange&& lhs, sprout::adaptors::set_union_holder const& rhs) { - return sprout::adaptors::set_union_range< - typename std::remove_reference::type>::type, - RRange, - Compare - >( - sprout::lvalue_forward(lhs), - rhs.range(), - rhs.compare() - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_SET_UNION_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/sinusoidal.hpp b/dsp/lib/sprout/sprout/range/adaptor/sinusoidal.hpp deleted file mode 100644 index 90cefbe..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/sinusoidal.hpp +++ /dev/null @@ -1,159 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_SINUSOIDAL_HPP -#define SPROUT_RANGE_ADAPTOR_SINUSOIDAL_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // sinusoidal_range - // - template - class sinusoidal_range - : public sprout::adaptors::detail::adapted_range_default< - Range, - sprout::sinusoid_iterator - > - { - public: - typedef sprout::adaptors::detail::adapted_range_default< - Range, - sprout::sinusoid_iterator - > base_type; - typedef typename base_type::range_type range_type; - typedef typename base_type::iterator iterator; - typedef typename base_type::value_type value_type; - public: - SPROUT_CONSTEXPR sinusoidal_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - sinusoidal_range(sinusoidal_range const&) = default; - explicit SPROUT_CONSTEXPR sinusoidal_range( - range_type& range, - value_type const& frequency = 1, - value_type const& amplitude = 1, - value_type const& phase = 0 - ) - : base_type( - iterator(0, frequency, amplitude, phase), - iterator(sprout::size(range), frequency, amplitude, phase) - ) - {} - SPROUT_CONSTEXPR value_type frequency() const { - return base_type::begin().frequency(); - } - SPROUT_CONSTEXPR value_type amplitude() const { - return base_type::begin().amplitude(); - } - SPROUT_CONSTEXPR value_type phase() const { - return base_type::begin().phase(); - } - }; - - template - class sinusoidal_range - : public sprout::range::range_container< - sprout::sinusoid_iterator - > - { - public: - typedef sprout::range::range_container< - sprout::sinusoid_iterator - > base_type; - typedef typename base_type::iterator iterator; - typedef typename base_type::value_type value_type; - typedef typename base_type::difference_type difference_type; - public: - SPROUT_CONSTEXPR sinusoidal_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - sinusoidal_range(sinusoidal_range const&) = default; - explicit SPROUT_CONSTEXPR sinusoidal_range( - value_type const& frequency = 1, - value_type const& amplitude = 1, - value_type const& phase = 0 - ) - : base_type( - iterator(0, frequency, amplitude, phase), - iterator(sprout::numeric_limits::max(), frequency, amplitude, phase) - ) - {} - SPROUT_CONSTEXPR value_type frequency() const { - return base_type::begin().frequency(); - } - SPROUT_CONSTEXPR value_type amplitude() const { - return base_type::begin().amplitude(); - } - SPROUT_CONSTEXPR value_type phase() const { - return base_type::begin().phase(); - } - }; - - // - // sinusoidal_forwarder - // - class sinusoidal_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::sinusoidal_range - operator()( - Value const& frequency = 1, - Value const& amplitude = 1, - Value const& phase = 0 - ) const - { - return sprout::adaptors::sinusoidal_range(frequency, amplitude, phase); - } - }; - - // - // sinusoidal - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::sinusoidal_forwarder sinusoidal = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::sinusoidal_range< - Value, - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::sinusoidal_range const& rhs) { - return sprout::adaptors::sinusoidal_range< - Value, - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(lhs), - rhs.frequency(), - rhs.amplitude(), - rhs.phase() - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_SINUSOIDAL_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/size_enumed.hpp b/dsp/lib/sprout/sprout/range/adaptor/size_enumed.hpp deleted file mode 100644 index 3fb3fcf..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/size_enumed.hpp +++ /dev/null @@ -1,177 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_SIZE_ENUMED_HPP -#define SPROUT_RANGE_ADAPTOR_SIZE_ENUMED_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // size_enumed_range - // - template - class size_enumed_range - : public sprout::adaptors::detail::adapted_range_default< - Range, - sprout::size_enum_iterator< - typename sprout::container_traits::iterator - > - > - { - public: - typedef sprout::adaptors::detail::adapted_range_default< - Range, - sprout::size_enum_iterator< - typename sprout::container_traits::iterator - > - > base_type; - typedef typename base_type::range_type range_type; - typedef typename base_type::iterator iterator; - public: - SPROUT_CONSTEXPR size_enumed_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - size_enumed_range(size_enumed_range const&) = default; - explicit SPROUT_CONSTEXPR size_enumed_range(range_type& range) - : base_type( - iterator(sprout::begin(range)), - iterator(sprout::end(range)) - ) - {} - }; - - template - class size_enumed_range - : public sprout::adaptors::detail::adapted_range_default< - Range, - sprout::size_enum_iterator< - typename sprout::container_traits::iterator, true - > - > - { - public: - typedef sprout::adaptors::detail::adapted_range_default< - Range, - sprout::size_enum_iterator< - typename sprout::container_traits::iterator, true - > - > base_type; - typedef typename base_type::range_type range_type; - typedef typename base_type::iterator iterator; - typedef typename base_type::value_type value_type; - public: - SPROUT_CONSTEXPR size_enumed_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - size_enumed_range(size_enumed_range const&) = default; - explicit SPROUT_CONSTEXPR size_enumed_range( - range_type& range, - value_type sep_size = 0, - bool omit_last = false - ) - : base_type( - iterator(sprout::begin(range), sep_size), - omit_last - ? sprout::empty(range) - ? iterator(sprout::end(range), sep_size) - : iterator(sprout::prev(sprout::end(range)), sep_size, true) - : iterator(sprout::end(range), sep_size) - ) - {} - }; - - // - // size_enum_holder - // - template - class size_enum_holder { - public: - typedef Size size_type; - private: - size_type sep_size_; - bool omit_last_; - public: - SPROUT_CONSTEXPR size_enum_holder() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - size_enum_holder(size_enum_holder const&) = default; - explicit SPROUT_CONSTEXPR size_enum_holder(size_type size, bool omit_last = false) - : sep_size_(size) - , omit_last_(omit_last) - {} - SPROUT_CONSTEXPR size_type separator_size() const { - return sep_size_; - } - SPROUT_CONSTEXPR bool omit_last() const { - return omit_last_; - } - }; - - // - // size_enumed_forwarder - // - class size_enumed_forwarder { - public: - template - SPROUT_CONSTEXPR typename sprout::adaptors::size_enum_holder - operator()(Size size, bool omit_last = false) const { - return typename sprout::adaptors::size_enum_holder(size, omit_last); - } - }; - - // - // size_enumed - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::size_enumed_forwarder size_enumed = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::size_enumed_range< - typename std::remove_reference::type>::type, - true - > - operator|(Range&& lhs, sprout::adaptors::size_enum_holder const& rhs) { - return sprout::adaptors::size_enumed_range< - typename std::remove_reference::type>::type, - true - >( - sprout::lvalue_forward(lhs), - rhs.separator_size(), - rhs.omit_last() - ); - } - template - inline SPROUT_CONSTEXPR sprout::adaptors::size_enumed_range< - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::size_enumed_forwarder const&) { - return sprout::adaptors::size_enumed_range< - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(lhs) - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_SIZE_ENUMED_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/sized.hpp b/dsp/lib/sprout/sprout/range/adaptor/sized.hpp deleted file mode 100644 index 41ba74b..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/sized.hpp +++ /dev/null @@ -1,91 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_SIZED_HPP -#define SPROUT_RANGE_ADAPTOR_SIZED_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // sized_range - // - template::size_type Size> - class sized_range - : public sprout::adaptors::detail::sized_range_default - { - public: - typedef sprout::adaptors::detail::sized_range_default base_type; - typedef typename base_type::range_type range_type; - typedef typename base_type::size_type size_type; - public: - SPROUT_CONSTEXPR sized_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - sized_range(sized_range const&) = default; - explicit SPROUT_CONSTEXPR sized_range(range_type& range) - : base_type( - sprout::begin(range), - base_type::static_size < static_cast(sprout::size(range)) - ? sprout::next(sprout::begin(range), base_type::static_size) - : sprout::end(range) - ) - {} - }; - - // - // size_holder - // - template - class size_holder - : public sprout::integral_constant - {}; - - // - // sized - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::size_holder sized() { - return sprout::adaptors::size_holder(); - } - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::sized_range< - typename std::remove_reference::type>::type, - Size - > - operator|(Range&& lhs, sprout::adaptors::size_holder const&) { - return sprout::adaptors::sized_range< - typename std::remove_reference::type>::type, - Size - >( - sprout::lvalue_forward(lhs) - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template::size_type Size> - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_SIZED_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/square_wave.hpp b/dsp/lib/sprout/sprout/range/adaptor/square_wave.hpp deleted file mode 100644 index 51403de..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/square_wave.hpp +++ /dev/null @@ -1,169 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_SQUARE_WAVE_HPP -#define SPROUT_RANGE_ADAPTOR_SQUARE_WAVE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // square_wave_range - // - template - class square_wave_range - : public sprout::adaptors::detail::adapted_range_default< - Range, - sprout::square_iterator - > - { - public: - typedef sprout::adaptors::detail::adapted_range_default< - Range, - sprout::square_iterator - > base_type; - typedef typename base_type::range_type range_type; - typedef typename base_type::iterator iterator; - typedef typename base_type::value_type value_type; - public: - SPROUT_CONSTEXPR square_wave_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - square_wave_range(square_wave_range const&) = default; - explicit SPROUT_CONSTEXPR square_wave_range( - range_type& range, - value_type const& frequency = 1, - value_type const& amplitude = 1, - value_type const& phase = 0, - value_type const& duty = 0.5 - ) - : base_type( - iterator(0, frequency, amplitude, phase, duty), - iterator(sprout::size(range), frequency, amplitude, phase, duty) - ) - {} - SPROUT_CONSTEXPR value_type frequency() const { - return base_type::begin().frequency(); - } - SPROUT_CONSTEXPR value_type amplitude() const { - return base_type::begin().amplitude(); - } - SPROUT_CONSTEXPR value_type phase() const { - return base_type::begin().phase(); - } - SPROUT_CONSTEXPR value_type duty() const { - return base_type::begin().duty(); - } - }; - - template - class square_wave_range - : public sprout::range::range_container< - sprout::square_iterator - > - { - public: - typedef sprout::range::range_container< - sprout::square_iterator - > base_type; - typedef typename base_type::iterator iterator; - typedef typename base_type::value_type value_type; - typedef typename base_type::difference_type difference_type; - public: - SPROUT_CONSTEXPR square_wave_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - square_wave_range(square_wave_range const&) = default; - explicit SPROUT_CONSTEXPR square_wave_range( - value_type const& frequency = 1, - value_type const& amplitude = 1, - value_type const& phase = 0, - value_type const& duty = 0.5 - ) - : base_type( - iterator(0, frequency, amplitude, phase, duty), - iterator(sprout::numeric_limits::max(), frequency, amplitude, phase, duty) - ) - {} - SPROUT_CONSTEXPR value_type frequency() const { - return base_type::begin().frequency(); - } - SPROUT_CONSTEXPR value_type amplitude() const { - return base_type::begin().amplitude(); - } - SPROUT_CONSTEXPR value_type phase() const { - return base_type::begin().phase(); - } - SPROUT_CONSTEXPR value_type duty() const { - return base_type::begin().duty(); - } - }; - - // - // square_wave_forwarder - // - class square_wave_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::square_wave_range - operator()( - Value const& frequency = 1, - Value const& amplitude = 1, - Value const& phase = 0, - Value const& duty = 0.5 - ) const - { - return sprout::adaptors::square_wave_range(frequency, amplitude, phase, duty); - } - }; - - // - // square_wave - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::square_wave_forwarder square_wave = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::square_wave_range< - Value, - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::square_wave_range const& rhs) { - return sprout::adaptors::square_wave_range< - Value, - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(lhs), - rhs.frequency(), - rhs.amplitude(), - rhs.phase(), - rhs.duty() - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_SQUARE_WAVE_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/steps.hpp b/dsp/lib/sprout/sprout/range/adaptor/steps.hpp deleted file mode 100644 index 173646f..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/steps.hpp +++ /dev/null @@ -1,140 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_STEPS_HPP -#define SPROUT_RANGE_ADAPTOR_STEPS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace adaptors { - // - // steps_range - // - template - class steps_range - : public sprout::adaptors::detail::adapted_range_default< - Range, - sprout::step_iterator::iterator> - > - { - public: - typedef sprout::adaptors::detail::adapted_range_default< - Range, - sprout::step_iterator::iterator> - > base_type; - typedef typename base_type::range_type range_type; - typedef typename base_type::iterator iterator; - typedef typename base_type::difference_type difference_type; - public: - SPROUT_CONSTEXPR steps_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - steps_range(steps_range const&) = default; - explicit SPROUT_CONSTEXPR steps_range(range_type& range) - : base_type( - iterator(sprout::begin(range), 1, sprout::end(range)), - iterator(sprout::end(range), 1, sprout::end(range)) - ) - {} - SPROUT_CONSTEXPR steps_range(difference_type width, range_type& range) - : base_type( - iterator(sprout::begin(range), width, sprout::end(range)), - iterator(sprout::end(range), width, sprout::end(range)) - ) - {} - SPROUT_CONSTEXPR steps_range(difference_type width, difference_type init, range_type& range) - : base_type( - iterator(sprout::next(sprout::begin(range), NS_SSCRISK_CEL_OR_SPROUT::min(init, sprout::size(range))), width, sprout::end(range)), - iterator(sprout::end(range), width, sprout::end(range)) - ) - {} - }; - - // - // step_holder - // - template - class step_holder { - public: - typedef Difference difference_type; - private: - difference_type width_; - difference_type init_; - public: - SPROUT_CONSTEXPR step_holder() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - step_holder(step_holder const&) = default; - explicit SPROUT_CONSTEXPR step_holder(difference_type width, difference_type init = 0) - : width_(width), init_(init) - {} - SPROUT_CONSTEXPR difference_type const& width() const { - return width_; - } - SPROUT_CONSTEXPR difference_type const& init() const { - return init_; - } - }; - - // - // steps_forwarder - // - class steps_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::step_holder - operator()(Difference width) const { - return sprout::adaptors::step_holder(width); - } - template - SPROUT_CONSTEXPR sprout::adaptors::step_holder - operator()(Difference width, typename sprout::identity::type init) const { - return sprout::adaptors::step_holder(width, init); - } - }; - - // - // steps - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::steps_forwarder steps = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::steps_range< - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::step_holder const& rhs) { - return sprout::adaptors::steps_range< - typename std::remove_reference::type>::type - >( - rhs.width(), rhs.init(), - sprout::lvalue_forward(lhs) - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_STEPS_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/string.hpp b/dsp/lib/sprout/sprout/range/adaptor/string.hpp deleted file mode 100644 index e188da7..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/string.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_STRING_HPP -#define SPROUT_RANGE_ADAPTOR_STRING_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_STRING_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/taken.hpp b/dsp/lib/sprout/sprout/range/adaptor/taken.hpp deleted file mode 100644 index ce9e9a6..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/taken.hpp +++ /dev/null @@ -1,84 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_TAKEN_HPP -#define SPROUT_RANGE_ADAPTOR_TAKEN_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace adaptors { - // - // take_holder - // - template - class take_holder { - public: - typedef Difference difference_type; - private: - difference_type distance_; - public: - explicit SPROUT_CONSTEXPR take_holder(difference_type distance) - : distance_(distance) - {} - SPROUT_CONSTEXPR difference_type const& distance() const { - return distance_; - } - }; - - // - // taken_forwarder - // - class taken_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::take_holder - operator()(Difference distance) const { - return sprout::adaptors::take_holder(distance); - } - }; - - // - // taken - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::taken_forwarder taken = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::detail::adapted_range_default< - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::take_holder const& rhs) { - typedef typename sprout::container_traits< - typename std::remove_reference::type>::type - >::difference_type difference_type; - return sprout::adaptors::detail::adapted_range_default< - typename std::remove_reference::type>::type - >( - sprout::begin(sprout::lvalue_forward(lhs)), - sprout::next( - sprout::begin(sprout::lvalue_forward(lhs)), - NS_SSCRISK_CEL_OR_SPROUT::min(rhs.distance(), sprout::size(sprout::lvalue_forward(lhs))) - ) - ); - } - } // namespace adaptors -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_TAKEN_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/taken_end.hpp b/dsp/lib/sprout/sprout/range/adaptor/taken_end.hpp deleted file mode 100644 index 9693a7f..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/taken_end.hpp +++ /dev/null @@ -1,84 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_TAKEN_END_HPP -#define SPROUT_RANGE_ADAPTOR_TAKEN_END_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace adaptors { - // - // take_end_holder - // - template - class take_end_holder { - public: - typedef Difference difference_type; - private: - difference_type distance_; - public: - explicit SPROUT_CONSTEXPR take_end_holder(difference_type distance) - : distance_(distance) - {} - SPROUT_CONSTEXPR difference_type const& distance() const { - return distance_; - } - }; - - // - // taken_end_forwarder - // - class taken_end_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::take_end_holder - operator()(Difference distance) const { - return sprout::adaptors::take_end_holder(distance); - } - }; - - // - // taken_end - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::taken_end_forwarder taken_end = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::detail::adapted_range_default< - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::take_end_holder const& rhs) { - typedef typename sprout::container_traits< - typename std::remove_reference::type>::type - >::difference_type difference_type; - return sprout::adaptors::detail::adapted_range_default< - typename std::remove_reference::type>::type - >( - sprout::next( - sprout::end(sprout::lvalue_forward(lhs)), - NS_SSCRISK_CEL_OR_SPROUT::max(rhs.distance(), -sprout::size(sprout::lvalue_forward(lhs))) - ), - sprout::end(sprout::lvalue_forward(lhs)) - ); - } - } // namespace adaptors -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_TAKEN_END_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/to_lower.hpp b/dsp/lib/sprout/sprout/range/adaptor/to_lower.hpp deleted file mode 100644 index 0ad61c0..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/to_lower.hpp +++ /dev/null @@ -1,96 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_TO_LOWER_HPP -#define SPROUT_RANGE_ADAPTOR_TO_LOWER_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // to_lower_range - // - template - class to_lower_range - : public sprout::adaptors::detail::adapted_range_default< - Range, - sprout::transform_iterator< - sprout::ctypes::to_lower::value_type>, - typename sprout::container_traits::iterator - > - > - { - public: - typedef sprout::adaptors::detail::adapted_range_default< - Range, - sprout::transform_iterator< - sprout::ctypes::to_lower::value_type>, - typename sprout::container_traits::iterator - > - > base_type; - typedef typename base_type::range_type range_type; - typedef typename base_type::iterator iterator; - typedef typename base_type::value_type value_type; - public: - SPROUT_CONSTEXPR to_lower_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - to_lower_range(to_lower_range const&) = default; - explicit SPROUT_CONSTEXPR to_lower_range(range_type& range) - : base_type( - iterator(sprout::begin(range), typename iterator::functor_type()), - iterator(sprout::end(range), typename iterator::functor_type()) - ) - {} - }; - - // - // to_lower_forwarder - // - class to_lower_forwarder {}; - - // - // to_lower - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::to_lower_forwarder to_lower = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::to_lower_range< - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, to_lower_forwarder) { - return sprout::adaptors::to_lower_range< - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(lhs) - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_TO_LOWER_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/to_upper.hpp b/dsp/lib/sprout/sprout/range/adaptor/to_upper.hpp deleted file mode 100644 index 5e02e56..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/to_upper.hpp +++ /dev/null @@ -1,96 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_TO_UPPER_HPP -#define SPROUT_RANGE_ADAPTOR_TO_UPPER_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // to_upper_range - // - template - class to_upper_range - : public sprout::adaptors::detail::adapted_range_default< - Range, - sprout::transform_iterator< - sprout::ctypes::to_upper::value_type>, - typename sprout::container_traits::iterator - > - > - { - public: - typedef sprout::adaptors::detail::adapted_range_default< - Range, - sprout::transform_iterator< - sprout::ctypes::to_upper::value_type>, - typename sprout::container_traits::iterator - > - > base_type; - typedef typename base_type::range_type range_type; - typedef typename base_type::iterator iterator; - typedef typename base_type::value_type value_type; - public: - SPROUT_CONSTEXPR to_upper_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - to_upper_range(to_upper_range const&) = default; - explicit SPROUT_CONSTEXPR to_upper_range(range_type& range) - : base_type( - iterator(sprout::begin(range), typename iterator::functor_type()), - iterator(sprout::end(range), typename iterator::functor_type()) - ) - {} - }; - - // - // to_upper_forwarder - // - class to_upper_forwarder {}; - - // - // to_upper - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::to_upper_forwarder to_upper = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::to_upper_range< - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, to_upper_forwarder) { - return sprout::adaptors::to_upper_range< - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(lhs) - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_TO_UPPER_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/transformed.hpp b/dsp/lib/sprout/sprout/range/adaptor/transformed.hpp deleted file mode 100644 index fba22f9..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/transformed.hpp +++ /dev/null @@ -1,214 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_TRANSFORMD_HPP -#define SPROUT_RANGE_ADAPTOR_TRANSFORMD_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // transformed_range - // - template - class transformed_range - : public sprout::adaptors::detail::adapted_range_default< - LRange, - sprout::transform_iterator< - BinaryFunction, - typename sprout::container_traits::iterator, - typename sprout::container_traits::iterator - > - > - { - public: - typedef BinaryFunction functor_type; - typedef LRange range1_type; - typedef RRange range2_type; - typedef sprout::adaptors::detail::adapted_range_default< - LRange, - sprout::transform_iterator< - BinaryFunction, - typename sprout::container_traits::iterator, - typename sprout::container_traits::iterator - > - > base_type; - typedef typename base_type::iterator iterator; - public: - SPROUT_CONSTEXPR transformed_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - transformed_range(transformed_range const&) = default; - SPROUT_CONSTEXPR transformed_range(BinaryFunction func, range1_type& range1, range2_type& range2) - : base_type( - iterator(sprout::begin(range1), sprout::begin(range2), func), - iterator(sprout::end(range1), sprout::end(range2), func) - ) - {} - }; - - template - class transformed_range - : public sprout::adaptors::detail::adapted_range_default< - Range, - sprout::transform_iterator< - UnaryFunction, - typename sprout::container_traits::iterator - > - > - { - public: - typedef UnaryFunction functor_type; - typedef Range range1_type; - typedef sprout::adaptors::detail::adapted_range_default< - Range, - sprout::transform_iterator< - UnaryFunction, - typename sprout::container_traits::iterator - > - > base_type; - typedef typename base_type::iterator iterator; - public: - SPROUT_CONSTEXPR transformed_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - transformed_range(transformed_range const&) = default; - SPROUT_CONSTEXPR transformed_range(UnaryFunction func, range1_type& range) - : base_type( - iterator(sprout::begin(range), func), - iterator(sprout::end(range), func) - ) - {} - }; - - // - // transform_holder - // - template - class transform_holder { - public: - typedef BinaryFunction functor_type; - typedef RRange range2_type; - private: - BinaryFunction func_; - sprout::value_holder range_; - public: - SPROUT_CONSTEXPR transform_holder() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - transform_holder(transform_holder const&) = default; - SPROUT_CONSTEXPR transform_holder(BinaryFunction func, range2_type& range) - : func_(func) - , range_(range) - {} - SPROUT_CONSTEXPR BinaryFunction functor() const { - return func_; - } - SPROUT_CONSTEXPR range2_type& range() const { - return range_; - } - }; - template - class transform_holder { - public: - typedef UnaryFunction functor_type; - private: - UnaryFunction func_; - public: - SPROUT_CONSTEXPR transform_holder() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - transform_holder(transform_holder const&) = default; - explicit SPROUT_CONSTEXPR transform_holder(UnaryFunction func) - : func_(func) - {} - SPROUT_CONSTEXPR UnaryFunction functor() const { - return func_; - } - }; - - // - // transformed_forwarder - // - class transformed_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::transform_holder< - BinaryFunction, - typename std::remove_reference::type>::type - > - operator()(RRange&& range, BinaryFunction func) const { - return sprout::adaptors::transform_holder< - BinaryFunction, - typename std::remove_reference::type>::type - >( - func, - sprout::lvalue_forward(range) - ); - } - template - SPROUT_CONSTEXPR sprout::adaptors::transform_holder - operator()(UnaryFunction func) const { - return sprout::adaptors::transform_holder(func); - } - }; - - // - // transformed - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::transformed_forwarder transformed = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::transformed_range< - BinaryFunction, - typename std::remove_reference::type>::type, - RRange - > - operator|(LRange&& lhs, sprout::adaptors::transform_holder const& rhs) { - return sprout::adaptors::transformed_range< - BinaryFunction, - typename std::remove_reference::type>::type, - RRange - >( - rhs.functor(), - sprout::lvalue_forward(lhs), - rhs.range() - ); - } - template - inline SPROUT_CONSTEXPR sprout::adaptors::transformed_range< - UnaryFunction, - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::transform_holder const& rhs) { - return sprout::adaptors::transformed_range< - UnaryFunction, - typename std::remove_reference::type>::type - >( - rhs.functor(), - sprout::lvalue_forward(lhs) - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_TRANSFORMD_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/triangle_wave.hpp b/dsp/lib/sprout/sprout/range/adaptor/triangle_wave.hpp deleted file mode 100644 index e34c101..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/triangle_wave.hpp +++ /dev/null @@ -1,159 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_TRIANGLE_WAVE_HPP -#define SPROUT_RANGE_ADAPTOR_TRIANGLE_WAVE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // triangle_wave_range - // - template - class triangle_wave_range - : public sprout::adaptors::detail::adapted_range_default< - Range, - sprout::triangle_iterator - > - { - public: - typedef sprout::adaptors::detail::adapted_range_default< - Range, - sprout::triangle_iterator - > base_type; - typedef typename base_type::range_type range_type; - typedef typename base_type::iterator iterator; - typedef typename base_type::value_type value_type; - public: - SPROUT_CONSTEXPR triangle_wave_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - triangle_wave_range(triangle_wave_range const&) = default; - explicit SPROUT_CONSTEXPR triangle_wave_range( - range_type& range, - value_type const& frequency = 1, - value_type const& amplitude = 1, - value_type const& phase = 0 - ) - : base_type( - iterator(0, frequency, amplitude, phase), - iterator(sprout::size(range), frequency, amplitude, phase) - ) - {} - SPROUT_CONSTEXPR value_type frequency() const { - return base_type::begin().frequency(); - } - SPROUT_CONSTEXPR value_type amplitude() const { - return base_type::begin().amplitude(); - } - SPROUT_CONSTEXPR value_type phase() const { - return base_type::begin().phase(); - } - }; - - template - class triangle_wave_range - : public sprout::range::range_container< - sprout::triangle_iterator - > - { - public: - typedef sprout::range::range_container< - sprout::triangle_iterator - > base_type; - typedef typename base_type::iterator iterator; - typedef typename base_type::value_type value_type; - typedef typename base_type::difference_type difference_type; - public: - SPROUT_CONSTEXPR triangle_wave_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - triangle_wave_range(triangle_wave_range const&) = default; - explicit SPROUT_CONSTEXPR triangle_wave_range( - value_type const& frequency = 1, - value_type const& amplitude = 1, - value_type const& phase = 0 - ) - : base_type( - iterator(0, frequency, amplitude, phase), - iterator(sprout::numeric_limits::max(), frequency, amplitude, phase) - ) - {} - SPROUT_CONSTEXPR value_type frequency() const { - return base_type::begin().frequency(); - } - SPROUT_CONSTEXPR value_type amplitude() const { - return base_type::begin().amplitude(); - } - SPROUT_CONSTEXPR value_type phase() const { - return base_type::begin().phase(); - } - }; - - // - // triangle_wave_forwarder - // - class triangle_wave_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::triangle_wave_range - operator()( - Value const& frequency = 1, - Value const& amplitude = 1, - Value const& phase = 0 - ) const - { - return sprout::adaptors::triangle_wave_range(frequency, amplitude, phase); - } - }; - - // - // triangle_wave - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::triangle_wave_forwarder triangle_wave = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::triangle_wave_range< - Value, - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::triangle_wave_range const& rhs) { - return sprout::adaptors::triangle_wave_range< - Value, - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(lhs), - rhs.frequency(), - rhs.amplitude(), - rhs.phase() - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_TRIANGLE_WAVE_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/uniqued.hpp b/dsp/lib/sprout/sprout/range/adaptor/uniqued.hpp deleted file mode 100644 index 4f8b04c..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/uniqued.hpp +++ /dev/null @@ -1,142 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_UNIQUED_HPP -#define SPROUT_RANGE_ADAPTOR_UNIQUED_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // uniqued_range - // - template - class uniqued_range - : public sprout::adaptors::detail::adapted_range_default< - Range, - sprout::adjacent_filter_iterator< - sprout::unique_filter, - typename sprout::container_traits::iterator - > - > - { - public: - typedef Predicate predicate_type; - typedef sprout::adaptors::detail::adapted_range_default< - Range, - sprout::adjacent_filter_iterator< - sprout::unique_filter, - typename sprout::container_traits::iterator - > - > base_type; - typedef typename base_type::range_type range_type; - typedef typename base_type::iterator iterator; - public: - SPROUT_CONSTEXPR uniqued_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - uniqued_range(uniqued_range const&) = default; - SPROUT_CONSTEXPR uniqued_range(range_type& range, Predicate pred) - : base_type( - iterator(typename iterator::predicate_type(pred), sprout::begin(range), sprout::end(range)), - iterator(typename iterator::predicate_type(pred), sprout::end(range), sprout::end(range)) - ) - {} - }; - - // - // unique_holder - // - template > - class unique_holder { - public: - typedef Predicate predicate_type; - private: - Predicate pred_; - public: - SPROUT_CONSTEXPR unique_holder() - : pred_() - {} - explicit SPROUT_CONSTEXPR unique_holder(Predicate pred) - : pred_(pred) - {} - SPROUT_CONSTEXPR Predicate const& predicate() const { - return pred_; - } - }; - - // - // uniqued_forwarder - // - class uniqued_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::unique_holder - operator()(Predicate pred) const { - return sprout::adaptors::unique_holder(pred); - } - }; - - // - // uniqued - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::uniqued_forwarder uniqued = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::uniqued_range< - Predicate, - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::unique_holder const& rhs) { - return sprout::adaptors::uniqued_range< - Predicate, - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(lhs), - rhs.predicate() - ); - } - template - inline SPROUT_CONSTEXPR sprout::adaptors::uniqued_range< - sprout::equal_to<>, - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::uniqued_forwarder const&) { - return sprout::adaptors::uniqued_range< - sprout::equal_to<>, - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(lhs), - sprout::equal_to<>() - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_UNIQUED_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/valued.hpp b/dsp/lib/sprout/sprout/range/adaptor/valued.hpp deleted file mode 100644 index 4d98a1c..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/valued.hpp +++ /dev/null @@ -1,122 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_VALUED_HPP -#define SPROUT_RANGE_ADAPTOR_VALUED_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace adaptors { - // - // valued_range - // - template - class valued_range - : public sprout::adaptors::detail::adapted_range_default< - Range, - sprout::valued_iterator::iterator, T> - > - { - public: - typedef sprout::adaptors::detail::adapted_range_default< - Range, - sprout::valued_iterator::iterator, T> - > base_type; - typedef typename base_type::range_type range_type; - typedef typename base_type::iterator iterator; - typedef typename iterator::param_type param_type; - public: - SPROUT_CONSTEXPR valued_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - valued_range(valued_range const&) = default; - SPROUT_CONSTEXPR valued_range(param_type param, range_type& range) - : base_type( - iterator(sprout::begin(range), param), - iterator(sprout::end(range), param) - ) - {} - }; - - // - // valued_holder - // - template - class valued_holder { - public: - typedef T content_type; - typedef sprout::value_holder holder_type; - typedef typename holder_type::param_type param_type; - typedef typename holder_type::mutable_or_const_reference get_type; - private: - holder_type holder_; - public: - SPROUT_CONSTEXPR valued_holder() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - valued_holder(valued_holder const&) = default; - explicit SPROUT_CONSTEXPR valued_holder(param_type param) - : holder_(param) - {} - SPROUT_CONSTEXPR get_type get() const { - return holder_.get(); - } - }; - - // - // valued_forwarder - // - class valued_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::valued_holder - operator()(T const& param) const { - return sprout::adaptors::valued_holder(param); - } - }; - - // - // valued - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::valued_forwarder valued = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::valued_range< - typename std::remove_reference::type>::type, - T - > - operator|(Range&& lhs, sprout::adaptors::valued_holder const& rhs) { - return sprout::adaptors::valued_range< - typename std::remove_reference::type>::type, - T - >( - rhs.get(), - sprout::lvalue_forward(lhs) - ); - } - } // namespace adaptors - - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_VALUED_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/various.hpp b/dsp/lib/sprout/sprout/range/adaptor/various.hpp deleted file mode 100644 index f612f2b..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/various.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_VARIOUS_HPP -#define SPROUT_RANGE_ADAPTOR_VARIOUS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_VARIOUS_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/wave.hpp b/dsp/lib/sprout/sprout/range/adaptor/wave.hpp deleted file mode 100644 index 0ce33fb..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/wave.hpp +++ /dev/null @@ -1,21 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_WAVE_HPP -#define SPROUT_RANGE_ADAPTOR_WAVE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_WAVE_HPP diff --git a/dsp/lib/sprout/sprout/range/adaptor/window.hpp b/dsp/lib/sprout/sprout/range/adaptor/window.hpp deleted file mode 100644 index 2cd15ea..0000000 --- a/dsp/lib/sprout/sprout/range/adaptor/window.hpp +++ /dev/null @@ -1,129 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ADAPTOR_WINDOW_HPP -#define SPROUT_RANGE_ADAPTOR_WINDOW_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace adaptors { - // - // window_holder - // - template - class window_holder { - public: - typedef typename sprout::arithmetic_promote::type difference_type; - private: - difference_type to_first_; - difference_type to_last_; - public: - SPROUT_CONSTEXPR window_holder(difference_type to_first, difference_type to_last) - : to_first_(to_first), to_last_(to_last) - {} - SPROUT_CONSTEXPR difference_type const& to_first() const { - return to_first_; - } - SPROUT_CONSTEXPR difference_type const& to_last() const { - return to_last_; - } - }; - template - class window_holder { - public: - typedef Difference difference_type; - private: - difference_type to_first_; - public: - explicit SPROUT_CONSTEXPR window_holder(difference_type to_first) - : to_first_(to_first) - {} - SPROUT_CONSTEXPR difference_type const& to_first() const { - return to_first_; - } - }; - - // - // window_forwarder - // - class window_forwarder { - public: - template - SPROUT_CONSTEXPR sprout::adaptors::window_holder - operator()(Difference1 to_first, Difference2 to_last) const { - return sprout::adaptors::window_holder(to_first, to_last); - } - template - SPROUT_CONSTEXPR sprout::adaptors::window_holder - operator()(Difference to_first) const { - return sprout::adaptors::window_holder(to_first); - } - }; - - // - // window - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::adaptors::window_forwarder window = {}; - } // anonymous-namespace - - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::adaptors::detail::adapted_range_default< - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::window_holder const& rhs) { - typedef typename sprout::container_traits< - typename std::remove_reference::type>::type - >::difference_type difference_type; - return sprout::adaptors::detail::adapted_range_default< - typename std::remove_reference::type>::type - >( - sprout::next( - sprout::begin(sprout::lvalue_forward(lhs)), - NS_SSCRISK_CEL_OR_SPROUT::min(rhs.to_first(), sprout::size(sprout::lvalue_forward(lhs))) - ), - sprout::next( - sprout::begin(sprout::lvalue_forward(lhs)), - NS_SSCRISK_CEL_OR_SPROUT::min(rhs.to_last(), sprout::size(sprout::lvalue_forward(lhs))) - ) - ); - } - template - inline SPROUT_CONSTEXPR sprout::adaptors::detail::adapted_range_default< - typename std::remove_reference::type>::type - > - operator|(Range&& lhs, sprout::adaptors::window_holder const& rhs) { - typedef typename sprout::container_traits< - typename std::remove_reference::type>::type - >::difference_type difference_type; - return sprout::adaptors::detail::adapted_range_default< - typename std::remove_reference::type>::type - >( - sprout::next( - sprout::begin(sprout::lvalue_forward(lhs)), - NS_SSCRISK_CEL_OR_SPROUT::min(rhs.to_first(), sprout::size(sprout::lvalue_forward(lhs))) - ), - sprout::end(sprout::lvalue_forward(lhs)) - ); - } - } // namespace adaptors -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ADAPTOR_WINDOW_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm.hpp b/dsp/lib/sprout/sprout/range/algorithm.hpp deleted file mode 100644 index 3c094f5..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_HPP -#define SPROUT_RANGE_ALGORITHM_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/adjacent_find.hpp b/dsp/lib/sprout/sprout/range/algorithm/adjacent_find.hpp deleted file mode 100644 index 1540b40..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/adjacent_find.hpp +++ /dev/null @@ -1,76 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_ADJACENT_FIND_HPP -#define SPROUT_RANGE_ALGORITHM_ADJACENT_FIND_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - - // 25.2.8 Adjacent find - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - adjacent_find(ForwardRange&& range) { - return sprout::range::range_return::pack( - sprout::adjacent_find( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)) - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - adjacent_find(ForwardRange&& range, BinaryPredicate pred) { - return sprout::range::range_return::pack( - sprout::adjacent_find( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)), - pred - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - adjacent_find(ForwardRange&& range) { - return sprout::range::range_return::pack( - sprout::adjacent_find( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)) - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - adjacent_find(ForwardRange&& range, BinaryPredicate pred) { - return sprout::range::range_return::pack( - sprout::adjacent_find( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)), - pred - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_ADJACENT_FIND_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/all_of.hpp b/dsp/lib/sprout/sprout/range/algorithm/all_of.hpp deleted file mode 100644 index 3b0de68..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/all_of.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_ALL_OF_HPP -#define SPROUT_RANGE_ALGORITHM_ALL_OF_HPP - -#include -#include -#include - -namespace sprout { - namespace range { - - // 25.2.1 All of - template - inline SPROUT_CONSTEXPR bool - all_of(InputRange const& range, Predicate pred) { - return sprout::all_of(sprout::begin(range), sprout::end(range), pred); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_ALL_OF_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/all_of_equal.hpp b/dsp/lib/sprout/sprout/range/algorithm/all_of_equal.hpp deleted file mode 100644 index 9a7aeb8..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/all_of_equal.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_ALL_OF_EQUAL_HPP -#define SPROUT_RANGE_ALGORITHM_ALL_OF_EQUAL_HPP - -#include -#include -#include - -namespace sprout { - namespace range { - // - // all_of_equal - // - template - inline SPROUT_CONSTEXPR bool - all_of_equal(InputRange const& range, T const& value) { - return sprout::all_of_equal(sprout::begin(range), sprout::end(range), value); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_ALL_OF_EQUAL_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/any_of.hpp b/dsp/lib/sprout/sprout/range/algorithm/any_of.hpp deleted file mode 100644 index 691bb4f..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/any_of.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_ANY_OF_HPP -#define SPROUT_RANGE_ALGORITHM_ANY_OF_HPP - -#include -#include -#include - -namespace sprout { - namespace range { - - // 25.2.2 Any of - template - inline SPROUT_CONSTEXPR bool - any_of(InputRange const& range, Predicate pred) { - return sprout::any_of(sprout::begin(range), sprout::end(range), pred); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_ANY_OF_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/any_of_equal.hpp b/dsp/lib/sprout/sprout/range/algorithm/any_of_equal.hpp deleted file mode 100644 index c7273b8..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/any_of_equal.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_ANY_OF_EQUAL_HPP -#define SPROUT_RANGE_ALGORITHM_ANY_OF_EQUAL_HPP - -#include -#include -#include - -namespace sprout { - namespace range { - // - // any_of_equal - // - template - inline SPROUT_CONSTEXPR bool - any_of_equal(InputRange const& range, T const& value) { - return sprout::any_of_equal(sprout::begin(range), sprout::end(range), value); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_ANY_OF_EQUAL_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/binary_search.hpp b/dsp/lib/sprout/sprout/range/algorithm/binary_search.hpp deleted file mode 100644 index 47ae5f2..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/binary_search.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_BINARY_SEARCH_HPP -#define SPROUT_RANGE_ALGORITHM_BINARY_SEARCH_HPP - -#include -#include -#include - -namespace sprout { - namespace range { - - // 25.4.3.4 binary_search - template - inline SPROUT_CONSTEXPR bool - binary_search(ForwardRange const& range, T const& value) { - return sprout::binary_search(sprout::begin(range), sprout::end(range), value); - } - - template - inline SPROUT_CONSTEXPR bool - binary_search(ForwardRange const& range, T const& value, Compare comp) { - return sprout::binary_search(sprout::begin(range), sprout::end(range), value, comp); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_BINARY_SEARCH_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/bogo_sort.hpp b/dsp/lib/sprout/sprout/range/algorithm/bogo_sort.hpp deleted file mode 100644 index 7aa1a00..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/bogo_sort.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_BOGO_SORT_HPP -#define SPROUT_RANGE_ALGORITHM_BOGO_SORT_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_BOGO_SORT_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/bozo_sort.hpp b/dsp/lib/sprout/sprout/range/algorithm/bozo_sort.hpp deleted file mode 100644 index e4278e4..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/bozo_sort.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_BOZO_SORT_HPP -#define SPROUT_RANGE_ALGORITHM_BOZO_SORT_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_BOZO_SORT_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/clamp_range.hpp b/dsp/lib/sprout/sprout/range/algorithm/clamp_range.hpp deleted file mode 100644 index d874700..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/clamp_range.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CLAMP_RANGE_HPP -#define SPROUT_RANGE_ALGORITHM_CLAMP_RANGE_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CLAMP_RANGE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/clamp_range_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/clamp_range_copy.hpp deleted file mode 100644 index 7cffa96..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/clamp_range_copy.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CLAMP_RANGE_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_CLAMP_RANGE_COPY_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CLAMP_RANGE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/copy.hpp deleted file mode 100644 index ad4d07b..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/copy.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_COPY_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/copy_backward.hpp b/dsp/lib/sprout/sprout/range/algorithm/copy_backward.hpp deleted file mode 100644 index 76b0a67..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/copy_backward.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_COPY_BACKWARD_HPP -#define SPROUT_RANGE_ALGORITHM_COPY_BACKWARD_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_COPY_BACKWARD_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/copy_if.hpp b/dsp/lib/sprout/sprout/range/algorithm/copy_if.hpp deleted file mode 100644 index 01c6b1f..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/copy_if.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_COPY_IF_HPP -#define SPROUT_RANGE_ALGORITHM_COPY_IF_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_COPY_IF_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/copy_until.hpp b/dsp/lib/sprout/sprout/range/algorithm/copy_until.hpp deleted file mode 100644 index 5bcad52..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/copy_until.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_COPY_UNTIL_HPP -#define SPROUT_RANGE_ALGORITHM_COPY_UNTIL_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_COPY_UNTIL_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/copy_while.hpp b/dsp/lib/sprout/sprout/range/algorithm/copy_while.hpp deleted file mode 100644 index 2217998..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/copy_while.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_COPY_WHILE_HPP -#define SPROUT_RANGE_ALGORITHM_COPY_WHILE_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_COPY_WHILE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/count.hpp b/dsp/lib/sprout/sprout/range/algorithm/count.hpp deleted file mode 100644 index 14c561f..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/count.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_COUNT_HPP -#define SPROUT_RANGE_ALGORITHM_COUNT_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - - // 25.2.9 Count - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::difference_type - count(InputRange const& range, T const& value) { - return sprout::count(sprout::begin(range), sprout::end(range), value); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_COUNT_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/count_if.hpp b/dsp/lib/sprout/sprout/range/algorithm/count_if.hpp deleted file mode 100644 index 265597d..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/count_if.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_COUNT_IF_HPP -#define SPROUT_RANGE_ALGORITHM_COUNT_IF_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - - // 25.2.9 Count - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::difference_type - count_if(InputRange const& range, Predicate pred) { - return sprout::count_if(sprout::begin(range), sprout::end(range), pred); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_COUNT_IF_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14.hpp deleted file mode 100644 index 16df428..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14.hpp +++ /dev/null @@ -1,67 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/bogo_sort.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/bogo_sort.hpp deleted file mode 100644 index dad1948..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/bogo_sort.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_BOGO_SORT_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_BOGO_SORT_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // bogo_sort - // - template - inline SPROUT_CXX14_CONSTEXPR void - bogo_sort(RandomAccessRange&& rng, UniformRandomNumberGenerator&& g) { - sprout::bogo_sort( - sprout::begin(SPROUT_FORWARD(RandomAccessRange, rng)), sprout::end(SPROUT_FORWARD(RandomAccessRange, rng)), - SPROUT_FORWARD(UniformRandomNumberGenerator, g) - ); - } - template - inline SPROUT_CXX14_CONSTEXPR void - bogo_sort(RandomAccessRange&& rng, UniformRandomNumberGenerator&& g, Compare comp) { - sprout::bogo_sort( - sprout::begin(SPROUT_FORWARD(RandomAccessRange, rng)), sprout::end(SPROUT_FORWARD(RandomAccessRange, rng)), - SPROUT_FORWARD(UniformRandomNumberGenerator, g), comp - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_BOGO_SORT_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/bozo_sort.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/bozo_sort.hpp deleted file mode 100644 index 42b5109..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/bozo_sort.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_BOZO_SORT_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_BOZO_SORT_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // bozo_sort - // - template - inline SPROUT_CXX14_CONSTEXPR void - bozo_sort(RandomAccessRange&& rng, UniformRandomNumberGenerator&& g) { - sprout::bozo_sort( - sprout::begin(SPROUT_FORWARD(RandomAccessRange, rng)), sprout::end(SPROUT_FORWARD(RandomAccessRange, rng)), - SPROUT_FORWARD(UniformRandomNumberGenerator, g) - ); - } - template - inline SPROUT_CXX14_CONSTEXPR void - bozo_sort(RandomAccessRange&& rng, UniformRandomNumberGenerator&& g, Compare comp) { - sprout::bozo_sort( - sprout::begin(SPROUT_FORWARD(RandomAccessRange, rng)), sprout::end(SPROUT_FORWARD(RandomAccessRange, rng)), - SPROUT_FORWARD(UniformRandomNumberGenerator, g), comp - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_BOZO_SORT_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/clamp_range.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/clamp_range.hpp deleted file mode 100644 index d382805..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/clamp_range.hpp +++ /dev/null @@ -1,53 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_CLAMP_RANGE_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_CLAMP_RANGE_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // clamp_range - // - template< - typename InputRange, typename OutputIterator, typename Compare, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - clamp_range( - InputRange const& rng, OutputIterator result, - typename sprout::container_traits::value_type const& low, - typename sprout::container_traits::value_type const& high, - Compare comp - ) - { - return sprout::clamp_range(sprout::begin(rng), sprout::end(rng), result, low, high, comp); - } - template< - typename InputRange, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - clamp_range( - InputRange const& rng, OutputIterator result, - typename sprout::container_traits::value_type const& low, - typename sprout::container_traits::value_type const& high - ) - { - return sprout::clamp_range(sprout::begin(rng), sprout::end(rng), result, low, high); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_CLAMP_RANGE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/copy.hpp deleted file mode 100644 index ea70fee..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/copy.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_COPY_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // copy - // - template< - typename InputRange, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - copy(InputRange const& rng, OutputIterator result) { - return sprout::copy(sprout::begin(rng), sprout::end(rng), result); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/copy_backward.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/copy_backward.hpp deleted file mode 100644 index 294f07d..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/copy_backward.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_COPY_BACKWARD_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_COPY_BACKWARD_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // copy_backward - // - template< - typename BidirectionalRange, typename BidirectionalIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR BidirectionalIterator - copy_backward(BidirectionalRange const& rng, BidirectionalIterator result) { - return sprout::copy_backward(sprout::begin(rng), sprout::end(rng), result); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_COPY_BACKWARD_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/copy_if.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/copy_if.hpp deleted file mode 100644 index 7b1390d..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/copy_if.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_COPY_IF_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_COPY_IF_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // copy_if - // - template< - typename InputRange, typename OutputIterator, typename Predicate, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - copy_if(InputRange const& rng, OutputIterator result, Predicate pred) { - return sprout::copy_if(sprout::begin(rng), sprout::end(rng), result, pred); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_COPY_IF_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/copy_until.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/copy_until.hpp deleted file mode 100644 index efadb88..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/copy_until.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_COPY_UNTIL_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_COPY_UNTIL_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // copy_until - // - template< - typename InputRange, typename OutputIterator, typename Predicate, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - copy_until(InputRange const& rng, OutputIterator result, Predicate pred) { - return sprout::copy_until(sprout::begin(rng), sprout::end(rng), result, pred); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_COPY_UNTIL_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/copy_while.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/copy_while.hpp deleted file mode 100644 index f1a8f56..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/copy_while.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_COPY_WHILE_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_COPY_WHILE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // copy_while - // - template< - typename InputRange, typename OutputIterator, typename Predicate, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - copy_while(InputRange const& rng, OutputIterator result, Predicate pred) { - return sprout::copy_while(sprout::begin(rng), sprout::end(rng), result, pred); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_COPY_WHILE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/fill.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/fill.hpp deleted file mode 100644 index 1355824..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/fill.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_FILL_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_FILL_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // fill - // - template - inline SPROUT_CXX14_CONSTEXPR void - fill(ForwardRange&& rng, T const& value) { - sprout::fill(sprout::begin(SPROUT_FORWARD(ForwardRange, rng)), sprout::end(SPROUT_FORWARD(ForwardRange, rng)), value); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_FILL_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/for_each.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/for_each.hpp deleted file mode 100644 index eb5b694..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/for_each.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_FOR_EACH_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_FOR_EACH_HPP - -#include -#include -#include - -namespace sprout { - namespace range { - // - // for_each - // - template - inline SPROUT_CXX14_CONSTEXPR Function - for_each(InputRange&& rng, Function f) { - return sprout::for_each(sprout::begin(SPROUT_FORWARD(InputRange, rng)), sprout::end(SPROUT_FORWARD(InputRange, rng)), f); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_FOR_EACH_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/gather.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/gather.hpp deleted file mode 100644 index 275b007..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/gather.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_GATHER_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_GATHER_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // gather - // - template - inline SPROUT_CXX14_CONSTEXPR sprout::pair< - typename sprout::range::range_return::type, - typename sprout::range::range_return::type - > - gather(BidirectionalRange&& rng, typename sprout::container_traits::type>::iterator pivot, Predicate pred) { - return sprout::gather(sprout::begin(SPROUT_FORWARD(BidirectionalRange, rng)), sprout::end(SPROUT_FORWARD(BidirectionalRange, rng)), pivot, pred); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_GATHER_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/generate.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/generate.hpp deleted file mode 100644 index 5c26c6f..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/generate.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_GENERATE_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_GENERATE_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // generate - // - template - inline SPROUT_CXX14_CONSTEXPR void - generate(ForwardRange&& rng, Generator gen) { - sprout::generate(sprout::begin(SPROUT_FORWARD(ForwardRange, rng)), sprout::end(SPROUT_FORWARD(ForwardRange, rng)), gen); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_GENERATE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/inplace_merge.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/inplace_merge.hpp deleted file mode 100644 index 9fc3d7b..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/inplace_merge.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_IMPLACE_MERGE_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_IMPLACE_MERGE_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // inplace_merge - // - template - inline SPROUT_CXX14_CONSTEXPR void - inplace_merge(BidirectionalRange&& rng, typename sprout::container_traits::type>::iterator middle, Compare comp) { - sprout::inplace_merge(sprout::begin(SPROUT_FORWARD(BidirectionalRange, rng)), middle, sprout::end(SPROUT_FORWARD(BidirectionalRange, rng)), comp); - } - - template - inline SPROUT_CXX14_CONSTEXPR void - inplace_merge(BidirectionalRange&& rng, typename sprout::container_traits::type>::iterator middle) { - sprout::inplace_merge(sprout::begin(SPROUT_FORWARD(BidirectionalRange, rng)), middle, sprout::end(SPROUT_FORWARD(BidirectionalRange, rng))); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_IMPLACE_MERGE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/make_heap.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/make_heap.hpp deleted file mode 100644 index d06f7cf..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/make_heap.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_MAKE_HEAP_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_MAKE_HEAP_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // make_heap - // - template - inline SPROUT_CXX14_CONSTEXPR void - make_heap(RandomAccessRange&& rng, Compare comp) { - sprout::make_heap(sprout::begin(SPROUT_FORWARD(RandomAccessRange, rng)), sprout::end(SPROUT_FORWARD(RandomAccessRange, rng)), comp); - } - - template - inline SPROUT_CXX14_CONSTEXPR void - make_heap(RandomAccessRange&& rng) { - sprout::make_heap(sprout::begin(SPROUT_FORWARD(RandomAccessRange, rng)), sprout::end(SPROUT_FORWARD(RandomAccessRange, rng))); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_MAKE_HEAP_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/merge.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/merge.hpp deleted file mode 100644 index a2bdced..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/merge.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_MERGE_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_MERGE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // merge - // - template< - typename InputRange1, typename InputRange2, typename OutputIterator, typename Compare, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - merge(InputRange1 const& rng1, InputRange2 const& rng2, OutputIterator result, Compare comp) { - return sprout::merge(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), result, comp); - } - template< - typename InputRange1, typename InputRange2, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - merge(InputRange1 const& rng1, InputRange2 const& rng2, OutputIterator result) { - return sprout::merge(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), result); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_MERGE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/move.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/move.hpp deleted file mode 100644 index 0db11cd..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/move.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_MOVE_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_MOVE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // move - // - template< - typename InputRange, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - move(InputRange const& rng, OutputIterator result) { - return sprout::move(sprout::begin(rng), sprout::end(rng), result); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_MOVE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/move_backward.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/move_backward.hpp deleted file mode 100644 index 526b41f..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/move_backward.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_MOVE_BACKWARD_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_MOVE_BACKWARD_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // move_backward - // - template< - typename BidirectionalRange, typename BidirectionalIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR BidirectionalIterator - move_backward(BidirectionalRange const& rng, BidirectionalIterator result) { - return sprout::move_backward(sprout::begin(rng), sprout::end(rng), result); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_MOVE_BACKWARD_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/next_permutation.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/next_permutation.hpp deleted file mode 100644 index 8ef1b73..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/next_permutation.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_NEXT_PERMUTATION_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_NEXT_PERMUTATION_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // next_permutation - // - template - inline SPROUT_CXX14_CONSTEXPR bool - next_permutation(BidirectionalRange&& rng, Compare comp) { - return sprout::next_permutation(sprout::begin(SPROUT_FORWARD(BidirectionalRange, rng)), sprout::end(SPROUT_FORWARD(BidirectionalRange, rng)), comp); - } - - template - inline SPROUT_CXX14_CONSTEXPR bool - next_permutation(BidirectionalRange&& rng) { - return sprout::next_permutation(sprout::begin(SPROUT_FORWARD(BidirectionalRange, rng)), sprout::end(SPROUT_FORWARD(BidirectionalRange, rng))); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_NEXT_PERMUTATION_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/nth_element.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/nth_element.hpp deleted file mode 100644 index 83a4c81..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/nth_element.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_NTH_ELEMENT_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_NTH_ELEMENT_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // nth_element - // - template - inline SPROUT_CXX14_CONSTEXPR void - nth_element(RandomAccessRange&& rng, typename sprout::container_traits::type>::iterator nth, Compare comp) { - sprout::nth_element(sprout::begin(SPROUT_FORWARD(RandomAccessRange, rng)), nth, sprout::end(SPROUT_FORWARD(RandomAccessRange, rng)), comp); - } - - template - inline SPROUT_CXX14_CONSTEXPR void - nth_element(RandomAccessRange&& rng, typename sprout::container_traits::type>::iterator nth) { - sprout::nth_element(sprout::begin(SPROUT_FORWARD(RandomAccessRange, rng)), nth, sprout::end(SPROUT_FORWARD(RandomAccessRange, rng))); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_NTH_ELEMENT_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/partial_sort.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/partial_sort.hpp deleted file mode 100644 index 876c02e..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/partial_sort.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_PARTIAL_SORT_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_PARTIAL_SORT_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // partial_sort - // - template - inline SPROUT_CXX14_CONSTEXPR void - partial_sort(RandomAccessRange&& rng, typename sprout::container_traits::type>::iterator middle, Compare comp) { - sprout::partial_sort(sprout::begin(SPROUT_FORWARD(RandomAccessRange, rng)), middle, sprout::end(SPROUT_FORWARD(RandomAccessRange, rng)), comp); - } - - template - inline SPROUT_CXX14_CONSTEXPR void - partial_sort(RandomAccessRange&& rng, typename sprout::container_traits::type>::iterator middle) { - sprout::partial_sort(sprout::begin(SPROUT_FORWARD(RandomAccessRange, rng)), middle, sprout::end(SPROUT_FORWARD(RandomAccessRange, rng))); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_PARTIAL_SORT_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/partial_sort_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/partial_sort_copy.hpp deleted file mode 100644 index 5214e72..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/partial_sort_copy.hpp +++ /dev/null @@ -1,73 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_PARTIAL_SORT_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_PARTIAL_SORT_COPY_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // partial_sort_copy - // - template - inline SPROUT_CXX14_CONSTEXPR typename sprout::range::range_return::type - partial_sort_copy(InputRange const& rng1, RandomAccessRange&& rng2, Compare comp) { - return sprout::range::range_return::pack( - sprout::partial_sort_copy( - sprout::begin(rng1), sprout::end(rng1), - sprout::begin(SPROUT_FORWARD(RandomAccessRange, rng2)), sprout::end(SPROUT_FORWARD(RandomAccessRange, rng2)), - comp - ), - SPROUT_FORWARD(RandomAccessRange, rng2) - ); - } - template - inline SPROUT_CXX14_CONSTEXPR typename sprout::range::range_return::type - partial_sort_copy(InputRange const& rng1, RandomAccessRange&& rng2, Compare comp) { - return sprout::range::range_return::pack( - sprout::partial_sort_copy( - sprout::begin(rng1), sprout::end(rng1), - sprout::begin(SPROUT_FORWARD(RandomAccessRange, rng2)), sprout::end(SPROUT_FORWARD(RandomAccessRange, rng2)), - comp - ), - SPROUT_FORWARD(RandomAccessRange, rng2) - ); - } - - template - inline SPROUT_CXX14_CONSTEXPR typename sprout::range::range_return::type - partial_sort_copy(InputRange const& rng1, RandomAccessRange&& rng2) { - return sprout::range::range_return::pack( - sprout::partial_sort_copy( - sprout::begin(rng1), sprout::end(rng1), - sprout::begin(SPROUT_FORWARD(RandomAccessRange, rng2)), sprout::end(SPROUT_FORWARD(RandomAccessRange, rng2)) - ), - SPROUT_FORWARD(RandomAccessRange, rng2) - ); - } - template - inline SPROUT_CXX14_CONSTEXPR typename sprout::range::range_return::type - partial_sort_copy(InputRange const& rng1, RandomAccessRange&& rng2) { - return sprout::range::range_return::pack( - sprout::partial_sort_copy( - sprout::begin(rng1), sprout::end(rng1), - sprout::begin(SPROUT_FORWARD(RandomAccessRange, rng2)), sprout::end(SPROUT_FORWARD(RandomAccessRange, rng2)) - ), - SPROUT_FORWARD(RandomAccessRange, rng2) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_PARTIAL_SORT_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/partition.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/partition.hpp deleted file mode 100644 index 9d39376..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/partition.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_PARTITION_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_PARTITION_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // partition - // - template - inline SPROUT_CXX14_CONSTEXPR typename sprout::range::range_return::type - partition(ForwardRange&& rng, Predicate pred) { - return sprout::range::range_return::pack( - sprout::partition(sprout::begin(SPROUT_FORWARD(ForwardRange, rng)), sprout::end(SPROUT_FORWARD(ForwardRange, rng)), pred), - SPROUT_FORWARD(ForwardRange, rng) - ); - } - - template - inline SPROUT_CXX14_CONSTEXPR typename sprout::range::range_return::type - partition(ForwardRange&& rng, Predicate pred) { - return sprout::range::range_return::pack( - sprout::partition(sprout::begin(SPROUT_FORWARD(ForwardRange, rng)), sprout::end(SPROUT_FORWARD(ForwardRange, rng)), pred), - SPROUT_FORWARD(ForwardRange, rng) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_PARTITION_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/partition_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/partition_copy.hpp deleted file mode 100644 index 90e9432..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/partition_copy.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_PARTITION_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_PARTITION_COPY_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // partition_copy - // - template< - typename InputRange, typename OutputIterator, typename Predicate, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - partition_copy(InputRange const& rng, OutputIterator result, Predicate pred) { - return sprout::partition_copy(sprout::begin(rng), sprout::end(rng), result, pred); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_PARTITION_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/pop_heap.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/pop_heap.hpp deleted file mode 100644 index 730e5b7..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/pop_heap.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_POP_HEAP_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_POP_HEAP_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // pop_heap - // - template - inline SPROUT_CXX14_CONSTEXPR void - pop_heap(RandomAccessRange&& rng, Compare comp) { - sprout::pop_heap(sprout::begin(SPROUT_FORWARD(RandomAccessRange, rng)), sprout::end(SPROUT_FORWARD(RandomAccessRange, rng)), comp); - } - - template - inline SPROUT_CXX14_CONSTEXPR void - pop_heap(RandomAccessRange&& rng) { - sprout::pop_heap(sprout::begin(SPROUT_FORWARD(RandomAccessRange, rng)), sprout::end(SPROUT_FORWARD(RandomAccessRange, rng))); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_POP_HEAP_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/prev_permutation.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/prev_permutation.hpp deleted file mode 100644 index 32f216f..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/prev_permutation.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_PREV_PERMUTATION_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_PREV_PERMUTATION_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // prev_permutation - // - template - inline SPROUT_CXX14_CONSTEXPR bool - prev_permutation(BidirectionalRange&& rng, Compare comp) { - return sprout::prev_permutation(sprout::begin(SPROUT_FORWARD(BidirectionalRange, rng)), sprout::end(SPROUT_FORWARD(BidirectionalRange, rng)), comp); - } - - template - inline SPROUT_CXX14_CONSTEXPR bool - prev_permutation(BidirectionalRange&& rng) { - return sprout::prev_permutation(sprout::begin(SPROUT_FORWARD(BidirectionalRange, rng)), sprout::end(SPROUT_FORWARD(BidirectionalRange, rng))); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_PREV_PERMUTATION_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/push_heap.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/push_heap.hpp deleted file mode 100644 index 7dc1076..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/push_heap.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_PUSH_HEAP_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_PUSH_HEAP_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // push_heap - // - template - inline SPROUT_CXX14_CONSTEXPR void - push_heap(RandomAccessRange&& rng, Compare comp) { - sprout::push_heap(sprout::begin(SPROUT_FORWARD(RandomAccessRange, rng)), sprout::end(SPROUT_FORWARD(RandomAccessRange, rng)), comp); - } - - template - inline SPROUT_CXX14_CONSTEXPR void - push_heap(RandomAccessRange&& rng) { - sprout::push_heap(sprout::begin(SPROUT_FORWARD(RandomAccessRange, rng)), sprout::end(SPROUT_FORWARD(RandomAccessRange, rng))); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_PUSH_HEAP_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/random_shuffle.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/random_shuffle.hpp deleted file mode 100644 index 3cbf9db..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/random_shuffle.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_RANDOM_SHUFFLE_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_RANDOM_SHUFFLE_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // random_shuffle - // - template - inline SPROUT_CXX14_CONSTEXPR void - random_shuffle(RandomAccessRange&& rng, RandomNumberGenerator&& rand) { - sprout::random_shuffle( - sprout::begin(SPROUT_FORWARD(RandomAccessRange, rng)), sprout::end(SPROUT_FORWARD(RandomAccessRange, rng)), - SPROUT_FORWARD(RandomNumberGenerator, rand) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_RANDOM_SHUFFLE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/random_swap.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/random_swap.hpp deleted file mode 100644 index e2dbfd6..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/random_swap.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_RANDOM_SWAP_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_RANDOM_SWAP_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // random_swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - random_swap(RandomAccessRange&& rng, UniformRandomNumberGenerator&& g) { - sprout::random_swap( - sprout::begin(SPROUT_FORWARD(RandomAccessRange, rng)), sprout::end(SPROUT_FORWARD(RandomAccessRange, rng)), - SPROUT_FORWARD(UniformRandomNumberGenerator, g) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_RANDOM_SWAP_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/remove.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/remove.hpp deleted file mode 100644 index 1723a8e..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/remove.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_REMOVE_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_REMOVE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // remove - // - template - inline SPROUT_CXX14_CONSTEXPR typename sprout::range::range_return::type - remove(ForwardRange&& rng, T const& value) { - return sprout::range::range_return::pack( - sprout::remove(sprout::begin(SPROUT_FORWARD(ForwardRange, rng)), sprout::end(SPROUT_FORWARD(ForwardRange, rng)), value), - SPROUT_FORWARD(ForwardRange, rng) - ); - } - - template - inline SPROUT_CXX14_CONSTEXPR typename sprout::range::range_return::type - remove(ForwardRange&& rng, T const& value) { - return sprout::range::range_return::pack( - sprout::remove(sprout::begin(SPROUT_FORWARD(ForwardRange, rng)), sprout::end(SPROUT_FORWARD(ForwardRange, rng)), value), - SPROUT_FORWARD(ForwardRange, rng) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_REMOVE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/remove_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/remove_copy.hpp deleted file mode 100644 index 7229897..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/remove_copy.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_REMOVE_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_REMOVE_COPY_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // remove_copy - // - template< - typename InputRange, typename OutputIterator, typename T, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - remove_copy(InputRange const& rng, OutputIterator result, T const& value) { - return sprout::remove_copy(sprout::begin(rng), sprout::end(rng), result, value); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_REMOVE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/remove_copy_if.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/remove_copy_if.hpp deleted file mode 100644 index 3879bb8..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/remove_copy_if.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_REMOVE_COPY_IF_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_REMOVE_COPY_IF_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // remove_copy_if - // - template< - typename InputRange, typename OutputIterator, typename Predicate, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - remove_copy_if(InputRange const& rng, OutputIterator result, Predicate pred) { - return sprout::remove_copy_if(sprout::begin(rng), sprout::end(rng), result, pred); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_REMOVE_COPY_IF_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/remove_if.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/remove_if.hpp deleted file mode 100644 index 34e5844..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/remove_if.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_REMOVE_IF_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_REMOVE_IF_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // remove_if - // - template - inline SPROUT_CXX14_CONSTEXPR typename sprout::range::range_return::type - remove_if(ForwardRange&& rng, Predicate pred) { - return sprout::range::range_return::pack( - sprout::remove_if(sprout::begin(SPROUT_FORWARD(ForwardRange, rng)), sprout::end(SPROUT_FORWARD(ForwardRange, rng)), pred), - SPROUT_FORWARD(ForwardRange, rng) - ); - } - - template - inline SPROUT_CXX14_CONSTEXPR typename sprout::range::range_return::type - remove_if(ForwardRange&& rng, Predicate pred) { - return sprout::range::range_return::pack( - sprout::remove_if(sprout::begin(SPROUT_FORWARD(ForwardRange, rng)), sprout::end(SPROUT_FORWARD(ForwardRange, rng)), pred), - SPROUT_FORWARD(ForwardRange, rng) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_REMOVE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/replace.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/replace.hpp deleted file mode 100644 index 50e66e8..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/replace.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_REPLACE_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_REPLACE_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // replace - // - template - inline SPROUT_CXX14_CONSTEXPR void - replace(ForwardRange&& rng, T const& old_value, T const& new_value) { - sprout::replace(sprout::begin(SPROUT_FORWARD(ForwardRange, rng)), sprout::end(SPROUT_FORWARD(ForwardRange, rng)), old_value, new_value); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_REPLACE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/replace_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/replace_copy.hpp deleted file mode 100644 index 0d626cd..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/replace_copy.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_REPLACE_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_REPLACE_COPY_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // replace_copy - // - template< - typename InputRange, typename OutputIterator, typename T, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - replace_copy(InputRange const& rng, OutputIterator result, T const& old_value, T const& new_value) { - return sprout::replace_copy(sprout::begin(rng), sprout::end(rng), result, old_value, new_value); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_REPLACE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/replace_copy_if.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/replace_copy_if.hpp deleted file mode 100644 index a3b27e1..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/replace_copy_if.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_REPLACE_COPY_IF_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_REPLACE_COPY_IF_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // replace_copy_if - // - template< - typename InputRange, typename OutputIterator, typename T, typename Predicate, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - replace_copy_if(InputRange const& rng, OutputIterator result, Predicate pred, T const& new_value) { - return sprout::replace_copy_if(sprout::begin(rng), sprout::end(rng), result, pred, new_value); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_REPLACE_COPY_IF_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/replace_if.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/replace_if.hpp deleted file mode 100644 index 701b383..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/replace_if.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_REPLACE_IF_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_REPLACE_IF_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // replace_if - // - template - inline SPROUT_CXX14_CONSTEXPR void - replace_if(ForwardRange&& rng, Predicate pred, T const& new_value) { - sprout::replace_if(sprout::begin(SPROUT_FORWARD(ForwardRange, rng)), sprout::end(SPROUT_FORWARD(ForwardRange, rng)), pred, new_value); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_REPLACE_IF_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/reverse.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/reverse.hpp deleted file mode 100644 index e7f2b13..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/reverse.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_REVERSE_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_REVERSE_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // reverse - // - template - inline SPROUT_CXX14_CONSTEXPR void - reverse(BidirectionalRange&& rng) { - sprout::reverse(sprout::begin(SPROUT_FORWARD(BidirectionalRange, rng)), sprout::end(SPROUT_FORWARD(BidirectionalRange, rng))); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_REVERSE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/reverse_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/reverse_copy.hpp deleted file mode 100644 index b0d1979..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/reverse_copy.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_REVERSE_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_REVERSE_COPY_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // reverse_copy - // - template< - typename BidirectionalRange, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - reverse_copy(BidirectionalRange const& rng, OutputIterator result) { - return sprout::reverse_copy(sprout::begin(rng), sprout::end(rng), result); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_REVERSE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/rotate.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/rotate.hpp deleted file mode 100644 index 6ad2f9b..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/rotate.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_ROTATE_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_ROTATE_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // rotate - // - template - inline SPROUT_CXX14_CONSTEXPR typename sprout::range::range_return::type - rotate(ForwardRange&& rng, typename sprout::container_traits::type>::iterator middle) { - return sprout::range::range_return::pack( - sprout::rotate(sprout::begin(SPROUT_FORWARD(ForwardRange, rng)), middle, sprout::end(SPROUT_FORWARD(ForwardRange, rng))), - SPROUT_FORWARD(ForwardRange, rng) - ); - } - - template - inline SPROUT_CXX14_CONSTEXPR typename sprout::range::range_return::type - rotate(ForwardRange&& rng, typename sprout::container_traits::type>::iterator middle) { - return sprout::range::range_return::pack( - sprout::rotate(sprout::begin(SPROUT_FORWARD(ForwardRange, rng)), middle, sprout::end(SPROUT_FORWARD(ForwardRange, rng))), - SPROUT_FORWARD(ForwardRange, rng) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_ROTATE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/rotate_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/rotate_copy.hpp deleted file mode 100644 index e4780b4..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/rotate_copy.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_ROTATE_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_ROTATE_COPY_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // rotate_copy - // - template< - typename ForwardRange, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - rotate_copy( - ForwardRange const& rng, typename sprout::container_traits::const_iterator middle, - OutputIterator result - ) - { - return sprout::rotate_copy(sprout::begin(rng), middle, sprout::end(rng), result); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_ROTATE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/sample.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/sample.hpp deleted file mode 100644 index 326d77e..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/sample.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_SAMPLE_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_SAMPLE_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // sample - // - template< - typename PopRange, typename SampleIterator, typename Size, typename URNG, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR SampleIterator - sample(PopRange const& rng, SampleIterator out, Size n, URNG&& g) { - return sprout::sample(sprout::begin(rng), sprout::end(rng), out, n, SPROUT_FORWARD(URNG, g)); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_SAMPLE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/set_difference.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/set_difference.hpp deleted file mode 100644 index 90735e0..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/set_difference.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_SET_DIFFERENCE_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_SET_DIFFERENCE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // set_difference - // - template< - typename InputRange1, typename InputRange2, typename OutputIterator, typename Compare, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - set_difference(InputRange1 const& rng1, InputRange2 const& rng2, OutputIterator result, Compare comp) { - return sprout::set_difference(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), result, comp); - } - template< - typename InputRange1, typename InputRange2, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - set_difference(InputRange1 const& rng1, InputRange2 const& rng2, OutputIterator result) { - return sprout::set_difference(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), result); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_SET_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/set_intersection.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/set_intersection.hpp deleted file mode 100644 index 4929c96..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/set_intersection.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_SET_INTERSECTION_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_SET_INTERSECTION_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // set_intersection - // - template< - typename InputRange1, typename InputRange2, typename OutputIterator, typename Compare, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - set_intersection(InputRange1 const& rng1, InputRange2 const& rng2, OutputIterator result, Compare comp) { - return sprout::set_intersection(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), result, comp); - } - template< - typename InputRange1, typename InputRange2, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - set_intersection(InputRange1 const& rng1, InputRange2 const& rng2, OutputIterator result) { - return sprout::set_intersection(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), result); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_SET_INTERSECTION_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/set_symmetric_difference.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/set_symmetric_difference.hpp deleted file mode 100644 index bdda66c..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/set_symmetric_difference.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_SET_SYMMETRIC_DIFFERENCE_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_SET_SYMMETRIC_DIFFERENCE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // set_symmetric_difference - // - template< - typename InputRange1, typename InputRange2, typename OutputIterator, typename Compare, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - set_symmetric_difference(InputRange1 const& rng1, InputRange2 const& rng2, OutputIterator result, Compare comp) { - return sprout::set_symmetric_difference(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), result, comp); - } - template< - typename InputRange1, typename InputRange2, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - set_symmetric_difference(InputRange1 const& rng1, InputRange2 const& rng2, OutputIterator result) { - return sprout::set_symmetric_difference(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), result); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_SET_SYMMETRIC_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/set_union.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/set_union.hpp deleted file mode 100644 index df5b362..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/set_union.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_SET_UNION_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_SET_UNION_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // set_union - // - template< - typename InputRange1, typename InputRange2, typename OutputIterator, typename Compare, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - set_union(InputRange1 const& rng1, InputRange2 const& rng2, OutputIterator result, Compare comp) { - return sprout::set_union(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), result, comp); - } - template< - typename InputRange1, typename InputRange2, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - set_union(InputRange1 const& rng1, InputRange2 const& rng2, OutputIterator result) { - return sprout::set_union(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), result); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_SET_UNION_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/shuffle.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/shuffle.hpp deleted file mode 100644 index 4ca3f27..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/shuffle.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_SHUFFLE_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_SHUFFLE_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // shuffle - // - template - inline SPROUT_CXX14_CONSTEXPR void - shuffle(RandomAccessRange&& rng, UniformRandomNumberGenerator&& g) { - sprout::shuffle( - sprout::begin(SPROUT_FORWARD(RandomAccessRange, rng)), sprout::end(SPROUT_FORWARD(RandomAccessRange, rng)), - SPROUT_FORWARD(UniformRandomNumberGenerator, g) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_SHUFFLE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/sort.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/sort.hpp deleted file mode 100644 index 6d08078..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/sort.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_SORT_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_SORT_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // sort - // - template - inline SPROUT_CXX14_CONSTEXPR void - sort(RandomAccessRange&& rng, Compare comp) { - sprout::sort(sprout::begin(SPROUT_FORWARD(RandomAccessRange, rng)), sprout::end(SPROUT_FORWARD(RandomAccessRange, rng)), comp); - } - - template - inline SPROUT_CXX14_CONSTEXPR void - sort(RandomAccessRange&& rng) { - sprout::sort(sprout::begin(SPROUT_FORWARD(RandomAccessRange, rng)), sprout::end(SPROUT_FORWARD(RandomAccessRange, rng))); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_SORT_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/sort_heap.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/sort_heap.hpp deleted file mode 100644 index 206df05..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/sort_heap.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_SORT_HEAP_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_SORT_HEAP_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // sort_heap - // - template - inline SPROUT_CXX14_CONSTEXPR void - sort_heap(RandomAccessRange&& rng, Compare comp) { - sprout::sort_heap(sprout::begin(SPROUT_FORWARD(RandomAccessRange, rng)), sprout::end(SPROUT_FORWARD(RandomAccessRange, rng)), comp); - } - - template - inline SPROUT_CXX14_CONSTEXPR void - sort_heap(RandomAccessRange&& rng) { - sprout::sort_heap(sprout::begin(SPROUT_FORWARD(RandomAccessRange, rng)), sprout::end(SPROUT_FORWARD(RandomAccessRange, rng))); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_SORT_HEAP_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/stable_partition.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/stable_partition.hpp deleted file mode 100644 index 19735bd..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/stable_partition.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_STABLE_PARTITION_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_STABLE_PARTITION_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // stable_partition - // - template - inline SPROUT_CXX14_CONSTEXPR typename sprout::range::range_return::type - stable_partition(BidirectionalRange&& rng, Predicate pred) { - return sprout::range::range_return::pack( - sprout::stable_partition(sprout::begin(SPROUT_FORWARD(BidirectionalRange, rng)), sprout::end(SPROUT_FORWARD(BidirectionalRange, rng)), pred), - SPROUT_FORWARD(BidirectionalRange, rng) - ); - } - - template - inline SPROUT_CXX14_CONSTEXPR typename sprout::range::range_return::type - stable_partition(BidirectionalRange&& rng, Predicate pred) { - return sprout::range::range_return::pack( - sprout::stable_partition(sprout::begin(SPROUT_FORWARD(BidirectionalRange, rng)), sprout::end(SPROUT_FORWARD(BidirectionalRange, rng)), pred), - SPROUT_FORWARD(BidirectionalRange, rng) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_STABLE_PARTITION_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/stable_sort.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/stable_sort.hpp deleted file mode 100644 index 7a04a5b..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/stable_sort.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_STABLE_SORT_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_STABLE_SORT_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // stable_sort - // - template - inline SPROUT_CXX14_CONSTEXPR void - stable_sort(RandomAccessRange&& rng, Compare comp) { - sprout::stable_sort(sprout::begin(SPROUT_FORWARD(RandomAccessRange, rng)), sprout::end(SPROUT_FORWARD(RandomAccessRange, rng)), comp); - } - - template - inline SPROUT_CXX14_CONSTEXPR void - stable_sort(RandomAccessRange&& rng) { - sprout::stable_sort(sprout::begin(SPROUT_FORWARD(RandomAccessRange, rng)), sprout::end(SPROUT_FORWARD(RandomAccessRange, rng))); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_STABLE_SORT_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/swap_ranges.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/swap_ranges.hpp deleted file mode 100644 index 01da7e1..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/swap_ranges.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_SWAP_RANGES_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_SWAP_RANGES_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // swap_ranges - // - template - inline SPROUT_CXX14_CONSTEXPR typename sprout::range::range_return::type - swap_ranges(ForwardRange1&& rng1, ForwardRange2&& rng2) { - return sprout::range::range_return::pack( - sprout::swap_ranges( - sprout::begin(SPROUT_FORWARD(ForwardRange1, rng1)), sprout::end(SPROUT_FORWARD(ForwardRange1, rng1)), - sprout::begin(SPROUT_FORWARD(ForwardRange2, rng2)) - ), - SPROUT_FORWARD(ForwardRange2, rng2) - ); - } - - template - inline SPROUT_CXX14_CONSTEXPR typename sprout::range::range_return::type - swap_ranges(ForwardRange1&& rng1, ForwardRange2&& rng2) { - return sprout::range::range_return::pack( - sprout::swap_ranges( - sprout::begin(SPROUT_FORWARD(ForwardRange1, rng1)), sprout::end(SPROUT_FORWARD(ForwardRange1, rng1)), - sprout::begin(SPROUT_FORWARD(ForwardRange2, rng2)) - ), - SPROUT_FORWARD(ForwardRange2, rng2) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_SWAP_RANGES_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/transform.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/transform.hpp deleted file mode 100644 index beb235c..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/transform.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_TRANSFORM_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_TRANSFORM_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // transform - // - template< - typename InputRange, typename OutputIterator, typename UnaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - transform(InputRange const& rng, OutputIterator result, UnaryOperation op) { - return sprout::transform(sprout::begin(rng), sprout::end(rng), result, op); - } - template< - typename InputRange1, typename InputRange2, typename OutputIterator, typename BinaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - transform(InputRange1 const& rng1, InputRange2 const& rng2, OutputIterator result, BinaryOperation op) { - return sprout::transform(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), result, op); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_TRANSFORM_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/unique.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/unique.hpp deleted file mode 100644 index d9ad8d1..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/unique.hpp +++ /dev/null @@ -1,58 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_UNIQUE_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_UNIQUE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // unique - // - template - inline SPROUT_CXX14_CONSTEXPR typename sprout::range::range_return::type - unique(ForwardRange&& rng) { - return sprout::range::range_return::pack( - sprout::unique(sprout::begin(SPROUT_FORWARD(ForwardRange, rng)), sprout::end(SPROUT_FORWARD(ForwardRange, rng))), - SPROUT_FORWARD(ForwardRange, rng) - ); - } - template - inline SPROUT_CXX14_CONSTEXPR typename sprout::range::range_return::type - unique(ForwardRange&& rng) { - return sprout::range::range_return::pack( - sprout::unique(sprout::begin(SPROUT_FORWARD(ForwardRange, rng)), sprout::end(SPROUT_FORWARD(ForwardRange, rng))), - SPROUT_FORWARD(ForwardRange, rng) - ); - } - - template - inline SPROUT_CXX14_CONSTEXPR typename sprout::range::range_return::type - unique(ForwardRange&& rng, BinaryPredicate pred) { - return sprout::range::range_return::pack( - sprout::unique(sprout::begin(SPROUT_FORWARD(ForwardRange, rng)), sprout::end(SPROUT_FORWARD(ForwardRange, rng)), pred), - SPROUT_FORWARD(ForwardRange, rng) - ); - } - template - inline SPROUT_CXX14_CONSTEXPR typename sprout::range::range_return::type - unique(ForwardRange&& rng, BinaryPredicate pred) { - return sprout::range::range_return::pack( - sprout::unique(sprout::begin(SPROUT_FORWARD(ForwardRange, rng)), sprout::end(SPROUT_FORWARD(ForwardRange, rng)), pred), - SPROUT_FORWARD(ForwardRange, rng) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_UNIQUE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/cxx14/unique_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/cxx14/unique_copy.hpp deleted file mode 100644 index 22894fd..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/cxx14/unique_copy.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_CXX14_UNIQUE_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_CXX14_UNIQUE_COPY_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // unique_copy - // - template< - typename InputRange, typename OutputIterator, typename BinaryPredicate, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - unique_copy(InputRange const& rng, OutputIterator result, BinaryPredicate pred) { - return sprout::unique_copy(sprout::begin(rng), sprout::end(rng), result, pred); - } - template< - typename InputRange, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - unique_copy(InputRange const& rng, OutputIterator result) { - return sprout::unique_copy(sprout::begin(rng), sprout::end(rng), result); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_CXX14_UNIQUE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/equal.hpp b/dsp/lib/sprout/sprout/range/algorithm/equal.hpp deleted file mode 100644 index d214e5d..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/equal.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_EQUAL_HPP -#define SPROUT_RANGE_ALGORITHM_EQUAL_HPP - -#include -#include -#include - -namespace sprout { - namespace range { - - // 25.2.11 Equal - template - inline SPROUT_CONSTEXPR bool - equal(InputRange1 const& range1, InputRange2 const& range2) { - return sprout::equal(sprout::begin(range1), sprout::end(range1), sprout::begin(range2)); - } - - template - inline SPROUT_CONSTEXPR bool - equal(InputRange1 const& range1, InputRange2 const& range2, BinaryPredicate pred) { - return sprout::equal(sprout::begin(range1), sprout::end(range1), sprout::begin(range2), pred); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_EQUAL_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/equal_range.hpp b/dsp/lib/sprout/sprout/range/algorithm/equal_range.hpp deleted file mode 100644 index a5541af..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/equal_range.hpp +++ /dev/null @@ -1,59 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_EQUAL_RANGE_HPP -#define SPROUT_RANGE_ALGORITHM_EQUAL_RANGE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace detail { - template - inline SPROUT_CONSTEXPR typename sprout::range::lvalue_range::type - pair_to_range(Pair const& pair) { - return {pair.first, pair.second}; - } - } // namespace detail - - - // 25.4.3.3 equal_range - template - inline SPROUT_CONSTEXPR typename sprout::range::lvalue_range::type - equal_range(ForwardRange&& range, T const& value) { - return sprout::range::detail::pair_to_range( - sprout::equal_range( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)), - value - ) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::lvalue_range::type - equal_range(ForwardRange&& range, T const& value, Compare comp) { - return sprout::range::detail::pair_to_range( - sprout::equal_range( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)), - value, - comp - ) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_EQUAL_RANGE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fill.hpp b/dsp/lib/sprout/sprout/range/algorithm/fill.hpp deleted file mode 100644 index 6829289..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fill.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FILL_HPP -#define SPROUT_RANGE_ALGORITHM_FILL_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FILL_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/find.hpp b/dsp/lib/sprout/sprout/range/algorithm/find.hpp deleted file mode 100644 index 4c6f824..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/find.hpp +++ /dev/null @@ -1,52 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIND_HPP -#define SPROUT_RANGE_ALGORITHM_FIND_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - - // 25.2.5 Find - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - find(InputRange&& range, T const& value) { - return sprout::range::range_return::pack( - sprout::find( - sprout::begin(SPROUT_FORWARD(InputRange, range)), - sprout::end(SPROUT_FORWARD(InputRange, range)), - value - ), - SPROUT_FORWARD(InputRange, range) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - find(InputRange&& range, T const& value) { - return sprout::range::range_return::pack( - sprout::find( - sprout::begin(SPROUT_FORWARD(InputRange, range)), - sprout::end(SPROUT_FORWARD(InputRange, range)), - value - ), - SPROUT_FORWARD(InputRange, range) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIND_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/find_difference.hpp b/dsp/lib/sprout/sprout/range/algorithm/find_difference.hpp deleted file mode 100644 index b040c2f..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/find_difference.hpp +++ /dev/null @@ -1,54 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIND_DIFFERENCE_HPP -#define SPROUT_RANGE_ALGORITHM_FIND_DIFFERENCE_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // find_difference - // - template - inline SPROUT_CONSTEXPR sprout::pair< - typename sprout::range::lvalue_iterator::type, - typename sprout::range::lvalue_iterator::type - > - find_difference(InputRange1&& range1, InputRange2&& range2, Compare comp) { - return sprout::find_difference( - sprout::begin(SPROUT_FORWARD(InputRange1, range1)), - sprout::end(SPROUT_FORWARD(InputRange1, range1)), - sprout::begin(SPROUT_FORWARD(InputRange2, range2)), - sprout::end(SPROUT_FORWARD(InputRange2, range2)), - comp - ); - } - - template - inline SPROUT_CONSTEXPR sprout::pair< - typename sprout::range::lvalue_iterator::type, - typename sprout::range::lvalue_iterator::type - > - find_difference(InputRange1&& range1, InputRange2&& range2) { - return sprout::find_difference( - sprout::begin(SPROUT_FORWARD(InputRange1, range1)), - sprout::end(SPROUT_FORWARD(InputRange1, range1)), - sprout::begin(SPROUT_FORWARD(InputRange2, range2)), - sprout::end(SPROUT_FORWARD(InputRange2, range2)) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIND_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/find_end.hpp b/dsp/lib/sprout/sprout/range/algorithm/find_end.hpp deleted file mode 100644 index 996a202..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/find_end.hpp +++ /dev/null @@ -1,84 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIND_END_HPP -#define SPROUT_RANGE_ALGORITHM_FIND_END_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - - // 25.2.6 Find end - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - find_end(ForwardRange1&& range1, ForwardRange2&& range2) { - return sprout::range::range_return::pack( - sprout::find_end( - sprout::begin(SPROUT_FORWARD(ForwardRange1, range1)), - sprout::end(SPROUT_FORWARD(ForwardRange1, range1)), - sprout::begin(SPROUT_FORWARD(ForwardRange2, range2)), - sprout::end(SPROUT_FORWARD(ForwardRange2, range2)) - ), - SPROUT_FORWARD(ForwardRange1, range1) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - find_end(ForwardRange1&& range1, ForwardRange2&& range2, BinaryPredicate pred) { - return sprout::range::range_return::pack( - sprout::find_end( - sprout::begin(SPROUT_FORWARD(ForwardRange1, range1)), - sprout::end(SPROUT_FORWARD(ForwardRange1, range1)), - sprout::begin(SPROUT_FORWARD(ForwardRange2, range2)), - sprout::end(SPROUT_FORWARD(ForwardRange2, range2)), - pred - ), - SPROUT_FORWARD(ForwardRange1, range1) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - find_end(ForwardRange1&& range1, ForwardRange2&& range2) { - return sprout::range::range_return::pack( - sprout::find_end( - sprout::begin(SPROUT_FORWARD(ForwardRange1, range1)), - sprout::end(SPROUT_FORWARD(ForwardRange1, range1)), - sprout::begin(SPROUT_FORWARD(ForwardRange2, range2)), - sprout::end(SPROUT_FORWARD(ForwardRange2, range2)) - ), - SPROUT_FORWARD(ForwardRange1, range1) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - find_end(ForwardRange1&& range1, ForwardRange2&& range2, BinaryPredicate pred) { - return sprout::range::range_return::pack( - sprout::find_end( - sprout::begin(SPROUT_FORWARD(ForwardRange1, range1)), - sprout::end(SPROUT_FORWARD(ForwardRange1, range1)), - sprout::begin(SPROUT_FORWARD(ForwardRange2, range2)), - sprout::end(SPROUT_FORWARD(ForwardRange2, range2)), - pred - ), - SPROUT_FORWARD(ForwardRange1, range1) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIND_END_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/find_first_of.hpp b/dsp/lib/sprout/sprout/range/algorithm/find_first_of.hpp deleted file mode 100644 index b90ae0e..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/find_first_of.hpp +++ /dev/null @@ -1,84 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIND_FIRST_OF_HPP -#define SPROUT_RANGE_ALGORITHM_FIND_FIRST_OF_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - - // 25.2.7 Find first - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - find_first_of(InputRange1&& range1, InputRange2&& range2) { - return sprout::range::range_return::pack( - sprout::find_first_of( - sprout::begin(SPROUT_FORWARD(InputRange1, range1)), - sprout::end(SPROUT_FORWARD(InputRange1, range1)), - sprout::begin(SPROUT_FORWARD(InputRange2, range2)), - sprout::end(SPROUT_FORWARD(InputRange2, range2)) - ), - SPROUT_FORWARD(InputRange1, range1) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - find_first_of(InputRange1&& range1, InputRange2&& range2, BinaryPredicate pred) { - return sprout::range::range_return::pack( - sprout::find_first_of( - sprout::begin(SPROUT_FORWARD(InputRange1, range1)), - sprout::end(SPROUT_FORWARD(InputRange1, range1)), - sprout::begin(SPROUT_FORWARD(InputRange2, range2)), - sprout::end(SPROUT_FORWARD(InputRange2, range2)), - pred - ), - SPROUT_FORWARD(InputRange1, range1) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - find_first_of(InputRange1&& range1, InputRange2&& range2) { - return sprout::range::range_return::pack( - sprout::find_first_of( - sprout::begin(SPROUT_FORWARD(InputRange1, range1)), - sprout::end(SPROUT_FORWARD(InputRange1, range1)), - sprout::begin(SPROUT_FORWARD(InputRange2, range2)), - sprout::end(SPROUT_FORWARD(InputRange2, range2)) - ), - SPROUT_FORWARD(InputRange1, range1) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - find_first_of(InputRange1&& range1, InputRange2&& range2, BinaryPredicate pred) { - return sprout::range::range_return::pack( - sprout::find_first_of( - sprout::begin(SPROUT_FORWARD(InputRange1, range1)), - sprout::end(SPROUT_FORWARD(InputRange1, range1)), - sprout::begin(SPROUT_FORWARD(InputRange2, range2)), - sprout::end(SPROUT_FORWARD(InputRange2, range2)), - pred - ), - SPROUT_FORWARD(InputRange1, range1) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIND_FIRST_OF_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/find_if.hpp b/dsp/lib/sprout/sprout/range/algorithm/find_if.hpp deleted file mode 100644 index 538061d..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/find_if.hpp +++ /dev/null @@ -1,52 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIND_IF_HPP -#define SPROUT_RANGE_ALGORITHM_FIND_IF_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - - // 25.2.5 Find - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - find_if(InputRange&& range, Predicate pred) { - return sprout::range::range_return::pack( - sprout::find_if( - sprout::begin(SPROUT_FORWARD(InputRange, range)), - sprout::end(SPROUT_FORWARD(InputRange, range)), - pred - ), - SPROUT_FORWARD(InputRange, range) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - find_if(InputRange&& range, Predicate pred) { - return sprout::range::range_return::pack( - sprout::find_if( - sprout::begin(SPROUT_FORWARD(InputRange, range)), - sprout::end(SPROUT_FORWARD(InputRange, range)), - pred - ), - SPROUT_FORWARD(InputRange, range) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIND_IF_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/find_if_not.hpp b/dsp/lib/sprout/sprout/range/algorithm/find_if_not.hpp deleted file mode 100644 index 5194b2c..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/find_if_not.hpp +++ /dev/null @@ -1,52 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIND_IF_NOT_HPP -#define SPROUT_RANGE_ALGORITHM_FIND_IF_NOT_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - - // 25.2.5 Find - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - find_if_not(InputRange&& range, Predicate pred) { - return sprout::range::range_return::pack( - sprout::find_if_not( - sprout::begin(SPROUT_FORWARD(InputRange, range)), - sprout::end(SPROUT_FORWARD(InputRange, range)), - pred - ), - SPROUT_FORWARD(InputRange, range) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - find_if_not(InputRange&& range, Predicate pred) { - return sprout::range::range_return::pack( - sprout::find_if_not( - sprout::begin(SPROUT_FORWARD(InputRange, range)), - sprout::end(SPROUT_FORWARD(InputRange, range)), - pred - ), - SPROUT_FORWARD(InputRange, range) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIND_IF_NOT_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/find_intersection.hpp b/dsp/lib/sprout/sprout/range/algorithm/find_intersection.hpp deleted file mode 100644 index 17d4367..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/find_intersection.hpp +++ /dev/null @@ -1,54 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIND_INTERSECTION_HPP -#define SPROUT_RANGE_ALGORITHM_FIND_INTERSECTION_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // find_intersection - // - template - inline SPROUT_CONSTEXPR sprout::pair< - typename sprout::range::lvalue_iterator::type, - typename sprout::range::lvalue_iterator::type - > - find_intersection(InputRange1&& range1, InputRange2&& range2, Compare comp) { - return sprout::find_intersection( - sprout::begin(SPROUT_FORWARD(InputRange1, range1)), - sprout::end(SPROUT_FORWARD(InputRange1, range1)), - sprout::begin(SPROUT_FORWARD(InputRange2, range2)), - sprout::end(SPROUT_FORWARD(InputRange2, range2)), - comp - ); - } - - template - inline SPROUT_CONSTEXPR sprout::pair< - typename sprout::range::lvalue_iterator::type, - typename sprout::range::lvalue_iterator::type - > - find_intersection(InputRange1&& range1, InputRange2&& range2) { - return sprout::find_intersection( - sprout::begin(SPROUT_FORWARD(InputRange1, range1)), - sprout::end(SPROUT_FORWARD(InputRange1, range1)), - sprout::begin(SPROUT_FORWARD(InputRange2, range2)), - sprout::end(SPROUT_FORWARD(InputRange2, range2)) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIND_INTERSECTION_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/find_symmetric_difference.hpp b/dsp/lib/sprout/sprout/range/algorithm/find_symmetric_difference.hpp deleted file mode 100644 index 88c8677..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/find_symmetric_difference.hpp +++ /dev/null @@ -1,54 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIND_SYMMETRIC_DIFFERENCE_HPP -#define SPROUT_RANGE_ALGORITHM_FIND_SYMMETRIC_DIFFERENCE_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // find_symmetric_difference - // - template - inline SPROUT_CONSTEXPR sprout::pair< - typename sprout::range::lvalue_iterator::type, - typename sprout::range::lvalue_iterator::type - > - find_symmetric_difference(InputRange1&& range1, InputRange2&& range2, Compare comp) { - return sprout::find_symmetric_difference( - sprout::begin(SPROUT_FORWARD(InputRange1, range1)), - sprout::end(SPROUT_FORWARD(InputRange1, range1)), - sprout::begin(SPROUT_FORWARD(InputRange2, range2)), - sprout::end(SPROUT_FORWARD(InputRange2, range2)), - comp - ); - } - - template - inline SPROUT_CONSTEXPR sprout::pair< - typename sprout::range::lvalue_iterator::type, - typename sprout::range::lvalue_iterator::type - > - find_symmetric_difference(InputRange1&& range1, InputRange2&& range2) { - return sprout::find_symmetric_difference( - sprout::begin(SPROUT_FORWARD(InputRange1, range1)), - sprout::end(SPROUT_FORWARD(InputRange1, range1)), - sprout::begin(SPROUT_FORWARD(InputRange2, range2)), - sprout::end(SPROUT_FORWARD(InputRange2, range2)) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIND_SYMMETRIC_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fit.hpp b/dsp/lib/sprout/sprout/range/algorithm/fit.hpp deleted file mode 100644 index ac8e7eb..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fit.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIT_HPP -#define SPROUT_RANGE_ALGORITHM_FIT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIT_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fit/clamp_range_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/fit/clamp_range_copy.hpp deleted file mode 100644 index 4d9f1c6..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fit/clamp_range_copy.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIT_CLAMP_RANGE_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_FIT_CLAMP_RANGE_COPY_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fit { - // - // clamp_range_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - clamp_range_copy( - InputRange const& rng, Result const& result, - typename sprout::container_traits::value_type const& low, - typename sprout::container_traits::value_type const& high, - Compare comp - ) - { - return sprout::fit::clamp_range_copy(sprout::begin(rng), sprout::end(rng), result, low, high, comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - clamp_range_copy( - InputRange const& rng, Result const& result, - typename sprout::container_traits::value_type const& low, - typename sprout::container_traits::value_type const& high - ) - { - return sprout::fit::clamp_range_copy(sprout::begin(rng), sprout::end(rng), result, low, high); - } - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIT_CLAMP_RANGE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fit/copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/fit/copy.hpp deleted file mode 100644 index 3b4a1e0..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fit/copy.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIT_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_FIT_COPY_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fit { - // - // copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - copy(InputRange const& rng, Result const& result) { - return sprout::fit::copy(sprout::begin(rng), sprout::end(rng), result); - } - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIT_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fit/copy_backward.hpp b/dsp/lib/sprout/sprout/range/algorithm/fit/copy_backward.hpp deleted file mode 100644 index 853e119..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fit/copy_backward.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIT_COPY_BACKWARD_HPP -#define SPROUT_RANGE_ALGORITHM_FIT_COPY_BACKWARD_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fit { - // - // copy_backward - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - copy_backward(BidirectionalRange const& rng, Result const& result) { - return sprout::fit::copy_backward(sprout::begin(rng), sprout::end(rng), result); - } - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIT_COPY_BACKWARD_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fit/copy_if.hpp b/dsp/lib/sprout/sprout/range/algorithm/fit/copy_if.hpp deleted file mode 100644 index 910e15b..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fit/copy_if.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIT_COPY_IF_HPP -#define SPROUT_RANGE_ALGORITHM_FIT_COPY_IF_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fit { - // - // copy_if - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - copy_if(InputRange const& rng, Result const& result, Predicate pred) { - return sprout::fit::copy_if(sprout::begin(rng), sprout::end(rng), result, pred); - } - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIT_COPY_IF_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fit/copy_until.hpp b/dsp/lib/sprout/sprout/range/algorithm/fit/copy_until.hpp deleted file mode 100644 index 9d10b84..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fit/copy_until.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIT_COPY_UNTIL_HPP -#define SPROUT_RANGE_ALGORITHM_FIT_COPY_UNTIL_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fit { - // - // copy_until - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - copy_until(InputRange const& rng, Result const& result, Predicate pred) { - return sprout::fit::copy_until(sprout::begin(rng), sprout::end(rng), result, pred); - } - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIT_COPY_UNTIL_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fit/copy_while.hpp b/dsp/lib/sprout/sprout/range/algorithm/fit/copy_while.hpp deleted file mode 100644 index e427c78..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fit/copy_while.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIT_COPY_WHILE_HPP -#define SPROUT_RANGE_ALGORITHM_FIT_COPY_WHILE_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fit { - // - // copy_while - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - copy_while(InputRange const& rng, Result const& result, Predicate pred) { - return sprout::fit::copy_while(sprout::begin(rng), sprout::end(rng), result, pred); - } - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIT_COPY_WHILE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fit/merge.hpp b/dsp/lib/sprout/sprout/range/algorithm/fit/merge.hpp deleted file mode 100644 index b843493..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fit/merge.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIT_MERGE_HPP -#define SPROUT_RANGE_ALGORITHM_FIT_MERGE_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fit { - // - // merge - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - merge(InputRange1 const& rng1, InputRange2 const& rng2, Result const& result, Compare comp) { - return sprout::fit::merge(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), result, comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - merge(InputRange1 const& rng1, InputRange2 const& rng2, Result const& result) { - return sprout::fit::merge(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), result); - } - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIT_MERGE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fit/partition_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/fit/partition_copy.hpp deleted file mode 100644 index ae877f1..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fit/partition_copy.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIT_PARTITION_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_FIT_PARTITION_COPY_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fit { - // - // partition_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - partition_copy(InputRange const& rng, Result const& result, Predicate pred) { - return sprout::fit::partition_copy(sprout::begin(rng), sprout::end(rng), result, pred); - } - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIT_PARTITION_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fit/remove_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/fit/remove_copy.hpp deleted file mode 100644 index 2f327a6..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fit/remove_copy.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIT_REMOVE_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_FIT_REMOVE_COPY_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fit { - // - // remove_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - remove_copy(InputRange const& rng, Result const& result, T const& value) { - return sprout::fit::remove_copy(sprout::begin(rng), sprout::end(rng), result, value); - } - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIT_REMOVE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fit/remove_copy_if.hpp b/dsp/lib/sprout/sprout/range/algorithm/fit/remove_copy_if.hpp deleted file mode 100644 index 749db7d..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fit/remove_copy_if.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIT_REMOVE_COPY_IF_HPP -#define SPROUT_RANGE_ALGORITHM_FIT_REMOVE_COPY_IF_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fit { - // - // remove_copy_if - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - remove_copy_if(InputRange const& rng, Result const& result, Predicate pred) { - return sprout::fit::remove_copy_if(sprout::begin(rng), sprout::end(rng), result, pred); - } - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIT_REMOVE_COPY_IF_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fit/replace_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/fit/replace_copy.hpp deleted file mode 100644 index 35ef6bc..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fit/replace_copy.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIT_REPLACE_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_FIT_REPLACE_COPY_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fit { - // - // replace_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - replace_copy(InputRange const& rng, Result const& result, T const& old_value, T const& new_value) { - return sprout::fit::replace_copy(sprout::begin(rng), sprout::end(rng), result, old_value, new_value); - } - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIT_REPLACE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fit/replace_copy_if.hpp b/dsp/lib/sprout/sprout/range/algorithm/fit/replace_copy_if.hpp deleted file mode 100644 index 6740f12..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fit/replace_copy_if.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIT_REPLACE_COPY_IF_HPP -#define SPROUT_RANGE_ALGORITHM_FIT_REPLACE_COPY_IF_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fit { - // - // replace_copy_if - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - replace_copy_if(InputRange const& rng, Result const& result, Predicate pred, T const& new_value) { - return sprout::fit::replace_copy_if(sprout::begin(rng), sprout::end(rng), result, pred, new_value); - } - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIT_REPLACE_COPY_IF_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fit/reverse_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/fit/reverse_copy.hpp deleted file mode 100644 index 68d6751..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fit/reverse_copy.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIT_REVERSE_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_FIT_REVERSE_COPY_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fit { - // - // reverse_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - reverse_copy(BidirectionalRange const& rng, Result const& result) { - return sprout::fit::reverse_copy(sprout::begin(rng), sprout::end(rng), result); - } - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIT_REVERSE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fit/rotate_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/fit/rotate_copy.hpp deleted file mode 100644 index c848ddf..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fit/rotate_copy.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIT_ROTATE_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_FIT_ROTATE_COPY_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fit { - // - // rotate_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - rotate_copy( - ForwardRange const& rng, typename sprout::container_traits::const_iterator middle, - Result const& result - ) - { - return sprout::fit::rotate_copy(sprout::begin(rng), middle, sprout::end(rng), result); - } - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIT_ROTATE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fit/set_difference.hpp b/dsp/lib/sprout/sprout/range/algorithm/fit/set_difference.hpp deleted file mode 100644 index 1e0bca0..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fit/set_difference.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIT_SET_DIFFERENCE_HPP -#define SPROUT_RANGE_ALGORITHM_FIT_SET_DIFFERENCE_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fit { - // - // set_difference - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_difference(InputRange1 const& rng1, InputRange2 const& rng2, Result const& result, Compare comp) { - return sprout::fit::set_difference(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), result, comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_difference(InputRange1 const& rng1, InputRange2 const& rng2, Result const& result) { - return sprout::fit::set_difference(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), result); - } - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIT_SET_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fit/set_intersection.hpp b/dsp/lib/sprout/sprout/range/algorithm/fit/set_intersection.hpp deleted file mode 100644 index 970a2df..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fit/set_intersection.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIT_SET_INTERSECTION_HPP -#define SPROUT_RANGE_ALGORITHM_FIT_SET_INTERSECTION_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fit { - // - // set_intersection - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_intersection(InputRange1 const& rng1, InputRange2 const& rng2, Result const& result, Compare comp) { - return sprout::fit::set_intersection(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), result, comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_intersection(InputRange1 const& rng1, InputRange2 const& rng2, Result const& result) { - return sprout::fit::set_intersection(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), result); - } - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIT_SET_INTERSECTION_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fit/set_symmetric_difference.hpp b/dsp/lib/sprout/sprout/range/algorithm/fit/set_symmetric_difference.hpp deleted file mode 100644 index b8cabb0..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fit/set_symmetric_difference.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIT_SET_SYMMETRIC_DIFFERENCE_HPP -#define SPROUT_RANGE_ALGORITHM_FIT_SET_SYMMETRIC_DIFFERENCE_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fit { - // - // set_symmetric_difference - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_symmetric_difference(InputRange1 const& rng1, InputRange2 const& rng2, Result const& result, Compare comp) { - return sprout::fit::set_symmetric_difference(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), result, comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_symmetric_difference(InputRange1 const& rng1, InputRange2 const& rng2, Result const& result) { - return sprout::fit::set_symmetric_difference(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), result); - } - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIT_SET_SYMMETRIC_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fit/set_union.hpp b/dsp/lib/sprout/sprout/range/algorithm/fit/set_union.hpp deleted file mode 100644 index 47eb990..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fit/set_union.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIT_SET_UNION_HPP -#define SPROUT_RANGE_ALGORITHM_FIT_SET_UNION_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fit { - // - // set_union - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_union(InputRange1 const& rng1, InputRange2 const& rng2, Result const& result, Compare comp) { - return sprout::fit::set_union(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), result, comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_union(InputRange1 const& rng1, InputRange2 const& rng2, Result const& result) { - return sprout::fit::set_union(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), result); - } - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIT_SET_UNION_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fit/stable_partition_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/fit/stable_partition_copy.hpp deleted file mode 100644 index cf83a12..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fit/stable_partition_copy.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIT_STABLE_PARTITION_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_FIT_STABLE_PARTITION_COPY_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fit { - // - // stable_partition_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - stable_partition_copy(InputRange const& rng, Result const& result, Predicate pred) { - return sprout::fit::stable_partition_copy(sprout::begin(rng), sprout::end(rng), result, pred); - } - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIT_STABLE_PARTITION_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fit/swap_element_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/fit/swap_element_copy.hpp deleted file mode 100644 index 11c4c33..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fit/swap_element_copy.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIT_SWAP_ELEMENT_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_FIT_SWAP_ELEMENT_COPY_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fit { - // - // swap_element_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - swap_element_copy( - ForwardRange const& rng, Result const& result, - typename sprout::container_traits::const_iterator pos1, - typename sprout::container_traits::const_iterator pos2 - ) - { - return sprout::fit::swap_element_copy(sprout::begin(rng), sprout::end(rng), result, pos1, pos2); - } - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIT_SWAP_ELEMENT_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fit/transform.hpp b/dsp/lib/sprout/sprout/range/algorithm/fit/transform.hpp deleted file mode 100644 index 46858de..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fit/transform.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIT_TRANSFORM_HPP -#define SPROUT_RANGE_ALGORITHM_FIT_TRANSFORM_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fit { - // - // transform - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform(InputRange const& rng, Result const& result, UnaryOperation op) { - return sprout::fit::transform(sprout::begin(rng), sprout::end(rng), result, op); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform(InputRange1 const& rng1, InputRange2 const& rng2, Result const& result, BinaryOperation op) { - return sprout::fit::transform(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), result, op); - } - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIT_TRANSFORM_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fit/unique_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/fit/unique_copy.hpp deleted file mode 100644 index be5f6e5..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fit/unique_copy.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIT_UNIQUE_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_FIT_UNIQUE_COPY_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fit { - // - // unique_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - unique_copy(InputRange const& rng, Result const& result) { - return sprout::fit::unique_copy(sprout::begin(rng), sprout::end(rng), result); - } - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - unique_copy(InputRange const& rng, Result const& result, BinaryPredicate pred) { - return sprout::fit::unique_copy(sprout::begin(rng), sprout::end(rng), result, pred); - } - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIT_UNIQUE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fixed.hpp b/dsp/lib/sprout/sprout/range/algorithm/fixed.hpp deleted file mode 100644 index dc577b6..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fixed.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIXED_HPP -#define SPROUT_RANGE_ALGORITHM_FIXED_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIXED_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fixed/clamp_range_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/fixed/clamp_range_copy.hpp deleted file mode 100644 index 782d7f0..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fixed/clamp_range_copy.hpp +++ /dev/null @@ -1,80 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIXED_CLAMP_RANGE_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_FIXED_CLAMP_RANGE_COPY_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fixed { - // - // clamp_range_copy - // - template< - typename InputRange, typename Result, typename Compare, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - clamp_range_copy( - InputRange const& rng, Result const& result, - typename sprout::container_traits::value_type const& low, - typename sprout::container_traits::value_type const& high, - Compare comp - ) - { - return sprout::fixed::clamp_range_copy(sprout::begin(rng), sprout::end(rng), result, low, high, comp); - } - template< - typename InputRange, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - clamp_range_copy( - InputRange const& rng, Result const& result, - typename sprout::container_traits::value_type const& low, - typename sprout::container_traits::value_type const& high - ) - { - return sprout::fixed::clamp_range_copy(sprout::begin(rng), sprout::end(rng), result, low, high); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - clamp_range_copy( - InputRange const& rng, - typename sprout::container_traits::value_type const& low, - typename sprout::container_traits::value_type const& high, - Compare comp - ) - { - return sprout::fixed::clamp_range_copy(sprout::begin(rng), sprout::end(rng), low, high, comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - clamp_range_copy( - InputRange const& rng, - typename sprout::container_traits::value_type const& low, - typename sprout::container_traits::value_type const& high - ) - { - return sprout::fixed::clamp_range_copy(sprout::begin(rng), sprout::end(rng), low, high); - } - } // namespace fixed - - using sprout::range::fixed::clamp_range_copy; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIXED_CLAMP_RANGE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fixed/copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/fixed/copy.hpp deleted file mode 100644 index 48b6fc7..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fixed/copy.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIXED_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_FIXED_COPY_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fixed { - // - // copy - // - template< - typename InputRange, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy(InputRange const& rng, Result const& result) { - return sprout::fixed::copy(sprout::begin(rng), sprout::end(rng), result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy(InputRange const& rng) { - return sprout::fixed::copy(sprout::begin(rng), sprout::end(rng)); - } - } // namespace fixed - - using sprout::range::fixed::copy; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIXED_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fixed/copy_backward.hpp b/dsp/lib/sprout/sprout/range/algorithm/fixed/copy_backward.hpp deleted file mode 100644 index 2929e68..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fixed/copy_backward.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIXED_COPY_BACKWARD_HPP -#define SPROUT_RANGE_ALGORITHM_FIXED_COPY_BACKWARD_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fixed { - // - // copy_backward - // - template< - typename BidirectionalRange, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_backward(BidirectionalRange const& rng, Result const& result) { - return sprout::fixed::copy_backward(sprout::begin(rng), sprout::end(rng), result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_backward(BidirectionalRange const& rng) { - return sprout::fixed::copy_backward(sprout::begin(rng), sprout::end(rng)); - } - } // namespace fixed - - using sprout::range::fixed::copy_backward; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIXED_COPY_BACKWARD_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fixed/copy_if.hpp b/dsp/lib/sprout/sprout/range/algorithm/fixed/copy_if.hpp deleted file mode 100644 index e299b21..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fixed/copy_if.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIXED_COPY_IF_HPP -#define SPROUT_RANGE_ALGORITHM_FIXED_COPY_IF_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fixed { - // - // copy_if - // - template< - typename InputRange, typename Result, typename Predicate, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_if(InputRange const& rng, Result const& result, Predicate pred) { - return sprout::fixed::copy_if(sprout::begin(rng), sprout::end(rng), result, pred); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_if(InputRange const& rng, Predicate pred) { - return sprout::fixed::copy_if(sprout::begin(rng), sprout::end(rng), pred); - } - } // namespace fixed - - using sprout::range::fixed::copy_if; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIXED_COPY_IF_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fixed/copy_until.hpp b/dsp/lib/sprout/sprout/range/algorithm/fixed/copy_until.hpp deleted file mode 100644 index 6cd2eab..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fixed/copy_until.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIXED_COPY_UNTIL_HPP -#define SPROUT_RANGE_ALGORITHM_FIXED_COPY_UNTIL_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fixed { - // - // copy_until - // - template< - typename InputRange, typename Result, typename Predicate, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_until(InputRange const& rng, Result const& result, Predicate pred) { - return sprout::fixed::copy_until(sprout::begin(rng), sprout::end(rng), result, pred); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_until(InputRange const& rng, Predicate pred) { - return sprout::fixed::copy_until(sprout::begin(rng), sprout::end(rng), pred); - } - } // namespace fixed - - using sprout::range::fixed::copy_until; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIXED_COPY_UNTIL_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fixed/copy_while.hpp b/dsp/lib/sprout/sprout/range/algorithm/fixed/copy_while.hpp deleted file mode 100644 index 272f640..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fixed/copy_while.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIXED_COPY_WHILE_HPP -#define SPROUT_RANGE_ALGORITHM_FIXED_COPY_WHILE_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fixed { - // - // copy_while - // - template< - typename InputRange, typename Result, typename Predicate, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_while(InputRange const& rng, Result const& result, Predicate pred) { - return sprout::fixed::copy_while(sprout::begin(rng), sprout::end(rng), result, pred); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - copy_while(InputRange const& rng, Predicate pred) { - return sprout::fixed::copy_while(sprout::begin(rng), sprout::end(rng), pred); - } - } // namespace fixed - - using sprout::range::fixed::copy_while; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIXED_COPY_WHILE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fixed/merge.hpp b/dsp/lib/sprout/sprout/range/algorithm/fixed/merge.hpp deleted file mode 100644 index 7c2b869..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fixed/merge.hpp +++ /dev/null @@ -1,57 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIXED_MERGE_HPP -#define SPROUT_RANGE_ALGORITHM_FIXED_MERGE_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fixed { - // - // merge - // - template< - typename InputRange1, typename InputRange2, typename Result, typename Compare, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - merge(InputRange1 const& rng1, InputRange2 const& rng2, Result const& result, Compare comp) { - return sprout::fixed::merge(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), result, comp); - } - template< - typename InputRange1, typename InputRange2, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - merge(InputRange1 const& rng1, InputRange2 const& rng2, Result const& result) { - return sprout::fixed::merge(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - merge(InputRange1 const& rng1, InputRange2 const& rng2, Compare comp) { - return sprout::fixed::merge(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - merge(InputRange1 const& rng1, InputRange2 const& rng2) { - return sprout::fixed::merge(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2)); - } - } // namespace fixed - - using sprout::range::fixed::merge; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIXED_MERGE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fixed/partition_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/fixed/partition_copy.hpp deleted file mode 100644 index 8ec0b4c..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fixed/partition_copy.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIXED_PARTITION_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_FIXED_PARTITION_COPY_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fixed { - // - // partition_copy - // - template< - typename InputRange, typename Result, typename Predicate, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - partition_copy(InputRange const& rng, Result const& result, Predicate pred) { - return sprout::fixed::partition_copy(sprout::begin(rng), sprout::end(rng), result, pred); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - partition_copy(InputRange const& rng, Predicate pred) { - return sprout::fixed::partition_copy(sprout::begin(rng), sprout::end(rng), pred); - } - } // namespace fixed - - using sprout::range::fixed::partition_copy; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIXED_PARTITION_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fixed/remove_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/fixed/remove_copy.hpp deleted file mode 100644 index 2350e6c..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fixed/remove_copy.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIXED_REMOVE_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_FIXED_REMOVE_COPY_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fixed { - // - // remove_copy - // - template< - typename InputRange, typename Result, typename T, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - remove_copy(InputRange const& rng, Result const& result, T const& value) { - return sprout::fixed::remove_copy(sprout::begin(rng), sprout::end(rng), result, value); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - remove_copy(InputRange const& rng, T const& value) { - return sprout::fixed::remove_copy(sprout::begin(rng), sprout::end(rng), value); - } - } // namespace fixed - - using sprout::range::fixed::remove_copy; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIXED_REMOVE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fixed/remove_copy_if.hpp b/dsp/lib/sprout/sprout/range/algorithm/fixed/remove_copy_if.hpp deleted file mode 100644 index 9575a2d..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fixed/remove_copy_if.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIXED_REMOVE_COPY_IF_HPP -#define SPROUT_RANGE_ALGORITHM_FIXED_REMOVE_COPY_IF_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fixed { - // - // remove_copy_if - // - template< - typename InputRange, typename Result, typename Predicate, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - remove_copy_if(InputRange const& rng, Result const& result, Predicate pred) { - return sprout::fixed::remove_copy_if(sprout::begin(rng), sprout::end(rng), result, pred); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - remove_copy_if(InputRange const& rng, Predicate pred) { - return sprout::fixed::remove_copy_if(sprout::begin(rng), sprout::end(rng), pred); - } - } // namespace fixed - - using sprout::range::fixed::remove_copy_if; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIXED_REMOVE_COPY_IF_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fixed/replace_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/fixed/replace_copy.hpp deleted file mode 100644 index 51687d4..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fixed/replace_copy.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIXED_REPLACE_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_FIXED_REPLACE_COPY_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fixed { - // - // replace_copy - // - template< - typename InputRange, typename Result, typename T, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - replace_copy(InputRange const& rng, Result const& result, T const& old_value, T const& new_value) { - return sprout::fixed::replace_copy(sprout::begin(rng), sprout::end(rng), result, old_value, new_value); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - replace_copy(InputRange const& rng, T const& old_value, T const& new_value) { - return sprout::fixed::replace_copy(sprout::begin(rng), sprout::end(rng), old_value, new_value); - } - } // namespace fixed - - using sprout::range::fixed::replace_copy; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIXED_REPLACE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fixed/replace_copy_if.hpp b/dsp/lib/sprout/sprout/range/algorithm/fixed/replace_copy_if.hpp deleted file mode 100644 index c9a3adb..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fixed/replace_copy_if.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIXED_REPLACE_COPY_IF_HPP -#define SPROUT_RANGE_ALGORITHM_FIXED_REPLACE_COPY_IF_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fixed { - // - // replace_copy_if - // - template< - typename InputRange, typename Result, typename T, typename Predicate, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - replace_copy_if(InputRange const& rng, Result const& result, Predicate pred, T const& new_value) { - return sprout::fixed::replace_copy_if(sprout::begin(rng), sprout::end(rng), result, pred, new_value); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - replace_copy_if(InputRange const& rng, Predicate pred, T const& new_value) { - return sprout::fixed::replace_copy_if(sprout::begin(rng), sprout::end(rng), pred, new_value); - } - } // namespace fixed - - using sprout::range::fixed::replace_copy_if; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIXED_REPLACE_COPY_IF_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fixed/reverse_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/fixed/reverse_copy.hpp deleted file mode 100644 index bf7e84c..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fixed/reverse_copy.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIXED_REVERSE_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_FIXED_REVERSE_COPY_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fixed { - // - // reverse_copy - // - template< - typename BidirectionalRange, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - reverse_copy(BidirectionalRange const& rng, Result const& result) { - return sprout::fixed::reverse_copy(sprout::begin(rng), sprout::end(rng), result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - reverse_copy(BidirectionalRange const& rng) { - return sprout::fixed::reverse_copy(sprout::begin(rng), sprout::end(rng)); - } - } // namespace fixed - - using sprout::range::fixed::reverse_copy; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIXED_REVERSE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fixed/rotate_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/fixed/rotate_copy.hpp deleted file mode 100644 index 4f0f979..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fixed/rotate_copy.hpp +++ /dev/null @@ -1,52 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIXED_ROTATE_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_FIXED_ROTATE_COPY_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fixed { - // - // rotate_copy - // - template< - typename ForwardRange, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - rotate_copy( - ForwardRange const& rng, typename sprout::container_traits::const_iterator middle, - Result const& result - ) - { - return sprout::fixed::rotate_copy(sprout::begin(rng), middle, sprout::end(rng), result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - rotate_copy( - ForwardRange const& rng, typename sprout::container_traits::const_iterator middle - ) - { - return sprout::fixed::rotate_copy(sprout::begin(rng), middle, sprout::end(rng)); - } - } // namespace fixed - - using sprout::range::fixed::rotate_copy; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIXED_ROTATE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fixed/set_difference.hpp b/dsp/lib/sprout/sprout/range/algorithm/fixed/set_difference.hpp deleted file mode 100644 index 572a7e1..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fixed/set_difference.hpp +++ /dev/null @@ -1,57 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIXED_SET_DIFFERENCE_HPP -#define SPROUT_RANGE_ALGORITHM_FIXED_SET_DIFFERENCE_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fixed { - // - // set_difference - // - template< - typename InputRange1, typename InputRange2, typename Result, typename Compare, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_difference(InputRange1 const& rng1, InputRange2 const& rng2, Result const& result, Compare comp) { - return sprout::fixed::set_difference(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), result, comp); - } - template< - typename InputRange1, typename InputRange2, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_difference(InputRange1 const& rng1, InputRange2 const& rng2, Result const& result) { - return sprout::fixed::set_difference(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_difference(InputRange1 const& rng1, InputRange2 const& rng2, Compare comp) { - return sprout::fixed::set_difference(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_difference(InputRange1 const& rng1, InputRange2 const& rng2) { - return sprout::fixed::set_difference(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2)); - } - } // namespace fixed - - using sprout::range::fixed::set_difference; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIXED_SET_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fixed/set_intersection.hpp b/dsp/lib/sprout/sprout/range/algorithm/fixed/set_intersection.hpp deleted file mode 100644 index 157e447..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fixed/set_intersection.hpp +++ /dev/null @@ -1,57 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIXED_SET_INTERSECTION_HPP -#define SPROUT_RANGE_ALGORITHM_FIXED_SET_INTERSECTION_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fixed { - // - // set_intersection - // - template< - typename InputRange1, typename InputRange2, typename Result, typename Compare, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_intersection(InputRange1 const& rng1, InputRange2 const& rng2, Result const& result, Compare comp) { - return sprout::fixed::set_intersection(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), result, comp); - } - template< - typename InputRange1, typename InputRange2, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_intersection(InputRange1 const& rng1, InputRange2 const& rng2, Result const& result) { - return sprout::fixed::set_intersection(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_intersection(InputRange1 const& rng1, InputRange2 const& rng2, Compare comp) { - return sprout::fixed::set_intersection(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_intersection(InputRange1 const& rng1, InputRange2 const& rng2) { - return sprout::fixed::set_intersection(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2)); - } - } // namespace fixed - - using sprout::range::fixed::set_intersection; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIXED_SET_INTERSECTION_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fixed/set_symmetric_difference.hpp b/dsp/lib/sprout/sprout/range/algorithm/fixed/set_symmetric_difference.hpp deleted file mode 100644 index e48c9e1..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fixed/set_symmetric_difference.hpp +++ /dev/null @@ -1,57 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIXED_SET_SYMMETRIC_DIFFERENCE_HPP -#define SPROUT_RANGE_ALGORITHM_FIXED_SET_SYMMETRIC_DIFFERENCE_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fixed { - // - // set_symmetric_difference - // - template< - typename InputRange1, typename InputRange2, typename Result, typename Compare, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_symmetric_difference(InputRange1 const& rng1, InputRange2 const& rng2, Result const& result, Compare comp) { - return sprout::fixed::set_symmetric_difference(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), result, comp); - } - template< - typename InputRange1, typename InputRange2, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_symmetric_difference(InputRange1 const& rng1, InputRange2 const& rng2, Result const& result) { - return sprout::fixed::set_symmetric_difference(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_symmetric_difference(InputRange1 const& rng1, InputRange2 const& rng2, Compare comp) { - return sprout::fixed::set_symmetric_difference(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_symmetric_difference(InputRange1 const& rng1, InputRange2 const& rng2) { - return sprout::fixed::set_symmetric_difference(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2)); - } - } // namespace fixed - - using sprout::range::fixed::set_symmetric_difference; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIXED_SET_SYMMETRIC_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fixed/set_union.hpp b/dsp/lib/sprout/sprout/range/algorithm/fixed/set_union.hpp deleted file mode 100644 index 1d95ac6..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fixed/set_union.hpp +++ /dev/null @@ -1,57 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIXED_SET_UNION_HPP -#define SPROUT_RANGE_ALGORITHM_FIXED_SET_UNION_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fixed { - // - // set_union - // - template< - typename InputRange1, typename InputRange2, typename Result, typename Compare, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_union(InputRange1 const& rng1, InputRange2 const& rng2, Result const& result, Compare comp) { - return sprout::fixed::set_union(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), result, comp); - } - template< - typename InputRange1, typename InputRange2, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_union(InputRange1 const& rng1, InputRange2 const& rng2, Result const& result) { - return sprout::fixed::set_union(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_union(InputRange1 const& rng1, InputRange2 const& rng2, Compare comp) { - return sprout::fixed::set_union(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2), comp); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - set_union(InputRange1 const& rng1, InputRange2 const& rng2) { - return sprout::fixed::set_union(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), sprout::end(rng2)); - } - } // namespace fixed - - using sprout::range::fixed::set_union; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIXED_SET_UNION_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fixed/stable_partition_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/fixed/stable_partition_copy.hpp deleted file mode 100644 index d9ea754..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fixed/stable_partition_copy.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIXED_STABLE_PARTITION_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_FIXED_STABLE_PARTITION_COPY_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fixed { - // - // stable_partition_copy - // - template< - typename BidirectionalRange, typename Result, typename Predicate, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - stable_partition_copy(BidirectionalRange const& rng, Result const& result, Predicate pred) { - return sprout::fixed::stable_partition_copy(sprout::begin(rng), sprout::end(rng), result, pred); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - stable_partition_copy(BidirectionalRange const& rng, Predicate pred) { - return sprout::fixed::stable_partition_copy(sprout::begin(rng), sprout::end(rng), pred); - } - } // namespace fixed - - using sprout::range::fixed::stable_partition_copy; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIXED_STABLE_PARTITION_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fixed/swap_element_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/fixed/swap_element_copy.hpp deleted file mode 100644 index b467020..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fixed/swap_element_copy.hpp +++ /dev/null @@ -1,55 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIXED_SWAP_ELEMENT_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_FIXED_SWAP_ELEMENT_COPY_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fixed { - // - // swap_element_copy - // - template< - typename ForwardRange, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - swap_element_copy( - ForwardRange const& rng, Result const& result, - typename sprout::container_traits::const_iterator pos1, - typename sprout::container_traits::const_iterator pos2 - ) - { - return sprout::fixed::swap_element_copy(sprout::begin(rng), sprout::end(rng), result, pos1, pos2); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - swap_element_copy( - ForwardRange const& rng, - typename sprout::container_traits::const_iterator pos1, - typename sprout::container_traits::const_iterator pos2 - ) - { - return sprout::fixed::swap_element_copy(sprout::begin(rng), sprout::end(rng), pos1, pos2); - } - } // namespace fixed - - using sprout::range::fixed::swap_element_copy; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIXED_SWAP_ELEMENT_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fixed/transform.hpp b/dsp/lib/sprout/sprout/range/algorithm/fixed/transform.hpp deleted file mode 100644 index 1affaa6..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fixed/transform.hpp +++ /dev/null @@ -1,57 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIXED_TRANSFORM_HPP -#define SPROUT_RANGE_ALGORITHM_FIXED_TRANSFORM_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fixed { - // - // transform - // - template< - typename InputRange, typename Result, typename UnaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform(InputRange const& rng, Result const& result, UnaryOperation op) { - return sprout::fixed::transform(sprout::begin(rng), sprout::end(rng), result, op); - } - template< - typename InputRange1, typename InputRange2, typename Result, typename BinaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform(InputRange1 const& rng1, InputRange2 const& rng2, Result const& result, BinaryOperation op) { - return sprout::fixed::transform(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), result, op); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform(InputRange const& rng, UnaryOperation op) { - return sprout::fixed::transform(sprout::begin(rng), sprout::end(rng), op); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform(InputRange1 const& rng1, InputRange2 const& rng2, BinaryOperation op) { - return sprout::fixed::transform(sprout::begin(rng1), sprout::end(rng1), sprout::begin(rng2), op); - } - } // namespace fixed - - using sprout::range::fixed::transform; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_TRANSFORM_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/fixed/unique_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/fixed/unique_copy.hpp deleted file mode 100644 index 3eae074..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/fixed/unique_copy.hpp +++ /dev/null @@ -1,57 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_FIXED_UNIQUE_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_FIXED_UNIQUE_COPY_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fixed { - // - // unique_copy - // - template< - typename InputRange, typename Result, typename BinaryPredicate, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - unique_copy(InputRange const& rng, Result const& result, BinaryPredicate pred) { - return sprout::fixed::unique_copy(sprout::begin(rng), sprout::end(rng), result, pred); - } - template< - typename InputRange, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - unique_copy(InputRange const& rng, Result const& result) { - return sprout::fixed::unique_copy(sprout::begin(rng), sprout::end(rng), result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - unique_copy(InputRange const& rng, BinaryPredicate pred) { - return sprout::fixed::unique_copy(sprout::begin(rng), sprout::end(rng), pred); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - unique_copy(InputRange const& rng) { - return sprout::fixed::unique_copy(sprout::begin(rng), sprout::end(rng)); - } - } // namespace fixed - - using sprout::range::fixed::unique_copy; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_FIXED_UNIQUE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/generate.hpp b/dsp/lib/sprout/sprout/range/algorithm/generate.hpp deleted file mode 100644 index 54f8572..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/generate.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_GENERATE_HPP -#define SPROUT_RANGE_ALGORITHM_GENERATE_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_GENERATE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/includes.hpp b/dsp/lib/sprout/sprout/range/algorithm/includes.hpp deleted file mode 100644 index 5689fda..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/includes.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_INCLUDES_HPP -#define SPROUT_RANGE_ALGORITHM_INCLUDES_HPP - -#include -#include -#include - -namespace sprout { - namespace range { - - // 25.4.5.1 includes - template - inline SPROUT_CONSTEXPR bool - includes(InputRange1 const& range1, InputRange2 const& range2) { - return sprout::includes(sprout::begin(range1), sprout::end(range1), sprout::begin(range2), sprout::end(range2)); - } - - template - inline SPROUT_CONSTEXPR bool - includes(InputRange1 const& range1, InputRange2 const& range2, Compare comp) { - return sprout::includes(sprout::begin(range1), sprout::end(range1), sprout::begin(range2), sprout::end(range2), comp); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_INCLUDES_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/inplace_merge.hpp b/dsp/lib/sprout/sprout/range/algorithm/inplace_merge.hpp deleted file mode 100644 index cfa22d9..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/inplace_merge.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_INPLACE_MERGE_HPP -#define SPROUT_RANGE_ALGORITHM_INPLACE_MERGE_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_INPLACE_MERGE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/is_decreasing.hpp b/dsp/lib/sprout/sprout/range/algorithm/is_decreasing.hpp deleted file mode 100644 index a280d35..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/is_decreasing.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_IS_DECREASING_HPP -#define SPROUT_RANGE_ALGORITHM_IS_DECREASING_HPP - -#include -#include -#include - -namespace sprout { - namespace range { - // - // is_decreasing - // - template - inline SPROUT_CONSTEXPR bool - is_decreasing(ForwardRange const& range) { - return sprout::is_decreasing(sprout::begin(range), sprout::end(range)); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_IS_DECREASING_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/is_heap.hpp b/dsp/lib/sprout/sprout/range/algorithm/is_heap.hpp deleted file mode 100644 index 9b0c78e..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/is_heap.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_IS_HEAP_HPP -#define SPROUT_RANGE_ALGORITHM_IS_HEAP_HPP - -#include -#include -#include - -namespace sprout { - namespace range { - - // 25.4.6.5 is_heap - template - inline SPROUT_CONSTEXPR bool - is_heap(RandomAccessRange const& range) { - return sprout::is_heap(sprout::begin(range), sprout::end(range)); - } - - template - inline SPROUT_CONSTEXPR bool - is_heap(RandomAccessRange const& range, Compare comp) { - return sprout::is_heap(sprout::begin(range), sprout::end(range), comp); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_IS_HEAP_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/is_heap_until.hpp b/dsp/lib/sprout/sprout/range/algorithm/is_heap_until.hpp deleted file mode 100644 index 3a12df3..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/is_heap_until.hpp +++ /dev/null @@ -1,76 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_IS_HEAP_UNTIL_HPP -#define SPROUT_RANGE_ALGORITHM_IS_HEAP_UNTIL_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - - // 25.4.6.5 is_heap - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - is_heap_until(RandomAccessRange&& range) { - return sprout::range::range_return::pack( - sprout::is_heap_until( - sprout::begin(SPROUT_FORWARD(RandomAccessRange, range)), - sprout::end(SPROUT_FORWARD(RandomAccessRange, range)) - ), - SPROUT_FORWARD(RandomAccessRange, range) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - is_heap_until(RandomAccessRange&& range, Compare comp) { - return sprout::range::range_return::pack( - sprout::is_heap_until( - sprout::begin(SPROUT_FORWARD(RandomAccessRange, range)), - sprout::end(SPROUT_FORWARD(RandomAccessRange, range)), - comp - ), - SPROUT_FORWARD(RandomAccessRange, range) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - is_heap_until(RandomAccessRange&& range) { - return sprout::range::range_return::pack( - sprout::is_heap_until( - sprout::begin(SPROUT_FORWARD(RandomAccessRange, range)), - sprout::end(SPROUT_FORWARD(RandomAccessRange, range)) - ), - SPROUT_FORWARD(RandomAccessRange, range) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - is_heap_until(RandomAccessRange&& range, Compare comp) { - return sprout::range::range_return::pack( - sprout::is_heap_until( - sprout::begin(SPROUT_FORWARD(RandomAccessRange, range)), - sprout::end(SPROUT_FORWARD(RandomAccessRange, range)), - comp - ), - SPROUT_FORWARD(RandomAccessRange, range) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_IS_HEAP_UNTIL_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/is_increasing.hpp b/dsp/lib/sprout/sprout/range/algorithm/is_increasing.hpp deleted file mode 100644 index 432cf83..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/is_increasing.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_IS_INCREASING_HPP -#define SPROUT_RANGE_ALGORITHM_IS_INCREASING_HPP - -#include -#include -#include - -namespace sprout { - namespace range { - // - // is_increasing - // - template - inline SPROUT_CONSTEXPR bool - is_increasing(ForwardRange const& range) { - return sprout::is_increasing(sprout::begin(range), sprout::end(range)); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_IS_INCREASING_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/is_partitioned.hpp b/dsp/lib/sprout/sprout/range/algorithm/is_partitioned.hpp deleted file mode 100644 index 85e48da..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/is_partitioned.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_IS_PARTITIONED_HPP -#define SPROUT_RANGE_ALGORITHM_IS_PARTITIONED_HPP - -#include -#include -#include - -namespace sprout { - namespace range { - - // 25.3.13 partitions - template - inline SPROUT_CONSTEXPR bool - is_partitioned(InputRange const& range, Predicate pred) { - return sprout::is_partitioned(sprout::begin(range), sprout::end(range), pred); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_IS_PARTITIONED_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/is_permutation.hpp b/dsp/lib/sprout/sprout/range/algorithm/is_permutation.hpp deleted file mode 100644 index 2f36f52..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/is_permutation.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_IS_PERMUTATION_HPP -#define SPROUT_RANGE_ALGORITHM_IS_PERMUTATION_HPP - -#include -#include -#include - -namespace sprout { - namespace range { - - // 25.2.12 Is permutation - template - inline SPROUT_CONSTEXPR bool - is_permutation(ForwardRange1 const& range1, ForwardRange2 const& range2) { - return sprout::is_permutation(sprout::begin(range1), sprout::end(range1), sprout::begin(range2)); - } - - template - inline SPROUT_CONSTEXPR bool - is_permutation(ForwardRange1 const& range1, ForwardRange2 const& range2, BinaryPredicate pred) { - return sprout::is_permutation(sprout::begin(range1), sprout::end(range1), sprout::begin(range2), pred); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_IS_PERMUTATION_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/is_sorted.hpp b/dsp/lib/sprout/sprout/range/algorithm/is_sorted.hpp deleted file mode 100644 index 208c3e9..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/is_sorted.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_IS_SORTED_HPP -#define SPROUT_RANGE_ALGORITHM_IS_SORTED_HPP - -#include -#include -#include - -namespace sprout { - namespace range { - - // 25.4.1.5 is_sorted - template - inline SPROUT_CONSTEXPR bool - is_sorted(ForwardRange const& range) { - return sprout::is_sorted(sprout::begin(range), sprout::end(range)); - } - - template - inline SPROUT_CONSTEXPR bool - is_sorted(ForwardRange const& range, Compare comp) { - return sprout::is_sorted(sprout::begin(range), sprout::end(range), comp); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_IS_SORTED_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/is_sorted_until.hpp b/dsp/lib/sprout/sprout/range/algorithm/is_sorted_until.hpp deleted file mode 100644 index 28b7e66..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/is_sorted_until.hpp +++ /dev/null @@ -1,76 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_IS_SORTED_UNTIL_HPP -#define SPROUT_RANGE_ALGORITHM_IS_SORTED_UNTIL_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - - // 25.4.1.5 is_sorted - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - is_sorted_until(ForwardRange&& range) { - return sprout::range::range_return::pack( - sprout::is_sorted_until( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)) - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - is_sorted_until(ForwardRange&& range, Compare comp) { - return sprout::range::range_return::pack( - sprout::is_sorted_until( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)), - comp - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - is_sorted_until(ForwardRange&& range) { - return sprout::range::range_return::pack( - sprout::is_sorted_until( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)) - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - is_sorted_until(ForwardRange&& range, Compare comp) { - return sprout::range::range_return::pack( - sprout::is_sorted_until( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)), - comp - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_IS_SORTED_UNTIL_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/is_strictly_decreasing.hpp b/dsp/lib/sprout/sprout/range/algorithm/is_strictly_decreasing.hpp deleted file mode 100644 index cdcad29..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/is_strictly_decreasing.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_IS_STRICTLY_DECREASING_HPP -#define SPROUT_RANGE_ALGORITHM_IS_STRICTLY_DECREASING_HPP - -#include -#include -#include - -namespace sprout { - namespace range { - // - // is_strictly_decreasing - // - template - inline SPROUT_CONSTEXPR bool - is_strictly_decreasing(ForwardRange const& range) { - return sprout::is_strictly_decreasing(sprout::begin(range), sprout::end(range)); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_IS_STRICTLY_DECREASING_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/is_strictly_increasing.hpp b/dsp/lib/sprout/sprout/range/algorithm/is_strictly_increasing.hpp deleted file mode 100644 index a67fe6e..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/is_strictly_increasing.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_IS_STRICTLY_INCREASING_HPP -#define SPROUT_RANGE_ALGORITHM_IS_STRICTLY_INCREASING_HPP - -#include -#include -#include - -namespace sprout { - namespace range { - // - // is_strictly_increasing - // - template - inline SPROUT_CONSTEXPR bool - is_strictly_increasing(ForwardRange const& range) { - return sprout::is_strictly_increasing(sprout::begin(range), sprout::end(range)); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_IS_STRICTLY_INCREASING_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/lexicographical_compare.hpp b/dsp/lib/sprout/sprout/range/algorithm/lexicographical_compare.hpp deleted file mode 100644 index a0a3ba3..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/lexicographical_compare.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_LEXICOGRAPHICAL_COMPARE_HPP -#define SPROUT_RANGE_ALGORITHM_LEXICOGRAPHICAL_COMPARE_HPP - -#include -#include -#include - -namespace sprout { - namespace range { - - // 25.4.8 Lexicographical comparison - template - inline SPROUT_CONSTEXPR bool - lexicographical_compare(InputRange1 const& range1, InputRange2 const& range2) { - return sprout::lexicographical_compare( - sprout::begin(range1), sprout::end(range1), sprout::begin(range2), sprout::end(range2) - ); - } - - template - inline SPROUT_CONSTEXPR bool - lexicographical_compare(InputRange1 const& range1, InputRange2 const& range2, Compare comp) { - return sprout::lexicographical_compare( - sprout::begin(range1), sprout::end(range1), sprout::begin(range2), sprout::end(range2), comp - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_LEXICOGRAPHICAL_COMPARE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/lower_bound.hpp b/dsp/lib/sprout/sprout/range/algorithm/lower_bound.hpp deleted file mode 100644 index 8c39cb3..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/lower_bound.hpp +++ /dev/null @@ -1,80 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_LOWER_BOUND_HPP -#define SPROUT_RANGE_ALGORITHM_LOWER_BOUND_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - - // 25.4.3.1 lower_bound - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - lower_bound(ForwardRange&& range, T const& value) { - return sprout::range::range_return::pack( - sprout::lower_bound( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)), - value - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - lower_bound(ForwardRange&& range, T const& value, Compare comp) { - return sprout::range::range_return::pack( - sprout::lower_bound( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)), - value, - comp - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - lower_bound(ForwardRange&& range, T const& value) { - return sprout::range::range_return::pack( - sprout::lower_bound( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)), - value - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - lower_bound(ForwardRange&& range, T const& value, Compare comp) { - return sprout::range::range_return::pack( - sprout::lower_bound( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)), - value, - comp - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_LOWER_BOUND_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/make_heap.hpp b/dsp/lib/sprout/sprout/range/algorithm/make_heap.hpp deleted file mode 100644 index fa47924..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/make_heap.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_MAKE_HEAP_HPP -#define SPROUT_RANGE_ALGORITHM_MAKE_HEAP_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_MAKE_HEAP_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/max_element.hpp b/dsp/lib/sprout/sprout/range/algorithm/max_element.hpp deleted file mode 100644 index fc193ae..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/max_element.hpp +++ /dev/null @@ -1,76 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_MAX_ELEMENT_HPP -#define SPROUT_RANGE_ALGORITHM_MAX_ELEMENT_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - - // 25.4.7 Minimum and maximum - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - max_element(ForwardRange&& range) { - return sprout::range::range_return::pack( - sprout::max_element( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)) - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - max_element(ForwardRange&& range, Compare comp) { - return sprout::range::range_return::pack( - sprout::max_element( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)), - comp - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - max_element(ForwardRange&& range) { - return sprout::range::range_return::pack( - sprout::max_element( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)) - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - max_element(ForwardRange&& range, Compare comp) { - return sprout::range::range_return::pack( - sprout::max_element( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)), - comp - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_MAX_ELEMENT_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/merge.hpp b/dsp/lib/sprout/sprout/range/algorithm/merge.hpp deleted file mode 100644 index 339f6a4..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/merge.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_MERGE_HPP -#define SPROUT_RANGE_ALGORITHM_MERGE_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_MERGE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/min_element.hpp b/dsp/lib/sprout/sprout/range/algorithm/min_element.hpp deleted file mode 100644 index dad86fd..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/min_element.hpp +++ /dev/null @@ -1,76 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_MIN_ELEMENT_HPP -#define SPROUT_RANGE_ALGORITHM_MIN_ELEMENT_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - - // 25.4.7 Minimum and maximum - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - min_element(ForwardRange&& range) { - return sprout::range::range_return::pack( - sprout::min_element( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)) - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - min_element(ForwardRange&& range, Compare comp) { - return sprout::range::range_return::pack( - sprout::min_element( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)), - comp - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - min_element(ForwardRange&& range) { - return sprout::range::range_return::pack( - sprout::min_element( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)) - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - min_element(ForwardRange&& range, Compare comp) { - return sprout::range::range_return::pack( - sprout::min_element( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)), - comp - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_MIN_ELEMENT_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/minmax_element.hpp b/dsp/lib/sprout/sprout/range/algorithm/minmax_element.hpp deleted file mode 100644 index 0d8685a..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/minmax_element.hpp +++ /dev/null @@ -1,115 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_MINMAX_ELEMENT_HPP -#define SPROUT_RANGE_ALGORITHM_MINMAX_ELEMENT_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::pair< - typename sprout::range::range_return::type, - typename sprout::range::range_return::type - > - pack_pair(Pair const& pair, ForwardRange&& range) { - return { - sprout::range::range_return::pack(pair.first, SPROUT_FORWARD(ForwardRange, range)), - sprout::range::range_return::pack(pair.second, SPROUT_FORWARD(ForwardRange, range)) - }; - } - - template - inline SPROUT_CONSTEXPR sprout::pair< - typename sprout::range::range_return::type, - typename sprout::range::range_return::type - > - pack_pair(Pair const& pair, ForwardRange&& range) { - return { - sprout::range::range_return::pack(pair.first, SPROUT_FORWARD(ForwardRange, range)), - sprout::range::range_return::pack(pair.second, SPROUT_FORWARD(ForwardRange, range)) - }; - } - } // namespace detail - - - // 25.4.7 Minimum and maximum - template - inline SPROUT_CONSTEXPR sprout::pair< - typename sprout::range::range_return::type, - typename sprout::range::range_return::type - > - minmax_element(ForwardRange&& range) { - return sprout::range::detail::pack_pair( - sprout::minmax_element( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)) - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - - template - inline SPROUT_CONSTEXPR sprout::pair< - typename sprout::range::range_return::type, - typename sprout::range::range_return::type - > - minmax_element(ForwardRange&& range, Compare comp) { - return sprout::range::detail::pack_pair( - sprout::minmax_element( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)), - comp - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - - template - inline SPROUT_CONSTEXPR sprout::pair< - typename sprout::range::range_return::type, - typename sprout::range::range_return::type - > - minmax_element(ForwardRange&& range) { - return sprout::range::detail::pack_pair( - sprout::minmax_element( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)) - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - - template - inline SPROUT_CONSTEXPR sprout::pair< - typename sprout::range::range_return::type, - typename sprout::range::range_return::type - > - minmax_element(ForwardRange&& range, Compare comp) { - return sprout::range::detail::pack_pair( - sprout::minmax_element( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)), - comp - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_MINMAX_ELEMENT_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/mismatch.hpp b/dsp/lib/sprout/sprout/range/algorithm/mismatch.hpp deleted file mode 100644 index 3f1df68..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/mismatch.hpp +++ /dev/null @@ -1,54 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_MISMATCH_HPP -#define SPROUT_RANGE_ALGORITHM_MISMATCH_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - - // 25.2.10 Mismatch - template - inline SPROUT_CONSTEXPR sprout::pair< - typename sprout::range::lvalue_iterator::type, - typename sprout::range::lvalue_iterator::type - > - mismatch(InputRange1&& range1, InputRange2&& range2) { - return sprout::mismatch( - sprout::begin(SPROUT_FORWARD(InputRange1, range1)), - sprout::end(SPROUT_FORWARD(InputRange1, range1)), - sprout::begin(SPROUT_FORWARD(InputRange2, range2)) - ); - } - - template - inline SPROUT_CONSTEXPR sprout::pair< - typename sprout::range::lvalue_iterator::type, - typename sprout::range::lvalue_iterator::type - > - mismatch(InputRange1&& range1, InputRange2&& range2, BinaryPredicate pred) { - return sprout::mismatch( - sprout::begin(SPROUT_FORWARD(InputRange1, range1)), - sprout::end(SPROUT_FORWARD(InputRange1, range1)), - sprout::begin(SPROUT_FORWARD(InputRange2, range2)), - pred - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_MISMATCH_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/modifying.hpp b/dsp/lib/sprout/sprout/range/algorithm/modifying.hpp deleted file mode 100644 index 126fb81..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/modifying.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_MODIFYIING_HPP -#define SPROUT_RANGE_ALGORITHM_MODIFYIING_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_MODIFYIING_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/move.hpp b/dsp/lib/sprout/sprout/range/algorithm/move.hpp deleted file mode 100644 index 2109965..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/move.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_MOVE_HPP -#define SPROUT_RANGE_ALGORITHM_MOVE_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_MOVE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/move_backward.hpp b/dsp/lib/sprout/sprout/range/algorithm/move_backward.hpp deleted file mode 100644 index 530c320..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/move_backward.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_MOVE_BACKWARD_HPP -#define SPROUT_RANGE_ALGORITHM_MOVE_BACKWARD_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_MOVE_BACKWARD_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/next_difference.hpp b/dsp/lib/sprout/sprout/range/algorithm/next_difference.hpp deleted file mode 100644 index b9c50aa..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/next_difference.hpp +++ /dev/null @@ -1,54 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_NEXT_DIFFERENCE_HPP -#define SPROUT_RANGE_ALGORITHM_NEXT_DIFFERENCE_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // next_difference - // - template - inline SPROUT_CONSTEXPR sprout::pair< - typename sprout::range::lvalue_iterator::type, - typename sprout::range::lvalue_iterator::type - > - next_difference(InputRange1&& range1, InputRange2&& range2, Compare comp) { - return sprout::next_difference( - sprout::begin(SPROUT_FORWARD(InputRange1, range1)), - sprout::end(SPROUT_FORWARD(InputRange1, range1)), - sprout::begin(SPROUT_FORWARD(InputRange2, range2)), - sprout::end(SPROUT_FORWARD(InputRange2, range2)), - comp - ); - } - - template - inline SPROUT_CONSTEXPR sprout::pair< - typename sprout::range::lvalue_iterator::type, - typename sprout::range::lvalue_iterator::type - > - next_difference(InputRange1&& range1, InputRange2&& range2) { - return sprout::next_difference( - sprout::begin(SPROUT_FORWARD(InputRange1, range1)), - sprout::end(SPROUT_FORWARD(InputRange1, range1)), - sprout::begin(SPROUT_FORWARD(InputRange2, range2)), - sprout::end(SPROUT_FORWARD(InputRange2, range2)) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_NEXT_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/next_intersection.hpp b/dsp/lib/sprout/sprout/range/algorithm/next_intersection.hpp deleted file mode 100644 index 3d8a196..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/next_intersection.hpp +++ /dev/null @@ -1,54 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_NEXT_INTERSECTION_HPP -#define SPROUT_RANGE_ALGORITHM_NEXT_INTERSECTION_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // next_intersection - // - template - inline SPROUT_CONSTEXPR sprout::pair< - typename sprout::range::lvalue_iterator::type, - typename sprout::range::lvalue_iterator::type - > - next_intersection(InputRange1&& range1, InputRange2&& range2, Compare comp) { - return sprout::next_intersection( - sprout::begin(SPROUT_FORWARD(InputRange1, range1)), - sprout::end(SPROUT_FORWARD(InputRange1, range1)), - sprout::begin(SPROUT_FORWARD(InputRange2, range2)), - sprout::end(SPROUT_FORWARD(InputRange2, range2)), - comp - ); - } - - template - inline SPROUT_CONSTEXPR sprout::pair< - typename sprout::range::lvalue_iterator::type, - typename sprout::range::lvalue_iterator::type - > - next_intersection(InputRange1&& range1, InputRange2&& range2) { - return sprout::next_intersection( - sprout::begin(SPROUT_FORWARD(InputRange1, range1)), - sprout::end(SPROUT_FORWARD(InputRange1, range1)), - sprout::begin(SPROUT_FORWARD(InputRange2, range2)), - sprout::end(SPROUT_FORWARD(InputRange2, range2)) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_NEXT_INTERSECTION_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/next_permutation.hpp b/dsp/lib/sprout/sprout/range/algorithm/next_permutation.hpp deleted file mode 100644 index 0cd80b6..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/next_permutation.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_NEXT_PERMUTATION_HPP -#define SPROUT_RANGE_ALGORITHM_NEXT_PERMUTATION_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_NEXT_PERMUTATION_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/next_symmetric_difference.hpp b/dsp/lib/sprout/sprout/range/algorithm/next_symmetric_difference.hpp deleted file mode 100644 index 9d910d6..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/next_symmetric_difference.hpp +++ /dev/null @@ -1,54 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_NEXT_SYMMETRIC_DIFFERENCE_HPP -#define SPROUT_RANGE_ALGORITHM_NEXT_SYMMETRIC_DIFFERENCE_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // next_symmetric_difference - // - template - inline SPROUT_CONSTEXPR sprout::pair< - typename sprout::range::lvalue_iterator::type, - typename sprout::range::lvalue_iterator::type - > - next_symmetric_difference(Range1&& range1, Range2&& range2, Compare comp) { - return sprout::next_symmetric_difference( - sprout::begin(SPROUT_FORWARD(Range1, range1)), - sprout::end(SPROUT_FORWARD(Range1, range1)), - sprout::begin(SPROUT_FORWARD(Range2, range2)), - sprout::end(SPROUT_FORWARD(Range2, range2)), - comp - ); - } - - template - inline SPROUT_CONSTEXPR sprout::pair< - typename sprout::range::lvalue_iterator::type, - typename sprout::range::lvalue_iterator::type - > - next_symmetric_difference(Range1&& range1, Range2&& range2) { - return sprout::next_symmetric_difference( - sprout::begin(SPROUT_FORWARD(Range1, range1)), - sprout::end(SPROUT_FORWARD(Range1, range1)), - sprout::begin(SPROUT_FORWARD(Range2, range2)), - sprout::end(SPROUT_FORWARD(Range2, range2)) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_NEXT_SYMMETRIC_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/next_union.hpp b/dsp/lib/sprout/sprout/range/algorithm/next_union.hpp deleted file mode 100644 index 4b8c007..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/next_union.hpp +++ /dev/null @@ -1,54 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_NEXT_UNION_HPP -#define SPROUT_RANGE_ALGORITHM_NEXT_UNION_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // next_union - // - template - inline SPROUT_CONSTEXPR sprout::pair< - typename sprout::range::lvalue_iterator::type, - typename sprout::range::lvalue_iterator::type - > - next_union(InputRange1&& range1, InputRange2&& range2, Compare comp) { - return sprout::next_union( - sprout::begin(SPROUT_FORWARD(InputRange1, range1)), - sprout::end(SPROUT_FORWARD(InputRange1, range1)), - sprout::begin(SPROUT_FORWARD(InputRange2, range2)), - sprout::end(SPROUT_FORWARD(InputRange2, range2)), - comp - ); - } - - template - inline SPROUT_CONSTEXPR sprout::pair< - typename sprout::range::lvalue_iterator::type, - typename sprout::range::lvalue_iterator::type - > - next_union(InputRange1&& range1, InputRange2&& range2) { - return sprout::next_union( - sprout::begin(SPROUT_FORWARD(InputRange1, range1)), - sprout::end(SPROUT_FORWARD(InputRange1, range1)), - sprout::begin(SPROUT_FORWARD(InputRange2, range2)), - sprout::end(SPROUT_FORWARD(InputRange2, range2)) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_NEXT_UNION_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/non_modifying.hpp b/dsp/lib/sprout/sprout/range/algorithm/non_modifying.hpp deleted file mode 100644 index d3f20bc..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/non_modifying.hpp +++ /dev/null @@ -1,61 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_NON_MODIFYIING_HPP -#define SPROUT_RANGE_ALGORITHM_NON_MODIFYIING_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_NON_MODIFYIING_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/none_of.hpp b/dsp/lib/sprout/sprout/range/algorithm/none_of.hpp deleted file mode 100644 index 14d1ae9..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/none_of.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_NONE_OF_HPP -#define SPROUT_RANGE_ALGORITHM_NONE_OF_HPP - -#include -#include -#include - -namespace sprout { - namespace range { - - // 25.2.3 None of - template - inline SPROUT_CONSTEXPR bool - none_of(InputRange const& range, Predicate pred) { - return sprout::none_of(sprout::begin(range), sprout::end(range), pred); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_NONE_OF_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/none_of_equal.hpp b/dsp/lib/sprout/sprout/range/algorithm/none_of_equal.hpp deleted file mode 100644 index e5be591..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/none_of_equal.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_NONE_OF_EQUAL_HPP -#define SPROUT_RANGE_ALGORITHM_NONE_OF_EQUAL_HPP - -#include -#include -#include - -namespace sprout { - namespace range { - // - // none_of_equal - // - template - inline SPROUT_CONSTEXPR bool - none_of_equal(InputRange const& range, T const& value) { - return sprout::none_of_equal(sprout::begin(range), sprout::end(range), value); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_NONE_OF_EQUAL_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/nth_element.hpp b/dsp/lib/sprout/sprout/range/algorithm/nth_element.hpp deleted file mode 100644 index db3a5cc..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/nth_element.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_NTH_ELEMENT_HPP -#define SPROUT_RANGE_ALGORITHM_NTH_ELEMENT_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_NTH_ELEMENT_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/one_of.hpp b/dsp/lib/sprout/sprout/range/algorithm/one_of.hpp deleted file mode 100644 index b72a6ec..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/one_of.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_ONE_OF_HPP -#define SPROUT_RANGE_ALGORITHM_ONE_OF_HPP - -#include -#include -#include - -namespace sprout { - namespace range { - // - // one_of - // - template - inline SPROUT_CONSTEXPR bool - one_of(InputRange const& range, Predicate pred) { - return sprout::one_of(sprout::begin(range), sprout::end(range), pred); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_ONE_OF_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/one_of_equal.hpp b/dsp/lib/sprout/sprout/range/algorithm/one_of_equal.hpp deleted file mode 100644 index 85652c4..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/one_of_equal.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_ONE_OF_EQUAL_HPP -#define SPROUT_RANGE_ALGORITHM_ONE_OF_EQUAL_HPP - -#include -#include -#include - -namespace sprout { - namespace range { - // - // one_of_equal - // - template - inline SPROUT_CONSTEXPR bool - one_of_equal(InputRange const& range, T const& value) { - return sprout::one_of_equal(sprout::begin(range), sprout::end(range), value); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_ONE_OF_EQUAL_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/partial_sort.hpp b/dsp/lib/sprout/sprout/range/algorithm/partial_sort.hpp deleted file mode 100644 index 2b3b9e5..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/partial_sort.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_PARTIAL_SORT_HPP -#define SPROUT_RANGE_ALGORITHM_PARTIAL_SORT_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_PARTIAL_SORT_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/partial_sort_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/partial_sort_copy.hpp deleted file mode 100644 index e177e7e..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/partial_sort_copy.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_PARTIAL_SORT_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_PARTIAL_SORT_COPY_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_PARTIAL_SORT_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/partition.hpp b/dsp/lib/sprout/sprout/range/algorithm/partition.hpp deleted file mode 100644 index 132faac..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/partition.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_PARTITION_HPP -#define SPROUT_RANGE_ALGORITHM_PARTITION_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_PARTITION_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/partition_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/partition_copy.hpp deleted file mode 100644 index f7187c3..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/partition_copy.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_PARTITION_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_PARTITION_COPY_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_PARTITION_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/partition_point.hpp b/dsp/lib/sprout/sprout/range/algorithm/partition_point.hpp deleted file mode 100644 index 558b285..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/partition_point.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_PARTITION_POINT_HPP -#define SPROUT_RANGE_ALGORITHM_PARTITION_POINT_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - - // 25.3.13 partitions - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - partition_point(ForwardRange&& range, Predicate pred) { - return sprout::range::range_return::pack( - sprout::partition_point( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)), - pred - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_PARTITION_POINT_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/pop_heap.hpp b/dsp/lib/sprout/sprout/range/algorithm/pop_heap.hpp deleted file mode 100644 index f033359..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/pop_heap.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_POP_HEAP_HPP -#define SPROUT_RANGE_ALGORITHM_POP_HEAP_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_POP_HEAP_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/prev_permutation.hpp b/dsp/lib/sprout/sprout/range/algorithm/prev_permutation.hpp deleted file mode 100644 index 90e6495..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/prev_permutation.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_PREV_PERMUTATION_HPP -#define SPROUT_RANGE_ALGORITHM_PREV_PERMUTATION_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_PREV_PERMUTATION_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/push_heap.hpp b/dsp/lib/sprout/sprout/range/algorithm/push_heap.hpp deleted file mode 100644 index 8e7c682..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/push_heap.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_PUSH_HEAP_HPP -#define SPROUT_RANGE_ALGORITHM_PUSH_HEAP_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_PUSH_HEAP_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/random_shuffle.hpp b/dsp/lib/sprout/sprout/range/algorithm/random_shuffle.hpp deleted file mode 100644 index 9ddb91d..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/random_shuffle.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_RANDOM_SHUFFLE_HPP -#define SPROUT_RANGE_ALGORITHM_RANDOM_SHUFFLE_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_RANDOM_SHUFFLE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/random_swap.hpp b/dsp/lib/sprout/sprout/range/algorithm/random_swap.hpp deleted file mode 100644 index 74a522a..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/random_swap.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_RANDOM_SWAP_HPP -#define SPROUT_RANGE_ALGORITHM_RANDOM_SWAP_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_RANDOM_SWAP_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/remove.hpp b/dsp/lib/sprout/sprout/range/algorithm/remove.hpp deleted file mode 100644 index 0246694..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/remove.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_REMOVE_HPP -#define SPROUT_RANGE_ALGORITHM_REMOVE_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_REMOVE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/remove_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/remove_copy.hpp deleted file mode 100644 index 8944c40..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/remove_copy.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_REMOVE_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_REMOVE_COPY_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_REMOVE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/remove_copy_if.hpp b/dsp/lib/sprout/sprout/range/algorithm/remove_copy_if.hpp deleted file mode 100644 index 3b02686..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/remove_copy_if.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_REMOVE_COPY_IF_HPP -#define SPROUT_RANGE_ALGORITHM_REMOVE_COPY_IF_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_REMOVE_COPY_IF_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/remove_if.hpp b/dsp/lib/sprout/sprout/range/algorithm/remove_if.hpp deleted file mode 100644 index 5ab2739..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/remove_if.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_REMOVE_IF_HPP -#define SPROUT_RANGE_ALGORITHM_REMOVE_IF_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_REMOVE_IF_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/replace.hpp b/dsp/lib/sprout/sprout/range/algorithm/replace.hpp deleted file mode 100644 index fd7f08c..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/replace.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_REPLACE_HPP -#define SPROUT_RANGE_ALGORITHM_REPLACE_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_REPLACE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/replace_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/replace_copy.hpp deleted file mode 100644 index 01bd852..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/replace_copy.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_REPLACE_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_REPLACE_COPY_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_REPLACE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/replace_copy_if.hpp b/dsp/lib/sprout/sprout/range/algorithm/replace_copy_if.hpp deleted file mode 100644 index 2f337d4..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/replace_copy_if.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_REPLACE_COPY_IF_HPP -#define SPROUT_RANGE_ALGORITHM_REPLACE_COPY_IF_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_REPLACE_COPY_IF_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/replace_if.hpp b/dsp/lib/sprout/sprout/range/algorithm/replace_if.hpp deleted file mode 100644 index 9c3e706..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/replace_if.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_REPLACE_IF_HPP -#define SPROUT_RANGE_ALGORITHM_REPLACE_IF_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_REPLACE_IF_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/reverse.hpp b/dsp/lib/sprout/sprout/range/algorithm/reverse.hpp deleted file mode 100644 index 9c1a11b..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/reverse.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_REVERSE_HPP -#define SPROUT_RANGE_ALGORITHM_REVERSE_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_REVERSE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/reverse_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/reverse_copy.hpp deleted file mode 100644 index 0207b09..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/reverse_copy.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_REVERSE_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_REVERSE_COPY_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_REVERSE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/rotate.hpp b/dsp/lib/sprout/sprout/range/algorithm/rotate.hpp deleted file mode 100644 index f9c6d89..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/rotate.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_ROTATE_HPP -#define SPROUT_RANGE_ALGORITHM_ROTATE_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_ROTATE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/rotate_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/rotate_copy.hpp deleted file mode 100644 index 9c81fc3..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/rotate_copy.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_ROTATE_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_ROTATE_COPY_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_ROTATE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/sample.hpp b/dsp/lib/sprout/sprout/range/algorithm/sample.hpp deleted file mode 100644 index 3f61bba..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/sample.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_SAMPLE_HPP -#define SPROUT_RANGE_ALGORITHM_SAMPLE_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_SAMPLE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/search.hpp b/dsp/lib/sprout/sprout/range/algorithm/search.hpp deleted file mode 100644 index cd582ae..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/search.hpp +++ /dev/null @@ -1,111 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_SEARCH_HPP -#define SPROUT_RANGE_ALGORITHM_SEARCH_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - - // 25.2.13 Search - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - search(ForwardRange1&& range1, ForwardRange2&& range2) { - return sprout::range::range_return::pack( - sprout::search( - sprout::begin(SPROUT_FORWARD(ForwardRange1, range1)), - sprout::end(SPROUT_FORWARD(ForwardRange1, range1)), - sprout::begin(SPROUT_FORWARD(ForwardRange2, range2)), - sprout::end(SPROUT_FORWARD(ForwardRange2, range2)) - ), - SPROUT_FORWARD(ForwardRange1, range1) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - search(ForwardRange1&& range1, ForwardRange2&& range2, BinaryPredicate pred) { - return sprout::range::range_return::pack( - sprout::search( - sprout::begin(SPROUT_FORWARD(ForwardRange1, range1)), - sprout::end(SPROUT_FORWARD(ForwardRange1, range1)), - sprout::begin(SPROUT_FORWARD(ForwardRange2, range2)), - sprout::end(SPROUT_FORWARD(ForwardRange2, range2)), - pred - ), - SPROUT_FORWARD(ForwardRange1, range1) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - search(ForwardRange1&& range1, ForwardRange2&& range2) { - return sprout::range::range_return::pack( - sprout::search( - sprout::begin(SPROUT_FORWARD(ForwardRange1, range1)), - sprout::end(SPROUT_FORWARD(ForwardRange1, range1)), - sprout::begin(SPROUT_FORWARD(ForwardRange2, range2)), - sprout::end(SPROUT_FORWARD(ForwardRange2, range2)) - ), - SPROUT_FORWARD(ForwardRange1, range1) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - search(ForwardRange1&& range1, ForwardRange2&& range2, BinaryPredicate pred) { - return sprout::range::range_return::pack( - sprout::search( - sprout::begin(SPROUT_FORWARD(ForwardRange1, range1)), - sprout::end(SPROUT_FORWARD(ForwardRange1, range1)), - sprout::begin(SPROUT_FORWARD(ForwardRange2, range2)), - sprout::end(SPROUT_FORWARD(ForwardRange2, range2)), - pred - ), - SPROUT_FORWARD(ForwardRange1, range1) - ); - } - - // - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - search(ForwardRange&& range, Searcher const& searcher) { - return sprout::range::range_return::pack( - sprout::search( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)), - searcher - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - search(ForwardRange&& range, Searcher const& searcher) { - return sprout::range::range_return::pack( - sprout::search( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)), - searcher - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_SEARCH_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/search_n.hpp b/dsp/lib/sprout/sprout/range/algorithm/search_n.hpp deleted file mode 100644 index 9e787f0..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/search_n.hpp +++ /dev/null @@ -1,84 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_SEARCH_N_HPP -#define SPROUT_RANGE_ALGORITHM_SEARCH_N_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - - // 25.2.13 Search - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - search_n(ForwardRange&& range, Size count, T const& value) { - return sprout::range::range_return::pack( - sprout::search_n( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)), - count, - value - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - search_n(ForwardRange&& range, Size count, T const& value, BinaryPredicate pred) { - return sprout::range::range_return::pack( - sprout::search_n( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)), - count, - value, - pred - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - search_n(ForwardRange&& range, Size count, T const& value) { - return sprout::range::range_return::pack( - sprout::search_n( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)), - count, - value - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - search_n(ForwardRange&& range, Size count, T const& value, BinaryPredicate pred) { - return sprout::range::range_return::pack( - sprout::search_n( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)), - count, - value, - pred - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_SEARCH_N_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/set_difference.hpp b/dsp/lib/sprout/sprout/range/algorithm/set_difference.hpp deleted file mode 100644 index e8827ac..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/set_difference.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_SET_DIFFERENCE_HPP -#define SPROUT_RANGE_ALGORITHM_SET_DIFFERENCE_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_SET_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/set_intersection.hpp b/dsp/lib/sprout/sprout/range/algorithm/set_intersection.hpp deleted file mode 100644 index 919dac0..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/set_intersection.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_SET_INTERSECTION_HPP -#define SPROUT_RANGE_ALGORITHM_SET_INTERSECTION_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_SET_INTERSECTION_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/set_symmetric_difference.hpp b/dsp/lib/sprout/sprout/range/algorithm/set_symmetric_difference.hpp deleted file mode 100644 index bf3e6d2..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/set_symmetric_difference.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_SET_SYMMETRIC_DIFFERENCE_HPP -#define SPROUT_RANGE_ALGORITHM_SET_SYMMETRIC_DIFFERENCE_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_SET_SYMMETRIC_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/set_union.hpp b/dsp/lib/sprout/sprout/range/algorithm/set_union.hpp deleted file mode 100644 index 81255bc..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/set_union.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_SET_UNION_HPP -#define SPROUT_RANGE_ALGORITHM_SET_UNION_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_SET_UNION_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/shuffle.hpp b/dsp/lib/sprout/sprout/range/algorithm/shuffle.hpp deleted file mode 100644 index 358170d..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/shuffle.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_SHUFFLE_HPP -#define SPROUT_RANGE_ALGORITHM_SHUFFLE_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_SHUFFLE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/sort.hpp b/dsp/lib/sprout/sprout/range/algorithm/sort.hpp deleted file mode 100644 index a5ca1cb..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/sort.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_SORT_HPP -#define SPROUT_RANGE_ALGORITHM_SORT_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_SORT_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/sort_heap.hpp b/dsp/lib/sprout/sprout/range/algorithm/sort_heap.hpp deleted file mode 100644 index 5e0054a..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/sort_heap.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_SORT_HEAP_HPP -#define SPROUT_RANGE_ALGORITHM_SORT_HEAP_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_SORT_HEAP_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/stable_partition.hpp b/dsp/lib/sprout/sprout/range/algorithm/stable_partition.hpp deleted file mode 100644 index 16c38cf..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/stable_partition.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_STABLE_PARTITION_HPP -#define SPROUT_RANGE_ALGORITHM_STABLE_PARTITION_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_STABLE_PARTITION_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/stable_partition_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/stable_partition_copy.hpp deleted file mode 100644 index fb1d94b..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/stable_partition_copy.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_STABLE_PARTITION_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_STABLE_PARTITION_COPY_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_STABLE_PARTITION_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/stable_sort.hpp b/dsp/lib/sprout/sprout/range/algorithm/stable_sort.hpp deleted file mode 100644 index a48bfeb..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/stable_sort.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_STABLE_SORT_HPP -#define SPROUT_RANGE_ALGORITHM_STABLE_SORT_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_STABLE_SORT_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/string.hpp b/dsp/lib/sprout/sprout/range/algorithm/string.hpp deleted file mode 100644 index 44aeb83..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/string.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_STRING_HPP -#define SPROUT_RANGE_ALGORITHM_STRING_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_STRING_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/string/case_conv.hpp b/dsp/lib/sprout/sprout/range/algorithm/string/case_conv.hpp deleted file mode 100644 index 54cfd9b..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/string/case_conv.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_STRING_CASE_CONV_HPP -#define SPROUT_RANGE_ALGORITHM_STRING_CASE_CONV_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_STRING_CASE_CONV_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/string/fit/case_conv.hpp b/dsp/lib/sprout/sprout/range/algorithm/string/fit/case_conv.hpp deleted file mode 100644 index ca56b51..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/string/fit/case_conv.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_STRING_FIT_CASE_CONV_HPP -#define SPROUT_RANGE_ALGORITHM_STRING_FIT_CASE_CONV_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_STRING_FIT_CASE_CONV_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/string/fit/to_lower_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/string/fit/to_lower_copy.hpp deleted file mode 100644 index 4dcdf35..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/string/fit/to_lower_copy.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_STRING_FIT_TO_LOWER_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_STRING_FIT_TO_LOWER_COPY_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace algorithm { - namespace fit { - // - // to_lower_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - to_lower_copy(InputRange const& rng, Result const& result) { - return sprout::fit::to_lower_copy(sprout::begin(rng), sprout::end(rng), result); - } - } // namespace fit - - using sprout::range::algorithm::fit::to_lower_copy; - } // namespace algorithm - - namespace fit { - using sprout::range::algorithm::fit::to_lower_copy; - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_STRING_FIT_TO_LOWER_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/string/fit/to_upper_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/string/fit/to_upper_copy.hpp deleted file mode 100644 index d756501..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/string/fit/to_upper_copy.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_STRING_FIT_TO_UPPER_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_STRING_FIT_TO_UPPER_COPY_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace algorithm { - namespace fit { - // - // to_upper_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - to_upper_copy(InputRange const& rng, Result const& result) { - return sprout::fit::to_upper_copy(sprout::begin(rng), sprout::end(rng), result); - } - } // namespace fit - - using sprout::range::algorithm::fit::to_upper_copy; - } // namespace algorithm - - namespace fit { - using sprout::range::algorithm::fit::to_upper_copy; - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_STRING_FIT_TO_UPPER_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/string/fixed/case_conv.hpp b/dsp/lib/sprout/sprout/range/algorithm/string/fixed/case_conv.hpp deleted file mode 100644 index 4601d55..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/string/fixed/case_conv.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_STRING_FIXED_CASE_CONV_HPP -#define SPROUT_RANGE_ALGORITHM_STRING_FIXED_CASE_CONV_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_STRING_FIXED_CASE_CONV_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/string/fixed/to_lower_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/string/fixed/to_lower_copy.hpp deleted file mode 100644 index 9390b3e..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/string/fixed/to_lower_copy.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_STRING_FIXED_TO_LOWER_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_STRING_FIXED_TO_LOWER_COPY_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace algorithm { - namespace fixed { - // - // to_lower_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - to_lower_copy(InputRange const& rng, Result const& result) { - return sprout::algorithm::fixed::to_lower_copy(sprout::begin(rng), sprout::end(rng), result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - to_lower_copy(InputRange const& rng) { - return sprout::algorithm::fixed::to_lower_copy(sprout::begin(rng), sprout::end(rng)); - } - } // namespace fixed - - using sprout::range::algorithm::fixed::to_lower_copy; - } // namespace algorithm - - namespace fixed { - using sprout::range::algorithm::fixed::to_lower_copy; - } // namespace fixed - - using sprout::range::algorithm::fixed::to_lower_copy; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_STRING_FIXED_TO_LOWER_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/string/fixed/to_upper_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/string/fixed/to_upper_copy.hpp deleted file mode 100644 index c3a116a..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/string/fixed/to_upper_copy.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_STRING_FIXED_TO_UPPER_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_STRING_FIXED_TO_UPPER_COPY_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace algorithm { - namespace fixed { - // - // to_upper_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - to_upper_copy(InputRange const& rng, Result const& result) { - return sprout::algorithm::fixed::to_upper_copy(sprout::begin(rng), sprout::end(rng), result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - to_upper_copy(InputRange const& rng) { - return sprout::algorithm::fixed::to_upper_copy(sprout::begin(rng), sprout::end(rng)); - } - } // namespace fixed - - using sprout::range::algorithm::fixed::to_upper_copy; - } // namespace algorithm - - namespace fixed { - using sprout::range::algorithm::fixed::to_upper_copy; - } // namespace fixed - - using sprout::range::algorithm::fixed::to_upper_copy; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_STRING_FIXED_TO_UPPER_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/string/to_lower_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/string/to_lower_copy.hpp deleted file mode 100644 index f20e3d4..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/string/to_lower_copy.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_STRING_TO_LOWER_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_STRING_TO_LOWER_COPY_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_STRING_TO_LOWER_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/string/to_upper_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/string/to_upper_copy.hpp deleted file mode 100644 index 021b456..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/string/to_upper_copy.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_STRING_TO_UPPER_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_STRING_TO_UPPER_COPY_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_STRING_TO_UPPER_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/swap_element_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/swap_element_copy.hpp deleted file mode 100644 index c599c91..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/swap_element_copy.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_SWAP_ELEMENT_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_SWAP_ELEMENT_COPY_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_SWAP_ELEMENT_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/swap_ranges.hpp b/dsp/lib/sprout/sprout/range/algorithm/swap_ranges.hpp deleted file mode 100644 index 83a6b99..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/swap_ranges.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_SWAP_RANGES_HPP -#define SPROUT_RANGE_ALGORITHM_SWAP_RANGES_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_SWAP_RANGES_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/transform.hpp b/dsp/lib/sprout/sprout/range/algorithm/transform.hpp deleted file mode 100644 index 49ade69..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/transform.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_TRANSFORM_HPP -#define SPROUT_RANGE_ALGORITHM_TRANSFORM_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_TRANSFORM_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/tristate_lexicographical_compare.hpp b/dsp/lib/sprout/sprout/range/algorithm/tristate_lexicographical_compare.hpp deleted file mode 100644 index 6d18c1a..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/tristate_lexicographical_compare.hpp +++ /dev/null @@ -1,54 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_TRISTATE_LEXICOGRAPHICAL_COMPARE_HPP -#define SPROUT_RANGE_ALGORITHM_TRISTATE_LEXICOGRAPHICAL_COMPARE_HPP - -#include -#include -#include - -namespace sprout { - namespace range { - // - // tristate_lexicographical_compare - // - template - inline SPROUT_CONSTEXPR int - tristate_lexicographical_compare(InputRange1 const& range1, InputRange2 const& range2) { - return sprout::tristate_lexicographical_compare( - sprout::begin(range1), sprout::end(range1), sprout::begin(range2), sprout::end(range2) - ); - } - - template - inline SPROUT_CONSTEXPR int - tristate_lexicographical_compare(InputRange1 const& range1, InputRange2 const& range2, Compare comp) { - return sprout::tristate_lexicographical_compare( - sprout::begin(range1), sprout::end(range1), sprout::begin(range2), sprout::end(range2), comp - ); - } - - template - inline SPROUT_CONSTEXPR int - tristate_lexicographical_compare(InputRange1 const& range1, T1 const& delim1, InputRange2 const& range2, T2 const& delim2) { - return sprout::tristate_lexicographical_compare( - sprout::begin(range1), sprout::end(range1), delim1, sprout::begin(range2), sprout::end(range2), delim2 - ); - } - - template - inline SPROUT_CONSTEXPR int - tristate_lexicographical_compare(InputRange1 const& range1, T1 const& delim1, InputRange2 const& range2, T2 const& delim2, Compare comp) { - return sprout::tristate_lexicographical_compare( - sprout::begin(range1), sprout::end(range1), delim1, sprout::begin(range2), sprout::end(range2), delim2, comp - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_TRISTATE_LEXICOGRAPHICAL_COMPARE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/unique.hpp b/dsp/lib/sprout/sprout/range/algorithm/unique.hpp deleted file mode 100644 index 491f678..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/unique.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_UNIQUE_HPP -#define SPROUT_RANGE_ALGORITHM_UNIQUE_HPP - -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_UNIQUE_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/unique_copy.hpp b/dsp/lib/sprout/sprout/range/algorithm/unique_copy.hpp deleted file mode 100644 index 7fc500a..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/unique_copy.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_UNIQUE_COPY_HPP -#define SPROUT_RANGE_ALGORITHM_UNIQUE_COPY_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_UNIQUE_COPY_HPP diff --git a/dsp/lib/sprout/sprout/range/algorithm/upper_bound.hpp b/dsp/lib/sprout/sprout/range/algorithm/upper_bound.hpp deleted file mode 100644 index 565e380..0000000 --- a/dsp/lib/sprout/sprout/range/algorithm/upper_bound.hpp +++ /dev/null @@ -1,80 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 RiSK (sscrisk) - https://github.com/sscrisk/CEL---ConstExpr-Library - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_ALGORITHM_UPPER_BOUND_HPP -#define SPROUT_RANGE_ALGORITHM_UPPER_BOUND_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - - // 25.4.3.2 upper_bound - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - upper_bound(ForwardRange&& range, T const& value) { - return sprout::range::range_return::pack( - sprout::upper_bound( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)), - value - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - upper_bound(ForwardRange&& range, T const& value, Compare comp) { - return sprout::range::range_return::pack( - sprout::upper_bound( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)), - value, - comp - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - upper_bound(ForwardRange&& range, T const& value) { - return sprout::range::range_return::pack( - sprout::upper_bound( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)), - value - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - - template - inline SPROUT_CONSTEXPR typename sprout::range::range_return::type - upper_bound(ForwardRange&& range, T const& value, Compare comp) { - return sprout::range::range_return::pack( - sprout::upper_bound( - sprout::begin(SPROUT_FORWARD(ForwardRange, range)), - sprout::end(SPROUT_FORWARD(ForwardRange, range)), - value, - comp - ), - SPROUT_FORWARD(ForwardRange, range) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_ALGORITHM_UPPER_BOUND_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric.hpp b/dsp/lib/sprout/sprout/range/numeric.hpp deleted file mode 100644 index 7cf6718..0000000 --- a/dsp/lib/sprout/sprout/range/numeric.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_HPP -#define SPROUT_RANGE_NUMERIC_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_NUMERIC_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/accumulate.hpp b/dsp/lib/sprout/sprout/range/numeric/accumulate.hpp deleted file mode 100644 index 85df1b2..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/accumulate.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_ACCUMLATE_HPP -#define SPROUT_RANGE_NUMERIC_ACCUMLATE_HPP - -#include -#include -#include - -namespace sprout { - namespace range { - - // 26.7.2 Accumulate - template - inline SPROUT_CONSTEXPR T - accumulate(InputRange const& range, T init, BinaryOperation binary_op) { - return sprout::accumulate(sprout::begin(range), sprout::end(range), init, binary_op); - } - - template - inline SPROUT_CONSTEXPR T - accumulate(InputRange const& range, T init) { - return sprout::accumulate(sprout::begin(range), sprout::end(range), init); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_ACCUMLATE_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/adjacent_difference.hpp b/dsp/lib/sprout/sprout/range/numeric/adjacent_difference.hpp deleted file mode 100644 index 39445eb..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/adjacent_difference.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_ADJACENT_DIFFERENCE_HPP -#define SPROUT_RANGE_NUMERIC_ADJACENT_DIFFERENCE_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_NUMERIC_ADJACENT_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/cxx14.hpp b/dsp/lib/sprout/sprout/range/numeric/cxx14.hpp deleted file mode 100644 index 9a7b625..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/cxx14.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_CXX14_HPP -#define SPROUT_RANGE_NUMERIC_CXX14_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_NUMERIC_CXX14_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/cxx14/adjacent_difference.hpp b/dsp/lib/sprout/sprout/range/numeric/cxx14/adjacent_difference.hpp deleted file mode 100644 index 99a6cc8..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/cxx14/adjacent_difference.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_CXX14_ADJACENT_DIFFERENCE_HPP -#define SPROUT_RANGE_NUMERIC_CXX14_ADJACENT_DIFFERENCE_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // adjacent_difference - // - template< - typename InputRange, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR OutputIterator - adjacent_difference(InputRange const& rng, OutputIterator result) { - return sprout::adjacent_difference(sprout::begin(rng), sprout::end(rng), result); - } - template< - typename InputRange, typename OutputIterator, typename BinaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR OutputIterator - adjacent_difference(InputRange const& rng, OutputIterator result, BinaryOperation binary_op) { - return sprout::adjacent_difference(sprout::begin(rng), sprout::end(rng), result, binary_op); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_CXX14_ADJACENT_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/cxx14/exclusive_scan.hpp b/dsp/lib/sprout/sprout/range/numeric/cxx14/exclusive_scan.hpp deleted file mode 100644 index 5f6d376..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/cxx14/exclusive_scan.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_CXX14_EXCLUSIVE_SCAN_HPP -#define SPROUT_RANGE_NUMERIC_CXX14_EXCLUSIVE_SCAN_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // exclusive_scan - // - template< - typename InputRange, typename OutputIterator, typename T, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR OutputIterator - exclusive_scan(InputRange const& rng, OutputIterator result, T init) { - return sprout::exclusive_scan(sprout::begin(rng), sprout::end(rng), result, init); - } - template< - typename InputRange, typename OutputIterator, typename T, typename BinaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR OutputIterator - exclusive_scan(InputRange const& rng, OutputIterator result, T init, BinaryOperation binary_op) { - return sprout::exclusive_scan(sprout::begin(rng), sprout::end(rng), result, init, binary_op); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_CXX14_EXCLUSIVE_SCAN_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/cxx14/inclusive_scan.hpp b/dsp/lib/sprout/sprout/range/numeric/cxx14/inclusive_scan.hpp deleted file mode 100644 index 81dd4cc..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/cxx14/inclusive_scan.hpp +++ /dev/null @@ -1,50 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_CXX14_INCLUSIVE_SCAN_HPP -#define SPROUT_RANGE_NUMERIC_CXX14_INCLUSIVE_SCAN_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // inclusive_scan - // - template< - typename InputRange, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR OutputIterator - inclusive_scan(InputRange const& rng, OutputIterator result) { - return sprout::inclusive_scan(sprout::begin(rng), sprout::end(rng), result); - } - template< - typename InputRange, typename OutputIterator, typename BinaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR OutputIterator - inclusive_scan(InputRange const& rng, OutputIterator result, BinaryOperation binary_op) { - return sprout::inclusive_scan(sprout::begin(rng), sprout::end(rng), result, binary_op); - } - template< - typename InputRange, typename OutputIterator, typename BinaryOperation, typename T, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR OutputIterator - inclusive_scan(InputRange const& rng, OutputIterator result, BinaryOperation binary_op, T init) { - return sprout::inclusive_scan(sprout::begin(rng), sprout::end(rng), result, binary_op, init); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_CXX14_INCLUSIVE_SCAN_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/cxx14/iota.hpp b/dsp/lib/sprout/sprout/range/numeric/cxx14/iota.hpp deleted file mode 100644 index ff8f4b1..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/cxx14/iota.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_CXX14_IOTA_HPP -#define SPROUT_RANGE_NUMERIC_CXX14_IOTA_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // iota - // - template - inline SPROUT_CXX14_CONSTEXPR void - iota(ForwardRange&& rng, T value) { - sprout::iota(sprout::begin(SPROUT_FORWARD(ForwardRange, rng)), sprout::end(SPROUT_FORWARD(ForwardRange, rng)), value); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_CXX14_IOTA_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/cxx14/partial_sum.hpp b/dsp/lib/sprout/sprout/range/numeric/cxx14/partial_sum.hpp deleted file mode 100644 index dcca0d9..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/cxx14/partial_sum.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_CXX14_PARTIAL_SUM_HPP -#define SPROUT_RANGE_NUMERIC_CXX14_PARTIAL_SUM_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // partial_sum - // - template< - typename InputRange, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR OutputIterator - partial_sum(InputRange const& rng, OutputIterator result) { - return sprout::partial_sum(sprout::begin(rng), sprout::end(rng), result); - } - template< - typename InputRange, typename OutputIterator, typename BinaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR OutputIterator - partial_sum(InputRange const& rng, OutputIterator result, BinaryOperation binary_op) { - return sprout::partial_sum(sprout::begin(rng), sprout::end(rng), result, binary_op); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_CXX14_PARTIAL_SUM_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/cxx14/transform_exclusive_scan.hpp b/dsp/lib/sprout/sprout/range/numeric/cxx14/transform_exclusive_scan.hpp deleted file mode 100644 index aec83a4..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/cxx14/transform_exclusive_scan.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_CXX14_TRANSFORM_EXCLUSIVE_SCAN_HPP -#define SPROUT_RANGE_NUMERIC_CXX14_TRANSFORM_EXCLUSIVE_SCAN_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // transform_exclusive_scan - // - template< - typename InputRange, typename OutputIterator, typename T, typename BinaryOperation, typename UnaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR OutputIterator - transform_exclusive_scan(InputRange const& rng, OutputIterator result, T init, BinaryOperation binary_op, UnaryOperation unary_op) { - return sprout::transform_exclusive_scan(sprout::begin(rng), sprout::end(rng), result, init, binary_op, unary_op); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_CXX14_TRANSFORM_EXCLUSIVE_SCAN_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/cxx14/transform_inclusive_scan.hpp b/dsp/lib/sprout/sprout/range/numeric/cxx14/transform_inclusive_scan.hpp deleted file mode 100644 index bea95af..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/cxx14/transform_inclusive_scan.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_CXX14_TRANSFORM_INCLUSIVE_SCAN_HPP -#define SPROUT_RANGE_NUMERIC_CXX14_TRANSFORM_INCLUSIVE_SCAN_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // transform_inclusive_scan - // - template< - typename InputRange, typename OutputIterator, typename BinaryOperation, typename UnaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR OutputIterator - transform_inclusive_scan(InputRange const& rng, OutputIterator result, BinaryOperation binary_op, UnaryOperation unary_op) { - return sprout::transform_inclusive_scan(sprout::begin(rng), sprout::end(rng), result, binary_op, unary_op); - } - template< - typename InputRange, typename OutputIterator, typename BinaryOperation, typename UnaryOperation, typename T, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR OutputIterator - transform_inclusive_scan(InputRange const& rng, OutputIterator result, BinaryOperation binary_op, UnaryOperation unary_op, T init) { - return sprout::transform_inclusive_scan(sprout::begin(rng), sprout::end(rng), result, binary_op, unary_op, init); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_CXX14_TRANSFORM_INCLUSIVE_SCAN_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/dft.hpp b/dsp/lib/sprout/sprout/range/numeric/dft.hpp deleted file mode 100644 index 0f807a0..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/dft.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_DFT_HPP -#define SPROUT_RANGE_NUMERIC_DFT_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/dft/amplitude_spectrum.hpp b/dsp/lib/sprout/sprout/range/numeric/dft/amplitude_spectrum.hpp deleted file mode 100644 index e6b8c9b..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/dft/amplitude_spectrum.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_DFT_AMPLITUDE_SPECTRUM_HPP -#define SPROUT_RANGE_NUMERIC_DFT_AMPLITUDE_SPECTRUM_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_AMPLITUDE_SPECTRUM_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/dft/cxx14.hpp b/dsp/lib/sprout/sprout/range/numeric/dft/cxx14.hpp deleted file mode 100644 index 399a4f8..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/dft/cxx14.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_DFT_CXX14_HPP -#define SPROUT_RANGE_NUMERIC_DFT_CXX14_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_CXX14_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/dft/cxx14/amplitude_spectrum.hpp b/dsp/lib/sprout/sprout/range/numeric/dft/cxx14/amplitude_spectrum.hpp deleted file mode 100644 index 93c258a..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/dft/cxx14/amplitude_spectrum.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_DFT_CXX14_AMPLITUDE_SPECTRUM_HPP -#define SPROUT_RANGE_NUMERIC_DFT_CXX14_AMPLITUDE_SPECTRUM_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // amplitude_spectrum - // - template< - typename InputRange, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - amplitude_spectrum(InputRange const& rng, OutputIterator result) { - return sprout::amplitude_spectrum(sprout::begin(rng), sprout::end(rng), result); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_CXX14_AMPLITUDE_SPECTRUM_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/dft/cxx14/phase_spectrum.hpp b/dsp/lib/sprout/sprout/range/numeric/dft/cxx14/phase_spectrum.hpp deleted file mode 100644 index 4f06b4a..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/dft/cxx14/phase_spectrum.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_DFT_CXX14_PHASE_SPECTRUM_HPP -#define SPROUT_RANGE_NUMERIC_DFT_CXX14_PHASE_SPECTRUM_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // phase_spectrum - // - template< - typename InputRange, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - phase_spectrum(InputRange const& rng, OutputIterator result) { - return sprout::phase_spectrum(sprout::begin(rng), sprout::end(rng), result); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_CXX14_PHASE_SPECTRUM_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/dft/cxx14/sawtooth.hpp b/dsp/lib/sprout/sprout/range/numeric/dft/cxx14/sawtooth.hpp deleted file mode 100644 index fb85535..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/dft/cxx14/sawtooth.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_DFT_CXX14_SAWTOOTH_HPP -#define SPROUT_RANGE_NUMERIC_DFT_CXX14_SAWTOOTH_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // sawtooth - // - template - inline SPROUT_CXX14_CONSTEXPR void - sawtooth( - ForwardRange&& rng, - typename sprout::container_traits::value_type const& frequency = 1, - typename sprout::container_traits::value_type const& amplitude = 1, - typename sprout::container_traits::value_type const& phase = 0 - ) - { - sprout::sawtooth( - sprout::begin(SPROUT_FORWARD(ForwardRange, rng)), sprout::end(SPROUT_FORWARD(ForwardRange, rng)), - frequency, amplitude, phase - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_CXX14_SAWTOOTH_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/dft/cxx14/sinusoid.hpp b/dsp/lib/sprout/sprout/range/numeric/dft/cxx14/sinusoid.hpp deleted file mode 100644 index fe83177..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/dft/cxx14/sinusoid.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_DFT_CXX14_SINUSOID_HPP -#define SPROUT_RANGE_NUMERIC_DFT_CXX14_SINUSOID_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // sinusoid - // - template - inline SPROUT_CXX14_CONSTEXPR void - sinusoid( - ForwardRange&& rng, - typename sprout::container_traits::value_type const& frequency = 1, - typename sprout::container_traits::value_type const& amplitude = 1, - typename sprout::container_traits::value_type const& phase = 0 - ) - { - sprout::sinusoid( - sprout::begin(SPROUT_FORWARD(ForwardRange, rng)), sprout::end(SPROUT_FORWARD(ForwardRange, rng)), - frequency, amplitude, phase - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_CXX14_SINUSOID_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/dft/cxx14/spectrum.hpp b/dsp/lib/sprout/sprout/range/numeric/dft/cxx14/spectrum.hpp deleted file mode 100644 index a689d33..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/dft/cxx14/spectrum.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_DFT_CXX14_SPECTRUM_HPP -#define SPROUT_RANGE_NUMERIC_DFT_CXX14_SPECTRUM_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // spectrum - // - template< - typename InputRange, typename OutputIterator, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CXX14_CONSTEXPR OutputIterator - spectrum(InputRange const& rng, OutputIterator result) { - return sprout::spectrum(sprout::begin(rng), sprout::end(rng), result); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_CXX14_SPECTRUM_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/dft/cxx14/square.hpp b/dsp/lib/sprout/sprout/range/numeric/dft/cxx14/square.hpp deleted file mode 100644 index 0498d94..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/dft/cxx14/square.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_DFT_CXX14_SQUARE_HPP -#define SPROUT_RANGE_NUMERIC_DFT_CXX14_SQUARE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // square - // - template - inline SPROUT_CXX14_CONSTEXPR void - square( - ForwardRange&& rng, - typename sprout::container_traits::value_type const& frequency = 1, - typename sprout::container_traits::value_type const& amplitude = 1, - typename sprout::container_traits::value_type const& phase = 0 - ) - { - sprout::square( - sprout::begin(SPROUT_FORWARD(ForwardRange, rng)), sprout::end(SPROUT_FORWARD(ForwardRange, rng)), - frequency, amplitude, phase - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_CXX14_SQUARE_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/dft/cxx14/triangle.hpp b/dsp/lib/sprout/sprout/range/numeric/dft/cxx14/triangle.hpp deleted file mode 100644 index 2f0b466..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/dft/cxx14/triangle.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_DFT_CXX14_TRIANGLE_HPP -#define SPROUT_RANGE_NUMERIC_DFT_CXX14_TRIANGLE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // triangle - // - template - inline SPROUT_CXX14_CONSTEXPR void - triangle( - ForwardRange&& rng, - typename sprout::container_traits::value_type const& frequency = 1, - typename sprout::container_traits::value_type const& amplitude = 1, - typename sprout::container_traits::value_type const& phase = 0, - typename sprout::container_traits::value_type const& duty = 0.5 - ) - { - sprout::triangle( - sprout::begin(SPROUT_FORWARD(ForwardRange, rng)), sprout::end(SPROUT_FORWARD(ForwardRange, rng)), - frequency, amplitude, phase, duty - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_CXX14_TRIANGLE_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/dft/cxx14/wave.hpp b/dsp/lib/sprout/sprout/range/numeric/dft/cxx14/wave.hpp deleted file mode 100644 index 262a3f6..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/dft/cxx14/wave.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_DFT_CXX14_WAVE_HPP -#define SPROUT_RANGE_NUMERIC_DFT_CXX14_WAVE_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_CXX14_WAVE_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/dft/dft.hpp b/dsp/lib/sprout/sprout/range/numeric/dft/dft.hpp deleted file mode 100644 index dfdb3ee..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/dft/dft.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_DFT_DFT_HPP -#define SPROUT_RANGE_NUMERIC_DFT_DFT_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_DFT_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/dft/dft_element.hpp b/dsp/lib/sprout/sprout/range/numeric/dft/dft_element.hpp deleted file mode 100644 index b3bedd4..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/dft/dft_element.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_DFT_DFT_ELEMENT_HPP -#define SPROUT_RANGE_NUMERIC_DFT_DFT_ELEMENT_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // dft_element - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::value_type - dft_element(InputRange const& input, typename sprout::container_traits::difference_type i) { - return sprout::dft_element(sprout::begin(input), sprout::end(input), i); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_DFT_ELEMENT_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/dft/fit.hpp b/dsp/lib/sprout/sprout/range/numeric/dft/fit.hpp deleted file mode 100644 index be4c7ab..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/dft/fit.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_DFT_FIT_HPP -#define SPROUT_RANGE_NUMERIC_DFT_FIT_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_FIT_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/dft/fit/amplitude_spectrum.hpp b/dsp/lib/sprout/sprout/range/numeric/dft/fit/amplitude_spectrum.hpp deleted file mode 100644 index 8e367e9..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/dft/fit/amplitude_spectrum.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_DFT_FIT_AMPLITUDE_SPECTRUM_HPP -#define SPROUT_RANGE_NUMERIC_DFT_FIT_AMPLITUDE_SPECTRUM_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fit { - // - // amplitude_spectrum - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - amplitude_spectrum(InputRange const& rng, Result const& result) { - return sprout::fit::amplitude_spectrum(sprout::begin(rng), sprout::end(rng), result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - amplitude_spectrum(InputRange const& rng) { - return sprout::fit::amplitude_spectrum(sprout::begin(rng), sprout::end(rng)); - } - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_FIT_AMPLITUDE_SPECTRUM_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/dft/fit/dft.hpp b/dsp/lib/sprout/sprout/range/numeric/dft/fit/dft.hpp deleted file mode 100644 index 297d8f3..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/dft/fit/dft.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_DFT_FIT_DFT_HPP -#define SPROUT_RANGE_NUMERIC_DFT_FIT_DFT_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fit { - // - // dft - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - dft(ForwardRange const& rng, Result const& result) { - return sprout::fit::dft(sprout::begin(rng), sprout::end(rng), result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - dft(ForwardRange const& rng) { - return sprout::fit::dft(sprout::begin(rng), sprout::end(rng)); - } - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_FIT_DFT_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/dft/fit/idft.hpp b/dsp/lib/sprout/sprout/range/numeric/dft/fit/idft.hpp deleted file mode 100644 index edd9ed6..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/dft/fit/idft.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_DFT_FIT_IDFT_HPP -#define SPROUT_RANGE_NUMERIC_DFT_FIT_IDFT_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fit { - // - // idft - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - idft(ForwardRange const& rng, Result const& result) { - return sprout::fit::idft(sprout::begin(rng), sprout::end(rng), result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - idft(ForwardRange const& rng) { - return sprout::fit::idft(sprout::begin(rng), sprout::end(rng)); - } - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_FIT_IDFT_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/dft/fit/phase_spectrum.hpp b/dsp/lib/sprout/sprout/range/numeric/dft/fit/phase_spectrum.hpp deleted file mode 100644 index e5bc2a4..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/dft/fit/phase_spectrum.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_DFT_FIT_PHASE_SPECTRUM_HPP -#define SPROUT_RANGE_NUMERIC_DFT_FIT_PHASE_SPECTRUM_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fit { - // - // phase_spectrum - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - phase_spectrum(InputRange const& rng, Result const& result) { - return sprout::fit::phase_spectrum(sprout::begin(rng), sprout::end(rng), result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - phase_spectrum(InputRange const& rng) { - return sprout::fit::phase_spectrum(sprout::begin(rng), sprout::end(rng)); - } - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_FIT_PHASE_SPECTRUM_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/dft/fit/spectrum.hpp b/dsp/lib/sprout/sprout/range/numeric/dft/fit/spectrum.hpp deleted file mode 100644 index aaf73f1..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/dft/fit/spectrum.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_DFT_FIT_SPECTRUM_HPP -#define SPROUT_RANGE_NUMERIC_DFT_FIT_SPECTRUM_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fit { - // - // spectrum - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - spectrum(InputRange const& rng, Result const& result) { - return sprout::fit::spectrum(sprout::begin(rng), sprout::end(rng), result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - spectrum(InputRange const& rng) { - return sprout::fit::spectrum(sprout::begin(rng), sprout::end(rng)); - } - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_FIT_SPECTRUM_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/dft/fixed.hpp b/dsp/lib/sprout/sprout/range/numeric/dft/fixed.hpp deleted file mode 100644 index aa42ea9..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/dft/fixed.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_DFT_FIXED_HPP -#define SPROUT_RANGE_NUMERIC_DFT_FIXED_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_FIXED_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/dft/fixed/amplitude_spectrum.hpp b/dsp/lib/sprout/sprout/range/numeric/dft/fixed/amplitude_spectrum.hpp deleted file mode 100644 index f334fc5..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/dft/fixed/amplitude_spectrum.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_DFT_FIXED_AMPLITUDE_SPECTRUM_HPP -#define SPROUT_RANGE_NUMERIC_DFT_FIXED_AMPLITUDE_SPECTRUM_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fixed { - // - // amplitude_spectrum - // - template< - typename InputRange, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - amplitude_spectrum(InputRange const& rng, Result const& result) { - return sprout::fixed::amplitude_spectrum(sprout::begin(rng), sprout::end(rng), result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - amplitude_spectrum(InputRange const& rng) { - return sprout::fixed::amplitude_spectrum(sprout::begin(rng), sprout::end(rng)); - } - } // namespace fixed - - using sprout::range::fixed::amplitude_spectrum; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_FIXED_AMPLITUDE_SPECTRUM_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/dft/fixed/dft.hpp b/dsp/lib/sprout/sprout/range/numeric/dft/fixed/dft.hpp deleted file mode 100644 index 750f79f..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/dft/fixed/dft.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_DFT_FIXED_DFT_HPP -#define SPROUT_RANGE_NUMERIC_DFT_FIXED_DFT_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fixed { - // - // dft - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - dft(ForwardRange const& rng, Result const& result) { - return sprout::fixed::dft(sprout::begin(rng), sprout::end(rng), result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - dft(ForwardRange const& rng) { - return sprout::fixed::dft(sprout::begin(rng), sprout::end(rng)); - } - } // namespace fixed - - using sprout::range::fixed::dft; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_FIXED_DFT_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/dft/fixed/idft.hpp b/dsp/lib/sprout/sprout/range/numeric/dft/fixed/idft.hpp deleted file mode 100644 index d671968..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/dft/fixed/idft.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_DFT_FIXED_IDFT_HPP -#define SPROUT_RANGE_NUMERIC_DFT_FIXED_IDFT_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fixed { - // - // idft - // - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - idft(ForwardRange const& rng, Result const& result) { - return sprout::fixed::idft(sprout::begin(rng), sprout::end(rng), result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - idft(ForwardRange const& rng) { - return sprout::fixed::idft(sprout::begin(rng), sprout::end(rng)); - } - } // namespace fixed - - using sprout::range::fixed::idft; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_FIXED_IDFT_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/dft/fixed/phase_spectrum.hpp b/dsp/lib/sprout/sprout/range/numeric/dft/fixed/phase_spectrum.hpp deleted file mode 100644 index b36cbda..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/dft/fixed/phase_spectrum.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_DFT_FIXED_PHASE_SPECTRUM_HPP -#define SPROUT_RANGE_NUMERIC_DFT_FIXED_PHASE_SPECTRUM_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fixed { - // - // phase_spectrum - // - template< - typename InputRange, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - phase_spectrum(InputRange const& rng, Result const& result) { - return sprout::fixed::phase_spectrum(sprout::begin(rng), sprout::end(rng), result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - phase_spectrum(InputRange const& rng) { - return sprout::fixed::phase_spectrum(sprout::begin(rng), sprout::end(rng)); - } - } // namespace fixed - - using sprout::range::fixed::phase_spectrum; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_FIXED_PHASE_SPECTRUM_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/dft/fixed/spectrum.hpp b/dsp/lib/sprout/sprout/range/numeric/dft/fixed/spectrum.hpp deleted file mode 100644 index aa296a4..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/dft/fixed/spectrum.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_DFT_FIXED_SPECTRUM_HPP -#define SPROUT_RANGE_NUMERIC_DFT_FIXED_SPECTRUM_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fixed { - // - // spectrum - // - template< - typename InputRange, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - spectrum(InputRange const& rng, Result const& result) { - return sprout::fixed::spectrum(sprout::begin(rng), sprout::end(rng), result); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - spectrum(InputRange const& rng) { - return sprout::fixed::spectrum(sprout::begin(rng), sprout::end(rng)); - } - } // namespace fixed - - using sprout::range::fixed::spectrum; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_FIXED_SPECTRUM_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/dft/idft.hpp b/dsp/lib/sprout/sprout/range/numeric/dft/idft.hpp deleted file mode 100644 index 51a67cd..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/dft/idft.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_DFT_IDFT_HPP -#define SPROUT_RANGE_NUMERIC_DFT_IDFT_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_IDFT_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/dft/idft_element.hpp b/dsp/lib/sprout/sprout/range/numeric/dft/idft_element.hpp deleted file mode 100644 index 6c80f4b..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/dft/idft_element.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_DFT_IDFT_ELEMENT_HPP -#define SPROUT_RANGE_NUMERIC_DFT_IDFT_ELEMENT_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // idft_element - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits::value_type - idft_element(InputRange const& input, typename sprout::container_traits::difference_type i) { - return sprout::idft_element(sprout::begin(input), sprout::end(input), i); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_IDFT_ELEMENT_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/dft/modifying.hpp b/dsp/lib/sprout/sprout/range/numeric/dft/modifying.hpp deleted file mode 100644 index af20c22..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/dft/modifying.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_DFT_MODIFYIING_HPP -#define SPROUT_RANGE_NUMERIC_DFT_MODIFYIING_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_MODIFYIING_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/dft/non_modifying.hpp b/dsp/lib/sprout/sprout/range/numeric/dft/non_modifying.hpp deleted file mode 100644 index 337f661..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/dft/non_modifying.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_DFT_NON_MODIFYIING_HPP -#define SPROUT_RANGE_NUMERIC_DFT_NON_MODIFYIING_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_NON_MODIFYIING_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/dft/phase_spectrum.hpp b/dsp/lib/sprout/sprout/range/numeric/dft/phase_spectrum.hpp deleted file mode 100644 index 68ed482..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/dft/phase_spectrum.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_DFT_PHASE_SPECTRUM_HPP -#define SPROUT_RANGE_NUMERIC_DFT_PHASE_SPECTRUM_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_PHASE_SPECTRUM_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/dft/spectrum.hpp b/dsp/lib/sprout/sprout/range/numeric/dft/spectrum.hpp deleted file mode 100644 index 5f70037..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/dft/spectrum.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_DFT_SPECTRUM_HPP -#define SPROUT_RANGE_NUMERIC_DFT_SPECTRUM_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_SPECTRUM_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/exclusive_scan.hpp b/dsp/lib/sprout/sprout/range/numeric/exclusive_scan.hpp deleted file mode 100644 index f5f3713..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/exclusive_scan.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_EXCLUSIVE_SCAN_HPP -#define SPROUT_RANGE_NUMERIC_EXCLUSIVE_SCAN_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_NUMERIC_EXCLUSIVE_SCAN_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/fft.hpp b/dsp/lib/sprout/sprout/range/numeric/fft.hpp deleted file mode 100644 index fcff5a1..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/fft.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_FFT_HPP -#define SPROUT_RANGE_NUMERIC_FFT_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_NUMERIC_FFT_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/fft/fft.hpp b/dsp/lib/sprout/sprout/range/numeric/fft/fft.hpp deleted file mode 100644 index 5557151..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/fft/fft.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_FFT_FFT_HPP -#define SPROUT_RANGE_NUMERIC_FFT_FFT_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // fft - // - template - inline SPROUT_CXX14_CONSTEXPR void - fft(RandomAccessRange&& rng) { - sprout::fft(sprout::begin(SPROUT_FORWARD(RandomAccessRange, rng)), sprout::end(SPROUT_FORWARD(RandomAccessRange, rng))); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_FFT_FFT_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/fft/ifft.hpp b/dsp/lib/sprout/sprout/range/numeric/fft/ifft.hpp deleted file mode 100644 index 05d14f8..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/fft/ifft.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_FFT_IFFT_HPP -#define SPROUT_RANGE_NUMERIC_FFT_IFFT_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // ifft - // - template - inline SPROUT_CXX14_CONSTEXPR void - ifft(RandomAccessRange&& rng) { - sprout::ifft(sprout::begin(SPROUT_FORWARD(RandomAccessRange, rng)), sprout::end(SPROUT_FORWARD(RandomAccessRange, rng))); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_FFT_IFFT_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/fit.hpp b/dsp/lib/sprout/sprout/range/numeric/fit.hpp deleted file mode 100644 index fcd5e9c..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/fit.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_FIT_HPP -#define SPROUT_RANGE_NUMERIC_FIT_HPP - -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_NUMERIC_FIT_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/fit/adjacent_difference.hpp b/dsp/lib/sprout/sprout/range/numeric/fit/adjacent_difference.hpp deleted file mode 100644 index da7727c..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/fit/adjacent_difference.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_FIT_ADJACENT_DIFFERENCE_HPP -#define SPROUT_RANGE_NUMERIC_FIT_ADJACENT_DIFFERENCE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fit { - // - // adjacent_difference - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - adjacent_difference(InputRange const& rng, Result const& result) { - return sprout::fit::adjacent_difference(sprout::begin(rng), sprout::end(rng), result); - } - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - adjacent_difference(InputRange const& rng, Result const& result, BinaryOperation binary_op) { - return sprout::fit::adjacent_difference(sprout::begin(rng), sprout::end(rng), result, binary_op); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - adjacent_difference(InputRange const& rng) { - return sprout::fit::adjacent_difference(sprout::begin(rng), sprout::end(rng)); - } - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - adjacent_difference(InputRange const& rng, BinaryOperation binary_op) { - return sprout::fit::adjacent_difference(sprout::begin(rng), sprout::end(rng), binary_op); - } - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_FIT_ADJACENT_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/fit/exclusive_scan.hpp b/dsp/lib/sprout/sprout/range/numeric/fit/exclusive_scan.hpp deleted file mode 100644 index a94a791..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/fit/exclusive_scan.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_FIT_EXCLUSIVE_SCAN_HPP -#define SPROUT_RANGE_NUMERIC_FIT_EXCLUSIVE_SCAN_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fit { - // - // exclusive_scan - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - exclusive_scan(InputRange const& rng, Result const& result, T init) { - return sprout::fit::exclusive_scan(sprout::begin(rng), sprout::end(rng), result, init); - } - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - exclusive_scan(InputRange const& rng, Result const& result, T init, BinaryOperation binary_op) { - return sprout::fit::exclusive_scan(sprout::begin(rng), sprout::end(rng), result, init, binary_op); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - exclusive_scan(InputRange const& rng, T init) { - return sprout::fit::exclusive_scan(sprout::begin(rng), sprout::end(rng), init); - } - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - exclusive_scan(InputRange const& rng, T init, BinaryOperation binary_op) { - return sprout::fit::exclusive_scan(sprout::begin(rng), sprout::end(rng), init, binary_op); - } - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_FIT_EXCLUSIVE_SCAN_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/fit/inclusive_scan.hpp b/dsp/lib/sprout/sprout/range/numeric/fit/inclusive_scan.hpp deleted file mode 100644 index 62f4657..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/fit/inclusive_scan.hpp +++ /dev/null @@ -1,58 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_FIT_INCLUSIVE_SCAN_HPP -#define SPROUT_RANGE_NUMERIC_FIT_INCLUSIVE_SCAN_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fit { - // - // inclusive_scan - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - inclusive_scan(InputRange const& rng, Result const& result) { - return sprout::fit::inclusive_scan(sprout::begin(rng), sprout::end(rng), result); - } - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - inclusive_scan(InputRange const& rng, Result const& result, BinaryOperation binary_op) { - return sprout::fit::inclusive_scan(sprout::begin(rng), sprout::end(rng), result, binary_op); - } - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - inclusive_scan(InputRange const& rng, Result const& result, BinaryOperation binary_op, T init) { - return sprout::fit::inclusive_scan(sprout::begin(rng), sprout::end(rng), result, binary_op, init); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - inclusive_scan(InputRange const& rng) { - return sprout::fit::inclusive_scan(sprout::begin(rng), sprout::end(rng)); - } - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - inclusive_scan(InputRange const& rng, BinaryOperation binary_op) { - return sprout::fit::inclusive_scan(sprout::begin(rng), sprout::end(rng), binary_op); - } - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - inclusive_scan(InputRange const& rng, BinaryOperation binary_op, T init) { - return sprout::fit::inclusive_scan(sprout::begin(rng), sprout::end(rng), binary_op, init); - } - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_FIT_INCLUSIVE_SCAN_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/fit/partial_sum.hpp b/dsp/lib/sprout/sprout/range/numeric/fit/partial_sum.hpp deleted file mode 100644 index 622db47..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/fit/partial_sum.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_FIT_PARTIAL_SUM_HPP -#define SPROUT_RANGE_NUMERIC_FIT_PARTIAL_SUM_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fit { - // - // partial_sum - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - partial_sum(InputRange const& rng, Result const& result) { - return sprout::fit::partial_sum(sprout::begin(rng), sprout::end(rng), result); - } - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - partial_sum(InputRange const& rng, Result const& result, BinaryOperation binary_op) { - return sprout::fit::partial_sum(sprout::begin(rng), sprout::end(rng), result, binary_op); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - partial_sum(InputRange const& rng) { - return sprout::fit::partial_sum(sprout::begin(rng), sprout::end(rng)); - } - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - partial_sum(InputRange const& rng, BinaryOperation binary_op) { - return sprout::fit::partial_sum(sprout::begin(rng), sprout::end(rng), binary_op); - } - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_FIT_PARTIAL_SUM_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/fit/transform_exclusive_scan.hpp b/dsp/lib/sprout/sprout/range/numeric/fit/transform_exclusive_scan.hpp deleted file mode 100644 index 4ff7738..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/fit/transform_exclusive_scan.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_FIT_TRANSFORM_EXCLUSIVE_SCAN_HPP -#define SPROUT_RANGE_NUMERIC_FIT_TRANSFORM_EXCLUSIVE_SCAN_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fit { - // - // transform_exclusive_scan - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - transform_exclusive_scan(InputRange const& rng, Result const& result, T init, BinaryOperation binary_op, UnaryOperation unary_op) { - return sprout::fit::transform_exclusive_scan(sprout::begin(rng), sprout::end(rng), result, init, binary_op, unary_op); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - transform_exclusive_scan(InputRange const& rng, T init, BinaryOperation binary_op, UnaryOperation unary_op) { - return sprout::fit::transform_exclusive_scan(sprout::begin(rng), sprout::end(rng), init, binary_op, unary_op); - } - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_FIT_TRANSFORM_EXCLUSIVE_SCAN_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/fit/transform_inclusive_scan.hpp b/dsp/lib/sprout/sprout/range/numeric/fit/transform_inclusive_scan.hpp deleted file mode 100644 index 77109bd..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/fit/transform_inclusive_scan.hpp +++ /dev/null @@ -1,53 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_FIT_TRANSFORM_INCLUSIVE_SCAN_HPP -#define SPROUT_RANGE_NUMERIC_FIT_TRANSFORM_INCLUSIVE_SCAN_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fit { - // - // transform_inclusive_scan - // - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - transform_inclusive_scan(InputRange const& rng, Result const& result, BinaryOperation binary_op, UnaryOperation unary_op) { - return sprout::fit::transform_inclusive_scan(sprout::begin(rng), sprout::end(rng), result, binary_op, unary_op); - } - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - transform_inclusive_scan(InputRange const& rng, Result const& result, BinaryOperation binary_op, UnaryOperation unary_op, T init) { - return sprout::fit::transform_inclusive_scan(sprout::begin(rng), sprout::end(rng), result, binary_op, unary_op, init); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - transform_inclusive_scan(InputRange const& rng) { - return sprout::fit::transform_inclusive_scan(sprout::begin(rng), sprout::end(rng)); - } - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - transform_inclusive_scan(InputRange const& rng, BinaryOperation binary_op, UnaryOperation unary_op) { - return sprout::fit::transform_inclusive_scan(sprout::begin(rng), sprout::end(rng), binary_op, unary_op); - } - template - inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type - transform_inclusive_scan(InputRange const& rng, BinaryOperation binary_op, UnaryOperation unary_op, T init) { - return sprout::fit::transform_inclusive_scan(sprout::begin(rng), sprout::end(rng), binary_op, unary_op, init); - } - } // namespace fit - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_FIT_TRANSFORM_INCLUSIVE_SCAN_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/fixed.hpp b/dsp/lib/sprout/sprout/range/numeric/fixed.hpp deleted file mode 100644 index 7583f7d..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/fixed.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_FIXED_HPP -#define SPROUT_RANGE_NUMERIC_FIXED_HPP - -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_NUMERIC_FIXED_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/fixed/adjacent_difference.hpp b/dsp/lib/sprout/sprout/range/numeric/fixed/adjacent_difference.hpp deleted file mode 100644 index ebafe43..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/fixed/adjacent_difference.hpp +++ /dev/null @@ -1,58 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_FIXED_ADJACENT_DIFFERENCE_HPP -#define SPROUT_RANGE_NUMERIC_FIXED_ADJACENT_DIFFERENCE_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fixed { - // - // adjacent_difference - // - template< - typename InputRange, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - adjacent_difference(InputRange const& rng, Result const& result) { - return sprout::fixed::adjacent_difference(sprout::begin(rng), sprout::end(rng), result); - } - template< - typename InputRange, typename Result, typename BinaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - adjacent_difference(InputRange const& rng, Result const& result, BinaryOperation binary_op) { - return sprout::fixed::adjacent_difference(sprout::begin(rng), sprout::end(rng), result, binary_op); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - adjacent_difference(InputRange const& rng) { - return sprout::fixed::adjacent_difference(sprout::begin(rng), sprout::end(rng)); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - adjacent_difference(InputRange const& rng, BinaryOperation binary_op) { - return sprout::fixed::adjacent_difference(sprout::begin(rng), sprout::end(rng), binary_op); - } - } // namespace fixed - - using sprout::range::fixed::adjacent_difference; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_FIXED_ADJACENT_DIFFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/fixed/exclusive_scan.hpp b/dsp/lib/sprout/sprout/range/numeric/fixed/exclusive_scan.hpp deleted file mode 100644 index 13c40ac..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/fixed/exclusive_scan.hpp +++ /dev/null @@ -1,58 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_FIXED_EXCLUSIVE_SCAN_HPP -#define SPROUT_RANGE_NUMERIC_FIXED_EXCLUSIVE_SCAN_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fixed { - // - // exclusive_scan - // - template< - typename InputRange, typename Result, typename T, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - exclusive_scan(InputRange const& rng, Result const& result, T init) { - return sprout::fixed::exclusive_scan(sprout::begin(rng), sprout::end(rng), result, init); - } - template< - typename InputRange, typename Result, typename T, typename BinaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - exclusive_scan(InputRange const& rng, Result const& result, T init, BinaryOperation binary_op) { - return sprout::fixed::exclusive_scan(sprout::begin(rng), sprout::end(rng), result, init, binary_op); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - exclusive_scan(InputRange const& rng, T init) { - return sprout::fixed::exclusive_scan(sprout::begin(rng), sprout::end(rng), init); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - exclusive_scan(InputRange const& rng, T init, BinaryOperation binary_op) { - return sprout::fixed::exclusive_scan(sprout::begin(rng), sprout::end(rng), init, binary_op); - } - } // namespace fixed - - using sprout::range::fixed::exclusive_scan; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_FIXED_EXCLUSIVE_SCAN_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/fixed/inclusive_scan.hpp b/dsp/lib/sprout/sprout/range/numeric/fixed/inclusive_scan.hpp deleted file mode 100644 index aa721d3..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/fixed/inclusive_scan.hpp +++ /dev/null @@ -1,71 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_FIXED_INCLUSIVE_SCAN_HPP -#define SPROUT_RANGE_NUMERIC_FIXED_INCLUSIVE_SCAN_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fixed { - // - // inclusive_scan - // - template< - typename InputRange, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - inclusive_scan(InputRange const& rng, Result const& result) { - return sprout::fixed::inclusive_scan(sprout::begin(rng), sprout::end(rng), result); - } - template< - typename InputRange, typename Result, typename BinaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - inclusive_scan(InputRange const& rng, Result const& result, BinaryOperation binary_op) { - return sprout::fixed::inclusive_scan(sprout::begin(rng), sprout::end(rng), result, binary_op); - } - template< - typename InputRange, typename Result, typename BinaryOperation, typename T, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - inclusive_scan(InputRange const& rng, Result const& result, BinaryOperation binary_op, T init) { - return sprout::fixed::inclusive_scan(sprout::begin(rng), sprout::end(rng), result, binary_op, init); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - inclusive_scan(InputRange const& rng) { - return sprout::fixed::inclusive_scan(sprout::begin(rng), sprout::end(rng)); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - inclusive_scan(InputRange const& rng, BinaryOperation binary_op) { - return sprout::fixed::inclusive_scan(sprout::begin(rng), sprout::end(rng), binary_op); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - inclusive_scan(InputRange const& rng, BinaryOperation binary_op, T init) { - return sprout::fixed::inclusive_scan(sprout::begin(rng), sprout::end(rng), binary_op, init); - } - } // namespace fixed - - using sprout::range::fixed::inclusive_scan; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_FIXED_INCLUSIVE_SCAN_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/fixed/partial_sum.hpp b/dsp/lib/sprout/sprout/range/numeric/fixed/partial_sum.hpp deleted file mode 100644 index b3369d8..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/fixed/partial_sum.hpp +++ /dev/null @@ -1,58 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_FIXED_PARTIAL_SUM_HPP -#define SPROUT_RANGE_NUMERIC_FIXED_PARTIAL_SUM_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fixed { - // - // partial_sum - // - template< - typename InputRange, typename Result, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - partial_sum(InputRange const& rng, Result const& result) { - return sprout::fixed::partial_sum(sprout::begin(rng), sprout::end(rng), result); - } - template< - typename InputRange, typename Result, typename BinaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - partial_sum(InputRange const& rng, Result const& result, BinaryOperation binary_op) { - return sprout::fixed::partial_sum(sprout::begin(rng), sprout::end(rng), result, binary_op); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - partial_sum(InputRange const& rng) { - return sprout::fixed::partial_sum(sprout::begin(rng), sprout::end(rng)); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - partial_sum(InputRange const& rng, BinaryOperation binary_op) { - return sprout::fixed::partial_sum(sprout::begin(rng), sprout::end(rng), binary_op); - } - } // namespace fixed - - using sprout::range::fixed::partial_sum; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_FIXED_PARTIAL_SUM_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/fixed/transform_exclusive_scan.hpp b/dsp/lib/sprout/sprout/range/numeric/fixed/transform_exclusive_scan.hpp deleted file mode 100644 index 6bd5f01..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/fixed/transform_exclusive_scan.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_FIXED_TRANSFORM_EXCLUSIVE_SCAN_HPP -#define SPROUT_RANGE_NUMERIC_FIXED_TRANSFORM_EXCLUSIVE_SCAN_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fixed { - // - // transform_exclusive_scan - // - template< - typename InputRange, typename Result, typename T, typename BinaryOperation, typename UnaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform_exclusive_scan(InputRange const& rng, Result const& result, T init, BinaryOperation binary_op, UnaryOperation unary_op) { - return sprout::fixed::transform_exclusive_scan(sprout::begin(rng), sprout::end(rng), result, init, binary_op, unary_op); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform_exclusive_scan(InputRange const& rng, T init, BinaryOperation binary_op, UnaryOperation unary_op) { - return sprout::fixed::transform_exclusive_scan(sprout::begin(rng), sprout::end(rng), init, binary_op, unary_op); - } - } // namespace fixed - - using sprout::range::fixed::transform_exclusive_scan; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_FIXED_TRANSFORM_EXCLUSIVE_SCAN_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/fixed/transform_inclusive_scan.hpp b/dsp/lib/sprout/sprout/range/numeric/fixed/transform_inclusive_scan.hpp deleted file mode 100644 index 192a89a..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/fixed/transform_inclusive_scan.hpp +++ /dev/null @@ -1,63 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_FIXED_TRANSFORM_INCLUSIVE_SCAN_HPP -#define SPROUT_RANGE_NUMERIC_FIXED_TRANSFORM_INCLUSIVE_SCAN_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - namespace fixed { - // - // transform_inclusive_scan - // - template< - typename InputRange, typename Result, typename BinaryOperation, typename UnaryOperation, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform_inclusive_scan(InputRange const& rng, Result const& result, BinaryOperation binary_op, UnaryOperation unary_op) { - return sprout::fixed::transform_inclusive_scan(sprout::begin(rng), sprout::end(rng), result, binary_op, unary_op); - } - template< - typename InputRange, typename Result, typename BinaryOperation, typename UnaryOperation, typename T, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform_inclusive_scan(InputRange const& rng, Result const& result, BinaryOperation binary_op, UnaryOperation unary_op, T init) { - return sprout::fixed::transform_inclusive_scan(sprout::begin(rng), sprout::end(rng), result, binary_op, unary_op, init); - } - - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform_inclusive_scan(InputRange const& rng) { - return sprout::fixed::transform_inclusive_scan(sprout::begin(rng), sprout::end(rng)); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform_inclusive_scan(InputRange const& rng, BinaryOperation binary_op, UnaryOperation unary_op) { - return sprout::fixed::transform_inclusive_scan(sprout::begin(rng), sprout::end(rng), binary_op, unary_op); - } - template - inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type - transform_inclusive_scan(InputRange const& rng, BinaryOperation binary_op, UnaryOperation unary_op, T init) { - return sprout::fixed::transform_inclusive_scan(sprout::begin(rng), sprout::end(rng), binary_op, unary_op, init); - } - } // namespace fixed - - using sprout::range::fixed::transform_inclusive_scan; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_FIXED_TRANSFORM_INCLUSIVE_SCAN_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/inclusive_scan.hpp b/dsp/lib/sprout/sprout/range/numeric/inclusive_scan.hpp deleted file mode 100644 index 59a5b01..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/inclusive_scan.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_INCLUSIVE_SCAN_HPP -#define SPROUT_RANGE_NUMERIC_INCLUSIVE_SCAN_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_NUMERIC_INCLUSIVE_SCAN_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/inner_product.hpp b/dsp/lib/sprout/sprout/range/numeric/inner_product.hpp deleted file mode 100644 index 0492a72..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/inner_product.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_INNER_PRODUCT_HPP -#define SPROUT_RANGE_NUMERIC_INNER_PRODUCT_HPP - -#include -#include -#include - -namespace sprout { - namespace range { - - // 26.7.3 Inner product - template - inline SPROUT_CONSTEXPR T - inner_product( - InputRange1 const& range1, InputRange2 const& range2, T init, - BinaryOperation1 binary_op1, BinaryOperation2 binary_op2 - ) - { - return sprout::inner_product(sprout::begin(range1), sprout::end(range1), sprout::begin(range2), init, binary_op1, binary_op2); - } - - template - inline SPROUT_CONSTEXPR T - inner_product(InputRange1 const& range1, InputRange2 const& range2, T init) { - return sprout::inner_product(sprout::begin(range1), sprout::end(range1), sprout::begin(range2), init); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_INNER_PRODUCT_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/modifying.hpp b/dsp/lib/sprout/sprout/range/numeric/modifying.hpp deleted file mode 100644 index c9035af..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/modifying.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_MODIFYIING_HPP -#define SPROUT_RANGE_NUMERIC_MODIFYIING_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_NUMERIC_MODIFYIING_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/non_modifying.hpp b/dsp/lib/sprout/sprout/range/numeric/non_modifying.hpp deleted file mode 100644 index f5afd03..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/non_modifying.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_NON_MODIFYIING_HPP -#define SPROUT_RANGE_NUMERIC_NON_MODIFYIING_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_NUMERIC_NON_MODIFYIING_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/partial_sum.hpp b/dsp/lib/sprout/sprout/range/numeric/partial_sum.hpp deleted file mode 100644 index 3dcc4aa..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/partial_sum.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_PARTIAL_SUM_HPP -#define SPROUT_RANGE_NUMERIC_PARTIAL_SUM_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_NUMERIC_PARTIAL_SUM_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/reduce.hpp b/dsp/lib/sprout/sprout/range/numeric/reduce.hpp deleted file mode 100644 index 083bb51..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/reduce.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_REDUCE_HPP -#define SPROUT_RANGE_NUMERIC_REDUCE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - - // 29.8.3 Reduce - template - inline SPROUT_CONSTEXPR T - reduce(InputRange const& range, T init, BinaryOperation binary_op) { - return sprout::reduce(sprout::begin(range), sprout::end(range), init, binary_op); - } - - template - inline SPROUT_CONSTEXPR T - reduce(InputRange const& range, T init) { - return sprout::reduce(sprout::begin(range), sprout::end(range), init); - } - - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::iterator>::value_type - reduce(InputRange const& range) { - return sprout::reduce(sprout::begin(range), sprout::end(range)); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_REDUCE_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/transform_exclusive_scan.hpp b/dsp/lib/sprout/sprout/range/numeric/transform_exclusive_scan.hpp deleted file mode 100644 index 328120b..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/transform_exclusive_scan.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_TRANSFORM_EXCLUSIVE_SCAN_HPP -#define SPROUT_RANGE_NUMERIC_TRANSFORM_EXCLUSIVE_SCAN_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_NUMERIC_TRANSFORM_EXCLUSIVE_SCAN_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/transform_inclusive_scan.hpp b/dsp/lib/sprout/sprout/range/numeric/transform_inclusive_scan.hpp deleted file mode 100644 index 3279afd..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/transform_inclusive_scan.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_TRANSFORM_INCLUSIVE_SCAN_HPP -#define SPROUT_RANGE_NUMERIC_TRANSFORM_INCLUSIVE_SCAN_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_NUMERIC_TRANSFORM_INCLUSIVE_SCAN_HPP diff --git a/dsp/lib/sprout/sprout/range/numeric/transform_reduce.hpp b/dsp/lib/sprout/sprout/range/numeric/transform_reduce.hpp deleted file mode 100644 index df78f14..0000000 --- a/dsp/lib/sprout/sprout/range/numeric/transform_reduce.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_NUMERIC_TRANSFORM_REDUCE_HPP -#define SPROUT_RANGE_NUMERIC_TRANSFORM_REDUCE_HPP - -#include -#include -#include - -namespace sprout { - namespace range { - - // 29.8.5 Transform reduce - template - inline SPROUT_CONSTEXPR T - transform_reduce( - InputRange1 const& range1, InputRange2 const& range2, - T init, BinaryOperation1 binary_op1, BinaryOperation2 binary_op2 - ) - { - return sprout::transform_reduce(sprout::begin(range1), sprout::end(range1), sprout::begin(range2), init, binary_op1, binary_op2); - } - - template - inline SPROUT_CONSTEXPR T - transform_reduce(InputRange1 const& range1, InputRange2 const& range2, T init) { - return sprout::transform_reduce(sprout::begin(range1), sprout::end(range1), sprout::begin(range2), init); - } - - template - inline SPROUT_CONSTEXPR T - transform_reduce(InputRange const& range, T init, BinaryOperation binary_op, UnaryOperation unary_op) { - return sprout::transform_reduce(sprout::begin(range), sprout::end(range), init, binary_op, unary_op); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_NUMERIC_TRANSFORM_REDUCE_HPP diff --git a/dsp/lib/sprout/sprout/range/ptr_range.hpp b/dsp/lib/sprout/sprout/range/ptr_range.hpp deleted file mode 100644 index 7905b29..0000000 --- a/dsp/lib/sprout/sprout/range/ptr_range.hpp +++ /dev/null @@ -1,52 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_PTR_RANGE_HPP -#define SPROUT_RANGE_PTR_RANGE_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // make_ptr_range - // - template - inline SPROUT_CONSTEXPR sprout::range::range_container > - make_ptr_range(T* p, typename std::iterator_traits::difference_type n) { - return sprout::range::range_container >( - sprout::ptr_index_iterator(p), - sprout::ptr_index_iterator(p, n) - ); - } - - template - inline SPROUT_CONSTEXPR sprout::range::range_container > - make_ptr_range(T* first, T* last) { - return sprout::range::range_container >( - sprout::ptr_index_iterator(first), - sprout::ptr_index_iterator(first, sprout::distance(first, last)) - ); - } - - template - inline SPROUT_CONSTEXPR sprout::range::range_container > - make_ptr_range(T (& arr)[N]) { - return sprout::range::range_container >( - sprout::ptr_index_iterator(arr), - sprout::ptr_index_iterator(arr, N) - ); - } - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_PTR_RANGE_HPP diff --git a/dsp/lib/sprout/sprout/range/range.hpp b/dsp/lib/sprout/sprout/range/range.hpp deleted file mode 100644 index bd15d61..0000000 --- a/dsp/lib/sprout/sprout/range/range.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_RANGE_HPP -#define SPROUT_RANGE_RANGE_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_RANGE_HPP diff --git a/dsp/lib/sprout/sprout/range/range_container.hpp b/dsp/lib/sprout/sprout/range/range_container.hpp deleted file mode 100644 index a5ae503..0000000 --- a/dsp/lib/sprout/sprout/range/range_container.hpp +++ /dev/null @@ -1,170 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_RANGE_CONTAINER_HPP -#define SPROUT_RANGE_RANGE_CONTAINER_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // range_container - // - template - struct range_container - : public sprout::container_traits_facade - { - public: - typedef Iterator iterator; - typedef iterator const_iterator; - typedef typename std::iterator_traits::value_type value_type; - typedef typename std::iterator_traits::reference reference; - typedef typename std::conditional< - std::is_reference::value, - typename std::remove_reference::type const&, - reference - >::type const_reference; - typedef typename std::iterator_traits::difference_type difference_type; - typedef typename std::make_unsigned::type size_type; - typedef typename std::iterator_traits::pointer pointer; - typedef typename std::conditional< - std::is_pointer::value, - typename std::remove_pointer::type const*, - pointer - >::type const_pointer; - private: - iterator first_; - iterator last_; - public: - // construct/copy/destroy: - SPROUT_CONSTEXPR range_container() - : first_(), last_() - {} - SPROUT_CONSTEXPR range_container(iterator const& first, iterator const& last) - : first_(first), last_(last) - {} - - template - SPROUT_CXX14_CONSTEXPR void swap(range_container& other) - SPROUT_NOEXCEPT_IF( - SPROUT_NOEXCEPT_EXPR(sprout::swap(other.first_, first_)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(other.last_, last_)) - ) - { - sprout::swap(other.first_, first_); - sprout::swap(other.last_, last_); - } - // iterators: - SPROUT_CONSTEXPR iterator begin() const { - return first_; - } - SPROUT_CONSTEXPR iterator end() const { - return last_; - } - // capacity: - SPROUT_CONSTEXPR size_type size() const { - return sprout::distance(first_, last_); - } - SPROUT_CONSTEXPR bool empty() const { - return first_ == last_; - } - // element access: - SPROUT_CONSTEXPR reference operator[](size_type i) const { - return *sprout::next(first_, i); - } - SPROUT_CONSTEXPR reference at(size_type i) const { - return i < size() ? *sprout::next(first_, i) - : (throw std::out_of_range("sprout::range::range_container<>: index out of range"), *sprout::next(first_, i)) - ; - } - SPROUT_CONSTEXPR reference front() const { - return *first_; - } - SPROUT_CONSTEXPR reference back() const { - return *sprout::next(first_, size() - 1); - } - // others: - template - SPROUT_CXX14_CONSTEXPR range_container& operator=(range_container const& rhs) { - first_ = rhs.first_; - last_ = rhs.last_; - return *this; - } - template - SPROUT_CXX14_CONSTEXPR range_container& operator=(range_container&& rhs) { - first_ = sprout::move(rhs.first_); - last_ = sprout::move(rhs.last_); - return *this; - } - }; - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::range::range_container& lhs, sprout::range::range_container& rhs) { - lhs.swap(rhs); - } - - // - // is_range_container - // - template - struct is_range_container - : public sprout::false_type - {}; - template - struct is_range_container - : public sprout::range::is_range_container - {}; - template - struct is_range_container - : public sprout::range::is_range_container - {}; - template - struct is_range_container - : public sprout::range::is_range_container - {}; - template - struct is_range_container > - : public sprout::true_type - {}; - - // - // make_range_container - // - template - inline SPROUT_CONSTEXPR sprout::range::range_container::type> - make_range_container(Range&& range) { - return sprout::range::range_container::type>( - sprout::begin(SPROUT_FORWARD(Range, range)), - sprout::end(SPROUT_FORWARD(Range, range)) - ); - } - } // namespace range - - // - // container_traits - // - template - struct container_traits > - : public sprout::container_traits_default > - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_RANGE_CONTAINER_HPP diff --git a/dsp/lib/sprout/sprout/range/range_return.hpp b/dsp/lib/sprout/sprout/range/range_return.hpp deleted file mode 100644 index 6cc3c1f..0000000 --- a/dsp/lib/sprout/sprout/range/range_return.hpp +++ /dev/null @@ -1,77 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_RANGE_RETURN_HPP -#define SPROUT_RANGE_RANGE_RETURN_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // range_return_value - // - enum range_return_value { - return_found, - return_found_end, - return_begin_found - }; - - // - // range_return - // - template - struct range_return; - - template - struct range_return { - public: - typedef typename sprout::range::lvalue_iterator::type type; - public: - static SPROUT_CONSTEXPR type pack( - typename sprout::range::lvalue_iterator::type found, - Range&& - ) - { - return found; - } - }; - template - struct range_return { - public: - typedef typename sprout::range::lvalue_range::type type; - public: - static SPROUT_CONSTEXPR type pack( - typename sprout::range::lvalue_iterator::type found, - Range&& range - ) - { - return type(found, sprout::end(SPROUT_FORWARD(Range, range))); - } - }; - template - struct range_return { - public: - typedef typename sprout::range::lvalue_range::type type; - public: - static SPROUT_CONSTEXPR type pack( - typename sprout::range::lvalue_iterator::type found, - Range&& range - ) - { - return type(sprout::begin(SPROUT_FORWARD(Range, range)), found); - } - }; - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_RANGE_RETURN_HPP diff --git a/dsp/lib/sprout/sprout/range/type_traits.hpp b/dsp/lib/sprout/sprout/range/type_traits.hpp deleted file mode 100644 index fd44321..0000000 --- a/dsp/lib/sprout/sprout/range/type_traits.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_TYPE_TRAITS_HPP -#define SPROUT_RANGE_TYPE_TRAITS_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_RANGE_TYPE_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/range/type_traits/lvalue_iterator.hpp b/dsp/lib/sprout/sprout/range/type_traits/lvalue_iterator.hpp deleted file mode 100644 index ce8bf3e..0000000 --- a/dsp/lib/sprout/sprout/range/type_traits/lvalue_iterator.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_TYPE_TRAITS_LVALUE_ITERATOR_HPP -#define SPROUT_RANGE_TYPE_TRAITS_LVALUE_ITERATOR_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace range { - // - // lvalue_iterator - // - template - struct lvalue_iterator { - public: - typedef typename sprout::container_traits< - typename std::remove_reference::type>::type - >::iterator type; - }; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using lvalue_iterator_t = typename sprout::range::lvalue_iterator::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_TYPE_TRAITS_LVALUE_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/range/type_traits/lvalue_range.hpp b/dsp/lib/sprout/sprout/range/type_traits/lvalue_range.hpp deleted file mode 100644 index de70098..0000000 --- a/dsp/lib/sprout/sprout/range/type_traits/lvalue_range.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RANGE_TYPE_TRAITS_LVALUE_RANGE_HPP -#define SPROUT_RANGE_TYPE_TRAITS_LVALUE_RANGE_HPP - -#include -#include -#include - -namespace sprout { - namespace range { - // - // lvalue_range - // - template - struct lvalue_range { - public: - typedef sprout::range::range_container::type> type; - }; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using lvalue_range_t = typename sprout::range::lvalue_range::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - } // namespace range -} // namespace sprout - -#endif // #ifndef SPROUT_RANGE_TYPE_TRAITS_LVALUE_RANGE_HPP diff --git a/dsp/lib/sprout/sprout/rational.hpp b/dsp/lib/sprout/sprout/rational.hpp deleted file mode 100644 index 1b53d46..0000000 --- a/dsp/lib/sprout/sprout/rational.hpp +++ /dev/null @@ -1,24 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RATIONAL_HPP -#define SPROUT_RATIONAL_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_RATIONAL_HPP diff --git a/dsp/lib/sprout/sprout/rational/arithmetic.hpp b/dsp/lib/sprout/sprout/rational/arithmetic.hpp deleted file mode 100644 index 270143b..0000000 --- a/dsp/lib/sprout/sprout/rational/arithmetic.hpp +++ /dev/null @@ -1,255 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RATIONAL_ARITHMETIC_HPP -#define SPROUT_RATIONAL_ARITHMETIC_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // operator+ - // operator- - // - template - inline SPROUT_CONSTEXPR sprout::rational - operator+(rational const& r) { - return r; - } - template - inline SPROUT_CONSTEXPR sprout::rational - operator-(rational const& r) { - return sprout::detail::rational_construct_access::raw_construct( - -r.numerator(), r.denominator() - ); - } - - // - // operator+ - // operator- - // operator* - // operator/ - // - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::rational - rational_add_impl_3( - sprout::rational const& rhs, - IntType g, IntType den, IntType num - ) - { - return sprout::detail::rational_construct_access::raw_construct( - num / g, den * (rhs.denominator() / g) - ); - } - template - inline SPROUT_CONSTEXPR sprout::rational - rational_add_impl_2( - sprout::rational const& rhs, - IntType g, IntType den, IntType num - ) - { - return rational_add_impl_3( - rhs, - sprout::gcd(num, g), den, num - ); - } - template - inline SPROUT_CONSTEXPR sprout::rational - rational_add_impl_1( - sprout::rational const& lhs, sprout::rational const& rhs, - IntType g, IntType den - ) - { - return rational_add_impl_2( - rhs, - g, den, lhs.numerator() * (rhs.denominator() / g) + rhs.numerator() * den - ); - } - template - inline SPROUT_CONSTEXPR sprout::rational - rational_add_impl( - sprout::rational const& lhs, sprout::rational const& rhs, - IntType g - ) - { - return rational_add_impl_1( - lhs, rhs, - g, lhs.denominator() / g - ); - } - } // namespace detail - template - inline SPROUT_CONSTEXPR sprout::rational - operator+(sprout::rational const& lhs, sprout::rational const& rhs) { - return sprout::detail::rational_add_impl( - lhs, rhs, - sprout::gcd(lhs.denominator(), rhs.denominator()) - ); - } - template - inline SPROUT_CONSTEXPR sprout::rational - operator+(sprout::rational const& lhs, typename sprout::rational::param_type rhs) { - return lhs + sprout::rational(rhs); - } - template - inline SPROUT_CONSTEXPR sprout::rational - operator+(typename sprout::rational::param_type lhs, sprout::rational const& rhs) { - return sprout::rational(lhs) + rhs; - } - - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::rational - rational_sub_impl_3( - sprout::rational const& rhs, - IntType g, IntType den, IntType num - ) - { - return sprout::detail::rational_construct_access::raw_construct( - num / g, den * (rhs.denominator() / g) - ); - } - template - inline SPROUT_CONSTEXPR sprout::rational - rational_sub_impl_2( - sprout::rational const& rhs, - IntType g, IntType den, IntType num - ) - { - return rational_sub_impl_3( - rhs, - sprout::gcd(num, g), den, num - ); - } - template - inline SPROUT_CONSTEXPR sprout::rational - rational_sub_impl_1( - sprout::rational const& lhs, sprout::rational const& rhs, - IntType g, IntType den - ) - { - return rational_sub_impl_2( - rhs, - g, den, lhs.numerator() * (rhs.denominator() / g) - rhs.numerator() * den - ); - } - template - inline SPROUT_CONSTEXPR sprout::rational - rational_sub_impl( - sprout::rational const& lhs, sprout::rational const& rhs, - IntType g - ) - { - return rational_sub_impl_1( - lhs, rhs, - g, lhs.denominator() / g - ); - } - } // namespace detail - template - inline SPROUT_CONSTEXPR sprout::rational - operator-(sprout::rational const& lhs, sprout::rational const& rhs) { - return sprout::detail::rational_sub_impl( - lhs, rhs, - sprout::gcd(lhs.denominator(), rhs.denominator()) - ); - } - template - inline SPROUT_CONSTEXPR sprout::rational - operator-(sprout::rational const& lhs, typename sprout::rational::param_type rhs) { - return lhs - sprout::rational(rhs); - } - template - inline SPROUT_CONSTEXPR sprout::rational - operator-(typename sprout::rational::param_type lhs, sprout::rational const& rhs) { - return sprout::rational(lhs) - rhs; - } - - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::rational - rational_mul_impl( - sprout::rational const& lhs, sprout::rational const& rhs, - IntType gcd1, IntType gcd2 - ) - { - return sprout::detail::rational_construct_access::raw_construct( - (lhs.numerator() / gcd1) * (rhs.numerator() / gcd2), - (lhs.denominator() / gcd2) * (rhs.denominator() / gcd1) - ); - } - } // namespace detail - template - inline SPROUT_CONSTEXPR sprout::rational - operator*(sprout::rational const& lhs, sprout::rational const& rhs) { - return sprout::detail::rational_mul_impl( - lhs, rhs, - sprout::gcd(lhs.numerator(), rhs.denominator()), - sprout::gcd(rhs.numerator(), lhs.denominator()) - ); - } - template - inline SPROUT_CONSTEXPR sprout::rational - operator*(sprout::rational const& lhs, typename sprout::rational::param_type rhs) { - return lhs * sprout::rational(rhs); - } - template - inline SPROUT_CONSTEXPR sprout::rational - operator*(typename sprout::rational::param_type lhs, sprout::rational const& rhs) { - return sprout::rational(lhs) * rhs; - } - - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::rational - rational_div_impl_1(IntType num, IntType den) { - return den < IntType(0) ? sprout::detail::rational_construct_access::raw_construct(-num, -den) - : sprout::detail::rational_construct_access::raw_construct(num, den) - ; - } - template - inline SPROUT_CONSTEXPR sprout::rational - rational_div_impl( - sprout::rational const& lhs, sprout::rational const& rhs, - IntType gcd1, IntType gcd2 - ) - { - return sprout::detail::rational_div_impl_1( - (lhs.numerator() / gcd1) * (rhs.denominator() / gcd2), - (lhs.denominator() / gcd2) * (rhs.numerator() / gcd1) - ); - } - } // namespace detail - template - inline SPROUT_CONSTEXPR sprout::rational - operator/(sprout::rational const& lhs, sprout::rational const& rhs) { - return rhs.numerator() == IntType(0) ? throw sprout::bad_rational() - : lhs.numerator() == IntType(0) ? lhs - : sprout::detail::rational_div_impl( - lhs, rhs, - sprout::gcd(lhs.numerator(), rhs.numerator()), - sprout::gcd(rhs.denominator(), lhs.denominator()) - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::rational - operator/(sprout::rational const& lhs, typename sprout::rational::param_type rhs) { - return lhs / sprout::rational(rhs); - } - template - inline SPROUT_CONSTEXPR sprout::rational - operator/(typename sprout::rational::param_type lhs, sprout::rational const& rhs) { - return sprout::rational(lhs) / rhs; - } -} // namespace sprout - -#endif // SPROUT_RATIONAL_ARITHMETIC_HPP diff --git a/dsp/lib/sprout/sprout/rational/comparison.hpp b/dsp/lib/sprout/sprout/rational/comparison.hpp deleted file mode 100644 index f9005a9..0000000 --- a/dsp/lib/sprout/sprout/rational/comparison.hpp +++ /dev/null @@ -1,203 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RATIONAL_COMPARISON_HPP -#define SPROUT_RATIONAL_COMPARISON_HPP - -#include -#include - -namespace sprout { - // - // operator== - // operator!= - // - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::rational const& lhs, sprout::rational const& rhs) { - return lhs.numerator() == rhs.numerator() && lhs.denominator() == rhs.denominator(); - } - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::rational const& lhs, typename sprout::rational::param_type rhs) { - return lhs.denominator() == IntType(1) && lhs.numerator() == rhs; - } - template - inline SPROUT_CONSTEXPR bool - operator==(typename sprout::rational::param_type lhs, sprout::rational const& rhs) { - return rhs == lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::rational const& lhs, sprout::rational const& rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::rational const& lhs, typename sprout::rational::param_type rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(typename sprout::rational::param_type lhs, sprout::rational const& rhs) { - return !(lhs == rhs); - } - - // - // operator< - // operator> - // operator<= - // operator>= - // - namespace detail { - template - inline SPROUT_CONSTEXPR bool - rational_less_impl_2( - sprout::rational const& lhs, sprout::rational const& rhs, - IntType d1, IntType q1, IntType r1, - IntType d2, IntType q2, IntType r2, - unsigned reverse = 0 - ) - { - return q1 != q2 ? reverse ? q1 > q2 : q1 < q2 - : r1 == IntType(0) || r2 == IntType(0) - ? r1 == r2 ? false - : (r1 != IntType(0)) != static_cast(reverse ^ 1) - : sprout::detail::rational_less_impl_2( - lhs, rhs, - r1, d1 / r1, d1 % r1, - r2, d2 / r2, d2 % r2, - reverse ^ 1 - ) - ; - } - template - inline SPROUT_CONSTEXPR bool - rational_less_impl_1( - sprout::rational const& lhs, sprout::rational const& rhs, - IntType d1, IntType q1, IntType r1, - IntType d2, IntType q2, IntType r2 - ) - { - return r2 < IntType(0) ? sprout::detail::rational_less_impl_1( - lhs, rhs, - d1, q1, r1, - d2, q2 - 1, r2 + d2 - ) - : sprout::detail::rational_less_impl_2( - lhs, rhs, - d1, q1, r1, - d2, q2, r2 - ) - ; - } - template - inline SPROUT_CONSTEXPR bool - rational_less_impl( - sprout::rational const& lhs, sprout::rational const& rhs, - IntType d1, IntType q1, IntType r1 - ) - { - return r1 < IntType(0) ? sprout::detail::rational_less_impl( - lhs, rhs, - d1, q1 - 1, r1 + d1 - ) - : sprout::detail::rational_less_impl_1( - lhs, rhs, - d1, q1, r1, - rhs.denominator(), rhs.numerator() / rhs.denominator(), rhs.numerator() % rhs.denominator() - ) - ; - } - - template - inline SPROUT_CONSTEXPR bool - rational_less_impl( - sprout::rational const& lhs, typename sprout::rational::param_type rhs, - IntType q, IntType r - ) - { - return r < IntType(0) ? sprout::detail::rational_less_impl( - lhs, rhs, - r + lhs.denominator(), q - 1 - ) - : q < rhs - ; - } - } // namespace detail - template - inline SPROUT_CONSTEXPR bool - operator<(sprout::rational const& lhs, sprout::rational const& rhs) { - return sprout::detail::rational_less_impl( - lhs, rhs, - lhs.denominator(), lhs.numerator() / lhs.denominator(), lhs.numerator() % lhs.denominator() - ); - } - template - inline SPROUT_CONSTEXPR bool - operator<(sprout::rational const& lhs, typename sprout::rational::param_type rhs) { - return sprout::detail::rational_less_impl( - lhs, rhs, - lhs.numerator() / lhs.denominator(), lhs.numerator() % lhs.denominator() - ); - } - template - inline SPROUT_CONSTEXPR bool - operator<(typename sprout::rational::param_type lhs, sprout::rational const& rhs) { - return lhs != rhs && !(rhs < lhs); - } - - template - inline SPROUT_CONSTEXPR bool - operator>(sprout::rational const& lhs, sprout::rational const& rhs) { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator>(sprout::rational const& lhs, typename sprout::rational::param_type rhs) { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator>(typename sprout::rational::param_type lhs, sprout::rational const& rhs) { - return rhs < lhs; - } - - template - inline SPROUT_CONSTEXPR bool - operator<=(sprout::rational const& lhs, sprout::rational const& rhs) { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator<=(sprout::rational const& lhs, typename sprout::rational::param_type rhs) { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator<=(typename sprout::rational::param_type lhs, sprout::rational const& rhs) { - return !(rhs < lhs); - } - - template - inline SPROUT_CONSTEXPR bool - operator>=(sprout::rational const& lhs, sprout::rational const& rhs) { - return !(lhs < rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(sprout::rational const& lhs, typename sprout::rational::param_type rhs) { - return !(lhs < rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(typename sprout::rational::param_type lhs, sprout::rational const& rhs) { - return !(lhs < rhs); - } -} // namespace sprout - -#endif // SPROUT_RATIONAL_COMPARISON_HPP diff --git a/dsp/lib/sprout/sprout/rational/container.hpp b/dsp/lib/sprout/sprout/rational/container.hpp deleted file mode 100644 index 72e7ddf..0000000 --- a/dsp/lib/sprout/sprout/rational/container.hpp +++ /dev/null @@ -1,127 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RATIONAL_CONTAINER_HPP -#define SPROUT_RATIONAL_CONTAINER_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - struct rational_at { - public: - template - SPROUT_CONSTEXPR typename Rational::value_type - operator()(Rational const& c, Index i) const { - return i == 0 ? c.numerator() - : i == 1 ? c.denominator() - : throw std::out_of_range("rational_at: index out of range") - ; - } - }; - } // namespace detail - - // - // container_traits - // - template - struct container_traits > { - public: - typedef T value_type; - typedef sprout::index_iterator&, true, sprout::detail::rational_at> iterator; - typedef sprout::index_iterator const&, true, sprout::detail::rational_at> const_iterator; - typedef T reference; - typedef T const_reference; - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - typedef T* pointer; - typedef T const* const_pointer; - public: - SPROUT_STATIC_CONSTEXPR size_type static_size = 2; - public: - static SPROUT_CONSTEXPR size_type - fixed_size() SPROUT_NOEXCEPT { - return static_size; - } - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::container_traits >::size_type - sprout::container_traits >::static_size; - - // - // container_range_traits - // - template - struct container_range_traits > - : public sprout::container_range_traits_default > - { - public: - static SPROUT_CONSTEXPR typename sprout::container_traits >::iterator - range_begin(sprout::rational& cont) { - return typename sprout::container_traits >::iterator(cont, 0); - } - static SPROUT_CONSTEXPR typename sprout::container_traits const>::iterator - range_begin(sprout::rational const& cont) { - return typename sprout::container_traits const>::iterator(cont, 0); - } - - static SPROUT_CONSTEXPR typename sprout::container_traits >::iterator - range_end(sprout::rational& cont) { - return typename sprout::container_traits >::iterator(cont, 2); - } - static SPROUT_CONSTEXPR typename sprout::container_traits const>::iterator - range_end(sprout::rational const& cont) { - return typename sprout::container_traits const>::iterator(cont, 2); - } - }; - - // - // container_construct_traits - // - template - struct container_construct_traits > { - public: - typedef sprout::rational copied_type; - public: - template - static SPROUT_CONSTEXPR copied_type - deep_copy(Cont&& cont) { - return SPROUT_FORWARD(Cont, cont); - } - template - static SPROUT_CONSTEXPR copied_type - make(Args&&... args) { - return copied_type(SPROUT_FORWARD(Args, args)...); - } - template - static SPROUT_CONSTEXPR copied_type - remake(Cont&&, typename sprout::container_traits >::difference_type, Args&&... args) { - return copied_type(SPROUT_FORWARD(Args, args)...); - } - }; - - // - // container_transform_traits - // - template - struct container_transform_traits > { - public: - template - struct rebind_type { - public: - typedef sprout::rational type; - }; - }; -} // namespace sprout - -#endif // #ifndef SPROUT_RATIONAL_CONTAINER_HPP diff --git a/dsp/lib/sprout/sprout/rational/conversion.hpp b/dsp/lib/sprout/sprout/rational/conversion.hpp deleted file mode 100644 index 366697c..0000000 --- a/dsp/lib/sprout/sprout/rational/conversion.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RATIONAL_CONVERSION_HPP -#define SPROUT_RATIONAL_CONVERSION_HPP - -#include -#include - -namespace sprout { - // - // rational_cast - // - template - inline SPROUT_CONSTEXPR T - rational_cast(sprout::rational const& src) { - return static_cast(src.numerator()) / static_cast(src.denominator()); - } -} // namespace sprout - -#endif // SPROUT_RATIONAL_CONVERSION_HPP diff --git a/dsp/lib/sprout/sprout/rational/exceptions.hpp b/dsp/lib/sprout/sprout/rational/exceptions.hpp deleted file mode 100644 index 5bc8ee4..0000000 --- a/dsp/lib/sprout/sprout/rational/exceptions.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RATIONAL_EXCEPTIONS_HPP -#define SPROUT_RATIONAL_EXCEPTIONS_HPP - -#include -#include - -namespace sprout { - // - // bad_rational - // - class bad_rational - : public std::domain_error - { - public: - explicit bad_rational() - : std::domain_error("bad rational: zero denominator") - {} - }; -} // namespace sprout - -#endif // SPROUT_RATIONAL_EXCEPTIONS_HPP diff --git a/dsp/lib/sprout/sprout/rational/hash.hpp b/dsp/lib/sprout/sprout/rational/hash.hpp deleted file mode 100644 index e246ac9..0000000 --- a/dsp/lib/sprout/sprout/rational/hash.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RATIONAL_HASH_HPP -#define SPROUT_RATIONAL_HASH_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // hash_value - // - template - inline SPROUT_CONSTEXPR std::size_t - hash_value(sprout::rational const& v) { - return sprout::hash_values(v.numerator(), v.denominator()); - } -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // hash - // - template - struct hash > - : public sprout::hash > - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -#endif // SPROUT_RATIONAL_HASH_HPP diff --git a/dsp/lib/sprout/sprout/rational/io.hpp b/dsp/lib/sprout/sprout/rational/io.hpp deleted file mode 100644 index 72e4c4d..0000000 --- a/dsp/lib/sprout/sprout/rational/io.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RATIONAL_IO_HPP -#define SPROUT_RATIONAL_IO_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // operator>> - // operator<< - // - template - inline SPROUT_NON_CONSTEXPR std::basic_istream& - operator>>(std::basic_istream& lhs, sprout::rational& rhs) { - IntType n = IntType(0); - IntType d = IntType(1); - Elem c = 0; - sprout::detail::io::ios_flags_saver saver(lhs); - lhs >> n; - c = lhs.get(); - if (c != Elem('/')) { - lhs.clear(std::istream::badbit); - } - lhs >> std::noskipws; - lhs >> d; - if (lhs) { - rhs.assign(n, d); - } - return lhs; - } - template - inline SPROUT_NON_CONSTEXPR std::basic_ostream& - operator<<(std::basic_ostream& lhs, sprout::rational const& rhs) { - return lhs << rhs.numerator() << Elem('/') << rhs.denominator(); - } -} // namespace sprout - -#endif // SPROUT_RATIONAL_IO_HPP diff --git a/dsp/lib/sprout/sprout/rational/literals.hpp b/dsp/lib/sprout/sprout/rational/literals.hpp deleted file mode 100644 index 4c76a8d..0000000 --- a/dsp/lib/sprout/sprout/rational/literals.hpp +++ /dev/null @@ -1,71 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RATIONAL_LITERALS_HPP -#define SPROUT_RATIONAL_LITERALS_HPP - -#include -#include -#include - -#if SPROUT_USE_USER_DEFINED_LITERALS - -namespace sprout { - namespace literals { - namespace rational { - // - // _r - // - inline SPROUT_CONSTEXPR sprout::rational - operator"" _r(unsigned long long x) { - return sprout::rational(static_cast(x)); - } - - // - // _rl - // _rL - // - inline SPROUT_CONSTEXPR sprout::rational - operator"" _rl(unsigned long long x) { - return sprout::rational(static_cast(x)); - } - inline SPROUT_CONSTEXPR sprout::rational - operator"" _rL(unsigned long long x) { - return sprout::rational(static_cast(x)); - } - - // - // _rll - // _rLL - // - inline SPROUT_CONSTEXPR sprout::rational - operator"" _rll(unsigned long long x) { - return sprout::rational(x); - } - inline SPROUT_CONSTEXPR sprout::rational - operator"" _rLL(unsigned long long x) { - return sprout::rational(x); - } - } // namespace rational - - using sprout::literals::rational::operator"" _r; - using sprout::literals::rational::operator"" _rl; - using sprout::literals::rational::operator"" _rL; - using sprout::literals::rational::operator"" _rll; - using sprout::literals::rational::operator"" _rLL; - } // namespace literals - - using sprout::literals::rational::operator"" _r; - using sprout::literals::rational::operator"" _rl; - using sprout::literals::rational::operator"" _rL; - using sprout::literals::rational::operator"" _rll; - using sprout::literals::rational::operator"" _rLL; -} // namespace sprout - -#endif // #if SPROUT_USE_USER_DEFINED_LITERALS - -#endif // #ifndef SPROUT_RATIONAL_LITERALS_HPP diff --git a/dsp/lib/sprout/sprout/rational/rational.hpp b/dsp/lib/sprout/sprout/rational/rational.hpp deleted file mode 100644 index 1c09d62..0000000 --- a/dsp/lib/sprout/sprout/rational/rational.hpp +++ /dev/null @@ -1,221 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RATIONAL_RATIONAL_HPP -#define SPROUT_RATIONAL_RATIONAL_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - template - class rational; - - namespace detail { - struct rational_private_construct_t {}; - - template - class rational_construct_access; - } // namespace detail - - namespace detail { - template - class rational_impl { - protected: - typedef IntType int_type; - typedef typename sprout::detail::call_traits::param_type param_type; - protected: - IntType num_; - IntType den_; - protected: - SPROUT_CONSTEXPR rational_impl() - : num_(0), den_(1) - {} - rational_impl(rational_impl const&) = default; - SPROUT_CONSTEXPR rational_impl(param_type n) - : num_(n), den_(1) - {} - SPROUT_CONSTEXPR rational_impl(param_type n, param_type d) - : num_(n), den_(d) - {} - SPROUT_CONSTEXPR rational_impl(param_type n, param_type d, param_type g) - : num_(n / g), den_(d / g) - {} - }; - } // namespace detail - - // - // rational - // - template - class rational - : private sprout::detail::rational_impl - { - static_assert(sprout::numeric_limits::is_specialized, "sprout::numeric_limits::is_specialized"); - friend class sprout::detail::rational_construct_access; - public: - typedef IntType int_type; - typedef typename sprout::detail::call_traits::param_type param_type; - private: - typedef sprout::detail::rational_impl base_type; - private: - static SPROUT_CONSTEXPR IntType normalize_g_1(IntType den, IntType g) { - return den / g < 0 ? -g : g; - } - static SPROUT_CONSTEXPR IntType normalize_g(IntType num, IntType den) { - return den == 0 ? throw sprout::bad_rational() - : num == 0 ? den - : normalize_g_1(den, sprout::gcd(num, den)) - ; - } - private: - using base_type::num_; - using base_type::den_; - private: - SPROUT_CONSTEXPR rational(sprout::detail::rational_private_construct_t, param_type n, param_type d) - : base_type(n, d) - {} - public: - SPROUT_CONSTEXPR rational() SPROUT_NOEXCEPT - : base_type() - {} - rational(rational const&) = default; - SPROUT_CONSTEXPR rational(param_type n) SPROUT_NOEXCEPT - : base_type(n) - {} - SPROUT_CONSTEXPR rational(param_type n, param_type d) - : base_type(n, d, normalize_g(n, d)) - {} - - SPROUT_CXX14_CONSTEXPR rational& operator=(rational const& rhs) SPROUT_NOEXCEPT { - rational temp(rhs); - sprout::swap(temp, *this); - return *this; - } - SPROUT_CXX14_CONSTEXPR rational& operator=(param_type n) SPROUT_NOEXCEPT { - return assign(n, 1); - } - SPROUT_CXX14_CONSTEXPR rational& assign(param_type n, param_type d) { - rational temp(n, d); - sprout::swap(temp, *this); - return *this; - } - - SPROUT_CONSTEXPR IntType numerator() const SPROUT_NOEXCEPT { - return num_; - } - SPROUT_CONSTEXPR IntType denominator() const SPROUT_NOEXCEPT { - return den_; - } - - SPROUT_CXX14_CONSTEXPR rational& operator+=(rational const& rhs) { - IntType g = sprout::gcd(den_, rhs.den_); - den_ /= g; - num_ = num_ * (rhs.den_ / g) + rhs.num_ * den_; - g = sprout::gcd(num_, g); - num_ /= g; - den_ *= rhs.den_ / g; - return *this; - } - SPROUT_CXX14_CONSTEXPR rational& operator-=(rational const& rhs) { - IntType g = sprout::gcd(den_, rhs.den_); - den_ /= g; - num_ = num_ * (rhs.den_ / g) - rhs.num_ * den_; - g = sprout::gcd(num_, g); - num_ /= g; - den_ *= rhs.den_ / g; - return *this; - } - SPROUT_CXX14_CONSTEXPR rational& operator*=(rational const& rhs) { - IntType gcd1 = sprout::gcd(num_, rhs.den_); - IntType gcd2 = sprout::gcd(rhs.num_, den_); - num_ =(num_ / gcd1) * (rhs.num_ / gcd2); - den_ =(den_ / gcd2) * (rhs.den_ / gcd1); - return *this; - } - SPROUT_CXX14_CONSTEXPR rational& operator/=(rational const& rhs) { - if (rhs.num_ == IntType(0)) { - throw sprout::bad_rational(); - } - if (num_ == IntType(0)) { - return *this; - } - IntType gcd1 = sprout::gcd(num_, rhs.num_); - IntType gcd2 = sprout::gcd(rhs.den_, den_); - num_ =(num_ / gcd1) * (rhs.den_ / gcd2); - den_ =(den_ / gcd2) * (rhs.num_ / gcd1); - if (den_ < IntType(0)) { - num_ = -num_; - den_ = -den_; - } - return *this; - } - SPROUT_CXX14_CONSTEXPR rational& operator+=(param_type rhs) { - return *this += rational(rhs); - } - SPROUT_CXX14_CONSTEXPR rational& operator-=(param_type rhs) { - return *this -= rational(rhs); - } - SPROUT_CXX14_CONSTEXPR rational& operator*=(param_type rhs) { - return *this *= rational(rhs); - } - SPROUT_CXX14_CONSTEXPR rational& operator/=(param_type rhs) { - return *this /= rational(rhs); - } - - SPROUT_CXX14_CONSTEXPR rational& operator++() SPROUT_NOEXCEPT { - num_ += den_; - return *this; - } - SPROUT_CXX14_CONSTEXPR rational& operator--() SPROUT_NOEXCEPT { - num_ -= den_; - return *this; - } - SPROUT_CXX14_CONSTEXPR rational operator++(int) SPROUT_NOEXCEPT { - rational result(*this); - ++*this; - return result; - } - SPROUT_CXX14_CONSTEXPR rational operator--(int) SPROUT_NOEXCEPT { - rational result(*this); - --*this; - return result; - } - - SPROUT_CONSTEXPR bool operator!() const SPROUT_NOEXCEPT { - return !num_; - } - SPROUT_CONSTEXPR operator bool() const SPROUT_NOEXCEPT { - return num_ != 0; - } - }; - - namespace detail { - template - class rational_construct_access { - public: - static SPROUT_CONSTEXPR sprout::rational - raw_construct( - typename sprout::detail::call_traits::param_type n, - typename sprout::detail::call_traits::param_type d - ) - { - return sprout::rational( - sprout::detail::rational_private_construct_t(), - n, d - ); - } - }; - } // namespace detail -} // namespace sprout - -#endif // SPROUT_RATIONAL_RATIONAL_HPP diff --git a/dsp/lib/sprout/sprout/rational/tuple.hpp b/dsp/lib/sprout/sprout/rational/tuple.hpp deleted file mode 100644 index 8a54c6c..0000000 --- a/dsp/lib/sprout/sprout/rational/tuple.hpp +++ /dev/null @@ -1,134 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RATIONAL_TUPLE_HPP -#define SPROUT_RATIONAL_TUPLE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - namespace detail { - template - struct tuple_element_impl; - template - struct tuple_element_impl > - : public sprout::detail::nil_base - {}; - template - struct tuple_element_impl<0, sprout::rational > - : public sprout::identity - {}; - template - struct tuple_element_impl<1, sprout::rational > - : public sprout::identity - {}; - - template - struct get_impl; - template - struct get_impl<0, sprout::rational > { - public: - SPROUT_CONSTEXPR T operator()(sprout::rational const& t) const { - return t.numerator(); - } - }; - template - struct get_impl<1, sprout::rational > { - public: - SPROUT_CONSTEXPR T operator()(sprout::rational const& t) const { - return t.denominator(); - } - }; - } // namespace detail - } // namespace tuples -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // tuple_size - // - template - struct tuple_size > - : public sprout::integral_constant - {}; - - // - // tuple_element - // - template - struct tuple_element > - : public sprout::tuples::detail::tuple_element_impl > - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -namespace sprout { - namespace tuples { - // - // tuple_traits - // - template - struct tuple_traits > { - public: - SPROUT_STATIC_CONSTEXPR std::size_t size = sprout::tuples::tuple_size >::value; - public: - template - struct element - : public sprout::tuples::tuple_element > - {}; - template - struct lvalue_reference - : public element - {}; - template - struct const_lvalue_reference - : public element - {}; - template - struct rvalue_reference - : public element - {}; - template - struct const_rvalue_reference - : public element - {}; - }; - template - SPROUT_CONSTEXPR_OR_CONST std::size_t sprout::tuples::tuple_traits >::size; - - // - // tuple_access_traits - // - template - struct tuple_access_traits > { - public: - template - static SPROUT_CONSTEXPR T - tuple_get(sprout::rational const& t) SPROUT_NOEXCEPT { - static_assert(I < 2, "tuple_get: index out of range"); - return sprout::tuples::detail::get_impl >()(t); - } - }; - } // namespace tuples -} // namespace sprout - -#endif // #ifndef SPROUT_RATIONAL_TUPLE_HPP diff --git a/dsp/lib/sprout/sprout/rational/values.hpp b/dsp/lib/sprout/sprout/rational/values.hpp deleted file mode 100644 index faeb861..0000000 --- a/dsp/lib/sprout/sprout/rational/values.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_RATIONAL_VALUES_HPP -#define SPROUT_RATIONAL_VALUES_HPP - -#include -#include -#include - -namespace sprout { - // - // abs - // - template - inline SPROUT_CONSTEXPR sprout::rational - abs(sprout::rational const& x) { - return x.numerator() >= IntType(0) ? x - : sprout::detail::rational_construct_access::raw_construct( - -x.numerator(), x.denominator() - ) - ; - } -} // namespace sprout - -#endif // SPROUT_RATIONAL_VALUES_HPP diff --git a/dsp/lib/sprout/sprout/sized_pit.hpp b/dsp/lib/sprout/sprout/sized_pit.hpp deleted file mode 100644 index 1e70bbf..0000000 --- a/dsp/lib/sprout/sprout/sized_pit.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_SIZED_PIT_HPP -#define SPROUT_SIZED_PIT_HPP - -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_SIZED_PIT_HPP diff --git a/dsp/lib/sprout/sprout/sized_pit/comparison.hpp b/dsp/lib/sprout/sprout/sized_pit/comparison.hpp deleted file mode 100644 index 15664c9..0000000 --- a/dsp/lib/sprout/sprout/sized_pit/comparison.hpp +++ /dev/null @@ -1,55 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_SIZED_PIT_COMPARISON_HPP -#define SPROUT_SIZED_PIT_COMPARISON_HPP - -#include -#include - -namespace sprout { - // - // operator== - // operator!= - // operator< - // operator> - // operator<= - // operator>= - // - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::sized_pit const& lhs, sprout::sized_pit const& rhs) { - return lhs.front() == rhs.front(); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::sized_pit const& lhs, sprout::sized_pit const& rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator<(sprout::sized_pit const& lhs, sprout::sized_pit const& rhs) { - return lhs.front() < rhs.front(); - } - template - inline SPROUT_CONSTEXPR bool - operator>(sprout::sized_pit const& lhs, sprout::sized_pit const& rhs) { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator<=(sprout::sized_pit const& lhs, sprout::sized_pit const& rhs) { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(sprout::sized_pit const& lhs, sprout::sized_pit const& rhs) { - return !(lhs < rhs); - } -} // namespace sprout - -#endif // #ifndef SPROUT_SIZED_PIT_COMPARISON_HPP diff --git a/dsp/lib/sprout/sprout/sized_pit/container.hpp b/dsp/lib/sprout/sprout/sized_pit/container.hpp deleted file mode 100644 index 2087c74..0000000 --- a/dsp/lib/sprout/sprout/sized_pit/container.hpp +++ /dev/null @@ -1,108 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_SIZED_PIT_CONTAINER_HPP -#define SPROUT_SIZED_PIT_CONTAINER_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - struct sized_pit_container_construct_traits; - - template - struct sized_pit_container_construct_traits< - sprout::sized_pit, - typename std::enable_if::value>::type - > { - public: - typedef typename sprout::container_construct_traits::copied_type copied_type; - public: - template - static SPROUT_CONSTEXPR copied_type - deep_copy(Cont&&) { - return copied_type(); - } - template - static SPROUT_CONSTEXPR copied_type - make(Args&&... args) { - return sprout::make(SPROUT_FORWARD(Args, args)...); - } - template - static SPROUT_CONSTEXPR copied_type - remake(Cont&& cont, typename sprout::container_traits >::difference_type size, Args&&... args) { - return sprout::remake(SPROUT_FORWARD(Cont, cont), size, SPROUT_FORWARD(Args, args)...); - } - }; - - template - struct sized_pit_container_construct_traits< - sprout::sized_pit, - typename std::enable_if::value>::type - > { - public: - typedef typename sprout::container_construct_traits::copied_type copied_type; - public: - template - static SPROUT_CONSTEXPR copied_type - deep_copy(Cont&&) { - return copied_type(); - } - template - static SPROUT_CONSTEXPR copied_type - make(Args&&... args) { - return sprout::make(SPROUT_FORWARD(Args, args)...); - } - template - static SPROUT_CONSTEXPR copied_type - remake(Cont&& cont, typename sprout::container_traits >::difference_type size, Args&&... args) { - return sprout::remake(SPROUT_FORWARD(Cont, cont), size, SPROUT_FORWARD(Args, args)...); - } - template - static SPROUT_CONSTEXPR copied_type - remake(Cont&&, typename sprout::container_traits >::difference_type, InputIterator first, InputIterator last) { - return copied_type(first, last); - } - }; - } // namespace detail - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::detail::sized_pit_container_construct_traits > - {}; - - // - // container_transform_traits - // - template - struct container_transform_traits > { - public: - template >::size_type Size> - struct rebind_size { - public: - typedef sprout::sized_pit< - typename sprout::container_transform_traits::template rebind_size::type - > type; - }; - template - struct rebind_type { - public: - typedef sprout::sized_pit< - typename sprout::container_transform_traits::template rebind_type::type - > type; - }; - }; -} // namespace sprout - -#endif // #ifndef SPROUT_SIZED_PIT_CONTAINER_HPP diff --git a/dsp/lib/sprout/sprout/sized_pit/hash.hpp b/dsp/lib/sprout/sprout/sized_pit/hash.hpp deleted file mode 100644 index 24e2436..0000000 --- a/dsp/lib/sprout/sprout/sized_pit/hash.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_SIZED_PIT_HASH_HPP -#define SPROUT_SIZED_PIT_HASH_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // hash_value - // - template - inline SPROUT_CONSTEXPR std::size_t - hash_value(sprout::sized_pit const& v) { - return sprout::to_hash(v.elem); - } -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // hash - // - template - struct hash > - : public sprout::hash > - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -#endif // #ifndef SPROUT_SIZED_PIT_HASH_HPP diff --git a/dsp/lib/sprout/sprout/sized_pit/sized_pit.hpp b/dsp/lib/sprout/sprout/sized_pit/sized_pit.hpp deleted file mode 100644 index 702e5cf..0000000 --- a/dsp/lib/sprout/sprout/sized_pit/sized_pit.hpp +++ /dev/null @@ -1,182 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_SIZED_PIT_SIZED_PIT_HPP -#define SPROUT_SIZED_PIT_SIZED_PIT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // sized_pit - // - template - class sized_pit - : public sprout::container_traits_facade - { - private: - typedef sprout::container_traits_facade::type> facade_type; - public: - typedef Container container_type; - typedef typename facade_type::value_type value_type; - typedef typename facade_type::reference reference; - typedef typename facade_type::const_reference const_reference; - typedef typename sprout::value_iterator iterator; - typedef typename sprout::value_iterator const_iterator; - typedef typename facade_type::size_type size_type; - typedef typename facade_type::difference_type difference_type; - typedef typename facade_type::pointer pointer; - typedef typename facade_type::const_pointer const_pointer; - typedef typename sprout::reverse_iterator reverse_iterator; - typedef typename sprout::reverse_iterator const_reverse_iterator; - public: - SPROUT_STATIC_CONSTEXPR size_type enumerable_size = sprout::detail::static_size_or_zero::value; - private: - value_type elem; - size_type size_; - public: - SPROUT_CONSTEXPR sized_pit() - : elem(), size_() - {} - sized_pit(sized_pit const&) = default; - explicit SPROUT_CONSTEXPR sized_pit(size_type size) - : elem(), size_(size) - {} - SPROUT_CONSTEXPR sized_pit(size_type size, value_type const& t) - : elem(t), size_(size) - {} - SPROUT_CXX14_CONSTEXPR sized_pit& operator=(sized_pit const& rhs) { - elem = rhs.elem; - return *this; - } - SPROUT_CXX14_CONSTEXPR sized_pit& operator=(sized_pit&& rhs) { - elem = sprout::move(rhs.elem); - return *this; - } - SPROUT_CXX14_CONSTEXPR sized_pit& operator=(value_type const& rhs) { - elem = rhs; - return *this; - } - SPROUT_CXX14_CONSTEXPR sized_pit& operator=(value_type&& rhs) { - elem = sprout::move(rhs); - return *this; - } - SPROUT_CXX14_CONSTEXPR void swap(sized_pit& other) - SPROUT_NOEXCEPT_IF_EXPR(sprout::swap(elem, other.elem)) - { - sprout::swap(elem, other.elem); - } - // iterators: - SPROUT_CXX14_CONSTEXPR iterator begin() { - return iterator(elem, enumerable_size); - } - SPROUT_CONSTEXPR const_iterator begin() const { - return const_iterator(elem, enumerable_size); - } - SPROUT_CXX14_CONSTEXPR iterator end() SPROUT_NOEXCEPT { - return iterator(elem, 0); - } - SPROUT_CONSTEXPR const_iterator end() const SPROUT_NOEXCEPT { - return const_iterator(elem, 0); - } - SPROUT_CXX14_CONSTEXPR reverse_iterator rbegin() SPROUT_NOEXCEPT { - return reverse_iterator(end()); - } - SPROUT_CONSTEXPR const_reverse_iterator rbegin() const SPROUT_NOEXCEPT { - return const_reverse_iterator(end()); - } - SPROUT_CXX14_CONSTEXPR reverse_iterator rend() SPROUT_NOEXCEPT { - return reverse_iterator(begin()); - } - SPROUT_CONSTEXPR const_reverse_iterator rend() const SPROUT_NOEXCEPT { - return const_reverse_iterator(begin()); - } - SPROUT_CONSTEXPR const_iterator cbegin() const SPROUT_NOEXCEPT { - return const_iterator(elem, enumerable_size); - } - SPROUT_CONSTEXPR const_iterator cend() const SPROUT_NOEXCEPT { - return const_iterator(elem, 0); - } - SPROUT_CONSTEXPR const_reverse_iterator crbegin() const SPROUT_NOEXCEPT { - return const_reverse_iterator(end()); - } - SPROUT_CONSTEXPR const_reverse_iterator crend() const SPROUT_NOEXCEPT { - return const_reverse_iterator(begin()); - } - // capacity: - SPROUT_CONSTEXPR size_type size() const SPROUT_NOEXCEPT { - return size_; - } - SPROUT_CONSTEXPR size_type max_size() const SPROUT_NOEXCEPT { - return enumerable_size; - } - SPROUT_CONSTEXPR bool empty() const SPROUT_NOEXCEPT { - return size() == 0; - } - // element access: - SPROUT_CXX14_CONSTEXPR reference operator[](size_type) { - return elem; - } - SPROUT_CONSTEXPR const_reference operator[](size_type) const { - return elem; - } - SPROUT_CXX14_CONSTEXPR reference at(size_type i) { - return i < size() ? elem - : (throw std::out_of_range("sized_pit<>: index out of range"), elem) - ; - } - SPROUT_CONSTEXPR const_reference at(size_type i) const { - return i < size() ? elem - : (throw std::out_of_range("sized_pit<>: index out of range"), elem) - ; - } - SPROUT_CXX14_CONSTEXPR reference front() { - return elem; - } - SPROUT_CONSTEXPR const_reference front() const { - return elem; - } - SPROUT_CXX14_CONSTEXPR reference back() { - return elem; - } - SPROUT_CONSTEXPR const_reference back() const { - return elem; - } - // others: - SPROUT_CXX14_CONSTEXPR void rangecheck(size_type i) const { - return i >= size() ? throw std::out_of_range("sized_pit<>: index out of range") - : (void)0 - ; - } - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::sized_pit::size_type sprout::sized_pit::enumerable_size; - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::sized_pit& lhs, sprout::sized_pit& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } -} // namespace sprout - -#include - -#endif // #ifndef SPROUT_SIZED_PIT_SIZED_PIT_HPP diff --git a/dsp/lib/sprout/sprout/sized_pit/tuple.hpp b/dsp/lib/sprout/sprout/sized_pit/tuple.hpp deleted file mode 100644 index a09202d..0000000 --- a/dsp/lib/sprout/sprout/sized_pit/tuple.hpp +++ /dev/null @@ -1,70 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_SIZED_PIT_TUPLE_HPP -#define SPROUT_SIZED_PIT_TUPLE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // tuple_get - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits >::value_type& - tuple_get(sprout::sized_pit& t) SPROUT_NOEXCEPT { - static_assert(I < sprout::container_traits >::static_size, "tuple_get: index out of range"); - return t[I]; - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits >::value_type const& - tuple_get(sprout::sized_pit const& t) SPROUT_NOEXCEPT { - static_assert(I < sprout::container_traits >::static_size, "tuple_get: index out of range"); - return t[I]; - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits >::value_type&& - tuple_get(sprout::sized_pit&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::move(sprout::tuples::get(t))) - { - return sprout::move(sprout::tuples::get(t)); - } -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // tuple_size - // - template - struct tuple_size > - : public std::tuple_size - {}; - - // - // tuple_element - // - template - struct tuple_element > - : public sprout::tuples::tuple_element - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -#endif // #ifndef SPROUT_SIZED_PIT_TUPLE_HPP diff --git a/dsp/lib/sprout/sprout/sized_pit/type_traits.hpp b/dsp/lib/sprout/sprout/sized_pit/type_traits.hpp deleted file mode 100644 index f82d616..0000000 --- a/dsp/lib/sprout/sprout/sized_pit/type_traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_SIZED_PIT_TYPE_TRAITS_HPP -#define SPROUT_SIZED_PIT_TYPE_TRAITS_HPP - -#include -#include -#include - -namespace sprout { - // - // is_sized_pit - // - template - struct is_sized_pit - : public sprout::false_type - {}; - template - struct is_sized_pit - : public sprout::is_sized_pit - {}; - template - struct is_sized_pit - : public sprout::is_sized_pit - {}; - template - struct is_sized_pit > - : public sprout::true_type - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_sized_pit_v = sprout::is_sized_pit::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_SIZED_PIT_TYPE_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/stateful.hpp b/dsp/lib/sprout/sprout/stateful.hpp deleted file mode 100644 index 61b8a3b..0000000 --- a/dsp/lib/sprout/sprout/stateful.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STATEFUL_HPP -#define SPROUT_STATEFUL_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_STATEFUL_HPP diff --git a/dsp/lib/sprout/sprout/stateful/counter.hpp b/dsp/lib/sprout/sprout/stateful/counter.hpp deleted file mode 100644 index 1a01283..0000000 --- a/dsp/lib/sprout/sprout/stateful/counter.hpp +++ /dev/null @@ -1,93 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STATEFUL_COUNTER_HPP -#define SPROUT_STATEFUL_COUNTER_HPP - -#include -#include - -namespace sprout { -#ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR - - namespace counter_detail { -#if defined(__GNUC__) && !defined(__clang__) -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wnon-template-friend" -#endif -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wundefined-inline" -#endif - template - struct tag { - friend SPROUT_CONSTEXPR int adl_counter(sprout::counter_detail::tag); - }; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -#if defined(__GNUC__) && !defined(__clang__) -# pragma GCC diagnostic pop -#endif - - template - struct state - : public sprout::integral_constant - { - friend SPROUT_CONSTEXPR int adl_counter(sprout::counter_detail::tag) { - return N; - } - }; - - template())> - inline SPROUT_CONSTEXPR bool check(int, sprout::counter_detail::tag) { - return true; - } - template - inline SPROUT_CONSTEXPR bool check(long, sprout::counter_detail::tag) { - return false; - } - template - inline SPROUT_CONSTEXPR bool check(bool R = sprout::counter_detail::check(0, sprout::counter_detail::tag())) { - return R; - } - - template - inline SPROUT_CONSTEXPR int counter(sprout::false_type, sprout::counter_detail::tag) { - return 0; - } - template - inline SPROUT_CONSTEXPR int counter( - sprout::true_type, sprout::counter_detail::tag, - int R = !sprout::counter_detail::check() ? N - : counter(sprout::bool_constant()>(), sprout::counter_detail::tag()) - ) - { - return R; - } - template - inline SPROUT_CONSTEXPR int counter(int R = sprout::counter_detail::counter(sprout::true_type(), sprout::counter_detail::tag())) { - return R; - } - } // namespace counter_detail - // - // counter - // - template< - int N = 1, - int R = sprout::counter_detail::state< - sprout::counter_detail::counter() + N - 1 - >::value - > - inline SPROUT_CONSTEXPR int counter() { - return R; - } - -#endif -} // namespace sprout - -#endif // #ifndef SPROUT_STATEFUL_COUNTER_HPP diff --git a/dsp/lib/sprout/sprout/stateful/rand.hpp b/dsp/lib/sprout/sprout/stateful/rand.hpp deleted file mode 100644 index 6f988b6..0000000 --- a/dsp/lib/sprout/sprout/stateful/rand.hpp +++ /dev/null @@ -1,218 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STATEFUL_RAND_HPP -#define SPROUT_STATEFUL_RAND_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { -#ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR - - namespace detail { - typedef sprout::random::default_random_engine rand_generator_type; - typedef SPROUT_WORKAROUND_DETAIL_UNIFORM_INT_DISTRIBUTION rand_distribution_type; - typedef sprout::random::random_result< - sprout::detail::rand_generator_type, - sprout::detail::rand_distribution_type - > rand_result_type; - - SPROUT_STATIC_CONSTEXPR std::size_t rand_default_seed = SPROUT_UNIQUE_SEED; - } // namespace detail - - namespace rand_detail { -#if defined(__GNUC__) && !defined(__clang__) -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wnon-template-friend" -#endif -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wundefined-inline" -#endif - template - struct tag { - friend SPROUT_CONSTEXPR int adl_counter(sprout::rand_detail::tag); - friend SPROUT_CONSTEXPR bool adl_is_srand(sprout::rand_detail::tag); - friend SPROUT_CONSTEXPR unsigned adl_seed(sprout::rand_detail::tag); - }; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -#if defined(__GNUC__) && !defined(__clang__) -# pragma GCC diagnostic pop -#endif - - template - struct state { - friend SPROUT_CONSTEXPR int adl_counter(sprout::rand_detail::tag) { - return N; - } - friend SPROUT_CONSTEXPR bool adl_is_srand(sprout::rand_detail::tag) { - return IsSrand; - } - friend SPROUT_CONSTEXPR unsigned adl_seed(sprout::rand_detail::tag) { - return Seed; - } - // generate a next random number - SPROUT_STATIC_CONSTEXPR sprout::detail::rand_result_type result - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(( - !IsSrand - ? sprout::rand_detail::state< - N - 1, - adl_is_srand(sprout::rand_detail::tag()), - adl_seed(sprout::rand_detail::tag()) - >::result() - : sprout::detail::rand_result_type( - Seed, - sprout::detail::rand_generator_type(Seed), - sprout::detail::rand_distribution_type(0, RAND_MAX) - ) - )) - ; - SPROUT_STATIC_CONSTEXPR int value = result; - }; - template - SPROUT_CONSTEXPR_OR_CONST sprout::detail::rand_result_type sprout::rand_detail::state::result - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(( - !IsSrand - ? sprout::rand_detail::state< - N - 1, - adl_is_srand(sprout::rand_detail::tag()), - adl_seed(sprout::rand_detail::tag()) - >::result() - : sprout::detail::rand_result_type( - 0, - sprout::detail::rand_generator_type(Seed), - sprout::detail::rand_distribution_type(0, RAND_MAX) - ) - )) - ; - template - SPROUT_CONSTEXPR_OR_CONST int sprout::rand_detail::state::value; - template - struct state<0, IsSrand, Seed> { - friend SPROUT_CONSTEXPR int adl_counter(sprout::rand_detail::tag<0>) { - return 0; - } - friend SPROUT_CONSTEXPR bool adl_is_srand(sprout::rand_detail::tag<0>) { - return IsSrand; - } - friend SPROUT_CONSTEXPR unsigned adl_seed(sprout::rand_detail::tag<0>) { - return Seed; - } - // generate a first random number between [0, RAND_MAX] - SPROUT_STATIC_CONSTEXPR sprout::detail::rand_result_type result - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(( - !IsSrand - ? sprout::detail::rand_distribution_type(0, RAND_MAX) - (sprout::as_const(sprout::detail::rand_generator_type(!IsSrand ? sprout::detail::rand_default_seed : Seed))) - : sprout::detail::rand_result_type( - Seed, - sprout::detail::rand_generator_type(Seed), - sprout::detail::rand_distribution_type(0, RAND_MAX) - ) - )) - ; - static SPROUT_CONSTEXPR int value = result; - }; - template - SPROUT_CONSTEXPR_OR_CONST sprout::detail::rand_result_type sprout::rand_detail::state<0, IsSrand, Seed>::result - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER( - !IsSrand - ? sprout::detail::rand_distribution_type(0, RAND_MAX) - (sprout::as_const(sprout::detail::rand_generator_type(!IsSrand ? sprout::detail::rand_default_seed : Seed))) - : sprout::detail::rand_result_type( - Seed, - sprout::detail::rand_generator_type(Seed), - sprout::detail::rand_distribution_type(0, RAND_MAX) - ) - ) - ; - template - SPROUT_CONSTEXPR_OR_CONST int sprout::rand_detail::state<0, IsSrand, Seed>::value; - - template())> - inline SPROUT_CONSTEXPR bool check(int, sprout::rand_detail::tag) { - return true; - } - template - inline SPROUT_CONSTEXPR bool check(long, sprout::rand_detail::tag) { - return false; - } - template - inline SPROUT_CONSTEXPR bool check(bool R = sprout::rand_detail::check(0, sprout::rand_detail::tag())) { - return R; - } - - template - inline SPROUT_CONSTEXPR int counter(sprout::false_type, sprout::rand_detail::tag) { - return 0; - } - template - inline SPROUT_CONSTEXPR int counter( - sprout::true_type, sprout::rand_detail::tag, - int R = !sprout::rand_detail::check() ? N - : counter(sprout::bool_constant()>(), sprout::rand_detail::tag()) - ) - { - return R; - } - template - inline SPROUT_CONSTEXPR int counter(int R = sprout::rand_detail::counter(sprout::true_type(), sprout::rand_detail::tag())) { - return R; - } - } // namespace rand_detail - // - // rand - // - template< - int N = 1, - int R = sprout::rand_detail::state< - sprout::rand_detail::counter() + N - 1 - >::value - > - inline SPROUT_CONSTEXPR int rand() { - return R; - } - - // - // srand - // srand_return - // - template< - unsigned Seed, - int N = 1, - int = sprout::rand_detail::state< - sprout::rand_detail::counter() + N - 1, - true, Seed - >::value - > - SPROUT_CXX14_CONSTEXPR void srand() {} - template< - unsigned Seed, - int N = 1, - int R = sprout::rand_detail::state< - sprout::rand_detail::counter() + N - 1, - true, Seed - >::value - > - inline SPROUT_CONSTEXPR unsigned srand_return() { - return R; - } - -#endif -} // namespace sprout - -#endif // #ifndef SPROUT_STATEFUL_RAND_HPP diff --git a/dsp/lib/sprout/sprout/stateful/type_index.hpp b/dsp/lib/sprout/sprout/stateful/type_index.hpp deleted file mode 100644 index 6a49c0f..0000000 --- a/dsp/lib/sprout/sprout/stateful/type_index.hpp +++ /dev/null @@ -1,95 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STATEFUL_TYPE_INDEX_HPP -#define SPROUT_STATEFUL_TYPE_INDEX_HPP - -#include -#include -#include -#include -#include - -namespace sprout { -#ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR - - class type_index { - private: - int id_; - public: - template - explicit SPROUT_CONSTEXPR type_index(sprout::typed_id) SPROUT_NOEXCEPT - : id_(sprout::typed_id::value) - {} - explicit SPROUT_CONSTEXPR type_index(int id) SPROUT_NOEXCEPT - : id_(id) - {} - SPROUT_CONSTEXPR bool - operator==(sprout::type_index const& rhs) const SPROUT_NOEXCEPT { - return id_ == rhs.id_; - } - SPROUT_CONSTEXPR bool - operator!=(sprout::type_index const& rhs) const SPROUT_NOEXCEPT { - return !(*this == rhs); - } - SPROUT_CONSTEXPR bool - operator<(sprout::type_index const& rhs) const SPROUT_NOEXCEPT { - return id_ < rhs.id_; - } - SPROUT_CONSTEXPR bool - operator<=(sprout::type_index const& rhs) const SPROUT_NOEXCEPT { - return !(rhs < *this); - } - SPROUT_CONSTEXPR bool - operator>(sprout::type_index const& rhs) const SPROUT_NOEXCEPT { - return rhs < *this; - } - SPROUT_CONSTEXPR bool - operator>=(sprout::type_index const& rhs) const SPROUT_NOEXCEPT { - return !(*this < rhs); - } - SPROUT_CONSTEXPR std::size_t - hash_code() const SPROUT_NOEXCEPT { - return sprout::hash_value(id_); - } - } ; - -#endif -} // namespace sprout - -#ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR - -namespace sprout { - // - // hash_value - // - inline SPROUT_CONSTEXPR std::size_t - hash_value(sprout::type_index const& v) { - return v.hash_code(); - } -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // hash - // - template<> - struct hash - : public sprout::hash - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -#endif - -#endif // #ifndef SPROUT_STATEFUL_TYPE_INDEX_HPP diff --git a/dsp/lib/sprout/sprout/stateful/typed_counter.hpp b/dsp/lib/sprout/sprout/stateful/typed_counter.hpp deleted file mode 100644 index f79ce13..0000000 --- a/dsp/lib/sprout/sprout/stateful/typed_counter.hpp +++ /dev/null @@ -1,97 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STATEFUL_TYPED_COUNTER_HPP -#define SPROUT_STATEFUL_TYPED_COUNTER_HPP - -#include -#include - -namespace sprout { -#ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR - - namespace typed_counter_detail { - template - struct typed { -#if defined(__GNUC__) && !defined(__clang__) -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wnon-template-friend" -#endif -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wundefined-inline" -#endif - template - struct tag { - friend SPROUT_CONSTEXPR int adl_counter(tag); - }; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -#if defined(__GNUC__) && !defined(__clang__) -# pragma GCC diagnostic pop -#endif - - template - struct state - : public sprout::integral_constant - { - friend SPROUT_CONSTEXPR int adl_counter(tag) { - return N; - } - }; - - template())> - static SPROUT_CONSTEXPR bool check(int, tag) { - return true; - } - template - static SPROUT_CONSTEXPR bool check(long, tag) { - return false; - } - template - static SPROUT_CONSTEXPR bool check(bool R = check(0, tag())) { - return R; - } - - template - static SPROUT_CONSTEXPR int counter(sprout::false_type, tag) { - return 0; - } - template - static SPROUT_CONSTEXPR int counter( - sprout::true_type, tag, - int R = !check() ? N - : counter(sprout::bool_constant()>(), tag()) - ) - { - return R; - } - template - static SPROUT_CONSTEXPR int counter(int R = counter(sprout::true_type(), tag())) { - return R; - } - }; - } // namespace typed_counter_detail - // - // counter - // - template< - typename T, - int N = 1, - int R = sprout::typed_counter_detail::typed::template state< - sprout::typed_counter_detail::typed::counter(sprout::true_type(), typename sprout::typed_counter_detail::typed::template tag()) + N - 1 - >::value - > - inline SPROUT_CONSTEXPR int counter() { - return R; - } - -#endif -} // namespace sprout - -#endif // #ifndef SPROUT_STATEFUL_TYPED_COUNTER_HPP diff --git a/dsp/lib/sprout/sprout/stateful/typed_id.hpp b/dsp/lib/sprout/sprout/stateful/typed_id.hpp deleted file mode 100644 index 2cdfd6f..0000000 --- a/dsp/lib/sprout/sprout/stateful/typed_id.hpp +++ /dev/null @@ -1,104 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STATEFUL_TYPED_ID_HPP -#define SPROUT_STATEFUL_TYPED_ID_HPP - -#include -#include -#include - -namespace sprout { -#ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR - - namespace typed_id_detail { - template - struct typed { -#if defined(__GNUC__) && !defined(__clang__) -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wnon-template-friend" -#endif -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wundefined-inline" -#endif - template - struct tag { - friend SPROUT_CONSTEXPR int adl_counter(tag); - }; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -#if defined(__GNUC__) && !defined(__clang__) -# pragma GCC diagnostic pop -#endif - - template - struct state - : public sprout::integral_constant - { - friend SPROUT_CONSTEXPR int adl_counter(tag) { - return N; - } - }; - - template())> - static SPROUT_CONSTEXPR bool check(int, tag) { - return true; - } - template - static SPROUT_CONSTEXPR bool check(long, tag) { - return false; - } - template - static SPROUT_CONSTEXPR bool check(bool R = check(0, tag())) { - return R; - } - - template - static SPROUT_CONSTEXPR int counter(sprout::false_type, tag) { - return 0; - } - template - static SPROUT_CONSTEXPR int counter( - sprout::true_type, tag, - int R = !check() ? N - : counter(sprout::bool_constant()>(), tag()) - ) - { - return R; - } - template - static SPROUT_CONSTEXPR int counter(int R = counter(sprout::true_type(), tag())) { - return R; - } - - template - static SPROUT_CONSTEXPR int id(int R = state::value) { - return R; - } - }; - - template - struct depends_on - : public sprout::identity - {}; - } // namespace typed_id_detail - // - // typed_id - // - template - struct typed_id - : public sprout::integral_constant< - int, sprout::typed_id_detail::typed::type>::id() - > - {}; - -#endif -} // namespace sprout - -#endif // #ifndef SPROUT_STATEFUL_TYPED_ID_HPP diff --git a/dsp/lib/sprout/sprout/stateful/typed_rand.hpp b/dsp/lib/sprout/sprout/stateful/typed_rand.hpp deleted file mode 100644 index 0717513..0000000 --- a/dsp/lib/sprout/sprout/stateful/typed_rand.hpp +++ /dev/null @@ -1,213 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STATEFUL_TYPED_RAND_HPP -#define SPROUT_STATEFUL_TYPED_RAND_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { -#ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR - - namespace typed_rand_detail { - template - struct typed { -#if defined(__GNUC__) && !defined(__clang__) -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wnon-template-friend" -#endif -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wundefined-inline" -#endif - template - struct tag { - friend SPROUT_CONSTEXPR int adl_counter(tag); - friend SPROUT_CONSTEXPR bool adl_is_srand(tag); - friend SPROUT_CONSTEXPR unsigned adl_seed(tag); - }; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -#if defined(__GNUC__) && !defined(__clang__) -# pragma GCC diagnostic pop -#endif - - template - struct state { - friend SPROUT_CONSTEXPR int adl_counter(tag) { - return N; - } - friend SPROUT_CONSTEXPR bool adl_is_srand(tag) { - return IsSrand; - } - friend SPROUT_CONSTEXPR unsigned adl_seed(tag) { - return Seed; - } - // generate a next random number - SPROUT_STATIC_CONSTEXPR sprout::detail::rand_result_type result - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(( - !IsSrand - ? state< - N - 1, - adl_is_srand(tag()), - adl_seed(tag()) - >::result() - : sprout::detail::rand_result_type( - Seed, - sprout::detail::rand_generator_type(Seed), - sprout::detail::rand_distribution_type(0, RAND_MAX) - ) - )) - ; - SPROUT_STATIC_CONSTEXPR int value = result; - }; - template - struct state<0, IsSrand, Seed> { - friend SPROUT_CONSTEXPR int adl_counter(tag<0>) { - return 0; - } - friend SPROUT_CONSTEXPR bool adl_is_srand(tag<0>) { - return IsSrand; - } - friend SPROUT_CONSTEXPR unsigned adl_seed(tag<0>) { - return Seed; - } - // generate a first random number between [0, RAND_MAX] - SPROUT_STATIC_CONSTEXPR sprout::detail::rand_result_type result - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(( - !IsSrand - ? sprout::detail::rand_distribution_type(0, RAND_MAX) - (sprout::as_const(sprout::detail::rand_generator_type(!IsSrand ? sprout::detail::rand_default_seed : Seed))) - : sprout::detail::rand_result_type( - Seed, - sprout::detail::rand_generator_type(Seed), - sprout::detail::rand_distribution_type(0, RAND_MAX) - ) - )) - ; - static SPROUT_CONSTEXPR int value = result; - }; - - template())> - static SPROUT_CONSTEXPR bool check(int, tag) { - return true; - } - template - static SPROUT_CONSTEXPR bool check(long, tag) { - return false; - } - template - static SPROUT_CONSTEXPR bool check(bool R = check(0, tag())) { - return R; - } - - template - static SPROUT_CONSTEXPR int counter(sprout::false_type, tag) { - return 0; - } - template - static SPROUT_CONSTEXPR int counter( - sprout::true_type, tag, - int R = !check() ? N - : counter(sprout::bool_constant()>(), tag()) - ) - { - return R; - } - template - static SPROUT_CONSTEXPR int counter(int R = counter(sprout::true_type(), tag())) { - return R; - } - }; - template - template - SPROUT_CONSTEXPR_OR_CONST sprout::detail::rand_result_type sprout::typed_rand_detail::typed::state::result - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(( - !IsSrand - ? state< - N - 1, - adl_is_srand(tag()), - adl_seed(tag()) - >::result() - : sprout::detail::rand_result_type( - 0, - sprout::detail::rand_generator_type(Seed), - sprout::detail::rand_distribution_type(0, RAND_MAX) - ) - )) - ; - template - template - SPROUT_CONSTEXPR_OR_CONST int sprout::typed_rand_detail::typed::state::value; - - template - template - SPROUT_CONSTEXPR_OR_CONST sprout::detail::rand_result_type sprout::typed_rand_detail::typed::state<0, IsSrand, Seed>::result - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER( - !IsSrand - ? sprout::detail::rand_distribution_type(0, RAND_MAX) - (sprout::as_const(sprout::detail::rand_generator_type(!IsSrand ? sprout::detail::rand_default_seed : Seed))) - : sprout::detail::rand_result_type( - Seed, - sprout::detail::rand_generator_type(Seed), - sprout::detail::rand_distribution_type(0, RAND_MAX) - ) - ) - ; - template - template - SPROUT_CONSTEXPR_OR_CONST int sprout::typed_rand_detail::typed::state<0, IsSrand, Seed>::value; - } // namespace typed_rand_detail - // - // rand - // - template< - typename T, - int N = 1, - int R = sprout::typed_rand_detail::typed::template state< - sprout::typed_rand_detail::typed::counter(sprout::true_type(), typename sprout::typed_rand_detail::typed::template tag()) + N - 1 - >::value - > - inline SPROUT_CONSTEXPR int rand() { - return R; - } - - // - // srand - // srand_return - // - template< - typename T, unsigned Seed, - int N = 1, - int = sprout::typed_rand_detail::typed::template state< - sprout::typed_rand_detail::typed::counter(sprout::true_type(), typename sprout::typed_rand_detail::typed::template tag()) + N - 1, - true, Seed - >::value - > - inline SPROUT_CXX14_CONSTEXPR void srand() {} - template< - typename T, unsigned Seed, - int N = 1, - int R = sprout::typed_rand_detail::typed::template state< - sprout::typed_rand_detail::typed::counter(sprout::true_type(), typename sprout::typed_rand_detail::typed::template tag()) + N - 1, - true, Seed - >::value - > - inline SPROUT_CONSTEXPR unsigned srand_return() { - return R; - } - -#endif -} // namespace sprout - -#endif // #ifndef SPROUT_STATEFUL_TYPED_RAND_HPP diff --git a/dsp/lib/sprout/sprout/stateful/typed_slot.hpp b/dsp/lib/sprout/sprout/stateful/typed_slot.hpp deleted file mode 100644 index 86aa57b..0000000 --- a/dsp/lib/sprout/sprout/stateful/typed_slot.hpp +++ /dev/null @@ -1,143 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STATEFUL_TYPED_SLOT_HPP -#define SPROUT_STATEFUL_TYPED_SLOT_HPP - -#include -#include -#include - -namespace sprout { -#ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR - - namespace typed_slot_detail { - template - struct typed { -#if defined(__GNUC__) && !defined(__clang__) -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wnon-template-friend" -#endif -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wundefined-inline" -#endif - template - struct tag { - friend SPROUT_CONSTEXPR int adl_counter(tag); - friend SPROUT_CONSTEXPR std::intmax_t adl_value(tag); - }; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -#if defined(__GNUC__) && !defined(__clang__) -# pragma GCC diagnostic pop -#endif - - template - struct state - : public sprout::integral_constant - { - friend SPROUT_CONSTEXPR int adl_counter(tag) { - return N; - } - friend SPROUT_CONSTEXPR std::intmax_t adl_value(tag) { - return Value; - } - }; - - template())> - static SPROUT_CONSTEXPR bool check(int, tag) { - return true; - } - template - static SPROUT_CONSTEXPR bool check(long, tag) { - return false; - } - template - static SPROUT_CONSTEXPR bool check(bool R = check(0, tag())) { - return R; - } - - template - static SPROUT_CONSTEXPR int counter(sprout::false_type, tag) { - return 0; - } - template - static SPROUT_CONSTEXPR int counter( - sprout::true_type, tag, - int R = !check() ? N - : counter(sprout::bool_constant()>(), tag()) - ) - { - return R; - } - template - static SPROUT_CONSTEXPR int counter(int R = counter(sprout::true_type(), tag())) { - return R; - } - - template - static SPROUT_CONSTEXPR std::intmax_t val(sprout::false_type, tag) { - return 0; - } - template - static SPROUT_CONSTEXPR std::intmax_t val( - sprout::true_type, tag, - std::intmax_t R = !check() ? adl_value(tag()) - : val(sprout::bool_constant()>(), tag()) - ) - { - return R; - } - template - static SPROUT_CONSTEXPR std::intmax_t val(std::intmax_t R = val(sprout::true_type(), tag())) { - return R; - } - }; - } // namespace typed_slot_detail - // - // slot - // - template< - typename T, - int N = 1, - std::intmax_t R = sprout::typed_slot_detail::typed::val(sprout::true_type(), typename sprout::typed_slot_detail::typed::template tag()) - > - inline SPROUT_CONSTEXPR std::intmax_t slot() { - return R; - } - - // - // assign_slot - // assign_slot_return - // - template< - typename T, std::intmax_t Value, - int N = 1, - std::intmax_t = sprout::typed_slot_detail::typed::template state< - sprout::typed_slot_detail::typed::counter(sprout::true_type(), typename sprout::typed_slot_detail::typed::template tag()) + N - 1, - Value - >::value - > - inline SPROUT_CXX14_CONSTEXPR void assign_slot() {} - template< - typename T, std::intmax_t Value, - int N = 1, - std::intmax_t R = sprout::typed_slot_detail::typed::template state< - sprout::typed_slot_detail::typed::counter(sprout::true_type(), typename sprout::typed_slot_detail::typed::template tag()) + N - 1, - Value - >::value - > - inline SPROUT_CONSTEXPR std::intmax_t assign_slot_return() { - return R; - } - -#endif -} // namespace sprout - -#endif // #ifndef SPROUT_STATEFUL_TYPED_SLOT_HPP diff --git a/dsp/lib/sprout/sprout/static_assert.hpp b/dsp/lib/sprout/sprout/static_assert.hpp deleted file mode 100644 index 678112b..0000000 --- a/dsp/lib/sprout/sprout/static_assert.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STATIC_ASSERT_HPP -#define SPROUT_STATIC_ASSERT_HPP - -#include -#include -#include -#include -#include - -// -// SPROUT_STATIC_ASSERT_MSG -// -#define SPROUT_STATIC_ASSERT_MSG(COND, MESSAGE) \ - static_assert(COND, MESSAGE) - -// -// SPROUT_STATIC_ASSERT -// -#define SPROUT_STATIC_ASSERT_1(COND) \ - SPROUT_STATIC_ASSERT_MSG(COND, #COND) -#if SPROUT_PP_VARIADICS -# define SPROUT_STATIC_ASSERT_2(COND, MESSAGE) \ - SPROUT_STATIC_ASSERT_MSG(COND, MESSAGE) -# define SPROUT_STATIC_ASSERT(...) \ - SPROUT_PP_CAT(SPROUT_STATIC_ASSERT_, SPROUT_PP_VARIADIC_SIZE(__VA_ARGS__))(__VA_ARGS__) -#else -# define SPROUT_STATIC_ASSERT(COND) \ - SPROUT_STATIC_ASSERT_1(COND) -#endif - -// -// SPROUT_STATIC_ASSERT_PREPROCESSED -// -#define SPROUT_STATIC_ASSERT_PREPROCESSED(COND) \ - SPROUT_STATIC_ASSERT_MSG(COND, #COND " \n[[preprocessed]] " SPROUT_PP_STRINGIZE(COND)) - -#endif // #ifndef SPROUT_STATIC_ASSERT_HPP diff --git a/dsp/lib/sprout/sprout/static_warning.hpp b/dsp/lib/sprout/sprout/static_warning.hpp deleted file mode 100644 index e0106cd..0000000 --- a/dsp/lib/sprout/sprout/static_warning.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STATIC_WARNING_HPP -#define SPROUT_STATIC_WARNING_HPP - -#include - -namespace sprout { - // - // static_warning - // - template - struct static_warning; - template<> - struct static_warning { - template - static void warn() {} - }; - template<> - struct static_warning { - template - static void warn() { - Message static_warning_failed; - } - }; -} // namespace sprout - -// -// SPROUT_STATIC_WARNING -// -#define SPROUT_STATIC_WARNING_IMPL_2(COND, MSG, LINE) \ - struct sprout_static_warning_line_ ## LINE { \ - struct MSG {}; \ - sprout_static_warning_line_ ## LINE() { \ - ::sprout::static_warning<(COND)>:: \ - warn(); \ - } \ - } -#define SPROUT_STATIC_WARNING_IMPL(COND, MSG) \ - SPROUT_STATIC_WARNING_IMPL_2(COND, MSG, __LINE__) -#define SPROUT_STATIC_WARNING(COND) \ - SPROUT_STATIC_WARNING_IMPL(COND, static_warning_failed) - -#endif // #ifndef SPROUT_STATIC_WARNING_HPP diff --git a/dsp/lib/sprout/sprout/string.hpp b/dsp/lib/sprout/sprout/string.hpp deleted file mode 100644 index b06c558..0000000 --- a/dsp/lib/sprout/sprout/string.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STRING_HPP -#define SPROUT_STRING_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_STRING_HPP diff --git a/dsp/lib/sprout/sprout/string/alias.hpp b/dsp/lib/sprout/sprout/string/alias.hpp deleted file mode 100644 index e52b8b7..0000000 --- a/dsp/lib/sprout/sprout/string/alias.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STRING_ALIAS_HPP -#define SPROUT_STRING_ALIAS_HPP - -#include -#if SPROUT_USE_TEMPLATE_ALIASES -# include -# include -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - -namespace sprout { -#if SPROUT_USE_TEMPLATE_ALIASES - // - // string - // wstring - // u16string - // u32string - // - template - using string = sprout::basic_string; - template - using wstring = sprout::basic_string; -#if SPROUT_USE_UNICODE_LITERALS - template - using u16string = sprout::basic_string; - template - using u32string = sprout::basic_string; -#endif -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_STRING_ALIAS_HPP diff --git a/dsp/lib/sprout/sprout/string/char_traits.hpp b/dsp/lib/sprout/sprout/string/char_traits.hpp deleted file mode 100644 index 55f5faf..0000000 --- a/dsp/lib/sprout/sprout/string/char_traits.hpp +++ /dev/null @@ -1,266 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STRING_CHAR_TRAITS_HPP -#define SPROUT_STRING_CHAR_TRAITS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - class char_traits_eq { - public: - typedef Traits traits_type; - typedef typename traits_type::char_type char_type; - typedef bool result_type; - typedef char_type first_argument_type; - typedef char_type second_argument_type; - public: - SPROUT_CONSTEXPR bool operator()(char_type c1, char_type c2) const SPROUT_NOEXCEPT { - return traits_type::eq(c1, c2); - } - }; - - template - class char_traits_lt { - public: - typedef Traits traits_type; - typedef typename traits_type::char_type char_type; - typedef bool result_type; - typedef char_type first_argument_type; - typedef char_type second_argument_type; - public: - SPROUT_CONSTEXPR bool operator()(char_type c1, char_type c2) const SPROUT_NOEXCEPT { - return traits_type::lt(c1, c2); - } - }; - } // namespace detail - - // - // char_traits - // - template - class char_traits { - private: - typedef std::char_traits impl_type; - public: - typedef typename impl_type::char_type char_type; - typedef typename impl_type::int_type int_type; - typedef typename impl_type::off_type off_type; - typedef typename impl_type::pos_type pos_type; - typedef typename impl_type::state_type state_type; - private: - static SPROUT_CONSTEXPR char_type const* find_impl(char_type const* found, char_type const* last) { - return found == last ? nullptr - : found - ; - } - public: - static SPROUT_CXX14_CONSTEXPR void assign(char_type& c1, char_type const& c2) SPROUT_NOEXCEPT { - c1 = c2; - } -#ifdef SPROUT_NO_CXX11_CHAR_TRAITS - static SPROUT_CONSTEXPR bool eq(char_type c1, char_type c2) SPROUT_NOEXCEPT { - return c1 == c2; - } - static SPROUT_CONSTEXPR bool lt(char_type c1, char_type c2) SPROUT_NOEXCEPT { - return c1 < c2; - } -#else - static SPROUT_CONSTEXPR bool eq(char_type c1, char_type c2) SPROUT_NOEXCEPT { - return impl_type::eq(c1, c2); - } - static SPROUT_CONSTEXPR bool lt(char_type c1, char_type c2) SPROUT_NOEXCEPT { - return impl_type::lt(c1, c2); - } -#endif - static SPROUT_CONSTEXPR int compare(char_type const* s1, char_type const* s2, std::size_t n) { - return sprout::tristate_lexicographical_compare( - sprout::ptr_index(s1), sprout::ptr_index(s1, n), char_type(), - sprout::ptr_index(s2), sprout::ptr_index(s2, n), char_type(), - sprout::detail::char_traits_lt() - ); - } - static SPROUT_CONSTEXPR std::size_t length(char_type const* s) { - return sprout::strlen(s); - } - static SPROUT_CONSTEXPR char_type const* find(char_type const* s, std::size_t n, char_type const& a) { - return find_impl( - sprout::ptr_unindex( - sprout::find_if( - sprout::ptr_index(s), sprout::ptr_index(s, n), - sprout::bind2nd(sprout::detail::char_traits_eq(), a) - ) - ), - s + n - ); - } - static SPROUT_CXX14_CONSTEXPR char_type* move(char_type* s1, char_type const* s2, std::size_t n) { - sprout::copy_backward(s2, s2 + n, sprout::next(s1, n)); - return s1; - } - static SPROUT_CXX14_CONSTEXPR char_type* copy(char_type* s1, char_type const* s2, std::size_t n) { - sprout::copy(s2, s2 + n, s1); - return s1; - } - static SPROUT_CXX14_CONSTEXPR char_type* assign(char_type* s, std::size_t n, char_type a) { - sprout::fill(s, s + n, a); - return s; - } -#ifdef SPROUT_NO_CXX11_CHAR_TRAITS - static SPROUT_CONSTEXPR int_type not_eof(int_type c) SPROUT_NOEXCEPT { - return eq_int_type(c, eof()) ? int_type() - : c - ; - } - static SPROUT_CONSTEXPR char_type to_char_type(int_type c) SPROUT_NOEXCEPT { - return static_cast(c); - } - static SPROUT_CONSTEXPR int_type to_int_type(char_type c) SPROUT_NOEXCEPT { - return static_cast(c); - } - static SPROUT_CONSTEXPR bool eq_int_type(int_type c1, int_type c2) SPROUT_NOEXCEPT { - return c1 == c2; - } - static SPROUT_CONSTEXPR int_type eof() SPROUT_NOEXCEPT { - return static_cast(EOF); - } -#else - static SPROUT_CONSTEXPR int_type not_eof(int_type c) SPROUT_NOEXCEPT { - return impl_type::not_eof(c); - } - static SPROUT_CONSTEXPR char_type to_char_type(int_type c) SPROUT_NOEXCEPT { - return impl_type::to_char_type(c); - } - static SPROUT_CONSTEXPR int_type to_int_type(char_type c) SPROUT_NOEXCEPT { - return impl_type::to_int_type(c); - } - static SPROUT_CONSTEXPR bool eq_int_type(int_type c1, int_type c2) SPROUT_NOEXCEPT { - return impl_type::eq_int_type(c1, c2); - } - static SPROUT_CONSTEXPR int_type eof() SPROUT_NOEXCEPT { - return impl_type::eof(); - } -#endif -#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION - template - static SPROUT_CONSTEXPR int compare(char_type const* s1, ForwardIterator s2, std::size_t n) { - return sprout::tristate_lexicographical_compare( - sprout::ptr_index(s1), sprout::ptr_index(s1, n), char_type(), - s2, sprout::next(s2, n), char_type(), - sprout::detail::char_traits_lt() - ); - } - template - static SPROUT_CONSTEXPR int compare(ForwardIterator s1, char_type const* s2, std::size_t n) { - return sprout::tristate_lexicographical_compare( - s1, sprout::next(s1, n), char_type(), - sprout::ptr_index(s2), sprout::ptr_index(s2, n), char_type(), - sprout::detail::char_traits_lt() - ); - } - template - static SPROUT_CONSTEXPR int compare(ForwardIterator1 s1, ForwardIterator2 s2, std::size_t n) { - return sprout::tristate_lexicographical_compare( - s1, sprout::next(s1, n), char_type(), - s2, sprout::next(s2, n), char_type(), - sprout::detail::char_traits_lt() - ); - } - template - static SPROUT_CONSTEXPR std::size_t length(InputIterator s) { - return sprout::detail::strlen(s); - } - template - static SPROUT_CONSTEXPR ForwardIterator find(ForwardIterator s, std::size_t n, char_type const& a) { - return sprout::ptr_unindex( - sprout::find_if( - s, sprout::next(s, n), - sprout::bind2nd(sprout::detail::char_traits_eq(), a) - ) - ); - } - template - static SPROUT_CXX14_CONSTEXPR BidirectionalIterator1 move(BidirectionalIterator1 s1, BidirectionalIterator2 s2, std::size_t n) { - sprout::copy_backward(s2, sprout::next(s2, n), sprout::next(s1, n)); - return s1; - } - template - static SPROUT_CXX14_CONSTEXPR OutputIterator copy(OutputIterator s1, BidirectionalIterator s2, std::size_t n) { - sprout::copy(s2, sprout::next(s2, n), s1); - return s1; - } - template - static SPROUT_CXX14_CONSTEXPR ForwardIterator assign(ForwardIterator s, std::size_t n, char_type a) { - sprout::fill(s, sprout::next(s, n), a); - return s; - } -#endif - }; - - // - // char_traits_helper - // - template - class char_traits_helper { - public: - typedef Traits traits_type; - typedef typename traits_type::char_type char_type; - typedef typename traits_type::int_type int_type; - typedef typename traits_type::off_type off_type; - typedef typename traits_type::pos_type pos_type; - typedef typename traits_type::state_type state_type; - public: - static SPROUT_CONSTEXPR std::size_t length(char_type const* s, std::size_t n) { - return sprout::strlen(s, n); - } - static SPROUT_CONSTEXPR char_type const* find(char_type const* s, std::size_t n, char_type const& a) { - return sprout::ptr_unindex( - sprout::find_if( - sprout::ptr_index(s), sprout::ptr_index(s, n), - sprout::bind2nd(sprout::detail::char_traits_eq(), a) - ) - ); - } - static SPROUT_CONSTEXPR bool is_found(char_type const* found, char_type const* last) { - return found != last; - } -#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION - template - static SPROUT_CONSTEXPR std::size_t length(InputIterator s, std::size_t n) { - return sprout::detail::strlen(s, n); - } - template - static SPROUT_CONSTEXPR ForwardIterator find(ForwardIterator s, std::size_t n, char_type const& a) { - return sprout::find_if( - s, sprout::next(s, n), - sprout::bind2nd(sprout::detail::char_traits_eq(), a) - ); - } - template - static SPROUT_CONSTEXPR bool is_found(InputIterator found, InputIterator last) { - return found != last; - } -#endif - }; -} // namespace sprout - -#endif // #ifndef SPROUT_STRING_CHAR_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/string/comparison.hpp b/dsp/lib/sprout/sprout/string/comparison.hpp deleted file mode 100644 index b460d8b..0000000 --- a/dsp/lib/sprout/sprout/string/comparison.hpp +++ /dev/null @@ -1,116 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STRING_COMPARISON_HPP -#define SPROUT_STRING_COMPARISON_HPP - -#include -#include -#include - -namespace sprout { - // - // operator== - // operator!= - // operator< - // operator> - // operator<= - // operator>= - // - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::basic_string const& lhs, sprout::basic_string const& rhs) { - return lhs.compare(rhs) == 0; - } - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::basic_string const& lhs, T const* rhs) { - return lhs.compare(rhs) == 0; - } - template - inline SPROUT_CONSTEXPR bool - operator==(T const* lhs, sprout::basic_string const& rhs) { - return 0 == rhs.compare(lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::basic_string const& lhs, sprout::basic_string const& rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::basic_string const& lhs, T const* rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(T const* lhs, sprout::basic_string const& rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator<(sprout::basic_string const& lhs, sprout::basic_string const& rhs) { - return lhs.compare(rhs) < 0; - } - template - inline SPROUT_CONSTEXPR bool - operator<(sprout::basic_string const& lhs, T const* rhs) { - return lhs.compare(rhs) < 0; - } - template - inline SPROUT_CONSTEXPR bool - operator<(T const* lhs, sprout::basic_string const& rhs) { - return 0 < rhs.compare(lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>(sprout::basic_string const& lhs, sprout::basic_string const& rhs) { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator>(sprout::basic_string const& lhs, T const* rhs) { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator>(T const* lhs, sprout::basic_string const& rhs) { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator<=(sprout::basic_string const& lhs, sprout::basic_string const& rhs) { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator<=(sprout::basic_string const& lhs, T const* rhs) { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator<=(T const* lhs, sprout::basic_string const& rhs) { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(sprout::basic_string const& lhs, sprout::basic_string const& rhs) { - return !(lhs < rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(sprout::basic_string const& lhs, T const* rhs) { - return !(lhs < rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(T const* lhs, sprout::basic_string const& rhs) { - return !(lhs < rhs); - } -} // namespace sprout - -#endif // #ifndef SPROUT_STRING_COMPARISON_HPP diff --git a/dsp/lib/sprout/sprout/string/concat.hpp b/dsp/lib/sprout/sprout/string/concat.hpp deleted file mode 100644 index a17a284..0000000 --- a/dsp/lib/sprout/sprout/string/concat.hpp +++ /dev/null @@ -1,159 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STRING_CONCAT_HPP -#define SPROUT_STRING_CONCAT_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::basic_string - string_concat( - sprout::basic_string const& lhs, std::size_t lsize, - T const& rhs, - sprout::index_tuple - ) - { - typedef sprout::detail::string_construct_access access_type; - return access_type::raw_construct( - lsize + 1, - (Indexes < lsize ? lhs[Indexes] - : Indexes < lsize + 1 ? rhs - : T() - )... - ); - } - template - inline SPROUT_CONSTEXPR sprout::basic_string - string_concat( - T const& lhs, - sprout::basic_string const& rhs, std::size_t rsize, - sprout::index_tuple - ) - { - typedef sprout::detail::string_construct_access access_type; - return access_type::raw_construct( - 1 + rsize, - (Indexes < 1 ? lhs - : Indexes < 1 + rsize ? rhs[Indexes - 1] - : T() - )... - ); - } - template - inline SPROUT_CONSTEXPR sprout::basic_string - string_concat( - sprout::basic_string const& lhs, std::size_t lsize, - T const (& rhs)[M], std::size_t rsize, - sprout::index_tuple - ) - { - typedef sprout::detail::string_construct_access access_type; - return access_type::raw_construct( - lsize + rsize, - (Indexes < lsize ? lhs[Indexes] - : Indexes < lsize + rsize ? rhs[Indexes - lsize] - : T() - )... - ); - } - template - inline SPROUT_CONSTEXPR sprout::basic_string - string_concat( - T const (& lhs)[M], std::size_t lsize, - sprout::basic_string const& rhs, std::size_t rsize, - sprout::index_tuple - ) - { - typedef sprout::detail::string_construct_access access_type; - return access_type::raw_construct( - lsize + rsize, - (Indexes < lsize ? *(lhs + Indexes) - : Indexes < lsize + rsize ? rhs[Indexes - lsize] - : T() - )... - ); - } - template - inline SPROUT_CONSTEXPR sprout::basic_string - string_concat( - sprout::basic_string const& lhs, std::size_t lsize, - sprout::basic_string const& rhs, std::size_t rsize, - sprout::index_tuple - ) - { - typedef sprout::detail::string_construct_access access_type; - return access_type::raw_construct( - lsize + rsize, - (Indexes < lsize ? lhs[Indexes] - : Indexes < lsize + rsize ? rhs[Indexes - lsize] - : T() - )... - ); - } - } // namespace detail - - // - // operator+ - // - template - inline SPROUT_CONSTEXPR sprout::basic_string - operator+(sprout::basic_string const& lhs, T const& rhs) { - return sprout::detail::string_concat( - lhs, lhs.size(), - rhs, - sprout::make_index_tuple::make() - ); - } - template - inline SPROUT_CONSTEXPR sprout::basic_string - operator+(T const& lhs, sprout::basic_string const& rhs) { - return sprout::detail::string_concat( - lhs, - rhs, rhs.size(), - sprout::make_index_tuple<1 + N>::make() - ); - } - template - inline SPROUT_CONSTEXPR sprout::basic_string - operator+(sprout::basic_string const& lhs, T const (& rhs)[M]) { - typedef sprout::char_traits_helper traits_type; - return sprout::detail::string_concat( - lhs, lhs.size(), - rhs, traits_type::length(rhs, M - 1), - sprout::make_index_tuple::make() - ); - } - template - inline SPROUT_CONSTEXPR sprout::basic_string - operator+(T const (& lhs)[M], sprout::basic_string const& rhs) { - typedef sprout::char_traits_helper traits_type; - return sprout::detail::string_concat( - lhs, traits_type::length(lhs, M - 1), - rhs, rhs.size(), - sprout::make_index_tuple<(M - 1) + N>::make() - ); - } - template - inline SPROUT_CONSTEXPR sprout::basic_string - operator+(sprout::basic_string const& lhs, sprout::basic_string const& rhs) { - return sprout::detail::string_concat( - lhs, lhs.size(), - rhs, rhs.size(), - sprout::make_index_tuple::make() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_STRING_CONCAT_HPP diff --git a/dsp/lib/sprout/sprout/string/container.hpp b/dsp/lib/sprout/sprout/string/container.hpp deleted file mode 100644 index e1e4986..0000000 --- a/dsp/lib/sprout/sprout/string/container.hpp +++ /dev/null @@ -1,63 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STRING_CONTAINER_HPP -#define SPROUT_STRING_CONTAINER_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // container_construct_traits - // - template - struct container_construct_traits > { - public: - typedef sprout::basic_string copied_type; - public: - template - static SPROUT_CONSTEXPR copied_type - deep_copy(Cont&& cont) { - return SPROUT_FORWARD(Cont, cont); - } - template - static SPROUT_CONSTEXPR copied_type - make(Args&&... args) { - typedef sprout::detail::make_construct_impl impl_type; - return impl_type::make(SPROUT_FORWARD(Args, args)...); - } - template - static SPROUT_CONSTEXPR copied_type - remake(Cont&&, typename sprout::container_traits >::difference_type size, Args&&... args) { - typedef sprout::detail::make_construct_impl impl_type; - return impl_type::sized_make(static_cast(size), SPROUT_FORWARD(Args, args)...); - } - }; - - // - // container_transform_traits - // - template - struct container_transform_traits > { - public: - template >::size_type Size> - struct rebind_size { - public: - typedef sprout::basic_string type; - }; - template - struct rebind_type { - public: - typedef sprout::basic_string type; - }; - }; -} // namespace sprout - -#endif // #ifndef SPROUT_STRING_CONTAINER_HPP diff --git a/dsp/lib/sprout/sprout/string/conversion.hpp b/dsp/lib/sprout/sprout/string/conversion.hpp deleted file mode 100644 index 76fb1bc..0000000 --- a/dsp/lib/sprout/sprout/string/conversion.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STRING_CONVERSION_HPP -#define SPROUT_STRING_CONVERSION_HPP - -#include -#include - -#endif // #ifndef SPROUT_STRING_CONVERSION_HPP diff --git a/dsp/lib/sprout/sprout/string/detail/compare.hpp b/dsp/lib/sprout/sprout/string/detail/compare.hpp deleted file mode 100644 index 603e586..0000000 --- a/dsp/lib/sprout/sprout/string/detail/compare.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STRING_DETAIL_COMPARE_HPP -#define SPROUT_STRING_DETAIL_COMPARE_HPP - -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace string_detail { - template - static SPROUT_CONSTEXPR int - compare_impl_1( - int compared, typename String::size_type n1, typename String::size_type n2 - ) - { - return compared != 0 ? compared - : n1 < n2 ? -1 - : n2 < n1 ? 1 - : 0 - ; - } - template - static SPROUT_CONSTEXPR int - compare_impl( - typename String::const_iterator data, typename String::size_type pos1, typename String::size_type n1, - ConstIterator s, typename String::size_type n2 - ) - { - return sprout::string_detail::compare_impl_1( - String::traits_type::compare(data + pos1, s, NS_SSCRISK_CEL_OR_SPROUT::min(n1, n2)), - n1, n2 - ); - } - } // namespace string_detail -} // namespace sprout - -#endif // #ifndef SPROUT_STRING_DETAIL_COMPARE_HPP diff --git a/dsp/lib/sprout/sprout/string/detail/find.hpp b/dsp/lib/sprout/sprout/string/detail/find.hpp deleted file mode 100644 index 5f0ba4c..0000000 --- a/dsp/lib/sprout/sprout/string/detail/find.hpp +++ /dev/null @@ -1,238 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STRING_DETAIL_FIND_HPP -#define SPROUT_STRING_DETAIL_FIND_HPP - -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace string_detail { - template - static SPROUT_CONSTEXPR typename String::size_type - find_impl_1( - typename String::const_iterator data, typename String::size_type len, - ConstIterator s, typename String::size_type pos, typename String::size_type n - ) - { - return pos <= len - n - ? String::traits_type::eq(data[pos], *s) && String::traits_type::compare(data + (pos + 1), s + 1, n - 1) == 0 - ? pos - : sprout::string_detail::find_impl_1(data, len, s, pos + 1, n) - : String::npos - ; - } - template - static SPROUT_CONSTEXPR typename String::size_type - find_impl( - typename String::const_iterator data, typename String::size_type len, - ConstIterator s, typename String::size_type pos, typename String::size_type n - ) - { - return n == 0 ? (pos <= len ? pos : String::npos) - : n <= len ? sprout::string_detail::find_impl_1(data, len, s, pos, n) - : String::npos - ; - } - template - static SPROUT_CONSTEXPR typename String::size_type - find_c_impl_1( - typename String::const_iterator data, typename String::size_type len, - typename String::const_iterator p - ) - { - return sprout::char_traits_helper::is_found(p, data + len) ? p - data - : String::npos - ; - } - template - static SPROUT_CONSTEXPR typename String::size_type - find_c_impl( - typename String::const_iterator data, typename String::size_type len, - typename String::value_type c, typename String::size_type pos - ) - { - return pos < len ? sprout::string_detail::find_c_impl_1( - data, len, sprout::char_traits_helper::find(data + pos, len - pos, c) - ) - : String::npos - ; - } - template - static SPROUT_CONSTEXPR typename String::size_type - rfind_impl_1( - typename String::const_iterator data, typename String::size_type len, - ConstIterator s, typename String::size_type pos, typename String::size_type n - ) - { - return String::traits_type::compare(data + pos, s, n) == 0 ? pos - : pos > 0 ? sprout::string_detail::rfind_impl_1(data, len, s, pos - 1, n) - : String::npos - ; - } - template - static SPROUT_CONSTEXPR typename String::size_type - rfind_impl( - typename String::const_iterator data, typename String::size_type len, - ConstIterator s, typename String::size_type pos, typename String::size_type n - ) - { - return n <= len ? sprout::string_detail::rfind_impl_1( - data, len, s, NS_SSCRISK_CEL_OR_SPROUT::min(typename String::size_type(len - n), pos), n - ) - : String::npos - ; - } - template - static SPROUT_CONSTEXPR typename String::size_type - rfind_c_impl_1( - typename String::const_iterator data, typename String::size_type len, typename String::value_type c - ) - { - return len > 0 - ? String::traits_type::eq(data[len - 1], c) - ? len - 1 - : sprout::string_detail::rfind_c_impl_1(data, len - 1, c) - : String::npos - ; - } - - template - static SPROUT_CONSTEXPR typename String::size_type - rfind_c_impl( - typename String::const_iterator data, typename String::size_type len, - typename String::value_type c, typename String::size_type pos - ) - { - return len ? sprout::string_detail::rfind_c_impl_1(data, len - 1 > pos ? pos + 1 : len, c) - : String::npos - ; - } - template - static SPROUT_CONSTEXPR typename String::size_type - find_first_of_impl( - typename String::const_iterator data, typename String::size_type len, - ConstIterator s, typename String::size_type pos, typename String::size_type n - ) - { - return n && pos < len - ? sprout::char_traits_helper::is_found( - sprout::char_traits_helper::find(s, n, data[pos]), s + n - ) - ? pos - : sprout::string_detail::find_first_of_impl(data, len, s, pos + 1, n) - : String::npos - ; - } - template - static SPROUT_CONSTEXPR typename String::size_type - find_last_of_impl_1( - typename String::const_iterator data, typename String::size_type len, - ConstIterator s, typename String::size_type pos, typename String::size_type n - ) - { - return sprout::char_traits_helper::is_found( - sprout::char_traits_helper::find(s, n, data[len]), s + n - ) ? len - : len ? sprout::string_detail::find_last_of_impl_1(data, len - 1, s, pos, n) - : String::npos - ; - } - template - static SPROUT_CONSTEXPR typename String::size_type - find_last_of_impl( - typename String::const_iterator data, typename String::size_type len, - ConstIterator s, typename String::size_type pos, typename String::size_type n - ) - { - return len && n ? sprout::string_detail::find_last_of_impl_1(data, len - 1 > pos ? pos : len - 1, s, pos, n) - : String::npos - ; - } - template - static SPROUT_CONSTEXPR typename String::size_type - find_first_not_of_impl( - typename String::const_iterator data, typename String::size_type len, - ConstIterator s, typename String::size_type pos, typename String::size_type n - ) - { - return pos < len - ? !sprout::char_traits_helper::is_found( - sprout::char_traits_helper::find(s, n, data[pos]), s + n - ) - ? pos - : sprout::string_detail::find_first_not_of_impl(data, len, s, pos + 1, n) - : String::npos - ; - } - template - static SPROUT_CONSTEXPR typename String::size_type - find_first_not_of_c_impl( - typename String::const_iterator data, typename String::size_type len, - typename String::value_type c, typename String::size_type pos - ) - { - return pos < len ? !String::traits_type::eq(data[pos], c) - ? pos - : sprout::string_detail::find_first_not_of_c_impl(data, len, c, pos + 1) - : String::npos - ; - } - template - static SPROUT_CONSTEXPR typename String::size_type - find_last_not_of_impl_1( - typename String::const_iterator data, typename String::size_type len, - ConstIterator s, typename String::size_type pos, typename String::size_type n - ) - { - return !sprout::char_traits_helper::is_found( - sprout::char_traits_helper::find(s, n, data[len]), s + n - ) ? len - : len ? sprout::string_detail::find_last_not_of_impl_1(data, len - 1, s, pos, n) - : String::npos - ; - } - template - static SPROUT_CONSTEXPR typename String::size_type - find_last_not_of_impl( - typename String::const_iterator data, typename String::size_type len, - ConstIterator s, typename String::size_type pos, typename String::size_type n - ) - { - return len ? sprout::string_detail::find_last_not_of_impl_1(data, len - 1 > pos ? pos : len - 1, s, pos, n) - : String::npos - ; - } - template - static SPROUT_CONSTEXPR typename String::size_type - find_last_not_of_c_impl_1( - typename String::const_iterator data, typename String::size_type len, - typename String::value_type c, typename String::size_type pos - ) - { - return !String::traits_type::eq(data[len], c) ? len - : len ? sprout::string_detail::find_last_not_of_c_impl_1(data, len - 1, c, pos) - : String::npos - ; - } - template - static SPROUT_CONSTEXPR typename String::size_type - find_last_not_of_c_impl( - typename String::const_iterator data, typename String::size_type len, - typename String::value_type c, typename String::size_type pos - ) - { - return len ? sprout::string_detail::find_last_not_of_c_impl_1(data, len - 1 > pos ? pos : len - 1, c, pos) - : String::npos - ; - } - } // namespace string_detail -} // namespace sprout - -#endif // #ifndef SPROUT_STRING_DETAIL_FIND_HPP diff --git a/dsp/lib/sprout/sprout/string/detail/operations.hpp b/dsp/lib/sprout/sprout/string/detail/operations.hpp deleted file mode 100644 index 9f1a2a6..0000000 --- a/dsp/lib/sprout/sprout/string/detail/operations.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STRING_DETAIL_OPERATIONS_HPP -#define SPROUT_STRING_DETAIL_OPERATIONS_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_STRING_DETAIL_OPERATIONS_HPP diff --git a/dsp/lib/sprout/sprout/string/float_to_string.hpp b/dsp/lib/sprout/sprout/string/float_to_string.hpp deleted file mode 100644 index bdeecca..0000000 --- a/dsp/lib/sprout/sprout/string/float_to_string.hpp +++ /dev/null @@ -1,242 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STRING_FLOAT_TO_STRING_HPP -#define SPROUT_STRING_FLOAT_TO_STRING_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - namespace detail { - SPROUT_STATIC_CONSTEXPR std::size_t decimal_places_length = 6; - } // namespace detail - - // - // printed_float_digits - // - template - struct printed_float_digits - : public sprout::integral_constant< - std::size_t, - sprout::numeric_limits::max_exponent10 + sprout::detail::decimal_places_length + 2 - > - {}; - - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::basic_string::value> - float_to_string_impl(FloatType val, bool negative, int digits, int v, sprout::index_tuple) { - typedef sprout::detail::string_construct_access::value> access_type; - return negative - ? access_type::raw_construct( - static_cast(digits + 2 + sprout::detail::decimal_places_length), - SPROUT_CHAR_LITERAL('-', Elem), - (Indexes < digits ? sprout::detail::int_to_char(sprout::detail::float_digit_at(val, digits - 1 - Indexes)) - : Indexes == digits ? SPROUT_CHAR_LITERAL('.', Elem) - : Indexes < digits + 1 + sprout::detail::decimal_places_length - ? sprout::detail::int_to_char(sprout::detail::int_digit_at(v, digits + sprout::detail::decimal_places_length - Indexes)) - : Elem() - )... - ) - : access_type::raw_construct( - static_cast(digits + 1 + sprout::detail::decimal_places_length), - (Indexes < digits ? sprout::detail::int_to_char(sprout::detail::float_digit_at(val, digits - 1 - Indexes)) - : Indexes == digits ? SPROUT_CHAR_LITERAL('.', Elem) - : Indexes < digits + 1 + sprout::detail::decimal_places_length - ? sprout::detail::int_to_char(sprout::detail::int_digit_at(v, digits + sprout::detail::decimal_places_length - Indexes)) - : Elem() - )... - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::basic_string::value> - float_to_string(FloatType val, bool negative, int digits) { - return sprout::detail::float_to_string_impl( - val, negative, digits, static_cast((val - sprout::math::floor(val)) * sprout::detail::int_pow(sprout::detail::decimal_places_length)), - sprout::make_index_tuple::value - 1>::make() - ); - } - } // namespace detail - - // - // float_to_string - // - template< - typename Elem, typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR sprout::basic_string::value> - float_to_string(FloatType val) { - typedef sprout::detail::string_construct_access::value> access_type; - return sprout::math::isinf(val) ? sprout::math::signbit(val) - ? access_type::raw_construct(4, SPROUT_CHAR_LITERAL('-', Elem), SPROUT_CHAR_LITERAL('i', Elem), SPROUT_CHAR_LITERAL('n', Elem), SPROUT_CHAR_LITERAL('f', Elem)) - : access_type::raw_construct(3, SPROUT_CHAR_LITERAL('i', Elem), SPROUT_CHAR_LITERAL('n', Elem), SPROUT_CHAR_LITERAL('f', Elem)) - : sprout::math::isnan(val) ? sprout::math::signbit(val) - ? access_type::raw_construct(4, SPROUT_CHAR_LITERAL('-', Elem), SPROUT_CHAR_LITERAL('n', Elem), SPROUT_CHAR_LITERAL('a', Elem), SPROUT_CHAR_LITERAL('n', Elem)) - : access_type::raw_construct(3, SPROUT_CHAR_LITERAL('n', Elem), SPROUT_CHAR_LITERAL('a', Elem), SPROUT_CHAR_LITERAL('n', Elem)) - : sprout::detail::float_to_string( - sprout::detail::float_round_at(val < 0 ? -val : val, sprout::detail::decimal_places_length), - sprout::math::signbit(val), - sprout::detail::float_digits_checked(val) - ) - ; - } - - namespace detail { - template - struct printed_float_exponent10_digits - : public sprout::integral_constant< - std::size_t, - sprout::tpp::max_element_c::max_exponent10>::value, 2>::value - > - {}; - } // namespace detail - - // - // printed_float_exp_digits - // - template - struct printed_float_exp_digits - : public sprout::integral_constant< - std::size_t, - 5 + sprout::detail::decimal_places_length + sprout::detail::printed_float_exponent10_digits::value - > - {}; - - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::basic_string::value> - float_to_string_exp(FloatType val, bool negative, int exponent10, int e10_digits, sprout::index_tuple) { - typedef sprout::detail::string_construct_access::value> access_type; - return negative - ? access_type::raw_construct( - static_cast(5 + sprout::detail::decimal_places_length + e10_digits), - SPROUT_CHAR_LITERAL('-', Elem), - (Indexes == 0 ? sprout::detail::int_to_char(sprout::detail::float_digit_at(val, 0)) - : Indexes == 1 ? SPROUT_CHAR_LITERAL('.', Elem) - : Indexes < 2 + sprout::detail::decimal_places_length - ? sprout::detail::int_to_char(sprout::detail::float_digit_at(val, 1 - Indexes)) - : Indexes == 2 + sprout::detail::decimal_places_length ? SPROUT_CHAR_LITERAL('e', Elem) - : Indexes == 3 + sprout::detail::decimal_places_length ? (exponent10 < 0 ? SPROUT_CHAR_LITERAL('-', Elem) : SPROUT_CHAR_LITERAL('+', Elem)) - : Indexes < 4 + sprout::detail::decimal_places_length + e10_digits - ? sprout::detail::int_to_char(sprout::detail::int_digit_at(exponent10, 3 + sprout::detail::decimal_places_length + e10_digits - Indexes)) - : Elem() - )... - ) - : access_type::raw_construct( - static_cast(4 + sprout::detail::decimal_places_length + e10_digits), - (Indexes == 0 ? sprout::detail::int_to_char(sprout::detail::float_digit_at(val, 0)) - : Indexes == 1 ? SPROUT_CHAR_LITERAL('.', Elem) - : Indexes < 2 + sprout::detail::decimal_places_length - ? sprout::detail::int_to_char(sprout::detail::float_digit_at(val, 1 - Indexes)) - : Indexes == 2 + sprout::detail::decimal_places_length ? SPROUT_CHAR_LITERAL('e', Elem) - : Indexes == 3 + sprout::detail::decimal_places_length ? (exponent10 < 0 ? SPROUT_CHAR_LITERAL('-', Elem) : SPROUT_CHAR_LITERAL('+', Elem)) - : Indexes < 4 + sprout::detail::decimal_places_length + e10_digits - ? sprout::detail::int_to_char(sprout::detail::int_digit_at(exponent10, 3 + sprout::detail::decimal_places_length + e10_digits - Indexes)) - : Elem() - )... - ) - ; - } - } // namespace detail - - // - // float_to_string_exp - // - template< - typename Elem, typename FloatType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR sprout::basic_string::value> - float_to_string_exp(FloatType val) { - typedef sprout::detail::string_construct_access::value> access_type; - return sprout::math::isinf(val) ? sprout::math::signbit(val) - ? access_type::raw_construct(4, SPROUT_CHAR_LITERAL('-', Elem), SPROUT_CHAR_LITERAL('i', Elem), SPROUT_CHAR_LITERAL('n', Elem), SPROUT_CHAR_LITERAL('f', Elem)) - : access_type::raw_construct(3, SPROUT_CHAR_LITERAL('i', Elem), SPROUT_CHAR_LITERAL('n', Elem), SPROUT_CHAR_LITERAL('f', Elem)) - : sprout::math::isnan(val) ? sprout::math::signbit(val) - ? access_type::raw_construct(4, SPROUT_CHAR_LITERAL('-', Elem), SPROUT_CHAR_LITERAL('n', Elem), SPROUT_CHAR_LITERAL('a', Elem), SPROUT_CHAR_LITERAL('n', Elem)) - : access_type::raw_construct(3, SPROUT_CHAR_LITERAL('n', Elem), SPROUT_CHAR_LITERAL('a', Elem), SPROUT_CHAR_LITERAL('n', Elem)) - : sprout::detail::float_to_string_exp( - sprout::detail::float_round_at( - (val < 0 ? -val : val) / sprout::detail::float_pow10(sprout::detail::float_exponent10(val)), - sprout::detail::decimal_places_length - ), - sprout::math::signbit(val), - sprout::detail::float_exponent10(val), - NS_SSCRISK_CEL_OR_SPROUT::max(sprout::detail::int_digits(sprout::detail::float_exponent10(val)), 2), - sprout::make_index_tuple::value - 1>::make() - ) - ; - } - - // - // to_string_of - // - template::value>::type = sprout::enabler> - inline SPROUT_CONSTEXPR sprout::basic_string::value> - to_string_of(FloatType val) { - return sprout::float_to_string(val); - } - - // - // to_string - // - template::value>::type = sprout::enabler> - inline SPROUT_CONSTEXPR sprout::basic_string::value> - to_string(FloatType val) { - return sprout::to_string_of(val); - } - - // - // to_wstring - // - template::value>::type = sprout::enabler> - inline SPROUT_CONSTEXPR sprout::basic_string::value> - to_wstring(FloatType val) { - return sprout::to_string_of(val); - } - -#if SPROUT_USE_UNICODE_LITERALS - // - // to_u16string - // - template::value>::type = sprout::enabler> - inline SPROUT_CONSTEXPR sprout::basic_string::value> - to_u16string(FloatType val) { - return sprout::to_string_of(val); - } - - // - // to_u32string - // - template::value>::type = sprout::enabler> - inline SPROUT_CONSTEXPR sprout::basic_string::value> - to_u32string(FloatType val) { - return sprout::to_string_of(val); - } -#endif -} // namespace sprout - -#endif // #ifndef SPROUT_STRING_FLOAT_TO_STRING_HPP diff --git a/dsp/lib/sprout/sprout/string/from_string.hpp b/dsp/lib/sprout/sprout/string/from_string.hpp deleted file mode 100644 index a561cd7..0000000 --- a/dsp/lib/sprout/sprout/string/from_string.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STRING_FROM_STRING_HPP -#define SPROUT_STRING_FROM_STRING_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_STRING_FROM_STRING_HPP diff --git a/dsp/lib/sprout/sprout/string/hash.hpp b/dsp/lib/sprout/sprout/string/hash.hpp deleted file mode 100644 index bea9526..0000000 --- a/dsp/lib/sprout/sprout/string/hash.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STRING_HASH_HPP -#define SPROUT_STRING_HASH_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // hash_value - // - template - inline SPROUT_CONSTEXPR std::size_t - hash_value(sprout::basic_string const& v) { - return sprout::hash_range(v); - } -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // hash - // - template - struct hash > - : public sprout::hash > - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -#endif // #ifndef SPROUT_STRING_HASH_HPP diff --git a/dsp/lib/sprout/sprout/string/int_to_string.hpp b/dsp/lib/sprout/sprout/string/int_to_string.hpp deleted file mode 100644 index 7d6962f..0000000 --- a/dsp/lib/sprout/sprout/string/int_to_string.hpp +++ /dev/null @@ -1,145 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STRING_INT_TO_STRING_HPP -#define SPROUT_STRING_INT_TO_STRING_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // printed_integer_digits - // - template - struct printed_integer_digits - : public sprout::integral_constant< - std::size_t, - sprout::integer_digits::value + (sprout::is_signed::value ? 1 : 0) - > - {}; - - namespace detail { - template< - typename Elem, int Base, typename IntType, - sprout::index_t... Indexes, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR sprout::basic_string::value> - int_to_string(IntType val, int digits, sprout::index_tuple) { - typedef sprout::detail::string_construct_access::value> access_type; - return val < 0 ? access_type::raw_construct( - static_cast(digits + 1), - SPROUT_CHAR_LITERAL('-', Elem), - (Indexes < digits ? sprout::detail::int_to_char(sprout::detail::int_digit_at(val, digits - 1 - Indexes)) - : Elem() - )... - ) - : access_type::raw_construct( - static_cast(digits), - (Indexes < digits ? sprout::detail::int_to_char(sprout::detail::int_digit_at(val, digits - 1 - Indexes)) - : Elem() - )... - ) - ; - } - template< - typename Elem, int Base, typename IntType, - sprout::index_t... Indexes, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR sprout::basic_string::value> - int_to_string(IntType val, int digits, sprout::index_tuple) { - typedef sprout::detail::string_construct_access::value> access_type; - return access_type::raw_construct( - static_cast(digits), - (Indexes < digits ? sprout::detail::int_to_char(sprout::detail::int_digit_at(val, digits - 1 - Indexes)) - : Elem() - )... - ); - } - } // namespace detail - - // - // int_to_string - // - template< - typename Elem, int Base = 10, typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR sprout::basic_string::value> - int_to_string(IntType val) { - return sprout::detail::int_to_string( - val, - sprout::detail::int_digits(val), - sprout::make_index_tuple::value>::make() - ); - } - - // - // to_string_of - // - template< - typename Elem, typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR sprout::basic_string::value> - to_string_of(IntType val) { - return sprout::int_to_string(val); - } - - // - // to_string - // - template::value>::type = sprout::enabler> - inline SPROUT_CONSTEXPR sprout::basic_string::value> - to_string(IntType val) { - return sprout::to_string_of(val); - } - - // - // to_wstring - // - template::value>::type = sprout::enabler> - inline SPROUT_CONSTEXPR sprout::basic_string::value> - to_wstring(IntType val) { - return sprout::to_string_of(val); - } - -#if SPROUT_USE_UNICODE_LITERALS - // - // to_u16string - // - template::value>::type = sprout::enabler> - inline SPROUT_CONSTEXPR sprout::basic_string::value> - to_u16string(IntType val) { - return sprout::to_string_of(val); - } - - // - // to_u32string - // - template::value>::type = sprout::enabler> - inline SPROUT_CONSTEXPR sprout::basic_string::value> - to_u32string(IntType val) { - return sprout::to_string_of(val); - } -#endif -} // namespace sprout - -#endif // #ifndef SPROUT_STRING_INT_TO_STRING_HPP diff --git a/dsp/lib/sprout/sprout/string/io.hpp b/dsp/lib/sprout/sprout/string/io.hpp deleted file mode 100644 index 9056433..0000000 --- a/dsp/lib/sprout/sprout/string/io.hpp +++ /dev/null @@ -1,72 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STRING_IO_HPP -#define SPROUT_STRING_IO_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // operator>> - // operator<< - // - template - inline SPROUT_NON_CONSTEXPR std::basic_istream& - operator>>(std::basic_istream& lhs, sprout::basic_string& rhs) { - typedef T elem_type; - typedef StreamTraits traits_type; - typedef std::basic_istream istream_type; - typedef sprout::basic_string string_type; - typedef std::ctype ctype_type; - typedef typename string_type::size_type size_type; - std::ios_base::iostate state = std::ios_base::goodbit; - bool changed = false; - size_type current = 0; - if (typename istream_type::sentry(lhs)) { - ctype_type const& ctype_fac = std::use_facet(lhs.getloc()); - try { - size_type remain = 0 < lhs.width() && static_cast(lhs.width()) < rhs.max_size() - ? static_cast(lhs.width()) - : rhs.max_size() - ; - typename traits_type::int_type meta = lhs.rdbuf()->sgetc(); - for (; remain; --remain, meta = lhs.rdbuf()->snextc()) - if (traits_type::eq_int_type(traits_type::eof(), meta)) { - state |= std::ios_base::eofbit; - break; - } else if (ctype_fac.is(ctype_type::space, traits_type::to_char_type(meta))) { - break; - } else { - rhs[current] = traits_type::to_char_type(meta); - changed = true; - ++current; - } - } catch (...) { - state |= std::ios_base::badbit; - } - } - lhs.width(0); - if (!changed) { - state |= std::ios_base::failbit; - } - lhs.setstate(state); - rhs.resize(current); - return lhs; - } - template - inline SPROUT_NON_CONSTEXPR std::basic_ostream& - operator<<(std::basic_ostream& lhs, sprout::basic_string const& rhs) { - return lhs << rhs.c_str(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_STRING_IO_HPP diff --git a/dsp/lib/sprout/sprout/string/make_string.hpp b/dsp/lib/sprout/sprout/string/make_string.hpp deleted file mode 100644 index b0cd787..0000000 --- a/dsp/lib/sprout/sprout/string/make_string.hpp +++ /dev/null @@ -1,71 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STRING_MAKE_STRING_HPP -#define SPROUT_STRING_MAKE_STRING_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - enum make_string_t { - make_string_in_head_type - }; - } // namespace detail - // - // make_string - // - template - inline SPROUT_CONSTEXPR sprout::basic_string::type, 0> - make_string() { - return sprout::basic_string::type, 0>(); - } - template - inline SPROUT_CONSTEXPR sprout::basic_string::type, N> - make_string() { - return sprout::basic_string::type, N>(); - } - template - inline SPROUT_CONSTEXPR sprout::basic_string::type, 1 + sizeof...(Tail)> - make_string(Head&& head, Tail&&... tail) { - typedef sprout::detail::make_construct_impl< - sprout::basic_string::type, 1 + sizeof...(Tail)> - > impl_type; - return impl_type::make(SPROUT_FORWARD(Head, head), SPROUT_FORWARD(Tail, tail)...); - } - template - inline SPROUT_CONSTEXPR sprout::basic_string::type, N> - make_string(Head&& head, Tail&&... tail) { - typedef sprout::detail::make_construct_impl< - sprout::basic_string::type, N> - > impl_type; - return impl_type::make(SPROUT_FORWARD(Head, head), SPROUT_FORWARD(Tail, tail)...); - } - template - inline SPROUT_CONSTEXPR sprout::basic_string::type, 1 + sizeof...(Tail)> - make_string(Head&& head, Tail&&... tail) { - typedef sprout::detail::make_construct_impl< - sprout::basic_string::type, 1 + sizeof...(Tail)> - > impl_type; - return impl_type::make(SPROUT_FORWARD(Head, head), SPROUT_FORWARD(Tail, tail)...); - } - template - inline SPROUT_CONSTEXPR sprout::basic_string::type, N> - make_string(Head&& head, Tail&&... tail) { - typedef sprout::detail::make_construct_impl< - sprout::basic_string::type, N> - > impl_type; - return impl_type::make(SPROUT_FORWARD(Head, head), SPROUT_FORWARD(Tail, tail)...); - } -} // namespace sprout - -#endif // #ifndef SPROUT_STRING_MAKE_STRING_HPP diff --git a/dsp/lib/sprout/sprout/string/npos.hpp b/dsp/lib/sprout/sprout/string/npos.hpp deleted file mode 100644 index 8c1737f..0000000 --- a/dsp/lib/sprout/sprout/string/npos.hpp +++ /dev/null @@ -1,131 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STRING_NPOS_HPP -#define SPROUT_STRING_NPOS_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // npos_t - // npos - // - struct npos_t { - public: - template::value>::type = sprout::enabler> - struct get - : public sprout::integral_constant - {}; - public: - template::value>::type = sprout::enabler> - SPROUT_CONSTEXPR operator UIntType() const { - return UIntType(-1); - } - }; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::npos_t npos = {}; - } // anonymous-namespace - - // - // operator== - // operator!= - // operator< - // operator> - // operator<= - // operator>= - // - template::value>::type = sprout::enabler> - inline SPROUT_CONSTEXPR bool - operator==(UIntType const& lhs, sprout::npos_t rhs) { - return lhs == UIntType(rhs); - } - template::value>::type = sprout::enabler> - inline SPROUT_CONSTEXPR bool - operator==(sprout::npos_t lhs, UIntType const& rhs) { - return rhs == lhs; - } - inline SPROUT_CONSTEXPR bool - operator==(sprout::npos_t, sprout::npos_t) { - return true; - } - template::value>::type = sprout::enabler> - inline SPROUT_CONSTEXPR bool - operator!=(UIntType const& lhs, sprout::npos_t rhs) { - return !(lhs == rhs); - } - template::value>::type = sprout::enabler> - inline SPROUT_CONSTEXPR bool - operator!=(sprout::npos_t lhs, UIntType const& rhs) { - return !(lhs == rhs); - } - inline SPROUT_CONSTEXPR bool - operator!=(sprout::npos_t lhs, sprout::npos_t rhs) { - return !(lhs == rhs); - } - template::value>::type = sprout::enabler> - inline SPROUT_CONSTEXPR bool - operator<(UIntType const& lhs, sprout::npos_t rhs) { - return lhs < UIntType(rhs); - } - template::value>::type = sprout::enabler> - inline SPROUT_CONSTEXPR bool - operator<(sprout::npos_t lhs, UIntType const& rhs) { - return rhs == lhs; - } - inline SPROUT_CONSTEXPR bool - operator<(sprout::npos_t, sprout::npos_t) { - return false; - } - template::value>::type = sprout::enabler> - inline SPROUT_CONSTEXPR bool - operator>(UIntType const& lhs, sprout::npos_t rhs) { - return rhs < lhs; - } - template::value>::type = sprout::enabler> - inline SPROUT_CONSTEXPR bool - operator>(sprout::npos_t lhs, UIntType const& rhs) { - return rhs < lhs; - } - inline SPROUT_CONSTEXPR bool - operator>(sprout::npos_t lhs, sprout::npos_t rhs) { - return rhs < lhs; - } - template::value>::type = sprout::enabler> - inline SPROUT_CONSTEXPR bool - operator<=(UIntType const& lhs, sprout::npos_t rhs) { - return !(rhs < lhs); - } - template::value>::type = sprout::enabler> - inline SPROUT_CONSTEXPR bool - operator<=(sprout::npos_t lhs, UIntType const& rhs) { - return !(rhs < lhs); - } - inline SPROUT_CONSTEXPR bool - operator<=(sprout::npos_t lhs, sprout::npos_t rhs) { - return !(rhs < lhs); - } - template::value>::type = sprout::enabler> - inline SPROUT_CONSTEXPR bool - operator>=(UIntType const& lhs, sprout::npos_t rhs) { - return !(lhs < rhs); - } - template::value>::type = sprout::enabler> - inline SPROUT_CONSTEXPR bool - operator>=(sprout::npos_t lhs, UIntType const& rhs) { - return !(lhs < rhs); - } - inline SPROUT_CONSTEXPR bool - operator>=(sprout::npos_t lhs, sprout::npos_t rhs) { - return !(lhs < rhs); - } -} // namespace sprout - -#endif // #ifndef SPROUT_STRING_NPOS_HPP diff --git a/dsp/lib/sprout/sprout/string/shift_concat.hpp b/dsp/lib/sprout/sprout/string/shift_concat.hpp deleted file mode 100644 index b4ebc8f..0000000 --- a/dsp/lib/sprout/sprout/string/shift_concat.hpp +++ /dev/null @@ -1,249 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STRING_SHIFT_CONCAT_HPP -#define SPROUT_STRING_SHIFT_CONCAT_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR std::size_t checked_length(std::size_t n) { - return n <= N ? n - : throw std::length_error("length exceeded") - ; - } - } // namespace detail - - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::basic_string - string_rshift( - sprout::basic_string const& lhs, std::size_t lsize, - T const& rhs, - sprout::index_tuple - ) - { - typedef sprout::detail::string_construct_access access_type; - return access_type::raw_construct( - sprout::detail::checked_length(lsize + 1), - (Indexes < lsize ? lhs[Indexes] - : Indexes < lsize + 1 ? rhs - : T() - )... - ); - } - template - inline SPROUT_CONSTEXPR sprout::basic_string - string_rshift( - sprout::basic_string const& lhs, std::size_t lsize, - T const* rhs, std::size_t rsize, - sprout::index_tuple - ) - { - typedef sprout::detail::string_construct_access access_type; - return access_type::raw_construct( - sprout::detail::checked_length(lsize + rsize), - (Indexes < lsize ? lhs[Indexes] - : Indexes < lsize + rsize ? rhs[Indexes - lsize] - : T() - )... - ); - } - template - inline SPROUT_CONSTEXPR sprout::basic_string - string_rshift( - sprout::basic_string const& lhs, std::size_t lsize, - sprout::basic_string const& rhs, std::size_t rsize, - sprout::index_tuple - ) - { - typedef sprout::detail::string_construct_access access_type; - return access_type::raw_construct( - sprout::detail::checked_length(lsize + rsize), - (Indexes < lsize ? lhs[Indexes] - : Indexes < lsize + rsize ? rhs[Indexes - lsize] - : T() - )... - ); - } - template - inline SPROUT_INITIALIZER_LIST_CONSTEXPR sprout::basic_string - string_rshift( - sprout::basic_string const& lhs, std::size_t lsize, - std::initializer_list rhs, std::size_t rsize, - sprout::index_tuple - ) - { - typedef sprout::detail::string_construct_access access_type; - return access_type::raw_construct( - sprout::detail::checked_length(lsize + rsize), - (Indexes < lsize ? lhs[Indexes] - : Indexes < lsize + rsize ? rhs.begin()[Indexes - lsize] - : T() - )... - ); - } - } // namespace detail - // - // operator<< - // - template - inline SPROUT_CONSTEXPR sprout::basic_string - operator<<(sprout::basic_string const& lhs, T const& rhs) { - return sprout::detail::string_rshift( - lhs, lhs.size(), - rhs, - sprout::make_index_tuple::make() - ); - } - template - inline SPROUT_CONSTEXPR sprout::basic_string - operator<<(sprout::basic_string const& lhs, T const* rhs) { - return sprout::detail::string_rshift( - lhs, lhs.size(), - rhs, Traits::length(rhs), - sprout::make_index_tuple::make() - ); - } - template - inline SPROUT_CONSTEXPR sprout::basic_string - operator<<(sprout::basic_string const& lhs, sprout::basic_string const& rhs) { - return sprout::detail::string_rshift( - lhs, lhs.size(), - rhs, rhs.size(), - sprout::make_index_tuple::make() - ); - } - template - inline SPROUT_INITIALIZER_LIST_CONSTEXPR sprout::basic_string - operator<<(sprout::basic_string const& lhs, std::initializer_list rhs) { - return sprout::detail::string_rshift( - lhs, lhs.size(), - rhs, rhs.size(), - sprout::make_index_tuple::make() - ); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::basic_string - string_lshift( - sprout::basic_string const& lhs, std::size_t lsize, - T const& rhs, - sprout::index_tuple - ) - { - typedef sprout::detail::string_construct_access access_type; - return access_type::raw_construct( - sprout::detail::checked_length(1 + lsize), - (Indexes < 1 ? rhs - : Indexes < 1 + lsize ? lhs[Indexes - 1] - : T() - )... - ); - } - template - inline SPROUT_CONSTEXPR sprout::basic_string - string_lshift( - sprout::basic_string const& lhs, std::size_t lsize, - T const* rhs, std::size_t rsize, - sprout::index_tuple - ) - { - typedef sprout::detail::string_construct_access access_type; - return access_type::raw_construct( - sprout::detail::checked_length(rsize + lsize), - (Indexes < rsize ? rhs[Indexes] - : Indexes < rsize + lsize ? lhs[Indexes - rsize] - : T() - )... - ); - } - template - inline SPROUT_CONSTEXPR sprout::basic_string - string_lshift( - sprout::basic_string const& lhs, std::size_t lsize, - sprout::basic_string const& rhs, std::size_t rsize, - sprout::index_tuple - ) - { - typedef sprout::detail::string_construct_access access_type; - return access_type::raw_construct( - sprout::detail::checked_length(rsize + lsize), - (Indexes < rsize ? rhs[Indexes] - : Indexes < rsize + lsize ? lhs[Indexes - rsize] - : T() - )... - ); - } - template - inline SPROUT_INITIALIZER_LIST_CONSTEXPR sprout::basic_string - string_lshift( - sprout::basic_string const& lhs, std::size_t lsize, - std::initializer_list rhs, std::size_t rsize, - sprout::index_tuple - ) - { - typedef sprout::detail::string_construct_access access_type; - return access_type::raw_construct( - sprout::detail::checked_length(rsize + lsize), - (Indexes < rsize ? rhs.begin()[Indexes] - : Indexes < rsize + lsize ? lhs[Indexes - rsize] - : T() - )... - ); - } - } // namespace detail - // - // operator>> - // - template - inline SPROUT_CONSTEXPR sprout::basic_string - operator>>(sprout::basic_string const& lhs, T const& rhs) { - return sprout::detail::string_lshift( - lhs, lhs.size(), - rhs, - sprout::make_index_tuple::make() - ); - } - template - inline SPROUT_CONSTEXPR sprout::basic_string - operator>>(sprout::basic_string const& lhs, T const* rhs) { - return sprout::detail::string_lshift( - lhs, lhs.size(), - rhs, Traits::length(rhs), - sprout::make_index_tuple::make() - ); - } - template - inline SPROUT_CONSTEXPR sprout::basic_string - operator>>(sprout::basic_string const& lhs, sprout::basic_string const& rhs) { - return sprout::detail::string_lshift( - lhs, lhs.size(), - rhs, rhs.size(), - sprout::make_index_tuple::make() - ); - } - template - inline SPROUT_INITIALIZER_LIST_CONSTEXPR sprout::basic_string - operator>>(sprout::basic_string const& lhs, std::initializer_list rhs) { - return sprout::detail::string_lshift( - lhs, lhs.size(), - rhs, rhs.size(), - sprout::make_index_tuple::make() - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_STRING_SHIFT_CONCAT_HPP diff --git a/dsp/lib/sprout/sprout/string/shrink.hpp b/dsp/lib/sprout/sprout/string/shrink.hpp deleted file mode 100644 index 4ac3890..0000000 --- a/dsp/lib/sprout/sprout/string/shrink.hpp +++ /dev/null @@ -1,87 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STRING_SHRINK_HPP -#define SPROUT_STRING_SHRINK_HPP - -#include -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT - -namespace sprout { - // - // shrink_string - // - template > - class shrink_string { - public: - typedef sprout::basic_string string_type; - private: - typedef sprout::value_holder holder_type; - private: - template - static SPROUT_CONSTEXPR sprout::basic_string - implicit_conversion_impl( - string_type const& str, std::size_t len, - sprout::index_tuple - ) - { - typedef sprout::detail::string_construct_access access_type; - return access_type::raw_construct(len, (Indexes < N ? str[Indexes] : T())...); - } - private: - holder_type holder_; - public: - shrink_string(shrink_string const&) = default; - shrink_string(shrink_string&&) = default; - SPROUT_CONSTEXPR shrink_string(string_type const& s) - : holder_(s) - {} - SPROUT_CONSTEXPR operator string_type const&() const { - return holder_.get(); - } - template - SPROUT_CONSTEXPR operator sprout::basic_string() const { - return implicit_conversion_impl( - holder_.get(), - NS_SSCRISK_CEL_OR_SPROUT::min(N2, holder_.get().size()), - sprout::make_index_tuple<(N < N2 ? N : N2)>::make() - ); - } - }; - - // - // shrink - // - template - inline SPROUT_CONSTEXPR sprout::shrink_string - shrink(sprout::basic_string const& s) { - return sprout::shrink_string(s); - } - template - inline SPROUT_CONSTEXPR sprout::basic_string - shrink(sprout::basic_string const& s) { - return sprout::shrink(s); - } - - template - inline SPROUT_CONSTEXPR sprout::shrink_string - shrink(T const(& arr)[N]) { - return sprout::shrink(sprout::to_string(arr)); - } - template - inline SPROUT_CONSTEXPR sprout::basic_string - shrink(T const(& arr)[N]) { - return sprout::shrink(sprout::to_string(arr)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_STRING_SHRINK_HPP diff --git a/dsp/lib/sprout/sprout/string/stretch.hpp b/dsp/lib/sprout/sprout/string/stretch.hpp deleted file mode 100644 index 8e055b3..0000000 --- a/dsp/lib/sprout/sprout/string/stretch.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STRING_STRETCH_HPP -#define SPROUT_STRING_STRETCH_HPP - -#include -#include -#include - -namespace sprout { - // - // stretch - // - template - inline SPROUT_CONSTEXPR sprout::basic_string - stretch(sprout::basic_string const& s) { - return s; - } - - template - inline SPROUT_CONSTEXPR sprout::basic_string - stretch(T const(& arr)[N]) { - return sprout::stretch(sprout::to_string(arr)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_STRING_STRETCH_HPP diff --git a/dsp/lib/sprout/sprout/string/string.hpp b/dsp/lib/sprout/sprout/string/string.hpp deleted file mode 100644 index b0735b3..0000000 --- a/dsp/lib/sprout/sprout/string/string.hpp +++ /dev/null @@ -1,1280 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STRING_STRING_HPP -#define SPROUT_STRING_STRING_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT -#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION -# include -#endif -#include - -namespace sprout { - namespace detail { - template - class constant_size_source { - private: - typedef sprout::array array_type; - public: - typedef typename array_type::size_type size_type; - typedef typename array_type::const_reference const_reference; - private: - array_type arr_; - size_type size_; - public: - SPROUT_CONSTEXPR constant_size_source() - : arr_{{}}, size_() - {} - template - explicit SPROUT_CONSTEXPR constant_size_source(size_type n, Args&&... args) - : arr_{{static_cast(SPROUT_FORWARD(Args, args))...}}, size_(n) - {} - SPROUT_CONSTEXPR size_type size() const { - return size_; - } - SPROUT_CONSTEXPR const_reference operator[](size_type i) const { - return arr_[i]; - } - }; - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_random_access_iterator::value, - typename std::iterator_traits::difference_type - >::type - make_constant_size_source(RandomAccessIterator const& first, RandomAccessIterator const& last) { - return sprout::distance(first, last); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - N == sizeof...(Args), - sprout::detail::constant_size_source - >::type - make_constant_size_source_impl(InputIterator first, InputIterator last, Args const&... args) { - return sprout::detail::constant_size_source(sizeof...(args) + (first != last ? 1 : 0), args...); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - N != sizeof...(Args), - sprout::detail::constant_size_source - >::type - make_constant_size_source_impl(InputIterator first, InputIterator last, Args const&... args) { - return first != last - ? sprout::detail::make_constant_size_source_impl(sprout::next(first), last, args..., *first) - : sprout::detail::constant_size_source(sizeof...(args), args...) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::is_random_access_iterator::value, - sprout::detail::constant_size_source - >::type - make_constant_size_source(InputIterator const& first, InputIterator const& last) { - return sprout::detail::make_constant_size_source_impl(first, last); - } - } // namespace detail - - namespace detail { - struct string_raw_construct_t {}; - struct string_checked_construct_t {}; - struct string_range_construct_t {}; - - template > - class string_construct_access; - - template - class basic_string_impl { - public: - typedef typename Traits::char_type value_type; - typedef value_type& reference; - typedef value_type const& const_reference; - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - typedef value_type* pointer; - typedef value_type const* const_pointer; - typedef Traits traits_type; - public: - value_type elems[N + 1]; - size_type len; - public: - SPROUT_CONSTEXPR basic_string_impl() - : elems{}, len() - {} - basic_string_impl(basic_string_impl const&) = default; - basic_string_impl(basic_string_impl&&) = default; - template - SPROUT_CONSTEXPR basic_string_impl( - sprout::index_tuple, - String const& str, size_type pos, size_type n - ) - : elems{ - (sprout::math::less(Indexes, n) ? static_cast(str[Indexes + pos]) - : value_type() - )... - } - , len(n) - {} - template - SPROUT_CONSTEXPR basic_string_impl( - sprout::index_tuple, - sprout::detail::string_checked_construct_t, String const& str, size_type pos, size_type n - ) - : elems{ - (sprout::math::less(Indexes, n) ? static_cast(str[Indexes + pos]) - : value_type() - )... - } - , len(!sprout::math::less(N, n) ? n - : throw std::length_error("basic_string<>: length exceeded") - ) - {} - template - SPROUT_CONSTEXPR basic_string_impl( - sprout::index_tuple, - sprout::detail::string_range_construct_t, RandomAccessIterator const& str, Size n, - std::random_access_iterator_tag* - ) - : elems{ - (sprout::math::less(Indexes, n) ? static_cast(str[Indexes]) - : value_type() - )... - } - , len(!sprout::math::less(N, n) ? n - : throw std::length_error("basic_string<>: length exceeded") - ) - {} - template - SPROUT_CONSTEXPR basic_string_impl( - sprout::index_tuple, - sprout::detail::string_range_construct_t, InputIterator, Source const& str, - void* - ) - : elems{ - (sprout::math::less(Indexes, str.size()) ? static_cast(str[Indexes]) - : value_type() - )... - } - , len(!(N < str.size()) ? str.size() - : throw std::length_error("basic_string<>: length exceeded") - ) - {} - template - SPROUT_CONSTEXPR basic_string_impl( - sprout::index_tuple, - sprout::detail::string_raw_construct_t, size_type n, Args&&... args - ) - : elems{ - (sprout::math::less(Indexes, n) ? static_cast(SPROUT_FORWARD(Args, args)) - : value_type() - )... - } - , len(n) - {} - }; - } // namespace detail - - // - // basic_string - // - template > - class basic_string { - friend class sprout::detail::string_construct_access; - private: - typedef sprout::detail::basic_string_impl impl_type; - public: - typedef typename impl_type::value_type value_type; - typedef typename impl_type::reference reference; - typedef typename impl_type::const_reference const_reference; - typedef typename impl_type::size_type size_type; - typedef typename impl_type::difference_type difference_type; - typedef typename impl_type::pointer pointer; - typedef typename impl_type::const_pointer const_pointer; - typedef typename impl_type::traits_type traits_type; -#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION - typedef sprout::index_iterator iterator; - typedef sprout::index_iterator const_iterator; -#else - typedef T* iterator; - typedef T const* const_iterator; -#endif - typedef sprout::reverse_iterator reverse_iterator; - typedef sprout::reverse_iterator const_reverse_iterator; - private: -#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION - template - class is_string_iterator - : public sprout::false_type - {}; - template - class is_string_iterator - : public is_string_iterator - {}; - template - class is_string_iterator - : public is_string_iterator - {}; - template - class is_string_iterator - : public is_string_iterator - {}; - template - class is_string_iterator&, true> > - : public sprout::true_type - {}; - template - class is_string_iterator const&, true> > - : public sprout::true_type - {}; -#endif - public: - SPROUT_STATIC_CONSTEXPR size_type npos = sprout::npos_t::get::value; - SPROUT_STATIC_CONSTEXPR size_type static_size = N; - public: - static SPROUT_CONSTEXPR basic_string from_c_str(T const* s, size_type n) { - return basic_string(s, n); - } - static SPROUT_CONSTEXPR basic_string from_c_str(T const* s) { - return basic_string(s); - } - static SPROUT_NON_CONSTEXPR basic_string from_c_str(std::basic_string const& s) { - return from_c_str(s.data(), s.size()); - } - private: - impl_type impl_; - private: - template::type> - SPROUT_CONSTEXPR basic_string(sprout::detail::string_raw_construct_t, size_type n, Args&&... args) - : impl_( - sprout::index_pack::make(), - sprout::detail::string_raw_construct_t(), n, SPROUT_FORWARD(Args, args)... - ) - {} - SPROUT_CXX14_CONSTEXPR void - maxcheck(size_type n) const { - if (n > max_size()) { - throw std::out_of_range("basic_string<>: index out of range"); - } - } - SPROUT_CXX14_CONSTEXPR void - lengthcheck(size_type n) const { - if (n > max_size()) { - throw std::length_error("basic_string<>: length exceeded"); - } - } - SPROUT_CXX14_CONSTEXPR void - put_terminator(size_type n) { - if (n < size()) { - traits_type::assign(begin() + n, size() - n, value_type()); - } - impl_.len = n; - } - template - SPROUT_CXX14_CONSTEXPR basic_string& - assign(InputIterator first, InputIterator last, std::input_iterator_tag*) { - iterator it = begin(); - for (; first != last; ++first, ++it) { - if (sprout::distance(begin(), it) > max_size()) { - throw std::length_error("basic_string<>: length exceeded"); - } - traits_type::assign(*it, *first); - } - put_terminator(sprout::distance(begin(), it)); - return *this; - } - template - SPROUT_CXX14_CONSTEXPR basic_string& - assign(ForwardIterator first, ForwardIterator last, std::forward_iterator_tag*) { - lengthcheck(sprout::distance(first, last)); - iterator it = begin(); - for (; first != last; ++first, ++it) { - traits_type::assign(*it, *first); - } - put_terminator(sprout::distance(begin(), it)); - return *this; - } - template - SPROUT_CXX14_CONSTEXPR basic_string& - append(InputIterator first, InputIterator last, std::input_iterator_tag*) { - iterator it = end(); - for (; first != last; ++first, ++it) { - if (sprout::distance(begin(), it) > max_size()) { - throw std::length_error("basic_string<>: length exceeded"); - } - traits_type::assign(*it, *first); - } - put_terminator(size() + sprout::distance(end(), it)); - return *this; - } - template - SPROUT_CXX14_CONSTEXPR basic_string& - append(ForwardIterator first, ForwardIterator last, std::forward_iterator_tag*) { - lengthcheck(size() + sprout::distance(first, last)); - iterator it = end(); - for (; first != last; ++first, ++it) { - traits_type::assign(*it, *first); - } - put_terminator(size() + sprout::distance(end(), it)); - return *this; - } - public: - // construct/copy/destroy: - SPROUT_CONSTEXPR basic_string() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - basic_string(basic_string const&) = default; - template::type> - SPROUT_CONSTEXPR basic_string(basic_string const& str) - : impl_( - sprout::make_index_tuple::make(), - str, 0, str.size() - ) - {} - SPROUT_CONSTEXPR basic_string(basic_string const& str, size_type pos, size_type n = npos) - : impl_( - sprout::make_index_tuple::make(), - str, pos, NS_SSCRISK_CEL_OR_SPROUT::min(n, str.size() - pos) - ) - {} - template::type> - SPROUT_CONSTEXPR basic_string(basic_string const& str, size_type pos, size_type n = npos) - : impl_( - sprout::make_index_tuple::make(), - str, pos, NS_SSCRISK_CEL_OR_SPROUT::min(n, str.size() - pos) - ) - {} - template - SPROUT_CONSTEXPR basic_string(T const(& arr)[N2] SPROUT_ENABLE_IF_WITH_ARRAY_IN_PARAMS((N2 - 1 <= N))) - : impl_( - sprout::make_index_tuple::make(), - arr, 0, sprout::char_traits_helper::traits_type>::length(arr, N2 - 1) - ) - {} - template - SPROUT_CONSTEXPR basic_string(T const(& arr)[N2], size_type n SPROUT_ENABLE_IF_WITH_ARRAY_IN_PARAMS((N2 - 1 <= N))) - : impl_( - sprout::make_index_tuple::make(), - arr, 0, NS_SSCRISK_CEL_OR_SPROUT::min(n, sprout::char_traits_helper::traits_type>::length(arr, N2 - 1)) - ) - {} - explicit SPROUT_CONSTEXPR basic_string(value_type const* s) - : impl_( - sprout::make_index_tuple::make(), - sprout::detail::string_checked_construct_t(), s, 0, traits_type::length(s) - ) - {} - SPROUT_CONSTEXPR basic_string(value_type const* s, size_type n) - : impl_( - sprout::make_index_tuple::make(), - sprout::detail::string_checked_construct_t(), s, 0, NS_SSCRISK_CEL_OR_SPROUT::min(n, traits_type::length(s)) - ) - {} - SPROUT_CONSTEXPR basic_string(size_type n, value_type c) - : impl_( - sprout::make_index_tuple::make(), - sprout::detail::string_checked_construct_t(), sprout::value_iterator(c), 0, n - ) - {} - template::value>::type = sprout::enabler> - SPROUT_CONSTEXPR basic_string(InputIterator first, InputIterator last) - : impl_( - sprout::make_index_tuple::make(), - sprout::detail::string_checked_construct_t(), sprout::value_iterator(last), 0, first - ) - {} - template::value>::type = sprout::enabler> - SPROUT_CONSTEXPR basic_string(InputIterator first, InputIterator last) - : impl_( - sprout::make_index_tuple::make(), - sprout::detail::string_range_construct_t(), first, sprout::detail::make_constant_size_source(first, last), - typename sprout::identity::iterator_category*>::type() - ) - {} - SPROUT_INITIALIZER_LIST_CONSTEXPR basic_string(std::initializer_list il) - : impl_( - sprout::make_index_tuple::make(), - sprout::detail::string_checked_construct_t(), il.begin(), 0, il.size() - ) - {} - - SPROUT_CXX14_CONSTEXPR basic_string& - operator=(basic_string const& rhs) { - return assign(rhs); - } - template::type> - SPROUT_CXX14_CONSTEXPR basic_string& - operator=(basic_string const& rhs) { - return assign(rhs); - } - SPROUT_CXX14_CONSTEXPR basic_string& - operator=(value_type const* rhs) { - return assign(rhs); - } - SPROUT_CXX14_CONSTEXPR basic_string& - operator=(value_type rhs) { - return assign(1, rhs); - } - SPROUT_CXX14_CONSTEXPR basic_string& - operator=(std::initializer_list il) { - return assign(il); - } - // iterators: -#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION - SPROUT_CXX14_CONSTEXPR iterator - begin() SPROUT_NOEXCEPT { - return iterator(*this, 0); - } - SPROUT_CONSTEXPR const_iterator - begin() const SPROUT_NOEXCEPT { - return const_iterator(*this, 0); - } - SPROUT_CXX14_CONSTEXPR iterator - end() SPROUT_NOEXCEPT { - return iterator(*this, size()); - } - SPROUT_CONSTEXPR const_iterator - end() const SPROUT_NOEXCEPT { - return const_iterator(*this, size()); - } -#else - SPROUT_CXX14_CONSTEXPR iterator - begin() SPROUT_NOEXCEPT { - return data(); - } - SPROUT_CONSTEXPR const_iterator - begin() const SPROUT_NOEXCEPT { - return data(); - } - SPROUT_CXX14_CONSTEXPR iterator - end() SPROUT_NOEXCEPT { - return data() + size(); - } - SPROUT_CONSTEXPR const_iterator - end() const SPROUT_NOEXCEPT { - return data() + size(); - } -#endif - SPROUT_CXX14_CONSTEXPR reverse_iterator - rbegin() SPROUT_NOEXCEPT { - return const_reverse_iterator(end()); - } - SPROUT_CONSTEXPR const_reverse_iterator - rbegin() const SPROUT_NOEXCEPT { - return const_reverse_iterator(end()); - } - SPROUT_CXX14_CONSTEXPR reverse_iterator - rend() SPROUT_NOEXCEPT { - return const_reverse_iterator(begin()); - } - SPROUT_CONSTEXPR const_reverse_iterator - rend() const SPROUT_NOEXCEPT { - return const_reverse_iterator(begin()); - } -#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION - SPROUT_CONSTEXPR const_iterator - cbegin() const SPROUT_NOEXCEPT { - return const_iterator(*this, 0); - } - SPROUT_CONSTEXPR const_iterator - cend() const SPROUT_NOEXCEPT { - return const_iterator(*this, size()); - } -#else - SPROUT_CONSTEXPR const_iterator - cbegin() const SPROUT_NOEXCEPT { - return data(); - } - SPROUT_CONSTEXPR const_iterator - cend() const SPROUT_NOEXCEPT { - return data() + size(); - } -#endif - SPROUT_CONSTEXPR const_reverse_iterator - crbegin() const SPROUT_NOEXCEPT { - return const_reverse_iterator(end()); - } - SPROUT_CONSTEXPR const_reverse_iterator - crend() const SPROUT_NOEXCEPT { - return const_reverse_iterator(begin()); - } - // capacity: - SPROUT_CONSTEXPR size_type - size() const SPROUT_NOEXCEPT { - return impl_.len; - } - SPROUT_CONSTEXPR size_type - length() const SPROUT_NOEXCEPT { - return size(); - } - SPROUT_CONSTEXPR size_type - max_size() const SPROUT_NOEXCEPT { - return static_size; - } - SPROUT_CXX14_CONSTEXPR void - resize(size_type n, value_type c) { - lengthcheck(n); - if (n > size()) { - traits_type::assign(end(), n - size(), c); - } - put_terminator(n); - } - SPROUT_CXX14_CONSTEXPR void - resize(size_type n) { - resize(n, value_type()); - } - SPROUT_CONSTEXPR size_type - capacity() const SPROUT_NOEXCEPT { - return static_size; - } - SPROUT_CXX14_CONSTEXPR void - clear() SPROUT_NOEXCEPT { - put_terminator(0); - } - SPROUT_CONSTEXPR bool - empty() const SPROUT_NOEXCEPT { - return size() == 0; - } - // element access: - SPROUT_CXX14_CONSTEXPR reference - operator[](size_type i) { - return impl_.elems[i]; - } - SPROUT_CONSTEXPR const_reference - operator[](size_type i) const { - return impl_.elems[i]; - } - SPROUT_CXX14_CONSTEXPR reference - at(size_type i) { - return i < size() ? impl_.elems[i] - : (throw std::out_of_range("basic_string<>: index out of range"), impl_.elems[i]) - ; - } - SPROUT_CONSTEXPR const_reference - at(size_type i) const { - return i < size() ? impl_.elems[i] - : (throw std::out_of_range("basic_string<>: index out of range"), impl_.elems[i]) - ; - } - SPROUT_CXX14_CONSTEXPR reference - front() { - return impl_.elems[0]; - } - SPROUT_CONSTEXPR const_reference - front() const { - return impl_.elems[0]; - } - SPROUT_CXX14_CONSTEXPR reference - back() { - return impl_.elems[size() - 1]; - } - SPROUT_CONSTEXPR const_reference - back() const { - return impl_.elems[size() - 1]; - } - // modifiers: - template - SPROUT_CXX14_CONSTEXPR basic_string& - append(basic_string const& str) { - return append(str.begin(), str.size()); - } - template - SPROUT_CXX14_CONSTEXPR basic_string& - append(basic_string const& str, size_type pos, size_type n = npos) { - str.rangecheck(pos); - size_type rlen = n != npos - ? NS_SSCRISK_CEL_OR_SPROUT::min(n, str.size() - pos) - : str.size() - pos - ; - return append(str.begin() + pos, rlen); - } - SPROUT_CXX14_CONSTEXPR basic_string& - append(value_type const* s, size_type n) { - lengthcheck(size() + n); - traits_type::move(end(), s, n); - put_terminator(size() + n); - return *this; - } - SPROUT_CXX14_CONSTEXPR basic_string& - append(value_type const* s) { - return append(s, traits_type::length(s)); - } - SPROUT_CXX14_CONSTEXPR basic_string& - append(size_type n, value_type c) { - lengthcheck(size() + n); - traits_type::assign(end(), n, c); - put_terminator(size() + n); - return *this; - } - template - SPROUT_CXX14_CONSTEXPR basic_string& - append(InputIterator first, InputIterator last) { - typedef typename std::iterator_traits::iterator_category* category; - return append(first, last, category()); - } - SPROUT_CXX14_CONSTEXPR basic_string& - append(std::initializer_list il) { - return append(il.begin(), il.end()); - } - SPROUT_CXX14_CONSTEXPR void - push_back(value_type c) { - append(size_type(1), c); - } - template - SPROUT_CXX14_CONSTEXPR basic_string& - assign(basic_string const& str) { - return assign(str, 0, npos); - } - template - SPROUT_CXX14_CONSTEXPR basic_string& - assign(basic_string const& str, size_type pos, size_type n = npos) { - str.rangecheck(pos); - size_type rlen = n != npos - ? NS_SSCRISK_CEL_OR_SPROUT::min(n, str.size() - pos) - : str.size() - pos - ; - return assign(str.begin() + pos, rlen); - } - SPROUT_CXX14_CONSTEXPR basic_string& - assign(value_type const* s, size_type n) { - lengthcheck(n); - traits_type::move(begin(), s, n); - put_terminator(n); - return *this; - } - SPROUT_CXX14_CONSTEXPR basic_string& - assign(value_type const* s) { - return assign(s, traits_type::length(s)); - } - SPROUT_CXX14_CONSTEXPR basic_string& - assign(size_type n, value_type c) { - maxcheck(n); - traits_type::assign(begin(), n, c); - put_terminator(n); - return *this; - } - template - SPROUT_CXX14_CONSTEXPR basic_string& - assign(InputIterator first, InputIterator last) { - typedef typename std::iterator_traits::iterator_category* category; - return assign(first, last, category()); - } - SPROUT_CXX14_CONSTEXPR basic_string& - assign(std::initializer_list il) { - return assign(il.begin(), il.end()); - } - SPROUT_CXX14_CONSTEXPR void - pop_back() { - put_terminator(size() - 1); - } - //!!! - SPROUT_CXX14_CONSTEXPR void - swap(basic_string& other) - SPROUT_NOEXCEPT_IF_EXPR(sprout::swap(std::declval(), std::declval())) - { - sprout::swap_ranges(other.begin(), other.begin() + other.max_size(), begin()); - sprout::swap(impl_.len, other.impl_.len); - } - // string operations: - SPROUT_CONSTEXPR const_pointer - c_str() const SPROUT_NOEXCEPT { - return data(); - } - SPROUT_CXX14_CONSTEXPR pointer - data() SPROUT_NOEXCEPT { - return impl_.elems; - } - SPROUT_CONSTEXPR const_pointer - data() const SPROUT_NOEXCEPT { - return impl_.elems; - } - SPROUT_CXX14_CONSTEXPR pointer - c_array() SPROUT_NOEXCEPT { - return impl_.elems; - } - SPROUT_CONSTEXPR const_pointer - c_array() const SPROUT_NOEXCEPT { - return impl_.elems; - } - SPROUT_CXX14_CONSTEXPR size_type - copy(value_type* s, size_type n, size_type pos = 0) const { - rangecheck(pos); - size_type llen = NS_SSCRISK_CEL_OR_SPROUT::min(n, size() - pos); - traits_type::copy(s, begin() + pos, llen); - return llen; - } - template - SPROUT_CONSTEXPR size_type - find(basic_string const& str, size_type pos = 0) const SPROUT_NOEXCEPT { - return sprout::string_detail::find_impl(begin(), size(), str.begin(), pos, str.size()); - } - SPROUT_CONSTEXPR size_type - find(value_type const* s, size_type pos, size_type n) const { - return sprout::string_detail::find_impl(begin(), size(), s, pos, n); - } - SPROUT_CONSTEXPR size_type - find(value_type const* s, size_type pos = 0) const { - return find(s, pos, traits_type::length(s)); - } - SPROUT_CONSTEXPR size_type - find(value_type c, size_type pos = 0) const { - return sprout::string_detail::find_c_impl(begin(), size(), c, pos); - } - template - SPROUT_CONSTEXPR size_type - rfind(basic_string const& str, size_type pos = npos) const SPROUT_NOEXCEPT { - return sprout::string_detail::rfind_impl(begin(), size(), str.begin(), pos, str.size()); - } - SPROUT_CONSTEXPR size_type - rfind(value_type const* s, size_type pos, size_type n) const { - return sprout::string_detail::rfind_impl(begin(), size(), s, pos, n); - } - SPROUT_CONSTEXPR size_type - rfind(value_type const* s, size_type pos = npos) const { - return rfind(s, pos, traits_type::length(s)); - } - SPROUT_CONSTEXPR size_type - rfind(value_type c, size_type pos = npos) const { - return sprout::string_detail::rfind_c_impl(begin(), size(), c, pos); - } - template - SPROUT_CONSTEXPR size_type - find_first_of(basic_string const& str, size_type pos = 0) const SPROUT_NOEXCEPT { - return sprout::string_detail::find_first_of_impl(begin(), size(), str.begin(), pos, str.size()); - } - SPROUT_CONSTEXPR size_type - find_first_of(value_type const* s, size_type pos, size_type n) const { - return sprout::string_detail::find_first_of_impl(begin(), size(), s, pos, n); - } - SPROUT_CONSTEXPR size_type - find_first_of(value_type const* s, size_type pos = 0) const { - return find_first_of(s, pos, traits_type::length(s)); - } - SPROUT_CONSTEXPR size_type - find_first_of(value_type c, size_type pos = 0) const { - return find(c, pos); - } - template - SPROUT_CONSTEXPR size_type - find_last_of(basic_string const& str, size_type pos = npos) const SPROUT_NOEXCEPT { - return sprout::string_detail::find_last_of_impl(begin(), size(), str.begin(), pos, str.size()); - } - SPROUT_CONSTEXPR size_type - find_last_of(value_type const* s, size_type pos, size_type n) const { - return sprout::string_detail::find_last_of_impl(begin(), size(), s, pos, n); - } - SPROUT_CONSTEXPR size_type - find_last_of(value_type const* s, size_type pos = npos) const { - return find_last_of(s, pos, traits_type::length(s)); - } - SPROUT_CONSTEXPR size_type - find_last_of(value_type c, size_type pos = npos) const { - return rfind(c, pos); - } - template - SPROUT_CONSTEXPR size_type - find_first_not_of(basic_string const& str, size_type pos = 0) const SPROUT_NOEXCEPT { - return sprout::string_detail::find_first_not_of_impl(begin(), size(), str.begin(), pos, str.size()); - } - SPROUT_CONSTEXPR size_type - find_first_not_of(value_type const* s, size_type pos, size_type n) const { -#if SPROUT_GCC_IN_RANGE((5, 1, 0), (5, 4, 0)) - return sprout::string_detail::find_first_not_of_impl(begin(), size(), sprout::ptr_index(s), pos, n); -#else - return sprout::string_detail::find_first_not_of_impl(begin(), size(), s, pos, n); -#endif - } - SPROUT_CONSTEXPR size_type - find_first_not_of(value_type const* s, size_type pos = 0) const { - return find_first_not_of(s, pos, traits_type::length(s)); - } - SPROUT_CONSTEXPR size_type - find_first_not_of(value_type c, size_type pos = 0) const { - return sprout::string_detail::find_first_not_of_c_impl(begin(), size(), c, pos); - } - template - SPROUT_CONSTEXPR size_type - find_last_not_of(basic_string const& str, size_type pos = npos) const SPROUT_NOEXCEPT { - return sprout::string_detail::find_last_not_of_impl(begin(), size(), str.begin(), pos, str.size()); - } - SPROUT_CONSTEXPR size_type - find_last_not_of(value_type const* s, size_type pos, size_type n) const { -#if SPROUT_GCC_IN_RANGE((5, 1, 0), (5, 4, 0)) - return sprout::string_detail::find_last_not_of_impl(begin(), size(), sprout::ptr_index(s), pos, n); -#else - return sprout::string_detail::find_last_not_of_impl(begin(), size(), s, pos, n); -#endif - } - SPROUT_CONSTEXPR size_type - find_last_not_of(value_type const* s, size_type pos = npos) const { - return find_last_not_of(s, pos, traits_type::length(s)); - } - SPROUT_CONSTEXPR size_type - find_last_not_of(value_type c, size_type pos = npos) const { - return sprout::string_detail::find_last_not_of_c_impl(begin(), size(), c, pos); - } - SPROUT_CONSTEXPR basic_string - substr(size_type pos = 0, size_type n = npos) const { - return !(size() < pos) ? from_c_str(c_str() + pos, NS_SSCRISK_CEL_OR_SPROUT::min(n, size() - pos)) - : throw std::out_of_range("basic_string<>: index out of range") - ; - } - template - SPROUT_CONSTEXPR int - compare(basic_string const& str) const { - return compare(0, size(), str.begin(), str.size()); - } - SPROUT_CONSTEXPR int - compare(value_type const* s) const { - return compare(0, size(), s, traits_type::length(s)); - } - template - SPROUT_CONSTEXPR int - compare(size_type pos1, size_type n1, basic_string const& str) const { - return compare(pos1, n1, str, 0, npos); - } - SPROUT_CONSTEXPR int - compare(size_type pos1, size_type n1, value_type const* s) const { - return compare(pos1, n1, s, traits_type::length(s)); - } - template - SPROUT_CONSTEXPR int - compare(size_type pos1, size_type n1, basic_string const& str, size_type pos2, size_type n2) const { - return !(str.size() < pos2) - ? compare(pos1, n1, str.begin() + pos2, NS_SSCRISK_CEL_OR_SPROUT::min(n2, str.size() - pos2)) - : throw std::out_of_range("basic_string<>: index out of range") - ; - } - SPROUT_CONSTEXPR int - compare(size_type pos1, size_type n1, value_type const* s, size_type n2) const { - return !(size() < pos1) - ? sprout::string_detail::compare_impl(begin(), pos1, NS_SSCRISK_CEL_OR_SPROUT::min(n1, size() - pos1), s, n2) - : throw std::out_of_range("basic_string<>: index out of range") - ; - } - // conversions: - template - SPROUT_EXPLICIT_CONVERSION SPROUT_NON_CONSTEXPR operator std::basic_string() const { - return std::basic_string(data(), size()); - } - SPROUT_CONSTEXPR operator sprout::basic_string_view() const SPROUT_NOEXCEPT { - return sprout::basic_string_view(data(), size()); - } - - SPROUT_CXX14_CONSTEXPR void rangecheck(size_type i) const { - return i >= size() ? throw std::out_of_range("basic_string<>: index out of range") - : (void)0 - ; - } - -#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION - // construct/copy/destroy (for string iterator): - template - SPROUT_CXX14_CONSTEXPR typename std::enable_if< - is_string_iterator::value, - basic_string& - >::type - operator=(StringConstIterator rhs) { - return assign(rhs); - } - // modifiers (for string iterator): - template - SPROUT_CXX14_CONSTEXPR typename std::enable_if< - is_string_iterator::value, - basic_string& - >::type - append(StringConstIterator s, size_type n) { - lengthcheck(size() + n); - traits_type::move(end(), s, n); - put_terminator(size() + n); - return *this; - } - template - SPROUT_CXX14_CONSTEXPR typename std::enable_if< - is_string_iterator::value, - basic_string& - >::type - append(StringConstIterator s) { - return append(s, traits_type::length(s)); - } - template - SPROUT_CXX14_CONSTEXPR typename std::enable_if< - is_string_iterator::value, - basic_string& - >::type - assign(StringConstIterator s, size_type n) { - lengthcheck(n); - traits_type::move(begin(), s, n); - put_terminator(n); - return *this; - } - template - SPROUT_CXX14_CONSTEXPR typename std::enable_if< - is_string_iterator::value, - basic_string& - >::type - assign(StringConstIterator s) { - return assign(s, traits_type::length(s)); - } - - // string operations (for string iterator): - template - SPROUT_CXX14_CONSTEXPR size_type - copy(StringIterator s, size_type n, size_type pos = 0) const { - rangecheck(pos); - size_type llen = NS_SSCRISK_CEL_OR_SPROUT::min(n, size() - pos); - traits_type::copy(s, begin() + pos, llen); - return llen; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - is_string_iterator::value, - size_type - >::type - find(StringConstIterator s, size_type pos, size_type n) const { - return sprout::string_detail::find_impl(begin(), size(), s, pos, n); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - is_string_iterator::value, - size_type - >::type - find(StringConstIterator s, size_type pos = 0) const { - return find(s, pos, traits_type::length(s)); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - is_string_iterator::value, - size_type - >::type - rfind(StringConstIterator s, size_type pos, size_type n) const { - return sprout::string_detail::rfind_impl(begin(), size(), s, pos, n); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - is_string_iterator::value, - size_type - >::type - rfind(StringConstIterator s, size_type pos = npos) const { - return rfind(s, pos, traits_type::length(s)); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - is_string_iterator::value, - size_type - >::type - find_first_of(StringConstIterator s, size_type pos, size_type n) const { - return sprout::string_detail::find_first_of_impl(begin(), size(), s, pos, n); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - is_string_iterator::value, - size_type - >::type - find_first_of(StringConstIterator s, size_type pos = 0) const { - return find_first_of(s, pos, traits_type::length(s)); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - is_string_iterator::value, - size_type - >::type - find_last_of(StringConstIterator s, size_type pos, size_type n) const { - return sprout::string_detail::find_last_of_impl(begin(), size(), s, pos, n); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - is_string_iterator::value, - size_type - >::type - find_last_of(StringConstIterator s, size_type pos = 0) const { - return find_last_of(s, pos, traits_type::length(s)); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - is_string_iterator::value, - size_type - >::type - find_first_not_of(StringConstIterator s, size_type pos, size_type n) const { - return sprout::string_detail::find_first_not_of_impl(begin(), size(), s, pos, n); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - is_string_iterator::value, - size_type - >::type - find_first_not_of(StringConstIterator s, size_type pos = 0) const { - return sprout::string_detail::find_first_not_of_impl(s, pos, traits_type::length(s)); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - is_string_iterator::value, - size_type - >::type - find_last_not_of(StringConstIterator s, size_type pos, size_type n) const { - return sprout::string_detail::find_last_not_of_impl(begin(), size(), s, pos, n); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - is_string_iterator::value, - size_type - >::type - find_last_not_of(StringConstIterator s, size_type pos = npos) const { - return sprout::string_detail::find_last_not_of_impl(s, pos, traits_type::length(s)); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - is_string_iterator::value, - int - >::type - compare(StringConstIterator s) const { - return compare(0, size(), s, traits_type::length(s)); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - is_string_iterator::value, - int - >::type - compare(size_type pos1, size_type n1, StringConstIterator s) const { - return compare(pos1, n1, s, traits_type::length(s)); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - is_string_iterator::value, - int - >::type - compare(size_type pos1, size_type n1, StringConstIterator s, size_type n2) const { - return !(size() < pos1) - ? sprout::string_detail::compare_impl(begin(), pos1, NS_SSCRISK_CEL_OR_SPROUT::min(n1, size() - pos1), s, n2) - : throw std::out_of_range("basic_string<>: index out of range") - ; - } -#endif - -#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION - SPROUT_CXX14_CONSTEXPR iterator - nth(size_type i) { - return i < size() - ? iterator(*this, i) - : (throw std::out_of_range("basic_string<>: index out of range"), iterator()) - ; - } - SPROUT_CONSTEXPR const_iterator - nth(size_type i) const { - return i < size() - ? const_iterator(*this, i) - : (throw std::out_of_range("basic_string<>: index out of range"), const_iterator()) - ; - } - SPROUT_CXX14_CONSTEXPR size_type - index_of(iterator p) SPROUT_NOEXCEPT { - return p.index(); - } - SPROUT_CONSTEXPR size_type - index_of(const_iterator p) const SPROUT_NOEXCEPT { - return p.index(); - } -#else - SPROUT_CXX14_CONSTEXPR iterator - nth(size_type i) { - return i < size() - ? data() + i - : (throw std::out_of_range("basic_string<>: index out of range"), iterator()) - ; - } - SPROUT_CONSTEXPR const_iterator - th(size_type i) const { - return i < size() - ? data() + i - : (throw std::out_of_range("basic_string<>: index out of range"), const_iterator()) - ; - }SPROUT_CXX14_CONSTEXPR - SPROUT_CONSTEXPR size_type - index_of(iterator p) SPROUT_NOEXCEPT { - return sprout::distance(begin(), p); - } - SPROUT_CONSTEXPR size_type - index_of(const_iterator p) const SPROUT_NOEXCEPT { - return sprout::distance(begin(), p); - } -#endif - SPROUT_CXX14_CONSTEXPR basic_string& - operator<<=(T const& rhs) { - push_back(rhs); - return *this; - } - SPROUT_CXX14_CONSTEXPR basic_string& - operator<<=(value_type const* rhs) { - return append(rhs); - } - template - SPROUT_CXX14_CONSTEXPR basic_string& - operator<<=(basic_string const& rhs) { - return append(rhs); - } - SPROUT_CXX14_CONSTEXPR basic_string& - operator<<=(std::initializer_list rhs) { - return append(rhs); - } - SPROUT_CXX14_CONSTEXPR basic_string& - operator>>=(T const& rhs) { - lengthcheck(size() + 1); - traits_type::move(begin() + 1, begin(), size()); - traits_type::assign(begin(), 1, rhs); - put_terminator(size() + 1); - return *this; - } - SPROUT_CXX14_CONSTEXPR basic_string& - operator>>=(value_type const* rhs) { - size_type rlen = traits_type::length(rhs); - lengthcheck(size() + rlen); - traits_type::move(begin() + rlen, begin(), size()); - traits_type::move(begin(), rhs, rlen); - put_terminator(size() + rlen); - return *this; - } - template - SPROUT_CXX14_CONSTEXPR basic_string& - operator>>=(basic_string const& rhs) { - lengthcheck(size() + rhs.size()); - traits_type::move(begin() + rhs.size(), begin(), size()); - traits_type::move(begin(), rhs.begin(), rhs.size()); - put_terminator(size() + rhs.size()); - return *this; - } - SPROUT_CXX14_CONSTEXPR basic_string& - operator>>=(std::initializer_list rhs) { - lengthcheck(size() + rhs.size()); - traits_type::move(begin() + rhs.size(), begin(), size()); - traits_type::move(begin(), rhs.begin(), rhs.size()); - put_terminator(size() + rhs.size()); - return *this; - } - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::basic_string::size_type sprout::basic_string::npos; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::basic_string::size_type sprout::basic_string::static_size; - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::basic_string& lhs, sprout::basic_string& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - namespace detail { - template - class string_construct_access { - public: - template - static SPROUT_CONSTEXPR sprout::basic_string - raw_construct(typename sprout::basic_string::size_type n, Args&&... args) { - return sprout::basic_string(sprout::detail::string_raw_construct_t(), n, SPROUT_FORWARD(Args, args)...); - } - }; - - template - struct make_construct_impl; - - template - struct make_construct_impl > { - private: - typedef sprout::basic_string copied_type; - private: - template - static SPROUT_CONSTEXPR typename copied_type::size_type - length_impl(sprout::array const& arr) { - return sprout::distance(arr.begin(), sprout::find(arr.begin(), arr.end(), T())); - } - public: - template - static SPROUT_CONSTEXPR typename copied_type::size_type - length(Args&&... args) { - return length_impl(sprout::make_array(SPROUT_FORWARD(Args, args)...)); - } - template - static SPROUT_CONSTEXPR copied_type - make(Args&&... args) { - typedef sprout::detail::string_construct_access access_type; - return access_type::raw_construct(length(args...), SPROUT_FORWARD(Args, args)...); - } - template - static SPROUT_CONSTEXPR copied_type - sized_make(typename copied_type::size_type size, Args&&... args) { - typedef sprout::detail::string_construct_access access_type; - return access_type::raw_construct(size, SPROUT_FORWARD(Args, args)...); - } - }; - } // namespace detail - - // - // to_string - // - template - inline SPROUT_CONSTEXPR sprout::basic_string - to_string(sprout::basic_string const& s) { - return s; - } - template - inline SPROUT_CONSTEXPR sprout::basic_string - to_string(T const(& arr)[N]) { - return sprout::basic_string(arr); - } - - // - // string_from_c_str - // - template - inline SPROUT_CONSTEXPR sprout::basic_string - string_from_c_str(T const* s, std::size_t n) { - return sprout::basic_string::from_c_str(s, n); - } - template - inline SPROUT_CONSTEXPR sprout::basic_string - string_from_c_str(T const* s) { - return sprout::basic_string::from_c_str(s); - } - template - inline SPROUT_NON_CONSTEXPR sprout::basic_string - string_from_c_str(std::basic_string const& s) { - return sprout::basic_string::from_c_str(s); - } -} // namespace sprout - -#include - -#endif // #ifndef SPROUT_STRING_STRING_HPP diff --git a/dsp/lib/sprout/sprout/string/string_to_float.hpp b/dsp/lib/sprout/sprout/string/string_to_float.hpp deleted file mode 100644 index 8094a88..0000000 --- a/dsp/lib/sprout/sprout/string/string_to_float.hpp +++ /dev/null @@ -1,117 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STRING_STRING_TO_FLOAT_HPP -#define SPROUT_STRING_STRING_TO_FLOAT_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template< - typename FloatType, typename Elem, std::size_t N, typename Traits - > - inline FloatType string_to_float_dynamic(sprout::basic_string const& str, std::size_t* idx) { - Elem* endptr = nullptr; - FloatType result = sprout::detail::str_to_float(str.c_str(), &endptr); - *idx = endptr - str.c_str(); - return result; - } - } - - // - // string_to_float - // - template< - typename FloatType, typename Elem, std::size_t N, typename Traits, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - string_to_float(sprout::basic_string const& str, std::size_t* idx) { - return !idx ? sprout::detail::str_to_float(str.begin()) - : sprout::detail::string_to_float_dynamic(str, idx) - ; - } - template< - typename FloatType, typename Elem, std::size_t N, typename Traits, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - string_to_float(sprout::basic_string const& str) { - return sprout::detail::str_to_float(str.begin()); - } - - // - // stof - // - template - inline SPROUT_CONSTEXPR float - stof(sprout::basic_string const& str, std::size_t* idx) { - return sprout::string_to_float(str, idx); - } - template - inline SPROUT_CONSTEXPR float - stof(sprout::basic_string const& str) { - return sprout::string_to_float(str); - } - - // - // stod - // - template - inline SPROUT_CONSTEXPR double - stod(sprout::basic_string const& str, std::size_t* idx) { - return sprout::string_to_float(str, idx); - } - template - inline SPROUT_CONSTEXPR double - stod(sprout::basic_string const& str) { - return sprout::string_to_float(str); - } - - // - // stold - // - template - inline SPROUT_CONSTEXPR long double - stold(sprout::basic_string const& str, std::size_t* idx) { - return sprout::string_to_float(str, idx); - } - template - inline SPROUT_CONSTEXPR long double - stold(sprout::basic_string const& str) { - return sprout::string_to_float(str); - } - - // - // from_string - // - template< - typename FloatType, typename Elem, std::size_t N, typename Traits, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - from_string(sprout::basic_string const& str, std::size_t* idx) { - return sprout::string_to_float(str, idx); - } - template< - typename FloatType, typename Elem, std::size_t N, typename Traits, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - from_string(sprout::basic_string const& str) { - return sprout::string_to_float(str); - } -} // namespace sprout - -#endif // #ifndef SPROUT_STRING_STRING_TO_FLOAT_HPP diff --git a/dsp/lib/sprout/sprout/string/string_to_int.hpp b/dsp/lib/sprout/sprout/string/string_to_int.hpp deleted file mode 100644 index 2025292..0000000 --- a/dsp/lib/sprout/sprout/string/string_to_int.hpp +++ /dev/null @@ -1,173 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STRING_STRING_TO_INT_HPP -#define SPROUT_STRING_STRING_TO_INT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline IntType - string_to_int_dynamic(sprout::basic_string const& str, std::size_t* idx, int base = 10) { - Elem* endptr = nullptr; - IntType result = sprout::detail::str_to_int(str.c_str(), &endptr, base); - *idx = endptr - str.c_str(); - return result; - } - } - - // - // string_to_int - // - template< - typename IntType, typename Elem, std::size_t N, typename Traits, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR IntType - string_to_int(sprout::basic_string const& str, std::size_t* idx, int base = 10) { - return !idx ? sprout::detail::str_to_int(str.begin(), base) - : sprout::detail::string_to_int_dynamic(str, idx, base) - ; - } - template< - typename IntType, typename Elem, std::size_t N, typename Traits, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR IntType - string_to_int(sprout::basic_string const& str, int base = 10) { - return sprout::detail::str_to_int(str.begin(), base); - } - - // - // stoi - // - template - inline SPROUT_CONSTEXPR int - stoi(sprout::basic_string const& str, std::size_t* idx, int base = 10) { - return sprout::string_to_int(str, idx, base); - } - template - inline SPROUT_CONSTEXPR int - stoi(sprout::basic_string const& str, int base = 10) { - return sprout::string_to_int(str, base); - } - - // - // stol - // - template - inline SPROUT_CONSTEXPR long - stol(sprout::basic_string const& str, std::size_t* idx, int base = 10) { - return sprout::string_to_int(str, idx, base); - } - template - inline SPROUT_CONSTEXPR long - stol(sprout::basic_string const& str, int base = 10) { - return sprout::string_to_int(str, base); - } - - // - // stoul - // - template - inline SPROUT_CONSTEXPR unsigned long - stoul(sprout::basic_string const& str, std::size_t* idx, int base = 10) { - return sprout::string_to_int(str, idx, base); - } - template - inline SPROUT_CONSTEXPR unsigned long - stoul(sprout::basic_string const& str, int base = 10) { - return sprout::string_to_int(str, base); - } - - // - // stoll - // - template - inline SPROUT_CONSTEXPR long long - stoll(sprout::basic_string const& str, std::size_t* idx, int base = 10) { - return sprout::string_to_int(str, idx, base); - } - template - inline SPROUT_CONSTEXPR long long - stoll(sprout::basic_string const& str, int base = 10) { - return sprout::string_to_int(str, base); - } - - // - // stoull - // - template - inline SPROUT_CONSTEXPR unsigned long long - stoull(sprout::basic_string const& str, std::size_t* idx, int base = 10) { - return sprout::string_to_int(str, idx, base); - } - template - inline SPROUT_CONSTEXPR unsigned long long - stoull(sprout::basic_string const& str, int base = 10) { - return sprout::string_to_int(str, base); - } - - // - // stoimax - // - template - inline SPROUT_CONSTEXPR std::intmax_t - stoimax(sprout::basic_string const& str, std::size_t* idx, int base = 10) { - return sprout::string_to_int(str, idx, base); - } - template - inline SPROUT_CONSTEXPR std::intmax_t - stoimax(sprout::basic_string const& str, int base = 10) { - return sprout::string_to_int(str, base); - } - - // - // stoumax - // - template - inline SPROUT_CONSTEXPR std::uintmax_t - stoumax(sprout::basic_string const& str, std::size_t* idx, int base = 10) { - return sprout::string_to_int(str, idx, base); - } - template - inline SPROUT_CONSTEXPR std::uintmax_t - stoumax(sprout::basic_string const& str, int base = 10) { - return sprout::string_to_int(str, base); - } - - // - // from_string - // - template< - typename IntType, typename Elem, std::size_t N, typename Traits, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR IntType - from_string(sprout::basic_string const& str, std::size_t* idx) { - return sprout::string_to_int(str, idx, 0); - } - template< - typename IntType, typename Elem, std::size_t N, typename Traits, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR IntType - from_string(sprout::basic_string const& str) { - return sprout::string_to_int(str, 0); - } -} // namespace sprout - -#endif // #ifndef SPROUT_STRING_STRING_TO_INT_HPP diff --git a/dsp/lib/sprout/sprout/string/to_string.hpp b/dsp/lib/sprout/sprout/string/to_string.hpp deleted file mode 100644 index 4299806..0000000 --- a/dsp/lib/sprout/sprout/string/to_string.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STRING_TO_STRING_HPP -#define SPROUT_STRING_TO_STRING_HPP - -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_STRING_TO_STRING_HPP diff --git a/dsp/lib/sprout/sprout/string/to_string_array.hpp b/dsp/lib/sprout/sprout/string/to_string_array.hpp deleted file mode 100644 index 6c07efa..0000000 --- a/dsp/lib/sprout/sprout/string/to_string_array.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STRING_TO_STRING_ARRAY_HPP -#define SPROUT_STRING_TO_STRING_ARRAY_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // to_string_array - // [[deprecated]] - // - template - SPROUT_DEPRECATED - inline SPROUT_CONSTEXPR sprout::array - to_string_array(Types&&... args) { - return sprout::convert_array(sprout::to_string_value(), SPROUT_FORWARD(Types, args)...); - } -} // namespace sprout - -#endif // #ifndef SPROUT_STRING_TO_STRING_ARRAY_HPP diff --git a/dsp/lib/sprout/sprout/string/to_string_value.hpp b/dsp/lib/sprout/sprout/string/to_string_value.hpp deleted file mode 100644 index 93925cd..0000000 --- a/dsp/lib/sprout/sprout/string/to_string_value.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STRING_TO_STRING_VALUE_HPP -#define SPROUT_STRING_TO_STRING_VALUE_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // to_string_value - // - struct to_string_value { - public: - template - SPROUT_CONSTEXPR decltype(sprout::to_string(std::declval())) - operator()(T&& x) - const SPROUT_NOEXCEPT_IF_EXPR(sprout::to_string(std::declval())) - { - return sprout::to_string(SPROUT_FORWARD(T, x)); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_STRING_TO_STRING_VALUE_HPP diff --git a/dsp/lib/sprout/sprout/string/tuple.hpp b/dsp/lib/sprout/sprout/string/tuple.hpp deleted file mode 100644 index 567eb39..0000000 --- a/dsp/lib/sprout/sprout/string/tuple.hpp +++ /dev/null @@ -1,69 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STRING_TUPLE_HPP -#define SPROUT_STRING_TUPLE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // tuple_get - // - template - inline SPROUT_CONSTEXPR T& - tuple_get(sprout::basic_string& t) SPROUT_NOEXCEPT { - static_assert(I < N, "tuple_get: index out of range"); - return t[I]; - } - template - inline SPROUT_CONSTEXPR T const& - tuple_get(sprout::basic_string const& t) SPROUT_NOEXCEPT { - static_assert(I < N, "tuple_get: index out of range"); - return t[I]; - } - template - inline SPROUT_CONSTEXPR T&& - tuple_get(sprout::basic_string&& t) SPROUT_NOEXCEPT { - return sprout::move(sprout::tuples::get(t)); - } -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // tuple_size - // - template - struct tuple_size > - : public sprout::integral_constant - {}; - - // - // tuple_element - // - template - struct tuple_element > - : public std::conditional<(I < N), sprout::identity, sprout::detail::nil_base>::type - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -#endif // #ifndef SPROUT_STRING_TUPLE_HPP diff --git a/dsp/lib/sprout/sprout/string/type_traits.hpp b/dsp/lib/sprout/sprout/string/type_traits.hpp deleted file mode 100644 index 9d34c60..0000000 --- a/dsp/lib/sprout/sprout/string/type_traits.hpp +++ /dev/null @@ -1,141 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_STRING_TYPE_TRAITS_HPP -#define SPROUT_STRING_TYPE_TRAITS_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // string_t - // - template - struct string_t { - public: - typedef sprout::basic_string type; - }; - // - // wstring_t - // - template - struct wstring_t { - public: - typedef sprout::basic_string type; - }; -#if SPROUT_USE_UNICODE_LITERALS - // - // u16string_t - // - template - struct u16string_t { - public: - typedef sprout::basic_string type; - }; - // - // u32string_t - // - template - struct u32string_t { - public: - typedef sprout::basic_string type; - }; -#endif - - // - // is_basic_string - // - template - struct is_basic_string - : public sprout::false_type - {}; - template - struct is_basic_string - : public sprout::is_basic_string - {}; - template - struct is_basic_string - : public sprout::is_basic_string - {}; - template - struct is_basic_string > - : public sprout::true_type - {}; - - // - // is_string_of - // - template - struct is_string_of - : public sprout::false_type - {}; - template - struct is_string_of - : public sprout::is_string_of - {}; - template - struct is_string_of - : public sprout::is_string_of - {}; - template - struct is_string_of, Elem> - : public sprout::true_type - {}; - - // - // is_string - // - template - struct is_string - : public sprout::is_string_of - {}; - // - // is_wstring - // - template - struct is_wstring - : public sprout::is_string_of - {}; -#if SPROUT_USE_UNICODE_LITERALS - // - // is_u16string - // - template - struct is_u16string - : public sprout::is_string_of - {}; - // - // is_u32string - // - template - struct is_u32string - : public sprout::is_string_of - {}; -#endif - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_basic_string_v = sprout::is_basic_string::value; - template - SPROUT_STATIC_CONSTEXPR bool is_string_of_v = sprout::is_string_of::value; - template - SPROUT_STATIC_CONSTEXPR bool is_string_v = sprout::is_string::value; - template - SPROUT_STATIC_CONSTEXPR bool is_wstring_v = sprout::is_wstring::value; -#if SPROUT_USE_UNICODE_LITERALS - template - SPROUT_STATIC_CONSTEXPR bool is_u16string_v = sprout::is_u16string::value; - template - SPROUT_STATIC_CONSTEXPR bool is_u32string_v = sprout::is_u32string::value; -#endif -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_STRING_TYPE_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/sub_array.hpp b/dsp/lib/sprout/sprout/sub_array.hpp deleted file mode 100644 index ddfcbc8..0000000 --- a/dsp/lib/sprout/sprout/sub_array.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_SUB_ARRAY_HPP -#define SPROUT_SUB_ARRAY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_SUB_ARRAY_HPP diff --git a/dsp/lib/sprout/sprout/sub_array/array_sub.hpp b/dsp/lib/sprout/sprout/sub_array/array_sub.hpp deleted file mode 100644 index dfa41cd..0000000 --- a/dsp/lib/sprout/sprout/sub_array/array_sub.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_SUB_ARRAY_ARRAY_SUB_HPP -#define SPROUT_SUB_ARRAY_ARRAY_SUB_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // array_sub - // - template - struct array_sub - : public sprout::identity > > - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using array_sub_t = typename sprout::array_sub::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_SUB_ARRAY_ARRAY_SUB_HPP diff --git a/dsp/lib/sprout/sprout/sub_array/comparison.hpp b/dsp/lib/sprout/sprout/sub_array/comparison.hpp deleted file mode 100644 index 9c95a46..0000000 --- a/dsp/lib/sprout/sprout/sub_array/comparison.hpp +++ /dev/null @@ -1,61 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_SUB_ARRAY_COMPARISON_HPP -#define SPROUT_SUB_ARRAY_COMPARISON_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // operator== - // operator!= - // operator< - // operator> - // operator<= - // operator>= - // - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::sub_array const& lhs, sprout::sub_array const& rhs) { - return sprout::equal(sprout::begin(lhs), sprout::end(lhs), sprout::begin(rhs)); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::sub_array const& lhs, sprout::sub_array const& rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator<(sprout::sub_array const& lhs, sprout::sub_array const& rhs) { - return sprout::lexicographical_compare( - sprout::begin(lhs), sprout::end(lhs), - sprout::begin(rhs), sprout::end(rhs) - ); - } - template - inline SPROUT_CONSTEXPR bool - operator>(sprout::sub_array const& lhs, sprout::sub_array const& rhs) { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator<=(sprout::sub_array const& lhs, sprout::sub_array const& rhs) { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(sprout::sub_array const& lhs, sprout::sub_array const& rhs) { - return !(lhs < rhs); - } -} // namespace sprout - -#endif // #ifndef SPROUT_SUB_ARRAY_COMPARISON_HPP diff --git a/dsp/lib/sprout/sprout/sub_array/container.hpp b/dsp/lib/sprout/sprout/sub_array/container.hpp deleted file mode 100644 index 20f38a2..0000000 --- a/dsp/lib/sprout/sprout/sub_array/container.hpp +++ /dev/null @@ -1,131 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_SUB_ARRAY_CONTAINER_HPP -#define SPROUT_SUB_ARRAY_CONTAINER_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // container_construct_traits - // - template - struct container_construct_traits > { - private: - typedef typename sprout::sub_array::internal_type internal_type; - typedef typename sprout::container_construct_traits::copied_type internal_copied_type; - public: - typedef sprout::sub_array copied_type; - private: - static SPROUT_CONSTEXPR copied_type - make_impl(internal_copied_type const& internal_copied) { - return copied_type(internal_copied, sprout::begin(internal_copied), sprout::end(internal_copied)); - } - template - static SPROUT_CONSTEXPR copied_type - remake_impl( - Cont&& cont, - typename sprout::container_traits >::difference_type size, - internal_copied_type const& internal_copied - ) - { - return copied_type( - internal_copied, - sprout::next(sprout::begin(internal_copied), sprout::internal_begin_offset(cont)), - sprout::next(sprout::begin(internal_copied), sprout::internal_begin_offset(cont) + size) - ); - } - public: - template - static SPROUT_CONSTEXPR copied_type - deep_copy(Cont&& cont) { - return copied_type( - sprout::deep_copy(sprout::get_internal(cont)), - sprout::internal_begin_offset(cont), - sprout::internal_end_offset(cont) - ); - } - template - static SPROUT_CONSTEXPR copied_type - make(Args&&... args) { - return make_impl( - sprout::make(SPROUT_FORWARD(Args, args)...) - ); - } - template - static SPROUT_CONSTEXPR copied_type - remake(Cont&& cont, typename sprout::container_traits >::difference_type size, Args&&... args) { - return remake_impl( - SPROUT_FORWARD(Cont, cont), - size, - sprout::remake(cont, size, SPROUT_FORWARD(Args, args)...) - ); - } - }; - - // - // container_transform_traits - // - template - struct container_transform_traits > { - private: - typedef typename sprout::sub_array::internal_type internal_type; - typedef typename sprout::container_construct_traits::copied_type internal_copied_type; - public: - template >::size_type Size> - struct rebind_size { - public: - typedef sprout::sub_array< - typename sprout::container_transform_traits::template rebind_size::type - > type; - }; - template - struct rebind_type { - public: - typedef sprout::sub_array< - typename sprout::container_transform_traits::template rebind_type::type - > type; - }; - }; - - // - // sub_container_traits - // - template - struct sub_container_traits > { - private: - static typename sprout::sub_array::param_type - call(sprout::sub_array& cont) { - return cont.get_internal(); - } - static SPROUT_CONSTEXPR typename sprout::sub_array::const_param_type - call(sprout::sub_array const& cont) { - return cont.get_internal(); - } - public: - template - struct internal { - public: - typedef decltype(call(std::declval())) type; - }; - public: - template - static SPROUT_CONSTEXPR typename internal::type - get_internal(Cont&& cont) { - return call(SPROUT_FORWARD(Cont, cont)); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_SUB_ARRAY_CONTAINER_HPP diff --git a/dsp/lib/sprout/sprout/sub_array/hash.hpp b/dsp/lib/sprout/sprout/sub_array/hash.hpp deleted file mode 100644 index 7fbb3e7..0000000 --- a/dsp/lib/sprout/sprout/sub_array/hash.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_SUB_ARRAY_HASH_HPP -#define SPROUT_SUB_ARRAY_HASH_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // hash_value - // - template - SPROUT_CONSTEXPR std::size_t - hash_value(sprout::sub_array const& v) { - return sprout::hash_range(v); - } -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // hash - // - template - struct hash > - : public sprout::hash > - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -#endif // #ifndef SPROUT_SUB_ARRAY_HASH_HPP diff --git a/dsp/lib/sprout/sprout/sub_array/sub.hpp b/dsp/lib/sprout/sprout/sub_array/sub.hpp deleted file mode 100644 index 4e28203..0000000 --- a/dsp/lib/sprout/sprout/sub_array/sub.hpp +++ /dev/null @@ -1,321 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_SUB_ARRAY_SUB_HPP -#define SPROUT_SUB_ARRAY_SUB_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // sub - // - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - sub( - Container& arr, - typename sprout::container_traits >::const_iterator first, - typename sprout::container_traits >::const_iterator last - ) - { - return sprout::sub_array(arr, first, last); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - sub( - Container& arr, - typename sprout::container_traits >::const_iterator first - ) - { - return sprout::sub(arr, first, sprout::end(arr)); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - sub( - Container& arr, - typename sprout::container_traits >::difference_type to_first, - typename sprout::container_traits >::difference_type to_last - ) - { - return sprout::sub_window(arr, to_first, to_last); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - sub( - Container& arr, - typename sprout::container_traits >::difference_type to_first = 0 - ) - { - return sprout::sub_window(arr, to_first); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - sub( - Container const& arr, - typename sprout::container_traits >::const_iterator first, - typename sprout::container_traits >::const_iterator last - ) - { - return sprout::sub_array(arr, first, last); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - sub( - Container const& arr, - typename sprout::container_traits >::const_iterator first - ) - { - return sprout::sub(arr, first, sprout::end(arr)); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - sub( - Container const& arr, - typename sprout::container_traits >::difference_type to_first, - typename sprout::container_traits >::difference_type to_last - ) - { - return sprout::sub_window(arr, to_first, to_last); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - sub( - Container const& arr, - typename sprout::container_traits >::difference_type to_first = 0 - ) - { - return sprout::sub_window(arr, to_first); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, Container>::type - sub( - Container const& arr, - typename sprout::container_traits::const_iterator first, - typename sprout::container_traits::const_iterator last - ) - { - return Container(arr, first, last); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, Container>::type - sub( - Container const& arr, - typename sprout::container_traits::const_iterator first - ) - { - return sprout::sub(arr, first, sprout::end(arr)); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, Container>::type - sub( - Container const& arr, - typename sprout::container_traits::difference_type to_first, - typename sprout::container_traits::difference_type to_last - ) - { - return sprout::sub_window(arr, to_first, to_last); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, Container>::type - sub( - Container const& arr, - typename sprout::container_traits::difference_type to_first = 0 - ) - { - return sprout::sub_window(arr, to_first); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - sub(Container& arr) { - return sprout::sub(arr, sprout::begin(arr), sprout::end(arr)); - } - - // - // csub - // - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - csub( - Container const& arr, - typename sprout::container_traits >::const_iterator first, - typename sprout::container_traits >::const_iterator last - ) - { - return sprout::sub_array(arr, first, last); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - csub( - Container const& arr, - typename sprout::container_traits >::const_iterator first - ) - { - return sprout::csub(arr, first, sprout::end(arr)); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - csub( - Container const& arr, - typename sprout::container_traits >::difference_type to_first, - typename sprout::container_traits >::difference_type to_last - ) - { - return sprout::csub_window(arr, to_first, to_last); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - csub( - Container const& arr, - typename sprout::container_traits >::difference_type to_first = 0 - ) - { - return sprout::csub_window(arr, to_first); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - csub( - Container const& arr, - typename sprout::container_traits::const_iterator first, - typename sprout::container_traits::const_iterator last - ) - { - return sprout::sub_array(arr.get_array(), first, last); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - csub( - Container const& arr, - typename sprout::container_traits::const_iterator first - ) - { - return sprout::csub(arr, first, sprout::end(arr)); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - csub( - Container const& arr, - typename sprout::container_traits::difference_type to_first, - typename sprout::container_traits::difference_type to_last - ) - { - return sprout::csub_window(arr, to_first, to_last); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - csub( - Container const& arr, - typename sprout::container_traits::difference_type to_first = 0 - ) - { - return sprout::csub_window(arr, to_first); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - csub(Container const& arr) { - return sprout::csub(arr, sprout::begin(arr), sprout::end(arr)); - } - - // - // sub_copy - // - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - sub_copy( - Container const& arr, - typename sprout::container_traits::const_iterator first, - typename sprout::container_traits::const_iterator last - ) - { - return sprout::sub_array(arr, first, last); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - sub_copy( - Container const& arr, - typename sprout::container_traits::const_iterator first - ) - { - return sprout::sub_copy(arr, first, sprout::end(arr)); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - sub_copy( - Container const& arr, - typename sprout::container_traits::difference_type to_first, - typename sprout::container_traits::difference_type to_last - ) - { - return sprout::sub_window_copy(arr, to_first, to_last); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - sub_copy( - Container const& arr, - typename sprout::container_traits::difference_type to_first = 0 - ) - { - return sprout::sub_window_copy(arr, to_first); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - sub_copy( - Container const& arr, - typename sprout::container_traits::const_iterator first, - typename sprout::container_traits::const_iterator last - ) - { - return sprout::sub_array(arr.get_array(), first, last); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - sub_copy( - Container const& arr, - typename sprout::container_traits::const_iterator first - ) - { - return sprout::sub_copy(arr, first, sprout::end(arr)); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - sub_copy( - Container const& arr, - typename sprout::container_traits::difference_type to_first, - typename sprout::container_traits::difference_type to_last - ) - { - return sprout::sub_window_copy(arr, to_first, to_last); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - sub_copy( - Container const& arr, - typename sprout::container_traits::difference_type to_first = 0 - ) - { - return sprout::sub_window_copy(arr, to_first); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - sub_copy(Container const& arr) { - return sprout::sub_copy(arr, sprout::begin(arr), sprout::end(arr)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_SUB_ARRAY_SUB_HPP diff --git a/dsp/lib/sprout/sprout/sub_array/sub_array.hpp b/dsp/lib/sprout/sprout/sub_array/sub_array.hpp deleted file mode 100644 index f68b6fd..0000000 --- a/dsp/lib/sprout/sprout/sub_array/sub_array.hpp +++ /dev/null @@ -1,520 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_SUB_ARRAY_SUB_ARRAY_HPP -#define SPROUT_SUB_ARRAY_SUB_ARRAY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - struct is_non_reference_array_tag {}; - struct is_not_non_reference_array_tag {}; - - template - class sub_array_impl { - public: - typedef Container container_type; - typedef typename std::remove_reference::type internal_type; - public: - SPROUT_STATIC_CONSTEXPR bool is_reference = std::is_reference::value; - SPROUT_STATIC_CONSTEXPR bool is_const = std::is_const::value; - public: - typedef typename sprout::container_traits::const_iterator impl_const_iterator; - typedef typename sprout::container_traits::difference_type impl_difference_type; - public: - typedef typename std::conditional< - is_reference, - internal_type*, - typename std::remove_const::type - >::type holder_type; - typedef typename std::conditional< - is_reference, - internal_type&, - internal_type const& - >::type param_type; - typedef internal_type const& const_param_type; - public: - typedef typename std::conditional< - std::is_array::value, - sprout::detail::is_non_reference_array_tag, - sprout::detail::is_not_non_reference_array_tag - >::type array_tag; - public: - template - static SPROUT_CONSTEXPR typename std::enable_if< - std::is_reference::value, - holder_type - >::type to_holder(param_type arr) { - return &arr; - } - template - static SPROUT_CONSTEXPR typename std::enable_if< - !std::is_reference::value, - holder_type const& - >::type to_holder(param_type arr) { - return arr; - } - template - static SPROUT_CONSTEXPR typename std::enable_if< - std::is_reference::value, - param_type - >::type to_param(holder_type arr) { - return *arr; - } - template - static SPROUT_CONSTEXPR typename std::enable_if< - !std::is_reference::value, - param_type - >::type to_param(holder_type& arr) { - return arr; - } - template - static SPROUT_CONSTEXPR typename std::enable_if< - !std::is_reference::value, - param_type - >::type to_param(holder_type const& arr) { - return arr; - } - template - static SPROUT_CONSTEXPR typename std::enable_if< - std::is_reference::value, - const_param_type - >::type to_const_param(holder_type arr) { - return *arr; - } - template - static SPROUT_CONSTEXPR typename std::enable_if< - !std::is_reference::value, - const_param_type - >::type to_const_param(holder_type const& arr) { - return arr; - } - template - static SPROUT_CONSTEXPR typename std::enable_if< - std::is_reference::value, - internal_type& - >::type to_held(holder_type arr) { - return *arr; - } - template - static SPROUT_CONSTEXPR typename std::enable_if< - !std::is_reference::value, - internal_type& - >::type to_held(holder_type& arr) { - return arr; - } - template - static SPROUT_CONSTEXPR typename std::enable_if< - !std::is_reference::value, - internal_type const& - >::type to_held(holder_type const& arr) { - return arr; - } - template - static SPROUT_CONSTEXPR typename std::enable_if< - std::is_reference::value, - internal_type const& - >::type to_const_held(holder_type arr) { - return *arr; - } - template - static SPROUT_CONSTEXPR typename std::enable_if< - !std::is_reference::value, - internal_type const& - >::type to_const_held(holder_type const& arr) { - return arr; - } - public: - holder_type array_; - impl_difference_type to_first_; - impl_difference_type to_last_; - public: - SPROUT_CONSTEXPR sub_array_impl() - : array_() - , to_first_() - , to_last_() - {} - sub_array_impl(sub_array_impl const&) = default; - public: - template - SPROUT_CONSTEXPR sub_array_impl( - ContainerTag, - param_type arr, - sprout::index_tuple, - impl_const_iterator first, - impl_const_iterator last, - typename std::enable_if::value>::type* = 0 - ) - : array_{to_holder(arr)[Indexes]...} - , to_first_(sprout::distance(sprout::cbegin(arr), first)) - , to_last_(sprout::distance(sprout::cbegin(arr), last)) - {} - template - SPROUT_CONSTEXPR sub_array_impl( - ContainerTag, - param_type arr, - sprout::index_tuple, - impl_const_iterator first, - impl_const_iterator last, - typename std::enable_if::value>::type* = 0 - ) - : array_(to_holder(arr)) - , to_first_(sprout::distance(sprout::cbegin(arr), first)) - , to_last_(sprout::distance(sprout::cbegin(arr), last)) - {} - template - SPROUT_CONSTEXPR sub_array_impl( - ContainerTag, - param_type arr, - sprout::index_tuple, - impl_difference_type to_first, - impl_difference_type to_last, - typename std::enable_if::value>::type* = 0 - ) - : array_{to_holder(arr)[Indexes]...} - , to_first_(to_first) - , to_last_(to_last) - {} - template - SPROUT_CONSTEXPR sub_array_impl( - ContainerTag, - param_type arr, - sprout::index_tuple, - impl_difference_type to_first, - impl_difference_type to_last, - typename std::enable_if::value>::type* = 0 - ) - : array_(to_holder(arr)) - , to_first_(to_first) - , to_last_(to_last) - {} - }; - } // namespace detail - - // - // sub_array - // - template - class sub_array - : public sprout::container_traits_facade::type> - { - private: - typedef sprout::detail::sub_array_impl impl_type; - typedef sprout::container_traits_facade::type> facade_type; - public: - typedef typename impl_type::container_type container_type; - typedef typename impl_type::internal_type internal_type; - public: - SPROUT_STATIC_CONSTEXPR bool is_reference = impl_type::is_reference; - SPROUT_STATIC_CONSTEXPR bool is_const = impl_type::is_const; - public: - typedef typename facade_type::value_type value_type; - typedef typename facade_type::iterator iterator; - typedef typename facade_type::const_iterator const_iterator; - typedef typename facade_type::reference reference; - typedef typename facade_type::const_reference const_reference; - typedef typename facade_type::size_type size_type; - typedef typename facade_type::difference_type difference_type; - typedef typename facade_type::pointer pointer; - typedef typename facade_type::const_pointer const_pointer; - public: - SPROUT_STATIC_CONSTEXPR size_type enumerable_size = sprout::detail::static_size_or_zero::value; - public: - typedef typename impl_type::holder_type holder_type; - typedef typename impl_type::param_type param_type; - typedef typename impl_type::const_param_type const_param_type; - private: - typedef typename impl_type::array_tag array_tag; - private: - impl_type impl_; - public: - // construct/copy/destroy: - SPROUT_CONSTEXPR sub_array() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - sub_array(sub_array const&) = default; - SPROUT_CONSTEXPR sub_array(param_type arr, const_iterator first, const_iterator last) - : impl_( - array_tag(), - arr, - sprout::make_index_tuple::make(), - first, - last - ) - {} - SPROUT_CONSTEXPR sub_array(param_type arr, difference_type to_first, difference_type to_last) - : impl_( - array_tag(), - arr, - sprout::make_index_tuple::make(), - to_first, - to_last - ) - {} - SPROUT_CONSTEXPR sub_array(sub_array const& other, const_iterator first, const_iterator last) - : impl_( - array_tag(), - impl_type::template to_param(other.impl_.array_), - sprout::make_index_tuple::make(), - sprout::distance(sprout::begin(other.get_internal()), first), - sprout::distance(sprout::begin(other.get_internal()), last) - ) - {} - SPROUT_CONSTEXPR sub_array(sub_array const& other, difference_type to_first, difference_type to_last) - : impl_( - array_tag(), - impl_type::template to_param(other.impl_.array_), - sprout::make_index_tuple::make(), - other.impl_.to_first_ + to_first, - other.impl_.to_first_ + to_last - ) - {} - template - SPROUT_CXX14_CONSTEXPR sub_array& operator=(sub_array const& rhs) { - impl_.array_ = rhs.impl_.array_; - impl_.to_first_ = rhs.impl_.to_first_; - impl_.to_last_ = rhs.impl_.to_last_; - return *this; - } - template - SPROUT_CXX14_CONSTEXPR sub_array& operator=(sub_array&& rhs) { - impl_.array_ = sprout::move(rhs.impl_.array_); - impl_.to_first_ = sprout::move(rhs.impl_.to_first_); - impl_.to_last_ = sprout::move(rhs.impl_.to_last_); - return *this; - } - - SPROUT_CXX14_CONSTEXPR void fill(const_reference value) { - sprout::fill_n(begin(), size(), value); - } - template - SPROUT_CXX14_CONSTEXPR void swap(sub_array& other) - SPROUT_NOEXCEPT_IF_EXPR(sprout::swap(other.impl_.array_, impl_.array_)) - { - sprout::swap(other.impl_.array_, impl_.array_); - sprout::swap(other.impl_.to_first_, impl_.to_first_); - sprout::swap(other.impl_.to_last_, impl_.to_last_); - } - // iterators: - SPROUT_CXX14_CONSTEXPR iterator begin() { - return sprout::next(sprout::begin(get_internal()), impl_.to_first_); - } - SPROUT_CONSTEXPR const_iterator begin() const { - return sprout::next(sprout::begin(get_internal()), impl_.to_first_); - } - SPROUT_CXX14_CONSTEXPR iterator end() { - return sprout::next(sprout::begin(get_internal()), impl_.to_last_); - } - SPROUT_CONSTEXPR const_iterator end() const { - return sprout::next(sprout::begin(get_internal()), impl_.to_last_); - } - SPROUT_CONSTEXPR const_iterator cbegin() const { - return sprout::next(sprout::begin(get_internal()), impl_.to_first_); - } - SPROUT_CONSTEXPR const_iterator cend() const { - return sprout::next(sprout::begin(get_internal()), impl_.to_last_); - } - // capacity: - SPROUT_CONSTEXPR size_type size() const { - return impl_.to_last_ - impl_.to_first_; - } - SPROUT_CONSTEXPR size_type max_size() const { - return size(); - } - SPROUT_CONSTEXPR bool empty() const { - return impl_.to_first_ == impl_.to_last_; - } - // element access: - SPROUT_CXX14_CONSTEXPR reference operator[](size_type i) { - return *sprout::next(sprout::begin(get_internal()), impl_.to_first_ + i); - } - SPROUT_CONSTEXPR const_reference operator[](size_type i) const { - return *sprout::next(sprout::begin(get_internal()), impl_.to_first_ + i); - } - SPROUT_CXX14_CONSTEXPR reference at(size_type i) { - return i < size() ? *sprout::next(sprout::begin(get_internal()), impl_.to_first_ + i) - : (throw std::out_of_range("sub_array<>: index out of range"), *sprout::next(sprout::begin(get_internal()), impl_.to_first_ + i)) - ; - } - SPROUT_CONSTEXPR const_reference at(size_type i) const { - return i < size() ? *sprout::next(sprout::begin(get_internal()), impl_.to_first_ + i) - : (throw std::out_of_range("sub_array<>: index out of range"), *sprout::next(sprout::begin(get_internal()), impl_.to_first_ + i)) - ; - } - SPROUT_CXX14_CONSTEXPR reference front() { - return *sprout::next(sprout::begin(get_internal()), impl_.to_first_); - } - SPROUT_CONSTEXPR const_reference front() const { - return *sprout::next(sprout::begin(get_internal()), impl_.to_first_); - } - SPROUT_CXX14_CONSTEXPR reference back() { - return *sprout::next(sprout::begin(get_internal()), impl_.to_last_ - 1); - } - SPROUT_CONSTEXPR const_reference back() const { - return *sprout::next(sprout::begin(get_internal()), impl_.to_last_ - 1); - } - - SPROUT_CXX14_CONSTEXPR pointer data() { - return get_internal().data() + impl_.to_first_; - } - SPROUT_CONSTEXPR const_pointer data() const { - return get_internal().data() + impl_.to_first_; - } - // others: - SPROUT_CXX14_CONSTEXPR pointer c_array() { - return data(); - } - SPROUT_CONSTEXPR const_pointer c_array() const { - return data(); - } - SPROUT_CXX14_CONSTEXPR void assign(const_reference value) { - fill(value); - } - SPROUT_CXX14_CONSTEXPR void rangecheck(size_type i) const { - return i >= size() ? throw std::out_of_range("uuid: index out of range") - : (void)0 - ; - } - - SPROUT_CXX14_CONSTEXPR internal_type& get_internal() { - return impl_type::template to_held(impl_.array_); - } - SPROUT_CONSTEXPR internal_type const& get_internal() const { - return impl_type::template to_const_held(impl_.array_); - } - SPROUT_CXX14_CONSTEXPR internal_type& get_array() { - return impl_type::template to_held(impl_.array_); - } - SPROUT_CONSTEXPR internal_type const& get_array() const { - return impl_type::template to_const_held(impl_.array_); - } - SPROUT_CONSTEXPR difference_type to_first() const { - return impl_.to_first_; - } - SPROUT_CONSTEXPR difference_type to_last() const { - return impl_.to_last_; - } - SPROUT_CONSTEXPR difference_type from_begin() const { - return impl_.to_first_; - } - SPROUT_CONSTEXPR difference_type from_end() const { - return impl_.to_last_ - sprout::size(get_internal()); - } - - SPROUT_CXX14_CONSTEXPR sub_array& window(difference_type to_first = 0) { - impl_.to_first_ = to_first; - impl_.to_last_ = size(); - return *this; - } - SPROUT_CXX14_CONSTEXPR sub_array& window(difference_type to_first, difference_type to_last) { - impl_.to_first_ = to_first; - impl_.to_last_ = to_last; - return *this; - } - SPROUT_CONSTEXPR sub_array window(difference_type to_first = 0) const { - return sub_array(impl_.array_, to_first, size()); - } - SPROUT_CONSTEXPR sub_array window(difference_type to_first, difference_type to_last) const { - return sub_array(impl_.array_, to_first, to_last); - } - SPROUT_CONSTEXPR sub_array cwindow(difference_type to_first = 0) const { - return window(to_first); - } - SPROUT_CONSTEXPR sub_array cwindow(difference_type to_first, difference_type to_last) const { - return window(to_first, to_last); - } - - SPROUT_CXX14_CONSTEXPR sub_array& offset(difference_type from_begin = 0, difference_type from_end = 0) { - impl_.to_first_ += from_begin; - impl_.to_last_ += from_end; - return *this; - } - SPROUT_CONSTEXPR sub_array offset(difference_type from_begin = 0, difference_type from_end = 0) const { - return sub_array(impl_.array_, impl_.to_first_ + from_begin, impl_.to_last_ + from_end); - } - SPROUT_CONSTEXPR sub_array coffset(difference_type from_begin = 0, difference_type from_end = 0) const { - return offset(from_begin, from_end); - } - - SPROUT_CXX14_CONSTEXPR iterator nth(size_type i) { - return i < size() - ? sprout::next(begin(), i) - : (throw std::out_of_range("sub_array<>: index out of range"), iterator()) - ; - } - SPROUT_CONSTEXPR const_iterator nth(size_type i) const { - return i < size() - ? sprout::next(begin(), i) - : (throw std::out_of_range("array<>: index out of range"), const_iterator()) - ; - } - SPROUT_CXX14_CONSTEXPR size_type index_of(iterator p) { - return sprout::distance(begin(), p); - } - SPROUT_CONSTEXPR size_type index_of(const_iterator p) const { - return sprout::distance(begin(), p); - } - - SPROUT_CXX14_CONSTEXPR void push_back(value_type const& x) { - impl_.array_[impl_.to_last_] = x; - ++impl_.to_last_; - } - SPROUT_CXX14_CONSTEXPR void push_back(value_type&& x) { - impl_.array_[impl_.to_last_] = sprout::move(x); - ++impl_.to_last_; - } - SPROUT_CXX14_CONSTEXPR void pop_back() { - impl_.array_[impl_.to_last_ - 1] = value_type(); - --impl_.to_last_; - } - SPROUT_CXX14_CONSTEXPR void drop_back() { - --impl_.to_last_; - } - SPROUT_CXX14_CONSTEXPR void push_front(value_type const& x) { - impl_.array_[impl_.to_first_ - 1] = x; - --impl_.to_first_; - } - SPROUT_CXX14_CONSTEXPR void push_front(value_type&& x) { - impl_.array_[impl_.to_first_ - 1] = sprout::move(x); - --impl_.to_first_; - } - SPROUT_CXX14_CONSTEXPR void pop_front() { - impl_.array_[impl_.to_first_] = value_type(); - ++impl_.to_first_; - } - SPROUT_CXX14_CONSTEXPR void drop_front() { - ++impl_.to_first_; - } - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::sub_array::size_type sprout::sub_array::enumerable_size; - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::sub_array& lhs, sprout::sub_array& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } -} // namespace sprout - -#include - -#endif // #ifndef SPROUT_SUB_ARRAY_SUB_ARRAY_HPP diff --git a/dsp/lib/sprout/sprout/sub_array/sub_offset.hpp b/dsp/lib/sprout/sprout/sub_array/sub_offset.hpp deleted file mode 100644 index f04ef61..0000000 --- a/dsp/lib/sprout/sprout/sub_array/sub_offset.hpp +++ /dev/null @@ -1,110 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_SUB_ARRAY_SUB_OFFSET_HPP -#define SPROUT_SUB_ARRAY_SUB_OFFSET_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // sub_offset - // - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - sub_offset( - Container& arr, - typename sprout::container_traits >::difference_type from_begin = 0, - typename sprout::container_traits >::difference_type from_end = 0 - ) - { - return sprout::sub_array(arr, from_begin, sprout::size(arr) + from_end); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - sub_offset( - Container const& arr, - typename sprout::container_traits >::difference_type from_begin = 0, - typename sprout::container_traits >::difference_type from_end = 0 - ) - { - return sprout::sub_array(arr, from_begin, sprout::size(arr) + from_end); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, Container>::type - sub_offset( - Container const& arr, - typename sprout::container_traits::difference_type from_begin = 0, - typename sprout::container_traits::difference_type from_end = 0 - ) - { - return Container(arr, from_begin, sprout::size(arr) + from_end); - } - - // - // csub_offset - // - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - csub_offset( - Container const& arr, - typename sprout::container_traits >::difference_type from_begin = 0, - typename sprout::container_traits >::difference_type from_end = 0 - ) - { - return sprout::sub_offset(arr, from_begin, from_end); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - csub_offset( - Container const& arr, - typename sprout::container_traits::difference_type from_begin = 0, - typename sprout::container_traits::difference_type from_end = 0 - ) - { - return sprout::sub_array( - arr.get_array(), - arr.to_first() + from_begin, - arr.to_last() + from_end - ); - } - - // - // sub_offset_copy - // - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - sub_offset_copy( - Container const& arr, - typename sprout::container_traits::difference_type from_begin = 0, - typename sprout::container_traits::difference_type from_end = 0 - ) - { - return sprout::sub_array(arr, from_begin, sprout::size(arr) + from_end); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - sub_offset_copy( - Container const& arr, - typename sprout::container_traits::difference_type from_begin = 0, - typename sprout::container_traits::difference_type from_end = 0 - ) - { - return sprout::sub_array( - arr.get_array(), - arr.to_first() + from_begin, - arr.to_last() + from_end - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_SUB_ARRAY_SUB_OFFSET_HPP diff --git a/dsp/lib/sprout/sprout/sub_array/sub_window.hpp b/dsp/lib/sprout/sprout/sub_array/sub_window.hpp deleted file mode 100644 index 9cb6c81..0000000 --- a/dsp/lib/sprout/sprout/sub_array/sub_window.hpp +++ /dev/null @@ -1,181 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_SUB_ARRAY_SUB_WINDOW_HPP -#define SPROUT_SUB_ARRAY_SUB_WINDOW_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // sub_window - // - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - sub_window( - Container& arr, - typename sprout::container_traits >::difference_type to_first, - typename sprout::container_traits >::difference_type to_last - ) - { - return sprout::sub_array(arr, to_first, to_last); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - sub_window( - Container& arr, - typename sprout::container_traits >::difference_type to_first = 0 - ) - { - return sprout::sub_array(arr, to_first, sprout::size(arr)); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - sub_window( - Container const& arr, - typename sprout::container_traits >::difference_type to_first, - typename sprout::container_traits >::difference_type to_last - ) - { - return sprout::sub_array(arr, to_first, to_last); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - sub_window( - Container const& arr, - typename sprout::container_traits >::difference_type to_first = 0 - ) - { - return sprout::sub_array(arr, to_first, sprout::size(arr)); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, Container>::type - sub_window( - Container const& arr, - typename sprout::container_traits::difference_type to_first, - typename sprout::container_traits::difference_type to_last - ) - { - return Container(arr, to_first, to_last); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, Container>::type - sub_window( - Container const& arr, - typename sprout::container_traits::difference_type to_first = 0 - ) - { - return Container(arr, to_first, sprout::size(arr)); - } - - // - // csub_window - // - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - csub_window( - Container const& arr, - typename sprout::container_traits >::difference_type to_first, - typename sprout::container_traits >::difference_type to_last - ) - { - return sprout::sub_window(arr, to_first, to_last); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - csub_window( - Container const& arr, - typename sprout::container_traits >::difference_type to_first = 0 - ) - { - return sprout::sub_window(arr, to_first, sprout::size(arr)); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - csub_window( - Container const& arr, - typename sprout::container_traits::difference_type to_first, - typename sprout::container_traits::difference_type to_last - ) - { - return sprout::sub_array( - arr.get_array(), - arr.to_first() + to_first, - arr.to_first() + to_last - ); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - csub_window( - Container const& arr, - typename sprout::container_traits::difference_type to_first = 0 - ) - { - return sprout::sub_array( - arr.get_array(), - arr.to_first() + to_first, - arr.to_first() + sprout::size(arr) - ); - } - - // - // sub_window_copy - // - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - sub_window_copy( - Container const& arr, - typename sprout::container_traits::difference_type to_first, - typename sprout::container_traits::difference_type to_last - ) - { - return sprout::sub_array(arr, to_first, to_last); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - sub_window_copy( - Container const& arr, - typename sprout::container_traits::difference_type to_first = 0 - ) - { - return sprout::sub_array(arr, to_first, sprout::size(arr)); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - sub_window_copy( - Container const& arr, - typename sprout::container_traits::difference_type to_first, - typename sprout::container_traits::difference_type to_last - ) - { - return sprout::sub_array( - arr.get_array(), - arr.to_first() + to_first, - arr.to_first() + to_last - ); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type - sub_window_copy( - Container const& arr, - typename sprout::container_traits::difference_type to_first = 0 - ) - { - return sprout::sub_array( - arr.get_array(), - arr.to_first() + to_first, - arr.to_first() + sprout::size(arr) - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_SUB_ARRAY_SUB_WINDOW_HPP diff --git a/dsp/lib/sprout/sprout/sub_array/tuple.hpp b/dsp/lib/sprout/sprout/sub_array/tuple.hpp deleted file mode 100644 index eb63e03..0000000 --- a/dsp/lib/sprout/sprout/sub_array/tuple.hpp +++ /dev/null @@ -1,77 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_SUB_ARRAY_TUPLE_HPP -#define SPROUT_SUB_ARRAY_TUPLE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // tuple_get - // - template - inline SPROUT_CONSTEXPR typename sprout::container_traits >::value_type& - tuple_get(sprout::sub_array& t) - SPROUT_NOEXCEPT_IF_EXPR(*sprout::next(sprout::internal_begin(t), I)) - { - static_assert(I < sprout::container_traits >::static_size, "tuple_get: index out of range"); - return *sprout::next(sprout::internal_begin(t), I); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits >::value_type const& - tuple_get(sprout::sub_array const& t) - SPROUT_NOEXCEPT_IF_EXPR(*sprout::next(sprout::internal_begin(t), I)) - { - static_assert(I < sprout::container_traits >::static_size, "tuple_get: index out of range"); - return *sprout::next(sprout::internal_begin(t), I); - } - template - inline SPROUT_CONSTEXPR typename sprout::container_traits >::value_type&& - tuple_get(sprout::sub_array&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::move(sprout::tuples::get(t))) - { - return sprout::move(sprout::tuples::get(t)); - } -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // tuple_size - // - template - struct tuple_size > - : public std::tuple_size::type> - {}; - - // - // tuple_element - // - template - struct tuple_element > - : public sprout::tuples::tuple_element::type> - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -#endif // #ifndef SPROUT_SUB_ARRAY_TUPLE_HPP diff --git a/dsp/lib/sprout/sprout/sub_array/type_traits.hpp b/dsp/lib/sprout/sprout/sub_array/type_traits.hpp deleted file mode 100644 index 19c8bae..0000000 --- a/dsp/lib/sprout/sprout/sub_array/type_traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_SUB_ARRAY_TYPE_TRAITS_HPP -#define SPROUT_SUB_ARRAY_TYPE_TRAITS_HPP - -#include -#include -#include - -namespace sprout { - // - // is_sub_array - // - template - struct is_sub_array - : public sprout::false_type - {}; - template - struct is_sub_array - : public sprout::is_sub_array - {}; - template - struct is_sub_array - : public sprout::is_sub_array - {}; - template - struct is_sub_array > - : public sprout::true_type - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_sub_array_v = sprout::is_sub_array::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_SUB_ARRAY_TYPE_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/tpp/algorithm.hpp b/dsp/lib/sprout/sprout/tpp/algorithm.hpp deleted file mode 100644 index 22e31be..0000000 --- a/dsp/lib/sprout/sprout/tpp/algorithm.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TPP_ALGORITHM_HPP -#define SPROUT_TPP_ALGORITHM_HPP - -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_TPP_ALGORITHM_HPP diff --git a/dsp/lib/sprout/sprout/tpp/algorithm/all_of.hpp b/dsp/lib/sprout/sprout/tpp/algorithm/all_of.hpp deleted file mode 100644 index 80cfc54..0000000 --- a/dsp/lib/sprout/sprout/tpp/algorithm/all_of.hpp +++ /dev/null @@ -1,53 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TPP_ALGORITHM_ALL_OF_HPP -#define SPROUT_TPP_ALGORITHM_ALL_OF_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace tpp { - namespace detail { - template - struct all_of_impl - : public std::tuple_element::type - {}; - template - struct all_of_impl - : public sprout::bool_constant< - sprout::tpp::detail::all_of_impl::value - && sprout::tpp::detail::all_of_impl::value - > - {}; - } // namespace detail - // - // all_of - // - template - struct all_of - : public sprout::tpp::detail::all_of_impl, 0, sizeof...(Types)> - {}; - template<> - struct all_of<> - : public sprout::true_type - {}; - // - // all_of_c - // - template - struct all_of_c - : public sprout::tpp::all_of...> - {}; - } // namespace tpp -} // namespace sprout - -#endif // #ifndef SPROUT_TPP_ALGORITHM_ALL_OF_HPP diff --git a/dsp/lib/sprout/sprout/tpp/algorithm/any_of.hpp b/dsp/lib/sprout/sprout/tpp/algorithm/any_of.hpp deleted file mode 100644 index 82397c7..0000000 --- a/dsp/lib/sprout/sprout/tpp/algorithm/any_of.hpp +++ /dev/null @@ -1,53 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TPP_ALGORITHM_ANY_OF_HPP -#define SPROUT_TPP_ALGORITHM_ANY_OF_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace tpp { - namespace detail { - template - struct any_of_impl - : public std::tuple_element::type - {}; - template - struct any_of_impl - : public sprout::bool_constant< - sprout::tpp::detail::any_of_impl::value - || sprout::tpp::detail::any_of_impl::value - > - {}; - } // namespace detail - // - // any_of - // - template - struct any_of - : public sprout::tpp::detail::any_of_impl, 0, sizeof...(Types)> - {}; - template<> - struct any_of<> - : public sprout::false_type - {}; - // - // any_of_c - // - template - struct any_of_c - : public sprout::tpp::any_of...> - {}; - } // namespace tpp -} // namespace sprout - -#endif // #ifndef SPROUT_TPP_ALGORITHM_ANY_OF_HPP diff --git a/dsp/lib/sprout/sprout/tpp/algorithm/max_element.hpp b/dsp/lib/sprout/sprout/tpp/algorithm/max_element.hpp deleted file mode 100644 index 62cefac..0000000 --- a/dsp/lib/sprout/sprout/tpp/algorithm/max_element.hpp +++ /dev/null @@ -1,54 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TPP_ALGORITHM_MAX_ELEMENT_HPP -#define SPROUT_TPP_ALGORITHM_MAX_ELEMENT_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace tpp { - namespace detail { - template - struct max_value - : public std::conditional<(T::value < U::value), U, T> - {}; - - template - struct max_element_impl - : public std::tuple_element::type - {}; - template - struct max_element_impl - : public sprout::tpp::detail::max_value< - typename sprout::tpp::detail::max_element_impl::type, - typename sprout::tpp::detail::max_element_impl::type - >::type - {}; - } // namespace detail - // - // max_element - // - template - struct max_element - : public sprout::tpp::detail::max_element_impl, 0, sizeof...(Types)> - {}; - // - // max_element_c - // - template - struct max_element_c - : public sprout::tpp::max_element...> - {}; - } // namespace tpp -} // namespace sprout - -#endif // #ifndef SPROUT_TPP_ALGORITHM_MAX_ELEMENT_HPP diff --git a/dsp/lib/sprout/sprout/tpp/algorithm/min_element.hpp b/dsp/lib/sprout/sprout/tpp/algorithm/min_element.hpp deleted file mode 100644 index f55c2c6..0000000 --- a/dsp/lib/sprout/sprout/tpp/algorithm/min_element.hpp +++ /dev/null @@ -1,54 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TPP_ALGORITHM_MIN_ELEMENT_HPP -#define SPROUT_TPP_ALGORITHM_MIN_ELEMENT_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace tpp { - namespace detail { - template - struct min_value - : public std::conditional<(U::value < T::value), U, T> - {}; - - template - struct min_element_impl - : public std::tuple_element::type - {}; - template - struct min_element_impl - : public sprout::tpp::detail::min_value< - typename sprout::tpp::detail::min_element_impl::type, - typename sprout::tpp::detail::min_element_impl::type - >::type - {}; - } // namespace detail - // - // min_element - // - template - struct min_element - : public sprout::tpp::detail::min_element_impl, 0, sizeof...(Types)> - {}; - // - // min_element_c - // - template - struct min_element_c - : public sprout::tpp::min_element...> - {}; - } // namespace tpp -} // namespace sprout - -#endif // #ifndef SPROUT_TPP_ALGORITHM_MIN_ELEMENT_HPP diff --git a/dsp/lib/sprout/sprout/tpp/algorithm/none_of.hpp b/dsp/lib/sprout/sprout/tpp/algorithm/none_of.hpp deleted file mode 100644 index 7cd4c6f..0000000 --- a/dsp/lib/sprout/sprout/tpp/algorithm/none_of.hpp +++ /dev/null @@ -1,53 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TPP_ALGORITHM_NONE_OF_HPP -#define SPROUT_TPP_ALGORITHM_NONE_OF_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace tpp { - namespace detail { - template - struct none_of_impl - : public sprout::bool_constant::type::value> - {}; - template - struct none_of_impl - : public sprout::bool_constant< - sprout::tpp::detail::none_of_impl::value - && sprout::tpp::detail::none_of_impl::value - > - {}; - } // namespace detail - // - // none_of - // - template - struct none_of - : public sprout::tpp::detail::none_of_impl, 0, sizeof...(Types)> - {}; - template<> - struct none_of<> - : public sprout::true_type - {}; - // - // none_of_c - // - template - struct none_of_c - : public sprout::tpp::none_of...> - {}; - } // namespace tpp -} // namespace sprout - -#endif // #ifndef SPROUT_TPP_ALGORITHM_NONE_OF_HPP diff --git a/dsp/lib/sprout/sprout/tpp/algorithm/one_of.hpp b/dsp/lib/sprout/sprout/tpp/algorithm/one_of.hpp deleted file mode 100644 index 3f73b24..0000000 --- a/dsp/lib/sprout/sprout/tpp/algorithm/one_of.hpp +++ /dev/null @@ -1,104 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TPP_ALGORITHM_ONE_OF_HPP -#define SPROUT_TPP_ALGORITHM_ONE_OF_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace tpp { - namespace detail { - template - struct one_of_impl_1 - : public sprout::bool_constant::type::value> - {}; - template - struct one_of_impl_1 - : public sprout::bool_constant< - sprout::tpp::detail::one_of_impl_1::value - && sprout::tpp::detail::one_of_impl_1::value - > - {}; - - template - struct one_of_impl - : public std::tuple_element::type - {}; - template - struct one_of_impl - : public sprout::bool_constant< - sprout::tpp::detail::one_of_impl::value - ? sprout::tpp::detail::one_of_impl_1::value - : sprout::tpp::detail::one_of_impl::value - > - {}; - } // namespace detail - // - // one_of - // - template - struct one_of - : public sprout::tpp::detail::one_of_impl, 0, sizeof...(Types)> - {}; - template<> - struct one_of<> - : public sprout::false_type - {}; - // - // one_of_c - // - template - struct one_of_c - : public sprout::tpp::one_of...> - {}; -// namespace detail { -// template -// struct one_of_impl; -// template<> -// struct one_of_impl<> -// : public sprout::false_type -// {}; -// template<> -// struct one_of_impl -// : public sprout::true_type -// {}; -// template<> -// struct one_of_impl -// : public sprout::false_type -// {}; -// template -// struct one_of_impl -// : public sprout::tpp::none_of_c -// {}; -// template -// struct one_of_impl -// : public sprout::bool_constant::value> -// {}; -// } // namespace detail -// // -// // one_of_c -// // -// template -// struct one_of_c -// : public sprout::tpp::detail::one_of_impl -// {}; -// // -// // one_of -// // -// template -// struct one_of -// : public sprout::tpp::one_of_c -// {}; - } // namespace tpp -} // namespace sprout - -#endif // #ifndef SPROUT_TPP_ALGORITHM_ONE_OF_HPP diff --git a/dsp/lib/sprout/sprout/tuple.hpp b/dsp/lib/sprout/sprout/tuple.hpp deleted file mode 100644 index 9ae1b7b..0000000 --- a/dsp/lib/sprout/sprout/tuple.hpp +++ /dev/null @@ -1,21 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_HPP -#define SPROUT_TUPLE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_TUPLE_HPP diff --git a/dsp/lib/sprout/sprout/tuple/algorithm.hpp b/dsp/lib/sprout/sprout/tuple/algorithm.hpp deleted file mode 100644 index ca6d1f3..0000000 --- a/dsp/lib/sprout/sprout/tuple/algorithm.hpp +++ /dev/null @@ -1,13 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_ALGORITHM_HPP -#define SPROUT_TUPLE_ALGORITHM_HPP - -#include - -#endif // #ifndef SPROUT_TUPLE_ALGORITHM_HPP diff --git a/dsp/lib/sprout/sprout/tuple/algorithm/copy.hpp b/dsp/lib/sprout/sprout/tuple/algorithm/copy.hpp deleted file mode 100644 index 8ea7d0b..0000000 --- a/dsp/lib/sprout/sprout/tuple/algorithm/copy.hpp +++ /dev/null @@ -1,81 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_ALGORITHM_COPY_HPP -#define SPROUT_TUPLE_ALGORITHM_COPY_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - namespace results { - // - // copy - // - template - struct copy { - public: - typedef typename sprout::tuples::tuple_construct_traits::copied_type type; - }; - } // namespace results - - namespace detail { - template - inline SPROUT_CONSTEXPR Result - copy_impl( - Tuple const& t, InputTuple const& input, - sprout::index_tuple, sprout::index_tuple - ) - { - return sprout::tuples::remake( - t, - sprout::tuples::get(input)..., - sprout::tuples::get(t)... - ); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - (sprout::tuples::tuple_size::value > sprout::tuples::tuple_size::value), - typename sprout::tuples::results::copy::type - >::type - copy(Tuple const& t, InputTuple const& input) { - return sprout::tuples::detail::copy_impl::type>( - t, input, - sprout::index_range::value, sprout::tuples::tuple_size::value>::make(), - sprout::tuple_indexes::make() - ); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !(sprout::tuples::tuple_size::value > sprout::tuples::tuple_size::value), - typename sprout::tuples::results::copy::type - >::type - copy(Tuple const& t, InputTuple const& input) { - return sprout::tuples::detail::copy_impl::type>( - t, input, - sprout::index_tuple<>(), - sprout::tuple_indexes::make() - ); - } - } // namespace detail - // - // copy - // - template - inline SPROUT_CONSTEXPR typename sprout::tuples::results::copy::type - copy(Tuple const& t, InputTuple const& input) { - return sprout::tuples::detail::copy(t, input); - } - } // namespace tuples -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_ALGORITHM_COPY_HPP diff --git a/dsp/lib/sprout/sprout/tuple/apply.hpp b/dsp/lib/sprout/sprout/tuple/apply.hpp deleted file mode 100644 index a84cdf0..0000000 --- a/dsp/lib/sprout/sprout/tuple/apply.hpp +++ /dev/null @@ -1,70 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_APPLY_HPP -#define SPROUT_TUPLE_APPLY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - // - // apply_result - // - namespace detail { - template - struct apply_result_impl; - template - struct apply_result_impl > { - public: - typedef decltype( - std::declval()( - sprout::tuples::get(std::declval())... - ) - ) type; - }; - } // namespace detail - template - struct apply_result - : public sprout::tuples::detail::apply_result_impl< - F, Tuple, - typename sprout::tuple_indexes::type>::type - > - {}; - - // - // apply - // - namespace detail { - template - inline SPROUT_CONSTEXPR Result - apply_impl(F&& f, Tuple&& t, sprout::index_tuple) { - return SPROUT_FORWARD(F, f)(sprout::tuples::get(SPROUT_FORWARD(Tuple, t))...); - } - } // namespace detail - template - inline SPROUT_CONSTEXPR typename sprout::tuples::apply_result::type - apply(F&& f, Tuple&& t) { - return sprout::tuples::detail::apply_impl::type>( - SPROUT_FORWARD(F, f), SPROUT_FORWARD(Tuple, t), - sprout::tuple_indexes::type>::make() - ); - } - } // namespace tuples - - using sprout::tuples::apply_result; - using sprout::tuples::apply; -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_APPLY_HPP diff --git a/dsp/lib/sprout/sprout/tuple/boost/array.hpp b/dsp/lib/sprout/sprout/tuple/boost/array.hpp deleted file mode 100644 index 33fd36f..0000000 --- a/dsp/lib/sprout/sprout/tuple/boost/array.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_BOOST_ARRAY_HPP -#define SPROUT_TUPLE_BOOST_ARRAY_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - // - // tuple_access_traits - // - template - struct tuple_access_traits > { - public: - template - static SPROUT_CONSTEXPR T& - tuple_get(boost::array& t) SPROUT_NOEXCEPT { - static_assert(I < N, "tuple_get: index out of range"); - return t[I]; - } - template - static SPROUT_CONSTEXPR T const& - tuple_get(boost::array const& t) SPROUT_NOEXCEPT { - static_assert(I < N, "tuple_get: index out of range"); - return t[I]; - } - template - static SPROUT_CONSTEXPR T&& - tuple_get(boost::array&& t) SPROUT_NOEXCEPT { - return sprout::move(tuple_get(t)); - } - }; - } // namespace tuples -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_BOOST_ARRAY_HPP diff --git a/dsp/lib/sprout/sprout/tuple/deep_copy.hpp b/dsp/lib/sprout/sprout/tuple/deep_copy.hpp deleted file mode 100644 index 392051c..0000000 --- a/dsp/lib/sprout/sprout/tuple/deep_copy.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_DEEP_COPY_HPP -#define SPROUT_TUPLE_DEEP_COPY_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - // - // deep_copy - // - template - inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_construct_traits< - typename std::remove_reference::type - >::copied_type - deep_copy(Tuple&& tup) { - typedef typename std::remove_reference::type tuple_type; - return sprout::tuples::tuple_construct_traits::deep_copy(SPROUT_FORWARD(Tuple, tup)); - } - } // namespace tuples -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_DEEP_COPY_HPP diff --git a/dsp/lib/sprout/sprout/tuple/default_construct.hpp b/dsp/lib/sprout/sprout/tuple/default_construct.hpp deleted file mode 100644 index f7f35f6..0000000 --- a/dsp/lib/sprout/sprout/tuple/default_construct.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_DEFAULT_CONSTRUCT_HPP -#define SPROUT_TUPLE_DEFAULT_CONSTRUCT_HPP - -#include - -namespace sprout { - namespace tuples { - // - // default_construct_t - // default_construct - // - struct default_construct_t { - public: - template - SPROUT_CONSTEXPR operator T() const { - return T(); - } - }; - SPROUT_STATIC_CONSTEXPR sprout::tuples::default_construct_t default_construct = {}; - } // namespace tuples - - using sprout::tuples::default_construct_t; - using sprout::tuples::default_construct; -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_DEFAULT_CONSTRUCT_HPP diff --git a/dsp/lib/sprout/sprout/tuple/flex.hpp b/dsp/lib/sprout/sprout/tuple/flex.hpp deleted file mode 100644 index 908d1cb..0000000 --- a/dsp/lib/sprout/sprout/tuple/flex.hpp +++ /dev/null @@ -1,248 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_FLEX_HPP -#define SPROUT_TUPLE_FLEX_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - // - // flex_tuple - // - template - class flex_tuple { - public: - typedef sprout::tuples::tuple tuple_type; - private: - typedef sprout::value_holder holder_type; - private: - holder_type holder_; - public: - flex_tuple(flex_tuple const&) = default; - flex_tuple(flex_tuple&&) = default; - SPROUT_CONSTEXPR flex_tuple(tuple_type const& t) - : holder_(t) - {} - SPROUT_CONSTEXPR operator tuple_type const&() const { - return holder_.get(); - } - template - SPROUT_CONSTEXPR operator sprout::tuples::tuple() const { - return sprout::tuples::tuple(sprout::tuples::flexibly_construct, holder_.get()); - } - }; - // - // flex - // - template - inline SPROUT_CONSTEXPR T const& - flex(T const& t) { - return t; - } - template - inline SPROUT_CONSTEXPR sprout::tuples::flex_tuple - flex(sprout::tuples::tuple const& t) { - return sprout::tuples::flex_tuple(t); - } - template - inline SPROUT_CONSTEXPR To - flex(sprout::tuples::tuple const& t) { - return sprout::tuples::flex(t); - } - - // - // recursive_flex_tuple - // - template - class recursive_flex_tuple - : public sprout::tuples::flex_tuple - { - private: - typedef sprout::tuples::flex_tuple base_type; - private: - template - static SPROUT_CONSTEXPR sprout::tuples::tuple - implicit_conversion_impl(typename base_type::tuple_type const& t, sprout::index_tuple) { - return sprout::tuples::tuple( - sprout::tuples::flexibly_construct, - sprout::tuples::flex(sprout::tuples::get(t))... - ); - } - public: - recursive_flex_tuple(recursive_flex_tuple const&) = default; - recursive_flex_tuple(recursive_flex_tuple&&) = default; - SPROUT_CONSTEXPR recursive_flex_tuple(typename base_type::tuple_type const& t) - : base_type(t) - {} - template - SPROUT_CONSTEXPR operator sprout::tuples::tuple() const { - return implicit_conversion_impl(*this, sprout::make_index_tuple::make()); - } - }; - // - // recursive_flex - // - template - inline SPROUT_CONSTEXPR T const& - recursive_flex(T const& t) { - return t; - } - template - inline SPROUT_CONSTEXPR sprout::tuples::recursive_flex_tuple - recursive_flex(sprout::tuples::tuple const& t) { - return sprout::tuples::recursive_flex_tuple(t); - } - template - inline SPROUT_CONSTEXPR To - recursive_flex(sprout::tuples::tuple const& t) { - return sprout::tuples::recursive_flex(t); - } - - // - // common_flex_type - // - template - struct common_flex_type; - template - struct common_flex_type - : public sprout::common_decay - {}; - namespace detail { - template - struct common_flex_type_impl_2; - template - struct common_flex_type_impl_2 > - : public sprout::identity< - sprout::tuples::tuple< - typename sprout::tuples::common_flex_type< - typename sprout::tuples::tuple_element::type, - typename sprout::tuples::tuple_element::type - >::type... - > - > - {}; - - template - struct common_flex_type_impl_1; - template - struct common_flex_type_impl_1::value < sprout::tuples::tuple_size::value)>::type> - : public sprout::tuples::common_flex_type - {}; - template - struct common_flex_type_impl_1::value > sprout::tuples::tuple_size::value)>::type> - : public sprout::tuples::common_flex_type - {}; - template - struct common_flex_type_impl_1::value == sprout::tuples::tuple_size::value)>::type> - : public sprout::tuples::detail::common_flex_type_impl_2::type> - {}; - - template - struct common_flex_type_impl; - template - struct common_flex_type_impl::value && sprout::tuples::is_tuple::value)>::type> - : public sprout::tuples::detail::common_flex_type_impl_1 - {}; - template - struct common_flex_type_impl::value && sprout::tuples::is_tuple::value)>::type> - : public sprout::common_decay - {}; - } // namespace detail - template - struct common_flex_type - : public sprout::tuples::detail::common_flex_type_impl - {}; - template - struct common_flex_type - : public sprout::tuples::common_flex_type::type, Tail...> - {}; - - // - // common_recursive_flex_type - // - template - struct common_recursive_flex_type; - template - struct common_recursive_flex_type - : public sprout::tuples::common_flex_type - {}; - namespace detail { - template - struct common_recursive_flex_type_impl_2; - template - struct common_recursive_flex_type_impl_2 > - : public sprout::identity< - sprout::tuples::tuple< - typename sprout::tuples::common_recursive_flex_type< - typename sprout::tuples::tuple_element::type, - typename sprout::tuples::tuple_element::type - >::type... - > - > - {}; - - template - struct common_recursive_flex_type_impl_1; - template - struct common_recursive_flex_type_impl_1::value < sprout::tuples::tuple_size::value)>::type> - : public sprout::tuples::common_recursive_flex_type - {}; - template - struct common_recursive_flex_type_impl_1::value > sprout::tuples::tuple_size::value)>::type> - : public sprout::tuples::common_recursive_flex_type - {}; - template - struct common_recursive_flex_type_impl_1::value == sprout::tuples::tuple_size::value)>::type> - : public sprout::tuples::detail::common_recursive_flex_type_impl_2::type> - {}; - - template - struct common_recursive_flex_type_impl; - template - struct common_recursive_flex_type_impl::value && sprout::tuples::is_tuple::value)>::type> - : public sprout::tuples::detail::common_recursive_flex_type_impl_1 - {}; - template - struct common_recursive_flex_type_impl::value && sprout::tuples::is_tuple::value)>::type> - : public sprout::tuples::common_flex_type - {}; - } // namespace detail - template - struct common_recursive_flex_type - : public sprout::tuples::detail::common_recursive_flex_type_impl - {}; - template - struct common_recursive_flex_type - : public sprout::tuples::common_recursive_flex_type::type, Tail...> - {}; - } // namespace tuples - - using sprout::tuples::flex_tuple; - using sprout::tuples::flex; - - using sprout::tuples::recursive_flex_tuple; - using sprout::tuples::recursive_flex; - - using sprout::tuples::common_flex_type; - using sprout::tuples::common_recursive_flex_type; -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_FLEX_HPP diff --git a/dsp/lib/sprout/sprout/tuple/flexibly_construct.hpp b/dsp/lib/sprout/sprout/tuple/flexibly_construct.hpp deleted file mode 100644 index 4abe4a1..0000000 --- a/dsp/lib/sprout/sprout/tuple/flexibly_construct.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_FREXIBLY_CONSTRUCT_HPP -#define SPROUT_TUPLE_FREXIBLY_CONSTRUCT_HPP - -#include - -namespace sprout { - namespace tuples { - // - // flexibly_construct_t - // flexibly_construct - // - struct flexibly_construct_t {}; - SPROUT_STATIC_CONSTEXPR sprout::tuples::flexibly_construct_t flexibly_construct = {}; - } // namespace tuples - - using sprout::tuples::flexibly_construct_t; - using sprout::tuples::flexibly_construct; -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_FREXIBLY_CONSTRUCT_HPP diff --git a/dsp/lib/sprout/sprout/tuple/functions.hpp b/dsp/lib/sprout/sprout/tuple/functions.hpp deleted file mode 100644 index d13e731..0000000 --- a/dsp/lib/sprout/sprout/tuple/functions.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_FUNCTIONS_HPP -#define SPROUT_TUPLE_FUNCTIONS_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_TUPLE_FUNCTIONS_HPP diff --git a/dsp/lib/sprout/sprout/tuple/fused.hpp b/dsp/lib/sprout/sprout/tuple/fused.hpp deleted file mode 100644 index 23c07bb..0000000 --- a/dsp/lib/sprout/sprout/tuple/fused.hpp +++ /dev/null @@ -1,62 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_FUSED_HPP -#define SPROUT_TUPLE_FUSED_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - // - // fused - // - template - class fused { - public: - typedef F functor_type; - public: - template - struct result - : public sprout::tuples::apply_result - {}; - private: - functor_type f_; - public: - SPROUT_CONSTEXPR fused() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - fused(fused const&) = default; - explicit SPROUT_CONSTEXPR fused(F f) - : f_(f) - {} - SPROUT_CONSTEXPR functor_type functor() const { - return f_; - } - template - SPROUT_CONSTEXPR typename result::type - operator()(Tuple&& t) const { - return sprout::tuples::apply(f_, SPROUT_FORWARD(Tuple, t)); - } - }; - - // - // make_fused - // - template - inline SPROUT_CONSTEXPR sprout::tuples::fused - make_fused(F const& f) { - return sprout::tuples::fused(f); - } - } // namespace tuples - - using sprout::tuples::fused; - using sprout::tuples::make_fused; -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_FUSED_HPP diff --git a/dsp/lib/sprout/sprout/tuple/indexes.hpp b/dsp/lib/sprout/sprout/tuple/indexes.hpp deleted file mode 100644 index 974480a..0000000 --- a/dsp/lib/sprout/sprout/tuple/indexes.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_INDEXES_HPP -#define SPROUT_TUPLE_INDEXES_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - // - // tuple_indexes - // - template - struct tuple_indexes - : public sprout::enable_make_indexes< - sprout::make_index_tuple::value> - > - {}; - } // namespace tuples - - // - // tuple_indexes - // - template - struct tuple_indexes - : public sprout::tuples::tuple_indexes - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_INDEXES_HPP diff --git a/dsp/lib/sprout/sprout/tuple/make.hpp b/dsp/lib/sprout/sprout/tuple/make.hpp deleted file mode 100644 index 7c76185..0000000 --- a/dsp/lib/sprout/sprout/tuple/make.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_MAKE_HPP -#define SPROUT_TUPLE_MAKE_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - // - // make - // - template - inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_construct_traits::copied_type - make(Args&&... args) { - return sprout::tuples::tuple_construct_traits::make( - SPROUT_FORWARD(Args, args)... - ); - } - } // namespace tuples -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_MAKE_HPP diff --git a/dsp/lib/sprout/sprout/tuple/make_from_tuple.hpp b/dsp/lib/sprout/sprout/tuple/make_from_tuple.hpp deleted file mode 100644 index 4451763..0000000 --- a/dsp/lib/sprout/sprout/tuple/make_from_tuple.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_MAKE_FROM_TUPLE_HPP -#define SPROUT_TUPLE_MAKE_FROM_TUPLE_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - // - // make_from_tuple - // - namespace detail { - template - inline SPROUT_CONSTEXPR T - make_from_tuple_impl(Tuple&& t, sprout::index_tuple) { - return T(sprout::get(SPROUT_FORWARD(Tuple, t))...); - } - } // namespace detail - template - inline SPROUT_CONSTEXPR T - make_from_tuple(Tuple&& t) { - return sprout::tuples::detail::make_from_tuple_impl( - SPROUT_FORWARD(Tuple, t), - sprout::tuple_indexes::type>::make() - ); - } - } // namespace tuples - - using sprout::tuples::make_from_tuple; -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_MAKE_FROM_TUPLE_HPP diff --git a/dsp/lib/sprout/sprout/tuple/metafunctions.hpp b/dsp/lib/sprout/sprout/tuple/metafunctions.hpp deleted file mode 100644 index e2de526..0000000 --- a/dsp/lib/sprout/sprout/tuple/metafunctions.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_METAFUNCTIONS_HPP -#define SPROUT_TUPLE_METAFUNCTIONS_HPP - -#include -#include - -#endif // #ifndef SPROUT_TUPLE_METAFUNCTIONS_HPP diff --git a/dsp/lib/sprout/sprout/tuple/operation.hpp b/dsp/lib/sprout/sprout/tuple/operation.hpp deleted file mode 100644 index febbb12..0000000 --- a/dsp/lib/sprout/sprout/tuple/operation.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_OPERATION_HPP -#define SPROUT_TUPLE_OPERATION_HPP - -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_TUPLE_OPERATION_HPP diff --git a/dsp/lib/sprout/sprout/tuple/operation/append_back.hpp b/dsp/lib/sprout/sprout/tuple/operation/append_back.hpp deleted file mode 100644 index fa49355..0000000 --- a/dsp/lib/sprout/sprout/tuple/operation/append_back.hpp +++ /dev/null @@ -1,60 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_OPERATION_APPEND_BACK_HPP -#define SPROUT_TUPLE_OPERATION_APPEND_BACK_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - namespace results { - // - // append_back - // - template - struct append_back - : public sprout::types::append_back - {}; - } // namespace results - - namespace detail { - template - inline SPROUT_CONSTEXPR Result - append_back_impl( - Tuple const& t, InputTuple const& input, - sprout::index_tuple, sprout::index_tuple - ) - { - return sprout::tuples::remake( - t, - sprout::tuples::get(t)..., - sprout::tuples::get(input)... - ); - } - } // namespace detail - // - // append_back - // - template - inline SPROUT_CONSTEXPR typename sprout::tuples::results::append_back::type - append_back(Tuple const& t, InputTuple const& input) { - return sprout::tuples::detail::append_back_impl::type>( - t, input, - sprout::tuple_indexes::make(), - sprout::tuple_indexes::make() - ); - } - } // namespace tuples -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_OPERATION_APPEND_BACK_HPP diff --git a/dsp/lib/sprout/sprout/tuple/operation/append_front.hpp b/dsp/lib/sprout/sprout/tuple/operation/append_front.hpp deleted file mode 100644 index 961b6a3..0000000 --- a/dsp/lib/sprout/sprout/tuple/operation/append_front.hpp +++ /dev/null @@ -1,60 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_OPERATION_APPEND_FRONT_HPP -#define SPROUT_TUPLE_OPERATION_APPEND_FRONT_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - namespace results { - // - // append_front - // - template - struct append_front - : public sprout::types::append_front - {}; - } // namespace results - - namespace detail { - template - inline SPROUT_CONSTEXPR Result - append_front_impl( - Tuple const& t, InputTuple const& input, - sprout::index_tuple, sprout::index_tuple - ) - { - return sprout::tuples::remake( - t, - sprout::tuples::get(input)..., - sprout::tuples::get(t)... - ); - } - } // namespace detail - // - // append_front - // - template - inline SPROUT_CONSTEXPR typename sprout::tuples::results::append_front::type - append_front(Tuple const& t, InputTuple const& input) { - return sprout::tuples::detail::append_front_impl::type>( - t, input, - sprout::tuple_indexes::make(), - sprout::tuple_indexes::make() - ); - } - } // namespace tuples -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_OPERATION_APPEND_FRONT_HPP diff --git a/dsp/lib/sprout/sprout/tuple/operation/pop_back.hpp b/dsp/lib/sprout/sprout/tuple/operation/pop_back.hpp deleted file mode 100644 index 1c0b863..0000000 --- a/dsp/lib/sprout/sprout/tuple/operation/pop_back.hpp +++ /dev/null @@ -1,53 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_OPERATION_POP_BACK_HPP -#define SPROUT_TUPLE_OPERATION_POP_BACK_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - namespace results { - // - // pop_back - // - template - struct pop_back - : public sprout::types::pop_back - {}; - } // namespace results - - namespace detail { - template - inline SPROUT_CONSTEXPR Result - pop_back_impl(Tuple const& t, sprout::index_tuple) { - return sprout::tuples::remake( - t, - sprout::tuples::get(t)... - ); - } - } // namespace detail - // - // pop_back - // - template - inline SPROUT_CONSTEXPR typename sprout::tuples::results::pop_back::type - pop_back(Tuple const& t) { - return sprout::tuples::detail::pop_back_impl::type>( - t, - sprout::make_index_tuple::value - 1>::make() - ); - } - } // namespace tuples -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_OPERATION_POP_BACK_HPP diff --git a/dsp/lib/sprout/sprout/tuple/operation/pop_front.hpp b/dsp/lib/sprout/sprout/tuple/operation/pop_front.hpp deleted file mode 100644 index 06b2aaf..0000000 --- a/dsp/lib/sprout/sprout/tuple/operation/pop_front.hpp +++ /dev/null @@ -1,53 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_OPERATION_POP_FRONT_HPP -#define SPROUT_TUPLE_OPERATION_POP_FRONT_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - namespace results { - // - // pop_front - // - template - struct pop_front - : public sprout::types::pop_front - {}; - } // namespace results - - namespace detail { - template - inline SPROUT_CONSTEXPR Result - pop_front_impl(Tuple const& t, sprout::index_tuple) { - return sprout::tuples::remake( - t, - sprout::tuples::get(t)... - ); - } - } // namespace detail - // - // pop_front - // - template - inline SPROUT_CONSTEXPR typename sprout::tuples::results::pop_front::type - pop_front(Tuple const& t) { - return sprout::tuples::detail::pop_front_impl::type>( - t, - sprout::index_range<1, sprout::tuples::tuple_size::value>::make() - ); - } - } // namespace tuples -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_OPERATION_POP_FRONT_HPP diff --git a/dsp/lib/sprout/sprout/tuple/operation/push_back.hpp b/dsp/lib/sprout/sprout/tuple/operation/push_back.hpp deleted file mode 100644 index 4aab078..0000000 --- a/dsp/lib/sprout/sprout/tuple/operation/push_back.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_OPERATION_PUSH_BACK_HPP -#define SPROUT_TUPLE_OPERATION_PUSH_BACK_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - namespace results { - // - // push_back - // - template - struct push_back - : public sprout::types::push_back - {}; - } // namespace results - - namespace detail { - template - inline SPROUT_CONSTEXPR Result - push_back_impl(Tuple const& t, sprout::index_tuple, Args const&... args) { - return sprout::tuples::remake( - t, - sprout::tuples::get(t)..., - args... - ); - } - } // namespace detail - // - // push_back - // - template - inline SPROUT_CONSTEXPR typename sprout::tuples::results::push_back::type - push_back(Tuple const& t, Args const&... args) { - return sprout::tuples::detail::push_back_impl::type>( - t, - sprout::tuple_indexes::make(), - args... - ); - } - } // namespace tuples -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_OPERATION_PUSH_BACK_HPP diff --git a/dsp/lib/sprout/sprout/tuple/operation/push_front.hpp b/dsp/lib/sprout/sprout/tuple/operation/push_front.hpp deleted file mode 100644 index 23fd069..0000000 --- a/dsp/lib/sprout/sprout/tuple/operation/push_front.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_OPERATION_PUSH_FRONT_HPP -#define SPROUT_TUPLE_OPERATION_PUSH_FRONT_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - namespace results { - // - // push_front - // - template - struct push_front - : public sprout::types::push_front - {}; - } // namespace results - - namespace detail { - template - inline SPROUT_CONSTEXPR Result - push_front_impl(Tuple const& t, sprout::index_tuple, Args const&... args) { - return sprout::tuples::remake( - t, - args..., - sprout::tuples::get(t)... - ); - } - } // namespace detail - // - // push_front - // - template - inline SPROUT_CONSTEXPR typename sprout::tuples::results::push_front::type - push_front(Tuple const& t, Args const&... args) { - return sprout::tuples::detail::push_front_impl::type>( - t, - sprout::tuple_indexes::make(), - args... - ); - } - } // namespace tuples -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_OPERATION_PUSH_FRONT_HPP diff --git a/dsp/lib/sprout/sprout/tuple/remake.hpp b/dsp/lib/sprout/sprout/tuple/remake.hpp deleted file mode 100644 index ffa2e55..0000000 --- a/dsp/lib/sprout/sprout/tuple/remake.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_REMAKE_HPP -#define SPROUT_TUPLE_REMAKE_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - // - // remake - // - template - inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_construct_traits::copied_type - remake(Tup&& tup, Args&&... args) { - return sprout::tuples::tuple_construct_traits::remake( - SPROUT_FORWARD(Tup, tup), - SPROUT_FORWARD(Args, args)... - ); - } - } // namespace tuples -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_REMAKE_HPP diff --git a/dsp/lib/sprout/sprout/tuple/sscrisk/cel/array.hpp b/dsp/lib/sprout/sprout/tuple/sscrisk/cel/array.hpp deleted file mode 100644 index e21df40..0000000 --- a/dsp/lib/sprout/sprout/tuple/sscrisk/cel/array.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_SSCRISK_CEL_ARRAY_HPP -#define SPROUT_TUPLE_SSCRISK_CEL_ARRAY_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - // - // tuple_access_traits - // - template - struct tuple_access_traits > { - public: - template - static SPROUT_CONSTEXPR T& - tuple_get(sscrisk::cel::array& t) SPROUT_NOEXCEPT { - static_assert(I < N, "tuple_get: index out of range"); - return t[I]; - } - template - static SPROUT_CONSTEXPR T const& - tuple_get(sscrisk::cel::array const& t) SPROUT_NOEXCEPT { - static_assert(I < N, "tuple_get: index out of range"); - return t[I]; - } - template - static SPROUT_CONSTEXPR T&& - tuple_get(sscrisk::cel::array&& t) SPROUT_NOEXCEPT { - return sprout::move(tuple_get(t)); - } - }; - } // namespace tuples -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_SSCRISK_CEL_ARRAY_HPP diff --git a/dsp/lib/sprout/sprout/tuple/sscrisk/cel/utility.hpp b/dsp/lib/sprout/sprout/tuple/sscrisk/cel/utility.hpp deleted file mode 100644 index 222a425..0000000 --- a/dsp/lib/sprout/sprout/tuple/sscrisk/cel/utility.hpp +++ /dev/null @@ -1,110 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_SSCRISK_CEL_UTILITY_HPP -#define SPROUT_TUPLE_SSCRISK_CEL_UTILITY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - // - // tuple_size - // - template - struct tuple_size > - : public sprout::integral_constant - {}; - - namespace detail { - template - struct tuple_element_impl; - template - struct tuple_element_impl > - : public sprout::detail::nil_base - {}; - template - struct tuple_element_impl<0, sscrisk::cel::pair > - : public sprout::identity - {}; - template - struct tuple_element_impl<1, sscrisk::cel::pair > - : public sprout::identity - {}; - } // namespace detail - // - // tuple_element - // - template - struct tuple_element > - : public sprout::tuples::detail::tuple_element_impl > - {}; - - namespace detail { - template - struct get_impl; - template - struct get_impl<0, sscrisk::cel::pair > { - public: - SPROUT_CONSTEXPR T1& operator()(sscrisk::cel::pair& t) const { - return t.first; - } - SPROUT_CONSTEXPR T1 const& operator()(sscrisk::cel::pair const& t) const { - return t.first; - } - }; - template - struct get_impl<1, sscrisk::cel::pair > { - public: - SPROUT_CONSTEXPR T2& operator()(sscrisk::cel::pair& t) const { - return t.second; - } - SPROUT_CONSTEXPR T2 const& operator()(sscrisk::cel::pair const& t) const { - return t.second; - } - }; - } // namespace detail - } // namespace tuples -} // namespace sprout - -namespace sprout { - namespace tuples { - // - // tuple_access_traits - // - template - struct tuple_access_traits > { - public: - template - static SPROUT_CONSTEXPR typename sprout::tuples::tuple_element >::type& - tuple_get(sscrisk::cel::pair& t) SPROUT_NOEXCEPT { - static_assert(I < 2, "tuple_get: index out of range"); - return sprout::tuples::detail::get_impl >()(t); - } - template - static SPROUT_CONSTEXPR typename sprout::tuples::tuple_element >::type const& - tuple_get(sscrisk::cel::pair const& t) SPROUT_NOEXCEPT { - static_assert(I < 2, "tuple_get: index out of range"); - return sprout::tuples::detail::get_impl >()(t); - } - template - static SPROUT_CONSTEXPR typename sprout::tuples::tuple_element >::type&& - tuple_get(sscrisk::cel::pair&& t) SPROUT_NOEXCEPT { - return sprout::move(tuple_get(t)); - } - }; - } // namespace tuples -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_SSCRISK_CEL_UTILITY_HPP diff --git a/dsp/lib/sprout/sprout/tuple/std/array.hpp b/dsp/lib/sprout/sprout/tuple/std/array.hpp deleted file mode 100644 index 5c7e542..0000000 --- a/dsp/lib/sprout/sprout/tuple/std/array.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_STD_ARRAY_HPP -#define SPROUT_TUPLE_STD_ARRAY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - // - // tuple_access_traits - // - template - struct tuple_access_traits > { - public: - template - static SPROUT_CONSTEXPR T& - tuple_get(std::array& t) SPROUT_NOEXCEPT { - static_assert(I < N, "tuple_get: index out of range"); - return const_cast(sprout::as_const(t)[I]); - } - template - static SPROUT_CONSTEXPR T const& - tuple_get(std::array const& t) SPROUT_NOEXCEPT { - static_assert(I < N, "tuple_get: index out of range"); - return t[I]; - } - template - static SPROUT_CONSTEXPR T&& - tuple_get(std::array&& t) SPROUT_NOEXCEPT { - return sprout::move(tuple_get(t)); - } - }; - } // namespace tuples -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_STD_ARRAY_HPP diff --git a/dsp/lib/sprout/sprout/tuple/std/complex.hpp b/dsp/lib/sprout/sprout/tuple/std/complex.hpp deleted file mode 100644 index ab099dd..0000000 --- a/dsp/lib/sprout/sprout/tuple/std/complex.hpp +++ /dev/null @@ -1,129 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_STD_COMPLEX_HPP -#define SPROUT_TUPLE_STD_COMPLEX_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - namespace detail { - template - struct tuple_element_impl; - template - struct tuple_element_impl > - : public sprout::detail::nil_base - {}; - template - struct tuple_element_impl<0, std::complex > - : public sprout::identity - {}; - template - struct tuple_element_impl<1, std::complex > - : public sprout::identity - {}; - - template - struct get_impl; - template - struct get_impl<0, std::complex > { - public: - SPROUT_CONSTEXPR T operator()(std::complex const& t) const { - return t.real(); - } - }; - template - struct get_impl<1, std::complex > { - public: - SPROUT_CONSTEXPR T operator()(std::complex const& t) const { - return t.imag(); - } - }; - } // namespace detail - } // namespace tuples -} // namespace sprout - -namespace sprout { - namespace tuples { - // - // tuple_size - // - template - struct tuple_size > - : public sprout::integral_constant - {}; - - // - // tuple_element - // - template - struct tuple_element > - : public sprout::tuples::detail::tuple_element_impl > - {}; - } // namespace tuples -} // namespace sprout - -namespace sprout { - namespace tuples { - // - // tuple_traits - // - template - struct tuple_traits > { - public: - SPROUT_STATIC_CONSTEXPR std::size_t size = sprout::tuples::tuple_size >::value; - public: - template - struct element - : public sprout::tuples::tuple_element > - {}; - template - struct lvalue_reference - : public element - {}; - template - struct const_lvalue_reference - : public element - {}; - template - struct rvalue_reference - : public element - {}; - template - struct const_rvalue_reference - : public element - {}; - }; - template - SPROUT_CONSTEXPR_OR_CONST std::size_t sprout::tuples::tuple_traits >::size; - - // - // tuple_access_traits - // - template - struct tuple_access_traits > { - public: - template - static SPROUT_CONSTEXPR T - tuple_get(std::complex const& t) SPROUT_NOEXCEPT { - static_assert(I < 2, "tuple_get: index out of range"); - return sprout::tuples::detail::get_impl >()(t); - } - }; - } // namespace tuples -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_STD_COMPLEX_HPP diff --git a/dsp/lib/sprout/sprout/tuple/std/utility.hpp b/dsp/lib/sprout/sprout/tuple/std/utility.hpp deleted file mode 100644 index debba39..0000000 --- a/dsp/lib/sprout/sprout/tuple/std/utility.hpp +++ /dev/null @@ -1,76 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_STD_UTILITY_HPP -#define SPROUT_TUPLE_STD_UTILITY_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - namespace detail { - template - struct get_impl; - template - struct get_impl<0, std::pair > { - public: - SPROUT_CONSTEXPR T1& operator()(std::pair& t) const { - return t.first; - } - SPROUT_CONSTEXPR T1 const& operator()(std::pair const& t) const { - return t.first; - } - }; - template - struct get_impl<1, std::pair > { - public: - SPROUT_CONSTEXPR T2& operator()(std::pair& t) const { - return t.second; - } - SPROUT_CONSTEXPR T2 const& operator()(std::pair const& t) const { - return t.second; - } - }; - } // namespace detail - } // namespace tuples -} // namespace sprout - -namespace sprout { - namespace tuples { - // - // tuple_access_traits - // - template - struct tuple_access_traits > { - public: - template - static SPROUT_CONSTEXPR typename sprout::tuples::tuple_element >::type& - tuple_get(std::pair& t) SPROUT_NOEXCEPT { - static_assert(I < 2, "tuple_get: index out of range"); - return sprout::tuples::detail::get_impl >()(t); - } - template - static SPROUT_CONSTEXPR typename sprout::tuples::tuple_element >::type const& - tuple_get(std::pair const& t) SPROUT_NOEXCEPT { - static_assert(I < 2, "tuple_get: index out of range"); - return sprout::tuples::detail::get_impl >()(t); - } - template - static SPROUT_CONSTEXPR typename sprout::tuples::tuple_element >::type&& - tuple_get(std::pair&& t) SPROUT_NOEXCEPT { - return sprout::move(tuple_get(t)); - } - }; - } // namespace tuples -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_STD_UTILITY_HPP diff --git a/dsp/lib/sprout/sprout/tuple/traits.hpp b/dsp/lib/sprout/sprout/tuple/traits.hpp deleted file mode 100644 index 69254d5..0000000 --- a/dsp/lib/sprout/sprout/tuple/traits.hpp +++ /dev/null @@ -1,105 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_TRAITS_HPP -#define SPROUT_TUPLE_TRAITS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - // - // rebind_types - // - template - struct rebind_types - : public sprout::types::rebind_types - {}; - - // - // tuple_construct_traits - // - template - struct tuple_construct_traits; - - namespace detail { - template - struct default_copied; - template - struct default_copied > - : public sprout::types::apply< - sprout::tuples::rebind_types, - typename sprout::remove_cvref< - typename sprout::tuples::tuple_element::type - >::type... - > - {}; - - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::detail::is_array_like::value, - typename sprout::tuples::tuple_construct_traits::copied_type - >::type - default_make_tuple(Args&&... args) { - typedef typename sprout::tuples::tuple_construct_traits::copied_type copied_type; - return copied_type{{SPROUT_FORWARD(Args, args)...}}; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::detail::is_array_like::value, - typename sprout::tuples::tuple_construct_traits::copied_type - >::type - default_make_tuple(Args&&... args) { - typedef typename sprout::tuples::tuple_construct_traits::copied_type copied_type; - return copied_type(SPROUT_FORWARD(Args, args)...); - } - } // namespace detail - - template - struct tuple_construct_traits { - public: - typedef typename sprout::tuples::detail::default_copied< - Tuple, - typename sprout::tuple_indexes::type - >::type copied_type; - public: - template - static SPROUT_CONSTEXPR copied_type deep_copy(Tup&& tup) { - return SPROUT_FORWARD(Tup, tup); - } - template - static SPROUT_CONSTEXPR copied_type make(Args&&... args) { - return sprout::tuples::detail::default_make_tuple(SPROUT_FORWARD(Args, args)...); - } - template - static SPROUT_CONSTEXPR copied_type remake( - Tup&&, - Args&&... args - ) - { - return make(SPROUT_FORWARD(Args, args)...); - } - }; - template - struct tuple_construct_traits - : public sprout::tuples::tuple_construct_traits - {}; - } // namespace tuples - - using sprout::tuples::tuple_construct_traits; -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/tuple/tuple.hpp b/dsp/lib/sprout/sprout/tuple/tuple.hpp deleted file mode 100644 index b4fdf17..0000000 --- a/dsp/lib/sprout/sprout/tuple/tuple.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_TUPLE_HPP -#define SPROUT_TUPLE_TUPLE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_TUPLE_TUPLE_HPP diff --git a/dsp/lib/sprout/sprout/tuple/tuple/comparison.hpp b/dsp/lib/sprout/sprout/tuple/tuple/comparison.hpp deleted file mode 100644 index 40835ba..0000000 --- a/dsp/lib/sprout/sprout/tuple/tuple/comparison.hpp +++ /dev/null @@ -1,109 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_TUPLE_COMPARISON_HPP -#define SPROUT_TUPLE_TUPLE_COMPARISON_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - // - // operator== - // operator< - // operator!= - // operator> - // operator>= - // operator<= - // - namespace detail { - template - struct tuple_compare; - template - struct tuple_compare<0, I, I, T, U> { - public: - static SPROUT_CONSTEXPR bool - eq(T const&, U const&) { - return true; - } - static SPROUT_CONSTEXPR bool - less(T const&, U const&) { - return false; - } - }; - template - struct tuple_compare<0, I, J, T, U> { - public: - static SPROUT_CONSTEXPR bool - eq(T const& t, U const& u) { - return (sprout::tuples::get(t) == sprout::tuples::get(u) - && sprout::tuples::detail::tuple_compare<0, I + 1, J, T, U>::eq(t, u)) - ; - } - static SPROUT_CONSTEXPR bool - less(T const& t, U const& u) { - return (sprout::tuples::get(t) < sprout::tuples::get(u)) - || (!(sprout::tuples::get(u) < sprout::tuples::get(t)) - && sprout::tuples::detail::tuple_compare<0, I + 1, J, T, U>::less(t, u) - ) - ; - } - }; - } // namespace detail - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::tuples::tuple const& lhs, sprout::tuples::tuple const& rhs) { - typedef sprout::tuples::tuple T; - typedef sprout::tuples::tuple U; - return sprout::tuples::detail::tuple_compare< - sprout::tuples::tuple_size::value - sprout::tuples::tuple_size::value, - 0, - sprout::tuples::tuple_size::value, - T, - U - >::eq(lhs, rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator<(sprout::tuples::tuple const& lhs, sprout::tuples::tuple const& rhs) { - typedef sprout::tuples::tuple T; - typedef sprout::tuples::tuple U; - return sprout::tuples::detail::tuple_compare< - sprout::tuples::tuple_size::value - sprout::tuples::tuple_size::value, - 0, - sprout::tuples::tuple_size::value, - T, - U - >::less(lhs, rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::tuples::tuple const& lhs, sprout::tuples::tuple const& rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>(sprout::tuples::tuple const& lhs, sprout::tuples::tuple const& rhs) { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator<=(sprout::tuples::tuple const& lhs, sprout::tuples::tuple const& rhs) { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(sprout::tuples::tuple const& lhs, sprout::tuples::tuple const& rhs) { - return !(lhs < rhs); - } - } // namespace tuples -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_TUPLE_COMPARISON_HPP diff --git a/dsp/lib/sprout/sprout/tuple/tuple/get.hpp b/dsp/lib/sprout/sprout/tuple/tuple/get.hpp deleted file mode 100644 index fe6de75..0000000 --- a/dsp/lib/sprout/sprout/tuple/tuple/get.hpp +++ /dev/null @@ -1,105 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_TUPLE_GET_HPP -#define SPROUT_TUPLE_TUPLE_GET_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - // - // tuple_get - // - template - inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element >::type& - tuple_get(sprout::tuples::tuple& t) SPROUT_NOEXCEPT { - return sprout::tuples::detail::tuple_access::template get(t); - } - template - inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element >::type&& - tuple_get(sprout::tuples::tuple&& t) SPROUT_NOEXCEPT { - return sprout::tuples::detail::tuple_access::template get(sprout::move(t)); - } - template - inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element >::type const& - tuple_get(sprout::tuples::tuple const& t) SPROUT_NOEXCEPT { - return sprout::tuples::detail::tuple_access::template get(t); - } - } // namespace tuples - - using sprout::tuples::tuple_get; -} // namespace sprout - -namespace sprout { - namespace tuples { - // - // get - // - // effect: - // sprout::tuples::tuple_access_traits::type>::template tuple_get(t) - // [default] - // ADL callable tuple_get(t) -> tuple_get(t) - // [default] - // std::get(t) - // - template - inline SPROUT_CONSTEXPR decltype(sprout::tuples::tuple_access_traits::type>::template tuple_get(std::declval())) - get(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::tuples::tuple_access_traits::type>::template tuple_get(std::declval())) - { - return sprout::tuples::tuple_access_traits::type>::template tuple_get(SPROUT_FORWARD(T, t)); - } - - // - // get - // - template - inline SPROUT_CONSTEXPR decltype(sprout::tuples::get<(sprout::types::find_index::type, Type>::value)>(std::declval())) - get(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::tuples::get<(sprout::types::find_index::type, Type>::value)>(std::declval())) - { - static_assert(sprout::types::count::type, Type>::value == 1, "Requires: The type 'Type' occurs exactly once in type list."); - return sprout::tuples::get<(sprout::types::find_index::type, Type>::value)>(SPROUT_FORWARD(T, t)); - } - - // - // nested_get - // - template - inline SPROUT_CONSTEXPR decltype(sprout::tuples::get(std::declval())) - nested_get(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::tuples::get(std::declval())) - { - return sprout::tuples::get(SPROUT_FORWARD(T, t)); - } - template - inline SPROUT_CONSTEXPR decltype(sprout::tuples::nested_get(sprout::tuples::get(std::declval()))) - nested_get(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::tuples::nested_get(sprout::tuples::get(std::declval()))) - { - return sprout::tuples::nested_get(sprout::tuples::get(SPROUT_FORWARD(T, t))); - } - } // namespace tuples - - using sprout::tuples::get; - using sprout::tuples::nested_get; -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_TUPLE_GET_HPP diff --git a/dsp/lib/sprout/sprout/tuple/tuple/has_sprout_get.hpp b/dsp/lib/sprout/sprout/tuple/tuple/has_sprout_get.hpp deleted file mode 100644 index 16c6337..0000000 --- a/dsp/lib/sprout/sprout/tuple/tuple/has_sprout_get.hpp +++ /dev/null @@ -1,63 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_TUPLE_HAS_SPROUT_GET_HPP -#define SPROUT_TUPLE_TUPLE_HAS_SPROUT_GET_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // has_sprout_get - // - namespace tuples { - namespace detail { - template - struct has_sprout_get_test { - public: - template< - typename U = T, - typename = typename sprout::identity(std::declval()))>::type - > - static sprout::true_type test(int); - static sprout::false_type test(...); - }; -#if defined(_MSC_VER) && (_MSC_VER > 1900) - template::test(0))>::type> - struct has_sprout_get - : public Base_ - {}; -#else - template - struct has_sprout_get - : public sprout::identity::test(0))>::type - {}; -#endif - } // namespace detail - template - struct has_sprout_get - : public sprout::tuples::detail::has_sprout_get - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_sprout_get_v = sprout::tuples::has_sprout_get::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - } // namespace tuples - - using sprout::tuples::has_sprout_get; -#if SPROUT_USE_VARIABLE_TEMPLATES - using sprout::tuples::has_sprout_get_v; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_TUPLE_HAS_SPROUT_GET_HPP diff --git a/dsp/lib/sprout/sprout/tuple/tuple/hash.hpp b/dsp/lib/sprout/sprout/tuple/tuple/hash.hpp deleted file mode 100644 index b7ebe7a..0000000 --- a/dsp/lib/sprout/sprout/tuple/tuple/hash.hpp +++ /dev/null @@ -1,59 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_TUPLE_HASH_HPP -#define SPROUT_TUPLE_TUPLE_HASH_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - namespace detail { - template - inline SPROUT_CONSTEXPR std::size_t - tuple_hash_value_impl(sprout::tuples::tuple const& v, sprout::index_tuple) { - return sprout::hash_values(sprout::tuples::get(v)...); - } - } // namespace detail - // - // hash_value - // - template - inline SPROUT_CONSTEXPR std::size_t - hash_value(sprout::tuples::tuple const& v) { - return sprout::tuples::detail::tuple_hash_value_impl( - v, - sprout::index_pack::make() - ); - } - } // namespace tuples -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // hash - // - template - struct hash > - : public sprout::hash > - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -#endif // #ifndef SPROUT_TUPLE_TUPLE_HASH_HPP diff --git a/dsp/lib/sprout/sprout/tuple/tuple/ignore.hpp b/dsp/lib/sprout/sprout/tuple/tuple/ignore.hpp deleted file mode 100644 index d6e86b0..0000000 --- a/dsp/lib/sprout/sprout/tuple/tuple/ignore.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_TUPLE_IGNORE_HPP -#define SPROUT_TUPLE_TUPLE_IGNORE_HPP - -#include - -namespace sprout { - namespace tuples { - // - // ignore_t - // - struct ignore_t { - public: - template - SPROUT_CXX14_CONSTEXPR ignore_t const& operator=(T const&) const { - return *this; - } - }; - // - // ignore - // - SPROUT_STATIC_CONSTEXPR ignore_t ignore = {}; - } // namespace tuples - - using sprout::tuples::ignore_t; - using sprout::tuples::ignore; -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_TUPLE_IGNORE_HPP diff --git a/dsp/lib/sprout/sprout/tuple/tuple/make_tuple.hpp b/dsp/lib/sprout/sprout/tuple/tuple/make_tuple.hpp deleted file mode 100644 index 33b599f..0000000 --- a/dsp/lib/sprout/sprout/tuple/tuple/make_tuple.hpp +++ /dev/null @@ -1,91 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_TUPLE_MAKE_TUPLE_HPP -#define SPROUT_TUPLE_TUPLE_MAKE_TUPLE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - // - // make_tuple - // - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple::type>::type...> - make_tuple(Types&&... args) { - return sprout::tuples::tuple::type...>(SPROUT_FORWARD(Types, args)...); - } - - // - // forward_as_tuple - // - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - forward_as_tuple(Types&&... args) SPROUT_NOEXCEPT { - return sprout::tuples::tuple(SPROUT_FORWARD(Types, args)...); - } - - // - // tie - // - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple - tie(Types&... args) SPROUT_NOEXCEPT { - return sprout::tuples::tuple(args...); - } - - // - // tuple_cat - // - namespace detail { - template - struct tuple_cat_indexes_impl; - template - struct tuple_cat_indexes_impl, TupleSizes...> { - public: - typedef typename sprout::types::tuple_cat::type...>::type for_pack; - typedef typename sprout::types::tuple_cat::type...>::type for_element; - }; - template - struct tuple_cat_indexes - : public sprout::tuples::detail::tuple_cat_indexes_impl< - typename sprout::make_index_tuple::type, - sprout::tuples::tuple_size::type>::value... - > - {}; - - template - static SPROUT_CONSTEXPR Result - tuple_cat_impl(sprout::index_tuple, sprout::index_tuple, Tuples&&... tuples) { - return Result(sprout::tuples::get(sprout::pack_get(SPROUT_FORWARD(Tuples, tuples)...))...); - } - } // namespace detail - template - inline SPROUT_CONSTEXPR typename sprout::types::tuple_cat::type...>::type - tuple_cat(Tuples&&... tuples) { - typedef typename sprout::types::tuple_cat::type...>::type type; - typedef sprout::tuples::detail::tuple_cat_indexes indexes; - return sprout::tuples::detail::tuple_cat_impl(indexes::for_pack::make(), indexes::for_element::make(), SPROUT_FORWARD(Tuples, tuples)...); - } - } // namespace tuples - - using sprout::tuples::make_tuple; - using sprout::tuples::forward_as_tuple; - using sprout::tuples::tie; - using sprout::tuples::tuple_cat; -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_TUPLE_MAKE_TUPLE_HPP diff --git a/dsp/lib/sprout/sprout/tuple/tuple/traits.hpp b/dsp/lib/sprout/sprout/tuple/tuple/traits.hpp deleted file mode 100644 index e1cb82d..0000000 --- a/dsp/lib/sprout/sprout/tuple/tuple/traits.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_TUPLE_TRAITS_HPP -#define SPROUT_TUPLE_TUPLE_TRAITS_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_TUPLE_TUPLE_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/tuple/tuple/tuple.hpp b/dsp/lib/sprout/sprout/tuple/tuple/tuple.hpp deleted file mode 100644 index 38a164b..0000000 --- a/dsp/lib/sprout/sprout/tuple/tuple/tuple.hpp +++ /dev/null @@ -1,93 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_TUPLE_TUPLE_HPP -#define SPROUT_TUPLE_TUPLE_TUPLE_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - // - // tuple - // - // tuple construction - template - template< - typename UType1, typename UType2, - typename - > - inline SPROUT_CONSTEXPR sprout::tuples::tuple::tuple(sprout::pair const& t) - : base_type(t.first, t.second) - {} - template - template< - typename UType1, typename UType2, - typename - > - inline SPROUT_CONSTEXPR sprout::tuples::tuple::tuple(sprout::pair&& t) - : base_type(SPROUT_FORWARD(UType1, t.first), SPROUT_FORWARD(UType2, t.second)) - {} - - template - template< - typename UType1, typename UType2, - typename - > - inline SPROUT_CONSTEXPR sprout::tuples::tuple::tuple(sprout::tuples::flexibly_construct_t, sprout::pair const& t) - : base_type( - sprout::tuples::flexibly_construct_t(), - sprout::index_range<0, 2>::make(), - sprout::index_range<2, sizeof...(Types)>::make(), - t.first, t.second - ) - {} - template - template< - typename UType1, typename UType2, - typename - > - inline SPROUT_CONSTEXPR sprout::tuples::tuple::tuple(sprout::tuples::flexibly_construct_t, sprout::pair&& t) - : base_type( - sprout::tuples::flexibly_construct_t(), - sprout::index_range<0, 2>::make(), - sprout::index_range<2, sizeof...(Types)>::make(), - SPROUT_FORWARD(UType1, t.first), SPROUT_FORWARD(UType2, t.second) - ) - {} - // tuple assignment - template - template< - typename UType1, typename UType2, - typename - > - inline SPROUT_CXX14_CONSTEXPR sprout::tuples::tuple& - sprout::tuples::tuple::operator=(sprout::pair const& rhs) { - base_type::template get<0>(*this) = rhs.first; - base_type::template get<1>(*this) = rhs.second; - return *this; - } - template - template< - typename UType1, typename UType2, - typename - > - inline SPROUT_CXX14_CONSTEXPR sprout::tuples::tuple& - sprout::tuples::tuple::operator=(sprout::pair&& rhs) { - base_type::template get<0>(*this) = sprout::move(rhs.first); - base_type::template get<1>(*this) = sprout::move(rhs.second); - return *this; - } - } // namespace tuples -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_TUPLE_TUPLE_HPP diff --git a/dsp/lib/sprout/sprout/tuple/tuple/tuple_access_traits.hpp b/dsp/lib/sprout/sprout/tuple/tuple/tuple_access_traits.hpp deleted file mode 100644 index 0124f01..0000000 --- a/dsp/lib/sprout/sprout/tuple/tuple/tuple_access_traits.hpp +++ /dev/null @@ -1,97 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_TUPLE_TUPLE_ACCESS_TRAITS_HPP -#define SPROUT_TUPLE_TUPLE_TUPLE_ACCESS_TRAITS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout_adl { - template - sprout::not_found_via_adl tuple_get(...); -} // namespace sprout_adl - -namespace sprout_tuple_detail { - template - inline SPROUT_CONSTEXPR decltype(std::get(std::declval())) - tuple_get(T& t) - SPROUT_NOEXCEPT_IF_EXPR(std::get(std::declval())) - { - return std::get(t); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !std::is_const::value && !std::is_volatile::value && !std::is_reference::value, - decltype(sprout::move(std::get(std::declval()))) - >::type - tuple_get(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::move(std::get(std::declval()))) - { - return sprout::move(std::get(t)); - } - template - inline SPROUT_CONSTEXPR decltype(std::get(std::declval())) - tuple_get(T const& t) - SPROUT_NOEXCEPT_IF_EXPR(std::get(std::declval())) - { - return std::get(t); - } -} // namespace sprout_tuple_detail - -namespace sprout { - namespace tuples { - // - // tuple_access_traits - // - template - struct tuple_access_traits { - public: - template - static SPROUT_CONSTEXPR typename sprout::tuples::tuple_traits::template lvalue_reference::type - tuple_get(Tuple& t) SPROUT_NOEXCEPT { - using sprout_tuple_detail::tuple_get; - using sprout_adl::tuple_get; - return tuple_get(t); - } - template - static SPROUT_CONSTEXPR typename sprout::tuples::tuple_traits::template rvalue_reference::type - tuple_get(Tuple&& t) SPROUT_NOEXCEPT { - using sprout_tuple_detail::tuple_get; - using sprout_adl::tuple_get; - return tuple_get(sprout::move(t)); - } - template - static SPROUT_CONSTEXPR typename sprout::tuples::tuple_traits::template lvalue_reference::type - tuple_get(Tuple const& t) SPROUT_NOEXCEPT { - using sprout_tuple_detail::tuple_get; - using sprout_adl::tuple_get; - return tuple_get(t); - } - }; - template - struct tuple_access_traits { - public: - template - static SPROUT_CONSTEXPR typename sprout::tuples::tuple_traits::template lvalue_reference::type - tuple_get(Tuple const& t) SPROUT_NOEXCEPT { - return sprout::tuples::tuple_access_traits::template tuple_get(t); - } - }; - } // namespace tuples - - using sprout::tuples::tuple_access_traits; -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_TUPLE_TUPLE_ACCESS_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/tuple/tuple/tuple_decl.hpp b/dsp/lib/sprout/sprout/tuple/tuple/tuple_decl.hpp deleted file mode 100644 index f1e763f..0000000 --- a/dsp/lib/sprout/sprout/tuple/tuple/tuple_decl.hpp +++ /dev/null @@ -1,582 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_TUPLE_TUPLE_DECL_HPP -#define SPROUT_TUPLE_TUPLE_TUPLE_DECL_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - namespace detail { - template - class tuple_access; - - struct from_tuple_construct_t {}; - - template - struct element_holder { - public: - typedef typename IdentityType::type value_type; - private: - value_type value_; - public: - explicit SPROUT_CONSTEXPR element_holder() - : value_() - {} - element_holder(element_holder const&) = default; - element_holder(element_holder&&) = default; - template - explicit SPROUT_CONSTEXPR element_holder(T&& value) - : value_(SPROUT_FORWARD(T, value)) - {} - explicit SPROUT_CONSTEXPR element_holder(sprout::tuples::default_construct_t) - : value_() - {} - protected: - static SPROUT_CONSTEXPR value_type& - get(element_holder& t) { - return t.value_; - } - static SPROUT_CONSTEXPR value_type&& - get(element_holder&& t) { - return sprout::move(t.value_); - } - static SPROUT_CONSTEXPR value_type const& - get(element_holder const& t) { - return t.value_; - } - }; - - template - class tuple_base; - template - class tuple_base, Types...> - : public sprout::tuples::detail::element_holder >... - { - template - friend class sprout::tuples::detail::tuple_base; - protected: - template - static IdentityType element_helper(sprout::tuples::detail::element_holder const&); - template - static sprout::detail::nil_base element_helper(...); - template - struct element - : public sprout::identity(std::declval()))>::type - {}; - struct size - : public sprout::integral_constant - {}; - public: - SPROUT_CONSTEXPR tuple_base() - : sprout::tuples::detail::element_holder >()... - {} - template - explicit SPROUT_CONSTEXPR tuple_base(UTypes&&... args) - : sprout::tuples::detail::element_holder >(SPROUT_FORWARD(UTypes, args))... - {} - template - SPROUT_CONSTEXPR tuple_base(sprout::tuples::detail::from_tuple_construct_t, Tuple&& t) - : sprout::tuples::detail::element_holder >(std::decay::type::template get(SPROUT_FORWARD(Tuple, t)))... - {} - - template< - typename... UTypes, sprout::index_t... Is, sprout::index_t... Js, - typename sprout::enabler_if<(sizeof...(Types) == sizeof...(UTypes))>::type = sprout::enabler - > - explicit SPROUT_CONSTEXPR tuple_base(sprout::tuples::flexibly_construct_t, sprout::index_tuple, sprout::index_tuple, UTypes&&... args) - : sprout::tuples::detail::element_holder >(SPROUT_FORWARD(UTypes, args))... - {} - template< - typename... UTypes, sprout::index_t... Is, sprout::index_t... Js, - typename sprout::enabler_if<(sizeof...(Types) > sizeof...(UTypes))>::type = sprout::enabler - > - explicit SPROUT_CONSTEXPR tuple_base(sprout::tuples::flexibly_construct_t, sprout::index_tuple, sprout::index_tuple, UTypes&&... args) - : sprout::tuples::detail::element_holder::type> >(SPROUT_FORWARD(UTypes, args))... - , sprout::tuples::detail::element_holder::type> >()... - {} - template< - typename... UTypes, sprout::index_t... Is, sprout::index_t... Js, - typename sprout::enabler_if<(sizeof...(Types) < sizeof...(UTypes))>::type = sprout::enabler - > - explicit SPROUT_CONSTEXPR tuple_base(sprout::tuples::flexibly_construct_t, sprout::index_tuple, sprout::index_tuple, UTypes&&... args) - : sprout::tuples::detail::element_holder >(sprout::pack_get(SPROUT_FORWARD(UTypes, args)...))... - {} - - template< - typename Tuple, sprout::index_t... Is, sprout::index_t... Js, - typename sprout::enabler_if<(sizeof...(Types) == std::decay::type::size::value)>::type = sprout::enabler - > - explicit SPROUT_CONSTEXPR tuple_base(sprout::tuples::detail::from_tuple_construct_t, sprout::tuples::flexibly_construct_t, sprout::index_tuple, sprout::index_tuple, Tuple&& t) - : sprout::tuples::detail::element_holder >(std::decay::type::template get(SPROUT_FORWARD(Tuple, t)))... - {} - template< - typename Tuple, sprout::index_t... Is, sprout::index_t... Js, - typename sprout::enabler_if<(sizeof...(Types) > std::decay::type::size::value)>::type = sprout::enabler - > - explicit SPROUT_CONSTEXPR tuple_base(sprout::tuples::detail::from_tuple_construct_t, sprout::tuples::flexibly_construct_t, sprout::index_tuple, sprout::index_tuple, Tuple&& t) - : sprout::tuples::detail::element_holder::type> >(std::decay::type::template get(SPROUT_FORWARD(Tuple, t)))... - , sprout::tuples::detail::element_holder::type> >()... - {} - template< - typename Tuple, sprout::index_t... Is, sprout::index_t... Js, - typename sprout::enabler_if<(sizeof...(Types) < std::decay::type::size::value)>::type = sprout::enabler - > - explicit SPROUT_CONSTEXPR tuple_base(sprout::tuples::detail::from_tuple_construct_t, sprout::tuples::flexibly_construct_t, sprout::index_tuple, sprout::index_tuple, Tuple&& t) - : sprout::tuples::detail::element_holder >(std::decay::type::template get(SPROUT_FORWARD(Tuple, t)))... - {} - private: - template - static SPROUT_CONSTEXPR typename element::type& - get_impl(sprout::tuples::detail::element_holder& value) { - return sprout::tuples::detail::element_holder::get(value); - } - template - static SPROUT_CONSTEXPR typename element::type&& - get_impl(sprout::tuples::detail::element_holder&& value) { - return sprout::tuples::detail::element_holder::get(sprout::move(value)); - } - template - static SPROUT_CONSTEXPR typename element::type const& - get_impl(sprout::tuples::detail::element_holder const& value) { - return sprout::tuples::detail::element_holder::get(value); - } - protected: - template - static SPROUT_CONSTEXPR typename element::type& - get(tuple_base& t) { - return get_impl(t); - } - template - static SPROUT_CONSTEXPR typename element::type&& - get(tuple_base&& t) { - return get_impl(sprout::move(t)); - } - template - static SPROUT_CONSTEXPR typename element::type const& - get(tuple_base const& t) { - return get_impl(t); - } - }; - } // namespace detail - - template - class tuple - : public sprout::tuples::detail::tuple_base::type, Types...> - { - template - friend class sprout::tuples::tuple; - template - friend class sprout::tuples::detail::tuple_access; - private: - typedef typename sprout::make_index_tuple::type index_tuple_type; - typedef sprout::tuples::detail::tuple_base base_type; - private: - template - struct is_flexibly_convert_constructible_impl; - template - struct is_flexibly_convert_constructible_impl, Utypes...> - : public sprout::tpp::all_of< - sprout::is_convert_constructible< - typename sprout::pack_element::type, - typename sprout::pack_element::type - >... - > - {}; - - template - struct is_flexibly_assignable_impl; - template - struct is_flexibly_assignable_impl, Utypes...> - : public sprout::tpp::all_of< - std::is_assignable< - typename sprout::pack_element::type, - typename sprout::pack_element::type - >... - > - {}; - public: - template - struct is_flexibly_convert_constructible - : public is_flexibly_convert_constructible_impl< - typename sprout::make_index_tuple<(sizeof...(UTypes) < sizeof...(Types) ? sizeof...(UTypes) : sizeof...(Types))>::type, - UTypes... - > - {}; - template - struct is_rvref_flexibly_convert_constructible - : public is_flexibly_convert_constructible - {}; - template - struct is_clvref_flexibly_convert_constructible - : public is_flexibly_convert_constructible - {}; - - template - struct is_fixedly_convert_constructible - : public sprout::bool_constant< - (sizeof...(UTypes) == sizeof...(Types) && is_flexibly_convert_constructible::value) - > - {}; - template - struct is_rvref_fixedly_convert_constructible - : public is_fixedly_convert_constructible - {}; - template - struct is_clvref_fixedly_convert_constructible - : public is_fixedly_convert_constructible - {}; - - template - struct is_flexibly_assignable - : public is_flexibly_assignable_impl< - typename sprout::make_index_tuple<(sizeof...(UTypes) < sizeof...(Types) ? sizeof...(UTypes) : sizeof...(Types))>::type, - UTypes... - > - {}; - template - struct is_rvref_flexibly_assignable - : public is_flexibly_assignable - {}; - template - struct is_clvref_flexibly_assignable - : public is_flexibly_assignable - {}; - - template - struct is_fixedly_assignable - : public sprout::bool_constant< - (sizeof...(UTypes) == sizeof...(Types) && is_flexibly_assignable::value) - > - {}; - template - struct is_rvref_fixedly_assignable - : public is_fixedly_assignable - {}; - template - struct is_clvref_fixedly_assignable - : public is_fixedly_assignable - {}; - private: - template - SPROUT_CXX14_CONSTEXPR void - swap_impl(tuple& other, sprout::index_tuple) { - sprout::swallow({(sprout::swap(base_type::template get(*this), base_type::template get(other)), 0)...}); - } - template - SPROUT_CXX14_CONSTEXPR void - assign(Tuple&& t) { - assign_impl(SPROUT_FORWARD(Tuple, t), index_tuple_type()); - } - template - SPROUT_CXX14_CONSTEXPR void - assign_impl(Tuple&& t, sprout::index_tuple) { - typedef typename std::decay::type type; - sprout::swallow({((base_type::template get(*this) = sprout::move(type::template get(SPROUT_FORWARD(Tuple, t)))), 0)...}); - } - template - SPROUT_CONSTEXPR std::tuple - to_std_tuple(sprout::index_tuple) const { - return std::tuple(base_type::template get(*this)...); - } - public: - // tuple construction - SPROUT_CONSTEXPR tuple() - : base_type() - {} - explicit SPROUT_CONSTEXPR tuple(Types const&... elements) - : base_type(elements...) - {} - template< - typename... UTypes, - typename = typename std::enable_if< - sizeof...(Types) == sizeof...(UTypes) && sprout::tpp::all_of...>::value - >::type - > - explicit SPROUT_CONSTEXPR tuple(UTypes&&... elements) - : base_type(SPROUT_FORWARD(UTypes, elements)...) - {} - tuple(tuple const&) = default; - tuple(tuple&&) = default; - template< - typename... UTypes, - typename = typename std::enable_if< - sizeof...(Types) == sizeof...(UTypes) && sprout::tpp::all_of...>::value - >::type - > - SPROUT_CONSTEXPR tuple(sprout::tuples::tuple const& t) - : base_type(sprout::tuples::detail::from_tuple_construct_t(), t) - {} - template< - typename... UTypes, - typename = typename std::enable_if< - sizeof...(Types) == sizeof...(UTypes) && sprout::tpp::all_of...>::value - >::type - > - SPROUT_CONSTEXPR tuple(sprout::tuples::tuple&& t) - : base_type(sprout::tuples::detail::from_tuple_construct_t(), sprout::move(t)) - {} - template< - typename UType1, typename UType2, - typename = typename std::enable_if< - is_clvref_fixedly_convert_constructible::value - >::type - > - SPROUT_CONSTEXPR tuple(sprout::pair const& t); - template< - typename UType1, typename UType2, - typename = typename std::enable_if< - is_rvref_fixedly_convert_constructible::value - >::type - > - SPROUT_CONSTEXPR tuple(sprout::pair&& t); - template< - typename... UTypes, - typename = typename std::enable_if< - is_rvref_flexibly_convert_constructible::value - >::type - > - explicit SPROUT_CONSTEXPR tuple(sprout::tuples::flexibly_construct_t, UTypes&&... elements) - : base_type( - sprout::tuples::flexibly_construct_t(), - sprout::index_range<0, sizeof...(UTypes)>::make(), - sprout::index_range::make(), - SPROUT_FORWARD(UTypes, elements)... - ) - {} - template< - typename... UTypes, - typename = typename std::enable_if< - is_clvref_flexibly_convert_constructible::value - >::type - > - SPROUT_CONSTEXPR tuple(sprout::tuples::flexibly_construct_t, sprout::tuples::tuple const& t) - : base_type( - sprout::tuples::detail::from_tuple_construct_t(), sprout::tuples::flexibly_construct_t(), - sprout::index_range<0, sizeof...(UTypes)>::make(), - sprout::index_range::make(), - t - ) - {} - - template< - typename... UTypes, - typename = typename std::enable_if< - is_rvref_flexibly_convert_constructible::value - >::type - > - SPROUT_CONSTEXPR tuple(sprout::tuples::flexibly_construct_t, sprout::tuples::tuple&& t) - : base_type( - sprout::tuples::detail::from_tuple_construct_t(), sprout::tuples::flexibly_construct_t(), - sprout::index_range<0, sizeof...(UTypes)>::make(), - sprout::index_range::make(), - sprout::move(t) - ) - {} - template< - typename UType1, typename UType2, - typename = typename std::enable_if< - is_clvref_flexibly_convert_constructible::value - >::type - > - SPROUT_CONSTEXPR tuple(sprout::tuples::flexibly_construct_t, sprout::pair const& t); - template< - typename UType1, typename UType2, - typename = typename std::enable_if< - is_rvref_flexibly_convert_constructible::value - >::type - > - SPROUT_CONSTEXPR tuple(sprout::tuples::flexibly_construct_t, sprout::pair&& t); - // tuple assignment - SPROUT_CXX14_CONSTEXPR tuple& - operator=(tuple const& rhs) { - assign(rhs); - return *this; - } - SPROUT_CXX14_CONSTEXPR tuple& - operator=(tuple&& rhs) - SPROUT_NOEXCEPT_IF(sprout::tpp::all_of...>::value) - { - assign(sprout::move(rhs)); - return *this; - } - template< - typename... UTypes, - typename = typename std::enable_if< - sizeof...(Types) == sizeof...(UTypes) && sprout::tpp::all_of...>::value - >::type - > - SPROUT_CXX14_CONSTEXPR tuple& - operator=(sprout::tuples::tuple const& rhs) { - assign(rhs); - return *this; - } - template< - typename... UTypes, - typename = typename std::enable_if< - sizeof...(Types) == sizeof...(UTypes) && sprout::tpp::all_of...>::value - >::type - > - SPROUT_CXX14_CONSTEXPR tuple& - operator=(sprout::tuples::tuple&& rhs) { - assign(sprout::move(rhs)); - return *this; - } - template< - typename UType1, typename UType2, - typename = typename std::enable_if< - is_clvref_fixedly_assignable::value - >::type - > - SPROUT_CXX14_CONSTEXPR tuple& operator=(sprout::pair const& rhs); - template< - typename UType1, typename UType2, - typename = typename std::enable_if< - is_rvref_fixedly_assignable::value - >::type - > - SPROUT_CXX14_CONSTEXPR tuple& operator=(sprout::pair&& rhs); - // tuple swap - SPROUT_CXX14_CONSTEXPR void - swap(tuple& other) - SPROUT_NOEXCEPT_IF(sprout::tpp::all_of_c(), std::declval()))...>::value) - { - swap_impl(other, index_tuple_type()); - } - - SPROUT_EXPLICIT_CONVERSION SPROUT_CONSTEXPR operator std::tuple() const - SPROUT_NOEXCEPT_IF(sprout::tpp::all_of...>::value) - { - return to_std_tuple(index_tuple_type());; - } - }; - template<> - class tuple<> { - template - friend class sprout::tuples::detail::tuple_access; - protected: - template - struct element - : public sprout::detail::nil_base - {}; - public: - // tuple construction - SPROUT_CONSTEXPR tuple() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - tuple(tuple const&) = default; - tuple(tuple&&) = default; - template - explicit SPROUT_CONSTEXPR tuple(sprout::tuples::flexibly_construct_t, UTypes&&...) SPROUT_NOEXCEPT {} - template - SPROUT_CONSTEXPR tuple(sprout::tuples::flexibly_construct_t, sprout::tuples::tuple const&) SPROUT_NOEXCEPT {} - template - SPROUT_CONSTEXPR tuple(sprout::tuples::flexibly_construct_t, sprout::tuples::tuple&&) SPROUT_NOEXCEPT {} - template - SPROUT_CONSTEXPR tuple(sprout::tuples::flexibly_construct_t, sprout::pair const&) SPROUT_NOEXCEPT {} - template - SPROUT_CONSTEXPR tuple(sprout::tuples::flexibly_construct_t, sprout::pair&&) SPROUT_NOEXCEPT {} - // tuple swap - SPROUT_CXX14_CONSTEXPR void swap(tuple&) SPROUT_NOEXCEPT {} - - SPROUT_CONSTEXPR operator std::tuple<>() const SPROUT_NOEXCEPT { - return std::tuple<>();; - } - }; - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::tuples::tuple& lhs, sprout::tuples::tuple& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - namespace detail { - template - class tuple_access { - public: - template - struct element - : public sprout::tuples::tuple::template element - {}; - struct size - : public sprout::integral_constant - {}; - public: - template - static SPROUT_CONSTEXPR typename element::type& - get(sprout::tuples::tuple& t) { - return sprout::tuples::tuple::template get(t); - } - template - static SPROUT_CONSTEXPR typename element::type&& - get(sprout::tuples::tuple&& t) { - return sprout::tuples::tuple::template get(sprout::move(t)); - } - template - static SPROUT_CONSTEXPR typename element::type const& - get(sprout::tuples::tuple const& t) { - return sprout::tuples::tuple::template get(t); - } - }; - } // namespace detail - } // namespace tuples - - using sprout::tuples::tuple; - using sprout::tuples::swap; -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // tuple_size - // - template - struct tuple_size > - : public sprout::integral_constant - {}; - - // - // tuple_element - // - template - struct tuple_element > -// : public sprout::pack_element - : public sprout::tuples::detail::tuple_access::template element - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -#endif // #ifndef SPROUT_TUPLE_TUPLE_TUPLE_DECL_HPP diff --git a/dsp/lib/sprout/sprout/tuple/tuple/tuple_element.hpp b/dsp/lib/sprout/sprout/tuple/tuple/tuple_element.hpp deleted file mode 100644 index 8ef6d26..0000000 --- a/dsp/lib/sprout/sprout/tuple/tuple/tuple_element.hpp +++ /dev/null @@ -1,107 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_TUPLE_TUPLE_ELEMENT_HPP -#define SPROUT_TUPLE_TUPLE_TUPLE_ELEMENT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - // - // tuple_element - // - namespace detail { -#if defined(_MSC_VER) - template -#else - template >::value> -#endif - struct valid_tuple_index; - template - struct valid_tuple_index - : public sprout::false_type - {}; - template - struct valid_tuple_index - : public sprout::bool_constant<(I < std::tuple_size::value)> - {}; - -#if defined(_MSC_VER) - template -#else - template >::value && sprout::tuples::detail::valid_tuple_index::value> -#endif - struct tuple_element_default; - template - struct tuple_element_default - : public sprout::detail::nil_base - {}; - template - struct tuple_element_default - : public std::tuple_element - {}; - } // namespace detail - template - struct tuple_element - : public sprout::tuples::detail::tuple_element_default - {}; - - namespace detail { - template - struct tuple_element_default - : public std::add_const< - typename sprout::tuples::tuple_element::type - > - {}; - template - struct tuple_element_default - : public std::add_volatile< - typename sprout::tuples::tuple_element::type - > - {}; - template - struct tuple_element_default - : public std::add_cv< - typename sprout::tuples::tuple_element::type - > - {}; - } // namespace detail - template - struct tuple_element - : public sprout::tuples::detail::tuple_element_default - {}; - template - struct tuple_element - : public sprout::tuples::detail::tuple_element_default - {}; - template - struct tuple_element - : public sprout::tuples::detail::tuple_element_default - {}; - } // namespace tuples - - using sprout::tuples::tuple_element; - -#if SPROUT_USE_TEMPLATE_ALIASES - namespace tuples { - template - using tuple_element_t = typename sprout::tuples::tuple_element::type; - } // namespace tuples - - using sprout::tuples::tuple_element_t; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_TUPLE_TUPLE_ELEMENT_HPP diff --git a/dsp/lib/sprout/sprout/tuple/tuple/tuple_fwd.hpp b/dsp/lib/sprout/sprout/tuple/tuple/tuple_fwd.hpp deleted file mode 100644 index 575d81f..0000000 --- a/dsp/lib/sprout/sprout/tuple/tuple/tuple_fwd.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_TUPLE_TUPLE_FWD_HPP -#define SPROUT_TUPLE_TUPLE_TUPLE_FWD_HPP - -#include - -namespace sprout { - namespace tuples { - // - // tuple - // - template - class tuple; - } // namespace tuples -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_TUPLE_TUPLE_FWD_HPP diff --git a/dsp/lib/sprout/sprout/tuple/tuple/tuple_size.hpp b/dsp/lib/sprout/sprout/tuple/tuple/tuple_size.hpp deleted file mode 100644 index 111b843..0000000 --- a/dsp/lib/sprout/sprout/tuple/tuple/tuple_size.hpp +++ /dev/null @@ -1,69 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_TUPLE_TUPLE_SIZE_HPP -#define SPROUT_TUPLE_TUPLE_TUPLE_SIZE_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - // - // tuple_size - // - namespace detail { -#if defined(_MSC_VER) - template -#else - template >::value> -#endif - struct tuple_size_default; - template - struct tuple_size_default - : public sprout::detail::nil_base - {}; - template - struct tuple_size_default - : public sprout::detail::type_traits_wrapper > - {}; - } // namespace detail - template - struct tuple_size - : public sprout::tuples::detail::tuple_size_default - {}; - template - struct tuple_size - : public sprout::tuples::tuple_size - {}; - template - struct tuple_size - : public sprout::tuples::tuple_size - {}; - template - struct tuple_size - : public sprout::tuples::tuple_size - {}; - } // namespace tuples - - using sprout::tuples::tuple_size; - -#if SPROUT_USE_VARIABLE_TEMPLATES - namespace tuples { - template - SPROUT_STATIC_CONSTEXPR std::size_t tuple_size_v = sprout::tuples::tuple_size::value; - } // namespace tuples - - using sprout::tuples::tuple_size_v; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_TUPLE_TUPLE_SIZE_HPP diff --git a/dsp/lib/sprout/sprout/tuple/tuple/tuple_traits.hpp b/dsp/lib/sprout/sprout/tuple/tuple/tuple_traits.hpp deleted file mode 100644 index ba965b4..0000000 --- a/dsp/lib/sprout/sprout/tuple/tuple/tuple_traits.hpp +++ /dev/null @@ -1,85 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_TUPLE_TUPLE_TRAITS_HPP -#define SPROUT_TUPLE_TUPLE_TUPLE_TRAITS_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - // - // tuple_traits - // - template - struct tuple_traits { - public: - SPROUT_STATIC_CONSTEXPR std::size_t size = sprout::tuples::tuple_size::value; - public: - template - struct element - : public sprout::tuples::tuple_element - {}; - template - struct lvalue_reference - : public std::add_lvalue_reference::type> - {}; - template - struct const_lvalue_reference - : public std::add_lvalue_reference::type const> - {}; - template - struct rvalue_reference - : public std::add_rvalue_reference::type> - {}; - template - struct const_rvalue_reference - : public std::add_rvalue_reference::type const> - {}; - }; - template - SPROUT_CONSTEXPR_OR_CONST std::size_t sprout::tuples::tuple_traits::size; - - template - struct tuple_traits { - public: - SPROUT_STATIC_CONSTEXPR std::size_t size = sprout::tuples::tuple_traits::size; - public: - template - struct element - : public sprout::tuples::tuple_traits::template element - {}; - template - struct lvalue_reference - : public sprout::tuples::tuple_traits::template const_lvalue_reference - {}; - template - struct const_lvalue_reference - : public sprout::tuples::tuple_traits::template const_lvalue_reference - {}; - template - struct rvalue_reference - : public sprout::tuples::tuple_traits::template const_rvalue_reference - {}; - template - struct const_rvalue_reference - : public sprout::tuples::tuple_traits::template const_rvalue_reference - {}; - }; - template - SPROUT_CONSTEXPR_OR_CONST std::size_t sprout::tuples::tuple_traits::size; - } // namespace tuples - - using sprout::tuples::tuple_traits; -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_TUPLE_TUPLE_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/tuple/tuple/type_traits.hpp b/dsp/lib/sprout/sprout/tuple/tuple/type_traits.hpp deleted file mode 100644 index 94de5e2..0000000 --- a/dsp/lib/sprout/sprout/tuple/tuple/type_traits.hpp +++ /dev/null @@ -1,50 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TUPLE_TUPLE_TYPE_TRAITS_HPP -#define SPROUT_TUPLE_TUPLE_TYPE_TRAITS_HPP - -#include -#include -#include - -namespace sprout { - namespace tuples { - // - // is_tuple - // - template - struct is_tuple - : public sprout::false_type - {}; - template - struct is_tuple - : public sprout::tuples::is_tuple - {}; - template - struct is_tuple - : public sprout::tuples::is_tuple - {}; - template - struct is_tuple > - : public sprout::true_type - {}; - } // namespace tuples - - using sprout::tuples::is_tuple; - -#if SPROUT_USE_VARIABLE_TEMPLATES - namespace tuples { - template - SPROUT_STATIC_CONSTEXPR bool is_tuple_v = sprout::tuples::is_tuple::value; - } // namespace tuples - - using sprout::tuples::is_tuple; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TUPLE_TUPLE_TYPE_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/type.hpp b/dsp/lib/sprout/sprout/type.hpp deleted file mode 100644 index 3d9d91b..0000000 --- a/dsp/lib/sprout/sprout/type.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_HPP -#define SPROUT_TYPE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_HPP diff --git a/dsp/lib/sprout/sprout/type/algorithm.hpp b/dsp/lib/sprout/sprout/type/algorithm.hpp deleted file mode 100644 index d39fd5e..0000000 --- a/dsp/lib/sprout/sprout/type/algorithm.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_ALGORITHM_HPP -#define SPROUT_TYPE_ALGORITHM_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_ALGORITHM_HPP diff --git a/dsp/lib/sprout/sprout/type/algorithm/accumulate.hpp b/dsp/lib/sprout/sprout/type/algorithm/accumulate.hpp deleted file mode 100644 index 7e1714d..0000000 --- a/dsp/lib/sprout/sprout/type/algorithm/accumulate.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_ALGORITHM_ACCUMLATE_HPP -#define SPROUT_TYPE_ALGORITHM_ACCUMLATE_HPP - -#include -#include -#include - -namespace sprout { - namespace types { - // - // accumulate - // - template - struct accumulate - : public sprout::types::fold - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using accumulate_t = typename sprout::types::accumulate::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_ALGORITHM_ACCUMLATE_HPP diff --git a/dsp/lib/sprout/sprout/type/algorithm/all_of.hpp b/dsp/lib/sprout/sprout/type/algorithm/all_of.hpp deleted file mode 100644 index 18439b7..0000000 --- a/dsp/lib/sprout/sprout/type/algorithm/all_of.hpp +++ /dev/null @@ -1,80 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_ALGORITHM_ALL_OF_HPP -#define SPROUT_TYPE_ALGORITHM_ALL_OF_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace types { - namespace detail { - template< - typename Tuple, typename Predicate, std::size_t First, std::size_t Last, - std::size_t Pivot, - bool C1 = (Pivot == 0) - > - struct all_of_impl; - template< - typename Tuple, typename Predicate, std::size_t First, std::size_t Last, - std::size_t Pivot - > - struct all_of_impl - : public sprout::bool_constant< - sprout::types::apply::type>::type::value - > - {}; - template< - typename Tuple, typename Predicate, std::size_t First, std::size_t Last, - std::size_t Pivot - > - struct all_of_impl - : public sprout::bool_constant< - sprout::types::detail::all_of_impl< - Tuple, Predicate, First, First + Pivot, - Pivot / 2 - >::value - && sprout::types::detail::all_of_impl< - Tuple, Predicate, First + Pivot, Last, - (Last - First - Pivot) / 2 - >::value - > - {}; - template::value> - struct all_of - : public sprout::types::detail::all_of_impl - {}; - template - struct all_of - : public sprout::true_type - {}; - } // namespace detail - // - // all_of - // - template - struct all_of - : public sprout::types::detail::all_of - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using all_of_t = typename sprout::types::all_of::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool all_of_v = sprout::types::all_of::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_ALGORITHM_ALL_OF_HPP diff --git a/dsp/lib/sprout/sprout/type/algorithm/all_of_same.hpp b/dsp/lib/sprout/sprout/type/algorithm/all_of_same.hpp deleted file mode 100644 index 1dbe9b7..0000000 --- a/dsp/lib/sprout/sprout/type/algorithm/all_of_same.hpp +++ /dev/null @@ -1,79 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_ALGORITHM_ALL_OF_SAME_HPP -#define SPROUT_TYPE_ALGORITHM_ALL_OF_SAME_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace types { - namespace detail { - template< - typename Tuple, typename T, std::size_t First, std::size_t Last, - std::size_t Pivot, - bool C1 = (Pivot == 0) - > - struct all_of_same_impl; - template< - typename Tuple, typename T, std::size_t First, std::size_t Last, - std::size_t Pivot - > - struct all_of_same_impl - : public sprout::bool_constant< - std::is_same::type, T>::value - > - {}; - template< - typename Tuple, typename T, std::size_t First, std::size_t Last, - std::size_t Pivot - > - struct all_of_same_impl - : public sprout::bool_constant< - sprout::types::detail::all_of_same_impl< - Tuple, T, First, First + Pivot, - Pivot / 2 - >::value - && sprout::types::detail::all_of_same_impl< - Tuple, T, First + Pivot, Last, - (Last - First - Pivot) / 2 - >::value - > - {}; - template::value> - struct all_of_same - : public sprout::types::detail::all_of_same_impl - {}; - template - struct all_of_same - : public sprout::true_type - {}; - } // namespace detail - // - // all_of_same - // - template - struct all_of_same - : public sprout::types::detail::all_of_same - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using all_of_same_t = typename sprout::types::all_of_same::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool all_of_same_v = sprout::types::all_of_same::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_ALGORITHM_ALL_OF_SAME_HPP diff --git a/dsp/lib/sprout/sprout/type/algorithm/any_of.hpp b/dsp/lib/sprout/sprout/type/algorithm/any_of.hpp deleted file mode 100644 index edd00b4..0000000 --- a/dsp/lib/sprout/sprout/type/algorithm/any_of.hpp +++ /dev/null @@ -1,80 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_ALGORITHM_ANY_OF_HPP -#define SPROUT_TYPE_ALGORITHM_ANY_OF_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace types { - namespace detail { - template< - typename Tuple, typename Predicate, std::size_t First, std::size_t Last, - std::size_t Pivot, - bool C1 = (Pivot == 0) - > - struct any_of_impl; - template< - typename Tuple, typename Predicate, std::size_t First, std::size_t Last, - std::size_t Pivot - > - struct any_of_impl - : public sprout::bool_constant< - sprout::types::apply::type>::type::value - > - {}; - template< - typename Tuple, typename Predicate, std::size_t First, std::size_t Last, - std::size_t Pivot - > - struct any_of_impl - : public sprout::bool_constant< - sprout::types::detail::any_of_impl< - Tuple, Predicate, First, First + Pivot, - Pivot / 2 - >::value - || sprout::types::detail::any_of_impl< - Tuple, Predicate, First + Pivot, Last, - (Last - First - Pivot) / 2 - >::value - > - {}; - template::value> - struct any_of - : public sprout::types::detail::any_of_impl - {}; - template - struct any_of - : public sprout::false_type - {}; - } // namespace detail - // - // any_of - // - template - struct any_of - : public sprout::types::detail::any_of - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using any_of_t = typename sprout::types::any_of::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool any_of_v = sprout::types::any_of::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_ALGORITHM_ANY_OF_HPP diff --git a/dsp/lib/sprout/sprout/type/algorithm/any_of_same.hpp b/dsp/lib/sprout/sprout/type/algorithm/any_of_same.hpp deleted file mode 100644 index 37ab307..0000000 --- a/dsp/lib/sprout/sprout/type/algorithm/any_of_same.hpp +++ /dev/null @@ -1,79 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_ALGORITHM_ANY_OF_SAME_HPP -#define SPROUT_TYPE_ALGORITHM_ANY_OF_SAME_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace types { - namespace detail { - template< - typename Tuple, typename T, std::size_t First, std::size_t Last, - std::size_t Pivot, - bool C1 = (Pivot == 0) - > - struct any_of_same_impl; - template< - typename Tuple, typename T, std::size_t First, std::size_t Last, - std::size_t Pivot - > - struct any_of_same_impl - : public sprout::bool_constant< - std::is_same::type, T>::value - > - {}; - template< - typename Tuple, typename T, std::size_t First, std::size_t Last, - std::size_t Pivot - > - struct any_of_same_impl - : public sprout::bool_constant< - sprout::types::detail::any_of_same_impl< - Tuple, T, First, First + Pivot, - Pivot / 2 - >::value - || sprout::types::detail::any_of_same_impl< - Tuple, T, First + Pivot, Last, - (Last - First - Pivot) / 2 - >::value - > - {}; - template::value> - struct any_of_same - : public sprout::types::detail::any_of_same_impl - {}; - template - struct any_of_same - : public sprout::false_type - {}; - } // namespace detail - // - // any_of_same - // - template - struct any_of_same - : public sprout::types::detail::any_of_same - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using any_of_same_t = typename sprout::types::any_of_same::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool any_of_same_v = sprout::types::any_of_same::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_ALGORITHM_ANY_OF_SAME_HPP diff --git a/dsp/lib/sprout/sprout/type/algorithm/contains.hpp b/dsp/lib/sprout/sprout/type/algorithm/contains.hpp deleted file mode 100644 index 7018f31..0000000 --- a/dsp/lib/sprout/sprout/type/algorithm/contains.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_ALGORITHM_CONTAINTS_HPP -#define SPROUT_TYPE_ALGORITHM_CONTAINTS_HPP - -#include -#include -#include - -namespace sprout { - namespace types { - // - // contains - // - template - struct contains - : public sprout::types::any_of_same - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using contains_t = typename sprout::types::contains::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool contains_v = sprout::types::contains::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_ALGORITHM_CONTAINTS_HPP diff --git a/dsp/lib/sprout/sprout/type/algorithm/contains_if.hpp b/dsp/lib/sprout/sprout/type/algorithm/contains_if.hpp deleted file mode 100644 index 48becf4..0000000 --- a/dsp/lib/sprout/sprout/type/algorithm/contains_if.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_ALGORITHM_CONTAINTS_IF_HPP -#define SPROUT_TYPE_ALGORITHM_CONTAINTS_IF_HPP - -#include -#include -#include - -namespace sprout { - namespace types { - // - // contains_if - // - template - struct contains_if - : public sprout::types::any_of - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using contains_if_t = typename sprout::types::contains_if::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool contains_if_v = sprout::types::contains_if::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_ALGORITHM_CONTAINTS_IF_HPP diff --git a/dsp/lib/sprout/sprout/type/algorithm/count.hpp b/dsp/lib/sprout/sprout/type/algorithm/count.hpp deleted file mode 100644 index 6c7dc0b..0000000 --- a/dsp/lib/sprout/sprout/type/algorithm/count.hpp +++ /dev/null @@ -1,81 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_ALGORITHM_COUNT_HPP -#define SPROUT_TYPE_ALGORITHM_COUNT_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace types { - namespace detail { - template< - typename Tuple, typename T, std::size_t First, - std::size_t Size, - bool C0 = (Size == 1) - > - struct count_impl; - template< - typename Tuple, typename T, std::size_t First, - std::size_t Size - > - struct count_impl - : public sprout::integral_constant< - std::size_t, (std::is_same::type, T>::value ? 1 : 0) - > - {}; - template< - typename Tuple, typename T, std::size_t First, - std::size_t Size - > - struct count_impl - : public sprout::integral_constant< - std::size_t, - sprout::types::detail::count_impl< - Tuple, T, First, - Size / 2 - >::value - + sprout::types::detail::count_impl< - Tuple, T, First + Size / 2, - Size - Size / 2 - >::value - > - {}; - template::value> - struct count - : public sprout::types::detail::count_impl - {}; - template - struct count - : public sprout::integral_constant - {}; - } // namespace detail - // - // count - // - template - struct count - : public sprout::types::detail::count - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using count_t = typename sprout::types::count::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR std::size_t count_v = sprout::types::count::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_ALGORITHM_COUNT_HPP diff --git a/dsp/lib/sprout/sprout/type/algorithm/count_if.hpp b/dsp/lib/sprout/sprout/type/algorithm/count_if.hpp deleted file mode 100644 index 3c8df1b..0000000 --- a/dsp/lib/sprout/sprout/type/algorithm/count_if.hpp +++ /dev/null @@ -1,81 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_ALGORITHM_COUNT_IF_HPP -#define SPROUT_TYPE_ALGORITHM_COUNT_IF_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace types { - namespace detail { - template< - typename Tuple, typename Predicate, std::size_t First, - std::size_t Size, - bool C0 = (Size == 1) - > - struct count_if_impl; - template< - typename Tuple, typename Predicate, std::size_t First, - std::size_t Size - > - struct count_if_impl - : public sprout::integral_constant< - std::size_t, (sprout::types::apply::type>::type::value ? 1 : 0) - > - {}; - template< - typename Tuple, typename Predicate, std::size_t First, - std::size_t Size - > - struct count_if_impl - : public sprout::integral_constant< - std::size_t, - sprout::types::detail::count_if_impl< - Tuple, Predicate, First, - Size / 2 - >::value - + sprout::types::detail::count_if_impl< - Tuple, Predicate, First + Size / 2, - Size - Size / 2 - >::value - > - {}; - template::value> - struct count_if - : public sprout::types::detail::count_if_impl - {}; - template - struct count_if - : public sprout::integral_constant - {}; - } // namespace detail - // - // count_if - // - template - struct count_if - : public sprout::types::detail::count_if - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using count_if_t = typename sprout::types::count_if::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR std::size_t count_if_v = sprout::types::count_if::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_ALGORITHM_COUNT_IF_HPP diff --git a/dsp/lib/sprout/sprout/type/algorithm/detail/find_index_result.hpp b/dsp/lib/sprout/sprout/type/algorithm/detail/find_index_result.hpp deleted file mode 100644 index d87fe60..0000000 --- a/dsp/lib/sprout/sprout/type/algorithm/detail/find_index_result.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_ALGORITHM_DETAIL_FIND_INDEX_RESULT_HPP -#define SPROUT_TYPE_ALGORITHM_DETAIL_FIND_INDEX_RESULT_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace types { - namespace detail { - template - struct find_index_result - : public sprout::integral_constant - { - public: - typedef sprout::bool_constant::value> is_found; - }; - } // namespace detail - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_ALGORITHM_DETAIL_FIND_INDEX_RESULT_HPP diff --git a/dsp/lib/sprout/sprout/type/algorithm/find_index.hpp b/dsp/lib/sprout/sprout/type/algorithm/find_index.hpp deleted file mode 100644 index 93536cf..0000000 --- a/dsp/lib/sprout/sprout/type/algorithm/find_index.hpp +++ /dev/null @@ -1,87 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_ALGORITHM_FIND_INDEX_HPP -#define SPROUT_TYPE_ALGORITHM_FIND_INDEX_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace types { - namespace detail { - template< - typename Tuple, typename T, std::size_t First, std::size_t Last, - std::size_t Pivot, std::size_t Found, - bool C0 = (Found != First), bool C1 = (Pivot == 0) - > - struct find_index_impl; - template< - typename Tuple, typename T, std::size_t First, std::size_t Last, - std::size_t Pivot, std::size_t Found, - bool C1 - > - struct find_index_impl - : public sprout::types::detail::find_index_result - {}; - template< - typename Tuple, typename T, std::size_t First, std::size_t Last, - std::size_t Pivot, std::size_t Found - > - struct find_index_impl - : public sprout::types::detail::find_index_result< - Tuple, (std::is_same::type, T>::value ? First : Last) - > - {}; - template< - typename Tuple, typename T, std::size_t First, std::size_t Last, - std::size_t Pivot, std::size_t Found - > - struct find_index_impl - : public sprout::types::detail::find_index_impl< - Tuple, T, First + Pivot, Last, - (Last - First - Pivot) / 2, - sprout::types::detail::find_index_impl< - Tuple, T, First, First + Pivot, - Pivot / 2, - First - >::value - > - {}; - template::value> - struct find_index - : public sprout::types::detail::find_index_impl - {}; - template - struct find_index - : public sprout::types::detail::find_index_result - {}; - } // namespace detail - // - // find_index - // - template - struct find_index - : public sprout::types::detail::find_index - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using find_index_t = typename sprout::types::find_index::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR std::size_t find_index_v = sprout::types::find_index::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_ALGORITHM_FIND_INDEX_HPP diff --git a/dsp/lib/sprout/sprout/type/algorithm/find_index_if.hpp b/dsp/lib/sprout/sprout/type/algorithm/find_index_if.hpp deleted file mode 100644 index 095730f..0000000 --- a/dsp/lib/sprout/sprout/type/algorithm/find_index_if.hpp +++ /dev/null @@ -1,87 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_ALGORITHM_FIND_INDEX_IF_HPP -#define SPROUT_TYPE_ALGORITHM_FIND_INDEX_IF_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace types { - namespace detail { - template< - typename Tuple, typename Predicate, std::size_t First, std::size_t Last, - std::size_t Pivot, std::size_t Found, - bool C0 = (Found != First), bool C1 = (Pivot == 0) - > - struct find_index_if_impl; - template< - typename Tuple, typename Predicate, std::size_t First, std::size_t Last, - std::size_t Pivot, std::size_t Found, - bool C1 - > - struct find_index_if_impl - : public sprout::types::detail::find_index_result - {}; - template< - typename Tuple, typename Predicate, std::size_t First, std::size_t Last, - std::size_t Pivot, std::size_t Found - > - struct find_index_if_impl - : public sprout::types::detail::find_index_result< - Tuple, (sprout::types::apply::type>::type::value ? First : Last) - > - {}; - template< - typename Tuple, typename Predicate, std::size_t First, std::size_t Last, - std::size_t Pivot, std::size_t Found - > - struct find_index_if_impl - : public sprout::types::detail::find_index_if_impl< - Tuple, Predicate, First + Pivot, Last, - (Last - First - Pivot) / 2, - sprout::types::detail::find_index_if_impl< - Tuple, Predicate, First, First + Pivot, - Pivot / 2, - First - >::value - > - {}; - template::value> - struct find_index_if - : public sprout::types::detail::find_index_if_impl - {}; - template - struct find_index_if - : public sprout::types::detail::find_index_result - {}; - } // namespace detail - // - // find_index_if - // - template - struct find_index_if - : public sprout::types::detail::find_index_if - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using find_index_if_t = typename sprout::types::find_index_if::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR std::size_t find_index_if_v = sprout::types::find_index_if::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_ALGORITHM_FIND_INDEX_IF_HPP diff --git a/dsp/lib/sprout/sprout/type/algorithm/fold.hpp b/dsp/lib/sprout/sprout/type/algorithm/fold.hpp deleted file mode 100644 index 890ca89..0000000 --- a/dsp/lib/sprout/sprout/type/algorithm/fold.hpp +++ /dev/null @@ -1,75 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_ALGORITHM_FOLD_HPP -#define SPROUT_TYPE_ALGORITHM_FOLD_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace types { - namespace detail { - template< - typename Tuple, typename T, typename BinaryOp, std::size_t First, std::size_t Last, - std::size_t Pivot, - bool C0 = (Pivot == 0) - > - struct fold_impl; - template< - typename Tuple, typename T, typename BinaryOp, std::size_t First, std::size_t Last, - std::size_t Pivot - > - struct fold_impl - : public sprout::types::apply::type> - {}; - template< - typename Tuple, typename T, typename BinaryOp, std::size_t First, std::size_t Last, - std::size_t Pivot - > - struct fold_impl - : public sprout::types::detail::fold_impl< - Tuple, - typename sprout::types::detail::fold_impl< - Tuple, - T, - BinaryOp, - First, First + Pivot, - Pivot / 2 - >::type, - BinaryOp, - First + Pivot, Last, - (Last - First - Pivot) / 2 - > - {}; - template::value> - struct fold - : public sprout::types::detail::fold_impl - {}; - template - struct fold - : public sprout::identity - {}; - } // namespace detail - // - // fold - // - template - struct fold - : public sprout::types::detail::fold - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using fold_t = typename sprout::types::fold::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_ALGORITHM_FOLD_HPP diff --git a/dsp/lib/sprout/sprout/type/algorithm/lower_bound_index.hpp b/dsp/lib/sprout/sprout/type/algorithm/lower_bound_index.hpp deleted file mode 100644 index 06d276d..0000000 --- a/dsp/lib/sprout/sprout/type/algorithm/lower_bound_index.hpp +++ /dev/null @@ -1,80 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_ALGORITHM_LOWER_BOUND_INDEX_HPP -#define SPROUT_TYPE_ALGORITHM_LOWER_BOUND_INDEX_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace types { - namespace detail { - template< - typename Tuple, typename T, typename Compare, std::size_t First, std::size_t Last, - std::size_t Distance = (Last - First) - > - struct lower_bound_index_impl; - template< - typename Tuple, typename T, typename Compare, std::size_t First, std::size_t Last - > - struct lower_bound_index_impl< - Tuple, T, Compare, First, Last, - 0 - > - : public sprout::integral_constant - {}; - template< - typename Tuple, typename T, typename Compare, std::size_t First, std::size_t Last - > - struct lower_bound_index_impl< - Tuple, T, Compare, First, Last, - 1 - > - : public sprout::integral_constant< - std::size_t, - sprout::types::apply::type, T>::type::value ? Last : First - > - {}; - template< - typename Tuple, typename T, typename Compare, std::size_t First, std::size_t Last, - std::size_t Distance - > - struct lower_bound_index_impl - : public std::conditional< - sprout::types::apply::type, T>::type::value, - sprout::types::detail::lower_bound_index_impl, - sprout::types::detail::lower_bound_index_impl - >::type - {}; - } // namespace detail - // - // lower_bound_index - // - template - struct lower_bound_index - : public sprout::types::detail::lower_bound_index_impl::value> - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using lower_bound_index_t = typename sprout::types::lower_bound_index::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR std::size_t lower_bound_index_v = sprout::types::lower_bound_index::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_ALGORITHM_LOWER_BOUND_INDEX_HPP diff --git a/dsp/lib/sprout/sprout/type/algorithm/none_of.hpp b/dsp/lib/sprout/sprout/type/algorithm/none_of.hpp deleted file mode 100644 index f88eff4..0000000 --- a/dsp/lib/sprout/sprout/type/algorithm/none_of.hpp +++ /dev/null @@ -1,80 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_ALGORITHM_NONE_OF_HPP -#define SPROUT_TYPE_ALGORITHM_NONE_OF_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace types { - namespace detail { - template< - typename Tuple, typename Predicate, std::size_t First, std::size_t Last, - std::size_t Pivot, - bool C1 = (Pivot == 0) - > - struct none_of_impl; - template< - typename Tuple, typename Predicate, std::size_t First, std::size_t Last, - std::size_t Pivot - > - struct none_of_impl - : public sprout::bool_constant< - !sprout::types::apply::type>::type::value - > - {}; - template< - typename Tuple, typename Predicate, std::size_t First, std::size_t Last, - std::size_t Pivot - > - struct none_of_impl - : public sprout::bool_constant< - sprout::types::detail::none_of_impl< - Tuple, Predicate, First, First + Pivot, - Pivot / 2 - >::value - && sprout::types::detail::none_of_impl< - Tuple, Predicate, First + Pivot, Last, - (Last - First - Pivot) / 2 - >::value - > - {}; - template::value> - struct none_of - : public sprout::types::detail::none_of_impl - {}; - template - struct none_of - : public sprout::true_type - {}; - } // namespace detail - // - // none_of - // - template - struct none_of - : public sprout::types::detail::none_of - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using none_of_t = typename sprout::types::none_of::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool none_of_v = sprout::types::none_of::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_ALGORITHM_NONE_OF_HPP diff --git a/dsp/lib/sprout/sprout/type/algorithm/none_of_same.hpp b/dsp/lib/sprout/sprout/type/algorithm/none_of_same.hpp deleted file mode 100644 index aa9c03d..0000000 --- a/dsp/lib/sprout/sprout/type/algorithm/none_of_same.hpp +++ /dev/null @@ -1,79 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_ALGORITHM_NONE_OF_SAME_HPP -#define SPROUT_TYPE_ALGORITHM_NONE_OF_SAME_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace types { - namespace detail { - template< - typename Tuple, typename T, std::size_t First, std::size_t Last, - std::size_t Pivot, - bool C1 = (Pivot == 0) - > - struct none_of_same_impl; - template< - typename Tuple, typename T, std::size_t First, std::size_t Last, - std::size_t Pivot - > - struct none_of_same_impl - : public sprout::bool_constant< - !std::is_same::type, T>::value - > - {}; - template< - typename Tuple, typename T, std::size_t First, std::size_t Last, - std::size_t Pivot - > - struct none_of_same_impl - : public sprout::bool_constant< - sprout::types::detail::none_of_same_impl< - Tuple, T, First, First + Pivot, - Pivot / 2 - >::value - && sprout::types::detail::none_of_same_impl< - Tuple, T, First + Pivot, Last, - (Last - First - Pivot) / 2 - >::value - > - {}; - template::value> - struct none_of_same - : public sprout::types::detail::none_of_same_impl - {}; - template - struct none_of_same - : public sprout::true_type - {}; - } // namespace detail - // - // none_of_same - // - template - struct none_of_same - : public sprout::types::detail::none_of_same - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using none_of_same_t = typename sprout::types::none_of_same::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool none_of_same_v = sprout::types::none_of_same::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_ALGORITHM_NONE_OF_SAME_HPP diff --git a/dsp/lib/sprout/sprout/type/algorithm/one_of.hpp b/dsp/lib/sprout/sprout/type/algorithm/one_of.hpp deleted file mode 100644 index 4393280..0000000 --- a/dsp/lib/sprout/sprout/type/algorithm/one_of.hpp +++ /dev/null @@ -1,115 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_ALGORITHM_ONE_OF_HPP -#define SPROUT_TYPE_ALGORITHM_ONE_OF_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace types { - namespace detail { - template< - typename Tuple, typename Predicate, std::size_t First, std::size_t Last, - std::size_t Pivot, - bool C1 = (Pivot == 0) - > - struct one_of_impl_1; - template< - typename Tuple, typename Predicate, std::size_t First, std::size_t Last, - std::size_t Pivot - > - struct one_of_impl_1 - : public sprout::bool_constant< - !sprout::types::apply::type>::type::value - > - {}; - template< - typename Tuple, typename Predicate, std::size_t First, std::size_t Last, - std::size_t Pivot - > - struct one_of_impl_1 - : public sprout::bool_constant< - sprout::types::detail::one_of_impl_1< - Tuple, Predicate, First, First + Pivot, - Pivot / 2 - >::value - && sprout::types::detail::one_of_impl_1< - Tuple, Predicate, First + Pivot, Last, - (Last - First - Pivot) / 2 - >::value - > - {}; - template< - typename Tuple, typename Predicate, std::size_t First, std::size_t Last, - std::size_t Pivot, - bool C1 = (Pivot == 0) - > - struct one_of_impl; - template< - typename Tuple, typename Predicate, std::size_t First, std::size_t Last, - std::size_t Pivot - > - struct one_of_impl - : public sprout::bool_constant< - sprout::types::apply::type>::type::value - > - {}; - template< - typename Tuple, typename Predicate, std::size_t First, std::size_t Last, - std::size_t Pivot - > - struct one_of_impl - : public sprout::bool_constant< - sprout::types::detail::one_of_impl< - Tuple, Predicate, First, First + Pivot, - Pivot / 2 - >::value - ? sprout::types::detail::one_of_impl_1< - Tuple, Predicate, First + Pivot, Last, - (Last - First - Pivot) / 2 - >::value - : sprout::types::detail::one_of_impl< - Tuple, Predicate, First + Pivot, Last, - (Last - First - Pivot) / 2 - >::value - > - {}; - template::value> - struct one_of - : public sprout::types::detail::one_of_impl - {}; - template - struct one_of - : public sprout::true_type - {}; - } // namespace detail - // - // one_of - // - template - struct one_of - : public sprout::types::detail::one_of - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using one_of_t = typename sprout::types::one_of::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool one_of_v = sprout::types::one_of::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_ALGORITHM_ONE_OF_HPP diff --git a/dsp/lib/sprout/sprout/type/algorithm/one_of_same.hpp b/dsp/lib/sprout/sprout/type/algorithm/one_of_same.hpp deleted file mode 100644 index aa596fe..0000000 --- a/dsp/lib/sprout/sprout/type/algorithm/one_of_same.hpp +++ /dev/null @@ -1,114 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_ALGORITHM_ONE_OF_SAME_HPP -#define SPROUT_TYPE_ALGORITHM_ONE_OF_SAME_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace types { - namespace detail { - template< - typename Tuple, typename T, std::size_t First, std::size_t Last, - std::size_t Pivot, - bool C1 = (Pivot == 0) - > - struct one_of_same_impl_1; - template< - typename Tuple, typename T, std::size_t First, std::size_t Last, - std::size_t Pivot - > - struct one_of_same_impl_1 - : public sprout::bool_constant< - !std::is_same::type, T>::value - > - {}; - template< - typename Tuple, typename T, std::size_t First, std::size_t Last, - std::size_t Pivot - > - struct one_of_same_impl_1 - : public sprout::bool_constant< - sprout::types::detail::one_of_same_impl_1< - Tuple, T, First, First + Pivot, - Pivot / 2 - >::value - && sprout::types::detail::one_of_same_impl_1< - Tuple, T, First + Pivot, Last, - (Last - First - Pivot) / 2 - >::value - > - {}; - template< - typename Tuple, typename T, std::size_t First, std::size_t Last, - std::size_t Pivot, - bool C1 = (Pivot == 0) - > - struct one_of_same_impl; - template< - typename Tuple, typename T, std::size_t First, std::size_t Last, - std::size_t Pivot - > - struct one_of_same_impl - : public sprout::bool_constant< - std::is_same::type, T>::value - > - {}; - template< - typename Tuple, typename T, std::size_t First, std::size_t Last, - std::size_t Pivot - > - struct one_of_same_impl - : public sprout::bool_constant< - sprout::types::detail::one_of_same_impl< - Tuple, T, First, First + Pivot, - Pivot / 2 - >::value - ? sprout::types::detail::one_of_same_impl_1< - Tuple, T, First + Pivot, Last, - (Last - First - Pivot) / 2 - >::value - : sprout::types::detail::one_of_same_impl< - Tuple, T, First + Pivot, Last, - (Last - First - Pivot) / 2 - >::value - > - {}; - template::value> - struct one_of_same - : public sprout::types::detail::one_of_same_impl - {}; - template - struct one_of_same - : public sprout::true_type - {}; - } // namespace detail - // - // one_of_same - // - template - struct one_of_same - : public sprout::types::detail::one_of_same - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using one_of_same_t = typename sprout::types::one_of_same::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool one_of_same_v = sprout::types::one_of_same::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_ALGORITHM_ONE_OF_SAME_HPP diff --git a/dsp/lib/sprout/sprout/type/algorithm/partial_sum.hpp b/dsp/lib/sprout/sprout/type/algorithm/partial_sum.hpp deleted file mode 100644 index 868d077..0000000 --- a/dsp/lib/sprout/sprout/type/algorithm/partial_sum.hpp +++ /dev/null @@ -1,60 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_ALGORITHM_PARTIAL_SUM_HPP -#define SPROUT_TYPE_ALGORITHM_PARTIAL_SUM_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace types { - namespace detail { - template< - typename Tuple, typename BinaryOp, std::size_t I, std::size_t N, typename T, typename... Types - > - struct partial_sum_impl - : public sprout::types::detail::partial_sum_impl< - Tuple, BinaryOp, I + 1, N - 1, - typename sprout::types::apply::type>::type, - Types..., T - > - {}; - template - struct partial_sum_impl - : public sprout::types::apply, Types..., T> - {}; - - template - struct partial_sum - : public sprout::types::detail::partial_sum_impl::type> - {}; - template - struct partial_sum - : public sprout::types::apply > - {}; - } // namespace detail - // - // partial_sum - // - template - struct partial_sum - : public sprout::types::detail::partial_sum::value> - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using partial_sum_t = typename sprout::types::partial_sum::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_ALGORITHM_PARTIAL_SUM_HPP diff --git a/dsp/lib/sprout/sprout/type/algorithm/transform.hpp b/dsp/lib/sprout/sprout/type/algorithm/transform.hpp deleted file mode 100644 index 0f555c5..0000000 --- a/dsp/lib/sprout/sprout/type/algorithm/transform.hpp +++ /dev/null @@ -1,58 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_ALGORITHM_TRANSFORM_HPP -#define SPROUT_TYPE_ALGORITHM_TRANSFORM_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace types { - namespace detail { - template - struct transform2_impl; - template - struct transform2_impl > - : public sprout::types::apply< - sprout::types::rebind_types, - typename sprout::types::apply< - BinaryOp, - typename sprout::types::tuple_element::type, - typename sprout::types::tuple_element::type - >::type... - > - {}; - } // namespace detail - // - // transform - // - template - struct transform - : public sprout::types::detail::transform2_impl< - Tuple, Tuple2OrUnaryOp, BinaryOp, - typename sprout::tuple_indexes::type - > - {}; - template - struct transform - : public sprout::types::apply, UnaryOp> - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using transform_t = typename sprout::types::transform::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_ALGORITHM_TRANSFORM_HPP diff --git a/dsp/lib/sprout/sprout/type/algorithm/upper_bound_index.hpp b/dsp/lib/sprout/sprout/type/algorithm/upper_bound_index.hpp deleted file mode 100644 index a14a2be..0000000 --- a/dsp/lib/sprout/sprout/type/algorithm/upper_bound_index.hpp +++ /dev/null @@ -1,80 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_ALGORITHM_UPPER_BOUND_INDEX_HPP -#define SPROUT_TYPE_ALGORITHM_UPPER_BOUND_INDEX_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace types { - namespace detail { - template< - typename Tuple, typename T, typename Compare, std::size_t First, std::size_t Last, - std::size_t Distance = (Last - First) - > - struct upper_bound_index_impl; - template< - typename Tuple, typename T, typename Compare, std::size_t First, std::size_t Last - > - struct upper_bound_index_impl< - Tuple, T, Compare, First, Last, - 0 - > - : public sprout::integral_constant - {}; - template< - typename Tuple, typename T, typename Compare, std::size_t First, std::size_t Last - > - struct upper_bound_index_impl< - Tuple, T, Compare, First, Last, - 1 - > - : public sprout::integral_constant< - std::size_t, - !sprout::types::apply::type>::type::value ? Last : First - > - {}; - template< - typename Tuple, typename T, typename Compare, std::size_t First, std::size_t Last, - std::size_t Distance - > - struct upper_bound_index_impl - : public std::conditional< - !sprout::types::apply::type>::type::value, - sprout::types::detail::upper_bound_index_impl, - sprout::types::detail::upper_bound_index_impl - >::type - {}; - } // namespace detail - // - // upper_bound_index - // - template - struct upper_bound_index - : public sprout::types::detail::upper_bound_index_impl::value> - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using upper_bound_index_t = typename sprout::types::upper_bound_index::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR std::size_t upper_bound_index_v = sprout::types::upper_bound_index::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_ALGORITHM_UPPER_BOUND_INDEX_HPP diff --git a/dsp/lib/sprout/sprout/type/apply.hpp b/dsp/lib/sprout/sprout/type/apply.hpp deleted file mode 100644 index 1336b27..0000000 --- a/dsp/lib/sprout/sprout/type/apply.hpp +++ /dev/null @@ -1,64 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_APPLY_HPP -#define SPROUT_TYPE_APPLY_HPP - -#include -#include - -namespace sprout { - namespace types { - // - // apply - // -#if SPROUT_USE_TEMPLATE_ALIASES - template - using apply = typename F::template apply; -#else // #if SPROUT_USE_TEMPLATE_ALIASES - template - struct apply - : public F::template apply - {}; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using apply_t = typename sprout::types::apply::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR decltype(sprout::types::apply::value) apply_v = sprout::types::apply::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - - // - // apply_q - // -#if SPROUT_USE_TEMPLATE_ALIASES - template class F, typename... Types> - using apply_q = sprout::types::apply, Types...>; -#else // #if SPROUT_USE_TEMPLATE_ALIASES - template class F, typename... Types> - struct apply_q - : public sprout::types::apply, Types...> - {}; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - -#if SPROUT_USE_TEMPLATE_ALIASES - template class F, typename... Types> - using apply_q_t = typename sprout::types::apply_q::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - -#if SPROUT_USE_VARIABLE_TEMPLATES - template class F, typename... Types> - SPROUT_STATIC_CONSTEXPR decltype(sprout::types::apply_q::value) apply_q_v = sprout::types::apply_q::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_APPLY_HPP diff --git a/dsp/lib/sprout/sprout/type/boost/mpl/detail/tuple_element.hpp b/dsp/lib/sprout/sprout/type/boost/mpl/detail/tuple_element.hpp deleted file mode 100644 index a4f32aa..0000000 --- a/dsp/lib/sprout/sprout/type/boost/mpl/detail/tuple_element.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_BOOST_MPL_DETAIL_TUPLE_ELEMENT_HPP -#define SPROUT_TYPE_BOOST_MPL_DETAIL_TUPLE_ELEMENT_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace types { - namespace detail { - template::value)> - struct mpl_tuple_element; - template - struct mpl_tuple_element - : public sprout::detail::nil_base - {}; - template - struct mpl_tuple_element - : public boost::mpl::at_c - {}; - } // namespace detail - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_BOOST_MPL_DETAIL_TUPLE_ELEMENT_HPP diff --git a/dsp/lib/sprout/sprout/type/boost/mpl/string.hpp b/dsp/lib/sprout/sprout/type/boost/mpl/string.hpp deleted file mode 100644 index 3ec4f78..0000000 --- a/dsp/lib/sprout/sprout/type/boost/mpl/string.hpp +++ /dev/null @@ -1,92 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_BOOST_MPL_STRING_HPP -#define SPROUT_TYPE_BOOST_MPL_STRING_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace types { - // - // begin - // - template - struct begin > - : public boost::mpl::begin > - {}; - // - // end - // - template - struct end > - : public boost::mpl::end > - {}; - - // - // tuple_size - // - template - struct tuple_size > - : public boost::mpl::size > - {}; - // - // tuple_element - // - template - struct tuple_element > - : public sprout::types::detail::mpl_tuple_element > - {}; - - // - // next - // - template - struct next > - : public boost::mpl::next > - {}; - - // - // prev - // - template - struct prev > - : public boost::mpl::prior > - {}; - - // - // push_back - // - template - struct push_back, T> - : public boost::mpl::push_back, T> - {}; - - // - // push_front - // - template - struct push_front, T> - : public boost::mpl::push_back, T> - {}; - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_BOOST_MPL_STRING_HPP diff --git a/dsp/lib/sprout/sprout/type/boost/mpl/v_iter.hpp b/dsp/lib/sprout/sprout/type/boost/mpl/v_iter.hpp deleted file mode 100644 index 2daf13d..0000000 --- a/dsp/lib/sprout/sprout/type/boost/mpl/v_iter.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_BOOST_MPL_V_ITER_HPP -#define SPROUT_TYPE_BOOST_MPL_V_ITER_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace types { - // - // next - // - template - struct next > - : public boost::mpl::next > - {}; - // - // prev - // - template - struct prev > - : public boost::mpl::prior > - {}; - // - // advance - // - template - struct advance, Disatnce> - : public boost::mpl::advance_c, Disatnce> - {}; - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_BOOST_MPL_V_ITER_HPP diff --git a/dsp/lib/sprout/sprout/type/boost/mpl/vector.hpp b/dsp/lib/sprout/sprout/type/boost/mpl/vector.hpp deleted file mode 100644 index 507a8aa..0000000 --- a/dsp/lib/sprout/sprout/type/boost/mpl/vector.hpp +++ /dev/null @@ -1,54 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_BOOST_MPL_VECTOR_HPP -#define SPROUT_TYPE_BOOST_MPL_VECTOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace types { - // - // begin - // - template - struct begin > - : public boost::mpl::begin > - {}; - // - // end - // - template - struct end > - : public boost::mpl::end > - {}; - - // - // tuple_size - // - template - struct tuple_size > - : public boost::mpl::size > - {}; - // - // tuple_element - // - template - struct tuple_element > - : public sprout::types::detail::mpl_tuple_element > - {}; - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_BOOST_MPL_VECTOR_HPP diff --git a/dsp/lib/sprout/sprout/type/boost/mpl/vector_c.hpp b/dsp/lib/sprout/sprout/type/boost/mpl/vector_c.hpp deleted file mode 100644 index 656b7cc..0000000 --- a/dsp/lib/sprout/sprout/type/boost/mpl/vector_c.hpp +++ /dev/null @@ -1,54 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_BOOST_MPL_VECTOR_C_HPP -#define SPROUT_TYPE_BOOST_MPL_VECTOR_C_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace types { - // - // begin - // - template - struct begin > - : public boost::mpl::begin > - {}; - // - // end - // - template - struct end > - : public boost::mpl::end > - {}; - - // - // tuple_size - // - template - struct tuple_size > - : public boost::mpl::size > - {}; - // - // tuple_element - // - template - struct tuple_element > - : public sprout::types::detail::mpl_tuple_element > - {}; - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_BOOST_MPL_VECTOR_C_HPP diff --git a/dsp/lib/sprout/sprout/type/functional.hpp b/dsp/lib/sprout/sprout/type/functional.hpp deleted file mode 100644 index 9a470c9..0000000 --- a/dsp/lib/sprout/sprout/type/functional.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_FUNCTIONAL_HPP -#define SPROUT_TYPE_FUNCTIONAL_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_FUNCTIONAL_HPP diff --git a/dsp/lib/sprout/sprout/type/functional/arithmetic.hpp b/dsp/lib/sprout/sprout/type/functional/arithmetic.hpp deleted file mode 100644 index b3149e6..0000000 --- a/dsp/lib/sprout/sprout/type/functional/arithmetic.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_FUNCTIONAL_ARITHMETIC_HPP -#define SPROUT_TYPE_FUNCTIONAL_ARITHMETIC_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_FUNCTIONAL_ARITHMETIC_HPP diff --git a/dsp/lib/sprout/sprout/type/functional/comparison.hpp b/dsp/lib/sprout/sprout/type/functional/comparison.hpp deleted file mode 100644 index fa1d3bf..0000000 --- a/dsp/lib/sprout/sprout/type/functional/comparison.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_FUNCTIONAL_COMPARISON_HPP -#define SPROUT_TYPE_FUNCTIONAL_COMPARISON_HPP - -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_FUNCTIONAL_COMPARISON_HPP diff --git a/dsp/lib/sprout/sprout/type/functional/detail/arithmetic_op.hpp b/dsp/lib/sprout/sprout/type/functional/detail/arithmetic_op.hpp deleted file mode 100644 index 3f2fc8c..0000000 --- a/dsp/lib/sprout/sprout/type/functional/detail/arithmetic_op.hpp +++ /dev/null @@ -1,84 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_FUNCTIONAL_DETAIL_ARITHMETIC_OP_HPP -#define SPROUT_TYPE_FUNCTIONAL_DETAIL_ARITHMETIC_OP_HPP - -#include -#include -#include -#include - -#define SPROUT_TYPES_DETAIL_FUNCTIONAL_ARITHMETIC_BINARY_OP_DECL(NAME, OP) \ -namespace sprout { \ - namespace types { \ - template \ - struct NAME \ - : public sprout::integral_constant \ - {}; \ - template \ - struct NAME \ - : public sprout::integral_constant< \ - typename sprout::arithmetic_promote::type, \ - (T::value OP U::value) \ - > \ - {}; \ - template \ - struct SPROUT_PP_CAT(NAME, _mf) { \ - public: \ - template \ - struct apply \ - : public sprout::types::NAME \ - {}; \ - }; \ - typedef sprout::types::SPROUT_PP_CAT(NAME, _mf)<> SPROUT_PP_CAT(NAME, _); \ - SPROUT_TYPES_DETAIL_FUNCTIONAL_ARITHMETIC_BINARY_OP_VT_DECL(NAME) \ - } \ -} -#if SPROUT_USE_VARIABLE_TEMPLATES -# define SPROUT_TYPES_DETAIL_FUNCTIONAL_ARITHMETIC_BINARY_OP_VT_DECL(NAME) \ - template \ - SPROUT_STATIC_CONSTEXPR typename sprout::types::NAME::value_type SPROUT_PP_CAT(NAME, _v) = sprout::types::NAME::value; -#else // #if SPROUT_USE_VARIABLE_TEMPLATES -# define SPROUT_TYPES_DETAIL_FUNCTIONAL_ARITHMETIC_BINARY_OP_VT_DECL(NAME) -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - -#define SPROUT_TYPES_DETAIL_FUNCTIONAL_ARITHMETIC_UNARY_OP_DECL(NAME, OP) \ -namespace sprout { \ - namespace types { \ - template \ - struct NAME \ - : public sprout::integral_constant \ - {}; \ - template \ - struct NAME \ - : public sprout::integral_constant< \ - typename sprout::arithmetic_promote::type, \ - (OP T::value) \ - > \ - {}; \ - template \ - struct SPROUT_PP_CAT(NAME, _mf) { \ - public: \ - template \ - struct apply \ - : public sprout::types::NAME \ - {}; \ - }; \ - typedef sprout::types::SPROUT_PP_CAT(NAME, _mf)<> SPROUT_PP_CAT(NAME, _); \ - SPROUT_TYPES_DETAIL_FUNCTIONAL_ARITHMETIC_UNARY_OP_VT_DECL(NAME) \ - } \ -} -#if SPROUT_USE_VARIABLE_TEMPLATES -# define SPROUT_TYPES_DETAIL_FUNCTIONAL_ARITHMETIC_UNARY_OP_VT_DECL(NAME) \ - template \ - SPROUT_STATIC_CONSTEXPR typename sprout::types::NAME::value_type SPROUT_PP_CAT(NAME, _v) = sprout::types::NAME::value; -#else // #if SPROUT_USE_VARIABLE_TEMPLATES -# define SPROUT_TYPES_DETAIL_FUNCTIONAL_ARITHMETIC_UNARY_OP_VT_DECL(NAME) -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - -#endif // #ifndef SPROUT_TYPE_FUNCTIONAL_DETAIL_ARITHMETIC_OP_HPP diff --git a/dsp/lib/sprout/sprout/type/functional/detail/comparison_op.hpp b/dsp/lib/sprout/sprout/type/functional/detail/comparison_op.hpp deleted file mode 100644 index 5757e44..0000000 --- a/dsp/lib/sprout/sprout/type/functional/detail/comparison_op.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_FUNCTIONAL_DETAIL_COMPARISON_OP_HPP -#define SPROUT_TYPE_FUNCTIONAL_DETAIL_COMPARISON_OP_HPP - -#include -#include -#include -#include - -#define SPROUT_TYPES_DETAIL_FUNCTIONAL_COMPARISON_OP_DECL(NAME, OP) \ -namespace sprout { \ - namespace types { \ - template \ - struct NAME \ - : public sprout::bool_constant<((T::value) OP (U::value))> \ - {}; \ - typedef sprout::types::quote SPROUT_PP_CAT(NAME, _); \ - SPROUT_TYPES_DETAIL_FUNCTIONAL_COMPARISON_OP_VT_DECL(NAME) \ - } \ -} - -#if SPROUT_USE_VARIABLE_TEMPLATES -# define SPROUT_TYPES_DETAIL_FUNCTIONAL_COMPARISON_OP_VT_DECL(NAME) \ - template \ - SPROUT_STATIC_CONSTEXPR bool SPROUT_PP_CAT(NAME, _v) = sprout::types::NAME::value; -#else // #if SPROUT_USE_VARIABLE_TEMPLATES -# define SPROUT_TYPES_DETAIL_FUNCTIONAL_COMPARISON_OP_VT_DECL(NAME) -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - -#endif // #ifndef SPROUT_TYPE_FUNCTIONAL_DETAIL_COMPARISON_OP_HPP diff --git a/dsp/lib/sprout/sprout/type/functional/divides.hpp b/dsp/lib/sprout/sprout/type/functional/divides.hpp deleted file mode 100644 index fd8eef9..0000000 --- a/dsp/lib/sprout/sprout/type/functional/divides.hpp +++ /dev/null @@ -1,21 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_FUNCTIONAL_DIVIDES_HPP -#define SPROUT_TYPE_FUNCTIONAL_DIVIDES_HPP - -#include -#include - -// -// divides -// divides_mf -// divides_ -// -SPROUT_TYPES_DETAIL_FUNCTIONAL_ARITHMETIC_BINARY_OP_DECL(divides, /) - -#endif // #ifndef SPROUT_TYPE_FUNCTIONAL_DIVIDES_HPP diff --git a/dsp/lib/sprout/sprout/type/functional/equal_to.hpp b/dsp/lib/sprout/sprout/type/functional/equal_to.hpp deleted file mode 100644 index 56901ed..0000000 --- a/dsp/lib/sprout/sprout/type/functional/equal_to.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_FUNCTIONAL_EQUAL_TO_HPP -#define SPROUT_TYPE_FUNCTIONAL_EQUAL_TO_HPP - -#include -#include - -// -// equal_to -// equal_to_ -// -SPROUT_TYPES_DETAIL_FUNCTIONAL_COMPARISON_OP_DECL(equal_to, ==) - -#endif // #ifndef SPROUT_TYPE_FUNCTIONAL_EQUAL_TO_HPP diff --git a/dsp/lib/sprout/sprout/type/functional/greater.hpp b/dsp/lib/sprout/sprout/type/functional/greater.hpp deleted file mode 100644 index e1088fa..0000000 --- a/dsp/lib/sprout/sprout/type/functional/greater.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_FUNCTIONAL_GREATER_HPP -#define SPROUT_TYPE_FUNCTIONAL_GREATER_HPP - -#include -#include - -// -// greater -// greater_ -// -SPROUT_TYPES_DETAIL_FUNCTIONAL_COMPARISON_OP_DECL(greater, >) - -#endif // #ifndef SPROUT_TYPE_FUNCTIONAL_GREATER_HPP diff --git a/dsp/lib/sprout/sprout/type/functional/greater_equal.hpp b/dsp/lib/sprout/sprout/type/functional/greater_equal.hpp deleted file mode 100644 index 96af4c0..0000000 --- a/dsp/lib/sprout/sprout/type/functional/greater_equal.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_FUNCTIONAL_GREATER_EQUAL_HPP -#define SPROUT_TYPE_FUNCTIONAL_GREATER_EQUAL_HPP - -#include -#include - -// -// greater_equal -// greater_equal_ -// -SPROUT_TYPES_DETAIL_FUNCTIONAL_COMPARISON_OP_DECL(greater_equal, >=) - -#endif // #ifndef SPROUT_TYPE_FUNCTIONAL_GREATER_EQUAL_HPP diff --git a/dsp/lib/sprout/sprout/type/functional/less.hpp b/dsp/lib/sprout/sprout/type/functional/less.hpp deleted file mode 100644 index 9664449..0000000 --- a/dsp/lib/sprout/sprout/type/functional/less.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_FUNCTIONAL_LESS_HPP -#define SPROUT_TYPE_FUNCTIONAL_LESS_HPP - -#include -#include - -// -// less -// less_ -// -SPROUT_TYPES_DETAIL_FUNCTIONAL_COMPARISON_OP_DECL(less, <) - -#endif // #ifndef SPROUT_TYPE_FUNCTIONAL_LESS_HPP diff --git a/dsp/lib/sprout/sprout/type/functional/less_equal.hpp b/dsp/lib/sprout/sprout/type/functional/less_equal.hpp deleted file mode 100644 index ae51e10..0000000 --- a/dsp/lib/sprout/sprout/type/functional/less_equal.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_FUNCTIONAL_LESS_EQUAL_HPP -#define SPROUT_TYPE_FUNCTIONAL_LESS_EQUAL_HPP - -#include -#include - -// -// less_equal -// less_equal_ -// -SPROUT_TYPES_DETAIL_FUNCTIONAL_COMPARISON_OP_DECL(less_equal, <=) - -#endif // #ifndef SPROUT_TYPE_FUNCTIONAL_LESS_EQUAL_HPP diff --git a/dsp/lib/sprout/sprout/type/functional/minus.hpp b/dsp/lib/sprout/sprout/type/functional/minus.hpp deleted file mode 100644 index 097f05c..0000000 --- a/dsp/lib/sprout/sprout/type/functional/minus.hpp +++ /dev/null @@ -1,21 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_FUNCTIONAL_MINUS_HPP -#define SPROUT_TYPE_FUNCTIONAL_MINUS_HPP - -#include -#include - -// -// minus -// minus_mf -// minus_ -// -SPROUT_TYPES_DETAIL_FUNCTIONAL_ARITHMETIC_BINARY_OP_DECL(minus, -) - -#endif // #ifndef SPROUT_TYPE_FUNCTIONAL_MINUS_HPP diff --git a/dsp/lib/sprout/sprout/type/functional/modulus.hpp b/dsp/lib/sprout/sprout/type/functional/modulus.hpp deleted file mode 100644 index a7bd69d..0000000 --- a/dsp/lib/sprout/sprout/type/functional/modulus.hpp +++ /dev/null @@ -1,21 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_FUNCTIONAL_MODULUS_HPP -#define SPROUT_TYPE_FUNCTIONAL_MODULUS_HPP - -#include -#include - -// -// modulus -// modulus_mf -// modulus_ -// -SPROUT_TYPES_DETAIL_FUNCTIONAL_ARITHMETIC_BINARY_OP_DECL(modulus, %) - -#endif // #ifndef SPROUT_TYPE_FUNCTIONAL_MODULUS_HPP diff --git a/dsp/lib/sprout/sprout/type/functional/multiplies.hpp b/dsp/lib/sprout/sprout/type/functional/multiplies.hpp deleted file mode 100644 index 796c2ca..0000000 --- a/dsp/lib/sprout/sprout/type/functional/multiplies.hpp +++ /dev/null @@ -1,21 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_FUNCTIONAL_MULTIPLIES_HPP -#define SPROUT_TYPE_FUNCTIONAL_MULTIPLIES_HPP - -#include -#include - -// -// multiplies -// multiplies_mf -// multiplies_ -// -SPROUT_TYPES_DETAIL_FUNCTIONAL_ARITHMETIC_BINARY_OP_DECL(multiplies, *) - -#endif // #ifndef SPROUT_TYPE_FUNCTIONAL_MULTIPLIES_HPP diff --git a/dsp/lib/sprout/sprout/type/functional/negate.hpp b/dsp/lib/sprout/sprout/type/functional/negate.hpp deleted file mode 100644 index 40c291e..0000000 --- a/dsp/lib/sprout/sprout/type/functional/negate.hpp +++ /dev/null @@ -1,21 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_FUNCTIONAL_NEGATE_HPP -#define SPROUT_TYPE_FUNCTIONAL_NEGATE_HPP - -#include -#include - -// -// negate -// negate_mf -// negate_ -// -SPROUT_TYPES_DETAIL_FUNCTIONAL_ARITHMETIC_UNARY_OP_DECL(negate, -) - -#endif // #ifndef SPROUT_TYPE_FUNCTIONAL_NEGATE_HPP diff --git a/dsp/lib/sprout/sprout/type/functional/not_equal_to.hpp b/dsp/lib/sprout/sprout/type/functional/not_equal_to.hpp deleted file mode 100644 index 6b859ed..0000000 --- a/dsp/lib/sprout/sprout/type/functional/not_equal_to.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_FUNCTIONAL_NOT_EQUAL_TO_HPP -#define SPROUT_TYPE_FUNCTIONAL_NOT_EQUAL_TO_HPP - -#include -#include - -// -// not_equal_to -// not_equal_to_ -// -SPROUT_TYPES_DETAIL_FUNCTIONAL_COMPARISON_OP_DECL(not_equal_to, !=) - -#endif // #ifndef SPROUT_TYPE_FUNCTIONAL_NOT_EQUAL_TO_HPP diff --git a/dsp/lib/sprout/sprout/type/functional/plus.hpp b/dsp/lib/sprout/sprout/type/functional/plus.hpp deleted file mode 100644 index 9bac6e4..0000000 --- a/dsp/lib/sprout/sprout/type/functional/plus.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_FUNCTIONAL_PLUS_HPP -#define SPROUT_TYPE_FUNCTIONAL_PLUS_HPP - -#include -#include - -SPROUT_TYPES_DETAIL_FUNCTIONAL_ARITHMETIC_BINARY_OP_DECL(plus, +) - -#endif // #ifndef SPROUT_TYPE_FUNCTIONAL_PLUS_HPP diff --git a/dsp/lib/sprout/sprout/type/functional/posite.hpp b/dsp/lib/sprout/sprout/type/functional/posite.hpp deleted file mode 100644 index c732a67..0000000 --- a/dsp/lib/sprout/sprout/type/functional/posite.hpp +++ /dev/null @@ -1,21 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_FUNCTIONAL_POSITE_HPP -#define SPROUT_TYPE_FUNCTIONAL_POSITE_HPP - -#include -#include - -// -// posite -// posite_mf -// posite_ -// -SPROUT_TYPES_DETAIL_FUNCTIONAL_ARITHMETIC_UNARY_OP_DECL(posite, +) - -#endif // #ifndef SPROUT_TYPE_FUNCTIONAL_POSITE_HPP diff --git a/dsp/lib/sprout/sprout/type/integral_array.hpp b/dsp/lib/sprout/sprout/type/integral_array.hpp deleted file mode 100644 index dc93a9c..0000000 --- a/dsp/lib/sprout/sprout/type/integral_array.hpp +++ /dev/null @@ -1,73 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_INTEGRAL_ARRAY_HPP -#define SPROUT_TYPE_INTEGRAL_ARRAY_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace types { - // - // integral_array - // - template - struct integral_array - : public sprout::types::type_tuple...> - { - public: - typedef integral_array type; - typedef T value_type; - }; - } // namespace types -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // tuple_size - // - template - struct tuple_size > - : public std::tuple_size...> > - {}; - - // - // tuple_element - // - template - struct tuple_element > - : public sprout::types::tuple_element...> > - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -namespace sprout { - // - // tuple_get - // - template - inline SPROUT_CONSTEXPR typename std::tuple_element >::type - tuple_get(sprout::types::integral_array) SPROUT_NOEXCEPT { - static_assert(I < sizeof...(Values), "tuple_get: index out of range"); - typedef typename std::tuple_element >::type type; - return type(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_INTEGRAL_ARRAY_HPP diff --git a/dsp/lib/sprout/sprout/type/iterator.hpp b/dsp/lib/sprout/sprout/type/iterator.hpp deleted file mode 100644 index 0aca280..0000000 --- a/dsp/lib/sprout/sprout/type/iterator.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_ITERATOR_HPP -#define SPROUT_TYPE_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/type/iterator/advance.hpp b/dsp/lib/sprout/sprout/type/iterator/advance.hpp deleted file mode 100644 index 19439cf..0000000 --- a/dsp/lib/sprout/sprout/type/iterator/advance.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_ITERATOR_ADVANCE_HPP -#define SPROUT_TYPE_ITERATOR_ADVANCE_HPP - -#include -#include - -namespace sprout { - namespace types { - // - // advance - // - template - struct advance - : public Iterator::template advance - {}; - - template - struct advance - : public sprout::types::advance - {}; - template - struct advance - : public sprout::types::advance - {}; - template - struct advance - : public sprout::types::advance - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using advance_t = typename sprout::types::advance::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_ITERATOR_ADVANCE_HPP diff --git a/dsp/lib/sprout/sprout/type/iterator/deref.hpp b/dsp/lib/sprout/sprout/type/iterator/deref.hpp deleted file mode 100644 index 574e6a7..0000000 --- a/dsp/lib/sprout/sprout/type/iterator/deref.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_ITERATOR_DEREF_HPP -#define SPROUT_TYPE_ITERATOR_DEREF_HPP - -#include - -namespace sprout { - namespace types { - // - // deref - // - template - struct deref - : public Iterator - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using deref_t = typename sprout::types::deref::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_ITERATOR_DEREF_HPP diff --git a/dsp/lib/sprout/sprout/type/iterator/distance.hpp b/dsp/lib/sprout/sprout/type/iterator/distance.hpp deleted file mode 100644 index 8b42d13..0000000 --- a/dsp/lib/sprout/sprout/type/iterator/distance.hpp +++ /dev/null @@ -1,69 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_ITERATOR_DISTANCE_HPP -#define SPROUT_TYPE_ITERATOR_DISTANCE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace types { - // - // distance - // - namespace detail { - template - struct distance_impl; - template - struct distance_impl< - First, - Last, - N, - typename std::enable_if< - std::is_same::value - >::type - > - : public sprout::integral_constant - {}; - template - struct distance_impl< - First, - Last, - N, - typename std::enable_if< - !std::is_same::value - >::type - > - : public sprout::types::detail::distance_impl< - typename sprout::types::next::type, - Last, - N + 1 - > - {}; - } // namespace detail - template - struct distance - : public sprout::types::detail::distance_impl - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using distance_t = typename sprout::types::distance::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR std::size_t distance_v = sprout::types::distance::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_ITERATOR_DISTANCE_HPP diff --git a/dsp/lib/sprout/sprout/type/iterator/index_iterator.hpp b/dsp/lib/sprout/sprout/type/iterator/index_iterator.hpp deleted file mode 100644 index 35fcf8a..0000000 --- a/dsp/lib/sprout/sprout/type/iterator/index_iterator.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_ITERATOR_INDEX_ITERATOR_HPP -#define SPROUT_TYPE_ITERATOR_INDEX_ITERATOR_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace types { - // - // index_iterator - // - template - struct index_iterator - : public sprout::integral_constant - { - public: - typedef typename sprout::types::tuple_element::type type; - typedef sprout::types::index_iterator next; - typedef sprout::types::index_iterator prev; - public: - template - struct advance { - public: - typedef sprout::types::index_iterator type; - }; - }; - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_ITERATOR_INDEX_ITERATOR_HPP diff --git a/dsp/lib/sprout/sprout/type/iterator/next.hpp b/dsp/lib/sprout/sprout/type/iterator/next.hpp deleted file mode 100644 index 8c21b6b..0000000 --- a/dsp/lib/sprout/sprout/type/iterator/next.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_ITERATOR_NEXT_HPP -#define SPROUT_TYPE_ITERATOR_NEXT_HPP - -#include - -namespace sprout { - namespace types { - // - // next - // - template - struct next { - public: - typedef typename Iterator::next type; - }; - - template - struct next - : public sprout::types::next - {}; - template - struct next - : public sprout::types::next - {}; - template - struct next - : public sprout::types::next - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using next_t = typename sprout::types::next::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_ITERATOR_NEXT_HPP diff --git a/dsp/lib/sprout/sprout/type/iterator/prev.hpp b/dsp/lib/sprout/sprout/type/iterator/prev.hpp deleted file mode 100644 index edb6966..0000000 --- a/dsp/lib/sprout/sprout/type/iterator/prev.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_ITERATOR_PREV_HPP -#define SPROUT_TYPE_ITERATOR_PREV_HPP - -#include - -namespace sprout { - namespace types { - // - // prev - // - template - struct prev { - public: - typedef typename Iterator::prev type; - }; - - template - struct prev - : public sprout::types::prev - {}; - template - struct prev - : public sprout::types::prev - {}; - template - struct prev - : public sprout::types::prev - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using prev_t = typename sprout::types::prev::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_ITERATOR_PREV_HPP diff --git a/dsp/lib/sprout/sprout/type/joint_types.hpp b/dsp/lib/sprout/sprout/type/joint_types.hpp deleted file mode 100644 index 315f4ac..0000000 --- a/dsp/lib/sprout/sprout/type/joint_types.hpp +++ /dev/null @@ -1,385 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_JOINT_TYPES_HPP -#define SPROUT_TYPE_JOINT_TYPES_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace types { - namespace detail { - template - struct is_tuple_like - : public sprout::false_type - {}; - template class TupleClass, typename... Ts> - struct is_tuple_like > - : public sprout::true_type - {}; - template - struct is_tuple_like - : public sprout::types::detail::is_tuple_like - {}; - template - struct is_tuple_like - : public sprout::types::detail::is_tuple_like - {}; - template - struct is_tuple_like - : public sprout::types::detail::is_tuple_like - {}; - - template - struct is_integer_sequence_like - : public sprout::false_type - {}; - template class IntegerSequenceClass, typename T, T... Vs> - struct is_integer_sequence_like > - : public sprout::true_type - {}; - template - struct is_integer_sequence_like - : public sprout::types::detail::is_integer_sequence_like - {}; - template - struct is_integer_sequence_like - : public sprout::types::detail::is_integer_sequence_like - {}; - template - struct is_integer_sequence_like - : public sprout::types::detail::is_integer_sequence_like - {}; - - template - struct is_specific_integer_sequence_like - : public sprout::false_type - {}; -#define SPROUT_TYPES_DETAIL_IS_SPECIFIC_INTEGER_SEQUENCE_DECL(TYPE) \ - template class SpecificIntegerSequenceClass, TYPE... Vs> \ - struct is_specific_integer_sequence_like > \ - : public sprout::true_type \ - {} - SPROUT_TYPES_DETAIL_IS_SPECIFIC_INTEGER_SEQUENCE_DECL(bool); - SPROUT_TYPES_DETAIL_IS_SPECIFIC_INTEGER_SEQUENCE_DECL(char); - SPROUT_TYPES_DETAIL_IS_SPECIFIC_INTEGER_SEQUENCE_DECL(signed char); - SPROUT_TYPES_DETAIL_IS_SPECIFIC_INTEGER_SEQUENCE_DECL(unsigned char); - SPROUT_TYPES_DETAIL_IS_SPECIFIC_INTEGER_SEQUENCE_DECL(char16_t); - SPROUT_TYPES_DETAIL_IS_SPECIFIC_INTEGER_SEQUENCE_DECL(char32_t); - SPROUT_TYPES_DETAIL_IS_SPECIFIC_INTEGER_SEQUENCE_DECL(wchar_t); - SPROUT_TYPES_DETAIL_IS_SPECIFIC_INTEGER_SEQUENCE_DECL(short); - SPROUT_TYPES_DETAIL_IS_SPECIFIC_INTEGER_SEQUENCE_DECL(unsigned short); - SPROUT_TYPES_DETAIL_IS_SPECIFIC_INTEGER_SEQUENCE_DECL(int); - SPROUT_TYPES_DETAIL_IS_SPECIFIC_INTEGER_SEQUENCE_DECL(unsigned int); - SPROUT_TYPES_DETAIL_IS_SPECIFIC_INTEGER_SEQUENCE_DECL(long); - SPROUT_TYPES_DETAIL_IS_SPECIFIC_INTEGER_SEQUENCE_DECL(unsigned long); - SPROUT_TYPES_DETAIL_IS_SPECIFIC_INTEGER_SEQUENCE_DECL(long long); - SPROUT_TYPES_DETAIL_IS_SPECIFIC_INTEGER_SEQUENCE_DECL(unsigned long long); -#undef SPROUT_TYPES_DETAIL_IS_SPECIFIC_INTEGER_SEQUENCE_DECL - template - struct is_specific_integer_sequence_like - : public sprout::types::detail::is_specific_integer_sequence_like - {}; - template - struct is_specific_integer_sequence_like - : public sprout::types::detail::is_specific_integer_sequence_like - {}; - template - struct is_specific_integer_sequence_like - : public sprout::types::detail::is_specific_integer_sequence_like - {}; - - template - struct joint_types_impl { - private: - template - struct apply_impl; - template - struct apply_impl, sprout::index_tuple > - : public sprout::types::apply< - sprout::types::rebind_types, - typename sprout::types::tuple_element::type..., - typename sprout::types::tuple_element::type... - > - {}; - public: - typedef typename apply_impl< - typename sprout::tuple_indexes::type, - typename sprout::tuple_indexes::type - >::type type; - }; - template - struct joint_types_default { - public: - template - struct apply - : public sprout::types::detail::joint_types_impl - {}; - }; - - template< - typename Tuple, typename Tup, - bool = sprout::types::detail::is_tuple_like::value, - bool = sprout::types::detail::is_integer_sequence_like::value, - bool = sprout::types::detail::is_specific_integer_sequence_like::value - > - struct joint_types_default_apply; - - template< - template class TupleClass, typename... Ts, - typename Tup - > - struct joint_types_default_apply, Tup, false, false, false> - : public sprout::types::detail::joint_types_impl, Tup> - {}; - template< - template class TupleClass, typename... Ts, - template class TupClass, typename... Types - > - struct joint_types_default_apply, TupClass, true, false, false> - : public sprout::identity > - {}; - template< - template class TupleClass, typename... Ts, - template class IntSeqClass, typename Type, Type... Values - > - struct joint_types_default_apply, IntSeqClass, false, true, false> - : public sprout::identity...> > - {}; -#define SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_TUPLE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(TYPE) \ - template< \ - template class TupleClass, typename... Ts, \ - template class IntSeqClass, TYPE... Values \ - > \ - struct joint_types_default_apply, IntSeqClass, false, false, true> \ - : public sprout::identity...> > \ - {} - - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_TUPLE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(bool); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_TUPLE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(char); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_TUPLE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(signed char); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_TUPLE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(unsigned char); -#if SPROUT_USE_UNICODE_LITERALS - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_TUPLE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(char16_t); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_TUPLE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(char32_t); -#endif - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_TUPLE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(wchar_t); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_TUPLE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(short); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_TUPLE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(unsigned short); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_TUPLE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(int); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_TUPLE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(unsigned int); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_TUPLE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(long); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_TUPLE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(unsigned long); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_TUPLE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(long long); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_TUPLE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(unsigned long long); -#undef SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_TUPLE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE - - template class TupleClass, typename... Ts> - struct joint_types_default > { - public: - template - struct apply - : public sprout::types::detail::joint_types_default_apply, Tup> - {}; - }; - - template< - template class IntegerSequenceClass, typename T, T... Vs, - typename Tup - > - struct joint_types_default_apply, Tup, false, false, false> - : public sprout::types::detail::joint_types_impl, Tup> - {}; - template< - template class IntegerSequenceClass, typename T, T... Vs, - template class TupClass, typename... Types - > - struct joint_types_default_apply, TupClass, true, false, false> - : public sprout::identity > - {}; - template< - template class IntegerSequenceClass, typename T, T... Vs, - template class IntSeqClass, typename Type, Type... Values - > - struct joint_types_default_apply, IntSeqClass, false, true, false> - : public sprout::identity > - {}; -#define SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_INTEGER_SEQUENCE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(TYPE) \ - template< \ - template class IntegerSequenceClass, typename T, T... Vs, \ - template class IntSeqClass, TYPE... Values \ - > \ - struct joint_types_default_apply, IntSeqClass, false, false, true> \ - : public sprout::identity > \ - {} - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_INTEGER_SEQUENCE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(bool); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_INTEGER_SEQUENCE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(char); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_INTEGER_SEQUENCE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(signed char); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_INTEGER_SEQUENCE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(unsigned char); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_INTEGER_SEQUENCE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(char16_t); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_INTEGER_SEQUENCE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(char32_t); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_INTEGER_SEQUENCE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(wchar_t); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_INTEGER_SEQUENCE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(short); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_INTEGER_SEQUENCE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(unsigned short); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_INTEGER_SEQUENCE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(int); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_INTEGER_SEQUENCE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(unsigned int); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_INTEGER_SEQUENCE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(long); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_INTEGER_SEQUENCE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(unsigned long); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_INTEGER_SEQUENCE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(long long); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_INTEGER_SEQUENCE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(unsigned long long); -#undef SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_INTEGER_SEQUENCE_LIKE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE - - template class IntegerSequenceClass, typename T, T... Vs> - struct joint_types_default > { - public: - template - struct apply - : public sprout::types::detail::joint_types_default_apply, Tup> - {}; - }; - -#define SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, TYPE) \ - template< \ - template class IntegerSequenceClass, BASE... Vs, \ - template class IntSeqClass, TYPE... Values \ - > \ - struct joint_types_default_apply, IntSeqClass, false, false, true> \ - : public sprout::identity > \ - {} -#if SPROUT_USE_UNICODE_LITERALS -#define SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_(BASE) \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, bool); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, char); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, signed char); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, unsigned char); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, char16_t); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, char32_t); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, wchar_t); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, short); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, unsigned short); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, int); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, unsigned int); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, long); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, unsigned long); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, long long); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, unsigned long long) -#else -#define SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_(BASE) \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, bool); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, char); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, signed char); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, unsigned char); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, wchar_t); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, short); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, unsigned short); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, int); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, unsigned int); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, long); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, unsigned long); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, long long); \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE(BASE, unsigned long long) -#endif -#define SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL(BASE) \ - template< \ - template class IntegerSequenceClass, BASE... Vs, \ - typename Tup \ - > \ - struct joint_types_default_apply, Tup, false, false, false> \ - : public sprout::types::detail::joint_types_impl, Tup> \ - {}; \ - template< \ - template class IntegerSequenceClass, BASE... Vs, \ - template class TupClass, typename... Types \ - > \ - struct joint_types_default_apply, TupClass, true, false, false> \ - : public sprout::identity > \ - {}; \ - template< \ - template class IntegerSequenceClass, BASE... Vs, \ - template class IntSeqClass, typename Type, Type... Values \ - > \ - struct joint_types_default_apply, IntSeqClass, false, true, false> \ - : public sprout::identity > \ - {}; \ - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_(BASE); \ - template class IntegerSequenceClass, BASE... Vs> \ - struct joint_types_default > { \ - public: \ - template \ - struct apply \ - : public sprout::types::detail::joint_types_default_apply, Tup> \ - {}; \ - } - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL(bool); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL(char); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL(signed char); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL(unsigned char); -#if SPROUT_USE_UNICODE_LITERALS - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL(char16_t); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL(char32_t); -#endif - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL(wchar_t); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL(short); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL(unsigned short); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL(int); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL(unsigned int); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL(long); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL(unsigned long); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL(long long); - SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL(unsigned long long); -#undef SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL_FOR_CERTAIN_INTEGER_SEQUENCE -#undef SPROUT_TYPES_DETAIL_JOINT_TYPES_DEFAULT_APPLY_CERTAIN_INTEGER_SEQUENCE_DECL - } // namespace detail - - // - // joint_types - // - template - struct joint_types - : public sprout::types::detail::joint_types_default - {}; - - template - struct joint_types { - public: - template - struct apply - : public sprout::identity, Tup>::type const> - {}; - }; - - template - struct joint_types { - public: - template - struct apply - : public sprout::identity, Tup>::type volatile> - {}; - }; - - template - struct joint_types { - public: - template - struct apply - : public sprout::identity, Tup>::type const volatile> - {}; - - }; - } // namespace types - - using sprout::types::joint_types; -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_JOINT_TYPES_HPP diff --git a/dsp/lib/sprout/sprout/type/map_types.hpp b/dsp/lib/sprout/sprout/type/map_types.hpp deleted file mode 100644 index ac63509..0000000 --- a/dsp/lib/sprout/sprout/type/map_types.hpp +++ /dev/null @@ -1,127 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_MAP_TYPES_HPP -#define SPROUT_TYPE_MAP_TYPES_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace types { - namespace detail { - template - struct map_types_default { - private: - template - struct apply_impl; - template - struct apply_impl > - : public sprout::types::apply< - sprout::types::rebind_types, - typename sprout::types::apply::type>::type... - > - {}; - public: - template - struct apply - : public apply_impl::type> - {}; - }; - template class TupleClass, typename... Ts> - struct map_types_default > { - public: - template - struct apply - : public sprout::identity::type...> > - {}; - }; - template class IntegerSequenceClass, typename T, T... Vs> - struct map_types_default > { - public: - template - struct apply - : public sprout::identity >::type::value...> > - {}; - }; - -#define SPROUT_TYPES_DETAIL_MAP_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(TYPE) \ - template class IndexTupleClass, TYPE... Vs> \ - struct map_types_default > { \ - public: \ - template \ - struct apply \ - : public sprout::identity >::type::value...> > \ - {}; \ - } - - SPROUT_TYPES_DETAIL_MAP_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(bool); - SPROUT_TYPES_DETAIL_MAP_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(char); - SPROUT_TYPES_DETAIL_MAP_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(signed char); - SPROUT_TYPES_DETAIL_MAP_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(unsigned char); -#if SPROUT_USE_UNICODE_LITERALS - SPROUT_TYPES_DETAIL_MAP_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(char16_t); - SPROUT_TYPES_DETAIL_MAP_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(char32_t); -#endif - SPROUT_TYPES_DETAIL_MAP_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(wchar_t); - SPROUT_TYPES_DETAIL_MAP_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(short); - SPROUT_TYPES_DETAIL_MAP_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(unsigned short); - SPROUT_TYPES_DETAIL_MAP_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(int); - SPROUT_TYPES_DETAIL_MAP_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(unsigned int); - SPROUT_TYPES_DETAIL_MAP_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(long); - SPROUT_TYPES_DETAIL_MAP_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(unsigned long); - SPROUT_TYPES_DETAIL_MAP_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(long long); - SPROUT_TYPES_DETAIL_MAP_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(unsigned long long); - -#undef SPROUT_TYPES_DETAIL_MAP_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL - } // namespace detail - - // - // map_types - // - template - struct map_types - : public sprout::types::detail::map_types_default - {}; - - template - struct map_types { - public: - template - struct apply - : public sprout::identity, Op>::type const> - {}; - }; - - template - struct map_types { - public: - template - struct apply - : public sprout::identity, Op>::type volatile> - {}; - }; - - template - struct map_types { - public: - template - struct apply - : public sprout::identity, Op>::type const volatile> - {}; - }; - } // namespace types - - using sprout::types::map_types; -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_MAP_TYPES_HPP diff --git a/dsp/lib/sprout/sprout/type/operation.hpp b/dsp/lib/sprout/sprout/type/operation.hpp deleted file mode 100644 index 1c5a489..0000000 --- a/dsp/lib/sprout/sprout/type/operation.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_OPERATION_HPP -#define SPROUT_TYPE_OPERATION_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_OPERATION_HPP diff --git a/dsp/lib/sprout/sprout/type/operation/append_back.hpp b/dsp/lib/sprout/sprout/type/operation/append_back.hpp deleted file mode 100644 index 9134a90..0000000 --- a/dsp/lib/sprout/sprout/type/operation/append_back.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_OPERATION_APPEND_BACK_HPP -#define SPROUT_TYPE_OPERATION_APPEND_BACK_HPP - -#include -#include - -namespace sprout { - namespace types { - // - // append_back - // - template - struct append_back - : public sprout::types::tuple_cat - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using append_back_t = typename sprout::types::append_back::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_OPERATION_APPEND_BACK_HPP diff --git a/dsp/lib/sprout/sprout/type/operation/append_front.hpp b/dsp/lib/sprout/sprout/type/operation/append_front.hpp deleted file mode 100644 index ecbcd02..0000000 --- a/dsp/lib/sprout/sprout/type/operation/append_front.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_OPERATION_APPEND_FRONT_HPP -#define SPROUT_TYPE_OPERATION_APPEND_FRONT_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace types { - // - // append_front - // - template - struct append_front - : public sprout::types::tuple_cat< - typename sprout::types::apply >::type, - InputTuples..., Tuple - > - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using append_front_t = typename sprout::types::append_front::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_OPERATION_APPEND_FRONT_HPP diff --git a/dsp/lib/sprout/sprout/type/operation/assign.hpp b/dsp/lib/sprout/sprout/type/operation/assign.hpp deleted file mode 100644 index a0201b0..0000000 --- a/dsp/lib/sprout/sprout/type/operation/assign.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_OPERATION_ASSIGN_HPP -#define SPROUT_TYPE_OPERATION_ASSIGN_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace types { - // - // assign - // - template - struct assign - : public sprout::types::tuple_cat< - typename sprout::types::apply >::type, - InputTuple - > - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using assign_t = typename sprout::types::assign::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_OPERATION_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/type/operation/at.hpp b/dsp/lib/sprout/sprout/type/operation/at.hpp deleted file mode 100644 index 1e67b1b..0000000 --- a/dsp/lib/sprout/sprout/type/operation/at.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_OPERATION_AT_HPP -#define SPROUT_TYPE_OPERATION_AT_HPP - -#include -#include -#include - -namespace sprout { - namespace types { - // - // at - // - template - struct at - : public sprout::types::tuple_element - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using at_t = typename sprout::types::at::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_OPERATION_AT_HPP diff --git a/dsp/lib/sprout/sprout/type/operation/back.hpp b/dsp/lib/sprout/sprout/type/operation/back.hpp deleted file mode 100644 index 74c7453..0000000 --- a/dsp/lib/sprout/sprout/type/operation/back.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_OPERATION_BACK_HPP -#define SPROUT_TYPE_OPERATION_BACK_HPP - -#include -#include -#include - -namespace sprout { - namespace types { - // - // back - // - template - struct back - : public sprout::types::at::value - 1)> - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using back_t = typename sprout::types::back::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_OPERATION_BACK_HPP diff --git a/dsp/lib/sprout/sprout/type/operation/empty.hpp b/dsp/lib/sprout/sprout/type/operation/empty.hpp deleted file mode 100644 index d9072a2..0000000 --- a/dsp/lib/sprout/sprout/type/operation/empty.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_OPERATION_EMPTY_HPP -#define SPROUT_TYPE_OPERATION_EMPTY_HPP - -#include -#include -#include - -namespace sprout { - namespace types { - // - // empty - // - template - struct empty - : public sprout::bool_constant< - (sprout::types::tuple_size::value == 0) - > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool empty_v = sprout::types::empty::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_OPERATION_EMPTY_HPP diff --git a/dsp/lib/sprout/sprout/type/operation/front.hpp b/dsp/lib/sprout/sprout/type/operation/front.hpp deleted file mode 100644 index 182b559..0000000 --- a/dsp/lib/sprout/sprout/type/operation/front.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_OPERATION_FRONT_HPP -#define SPROUT_TYPE_OPERATION_FRONT_HPP - -#include -#include - -namespace sprout { - namespace types { - // - // front - // - template - struct front - : public sprout::types::at - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using front_t = typename sprout::types::front::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_OPERATION_FRONT_HPP diff --git a/dsp/lib/sprout/sprout/type/operation/map.hpp b/dsp/lib/sprout/sprout/type/operation/map.hpp deleted file mode 100644 index 2cb9873..0000000 --- a/dsp/lib/sprout/sprout/type/operation/map.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_OPERATION_MAP_HPP -#define SPROUT_TYPE_OPERATION_MAP_HPP - -#include -#include -#include - -namespace sprout { - namespace types { - // - // map - // - template - struct map - : public sprout::types::apply, Op> - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using map_t = typename sprout::types::map::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_OPERATION_MAP_HPP diff --git a/dsp/lib/sprout/sprout/type/operation/pop_back.hpp b/dsp/lib/sprout/sprout/type/operation/pop_back.hpp deleted file mode 100644 index 9a4cebb..0000000 --- a/dsp/lib/sprout/sprout/type/operation/pop_back.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_OPERATION_POP_BACK_HPP -#define SPROUT_TYPE_OPERATION_POP_BACK_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace types { - // - // pop_back - // - template - struct pop_back { - private: - template - struct apply_impl; - template - struct apply_impl > - : public sprout::types::apply< - sprout::types::rebind_types, - typename sprout::types::tuple_element::type... - > - {}; - public: - typedef typename apply_impl< - typename sprout::make_index_tuple::value - 1>::type - >::type type; - }; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using pop_back_t = typename sprout::types::pop_back::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_OPERATION_POP_BACK_HPP diff --git a/dsp/lib/sprout/sprout/type/operation/pop_front.hpp b/dsp/lib/sprout/sprout/type/operation/pop_front.hpp deleted file mode 100644 index 7bb97ef..0000000 --- a/dsp/lib/sprout/sprout/type/operation/pop_front.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_OPERATION_POP_FRONT_HPP -#define SPROUT_TYPE_OPERATION_POP_FRONT_HPP - -#include -#include -#include - -namespace sprout { - namespace types { - // - // pop_front - // - template - struct pop_front - : public sprout::types::apply > - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using pop_front_t = typename sprout::types::pop_front::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_OPERATION_POP_FRONT_HPP diff --git a/dsp/lib/sprout/sprout/type/operation/push_back.hpp b/dsp/lib/sprout/sprout/type/operation/push_back.hpp deleted file mode 100644 index 23bd308..0000000 --- a/dsp/lib/sprout/sprout/type/operation/push_back.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_OPERATION_PUSH_BACK_HPP -#define SPROUT_TYPE_OPERATION_PUSH_BACK_HPP - -#include -#include -#include - -namespace sprout { - namespace types { - // - // push_back - // - template - struct push_back - : public sprout::types::tuple_cat > - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using push_back_t = typename sprout::types::push_back::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_OPERATION_PUSH_BACK_HPP diff --git a/dsp/lib/sprout/sprout/type/operation/push_front.hpp b/dsp/lib/sprout/sprout/type/operation/push_front.hpp deleted file mode 100644 index ce44465..0000000 --- a/dsp/lib/sprout/sprout/type/operation/push_front.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_OPERATION_PUSH_FRONT_HPP -#define SPROUT_TYPE_OPERATION_PUSH_FRONT_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace types { - // - // push_front - // - template - struct push_front - : public sprout::types::tuple_cat< - typename sprout::types::apply >::type, - sprout::types::type_tuple, Tuple - > - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using push_front_t = typename sprout::types::push_front::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_OPERATION_PUSH_FRONT_HPP diff --git a/dsp/lib/sprout/sprout/type/operation/rebind.hpp b/dsp/lib/sprout/sprout/type/operation/rebind.hpp deleted file mode 100644 index a4cb88a..0000000 --- a/dsp/lib/sprout/sprout/type/operation/rebind.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_OPERATION_REBIND_HPP -#define SPROUT_TYPE_OPERATION_REBIND_HPP - -#include -#include -#include - -namespace sprout { - namespace types { - // - // rebind - // - template - struct rebind - : public sprout::types::apply, Ts...> - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using rebind_t = typename sprout::types::rebind::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_OPERATION_REBIND_HPP diff --git a/dsp/lib/sprout/sprout/type/operation/size.hpp b/dsp/lib/sprout/sprout/type/operation/size.hpp deleted file mode 100644 index dca49fb..0000000 --- a/dsp/lib/sprout/sprout/type/operation/size.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_OPERATION_SIZE_HPP -#define SPROUT_TYPE_OPERATION_SIZE_HPP - -#include -#include -#include - -namespace sprout { - namespace types { - // - // size - // - template - struct size - : public sprout::types::tuple_size - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR std::size_t size_v = sprout::types::size::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_OPERATION_SIZE_HPP diff --git a/dsp/lib/sprout/sprout/type/operation/tuple_cat.hpp b/dsp/lib/sprout/sprout/type/operation/tuple_cat.hpp deleted file mode 100644 index 73a9458..0000000 --- a/dsp/lib/sprout/sprout/type/operation/tuple_cat.hpp +++ /dev/null @@ -1,67 +0,0 @@ -/*============================================================================= - Copyright (c) 2015 fimbul - https://github.com/fimbul/shiro - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_OPERATION_TUPLE_CAT_HPP -#define SPROUT_TYPE_OPERATION_TUPLE_CAT_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace types { - // - // tuple_cat - // - namespace detail { - template - struct tuple_cat_impl; - template - struct tuple_cat_impl, sprout::index_tuple > - : public sprout::types::apply< - sprout::types::joint_types< - typename sprout::types::detail::tuple_cat_impl< - sprout::types::type_tuple::type...>, - typename sprout::index_range<0, sizeof...(LIndexes) / 2>::type, - typename sprout::index_range::type - >::type - >, - typename sprout::types::detail::tuple_cat_impl< - sprout::types::type_tuple::type...>, - typename sprout::index_range<0, sizeof...(RIndexes) / 2>::type, - typename sprout::index_range::type - >::type - > - {}; - template - struct tuple_cat_impl, sprout::index_tuple<0> > - : public sprout::types::tuple_element<0, Tuples> - {}; - template - struct tuple_cat_impl, sprout::index_tuple<> > - : public sprout::identity > - {}; - } // namespace detail - template - struct tuple_cat - : public sprout::types::detail::tuple_cat_impl< - sprout::types::type_tuple, - typename sprout::index_range<0, sizeof...(Tuples) / 2>::type, - typename sprout::index_range::type - > - {}; - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_OPERATION_TUPLE_CAT_HPP diff --git a/dsp/lib/sprout/sprout/type/packer.hpp b/dsp/lib/sprout/sprout/type/packer.hpp deleted file mode 100644 index 74a88e9..0000000 --- a/dsp/lib/sprout/sprout/type/packer.hpp +++ /dev/null @@ -1,139 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_PACKER_HPP -#define SPROUT_TYPE_PACKER_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace types { - // - // packer - // -#if SPROUT_USE_TEMPLATE_ALIASES - template - using packer = sprout::types::type_tuple; -#else // #if SPROUT_USE_TEMPLATE_ALIASES - template - struct packer - : public sprout::types::type_tuple - {}; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - } // namespace types - - using sprout::types::packer; -} // namespace sprout - -#if !SPROUT_USE_TEMPLATE_ALIASES - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // tuple_size - // - template - struct tuple_size > - : public std::tuple_size > - {}; - - // - // tuple_element - // - template - struct tuple_element > - : public sprout::types::tuple_element > - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -namespace sprout { - // - // tuple_get - // - template - inline SPROUT_CONSTEXPR typename std::tuple_element >::type - tuple_get(sprout::types::packer) SPROUT_NOEXCEPT { - static_assert(I < sizeof...(Values), "tuple_get: index out of range"); - typedef typename std::tuple_element >::type type; - return type(); - } -} // namespace sprout - -#endif // #if !SPROUT_USE_TEMPLATE_ALIASES - -#include -#include -#include - -namespace sprout { - namespace types { - // - // is_contained_in - // - template - struct is_contained_in - : public sprout::types::contains, T> - {}; - - // - // contains_types - // - namespace detail { - template - struct contains_types_impl; - template - struct contains_types_impl > - : public sprout::tpp::all_of::type, T>...> - {}; - } // namespace detail - template - struct contains_types - : public sprout::types::detail::contains_types_impl::value>::type> - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using is_contained_in_t = typename sprout::types::is_contained_in::type; - - template - using contains_types_t = typename sprout::types::contains_types::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_contained_in_v = sprout::types::is_contained_in::value; - - template - SPROUT_STATIC_CONSTEXPR bool contains_types_v = sprout::types::contains_types::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - - } // namespace types - - using sprout::types::is_contained_in; - using sprout::types::contains_types; - -#if SPROUT_USE_TEMPLATE_ALIASES - using sprout::types::is_contained_in_t; - using sprout::types::contains_types_t; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - -#if SPROUT_USE_VARIABLE_TEMPLATES - using sprout::types::is_contained_in_v; - using sprout::types::contains_types_v; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_PACKER_HPP diff --git a/dsp/lib/sprout/sprout/type/pop_front_types.hpp b/dsp/lib/sprout/sprout/type/pop_front_types.hpp deleted file mode 100644 index b52b019..0000000 --- a/dsp/lib/sprout/sprout/type/pop_front_types.hpp +++ /dev/null @@ -1,125 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_POP_FRONT_TYPES_HPP -#define SPROUT_TYPE_POP_FRONT_TYPES_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace types { - namespace detail { - template - struct pop_front_types_default { - template - struct apply_impl; - template - struct apply_impl > - : public sprout::types::apply< - sprout::types::rebind_types, - typename sprout::types::tuple_element::type... - > - {}; - public: - template - struct apply - : public apply_impl::value>::type> - {}; - }; - template class TupleClass, typename Head, typename... Tail> - struct pop_front_types_default > { - public: - template - struct apply - : public sprout::identity > - {}; - }; - template class IntegerSequenceClass, typename T, T Head, T... Tail> - struct pop_front_types_default > { - public: - template - struct apply - : public sprout::identity > - {}; - }; - -#define SPROUT_TYPES_DETAIL_POP_FRONT_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(TYPE) \ - template class IndexTupleClass, TYPE Head, TYPE... Tail> \ - struct pop_front_types_default > { \ - public: \ - template \ - struct apply \ - : public sprout::identity > \ - {}; \ - } - - SPROUT_TYPES_DETAIL_POP_FRONT_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(bool); - SPROUT_TYPES_DETAIL_POP_FRONT_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(char); - SPROUT_TYPES_DETAIL_POP_FRONT_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(signed char); - SPROUT_TYPES_DETAIL_POP_FRONT_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(unsigned char); -#if SPROUT_USE_UNICODE_LITERALS - SPROUT_TYPES_DETAIL_POP_FRONT_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(char16_t); - SPROUT_TYPES_DETAIL_POP_FRONT_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(char32_t); -#endif - SPROUT_TYPES_DETAIL_POP_FRONT_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(wchar_t); - SPROUT_TYPES_DETAIL_POP_FRONT_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(short); - SPROUT_TYPES_DETAIL_POP_FRONT_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(unsigned short); - SPROUT_TYPES_DETAIL_POP_FRONT_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(int); - SPROUT_TYPES_DETAIL_POP_FRONT_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(unsigned int); - SPROUT_TYPES_DETAIL_POP_FRONT_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(long); - SPROUT_TYPES_DETAIL_POP_FRONT_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(unsigned long); - SPROUT_TYPES_DETAIL_POP_FRONT_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(long long); - SPROUT_TYPES_DETAIL_POP_FRONT_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(unsigned long long); - -#undef SPROUT_TYPES_DETAIL_POP_FRONT_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL - } // namespace detail - - // - // pop_front_types - // - template - struct pop_front_types - : public sprout::types::detail::pop_front_types_default - {}; - - template - struct pop_front_types { - public: - template - struct apply - : public sprout::identity, Types...>::type const> - {}; - }; - - template - struct pop_front_types { - public: - template - struct apply - : public sprout::identity, Types...>::type volatile> - {}; - }; - - template - struct pop_front_types { - public: - template - struct apply - : public sprout::identity, Types...>::type const volatile> - {}; - }; - } // namespace types - - using sprout::types::pop_front_types; -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_POP_FRONT_TYPES_HPP diff --git a/dsp/lib/sprout/sprout/type/print.hpp b/dsp/lib/sprout/sprout/type/print.hpp deleted file mode 100644 index cf91838..0000000 --- a/dsp/lib/sprout/sprout/type/print.hpp +++ /dev/null @@ -1,71 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_PRINT_HPP -#define SPROUT_TYPE_PRINT_HPP - -#include -#include - -namespace sprout { - namespace types { - namespace detail { -#if defined(_MSC_VER) -# pragma warning(push, 3) -# pragma warning(disable: 4307) -#elif defined(__MWERKS__) -# pragma warn_hidevirtual on - struct print_base { - virtual void f() {} - }; -#endif - -#if defined(__EDG_VERSION__) - template - struct dependent_unsigned { - static unsigned const value = 1; - }; -#endif - } // namespace detail - - // - // print - // - template - struct print - : public sprout::identity -#if defined(__MWERKS__) - , public sprout::types::detail::print_base -#endif - { -#if defined(_MSC_VER) - enum { - n = sizeof(T) + -1 - }; -#elif defined(__MWERKS__) - void f(int); -#else - enum { - n = -# if defined(__EDG_VERSION__) - sprout::types::detail::dependent_unsigned::value > -1 -# else - sizeof(T) > -1 -# endif - }; -#endif - }; - -#if defined(_MSC_VER) -# pragma warning(pop) -#elif defined(__MWERKS__) -# pragma warn_hidevirtual reset -#endif - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_PRINT_HPP diff --git a/dsp/lib/sprout/sprout/type/quote.hpp b/dsp/lib/sprout/sprout/type/quote.hpp deleted file mode 100644 index bcd0aab..0000000 --- a/dsp/lib/sprout/sprout/type/quote.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_QUOTE_HPP -#define SPROUT_TYPE_QUOTE_HPP - -#include - -namespace sprout { - namespace types { - // - // quote - // - template class F> - struct quote { - public: -#if SPROUT_USE_TEMPLATE_ALIASES - template - using apply = F; -#else // #if SPROUT_USE_TEMPLATE_ALIASES - template - struct apply - : public F - {}; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - }; - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_QUOTE_HPP diff --git a/dsp/lib/sprout/sprout/type/rebind_types.hpp b/dsp/lib/sprout/sprout/type/rebind_types.hpp deleted file mode 100644 index e24f7b3..0000000 --- a/dsp/lib/sprout/sprout/type/rebind_types.hpp +++ /dev/null @@ -1,135 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_REBIND_TYPES_HPP -#define SPROUT_TYPE_REBIND_TYPES_HPP - -#include -#include -#include - -namespace sprout { - namespace types { - namespace detail { - template - struct rebind_types_default {}; - template class TupleClass, typename... Ts> - struct rebind_types_default > { - public: - template - struct apply - : public sprout::identity > - {}; - }; - template class IntegerSequenceClass, typename T, T... Vs> - struct rebind_types_default > { - public: - template - struct apply - : public sprout::identity > - {}; - }; - -#define SPROUT_TYPES_DETAIL_REBIND_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(TYPE) \ - template class IndexTupleClass, TYPE... Vs> \ - struct rebind_types_default > { \ - public: \ - template \ - struct apply \ - : public sprout::identity > \ - {}; \ - } - - SPROUT_TYPES_DETAIL_REBIND_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(bool); - SPROUT_TYPES_DETAIL_REBIND_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(char); - SPROUT_TYPES_DETAIL_REBIND_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(signed char); - SPROUT_TYPES_DETAIL_REBIND_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(unsigned char); -#if SPROUT_USE_UNICODE_LITERALS - SPROUT_TYPES_DETAIL_REBIND_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(char16_t); - SPROUT_TYPES_DETAIL_REBIND_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(char32_t); -#endif - SPROUT_TYPES_DETAIL_REBIND_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(wchar_t); - SPROUT_TYPES_DETAIL_REBIND_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(short); - SPROUT_TYPES_DETAIL_REBIND_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(unsigned short); - SPROUT_TYPES_DETAIL_REBIND_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(int); - SPROUT_TYPES_DETAIL_REBIND_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(unsigned int); - SPROUT_TYPES_DETAIL_REBIND_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(long); - SPROUT_TYPES_DETAIL_REBIND_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(unsigned long); - SPROUT_TYPES_DETAIL_REBIND_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(long long); - SPROUT_TYPES_DETAIL_REBIND_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL(unsigned long long); - -#undef SPROUT_TYPES_DETAIL_REBIND_TYPES_DEFAULT_INTEGER_SEQUENCE_LIKE_DECL - } // namespace detail - - // - // rebind_types - // - template - struct rebind_types - : public sprout::types::detail::rebind_types_default - {}; - - template - struct rebind_types { - public: - template - struct apply - : public sprout::identity, Types...>::type const> - {}; - }; - - template - struct rebind_types { - public: - template - struct apply - : public sprout::identity, Types...>::type volatile> - {}; - }; - - template - struct rebind_types { - public: - template - struct apply - : public sprout::identity, Types...>::type const volatile> - {}; - }; - } // namespace types - - using sprout::types::rebind_types; -} // namespace sprout - -#include -#include - -namespace sprout { - namespace types { - namespace detail { - template class ArrayLikeClass, typename T, std::size_t N> - struct rebind_types_default > { - private: - template - struct apply_impl {}; - template - struct apply_impl - : public sprout::identity > - {}; - public: - template - struct apply - : public apply_impl< - sprout::tpp::all_of_c::value...>::value, - Head, Tail... - > - {}; - }; - } // namespace detail - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_REBIND_TYPES_HPP diff --git a/dsp/lib/sprout/sprout/type/self.hpp b/dsp/lib/sprout/sprout/type/self.hpp deleted file mode 100644 index 96086c3..0000000 --- a/dsp/lib/sprout/sprout/type/self.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_SELF_HPP -#define SPROUT_TYPE_SELF_HPP - -#include -#include - -namespace sprout { - namespace types { - // - // self - // - template class F> - struct self { - public: -#if SPROUT_USE_TEMPLATE_ALIASES - template - using apply = sprout::identity >; -#else // #if SPROUT_USE_TEMPLATE_ALIASES - template - struct apply - : public sprout::identity > - {}; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - }; - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_SELF_HPP diff --git a/dsp/lib/sprout/sprout/type/seq/algorithm.hpp b/dsp/lib/sprout/sprout/type/seq/algorithm.hpp deleted file mode 100644 index ef18c6f..0000000 --- a/dsp/lib/sprout/sprout/type/seq/algorithm.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_SEQ_ALGORITHM_HPP -#define SPROUT_TYPE_SEQ_ALGORITHM_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_SEQ_ALGORITHM_HPP diff --git a/dsp/lib/sprout/sprout/type/seq/algorithm/find.hpp b/dsp/lib/sprout/sprout/type/seq/algorithm/find.hpp deleted file mode 100644 index 7cdba32..0000000 --- a/dsp/lib/sprout/sprout/type/seq/algorithm/find.hpp +++ /dev/null @@ -1,88 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_SEQ_ALGORITHM_FIND_HPP -#define SPROUT_TYPE_SEQ_ALGORITHM_FIND_HPP - -#include -#include -#include - -namespace sprout { - namespace types { - namespace seq { - namespace detail { - template - struct find_impl; - - template - struct find_impl_1; - template - struct find_impl_1< - First, Last, T, - typename std::enable_if< - std::is_same::type, T>::value - >::type - > { - public: - typedef First type; - }; - template - struct find_impl_1< - First, Last, T, - typename std::enable_if< - !std::is_same::type, T>::value - >::type - > - : public sprout::types::seq::detail::find_impl< - typename sprout::types::next::type, - Last, - T - > - {}; - - template - struct find_impl< - First, Last, T, - typename std::enable_if< - std::is_same::value - >::type - > { - public: - typedef Last type; - }; - template - struct find_impl< - First, Last, T, - typename std::enable_if< - !std::is_same::value - >::type - > - : public sprout::types::seq::detail::find_impl_1 - {}; - } // namespace detail - // - // find - // - template - struct find - : public sprout::types::seq::detail::find_impl< - typename sprout::types::begin::type, - typename sprout::types::end::type, - T - > - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using find_t = typename sprout::types::seq::find::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - } // namespace seq - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_SEQ_ALGORITHM_FIND_HPP diff --git a/dsp/lib/sprout/sprout/type/seq/algorithm/find_if.hpp b/dsp/lib/sprout/sprout/type/seq/algorithm/find_if.hpp deleted file mode 100644 index 8170072..0000000 --- a/dsp/lib/sprout/sprout/type/seq/algorithm/find_if.hpp +++ /dev/null @@ -1,89 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_SEQ_ALGORITHM_FIND_IF_HPP -#define SPROUT_TYPE_SEQ_ALGORITHM_FIND_IF_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace types { - namespace seq { - namespace detail { - template - struct find_if_impl; - - template - struct find_if_impl_1; - template - struct find_if_impl_1< - First, Last, Predicate, - typename std::enable_if< - sprout::types::apply::type>::type::value - >::type - > { - public: - typedef First type; - }; - template - struct find_if_impl_1< - First, Last, Predicate, - typename std::enable_if< - !sprout::types::apply::type>::type::value - >::type - > - : public sprout::types::seq::detail::find_if_impl< - typename sprout::types::next::type, - Last, - Predicate - > - {}; - - template - struct find_if_impl< - First, Last, Predicate, - typename std::enable_if< - std::is_same::value - >::type - > { - public: - typedef Last type; - }; - template - struct find_if_impl< - First, Last, Predicate, - typename std::enable_if< - !std::is_same::value - >::type - > - : public sprout::types::seq::detail::find_if_impl_1 - {}; - } // namespace detail - // - // find_if - // - template - struct find_if - : public sprout::types::seq::detail::find_if_impl< - typename sprout::types::begin::type, - typename sprout::types::end::type, - Predicate - > - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using find_if_t = typename sprout::types::seq::find_if::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - } // namespace seq - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_SEQ_ALGORITHM_FIND_IF_HPP diff --git a/dsp/lib/sprout/sprout/type/string.hpp b/dsp/lib/sprout/sprout/type/string.hpp deleted file mode 100644 index 4878324..0000000 --- a/dsp/lib/sprout/sprout/type/string.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_STRING_HPP -#define SPROUT_TYPE_STRING_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_STRING_HPP diff --git a/dsp/lib/sprout/sprout/type/string/alias.hpp b/dsp/lib/sprout/sprout/type/string/alias.hpp deleted file mode 100644 index 65caa62..0000000 --- a/dsp/lib/sprout/sprout/type/string/alias.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_STRING_ALIAS_HPP -#define SPROUT_TYPE_STRING_ALIAS_HPP - -#include -#include - -#if SPROUT_USE_TEMPLATE_ALIASES - -namespace sprout { - namespace types { - // - // string - // - template - using string = sprout::types::basic_string; - // - // wstring - // - template - using wstring = sprout::types::basic_string; -#if SPROUT_USE_UNICODE_LITERALS - // - // u16string - // - template - using u16string = sprout::types::basic_string; - // - // u32string - // - template - using u32string = sprout::types::basic_string; -#endif - } // namespace types -} // namespace sprout - -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - -#endif // #ifndef SPROUT_TYPE_STRING_ALIAS_HPP diff --git a/dsp/lib/sprout/sprout/type/string/string.hpp b/dsp/lib/sprout/sprout/type/string/string.hpp deleted file mode 100644 index 17daea7..0000000 --- a/dsp/lib/sprout/sprout/type/string/string.hpp +++ /dev/null @@ -1,71 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_STRING_STRING_HPP -#define SPROUT_TYPE_STRING_STRING_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace types { - // - // basic_string - // - template - struct basic_string - : public sprout::types::integral_array - { - public: - typedef basic_string type; - }; - } // namespace types -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // tuple_size - // - template - struct tuple_size > - : public std::tuple_size > - {}; - - // - // tuple_element - // - template - struct tuple_element > - : public sprout::types::tuple_element > - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -namespace sprout { - // - // tuple_get - // - template - inline SPROUT_CONSTEXPR typename std::tuple_element >::type - tuple_get(sprout::types::basic_string) SPROUT_NOEXCEPT { - static_assert(I < sizeof...(Values), "tuple_get: index out of range"); - typedef typename std::tuple_element >::type type; - return type(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_STRING_STRING_HPP diff --git a/dsp/lib/sprout/sprout/type/string/to_string.hpp b/dsp/lib/sprout/sprout/type/string/to_string.hpp deleted file mode 100644 index a844667..0000000 --- a/dsp/lib/sprout/sprout/type/string/to_string.hpp +++ /dev/null @@ -1,93 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_STRING_TO_STRING_HPP -#define SPROUT_TYPE_STRING_TO_STRING_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace types { -#if !defined(SPROUT_CONFIG_DISABLE_CONSTEXPR) && !defined(SPROUT_NO_STATIC_CONSTEXPR_INITIALIZATION) - // - // to_string - // - template - struct to_string { - private: - typedef decltype(Proxy()()) string_type; - typedef sprout::container_traits traits_type; - private: - template - struct impl; - template - struct impl > { - public: - typedef sprout::types::basic_string< - typename traits_type::value_type, - (*sprout::next(sprout::begin(Proxy()()), Indexes))... - > type; - }; - public: - typedef typename impl< - typename sprout::make_index_tuple::type - >::type type; - }; - namespace detail { - template - struct string_typedef_impl { - public: - typedef typename std::decay::type result_type; - public: - SPROUT_CONSTEXPR result_type operator()(Src const& src) const { - return src; - } - }; - template - struct string_typedef_impl { - public: - typedef decltype(sprout::to_string(std::declval())) result_type; - public: - SPROUT_CONSTEXPR result_type operator()(Src const& src) const { - return sprout::to_string(src); - } - }; - } // namespace detail - // - // SPROUT_TYPES_STRING_TYPEDEF - // -# define SPROUT_TYPES_STRING_TYPEDEF_IMPL(SOURCE, TYPE, NUM) \ - struct SPROUT_PP_CAT(SPROUT_TYPES_STRING_TYPEDEF_PROXY_, NUM) { \ - private: \ - typedef typename std::remove_reference::type src_type; \ - typedef sprout::types::detail::string_typedef_impl::value> impl_type; \ - public: \ - typedef typename impl_type::result_type result_type; \ - public: \ - SPROUT_CONSTEXPR result_type operator()() const { \ - return impl_type()(SOURCE); \ - } \ - }; \ - typedef typename sprout::types::to_string::type TYPE -# define SPROUT_TYPES_STRING_TYPEDEF(SOURCE, TYPE) \ - SPROUT_TYPES_STRING_TYPEDEF_IMPL(SOURCE, TYPE, SPROUT_PP_SOME_NUMBER()) -#endif - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_STRING_TO_STRING_HPP diff --git a/dsp/lib/sprout/sprout/type/string/to_string_constant.hpp b/dsp/lib/sprout/sprout/type/string/to_string_constant.hpp deleted file mode 100644 index a841308..0000000 --- a/dsp/lib/sprout/sprout/type/string/to_string_constant.hpp +++ /dev/null @@ -1,70 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_STRING_TO_STRING_CONSTANT_HPP -#define SPROUT_TYPE_STRING_TO_STRING_CONSTANT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace types { - // - // to_string_constant - // - namespace detail { - struct is_nul { - public: - template - struct apply - : public sprout::false_type - {}; - template - struct apply::type> - : public sprout::true_type - {}; - }; - template - struct str_length - : public sprout::types::distance< - typename sprout::types::begin::type, - typename sprout::types::seq::find_if< - Sequence, - sprout::types::detail::is_nul - >::type - > - {}; - template - inline SPROUT_CONSTEXPR sprout::basic_string< - typename Sequence::value_type, - sprout::types::detail::str_length::value - > to_string_constant_impl(sprout::index_tuple) { - return sprout::make_string( - sprout::types::tuple_element::type::value... - ); - } - } // namespace detail - template - inline SPROUT_CONSTEXPR sprout::basic_string< - typename Sequence::value_type, - sprout::types::detail::str_length::value - > to_string_constant() { - return sprout::types::detail::to_string_constant_impl( - sprout::make_index_tuple::value>::make() - ); - } - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_STRING_TO_STRING_CONSTANT_HPP diff --git a/dsp/lib/sprout/sprout/type/tuple.hpp b/dsp/lib/sprout/sprout/type/tuple.hpp deleted file mode 100644 index 16db645..0000000 --- a/dsp/lib/sprout/sprout/type/tuple.hpp +++ /dev/null @@ -1,177 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TUPLE_HPP -#define SPROUT_TYPE_TUPLE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace types { - // - // begin - // - template - struct begin { - typedef typename T::begin type; - }; - // - // end - // - template - struct end { - typedef typename T::end type; - }; - - // - // tuple_size - // - namespace detail { - template - struct tuple_size_default_impl - : public sprout::detail::nil_base - {}; - template class TupleClass, typename... Ts> - struct tuple_size_default_impl > - : public sprout::integral_constant - {}; - template class IntegerSequenceClass, typename T, T... Vs> - struct tuple_size_default_impl > - : public sprout::integral_constant - {}; - -#define SPROUT_TYPES_DETAIL_TUPLE_SIZE_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(TYPE) \ - template class IntegerSequenceClass, TYPE... Vs> \ - struct tuple_size_default_impl > \ - : public sprout::integral_constant \ - {} - - SPROUT_TYPES_DETAIL_TUPLE_SIZE_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(bool); - SPROUT_TYPES_DETAIL_TUPLE_SIZE_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(char); - SPROUT_TYPES_DETAIL_TUPLE_SIZE_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(signed char); - SPROUT_TYPES_DETAIL_TUPLE_SIZE_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(unsigned char); -#if SPROUT_USE_UNICODE_LITERALS - SPROUT_TYPES_DETAIL_TUPLE_SIZE_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(char16_t); - SPROUT_TYPES_DETAIL_TUPLE_SIZE_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(char32_t); -#endif - SPROUT_TYPES_DETAIL_TUPLE_SIZE_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(wchar_t); - SPROUT_TYPES_DETAIL_TUPLE_SIZE_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(short); - SPROUT_TYPES_DETAIL_TUPLE_SIZE_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(unsigned short); - SPROUT_TYPES_DETAIL_TUPLE_SIZE_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(int); - SPROUT_TYPES_DETAIL_TUPLE_SIZE_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(unsigned int); - SPROUT_TYPES_DETAIL_TUPLE_SIZE_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(long); - SPROUT_TYPES_DETAIL_TUPLE_SIZE_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(unsigned long); - SPROUT_TYPES_DETAIL_TUPLE_SIZE_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(long long); - SPROUT_TYPES_DETAIL_TUPLE_SIZE_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(unsigned long long); - -#undef SPROUT_TYPES_DETAIL_TUPLE_SIZE_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL - - template >::value> - struct tuple_size_default; - template - struct tuple_size_default - : public sprout::types::detail::tuple_size_default_impl - {}; - template - struct tuple_size_default - : public sprout::tuples::tuple_size - {}; - } // namespace detail - template - struct tuple_size - : public sprout::types::detail::tuple_size_default - {}; - - // - // tuple_element - // - namespace detail { - template - struct tuple_element_default_impl - : public sprout::detail::nil_base - {}; - template class TupleClass, typename... Ts> - struct tuple_element_default_impl > - : public std::tuple_element > - {}; - template class IntegerSequenceClass, typename T, T... Vs> - struct tuple_element_default_impl > - : public std::tuple_element...> > - {}; - -#define SPROUT_TYPES_DETAIL_TUPLE_ELEMENT_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(TYPE) \ - template class IntegerSequenceClass, TYPE... Vs> \ - struct tuple_element_default_impl > \ - : public std::tuple_element...> > \ - {} - - SPROUT_TYPES_DETAIL_TUPLE_ELEMENT_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(bool); - SPROUT_TYPES_DETAIL_TUPLE_ELEMENT_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(char); - SPROUT_TYPES_DETAIL_TUPLE_ELEMENT_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(signed char); - SPROUT_TYPES_DETAIL_TUPLE_ELEMENT_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(unsigned char); -#if SPROUT_USE_UNICODE_LITERALS - SPROUT_TYPES_DETAIL_TUPLE_ELEMENT_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(char16_t); - SPROUT_TYPES_DETAIL_TUPLE_ELEMENT_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(char32_t); -#endif - SPROUT_TYPES_DETAIL_TUPLE_ELEMENT_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(wchar_t); - SPROUT_TYPES_DETAIL_TUPLE_ELEMENT_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(short); - SPROUT_TYPES_DETAIL_TUPLE_ELEMENT_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(unsigned short); - SPROUT_TYPES_DETAIL_TUPLE_ELEMENT_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(int); - SPROUT_TYPES_DETAIL_TUPLE_ELEMENT_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(unsigned int); - SPROUT_TYPES_DETAIL_TUPLE_ELEMENT_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(long); - SPROUT_TYPES_DETAIL_TUPLE_ELEMENT_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(unsigned long); - SPROUT_TYPES_DETAIL_TUPLE_ELEMENT_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(long long); - SPROUT_TYPES_DETAIL_TUPLE_ELEMENT_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL(unsigned long long); - -#undef SPROUT_TYPES_DETAIL_TUPLE_ELEMENT_DEFAULT_IMPL_INTEGER_SEQUENCE_LIKE_DECL - - template >::value> - struct tuple_element_default; - template - struct tuple_element_default - : public sprout::types::detail::tuple_element_default_impl - {}; - template - struct tuple_element_default - : public sprout::tuples::tuple_element - {}; - } // namespace detail - template - struct tuple_element - : public sprout::types::detail::tuple_element_default - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using begin_t = typename sprout::types::begin::type; - template - using end_t = typename sprout::types::end::type; - - template - using tuple_element_t = typename sprout::types::tuple_element::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR std::size_t tuple_size_v = sprout::types::tuple_size::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - } // namespace types -} // namespace sprout - -#include - -#endif // #ifndef SPROUT_TYPE_TUPLE_HPP diff --git a/dsp/lib/sprout/sprout/type/type_tuple.hpp b/dsp/lib/sprout/sprout/type/type_tuple.hpp deleted file mode 100644 index e9c006e..0000000 --- a/dsp/lib/sprout/sprout/type/type_tuple.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TYPE_TUPLE_HPP -#define SPROUT_TYPE_TYPE_TUPLE_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace types { - // - // type_tuple - // - template - struct type_tuple { - public: - typedef type_tuple type; - typedef sprout::types::index_iterator begin; - typedef sprout::types::index_iterator end; - public: - template - struct apply - : public sprout::identity > - {}; - public: - SPROUT_STATIC_CONSTEXPR std::size_t static_size = sizeof...(Types); - }; - template - SPROUT_CONSTEXPR_OR_CONST std::size_t sprout::types::type_tuple::static_size; - } // namespace types - - using sprout::types::type_tuple; -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TYPE_TUPLE_HPP diff --git a/dsp/lib/sprout/sprout/type/type_tuple_decl.hpp b/dsp/lib/sprout/sprout/type/type_tuple_decl.hpp deleted file mode 100644 index 916274d..0000000 --- a/dsp/lib/sprout/sprout/type/type_tuple_decl.hpp +++ /dev/null @@ -1,246 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TYPE_TUPLE_DECL_HPP -#define SPROUT_TYPE_TYPE_TUPLE_DECL_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace types { - // - // type_tuple - // - template - struct type_tuple; - - namespace detail { - template - struct head_element; - template<> - struct head_element > - : public sprout::detail::nil_base - {}; - template - struct head_element > - : public sprout::identity - {}; - - template - struct tuple_head; - template<> - struct tuple_head > - : public sprout::detail::nil_base - {}; - template - struct tuple_head > - : public sprout::identity > - {}; - - template - struct tuple_tail; - template<> - struct tuple_tail > - : public sprout::detail::nil_base - {}; - template - struct tuple_tail > - : public sprout::identity > - {}; - - template - struct dummy_index - : public sprout::identity - {}; - - template - struct tuple_cat; - template - struct tuple_cat, sprout::types::type_tuple > - : public sprout::identity > - {}; - - // !!! OLD: - //template - //struct tuple_skip; - //template - //struct tuple_skip< - // I, N, sprout::types::type_tuple, - // typename std::enable_if<(I == 0)>::type - //> - // : public sprout::identity > - //{}; - //template - //struct tuple_skip< - // I, N, sprout::types::type_tuple, - // typename std::enable_if<(I != 0 && I < N / 2)>::type - //> - // : public sprout::types::detail::tuple_skip< - // I - 1, N / 2 - 1, - // sprout::types::type_tuple - // > - //{}; - //template - //struct tuple_skip< - // I, N, sprout::types::type_tuple, - // typename std::enable_if<(I != 0 && I >= N / 2)>::type - //> - // : public sprout::types::detail::tuple_skip< - // I - N / 2, N - N / 2, - // typename sprout::types::detail::tuple_skip >::type - // > - //{}; - //template - //struct tuple_drop; - //template - //struct tuple_drop > - // : public sprout::types::detail::tuple_skip> - //{}; - template - struct tuple_drop_helper; - template - struct tuple_drop_helper > { - template - static sprout::types::type_tuple - eval(typename sprout::types::detail::dummy_index::type*..., Types*...); - }; - template::value)> - struct tuple_drop_impl; - template - struct tuple_drop_impl - : public sprout::detail::nil_base - {}; - template - struct tuple_drop_impl, true> - : public sprout::identity::type> - ::eval(typename sprout::identity*>::type()...) - )>::type - {}; - template - struct tuple_drop - : public sprout::types::detail::tuple_drop_impl - {}; - - template::value)> - struct tuple_element_impl; - template - struct tuple_element_impl - : public sprout::detail::nil_base - {}; - template - struct tuple_element_impl, true> - : public sprout::types::detail::head_element< - typename sprout::types::detail::tuple_drop >::type - > - {}; - template - struct tuple_element - : public sprout::types::detail::tuple_element_impl - {}; - - template::value)> - struct tuple_take_impl; - template - struct tuple_take_impl - : public sprout::detail::nil_base - {}; - template - struct tuple_take_impl, sprout::index_tuple, true> - : public sprout::identity< - sprout::types::type_tuple< - typename sprout::types::detail::tuple_element >::type... - > - >::type - {}; - template - struct tuple_take; - template - struct tuple_take > - : public sprout::types::detail::tuple_take_impl, typename sprout::make_index_tuple::type> - {}; - } // namespace detail - } // namespace types - - using sprout::types::type_tuple; -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // tuple_size - // - template - struct tuple_size > - : public sprout::integral_constant - {}; - - // - // tuple_element - // - template - struct tuple_element > - : public sprout::types::detail::tuple_element > - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -namespace sprout { - namespace types { - // - // push_back - // - template - struct push_back; - template - struct push_back, Ts...> - : public sprout::identity > - {}; - // - // push_front - // - template - struct push_front; - template - struct push_front, Ts...> - : public sprout::identity > - {}; - // - // pop_back - // - template - struct pop_back; - template - struct pop_back > - : public sprout::types::detail::tuple_take<(sizeof...(Types) - 1), sprout::types::type_tuple > - {}; - // - // pop_front - // - template - struct pop_front; - template - struct pop_front > - : public sprout::identity > - {}; - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TYPE_TUPLE_DECL_HPP diff --git a/dsp/lib/sprout/sprout/type/uniform_types.hpp b/dsp/lib/sprout/sprout/type/uniform_types.hpp deleted file mode 100644 index b8c83ad..0000000 --- a/dsp/lib/sprout/sprout/type/uniform_types.hpp +++ /dev/null @@ -1,83 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_UNIFORM_TYPES_HPP -#define SPROUT_TYPE_UNIFORM_TYPES_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace types { - // - // uniform_types - // - template - struct uniform_types { - public: - typedef uniform_types type; - typedef sprout::types::index_iterator begin; - typedef sprout::types::index_iterator end; - public: - SPROUT_STATIC_CONSTEXPR std::size_t static_size = N; - }; - template - SPROUT_CONSTEXPR_OR_CONST std::size_t sprout::types::uniform_types::static_size; - - // - // rebind_types - // - template - struct rebind_types > { - public: - template - struct apply { - public: - typedef sprout::types::uniform_types type; - }; - }; - } // namespace types - - using sprout::types::uniform_types; - using sprout::types::rebind_types; -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // tuple_size - // - template - struct tuple_size > - : public sprout::integral_constant - {}; - - // - // tuple_element - // - template - struct tuple_element > - : public std::conditional<(I < N), sprout::identity, sprout::detail::nil_base>::type - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -#endif // #ifndef SPROUT_TYPE_UNIFORM_TYPES_HPP diff --git a/dsp/lib/sprout/sprout/type/void.hpp b/dsp/lib/sprout/sprout/type/void.hpp deleted file mode 100644 index c8fc5be..0000000 --- a/dsp/lib/sprout/sprout/type/void.hpp +++ /dev/null @@ -1,22 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_VOID_HPP -#define SPROUT_TYPE_VOID_HPP - -#include - -namespace sprout { - namespace types { - // - // void_ - // - struct void_ {}; - } // namespace types -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_VOID_HPP diff --git a/dsp/lib/sprout/sprout/type_traits.hpp b/dsp/lib/sprout/sprout/type_traits.hpp deleted file mode 100644 index fa1ca96..0000000 --- a/dsp/lib/sprout/sprout/type_traits.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HPP -#define SPROUT_TYPE_TRAITS_HPP - -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/add_const.hpp b/dsp/lib/sprout/sprout/type_traits/add_const.hpp deleted file mode 100644 index 4348970..0000000 --- a/dsp/lib/sprout/sprout/type_traits/add_const.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_ADD_CONST_HPP -#define SPROUT_TYPE_TRAITS_ADD_CONST_HPP - -#include -#include - -namespace sprout { - // - // add_const - // - using std::add_const; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using add_const_t = typename sprout::add_const::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_ADD_CONST_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/add_cv.hpp b/dsp/lib/sprout/sprout/type_traits/add_cv.hpp deleted file mode 100644 index 9d6d482..0000000 --- a/dsp/lib/sprout/sprout/type_traits/add_cv.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_ADD_CV_HPP -#define SPROUT_TYPE_TRAITS_ADD_CV_HPP - -#include -#include - -namespace sprout { - // - // add_cv - // - using std::add_cv; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using add_cv_t = typename sprout::add_cv::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_ADD_CV_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/add_lvalue_reference.hpp b/dsp/lib/sprout/sprout/type_traits/add_lvalue_reference.hpp deleted file mode 100644 index f075032..0000000 --- a/dsp/lib/sprout/sprout/type_traits/add_lvalue_reference.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_ADD_LVALUE_REFERENCE_HPP -#define SPROUT_TYPE_TRAITS_ADD_LVALUE_REFERENCE_HPP - -#include -#include - -namespace sprout { - // - // add_lvalue_reference - // - using std::add_lvalue_reference; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using add_lvalue_reference_t = typename sprout::add_lvalue_reference::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_ADD_LVALUE_REFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/add_pointer.hpp b/dsp/lib/sprout/sprout/type_traits/add_pointer.hpp deleted file mode 100644 index f20a0a1..0000000 --- a/dsp/lib/sprout/sprout/type_traits/add_pointer.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_ADD_POINTER_HPP -#define SPROUT_TYPE_TRAITS_ADD_POINTER_HPP - -#include -#include - -namespace sprout { - // - // add_pointer - // - using std::add_pointer; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using add_pointer_t = typename sprout::add_pointer::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_ADD_POINTER_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/add_rvalue_reference.hpp b/dsp/lib/sprout/sprout/type_traits/add_rvalue_reference.hpp deleted file mode 100644 index b435cf3..0000000 --- a/dsp/lib/sprout/sprout/type_traits/add_rvalue_reference.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_ADD_RVALUE_REFERENCE_HPP -#define SPROUT_TYPE_TRAITS_ADD_RVALUE_REFERENCE_HPP - -#include -#include - -namespace sprout { - // - // add_rvalue_reference - // - using std::add_rvalue_reference; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using add_rvalue_reference_t = typename sprout::add_rvalue_reference::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_ADD_RVALUE_REFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/add_volatile.hpp b/dsp/lib/sprout/sprout/type_traits/add_volatile.hpp deleted file mode 100644 index 7113e74..0000000 --- a/dsp/lib/sprout/sprout/type_traits/add_volatile.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_ADD_VOLATILE_HPP -#define SPROUT_TYPE_TRAITS_ADD_VOLATILE_HPP - -#include -#include - -namespace sprout { - // - // add_volatile - // - using std::add_volatile; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using add_volatile_t = typename sprout::add_volatile::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_ADD_VOLATILE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/aligned_storage.hpp b/dsp/lib/sprout/sprout/type_traits/aligned_storage.hpp deleted file mode 100644 index 925e058..0000000 --- a/dsp/lib/sprout/sprout/type_traits/aligned_storage.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_ALIGNED_STORAGE_HPP -#define SPROUT_TYPE_TRAITS_ALIGNED_STORAGE_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // aligned_storage - // - using std::aligned_storage; - -#if SPROUT_USE_TEMPLATE_ALIASES - template< - std::size_t Len, - std::size_t Align = sprout::alignment_of::type>::value - > - using aligned_storage_t = typename sprout::aligned_storage::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_ALIGNED_STORAGE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/aligned_union.hpp b/dsp/lib/sprout/sprout/type_traits/aligned_union.hpp deleted file mode 100644 index a3e6650..0000000 --- a/dsp/lib/sprout/sprout/type_traits/aligned_union.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_ALIGNED_UNION_HPP -#define SPROUT_TYPE_TRAITS_ALIGNED_UNION_HPP - -#include -#include -#include -#include -#if !defined(_LIBCPP_VERSION) || (_LIBCPP_VERSION < 1101) -# include -#endif - -namespace sprout { - // - // aligned_union - // -#if !defined(_LIBCPP_VERSION) || (_LIBCPP_VERSION < 1101) - template - struct aligned_union - : public std::aligned_storage< - sprout::tpp::max_element_c::value, - sprout::tpp::max_element_c::value...>::value - > - {}; -#else // #if !defined(_LIBCPP_VERSION) || (_LIBCPP_VERSION < 1101) - using std::aligned_union; -#endif // #if !defined(_LIBCPP_VERSION) || (_LIBCPP_VERSION < 1101) - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using aligned_union_t = typename sprout::aligned_union::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_ALIGNED_UNION_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/alignment_of.hpp b/dsp/lib/sprout/sprout/type_traits/alignment_of.hpp deleted file mode 100644 index c40bd12..0000000 --- a/dsp/lib/sprout/sprout/type_traits/alignment_of.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_ALIGNMENT_OF_HPP -#define SPROUT_TYPE_TRAITS_ALIGNMENT_OF_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // alignment_of - // - template - struct alignment_of - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR std::size_t alignment_of_v = sprout::alignment_of::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_ALIGNMENT_OF_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/arithmetic_promote.hpp b/dsp/lib/sprout/sprout/type_traits/arithmetic_promote.hpp deleted file mode 100644 index e0ab541..0000000 --- a/dsp/lib/sprout/sprout/type_traits/arithmetic_promote.hpp +++ /dev/null @@ -1,69 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_ARITHMETIC_PROMOTE_HPP -#define SPROUT_TYPE_TRAITS_ARITHMETIC_PROMOTE_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - struct arithmetic_promote1 - : public sprout::identity - { - static_assert( - std::is_arithmetic::value, - "arithmetic_promote requires arithmetic types." - ); - }; - - template - struct arithmetic_promote2 - : public std::decay() + std::declval())> - { - static_assert( - std::is_arithmetic::value && std::is_arithmetic::value, - "arithmetic_promote requires arithmetic types." - ); - }; - - template - struct arithmetic_promote_impl; - template - struct arithmetic_promote_impl - : public sprout::detail::arithmetic_promote_impl< - typename sprout::detail::arithmetic_promote2::type, - Tail... - > - {}; - template - struct arithmetic_promote_impl - : public sprout::detail::arithmetic_promote1 - {}; - } // namespace detail - - // - // arithmetic_promote - // - template - struct arithmetic_promote - : public sprout::detail::arithmetic_promote_impl< - typename std::remove_cv::type... - > - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using arithmetic_promote_t = typename sprout::arithmetic_promote::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_ARITHMETIC_PROMOTE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/array_modification.hpp b/dsp/lib/sprout/sprout/type_traits/array_modification.hpp deleted file mode 100644 index d7591fa..0000000 --- a/dsp/lib/sprout/sprout/type_traits/array_modification.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_ARRAY_MODIFICATION_HPP -#define SPROUT_TYPE_TRAITS_ARRAY_MODIFICATION_HPP - -#include -// 20.10.7.4 Array modifications -#include -#include - -#endif // #ifndef SPROUT_TYPE_TRAITS_ARRAY_MODIFICATION_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/category.hpp b/dsp/lib/sprout/sprout/type_traits/category.hpp deleted file mode 100644 index 1bbab8f..0000000 --- a/dsp/lib/sprout/sprout/type_traits/category.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_CATEGORY_HPP -#define SPROUT_TYPE_TRAITS_CATEGORY_HPP - -#include -// 20.10.4.1, primary type categories -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_TRAITS_CATEGORY_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/common_decay.hpp b/dsp/lib/sprout/sprout/type_traits/common_decay.hpp deleted file mode 100644 index baafd84..0000000 --- a/dsp/lib/sprout/sprout/type_traits/common_decay.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_COMMON_DECAY_HPP -#define SPROUT_TYPE_TRAITS_COMMON_DECAY_HPP - -#include -#include - -namespace sprout { - // - // common_decay - // - template - struct common_decay - : public sprout::common_type - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using common_decay_t = typename sprout::common_decay::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_COMMON_DECAY_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/common_type.hpp b/dsp/lib/sprout/sprout/type_traits/common_type.hpp deleted file mode 100644 index c911bb9..0000000 --- a/dsp/lib/sprout/sprout/type_traits/common_type.hpp +++ /dev/null @@ -1,75 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_COMMON_TYPE_HPP -#define SPROUT_TYPE_TRAITS_COMMON_TYPE_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // undecayed_common_type - // - namespace detail { - template - struct undecayed_common_type2 - : public sprout::identity() ? std::declval() : std::declval())> - {}; - template - struct undecayed_common_type_impl - : public sprout::detail::nil_base - {}; - template - struct undecayed_common_type_impl - : public sprout::identity - {}; - template - struct undecayed_common_type_impl::type>::type, T1, T2, Tail...> - : public sprout::detail::undecayed_common_type_impl::type, Tail...> - {}; - } // namespace detail - template - struct undecayed_common_type - : public sprout::detail::undecayed_common_type_impl - {}; - - // - // common_type - // - namespace detail { - template::value> - struct common_type_impl; - template - struct common_type_impl - : public CommonType - {}; - template - struct common_type_impl - : public std::decay - {}; - } // namespace detail - template - struct common_type - : public sprout::detail::common_type_impl > - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using undecayed_common_type_t = typename sprout::undecayed_common_type::type; - - template - using common_type_t = typename sprout::common_type::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_COMMON_TYPE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/complex_promote.hpp b/dsp/lib/sprout/sprout/type_traits/complex_promote.hpp deleted file mode 100644 index 8c5496d..0000000 --- a/dsp/lib/sprout/sprout/type_traits/complex_promote.hpp +++ /dev/null @@ -1,71 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_COMPLEX_PROMOTE_HPP -#define SPROUT_TYPE_TRAITS_COMPLEX_PROMOTE_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template::value> - struct complex_promote1 - : public sprout::identity - {}; - template - struct complex_promote1 - : public sprout::identity::type> > - {}; - - template - struct complex_promote2 - : public sprout::identity::type::value_type, - typename sprout::detail::complex_promote1::type::value_type - >::type - >> - {}; - - template - struct complex_promote_impl; - template - struct complex_promote_impl - : public sprout::detail::complex_promote_impl< - typename sprout::detail::complex_promote2::type, - Tail... - > - {}; - template - struct complex_promote_impl - : public sprout::detail::complex_promote1 - {}; - } // namespace detail - - // - // complex_promote - // - template - struct complex_promote - : public sprout::detail::complex_promote_impl< - typename std::remove_cv::type... - > - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using complex_promote_t = typename sprout::complex_promote::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_COMPLEX_PROMOTE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/composite_category.hpp b/dsp/lib/sprout/sprout/type_traits/composite_category.hpp deleted file mode 100644 index b329ffa..0000000 --- a/dsp/lib/sprout/sprout/type_traits/composite_category.hpp +++ /dev/null @@ -1,21 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_COMPOSITE_CATEGORY_HPP -#define SPROUT_TYPE_TRAITS_COMPOSITE_CATEGORY_HPP - -#include -// 20.10.4.2 Composite type traits -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_TRAITS_COMPOSITE_CATEGORY_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/composite_modification.hpp b/dsp/lib/sprout/sprout/type_traits/composite_modification.hpp deleted file mode 100644 index a701c06..0000000 --- a/dsp/lib/sprout/sprout/type_traits/composite_modification.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_COMPOSITE_MODIFICATION_HPP -#define SPROUT_TYPE_TRAITS_COMPOSITE_MODIFICATION_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_TRAITS_COMPOSITE_MODIFICATION_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/conditional.hpp b/dsp/lib/sprout/sprout/type_traits/conditional.hpp deleted file mode 100644 index 8e1cc6a..0000000 --- a/dsp/lib/sprout/sprout/type_traits/conditional.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_CONDITIONAL_HPP -#define SPROUT_TYPE_TRAITS_CONDITIONAL_HPP - -#include -#include - -namespace sprout { - // - // conditional - // - using std::conditional; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using conditional_t = typename sprout::conditional::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_CONDITIONAL_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/conjunction.hpp b/dsp/lib/sprout/sprout/type_traits/conjunction.hpp deleted file mode 100644 index f5434d4..0000000 --- a/dsp/lib/sprout/sprout/type_traits/conjunction.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_CONJUNCTION_HPP -#define SPROUT_TYPE_TRAITS_CONJUNCTION_HPP - -#include -#include - -namespace sprout { - // - // conjunction - // - template - struct conjunction - : public sprout::tpp::all_of - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool conjunction_v = sprout::conjunction::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_CONJUNCTION_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/const_reference.hpp b/dsp/lib/sprout/sprout/type_traits/const_reference.hpp deleted file mode 100644 index 7c148d7..0000000 --- a/dsp/lib/sprout/sprout/type_traits/const_reference.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_CONST_REFERENCE_HPP -#define SPROUT_TYPE_TRAITS_CONST_REFERENCE_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // const_reference - // - template - struct const_reference - : public sprout::identity()))> - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using const_reference_t = typename sprout::const_reference::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_CONST_REFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/copy_const.hpp b/dsp/lib/sprout/sprout/type_traits/copy_const.hpp deleted file mode 100644 index 75810e6..0000000 --- a/dsp/lib/sprout/sprout/type_traits/copy_const.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_COPY_CONST_HPP -#define SPROUT_TYPE_TRAITS_COPY_CONST_HPP - -#include -#include -#include - -namespace sprout { - // - // copy_const - // - template - struct copy_const - : public sprout::identity - {}; - template - struct copy_const - : public std::add_const - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using copy_const_t = typename sprout::copy_const::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_COPY_CONST_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/copy_cv.hpp b/dsp/lib/sprout/sprout/type_traits/copy_cv.hpp deleted file mode 100644 index 7f72373..0000000 --- a/dsp/lib/sprout/sprout/type_traits/copy_cv.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_COPY_CV_HPP -#define SPROUT_TYPE_TRAITS_COPY_CV_HPP - -#include -#include -#include - -namespace sprout { - // - // copy_cv - // - template - struct copy_cv - : public sprout::identity - {}; - template - struct copy_cv - : public std::add_const - {}; - template - struct copy_cv - : public std::add_volatile - {}; - template - struct copy_cv - : public std::add_cv - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using copy_cv_t = typename sprout::copy_cv::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_COPY_CV_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/copy_volatile.hpp b/dsp/lib/sprout/sprout/type_traits/copy_volatile.hpp deleted file mode 100644 index b15d278..0000000 --- a/dsp/lib/sprout/sprout/type_traits/copy_volatile.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_COPY_VOLATILE_HPP -#define SPROUT_TYPE_TRAITS_COPY_VOLATILE_HPP - -#include -#include -#include - -namespace sprout { - // - // copy_volatile - // - template - struct copy_volatile - : public sprout::identity - {}; - template - struct copy_volatile - : public std::add_volatile - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using copy_volatile_t = typename sprout::copy_volatile::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_COPY_VOLATILE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/cv_modification.hpp b/dsp/lib/sprout/sprout/type_traits/cv_modification.hpp deleted file mode 100644 index 4e36ee0..0000000 --- a/dsp/lib/sprout/sprout/type_traits/cv_modification.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_CV_MODIFICATION_HPP -#define SPROUT_TYPE_TRAITS_CV_MODIFICATION_HPP - -#include -// 20.10.7.1 Const-volatile modifications -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_TRAITS_CV_MODIFICATION_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/decay.hpp b/dsp/lib/sprout/sprout/type_traits/decay.hpp deleted file mode 100644 index d7dedc3..0000000 --- a/dsp/lib/sprout/sprout/type_traits/decay.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_DECAY_HPP -#define SPROUT_TYPE_TRAITS_DECAY_HPP - -#include -#include - -namespace sprout { - // - // decay - // - using std::decay; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using decay_t = typename sprout::decay::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_DECAY_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/detail/has_binary_op.hpp b/dsp/lib/sprout/sprout/type_traits/detail/has_binary_op.hpp deleted file mode 100644 index cf4af9d..0000000 --- a/dsp/lib/sprout/sprout/type_traits/detail/has_binary_op.hpp +++ /dev/null @@ -1,69 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_DETAIL_HAS_BINARY_OP_HPP -#define SPROUT_TYPE_TRAITS_DETAIL_HAS_BINARY_OP_HPP - -#include -#include -#include -#include -#include -#include -#include - -#define SPROUT_DETAIL_HAS_BINARY_OP_INFIX_EXPR(OP, LHS, RHS) \ - LHS OP RHS - -#define SPROUT_DETAIL_HAS_BINARY_OP_DECL(OP_NAME, OP, RHS_DEFAULT) \ - SPROUT_DETAIL_HAS_BINARY_OP_DECL_(OP_NAME, OP, RHS_DEFAULT, SPROUT_DETAIL_HAS_BINARY_OP_INFIX_EXPR) - -#define SPROUT_DETAIL_HAS_BINARY_OP_DECL_(OP_NAME, OP, RHS_DEFAULT, EXPR) \ - template \ - struct SPROUT_PP_CAT(sprout_detail_has_, SPROUT_PP_CAT(OP_NAME, _test)) { \ - public: \ - template< \ - typename U1 = T1, typename U2 = T2, \ - typename Result = sprout::bool_constant(), std::declval()))>::type, R>::value> \ - > \ - static Result test(int); \ - static sprout::false_type test(...); \ - }; \ - template \ - struct SPROUT_PP_CAT(sprout_detail_has_, SPROUT_PP_CAT(OP_NAME, _test)) { \ - public: \ - template< \ - typename U1 = T1, typename U2 = T2, \ - typename = typename sprout::identity(), std::declval()))>::type \ - > \ - static sprout::true_type test(int); \ - static sprout::false_type test(...); \ - }; \ - SPROUT_DETAIL_HAS_BINARY_OP_DECL_IMPL(OP_NAME); \ - template \ - struct SPROUT_PP_CAT(has_, OP_NAME) \ - : public SPROUT_PP_CAT(sprout_detail_has_, OP_NAME) \ - {} - -#if defined(_MSC_VER) && (_MSC_VER > 1900) -# define SPROUT_DETAIL_HAS_BINARY_OP_DECL_IMPL(OP_NAME) \ - template< \ - typename T, typename U, typename R, \ - typename Base_ = typename sprout::identity::test(0))>::type \ - > \ - struct SPROUT_PP_CAT(sprout_detail_has_, OP_NAME) \ - : public Base_ \ - {} -#else -# define SPROUT_DETAIL_HAS_BINARY_OP_DECL_IMPL(OP_NAME) \ - template \ - struct SPROUT_PP_CAT(sprout_detail_has_, OP_NAME) \ - : public sprout::identity::test(0))>::type \ - {} -#endif - -#endif // #ifndef SPROUT_TYPE_TRAITS_DETAIL_HAS_BINARY_OP_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/detail/has_post_unary_op.hpp b/dsp/lib/sprout/sprout/type_traits/detail/has_post_unary_op.hpp deleted file mode 100644 index dd3a1a2..0000000 --- a/dsp/lib/sprout/sprout/type_traits/detail/has_post_unary_op.hpp +++ /dev/null @@ -1,63 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_DETAIL_HAS_POST_UNARY_OP_HPP -#define SPROUT_TYPE_TRAITS_DETAIL_HAS_POST_UNARY_OP_HPP - -#include -#include -#include -#include -#include -#include -#include - -#define SPROUT_DETAIL_HAS_POST_UNARY_OP_DECL(OP_NAME, OP) \ - template \ - struct SPROUT_PP_CAT(sprout_detail_has_, SPROUT_PP_CAT(OP_NAME, _test)) { \ - public: \ - template< \ - typename U = T, \ - typename Result = sprout::bool_constant() OP)>::type, R>::value> \ - > \ - static Result test(int); \ - static sprout::false_type test(...); \ - }; \ - template \ - struct SPROUT_PP_CAT(sprout_detail_has_, SPROUT_PP_CAT(OP_NAME, _test)) { \ - public: \ - template< \ - typename U = T, \ - typename = typename sprout::identity() OP)>::type \ - > \ - static sprout::true_type test(int); \ - static sprout::false_type test(...); \ - }; \ - SPROUT_DETAIL_HAS_POST_UNARY_OP_DECL_IMPL(OP_NAME); \ - template \ - struct SPROUT_PP_CAT(has_, OP_NAME) \ - : public SPROUT_PP_CAT(sprout_detail_has_, OP_NAME) \ - {} - -#if defined(_MSC_VER) && (_MSC_VER > 1900) -# define SPROUT_DETAIL_HAS_POST_UNARY_OP_DECL_IMPL(OP_NAME) \ - template< \ - typename T, typename R, \ - typename Base_ = typename sprout::identity::test(0))>::type \ - > \ - struct SPROUT_PP_CAT(sprout_detail_has_, OP_NAME) \ - : public Base_ \ - {} -#else -# define SPROUT_DETAIL_HAS_POST_UNARY_OP_DECL_IMPL(OP_NAME) \ - template \ - struct SPROUT_PP_CAT(sprout_detail_has_, OP_NAME) \ - : public sprout::identity::test(0))>::type \ - {} -#endif - -#endif // #ifndef SPROUT_TYPE_TRAITS_DETAIL_HAS_POST_UNARY_OP_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/detail/has_pre_unary_op.hpp b/dsp/lib/sprout/sprout/type_traits/detail/has_pre_unary_op.hpp deleted file mode 100644 index 9503109..0000000 --- a/dsp/lib/sprout/sprout/type_traits/detail/has_pre_unary_op.hpp +++ /dev/null @@ -1,63 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_DETAIL_HAS_PRE_UNARY_OP_HPP -#define SPROUT_TYPE_TRAITS_DETAIL_HAS_PRE_UNARY_OP_HPP - -#include -#include -#include -#include -#include -#include -#include - -#define SPROUT_DETAIL_HAS_PRE_UNARY_OP_DECL(OP_NAME, OP) \ - template \ - struct SPROUT_PP_CAT(sprout_detail_has_, SPROUT_PP_CAT(OP_NAME, _test)) { \ - public: \ - template< \ - typename U = T, \ - typename Result = sprout::bool_constant())>::type, R>::value> \ - > \ - static Result test(int); \ - static sprout::false_type test(...); \ - }; \ - template \ - struct SPROUT_PP_CAT(sprout_detail_has_, SPROUT_PP_CAT(OP_NAME, _test)) { \ - public: \ - template< \ - typename U = T, \ - typename = typename sprout::identity())>::type \ - > \ - static sprout::true_type test(int); \ - static sprout::false_type test(...); \ - }; \ - SPROUT_DETAIL_HAS_PRE_UNARY_OP_DECL_IMPL(OP_NAME); \ - template \ - struct SPROUT_PP_CAT(has_, OP_NAME) \ - : public SPROUT_PP_CAT(sprout_detail_has_, OP_NAME) \ - {} - -#if defined(_MSC_VER) && (_MSC_VER > 1900) -# define SPROUT_DETAIL_HAS_PRE_UNARY_OP_DECL_IMPL(OP_NAME) \ - template< \ - typename T, typename R, \ - typename Base_ = typename sprout::identity::test(0))>::type \ - > \ - struct SPROUT_PP_CAT(sprout_detail_has_, OP_NAME) \ - : public Base_ \ - {} -#else -# define SPROUT_DETAIL_HAS_PRE_UNARY_OP_DECL_IMPL(OP_NAME) \ - template \ - struct SPROUT_PP_CAT(sprout_detail_has_, OP_NAME) \ - : public sprout::identity::test(0))>::type \ - {} -#endif - -#endif // #ifndef SPROUT_TYPE_TRAITS_DETAIL_HAS_PRE_UNARY_OP_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/detail/has_subscript_op.hpp b/dsp/lib/sprout/sprout/type_traits/detail/has_subscript_op.hpp deleted file mode 100644 index aed2042..0000000 --- a/dsp/lib/sprout/sprout/type_traits/detail/has_subscript_op.hpp +++ /dev/null @@ -1,21 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_DETAIL_HAS_SUBSCRIPT_OP_HPP -#define SPROUT_TYPE_TRAITS_DETAIL_HAS_SUBSCRIPT_OP_HPP - -#include -#include - -#define SPROUT_DETAIL_HAS_OP_SUBSCRIPT_EXPR(OP, LHS, RHS) \ - LHS[RHS] - -#define SPROUT_DETAIL_HAS_SUBSCRIPT_OP_DECL(OP_NAME, OP, RHS_DEFAULT) \ - SPROUT_DETAIL_HAS_BINARY_OP_DECL_(OP_NAME, OP, RHS_DEFAULT, SPROUT_DETAIL_HAS_OP_SUBSCRIPT_EXPR) - - -#endif // #ifndef SPROUT_TYPE_TRAITS_DETAIL_HAS_SUBSCRIPT_OP_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/detail/invoke.hpp b/dsp/lib/sprout/sprout/type_traits/detail/invoke.hpp deleted file mode 100644 index 62d1afb..0000000 --- a/dsp/lib/sprout/sprout/type_traits/detail/invoke.hpp +++ /dev/null @@ -1,83 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_DETAIL_INVOKE_HPP -#define SPROUT_TYPE_TRAITS_DETAIL_INVOKE_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR decltype(std::declval()(std::declval()...)) - invoke(F&& f, Args&&... args) SPROUT_NOEXCEPT_IF_EXPR(std::declval()(std::declval()...)) { - return SPROUT_FORWARD(F, f)(SPROUT_FORWARD(Args, args)...); - } - - template - inline SPROUT_CONSTEXPR decltype(std::declval().*(std::declval())) - invoke(T Base::* pm, Derived&& d) SPROUT_NOEXCEPT_IF_EXPR(std::declval().*(std::declval())) { - return SPROUT_FORWARD(Derived, d).*(pm); - } - - template - inline SPROUT_CONSTEXPR decltype((*std::declval()).*(std::declval())) - invoke(PMD&& pmd, Pointer&& ptr) SPROUT_NOEXCEPT_IF_EXPR((*std::declval()).*(std::declval())) { - return SPROUT_FORWARD(Pointer, ptr).*(SPROUT_FORWARD(PMD, pmd)); - } - - template - inline SPROUT_CONSTEXPR decltype((std::declval().*(std::declval()))(std::declval()...)) - invoke(T Base::* pm, Derived&& d, Args&&... args) SPROUT_NOEXCEPT_IF_EXPR((std::declval().*(std::declval()))(std::declval()...)) { - return (SPROUT_FORWARD(Derived, d).*(pm))(SPROUT_FORWARD(Args, args)...); - } - - template - inline SPROUT_CONSTEXPR decltype(((*std::declval()).*(std::declval()))(std::declval()...)) - invoke(PMF&& pmf, Pointer&& ptr, Args&&... args) SPROUT_NOEXCEPT_IF_EXPR(((*std::declval()).*(std::declval()))(std::declval()...)) { - return (SPROUT_FORWARD(Pointer, ptr).*(SPROUT_FORWARD(PMF, pmf)))(SPROUT_FORWARD(Args, args)...); - } - - template - inline SPROUT_CONSTEXPR R - invoke(F&&, Args&&...) SPROUT_NOEXCEPT_IF_EXPR(R(std::declval()(std::declval()...))); - - template - inline SPROUT_CONSTEXPR decltype(R(std::declval().*(std::declval()))) - invoke(T Base::*, Derived&&) SPROUT_NOEXCEPT_IF_EXPR(R(std::declval().*(std::declval()))); - - template - inline SPROUT_CONSTEXPR decltype(R((*std::declval()).*(std::declval()))) - invoke(PMD&&, Pointer&&) SPROUT_NOEXCEPT_IF_EXPR(R((*std::declval()).*(std::declval()))); - - template - inline SPROUT_CONSTEXPR decltype(R((std::declval().*(std::declval()))(std::declval()...))) - invoke(T Base::*, Derived&&, Args&&...) SPROUT_NOEXCEPT_IF_EXPR(R((std::declval().*(std::declval()))(std::declval()...))); - - template - inline SPROUT_CONSTEXPR decltype(R(((*std::declval()).*(std::declval()))(std::declval()...))) - invoke(PMF&&, Pointer&&, Args&&...) SPROUT_NOEXCEPT_IF_EXPR(R(((*std::declval()).*(std::declval()))(std::declval()...))); - } // namespace detail - - namespace detail { - template - struct invoke_result - : public sprout::detail::nil_base - {}; - template - struct invoke_result(), std::declval()...))>::type, F, Args...> - : public sprout::identity(), std::declval()...))> - {}; - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_DETAIL_INVOKE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/detail/type_traits_wrapper.hpp b/dsp/lib/sprout/sprout/type_traits/detail/type_traits_wrapper.hpp deleted file mode 100644 index 6d499e3..0000000 --- a/dsp/lib/sprout/sprout/type_traits/detail/type_traits_wrapper.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_DETAIL_TYPE_TRAITS_WRAPPER_HPP -#define SPROUT_TYPE_TRAITS_DETAIL_TYPE_TRAITS_WRAPPER_HPP - -#include -#include -#include - -namespace sprout { - namespace detail { - // - // type_traits_wrapper - // - template - struct type_traits_wrapper - : public sprout::integral_constant - {}; - } // namespace detail -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_DETAIL_TYPE_TRAITS_WRAPPER_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/disjunction.hpp b/dsp/lib/sprout/sprout/type_traits/disjunction.hpp deleted file mode 100644 index 444fa5d..0000000 --- a/dsp/lib/sprout/sprout/type_traits/disjunction.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_DISJUNCTION_HPP -#define SPROUT_TYPE_TRAITS_DISJUNCTION_HPP - -#include -#include - -namespace sprout { - // - // disjunction - // - template - struct disjunction - : public sprout::tpp::any_of - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool disjunction_v = sprout::disjunction::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_DISJUNCTION_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/dont_care.hpp b/dsp/lib/sprout/sprout/type_traits/dont_care.hpp deleted file mode 100644 index 0aa26c5..0000000 --- a/dsp/lib/sprout/sprout/type_traits/dont_care.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_DONT_CARE_HPP -#define SPROUT_TYPE_TRAITS_DONT_CARE_HPP - -#include - -namespace sprout { - // - // dont_care - // - struct dont_care {}; -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_DONT_CARE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/enable_if.hpp b/dsp/lib/sprout/sprout/type_traits/enable_if.hpp deleted file mode 100644 index 7f27547..0000000 --- a/dsp/lib/sprout/sprout/type_traits/enable_if.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_ENABLE_IF_HPP -#define SPROUT_TYPE_TRAITS_ENABLE_IF_HPP - -#include -#include -#include - -namespace sprout { - // - // enable_if - // - using std::enable_if; - - // - // disable_if - // - template - struct disable_if - : public sprout::enable_if - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using enable_if_t = typename sprout::enable_if::type; - - template - using disable_if_t = typename sprout::disable_if::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_ENABLE_IF_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/enable_if_has_type.hpp b/dsp/lib/sprout/sprout/type_traits/enable_if_has_type.hpp deleted file mode 100644 index 4aa817f..0000000 --- a/dsp/lib/sprout/sprout/type_traits/enable_if_has_type.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_ENABLE_IF_HAS_TYPE_HPP -#define SPROUT_TYPE_TRAITS_ENABLE_IF_HAS_TYPE_HPP - -#include - -namespace sprout { - // - // enable_if_has_type - // - template - struct enable_if_has_type { - public: - typedef R type; - }; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using enable_if_has_type_t = typename sprout::enable_if_has_type::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_ENABLE_IF_HAS_TYPE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/enabler_if.hpp b/dsp/lib/sprout/sprout/type_traits/enabler_if.hpp deleted file mode 100644 index 7b71523..0000000 --- a/dsp/lib/sprout/sprout/type_traits/enabler_if.hpp +++ /dev/null @@ -1,55 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_ENABLER_IF_HPP -#define SPROUT_TYPE_TRAITS_ENABLER_IF_HPP - -#include -#include - -namespace sprout { - // - // enabler_t - // enabler - // - typedef void* enabler_t; -#if defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) - namespace { - SPROUT_STATIC_CONSTEXPR sprout::enabler_t enabler = {}; - } // anonymous-namespace -#else - extern enabler_t enabler; -#endif - - // - // enabler_if - // - template - class enabler_if -#if defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) - : public std::enable_if -#else - : public std::enable_if -#endif - {}; - // - // disabler_if - // - template - struct disabler_if - : public sprout::enabler_if - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using enabler_if_t = typename sprout::enabler_if::type; - template - using disabler_if_t = typename sprout::disabler_if::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_ENABLER_IF_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/extent.hpp b/dsp/lib/sprout/sprout/type_traits/extent.hpp deleted file mode 100644 index 0c013ed..0000000 --- a/dsp/lib/sprout/sprout/type_traits/extent.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_EXTENT_HPP -#define SPROUT_TYPE_TRAITS_EXTENT_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // extent - // - template - struct extent - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR std::size_t extent_v = sprout::extent::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_EXTENT_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/float_promote.hpp b/dsp/lib/sprout/sprout/type_traits/float_promote.hpp deleted file mode 100644 index d43aa44..0000000 --- a/dsp/lib/sprout/sprout/type_traits/float_promote.hpp +++ /dev/null @@ -1,80 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_FLOAT_PROMOTE_HPP -#define SPROUT_TYPE_TRAITS_FLOAT_PROMOTE_HPP - -#include -#include -#include - -namespace sprout { - namespace detail { - template - struct float_promote1 - : public std::conditional< - std::is_floating_point::value, - T, - double - > - { - static_assert( - std::is_arithmetic::value, - "float_promote requires arithmetic type." - ); - }; - - template - struct float_promote2 - : public std::conditional< - (std::is_same::value || std::is_same::value), - long double, - typename std::conditional< - (std::is_same::value && std::is_same::value), - float, - double - >::type - > - { - static_assert( - std::is_arithmetic::value && std::is_arithmetic::value, - "float_promote requires arithmetic type." - ); - }; - - template - struct float_promote_impl; - template - struct float_promote_impl - : public sprout::detail::float_promote_impl< - typename sprout::detail::float_promote2::type, - Tail... - > - {}; - template - struct float_promote_impl - : public sprout::detail::float_promote1 - {}; - } // namespace detail - - // - // float_promote - // - template - struct float_promote - : public sprout::detail::float_promote_impl< - typename std::remove_cv::type... - > - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using float_promote_t = typename sprout::float_promote::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_FLOAT_PROMOTE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_address_of.hpp b/dsp/lib/sprout/sprout/type_traits/has_address_of.hpp deleted file mode 100644 index a2b5e0f..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_address_of.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_ADDRESS_OF_HPP -#define SPROUT_TYPE_TRAITS_HAS_ADDRESS_OF_HPP - -#include -#include -#include - -namespace sprout { - // - // has_address_of - // - SPROUT_DETAIL_HAS_PRE_UNARY_OP_DECL(address_of, &); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_address_of_v = sprout::has_address_of::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_ADDRESS_OF_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_arithmetic_operator.hpp b/dsp/lib/sprout/sprout/type_traits/has_arithmetic_operator.hpp deleted file mode 100644 index 0618fbe..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_arithmetic_operator.hpp +++ /dev/null @@ -1,22 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_ARITHMETIC_OPERATOR_HPP -#define SPROUT_TYPE_TRAITS_HAS_ARITHMETIC_OPERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_ARITHMETIC_OPERATOR_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_assign.hpp b/dsp/lib/sprout/sprout/type_traits/has_assign.hpp deleted file mode 100644 index 7f89f57..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_assign.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_ASSIGN_HPP -#define SPROUT_TYPE_TRAITS_HAS_ASSIGN_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // has_assign - // - SPROUT_DETAIL_HAS_BINARY_OP_DECL(assign, =, = typename sprout::const_reference::type); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template::type, typename R = sprout::dont_care> - SPROUT_STATIC_CONSTEXPR bool has_assign_v = sprout::has_assign::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_assignment_operator.hpp b/dsp/lib/sprout/sprout/type_traits/has_assignment_operator.hpp deleted file mode 100644 index 0ad6fea..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_assignment_operator.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_ASSIGNMENT_OPERATOR_HPP -#define SPROUT_TYPE_TRAITS_HAS_ASSIGNMENT_OPERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_ASSIGNMENT_OPERATOR_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_bit_and.hpp b/dsp/lib/sprout/sprout/type_traits/has_bit_and.hpp deleted file mode 100644 index 37daffc..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_bit_and.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_BIT_AND_HPP -#define SPROUT_TYPE_TRAITS_HAS_BIT_AND_HPP - -#include -#include -#include - -namespace sprout { - // - // has_bit_and - // - SPROUT_DETAIL_HAS_BINARY_OP_DECL(bit_and, &, = T); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_bit_and_v = sprout::has_bit_and::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_BIT_AND_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_bit_and_assign.hpp b/dsp/lib/sprout/sprout/type_traits/has_bit_and_assign.hpp deleted file mode 100644 index 5647482..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_bit_and_assign.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_BIT_AND_ASSIGN_HPP -#define SPROUT_TYPE_TRAITS_HAS_BIT_AND_ASSIGN_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // has_bit_and_assign - // - SPROUT_DETAIL_HAS_BINARY_OP_DECL(bit_and_assign, =, = typename sprout::const_reference::type); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template::type, typename R = sprout::dont_care> - SPROUT_STATIC_CONSTEXPR bool has_bit_and_assign_v = sprout::has_bit_and_assign::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_BIT_AND_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_bit_not.hpp b/dsp/lib/sprout/sprout/type_traits/has_bit_not.hpp deleted file mode 100644 index 2c05033..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_bit_not.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_BIT_NOT_HPP -#define SPROUT_TYPE_TRAITS_HAS_BIT_NOT_HPP - -#include -#include -#include - -namespace sprout { - // - // has_bit_not - // - SPROUT_DETAIL_HAS_PRE_UNARY_OP_DECL(bit_not, ~); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_bit_not_v = sprout::has_bit_not::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_BIT_NOT_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_bit_or.hpp b/dsp/lib/sprout/sprout/type_traits/has_bit_or.hpp deleted file mode 100644 index ee50f02..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_bit_or.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_BIT_OR_HPP -#define SPROUT_TYPE_TRAITS_HAS_BIT_OR_HPP - -#include -#include -#include - -namespace sprout { - // - // has_bit_or - // - SPROUT_DETAIL_HAS_BINARY_OP_DECL(bit_or, |, = T); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_bit_or_v = sprout::has_bit_or::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_BIT_OR_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_bit_or_assign.hpp b/dsp/lib/sprout/sprout/type_traits/has_bit_or_assign.hpp deleted file mode 100644 index 88a52c0..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_bit_or_assign.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_BIT_OR_ASSIGN_HPP -#define SPROUT_TYPE_TRAITS_HAS_BIT_OR_ASSIGN_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // has_bit_or_assign - // - SPROUT_DETAIL_HAS_BINARY_OP_DECL(bit_or_assign, =, = typename sprout::const_reference::type); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template::type, typename R = sprout::dont_care> - SPROUT_STATIC_CONSTEXPR bool has_bit_or_assign_v = sprout::has_bit_or_assign::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_BIT_OR_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_bit_xor.hpp b/dsp/lib/sprout/sprout/type_traits/has_bit_xor.hpp deleted file mode 100644 index f64e422..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_bit_xor.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_BIT_XOR_HPP -#define SPROUT_TYPE_TRAITS_HAS_BIT_XOR_HPP - -#include -#include -#include - -namespace sprout { - // - // has_bit_xor - // - SPROUT_DETAIL_HAS_BINARY_OP_DECL(bit_xor, ^, = T); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_bit_xor_v = sprout::has_bit_xor::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_BIT_XOR_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_bit_xor_assign.hpp b/dsp/lib/sprout/sprout/type_traits/has_bit_xor_assign.hpp deleted file mode 100644 index a04389c..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_bit_xor_assign.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_BIT_XOR_ASSIGN_HPP -#define SPROUT_TYPE_TRAITS_HAS_BIT_XOR_ASSIGN_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // has_bit_xor_assign - // - SPROUT_DETAIL_HAS_BINARY_OP_DECL(bit_xor_assign, =, = typename sprout::const_reference::type); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template::type, typename R = sprout::dont_care> - SPROUT_STATIC_CONSTEXPR bool has_bit_xor_assign_v = sprout::has_bit_xor_assign::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_BIT_XOR_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_bitwise_operator.hpp b/dsp/lib/sprout/sprout/type_traits/has_bitwise_operator.hpp deleted file mode 100644 index 4a6adcc..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_bitwise_operator.hpp +++ /dev/null @@ -1,22 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_BITWAISE_OPERATOR_HPP -#define SPROUT_TYPE_TRAITS_HAS_BITWAISE_OPERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_BITWAISE_OPERATOR_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_comma.hpp b/dsp/lib/sprout/sprout/type_traits/has_comma.hpp deleted file mode 100644 index c0c3fcb..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_comma.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_PLUS_HPP -#define SPROUT_TYPE_TRAITS_HAS_PLUS_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // has_comma - // - SPROUT_DETAIL_HAS_BINARY_OP_DECL(comma, SPROUT_PP_COMMA(), = T); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_comma_v = sprout::has_comma::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_PLUS_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_comparison_operator.hpp b/dsp/lib/sprout/sprout/type_traits/has_comparison_operator.hpp deleted file mode 100644 index ec0f35e..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_comparison_operator.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_COMPARISON_OPERATOR_HPP -#define SPROUT_TYPE_TRAITS_HAS_COMPARISON_OPERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_COMPARISON_OPERATOR_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_complement.hpp b/dsp/lib/sprout/sprout/type_traits/has_complement.hpp deleted file mode 100644 index fafb33a..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_complement.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_COMPLEMENT_HPP -#define SPROUT_TYPE_TRAITS_HAS_COMPLEMENT_HPP - -#include -#include -#include - -namespace sprout { - // - // has_complement - // - template - struct has_complement - : public sprout::has_bit_not - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_complement_v = sprout::has_complement::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_COMPLEMENT_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_dereference.hpp b/dsp/lib/sprout/sprout/type_traits/has_dereference.hpp deleted file mode 100644 index fe57bd6..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_dereference.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_DEREFERENCE_HPP -#define SPROUT_TYPE_TRAITS_HAS_DEREFERENCE_HPP - -#include -#include -#include - -namespace sprout { - // - // has_dereference - // - SPROUT_DETAIL_HAS_PRE_UNARY_OP_DECL(dereference, *); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_dereference_v = sprout::has_dereference::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_DEREFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_divides.hpp b/dsp/lib/sprout/sprout/type_traits/has_divides.hpp deleted file mode 100644 index e2ab7b5..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_divides.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_DIVIDES_HPP -#define SPROUT_TYPE_TRAITS_HAS_DIVIDES_HPP - -#include -#include -#include - -namespace sprout { - // - // has_divides - // - SPROUT_DETAIL_HAS_BINARY_OP_DECL(divides, /, = T); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_divides_v = sprout::has_divides::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_DIVIDES_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_divides_assign.hpp b/dsp/lib/sprout/sprout/type_traits/has_divides_assign.hpp deleted file mode 100644 index 087265d..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_divides_assign.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_DIVIDES_ASSIGN_HPP -#define SPROUT_TYPE_TRAITS_HAS_DIVIDES_ASSIGN_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // has_divides_assign - // - SPROUT_DETAIL_HAS_BINARY_OP_DECL(divides_assign, /=, = typename sprout::const_reference::type); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template::type, typename R = sprout::dont_care> - SPROUT_STATIC_CONSTEXPR bool has_divides_assign_v = sprout::has_divides_assign::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_DIVIDES_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_equal_to.hpp b/dsp/lib/sprout/sprout/type_traits/has_equal_to.hpp deleted file mode 100644 index 75157ec..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_equal_to.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_EQUAL_TO_HPP -#define SPROUT_TYPE_TRAITS_HAS_EQUAL_TO_HPP - -#include -#include -#include - -namespace sprout { - // - // has_equal_to - // - SPROUT_DETAIL_HAS_BINARY_OP_DECL(equal_to, ==, = T); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_equal_to_v = sprout::has_equal_to::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_EQUAL_TO_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_greater.hpp b/dsp/lib/sprout/sprout/type_traits/has_greater.hpp deleted file mode 100644 index 96e8fe0..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_greater.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_GREATER_HPP -#define SPROUT_TYPE_TRAITS_HAS_GREATER_HPP - -#include -#include -#include - -namespace sprout { - // - // has_greater - // - SPROUT_DETAIL_HAS_BINARY_OP_DECL(greater, >, = T); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_greater_v = sprout::has_greater::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_GREATER_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_greater_equal.hpp b/dsp/lib/sprout/sprout/type_traits/has_greater_equal.hpp deleted file mode 100644 index ec5a584..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_greater_equal.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_GREATER_EQUAL_HPP -#define SPROUT_TYPE_TRAITS_HAS_GREATER_EQUAL_HPP - -#include -#include -#include - -namespace sprout { - // - // has_greater_equal - // - SPROUT_DETAIL_HAS_BINARY_OP_DECL(greater_equal, >=, = T); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_greater_equal_v = sprout::has_greater_equal::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_GREATER_EQUAL_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_inc_dec_operator.hpp b/dsp/lib/sprout/sprout/type_traits/has_inc_dec_operator.hpp deleted file mode 100644 index 60b3eb1..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_inc_dec_operator.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_INC_DEC_OPERATOR_HPP -#define SPROUT_TYPE_TRAITS_HAS_INC_DEC_OPERATOR_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_INC_DEC_OPERATOR_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_left_shift.hpp b/dsp/lib/sprout/sprout/type_traits/has_left_shift.hpp deleted file mode 100644 index dd6c997..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_left_shift.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_LEFT_SHIFT_HPP -#define SPROUT_TYPE_TRAITS_HAS_LEFT_SHIFT_HPP - -#include -#include -#include - -namespace sprout { - // - // has_left_shift - // - template - struct has_left_shift - : public sprout::has_shift_left - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_left_shift_v = sprout::has_left_shift::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_LEFT_SHIFT_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_left_shift_assign.hpp b/dsp/lib/sprout/sprout/type_traits/has_left_shift_assign.hpp deleted file mode 100644 index 43c5b7f..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_left_shift_assign.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_SHIFT_LEFT_ASSIGN_HPP -#define SPROUT_TYPE_TRAITS_HAS_SHIFT_LEFT_ASSIGN_HPP - -#include -#include -#include - -namespace sprout { - // - // has_left_shift_assign - // - template::type, typename R = sprout::dont_care> - struct has_left_shift_assign - : public sprout::has_shift_left - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template::type, typename R = sprout::dont_care> - SPROUT_STATIC_CONSTEXPR bool has_left_shift_assign_v = sprout::has_left_shift_assign::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_SHIFT_LEFT_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_less.hpp b/dsp/lib/sprout/sprout/type_traits/has_less.hpp deleted file mode 100644 index db5c021..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_less.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_LESS_HPP -#define SPROUT_TYPE_TRAITS_HAS_LESS_HPP - -#include -#include -#include - -namespace sprout { - // - // has_less - // - SPROUT_DETAIL_HAS_BINARY_OP_DECL(less, <, = T); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_less_v = sprout::has_less::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_LESS_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_less_equal.hpp b/dsp/lib/sprout/sprout/type_traits/has_less_equal.hpp deleted file mode 100644 index 27c9958..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_less_equal.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_LESS_EQUAL_HPP -#define SPROUT_TYPE_TRAITS_HAS_LESS_EQUAL_HPP - -#include -#include -#include - -namespace sprout { - // - // has_less_equal - // - SPROUT_DETAIL_HAS_BINARY_OP_DECL(less_equal, <=, = T); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_less_equal_v = sprout::has_less_equal::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_LESS_EQUAL_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_logical_and.hpp b/dsp/lib/sprout/sprout/type_traits/has_logical_and.hpp deleted file mode 100644 index 57811b6..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_logical_and.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_LOGICAL_AND_HPP -#define SPROUT_TYPE_TRAITS_HAS_LOGICAL_AND_HPP - -#include -#include -#include - -namespace sprout { - // - // has_logical_and - // - SPROUT_DETAIL_HAS_BINARY_OP_DECL(logical_and, &&, = T); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_logical_and_v = sprout::has_logical_and::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_LOGICAL_AND_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_logical_not.hpp b/dsp/lib/sprout/sprout/type_traits/has_logical_not.hpp deleted file mode 100644 index 0fad83c..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_logical_not.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_LOGICAL_NOT_HPP -#define SPROUT_TYPE_TRAITS_HAS_LOGICAL_NOT_HPP - -#include -#include -#include - -namespace sprout { - // - // has_logical_not - // - SPROUT_DETAIL_HAS_PRE_UNARY_OP_DECL(logical_not, !); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_logical_not_v = sprout::has_logical_not::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_LOGICAL_NOT_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_logical_operator.hpp b/dsp/lib/sprout/sprout/type_traits/has_logical_operator.hpp deleted file mode 100644 index 1bce929..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_logical_operator.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_LOGICAL_OPERATOR_HPP -#define SPROUT_TYPE_TRAITS_HAS_LOGICAL_OPERATOR_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_LOGICAL_OPERATOR_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_logical_or.hpp b/dsp/lib/sprout/sprout/type_traits/has_logical_or.hpp deleted file mode 100644 index bd497fd..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_logical_or.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_LOGICAL_OR_HPP -#define SPROUT_TYPE_TRAITS_HAS_LOGICAL_OR_HPP - -#include -#include -#include - -namespace sprout { - // - // has_logical_or - // - SPROUT_DETAIL_HAS_BINARY_OP_DECL(logical_or, ||, = T); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_logical_or_v = sprout::has_logical_or::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_LOGICAL_OR_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_member.hpp b/dsp/lib/sprout/sprout/type_traits/has_member.hpp deleted file mode 100644 index b567110..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_member.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_MEMBER_HPP -#define SPROUT_TYPE_TRAITS_HAS_MEMBER_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // has_member - // - SPROUT_DETAIL_HAS_BINARY_OP_DECL(member, .*, SPROUT_PP_EMPTY()); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_member_v = sprout::has_member::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_MEMBER_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_member_pointer.hpp b/dsp/lib/sprout/sprout/type_traits/has_member_pointer.hpp deleted file mode 100644 index f54ee59..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_member_pointer.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_MEMBER_POINTER_HPP -#define SPROUT_TYPE_TRAITS_HAS_MEMBER_POINTER_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // has_member_pointer - // - SPROUT_DETAIL_HAS_BINARY_OP_DECL(member_pointer, ->*, SPROUT_PP_EMPTY()); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_member_pointer_v = sprout::has_member_pointer::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_MEMBER_POINTER_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_members_operator.hpp b/dsp/lib/sprout/sprout/type_traits/has_members_operator.hpp deleted file mode 100644 index 610fe0e..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_members_operator.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_MEMBERS_OPERATOR_HPP -#define SPROUT_TYPE_TRAITS_HAS_MEMBERS_OPERATOR_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_MEMBERS_OPERATOR_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_minus.hpp b/dsp/lib/sprout/sprout/type_traits/has_minus.hpp deleted file mode 100644 index 2389e1d..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_minus.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_MINUS_HPP -#define SPROUT_TYPE_TRAITS_HAS_MINUS_HPP - -#include -#include -#include - -namespace sprout { - // - // has_minus - // - SPROUT_DETAIL_HAS_BINARY_OP_DECL(minus, -, = T); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_minus_v = sprout::has_minus::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_MINUS_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_minus_assign.hpp b/dsp/lib/sprout/sprout/type_traits/has_minus_assign.hpp deleted file mode 100644 index fc9cbcf..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_minus_assign.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_MINUS_ASSIGN_HPP -#define SPROUT_TYPE_TRAITS_HAS_MINUS_ASSIGN_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // has_minus_assign - // - SPROUT_DETAIL_HAS_BINARY_OP_DECL(minus_assign, -=, = typename sprout::const_reference::type); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template::type, typename R = sprout::dont_care> - SPROUT_STATIC_CONSTEXPR bool has_minus_assign_v = sprout::has_minus_assign::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_MINUS_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_modulus.hpp b/dsp/lib/sprout/sprout/type_traits/has_modulus.hpp deleted file mode 100644 index 7431bd2..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_modulus.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_MODULUS_HPP -#define SPROUT_TYPE_TRAITS_HAS_MODULUS_HPP - -#include -#include -#include - -namespace sprout { - // - // has_modulus - // - SPROUT_DETAIL_HAS_BINARY_OP_DECL(modulus, %, = T); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_modulus_v = sprout::has_modulus::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_MODULUS_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_modulus_assign.hpp b/dsp/lib/sprout/sprout/type_traits/has_modulus_assign.hpp deleted file mode 100644 index 32c80e4..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_modulus_assign.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_MODULUS_ASSIGN_HPP -#define SPROUT_TYPE_TRAITS_HAS_MODULUS_ASSIGN_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // has_modulus_assign - // - SPROUT_DETAIL_HAS_BINARY_OP_DECL(modulus_assign, %=, = typename sprout::const_reference::type); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template::type, typename R = sprout::dont_care> - SPROUT_STATIC_CONSTEXPR bool has_modulus_assign_v = sprout::has_modulus_assign::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_MODULUS_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_multiplies.hpp b/dsp/lib/sprout/sprout/type_traits/has_multiplies.hpp deleted file mode 100644 index 31f319c..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_multiplies.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_MULTIPLIES_HPP -#define SPROUT_TYPE_TRAITS_HAS_MULTIPLIES_HPP - -#include -#include -#include - -namespace sprout { - // - // has_multiplies - // - SPROUT_DETAIL_HAS_BINARY_OP_DECL(multiplies, *, = T); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_multiplies_v = sprout::has_multiplies::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_MULTIPLIES_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_multiplies_assign.hpp b/dsp/lib/sprout/sprout/type_traits/has_multiplies_assign.hpp deleted file mode 100644 index e1de521..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_multiplies_assign.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_MULTIPLIES_ASSIGN_HPP -#define SPROUT_TYPE_TRAITS_HAS_MULTIPLIES_ASSIGN_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // has_multiplies_assign - // - SPROUT_DETAIL_HAS_BINARY_OP_DECL(multiplies_assign, *=, = typename sprout::const_reference::type); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template::type, typename R = sprout::dont_care> - SPROUT_STATIC_CONSTEXPR bool has_multiplies_assign_v = sprout::has_multiplies_assign::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_MULTIPLIES_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_negate.hpp b/dsp/lib/sprout/sprout/type_traits/has_negate.hpp deleted file mode 100644 index 4aefedf..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_negate.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_NEGATE_HPP -#define SPROUT_TYPE_TRAITS_HAS_NEGATE_HPP - -#include -#include -#include - -namespace sprout { - // - // has_negate - // - SPROUT_DETAIL_HAS_PRE_UNARY_OP_DECL(negate, -); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_negate_v = sprout::has_negate::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_NEGATE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_not_equal_to.hpp b/dsp/lib/sprout/sprout/type_traits/has_not_equal_to.hpp deleted file mode 100644 index 2b14edf..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_not_equal_to.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_NOT_EQUAL_TO_HPP -#define SPROUT_TYPE_TRAITS_HAS_NOT_EQUAL_TO_HPP - -#include -#include -#include - -namespace sprout { - // - // has_not_equal_to - // - SPROUT_DETAIL_HAS_BINARY_OP_DECL(not_equal_to, !=, = T); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_not_equal_to_v = sprout::has_not_equal_to::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_NOT_EQUAL_TO_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_operator.hpp b/dsp/lib/sprout/sprout/type_traits/has_operator.hpp deleted file mode 100644 index 8627d89..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_operator.hpp +++ /dev/null @@ -1,22 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_OPERATOR_HPP -#define SPROUT_TYPE_TRAITS_HAS_OPERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_OPERATOR_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_plus.hpp b/dsp/lib/sprout/sprout/type_traits/has_plus.hpp deleted file mode 100644 index 6b8d258..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_plus.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_PLUS_HPP -#define SPROUT_TYPE_TRAITS_HAS_PLUS_HPP - -#include -#include -#include - -namespace sprout { - // - // has_plus - // - SPROUT_DETAIL_HAS_BINARY_OP_DECL(plus, +, = T); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_plus_v = sprout::has_plus::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_PLUS_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_plus_assign.hpp b/dsp/lib/sprout/sprout/type_traits/has_plus_assign.hpp deleted file mode 100644 index 8c0e77d..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_plus_assign.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_PLUS_ASSIGN_HPP -#define SPROUT_TYPE_TRAITS_HAS_PLUS_ASSIGN_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // has_plus_assign - // - SPROUT_DETAIL_HAS_BINARY_OP_DECL(plus_assign, +=, = typename sprout::const_reference::type); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template::type, typename R = sprout::dont_care> - SPROUT_STATIC_CONSTEXPR bool has_plus_assign_v = sprout::has_plus_assign::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_PLUS_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_posite.hpp b/dsp/lib/sprout/sprout/type_traits/has_posite.hpp deleted file mode 100644 index fcf92b7..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_posite.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_POSITE_HPP -#define SPROUT_TYPE_TRAITS_HAS_POSITE_HPP - -#include -#include -#include - -namespace sprout { - // - // has_posite - // - SPROUT_DETAIL_HAS_PRE_UNARY_OP_DECL(posite, +); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_posite_v = sprout::has_posite::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_POSITE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_post_decrement.hpp b/dsp/lib/sprout/sprout/type_traits/has_post_decrement.hpp deleted file mode 100644 index c65e132..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_post_decrement.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_POST_DECREMENT_HPP -#define SPROUT_TYPE_TRAITS_HAS_POST_DECREMENT_HPP - -#include -#include -#include - -namespace sprout { - // - // has_post_decrement - // - SPROUT_DETAIL_HAS_PRE_UNARY_OP_DECL(post_decrement, --); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_post_decrement_v = sprout::has_post_decrement::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_POST_DECREMENT_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_post_increment.hpp b/dsp/lib/sprout/sprout/type_traits/has_post_increment.hpp deleted file mode 100644 index 567d274..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_post_increment.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_POST_INCREMENT_HPP -#define SPROUT_TYPE_TRAITS_HAS_POST_INCREMENT_HPP - -#include -#include -#include - -namespace sprout { - // - // has_post_increment - // - SPROUT_DETAIL_HAS_POST_UNARY_OP_DECL(post_increment, ++); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_post_increment_v = sprout::has_post_increment::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_POST_INCREMENT_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_pre_decrement.hpp b/dsp/lib/sprout/sprout/type_traits/has_pre_decrement.hpp deleted file mode 100644 index f0b7075..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_pre_decrement.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_PRE_DECREMENT_HPP -#define SPROUT_TYPE_TRAITS_HAS_PRE_DECREMENT_HPP - -#include -#include -#include - -namespace sprout { - // - // has_pre_decrement - // - SPROUT_DETAIL_HAS_PRE_UNARY_OP_DECL(pre_decrement, ++); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_pre_decrement_v = sprout::has_pre_decrement::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_PRE_DECREMENT_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_pre_increment.hpp b/dsp/lib/sprout/sprout/type_traits/has_pre_increment.hpp deleted file mode 100644 index 669030a..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_pre_increment.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_PRE_INCREMENT_HPP -#define SPROUT_TYPE_TRAITS_HAS_PRE_INCREMENT_HPP - -#include -#include -#include - -namespace sprout { - // - // has_pre_increment - // - SPROUT_DETAIL_HAS_PRE_UNARY_OP_DECL(pre_increment, --); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_pre_increment_v = sprout::has_pre_increment::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_PRE_INCREMENT_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_reference_operator.hpp b/dsp/lib/sprout/sprout/type_traits/has_reference_operator.hpp deleted file mode 100644 index b7d64d1..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_reference_operator.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_REFERENCE_OPERATOR_HPP -#define SPROUT_TYPE_TRAITS_HAS_REFERENCE_OPERATOR_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_REFERENCE_OPERATOR_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_right_shift.hpp b/dsp/lib/sprout/sprout/type_traits/has_right_shift.hpp deleted file mode 100644 index 53d939d..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_right_shift.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_RIGHT_SHIFT_HPP -#define SPROUT_TYPE_TRAITS_HAS_RIGHT_SHIFT_HPP - -#include -#include -#include - -namespace sprout { - // - // has_right_shift - // - template - struct has_right_shift - : public sprout::has_shift_right - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_right_shift_v = sprout::has_right_shift::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_RIGHT_SHIFT_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_right_shift_assign.hpp b/dsp/lib/sprout/sprout/type_traits/has_right_shift_assign.hpp deleted file mode 100644 index 5c804c8..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_right_shift_assign.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_SHIFT_RIGHT_ASSIGN_HPP -#define SPROUT_TYPE_TRAITS_HAS_SHIFT_RIGHT_ASSIGN_HPP - -#include -#include -#include - -namespace sprout { - // - // has_right_shift_assign - // - template::type, typename R = sprout::dont_care> - struct has_right_shift_assign - : public sprout::has_shift_right - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template::type, typename R = sprout::dont_care> - SPROUT_STATIC_CONSTEXPR bool has_right_shift_assign_v = sprout::has_right_shift_assign::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_SHIFT_RIGHT_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_shift_left.hpp b/dsp/lib/sprout/sprout/type_traits/has_shift_left.hpp deleted file mode 100644 index fb101a4..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_shift_left.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_SHIFT_LEFT_HPP -#define SPROUT_TYPE_TRAITS_HAS_SHIFT_LEFT_HPP - -#include -#include -#include - -namespace sprout { - // - // has_shift_left - // - SPROUT_DETAIL_HAS_BINARY_OP_DECL(shift_left, <<, = T); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_shift_left_v = sprout::has_shift_left::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_SHIFT_LEFT_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_shift_left_assign.hpp b/dsp/lib/sprout/sprout/type_traits/has_shift_left_assign.hpp deleted file mode 100644 index 2bb686f..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_shift_left_assign.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_SHIFT_LEFT_HAS_ASSIGN_HPP -#define SPROUT_TYPE_TRAITS_SHIFT_LEFT_HAS_ASSIGN_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // has_shift_left_assign - // - SPROUT_DETAIL_HAS_BINARY_OP_DECL(shift_left_assign, <<=, = typename sprout::const_reference::type); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template::type, typename R = sprout::dont_care> - SPROUT_STATIC_CONSTEXPR bool has_shift_left_assign_v = sprout::has_shift_left_assign::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_SHIFT_LEFT_HAS_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_shift_right.hpp b/dsp/lib/sprout/sprout/type_traits/has_shift_right.hpp deleted file mode 100644 index 5570a33..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_shift_right.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_SHIFT_RIGHT_HPP -#define SPROUT_TYPE_TRAITS_HAS_SHIFT_RIGHT_HPP - -#include -#include -#include - -namespace sprout { - // - // has_shift_right - // - SPROUT_DETAIL_HAS_BINARY_OP_DECL(shift_right, >>, = T); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_shift_right_v = sprout::has_shift_right::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_SHIFT_RIGHT_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_shift_right_assign.hpp b/dsp/lib/sprout/sprout/type_traits/has_shift_right_assign.hpp deleted file mode 100644 index a50e45d..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_shift_right_assign.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_SHIFT_RIGHT_ASSIGN_HPP -#define SPROUT_TYPE_TRAITS_HAS_SHIFT_RIGHT_ASSIGN_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // has_shift_right_assign - // - SPROUT_DETAIL_HAS_BINARY_OP_DECL(shift_right_assign, >>=, = typename sprout::const_reference::type); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template::type, typename R = sprout::dont_care> - SPROUT_STATIC_CONSTEXPR bool has_shift_right_assign_v = sprout::has_shift_right_assign::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_SHIFT_RIGHT_ASSIGN_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_subscript.hpp b/dsp/lib/sprout/sprout/type_traits/has_subscript.hpp deleted file mode 100644 index 4bed281..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_subscript.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_SUBSCRIPT_HPP -#define SPROUT_TYPE_TRAITS_HAS_SUBSCRIPT_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // has_subscript - // - SPROUT_DETAIL_HAS_SUBSCRIPT_OP_DECL(subscript, [], = std::size_t); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_subscript_v = sprout::has_subscript::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_SUBSCRIPT_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_type.hpp b/dsp/lib/sprout/sprout/type_traits/has_type.hpp deleted file mode 100644 index d2c00e3..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_type.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_TYPE_HPP -#define SPROUT_TYPE_TRAITS_HAS_TYPE_HPP - -#include -#include - -namespace sprout { - // - // has_type - // - SPROUT_HAS_XXX_TYPE_DEF_LAZY(type); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_type_v = sprout::has_type::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_TYPE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_unary_minus.hpp b/dsp/lib/sprout/sprout/type_traits/has_unary_minus.hpp deleted file mode 100644 index d2e5a1f..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_unary_minus.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_UNARY_MINUS_HPP -#define SPROUT_TYPE_TRAITS_HAS_UNARY_MINUS_HPP - -#include -#include -#include - -namespace sprout { - // - // has_unary_minus - // - template - struct has_unary_minus - : public sprout::has_negate - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_unary_minus_v = sprout::has_unary_minus::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_UNARY_MINUS_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_unary_plus.hpp b/dsp/lib/sprout/sprout/type_traits/has_unary_plus.hpp deleted file mode 100644 index 98b03d9..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_unary_plus.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_UNARY_PLUS_HPP -#define SPROUT_TYPE_TRAITS_HAS_UNARY_PLUS_HPP - -#include -#include -#include - -namespace sprout { - // - // has_unary_plus - // - template - struct has_unary_plus - : public sprout::has_posite - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_unary_plus_v = sprout::has_unary_plus::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_UNARY_PLUS_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_unique_object_representations.hpp b/dsp/lib/sprout/sprout/type_traits/has_unique_object_representations.hpp deleted file mode 100644 index e473607..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_unique_object_representations.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_UNIQUE_OBJECT_REPRESENTATIONS_HPP -#define SPROUT_TYPE_TRAITS_HAS_UNIQUE_OBJECT_REPRESENTATIONS_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // has_unique_object_representations - // -#if SPROUT_CLANG_HAS_FUTURE(has_unique_object_representations) || SPROUT_GCC_OR_LATER(7, 0, 0) - template - struct has_unique_object_representations - : public sprout::bool_constant< - __has_unique_object_representations(typename sprout::remove_cv::type>::type) - > - {}; -#else // #if SPROUT_CLANG_HAS_FUTURE(has_unique_object_representations) || SPROUT_GCC_OR_LATER(7, 0, 0) - template - struct has_unique_object_representations - : public sprout::false_type - {}; -#endif // #if SPROUT_CLANG_HAS_FUTURE(has_unique_object_representations) || SPROUT_GCC_OR_LATER(7, 0, 0) - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_unique_object_representations_v = sprout::has_unique_object_representations::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_UNIQUE_OBJECT_REPRESENTATIONS_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_value.hpp b/dsp/lib/sprout/sprout/type_traits/has_value.hpp deleted file mode 100644 index ec0e90c..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_value.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_VALUE_HPP -#define SPROUT_TYPE_TRAITS_HAS_VALUE_HPP - -#include -#include - -namespace sprout { - // - // has_value - // - SPROUT_HAS_XXX_VALUE_DEF_LAZY(value); - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_value_v = sprout::has_value::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_VALUE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_various_operator.hpp b/dsp/lib/sprout/sprout/type_traits/has_various_operator.hpp deleted file mode 100644 index 857c79c..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_various_operator.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_VARIOUS_OPERATOR_HPP -#define SPROUT_TYPE_TRAITS_HAS_VARIOUS_OPERATOR_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_VARIOUS_OPERATOR_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_virtual_destructor.hpp b/dsp/lib/sprout/sprout/type_traits/has_virtual_destructor.hpp deleted file mode 100644 index ee1d008..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_virtual_destructor.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_VIRTUAL_DESTRUCTOR_HPP -#define SPROUT_TYPE_TRAITS_HAS_VIRTUAL_DESTRUCTOR_HPP - -#include -#include -#include - -namespace sprout { - // - // has_virtual_destructor - // - template - struct has_virtual_destructor - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool has_virtual_destructor_v = sprout::has_virtual_destructor::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_VIRTUAL_DESTRUCTOR_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/has_xxx.hpp b/dsp/lib/sprout/sprout/type_traits/has_xxx.hpp deleted file mode 100644 index 2c32faa..0000000 --- a/dsp/lib/sprout/sprout/type_traits/has_xxx.hpp +++ /dev/null @@ -1,136 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_HAS_XXX_HPP -#define SPROUT_TYPE_TRAITS_HAS_XXX_HPP - -#include -#include -#include -#include -#include -#include - -#define SPROUT_HAS_XXX_DETAIL_NAME_GEN(PREFIX, ELEM, NAME, NUM) \ - SPROUT_PP_CAT(SPROUT_PP_CAT(SPROUT_PP_CAT(PREFIX, ELEM), NAME), NUM) - -// -// SPROUT_HAS_XXX_TYPE_DEF -// SPROUT_HAS_XXX_TYPE_DEF_LAZY -// -#if defined(_MSC_VER) && (_MSC_VER > 1900) -#define SPROUT_HAS_XXX_TYPE_DEF_IMPL(NAME, TYPE, NUM) \ - template \ - sprout::true_type SPROUT_HAS_XXX_DETAIL_NAME_GEN(sprout_has_xxx_impl_check_type_, TYPE, NAME, NUM)(int); \ - template \ - sprout::false_type SPROUT_HAS_XXX_DETAIL_NAME_GEN(sprout_has_xxx_impl_check_type_, TYPE, NAME, NUM)(long); \ - template(0))> \ - struct NAME \ - : public Base_ \ - {} -#else -#define SPROUT_HAS_XXX_TYPE_DEF_IMPL(NAME, TYPE, NUM) \ - template \ - sprout::true_type SPROUT_HAS_XXX_DETAIL_NAME_GEN(sprout_has_xxx_impl_check_type_, TYPE, NAME, NUM)(int); \ - template \ - sprout::false_type SPROUT_HAS_XXX_DETAIL_NAME_GEN(sprout_has_xxx_impl_check_type_, TYPE, NAME, NUM)(long); \ - template \ - struct NAME \ - : public sprout::identity(0))>::type \ - {} -#endif -#define SPROUT_HAS_XXX_TYPE_DEF(NAME, TYPE) \ - SPROUT_HAS_XXX_TYPE_DEF_IMPL(NAME, TYPE, SPROUT_PP_SOME_NUMBER()) -#define SPROUT_HAS_XXX_TYPE_DEF_LAZY(TYPE) \ - SPROUT_HAS_XXX_TYPE_DEF(SPROUT_PP_CAT(has_, TYPE), TYPE) - -// -// SPROUT_HAS_XXX_VALUE_DEF -// SPROUT_HAS_XXX_VALUE_DEF_LAZY -// -#if defined(_MSC_VER) -#define SPROUT_HAS_XXX_VALUE_DEF_IMPL_HSD_OP(NAME, VALUE, NUM) \ - template \ - struct SPROUT_HAS_XXX_DETAIL_NAME_GEN(sprout_has_xxx_impl_check_value_hsd_op_, VALUE, NAME, NUM) { \ - private: \ - template \ - static sprout::detail::one_type check2(V*); \ - template \ - static sprout::detail::not_one_type check2(U); \ - private: \ - template \ - static typename std::enable_if< \ - sizeof(check2(&U::VALUE)) == sizeof(sprout::detail::one_type), \ - sprout::detail::one_type \ - >::type has_matching_member(int); \ - template \ - static sprout::detail::not_one_type has_matching_member(...); \ - private: \ - template \ - struct ttc_sd \ - : public sprout::bool_constant(0)) == sizeof(sprout::detail::one_type)> \ - {}; \ - public: \ - typedef typename ttc_sd::type type; \ - } -#define SPROUT_HAS_XXX_VALUE_DEF_IMPL(NAME, VALUE, NUM) \ - SPROUT_HAS_XXX_VALUE_DEF_IMPL_HSD_OP(NAME, VALUE, NUM); \ - template \ - struct NAME \ - : public std::conditional< \ - std::is_class::value, \ - SPROUT_HAS_XXX_DETAIL_NAME_GEN(sprout_has_xxx_impl_check_value_hsd_op_, VALUE, NAME, NUM), \ - sprout::false_type \ - >::type::type \ - {} -#else -#define SPROUT_HAS_XXX_VALUE_DEF_IMPL(NAME, VALUE, NUM) \ - template::type = &T::VALUE> \ - sprout::true_type SPROUT_HAS_XXX_DETAIL_NAME_GEN(sprout_has_xxx_impl_check_value_, VALUE, NAME, NUM)(int); \ - template \ - sprout::false_type SPROUT_HAS_XXX_DETAIL_NAME_GEN(sprout_has_xxx_impl_check_value_, VALUE, NAME, NUM)(long); \ - template \ - struct NAME \ - : public sprout::identity(0))>::type \ - {} -#endif -#define SPROUT_HAS_XXX_VALUE_DEF(NAME, VALUE) \ - SPROUT_HAS_XXX_VALUE_DEF_IMPL(NAME, VALUE, SPROUT_PP_SOME_NUMBER()) -#define SPROUT_HAS_XXX_VALUE_DEF_LAZY(VALUE) \ - SPROUT_HAS_XXX_VALUE_DEF(SPROUT_PP_CAT(has_, VALUE), VALUE) - -// -// SPROUT_HAS_XXX_TEMPLATE_DEF -// SPROUT_HAS_XXX_TEMPLATE_DEF_LAZY -// -#if defined(_MSC_VER) && (_MSC_VER > 1900) -#define SPROUT_HAS_XXX_TEMPLATE_DEF_IMPL(NAME, TEMPLATE, NUM) \ - template class = T::template TEMPLATE> \ - sprout::true_type SPROUT_HAS_XXX_DETAIL_NAME_GEN(sprout_has_xxx_impl_check_type_, TEMPLATE, NAME, NUM)(int); \ - template \ - sprout::false_type SPROUT_HAS_XXX_DETAIL_NAME_GEN(sprout_has_xxx_impl_check_type_, TEMPLATE, NAME, NUM)(long); \ - template(0))> \ - struct NAME \ - : public Base_ \ - {} -#else -#define SPROUT_HAS_XXX_TEMPLATE_DEF_IMPL(NAME, TEMPLATE, NUM) \ - template class = T::template TEMPLATE> \ - sprout::true_type SPROUT_HAS_XXX_DETAIL_NAME_GEN(sprout_has_xxx_impl_check_type_, TEMPLATE, NAME, NUM)(int); \ - template \ - sprout::false_type SPROUT_HAS_XXX_DETAIL_NAME_GEN(sprout_has_xxx_impl_check_type_, TEMPLATE, NAME, NUM)(long); \ - template \ - struct NAME \ - : public sprout::identity(0))>::type \ - {} -#endif -#define SPROUT_HAS_XXX_TEMPLATE_DEF(NAME, TEMPLATE) \ - SPROUT_HAS_XXX_TEMPLATE_DEF_IMPL(NAME, TEMPLATE, SPROUT_PP_SOME_NUMBER()) -#define SPROUT_HAS_XXX_TEMPLATE_DEF_LAZY(TEMPLATE) \ - SPROUT_HAS_XXX_TEMPLATE_DEF(SPROUT_PP_CAT(has_, TEMPLATE), TEMPLATE) - -#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_XXX_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/identity.hpp b/dsp/lib/sprout/sprout/type_traits/identity.hpp deleted file mode 100644 index 43d9a25..0000000 --- a/dsp/lib/sprout/sprout/type_traits/identity.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IDENTITY_HPP -#define SPROUT_TYPE_TRAITS_IDENTITY_HPP - -#include - -namespace sprout { - // - // identity - // - template - struct identity { - public: - typedef T type; - }; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using identity_t = typename sprout::identity::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IDENTITY_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/inherit_if_type.hpp b/dsp/lib/sprout/sprout/type_traits/inherit_if_type.hpp deleted file mode 100644 index c59707c..0000000 --- a/dsp/lib/sprout/sprout/type_traits/inherit_if_type.hpp +++ /dev/null @@ -1,21 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_INHERIT_IF_TYPE_HPP -#define SPROUT_TYPE_TRAITS_INHERIT_IF_TYPE_HPP - -#include -#include - -namespace sprout { - // - // inherit_if_type - // - SPROUT_INHERIT_IF_XXX_TYPE_DEF_LAZY(type); -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_INHERIT_IF_TYPE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/inherit_if_xxx.hpp b/dsp/lib/sprout/sprout/type_traits/inherit_if_xxx.hpp deleted file mode 100644 index e9eb571..0000000 --- a/dsp/lib/sprout/sprout/type_traits/inherit_if_xxx.hpp +++ /dev/null @@ -1,105 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_INHERIT_IF_XXX_HPP -#define SPROUT_TYPE_TRAITS_INHERIT_IF_XXX_HPP - -#include -#include -#include -#include -#include -#if defined(_MSC_VER) -# include -#endif - -// -// SPROUT_INHERIT_ALIAS_IF_XXX_TYPE_DEF -// SPROUT_INHERIT_ALIAS_IF_XXX_TYPE_DEF_LAZY -// -#define SPROUT_INHERIT_ALIAS_IF_XXX_TYPE_DEF_IMPL(NAME, ALIAS, TYPE, NUM) \ - SPROUT_HAS_XXX_TYPE_DEF(SPROUT_PP_CAT(SPROUT_PP_CAT(sprout_inherit_if_xxx_type_def_impl_has_, TYPE), NUM), TYPE); \ - template \ - struct NAME {}; \ - template \ - struct NAME< \ - T, \ - typename std::enable_if::value>::type \ - > { \ - public: \ - typedef typename T::TYPE ALIAS; \ - } -#define SPROUT_INHERIT_ALIAS_IF_XXX_TYPE_DEF(NAME, ALIAS, TYPE) \ - SPROUT_INHERIT_ALIAS_IF_XXX_TYPE_DEF_IMPL(NAME, ALIAS, TYPE, SPROUT_PP_SOME_NUMBER()) -#define SPROUT_INHERIT_ALIAS_IF_XXX_TYPE_DEF_LAZY(ALIAS, TYPE) \ - SPROUT_INHERIT_ALIAS_IF_XXX_TYPE_DEF(SPROUT_PP_CAT(SPROUT_PP_CAT(SPROUT_PP_CAT(inherit_, ALIAS), _if_), TYPE), ALIAS, TYPE) - -// -// SPROUT_INHERIT_IF_XXX_TYPE_DEF -// SPROUT_INHERIT_IF_XXX_TYPE_DEF_LAZY -// -#define SPROUT_INHERIT_IF_XXX_TYPE_DEF(NAME, TYPE) \ - SPROUT_INHERIT_ALIAS_IF_XXX_TYPE_DEF(NAME, TYPE, TYPE) -#define SPROUT_INHERIT_IF_XXX_TYPE_DEF_LAZY(TYPE) \ - SPROUT_INHERIT_IF_XXX_TYPE_DEF(SPROUT_PP_CAT(inherit_if_, TYPE), TYPE) - -// -// SPROUT_INHERIT_ALIAS_IF_XXX_CONSTANT_DEF -// SPROUT_INHERIT_ALIAS_IF_XXX_CONSTANT_DEF_LAZY -// -#if defined(_MSC_VER) -#define SPROUT_INHERIT_ALIAS_IF_XXX_CONSTANT_DEF_IMPL(NAME, ALIAS, CONSTANT, NUM) \ - SPROUT_HAS_XXX_VALUE_DEF(SPROUT_PP_CAT(SPROUT_PP_CAT(sprout_inherit_if_xxx_constant_def_impl_has_, CONSTANT), NUM), CONSTANT); \ - template \ - struct NAME {}; \ - template \ - struct NAME< \ - T, \ - typename std::enable_if::value>::type \ - > { \ - public: \ - SPROUT_STATIC_CONSTEXPR typename std::decay::type/*std::size_t*/ ALIAS = T::CONSTANT; \ - };/* \ - template \ - SPROUT_CONSTEXPR_OR_CONST std::size_t NAME< \ - T, \ - typename std::enable_if::value>::type \ - >::ALIAS !!! */ -#else -#define SPROUT_INHERIT_ALIAS_IF_XXX_CONSTANT_DEF_IMPL(NAME, ALIAS, CONSTANT, NUM) \ - SPROUT_HAS_XXX_VALUE_DEF(SPROUT_PP_CAT(SPROUT_PP_CAT(sprout_inherit_if_xxx_constant_def_impl_has_, CONSTANT), NUM), CONSTANT); \ - template \ - struct NAME {}; \ - template \ - struct NAME< \ - T, \ - typename std::enable_if::value>::type \ - > { \ - public: \ - SPROUT_STATIC_CONSTEXPR typename std::decay::type ALIAS = T::CONSTANT; \ - }; \ - template \ - SPROUT_CONSTEXPR_OR_CONST typename std::decay::type NAME< \ - T, \ - typename std::enable_if::value>::type \ - >::ALIAS -#endif -#define SPROUT_INHERIT_ALIAS_IF_XXX_CONSTANT_DEF(NAME, ALIAS, CONSTANT) \ - SPROUT_INHERIT_ALIAS_IF_XXX_CONSTANT_DEF_IMPL(NAME, ALIAS, CONSTANT, SPROUT_PP_SOME_NUMBER()) -#define SPROUT_INHERIT_ALIAS_IF_XXX_CONSTANT_DEF_LAZY(ALIAS, CONSTANT) \ - SPROUT_INHERIT_ALIAS_IF_XXX_CONSTANT_DEF(SPROUT_PP_CAT(SPROUT_PP_CAT(SPROUT_PP_CAT(inherit_, ALIAS), _if_), CONSTANT), ALIAS, CONSTANT) - -// -// SPROUT_INHERIT_IF_XXX_CONSTANT_DEF -// SPROUT_INHERIT_IF_XXX_CONSTANT_DEF_LAZY -// -#define SPROUT_INHERIT_IF_XXX_CONSTANT_DEF(NAME, CONSTANT) \ - SPROUT_INHERIT_ALIAS_IF_XXX_CONSTANT_DEF(NAME, CONSTANT, CONSTANT) -#define SPROUT_INHERIT_IF_XXX_CONSTANT_DEF_LAZY(CONSTANT) \ - SPROUT_INHERIT_IF_XXX_CONSTANT_DEF(SPROUT_PP_CAT(inherit_if_, CONSTANT), CONSTANT) - -#endif // #ifndef SPROUT_TYPE_TRAITS_INHERIT_IF_XXX_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/integral_constant.hpp b/dsp/lib/sprout/sprout/type_traits/integral_constant.hpp deleted file mode 100644 index 2124fc0..0000000 --- a/dsp/lib/sprout/sprout/type_traits/integral_constant.hpp +++ /dev/null @@ -1,69 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_INTEGRAL_CONSTANT_HPP -#define SPROUT_TYPE_TRAITS_INTEGRAL_CONSTANT_HPP - -#include -#include - -namespace sprout { - // - // integral_constant - // - template - struct integral_constant - : public std::integral_constant - { - public: - typedef typename std::integral_constant::value_type value_type; - typedef integral_constant type; - public: - SPROUT_STATIC_CONSTEXPR value_type value = V; - public: -#if defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) - SPROUT_CONSTEXPR integral_constant() SPROUT_NOEXCEPT {} - integral_constant(integral_constant const&) = default; -#endif - SPROUT_CONSTEXPR - operator value_type() const SPROUT_NOEXCEPT { - return std::integral_constant::value; - } - SPROUT_CONSTEXPR bool - operator!() const SPROUT_NOEXCEPT { - return !std::integral_constant::value; - } - SPROUT_CONSTEXPR value_type - operator()() const SPROUT_NOEXCEPT { - return std::integral_constant::value; - } - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::integral_constant::value_type sprout::integral_constant::value; - - // - // bool_constant - // -#if SPROUT_USE_TEMPLATE_ALIASES - template - using bool_constant = sprout::integral_constant; -#else // #if SPROUT_USE_TEMPLATE_ALIASES - template - struct bool_constant - : public sprout::integral_constant - {}; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - - // - // true_type - // false_type - // - typedef sprout::bool_constant true_type; - typedef sprout::bool_constant false_type; -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_INTEGRAL_CONSTANT_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/introspection.hpp b/dsp/lib/sprout/sprout/type_traits/introspection.hpp deleted file mode 100644 index 8a01701..0000000 --- a/dsp/lib/sprout/sprout/type_traits/introspection.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_INTROSPECTION_HPP -#define SPROUT_TYPE_TRAITS_INTROSPECTION_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_TRAITS_INTROSPECTION_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/invoke_result.hpp b/dsp/lib/sprout/sprout/type_traits/invoke_result.hpp deleted file mode 100644 index 3e263ab..0000000 --- a/dsp/lib/sprout/sprout/type_traits/invoke_result.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_INVOKE_RESULT_HPP -#define SPROUT_TYPE_TRAITS_INVOKE_RESULT_HPP - -#include -#include - -namespace sprout { - // - // invoke_result - // - template - struct invoke_result - : public sprout::detail::invoke_result - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using invoke_result_t = typename sprout::invoke_result::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_INVOKE_RESULT_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_abstract.hpp b/dsp/lib/sprout/sprout/type_traits/is_abstract.hpp deleted file mode 100644 index 013c8b8..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_abstract.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_ABSTRACT_HPP -#define SPROUT_TYPE_TRAITS_IS_ABSTRACT_HPP - -#include -#include -#include - -namespace sprout { - // - // is_abstract - // - template - struct is_abstract - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_abstract_v = sprout::is_abstract::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_ABSTRACT_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_aggregate.hpp b/dsp/lib/sprout/sprout/type_traits/is_aggregate.hpp deleted file mode 100644 index 7204c2f..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_aggregate.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_AGGREGATE_HPP -#define SPROUT_TYPE_TRAITS_IS_AGGREGATE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // is_aggregate - // -#if SPROUT_CLANG_HAS_FUTURE(is_aggregate) || SPROUT_GCC_OR_LATER(7, 0, 0) - template - struct is_aggregate - : public sprout::bool_constant< - __is_aggregate(typename sprout::remove_cv::type>::type) - > - {}; -#else // #if SPROUT_CLANG_HAS_FUTURE(is_aggregate) || SPROUT_GCC_OR_LATER(7, 0, 0) - template - struct is_aggregate - : public sprout::false_type - {}; -#endif // #if SPROUT_CLANG_HAS_FUTURE(is_aggregate) || SPROUT_GCC_OR_LATER(7, 0, 0) - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_aggregate_v = sprout::is_aggregate::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_AGGREGATE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_arithmetic.hpp b/dsp/lib/sprout/sprout/type_traits/is_arithmetic.hpp deleted file mode 100644 index a8eead7..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_arithmetic.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_ARITHMETIC_HPP -#define SPROUT_TYPE_TRAITS_IS_ARITHMETIC_HPP - -#include -#include -#include - -namespace sprout { - // - // is_arithmetic - // - template - struct is_arithmetic - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_arithmetic_v = sprout::is_arithmetic::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_ARITHMETIC_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_array.hpp b/dsp/lib/sprout/sprout/type_traits/is_array.hpp deleted file mode 100644 index 38b979f..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_array.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_ARRAY_HPP -#define SPROUT_TYPE_TRAITS_IS_ARRAY_HPP - -#include -#include -#include - -namespace sprout { - // - // is_array - // - template - struct is_array - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_array_v = sprout::is_array::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_ARRAY_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_assignable.hpp b/dsp/lib/sprout/sprout/type_traits/is_assignable.hpp deleted file mode 100644 index 74ec569..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_assignable.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_ASSIGNABLE_HPP -#define SPROUT_TYPE_TRAITS_IS_ASSIGNABLE_HPP - -#include -#include -#include - -namespace sprout { - // - // is_assignable - // - template - struct is_assignable - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_assignable_v = sprout::is_assignable::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_ASSIGNABLE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_base_of.hpp b/dsp/lib/sprout/sprout/type_traits/is_base_of.hpp deleted file mode 100644 index b3dcf9d..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_base_of.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_BASE_OF_HPP -#define SPROUT_TYPE_TRAITS_IS_BASE_OF_HPP - -#include -#include -#include - -namespace sprout { - // - // is_base_of - // - template - struct is_base_of - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_base_of_v = sprout::is_base_of::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_BASE_OF_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_c_str.hpp b/dsp/lib/sprout/sprout/type_traits/is_c_str.hpp deleted file mode 100644 index 30121ae..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_c_str.hpp +++ /dev/null @@ -1,60 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_C_STR_HPP -#define SPROUT_TYPE_TRAITS_IS_C_STR_HPP - -#include -#include -#include - -namespace sprout { - // - // is_c_str - // - template - struct is_c_str - : public sprout::false_type - {}; - template - struct is_c_str - : public sprout::is_c_str - {}; - template - struct is_c_str - : public sprout::is_c_str - {}; - template - struct is_c_str - : public sprout::is_c_str - {}; - template - struct is_c_str - : public sprout::true_type - {}; - template - struct is_c_str - : public sprout::true_type - {}; -#if SPROUT_USE_UNICODE_LITERALS - template - struct is_c_str - : public sprout::true_type - {}; - template - struct is_c_str - : public sprout::true_type - {}; -#endif - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_c_str_v = sprout::is_c_str::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_C_STR_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_char_type.hpp b/dsp/lib/sprout/sprout/type_traits/is_char_type.hpp deleted file mode 100644 index c177625..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_char_type.hpp +++ /dev/null @@ -1,59 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_CHAR_TYPE_HPP -#define SPROUT_TYPE_TRAITS_IS_CHAR_TYPE_HPP - -#include -#include - -namespace sprout { - // - // is_char_type - // - template - struct is_char_type - : public sprout::false_type - {}; - template - struct is_char_type - : public sprout::is_char_type - {}; - template - struct is_char_type - : public sprout::is_char_type - {}; - template - struct is_char_type - : public sprout::is_char_type - {}; - template<> - struct is_char_type - : public sprout::true_type - {}; - template<> - struct is_char_type - : public sprout::true_type - {}; -#if SPROUT_USE_UNICODE_LITERALS - template<> - struct is_char_type - : public sprout::true_type - {}; - template<> - struct is_char_type - : public sprout::true_type - {}; -#endif - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_char_type_v = sprout::is_char_type::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_CHAR_TYPE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_class.hpp b/dsp/lib/sprout/sprout/type_traits/is_class.hpp deleted file mode 100644 index b105cb8..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_class.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_CLASS_HPP -#define SPROUT_TYPE_TRAITS_IS_CLASS_HPP - -#include -#include -#include - -namespace sprout { - // - // is_class - // - template - struct is_class - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_class_v = sprout::is_class::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_CLASS_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_compound.hpp b/dsp/lib/sprout/sprout/type_traits/is_compound.hpp deleted file mode 100644 index 4f20a30..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_compound.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_COMPOUND_HPP -#define SPROUT_TYPE_TRAITS_IS_COMPOUND_HPP - -#include -#include -#include - -namespace sprout { - // - // is_compound - // - template - struct is_compound - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_compound_v = sprout::is_compound::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_COMPOUND_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_const.hpp b/dsp/lib/sprout/sprout/type_traits/is_const.hpp deleted file mode 100644 index baccb37..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_const.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_CONST_HPP -#define SPROUT_TYPE_TRAITS_IS_CONST_HPP - -#include -#include -#include - -namespace sprout { - // - // is_const - // - template - struct is_const - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_const_v = sprout::is_const::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_CONST_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_const_cast_convertible.hpp b/dsp/lib/sprout/sprout/type_traits/is_const_cast_convertible.hpp deleted file mode 100644 index dd1c54d..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_const_cast_convertible.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_CONST_CAST_CONVERTIBLE_HPP -#define SPROUT_TYPE_TRAITS_IS_CONST_CAST_CONVERTIBLE_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // is_const_cast_convertible - // - namespace detail { - template - struct is_const_cast_convertible_test { - public: - template< - typename FromU = From, - typename = typename sprout::identity(std::declval()))>::type - > - static sprout::true_type test(int); - static sprout::false_type test(...); - }; - } // namespace detail - template - struct is_const_cast_convertible - : public sprout::identity::test(0))>::type - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_const_cast_convertible_v = sprout::is_const_cast_convertible::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_CONST_CAST_CONVERTIBLE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_const_unqualified.hpp b/dsp/lib/sprout/sprout/type_traits/is_const_unqualified.hpp deleted file mode 100644 index 0fd756f..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_const_unqualified.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_CONST_UNQUALIFIED_HPP -#define SPROUT_TYPE_TRAITS_IS_CONST_UNQUALIFIED_HPP - -#include -#include -#include - -namespace sprout { - // - // is_const_unqualified - // - template - struct is_const_unqualified - : public sprout::bool_constant< - std::is_const::value - > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_const_unqualified_v = sprout::is_const_unqualified::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_CONST_UNQUALIFIED_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_constructible.hpp b/dsp/lib/sprout/sprout/type_traits/is_constructible.hpp deleted file mode 100644 index 56a5042..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_constructible.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_CONSTRUCTIBLE_HPP -#define SPROUT_TYPE_TRAITS_IS_CONSTRUCTIBLE_HPP - -#include -#include -#include - -namespace sprout { - // - // is_constructible - // - template - struct is_constructible - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_constructible_v = sprout::is_constructible::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_CONSTRUCTIBLE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_convert_constructible.hpp b/dsp/lib/sprout/sprout/type_traits/is_convert_constructible.hpp deleted file mode 100644 index 6214aa0..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_convert_constructible.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_CONVERT_CONSTRUCTIBLE_HPP -#define SPROUT_TYPE_TRAITS_IS_CONVERT_CONSTRUCTIBLE_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // is_convert_constructible - // - namespace detail { - template - struct is_convert_constructible_test { - public: - static sprout::true_type test(T); - static sprout::false_type test(...); - }; - } // namespace detail - template - struct is_convert_constructible - : public sprout::identity::test(std::declval()))>::type - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_convert_constructible_v = sprout::is_convert_constructible::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_CONVERT_CONSTRUCTIBLE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_convertible.hpp b/dsp/lib/sprout/sprout/type_traits/is_convertible.hpp deleted file mode 100644 index cf01629..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_convertible.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_CONVERTIBLE_HPP -#define SPROUT_TYPE_TRAITS_IS_CONVERTIBLE_HPP - -#include -#include -#include - -namespace sprout { - // - // is_convertible - // - template - struct is_convertible - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_convertible_v = sprout::is_convertible::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_CONVERTIBLE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_copy_assignable.hpp b/dsp/lib/sprout/sprout/type_traits/is_copy_assignable.hpp deleted file mode 100644 index ef80753..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_copy_assignable.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_COPY_ASSIGNABLE_HPP -#define SPROUT_TYPE_TRAITS_IS_COPY_ASSIGNABLE_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // is_copy_assignable - // - namespace detail { - template::value> - struct is_copy_assignable_impl - : public sprout::false_type - {}; - template - struct is_copy_assignable_impl - : public sprout::is_assignable - {}; - } // namespace detail - template - struct is_copy_assignable - : public sprout::detail::is_copy_assignable_impl - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_copy_assignable_v = sprout::is_copy_assignable::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_COPY_ASSIGNABLE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_copy_constructible.hpp b/dsp/lib/sprout/sprout/type_traits/is_copy_constructible.hpp deleted file mode 100644 index a46e8c2..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_copy_constructible.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_COPY_CONSTRUCTIBLE_HPP -#define SPROUT_TYPE_TRAITS_IS_COPY_CONSTRUCTIBLE_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // is_copy_constructible - // - namespace detail { - template::value> - struct is_copy_constructible_impl - : public sprout::false_type - {}; - template - struct is_copy_constructible_impl - : public sprout::is_constructible - {}; - } // namespace detail - template - struct is_copy_constructible - : public sprout::detail::is_copy_constructible_impl - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_copy_constructible_v = sprout::is_copy_constructible::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_COPY_CONSTRUCTIBLE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_cv_unqualified.hpp b/dsp/lib/sprout/sprout/type_traits/is_cv_unqualified.hpp deleted file mode 100644 index e50d269..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_cv_unqualified.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_CV_UNQUALIFIED_HPP -#define SPROUT_TYPE_TRAITS_IS_CV_UNQUALIFIED_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // is_cv_unqualified - // - template - struct is_cv_unqualified - : public sprout::bool_constant< - sprout::is_const_unqualified::value && sprout::is_volatile_unqualified::value - > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_cv_unqualified_v = sprout::is_cv_unqualified::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_CV_UNQUALIFIED_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_default_constructible.hpp b/dsp/lib/sprout/sprout/type_traits/is_default_constructible.hpp deleted file mode 100644 index ce766ef..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_default_constructible.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_DEFAULT_CONSTRUCTIBLE_HPP -#define SPROUT_TYPE_TRAITS_IS_DEFAULT_CONSTRUCTIBLE_HPP - -#include -#include -#include - -namespace sprout { - // - // is_default_constructible - // - template - struct is_default_constructible - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_default_constructible_v = sprout::is_default_constructible::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_DEFAULT_CONSTRUCTIBLE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_destructible.hpp b/dsp/lib/sprout/sprout/type_traits/is_destructible.hpp deleted file mode 100644 index f03b427..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_destructible.hpp +++ /dev/null @@ -1,74 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_DESTRUCTIBLE_HPP -#define SPROUT_TYPE_TRAITS_IS_DESTRUCTIBLE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // is_destructible - // - namespace detail { - struct is_destructible_helper { - public: - template< - typename T, - typename = decltype(std::declval().~T()) - > - static sprout::true_type test(int); - template - static sprout::false_type test(...); - }; -#if defined(_MSC_VER) && (_MSC_VER > 1900) - template(0))>::type> - struct is_destructible_impl_0 - : public Base_ - {}; -#else - template - struct is_destructible_impl_0 - : public sprout::identity(0))>::type - {}; -#endif - - template< - typename T, - bool = std::is_void::value || (std::is_array::value && !std::extent::value) || std::is_function::value, - bool = std::is_reference::value || std::is_scalar::value - > - struct is_destructible_impl; - template - struct is_destructible_impl - : public sprout::detail::is_destructible_impl_0::type> - {}; - template - struct is_destructible_impl - : public sprout::false_type - {}; - template - struct is_destructible_impl - : public sprout::true_type - {}; - } // namespace detail - template - struct is_destructible - : public sprout::detail::is_destructible_impl - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_destructible_v = sprout::is_destructible::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_DESTRUCTIBLE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_empty.hpp b/dsp/lib/sprout/sprout/type_traits/is_empty.hpp deleted file mode 100644 index 9c06c0d..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_empty.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_EMPTY_HPP -#define SPROUT_TYPE_TRAITS_IS_EMPTY_HPP - -#include -#include -#include - -namespace sprout { - // - // is_empty - // - template - struct is_empty - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_empty_v = sprout::is_empty::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_EMPTY_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_enum.hpp b/dsp/lib/sprout/sprout/type_traits/is_enum.hpp deleted file mode 100644 index 2080cac..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_enum.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_ENUM_HPP -#define SPROUT_TYPE_TRAITS_IS_ENUM_HPP - -#include -#include -#include - -namespace sprout { - // - // is_enum - // - template - struct is_enum - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_enum_v = sprout::is_enum::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_ENUM_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_final.hpp b/dsp/lib/sprout/sprout/type_traits/is_final.hpp deleted file mode 100644 index 6a4fead..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_final.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_FINAL_HPP -#define SPROUT_TYPE_TRAITS_IS_FINAL_HPP - -#include -#include -#include - -namespace sprout { - // - // is_final - // -#if SPROUT_CLANG_HAS_FUTURE(is_final) || SPROUT_GCC_OR_LATER(4, 7, 0) - template - struct is_final - : public sprout::bool_constant<__is_final(T)> - {}; -#else // #if SPROUT_CLANG_HAS_FUTURE(is_final) || SPROUT_GCC_OR_LATER(4, 7, 0) - template - struct is_final - : public sprout::false_type - {}; -#endif // #if SPROUT_CLANG_HAS_FUTURE(is_final) || SPROUT_GCC_OR_LATER(4, 7, 0) - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_final_v = sprout::is_final::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_FINAL_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_floating_point.hpp b/dsp/lib/sprout/sprout/type_traits/is_floating_point.hpp deleted file mode 100644 index 77b485b..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_floating_point.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_FLOATING_POINT_HPP -#define SPROUT_TYPE_TRAITS_IS_FLOATING_POINT_HPP - -#include -#include -#include - -namespace sprout { - // - // is_floating_point - // - template - struct is_floating_point - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_floating_point_v = sprout::is_floating_point::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_FLOATING_POINT_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_function.hpp b/dsp/lib/sprout/sprout/type_traits/is_function.hpp deleted file mode 100644 index b22e7da..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_function.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_FUNCTION_HPP -#define SPROUT_TYPE_TRAITS_IS_FUNCTION_HPP - -#include -#include -#include - -namespace sprout { - // - // is_function - // - template - struct is_function - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_function_v = sprout::is_function::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_FUNCTION_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_fundamental.hpp b/dsp/lib/sprout/sprout/type_traits/is_fundamental.hpp deleted file mode 100644 index 5710174..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_fundamental.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_FUNDAMENTAL_HPP -#define SPROUT_TYPE_TRAITS_IS_FUNDAMENTAL_HPP - -#include -#include -#include - -namespace sprout { - // - // is_fundamental - // - template - struct is_fundamental - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_fundamental_v = sprout::is_fundamental::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_FUNDAMENTAL_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_integral.hpp b/dsp/lib/sprout/sprout/type_traits/is_integral.hpp deleted file mode 100644 index 23902a7..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_integral.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_INTEGRAL_HPP -#define SPROUT_TYPE_TRAITS_IS_INTEGRAL_HPP - -#include -#include -#include - -namespace sprout { - // - // is_integral - // - template - struct is_integral - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_integral_v = sprout::is_integral::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_INTEGRAL_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_invocable.hpp b/dsp/lib/sprout/sprout/type_traits/is_invocable.hpp deleted file mode 100644 index f0fcc5b..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_invocable.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_INVOCABLE_HPP -#define SPROUT_TYPE_TRAITS_IS_INVOCABLE_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // is_invocable - // - namespace detail { - template - struct is_invocable_impl - : public sprout::false_type - {}; - template - struct is_invocable_impl::type> - : public sprout::true_type - {}; - } // namespace detail - template - struct is_invocable - : public sprout::detail::is_invocable_impl< - sprout::invoke_result - >::type - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_invocable_v = sprout::is_invocable::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_INVOCABLE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_invocable_r.hpp b/dsp/lib/sprout/sprout/type_traits/is_invocable_r.hpp deleted file mode 100644 index 1390500..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_invocable_r.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_INVOCABLE_R_HPP -#define SPROUT_TYPE_TRAITS_IS_INVOCABLE_R_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // is_invocable_r - // - namespace detail { - template - struct is_invocable_r_impl - : public sprout::false_type - {}; - template - struct is_invocable_r_impl::type> - : public sprout::bool_constant< - std::is_void::value || std::is_convertible::value - > - {}; - } // namespace detail - template - struct is_invocable_r - : public sprout::detail::is_invocable_r_impl< - R, sprout::invoke_result - >::type - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_invocable_r_v = sprout::is_invocable_r::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_INVOCABLE_R_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_literal_type.hpp b/dsp/lib/sprout/sprout/type_traits/is_literal_type.hpp deleted file mode 100644 index 966101c..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_literal_type.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_LITERAL_TYPE_HPP -#define SPROUT_TYPE_TRAITS_IS_LITERAL_TYPE_HPP - -#include -#include -#include - -namespace sprout { - // - // is_literal_type - // - template - struct is_literal_type - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_literal_type_v = sprout::is_literal_type::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_LITERAL_TYPE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_lvalue_reference.hpp b/dsp/lib/sprout/sprout/type_traits/is_lvalue_reference.hpp deleted file mode 100644 index b9492dd..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_lvalue_reference.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_LVALUE_REFERENCE_HPP -#define SPROUT_TYPE_TRAITS_IS_LVALUE_REFERENCE_HPP - -#include -#include -#include - -namespace sprout { - // - // is_lvalue_reference - // - template - struct is_lvalue_reference - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_lvalue_reference_v = sprout::is_lvalue_reference::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_LVALUE_REFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_member_function_pointer.hpp b/dsp/lib/sprout/sprout/type_traits/is_member_function_pointer.hpp deleted file mode 100644 index 114bf2d..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_member_function_pointer.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_HPP -#define SPROUT_TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_HPP - -#include -#include -#include - -namespace sprout { - // - // is_member_function_pointer - // - template - struct is_member_function_pointer - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_member_function_pointer_v = sprout::is_member_function_pointer::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_member_object_pointer.hpp b/dsp/lib/sprout/sprout/type_traits/is_member_object_pointer.hpp deleted file mode 100644 index 43fa5ef..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_member_object_pointer.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_MEMBER_OBJECT_POINTER_HPP -#define SPROUT_TYPE_TRAITS_IS_MEMBER_OBJECT_POINTER_HPP - -#include -#include -#include - -namespace sprout { - // - // is_member_object_pointer - // - template - struct is_member_object_pointer - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_member_object_pointer_v = sprout::is_member_object_pointer::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_MEMBER_OBJECT_POINTER_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_member_pointer.hpp b/dsp/lib/sprout/sprout/type_traits/is_member_pointer.hpp deleted file mode 100644 index e923214..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_member_pointer.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_MEMBER_POINTER_HPP -#define SPROUT_TYPE_TRAITS_IS_MEMBER_POINTER_HPP - -#include -#include -#include - -namespace sprout { - // - // is_member_pointer - // - template - struct is_member_pointer - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_member_pointer_v = sprout::is_member_pointer::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_MEMBER_POINTER_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_move_assignable.hpp b/dsp/lib/sprout/sprout/type_traits/is_move_assignable.hpp deleted file mode 100644 index 0fb0816..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_move_assignable.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_MOVE_ASSIGNABLE_HPP -#define SPROUT_TYPE_TRAITS_IS_MOVE_ASSIGNABLE_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // is_move_assignable - // - namespace detail { - template::value> - struct is_move_assignable_impl - : public sprout::false_type - {}; - template - struct is_move_assignable_impl - : public sprout::is_assignable - {}; - } // namespace detail - template - struct is_move_assignable - : public sprout::detail::is_move_assignable_impl - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_move_assignable_v = sprout::is_move_assignable::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_MOVE_ASSIGNABLE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_move_constructible.hpp b/dsp/lib/sprout/sprout/type_traits/is_move_constructible.hpp deleted file mode 100644 index 2baa9ed..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_move_constructible.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_MOVE_CONSTRUCTIBLE_HPP -#define SPROUT_TYPE_TRAITS_IS_MOVE_CONSTRUCTIBLE_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // is_move_constructible - // - namespace detail { - template::value> - struct is_move_constructible_impl - : public sprout::false_type - {}; - template - struct is_move_constructible_impl - : public sprout::is_constructible - {}; - } // namespace detail - template - struct is_move_constructible - : public sprout::detail::is_move_constructible_impl - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_move_constructible_v = sprout::is_move_constructible::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_MOVE_CONSTRUCTIBLE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_nothrow_assignable.hpp b/dsp/lib/sprout/sprout/type_traits/is_nothrow_assignable.hpp deleted file mode 100644 index b1d03e0..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_nothrow_assignable.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_NOTHROW_ASSIGNABLE_HPP -#define SPROUT_TYPE_TRAITS_IS_NOTHROW_ASSIGNABLE_HPP - -#include -#include -#include - -namespace sprout { - // - // is_nothrow_assignable - // - template - struct is_nothrow_assignable - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_nothrow_assignable_v = sprout::is_nothrow_assignable::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_NOTHROW_ASSIGNABLE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_nothrow_constructible.hpp b/dsp/lib/sprout/sprout/type_traits/is_nothrow_constructible.hpp deleted file mode 100644 index 50e4deb..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_nothrow_constructible.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_NOTHROW_CONSTRUCTIBLE_HPP -#define SPROUT_TYPE_TRAITS_IS_NOTHROW_CONSTRUCTIBLE_HPP - -#include -#include -#include - -namespace sprout { - // - // is_nothrow_constructible - // - template - struct is_nothrow_constructible - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_nothrow_constructible_v = sprout::is_nothrow_constructible::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_NOTHROW_CONSTRUCTIBLE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_nothrow_copy_assignable.hpp b/dsp/lib/sprout/sprout/type_traits/is_nothrow_copy_assignable.hpp deleted file mode 100644 index acfa733..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_nothrow_copy_assignable.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_NOTHROW_COPY_ASSIGNABLE_HPP -#define SPROUT_TYPE_TRAITS_IS_NOTHROW_COPY_ASSIGNABLE_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // is_nothrow_copy_assignable - // - namespace detail { - template::value> - struct is_nothrow_copy_assignable_impl - : public sprout::false_type - {}; - template - struct is_nothrow_copy_assignable_impl - : public sprout::is_nothrow_assignable - {}; - } // namespace detail - template - struct is_nothrow_copy_assignable - : public sprout::detail::is_nothrow_copy_assignable_impl - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_nothrow_copy_assignable_v = sprout::is_nothrow_copy_assignable::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_NOTHROW_COPY_ASSIGNABLE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_nothrow_copy_constructible.hpp b/dsp/lib/sprout/sprout/type_traits/is_nothrow_copy_constructible.hpp deleted file mode 100644 index 4cf4490..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_nothrow_copy_constructible.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_NOTHROW_COPY_CONSTRUCTIBLE_HPP -#define SPROUT_TYPE_TRAITS_IS_NOTHROW_COPY_CONSTRUCTIBLE_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // is_nothrow_copy_constructible - // - namespace detail { - template::value> - struct is_nothrow_copy_constructible_impl - : public sprout::false_type - {}; - template - struct is_nothrow_copy_constructible_impl - : public sprout::is_nothrow_constructible - {}; - } // namespace detail - template - struct is_nothrow_copy_constructible - : public sprout::detail::is_nothrow_copy_constructible_impl - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_nothrow_copy_constructible_v = sprout::is_nothrow_copy_constructible::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_NOTHROW_COPY_CONSTRUCTIBLE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_nothrow_default_constructible.hpp b/dsp/lib/sprout/sprout/type_traits/is_nothrow_default_constructible.hpp deleted file mode 100644 index 11929f8..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_nothrow_default_constructible.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_NOTHROW_DEFAULT_CONSTRUCTIBLE_HPP -#define SPROUT_TYPE_TRAITS_IS_NOTHROW_DEFAULT_CONSTRUCTIBLE_HPP - -#include -#include -#include - -namespace sprout { - // - // is_nothrow_default_constructible - // - template - struct is_nothrow_default_constructible - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_nothrow_default_constructible_v = sprout::is_nothrow_default_constructible::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_NOTHROW_DEFAULT_CONSTRUCTIBLE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_nothrow_destructible.hpp b/dsp/lib/sprout/sprout/type_traits/is_nothrow_destructible.hpp deleted file mode 100644 index 2fa246d..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_nothrow_destructible.hpp +++ /dev/null @@ -1,71 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_NOTHROW_DESTRUCTIBLE_HPP -#define SPROUT_TYPE_TRAITS_IS_NOTHROW_DESTRUCTIBLE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // is_nothrow_destructible - // - namespace detail { - struct is_nothrow_destructible_helper { - public: - template - static sprout::bool_constant().~T())> test(int); - template - static sprout::false_type test(...); - }; -#if defined(_MSC_VER) && (_MSC_VER > 1900) - template(0))>::type> - struct is_nothrow_destructible_impl_0 - : public Base_ - {}; -#else - template - struct is_nothrow_destructible_impl_0 - : public sprout::identity(0))>::type - {}; -#endif - - template< - typename T, - bool = std::is_void::value || (std::is_array::value && !std::extent::value) || std::is_function::value, - bool = std::is_reference::value || std::is_scalar::value - > - struct is_nothrow_destructible_impl; - template - struct is_nothrow_destructible_impl - : public sprout::detail::is_nothrow_destructible_impl_0::type> - {}; - template - struct is_nothrow_destructible_impl - : public sprout::false_type - {}; - template - struct is_nothrow_destructible_impl - : public sprout::true_type - {}; - } // namespace detail - template - struct is_nothrow_destructible - : public sprout::detail::is_nothrow_destructible_impl - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_nothrow_destructible_v = sprout::is_nothrow_destructible::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_NOTHROW_DESTRUCTIBLE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_nothrow_invocable.hpp b/dsp/lib/sprout/sprout/type_traits/is_nothrow_invocable.hpp deleted file mode 100644 index 7660c8c..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_nothrow_invocable.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_NOTHROW_INVOCABLE_HPP -#define SPROUT_TYPE_TRAITS_IS_NOTHROW_INVOCABLE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // is_nothrow_invocable - // - namespace detail { - template - struct is_nothrow_invocable_impl - : public sprout::false_type - {}; - template - struct is_nothrow_invocable_impl - : public sprout::bool_constant< - SPROUT_NOEXCEPT_EXPR(sprout::detail::invoke(std::declval(), std::declval()...)) - > - {}; - } // namespace detail - template - struct is_nothrow_invocable - : public sprout::detail::is_nothrow_invocable_impl< - sprout::is_invocable::value, F, Args... - >::type - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_nothrow_invocable_v = sprout::is_nothrow_invocable::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_NOTHROW_INVOCABLE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_nothrow_invocable_r.hpp b/dsp/lib/sprout/sprout/type_traits/is_nothrow_invocable_r.hpp deleted file mode 100644 index dea07a5..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_nothrow_invocable_r.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_NOTHROW_INVOCABLE_R_HPP -#define SPROUT_TYPE_TRAITS_IS_NOTHROW_INVOCABLE_R_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // is_nothrow_invocable_r - // - namespace detail { - template - struct is_nothrow_invocable_r_impl - : public sprout::false_type - {}; - template - struct is_nothrow_invocable_r_impl - : public sprout::bool_constant< - SPROUT_NOEXCEPT_EXPR(sprout::detail::invoke(std::declval(), std::declval()...)) - > - {}; - } // namespace detail - template - struct is_nothrow_invocable_r - : public sprout::detail::is_nothrow_invocable_r_impl< - sprout::is_invocable_r::value, R, F, Args... - >::type - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_nothrow_invocable_r_v = sprout::is_nothrow_invocable_r::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_NOTHROW_INVOCABLE_R_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_nothrow_move_assignable.hpp b/dsp/lib/sprout/sprout/type_traits/is_nothrow_move_assignable.hpp deleted file mode 100644 index 45dd159..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_nothrow_move_assignable.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_NOTHROW_MOVE_ASSIGNABLE_HPP -#define SPROUT_TYPE_TRAITS_IS_NOTHROW_MOVE_ASSIGNABLE_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // is_nothrow_move_assignable - // - namespace detail { - template::value> - struct is_nothrow_move_assignable_impl - : public sprout::false_type - {}; - template - struct is_nothrow_move_assignable_impl - : public sprout::is_nothrow_assignable - {}; - } // namespace detail - template - struct is_nothrow_move_assignable - : public sprout::detail::is_nothrow_move_assignable_impl - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_nothrow_move_assignable_v = sprout::is_nothrow_move_assignable::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_NOTHROW_MOVE_ASSIGNABLE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_nothrow_move_constructible.hpp b/dsp/lib/sprout/sprout/type_traits/is_nothrow_move_constructible.hpp deleted file mode 100644 index 018b7f7..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_nothrow_move_constructible.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_NOTHROW_MOVE_CONSTRUCTIBLE_HPP -#define SPROUT_TYPE_TRAITS_IS_NOTHROW_MOVE_CONSTRUCTIBLE_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // is_nothrow_move_constructible - // - namespace detail { - template::value> - struct is_nothrow_move_constructible_impl - : public sprout::false_type - {}; - template - struct is_nothrow_move_constructible_impl - : public sprout::is_nothrow_constructible - {}; - } // namespace detail - template - struct is_nothrow_move_constructible - : public sprout::detail::is_nothrow_move_constructible_impl - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_nothrow_move_constructible_v = sprout::is_nothrow_move_constructible::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_NOTHROW_MOVE_CONSTRUCTIBLE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_nothrow_swappable.hpp b/dsp/lib/sprout/sprout/type_traits/is_nothrow_swappable.hpp deleted file mode 100644 index 91579d9..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_nothrow_swappable.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_NOTHROW_SWAPPABLE_HPP -#define SPROUT_TYPE_TRAITS_IS_NOTHROW_SWAPPABLE_HPP - -#include -#include - -namespace sprout { - // - // is_nothrow_swappable - // - template - struct is_nothrow_swappable - : public sprout::is_nothrow_swappable_with - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_nothrow_swappable_v = sprout::is_nothrow_swappable::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_NOTHROW_SWAPPABLE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_nothrow_swappable_with.hpp b/dsp/lib/sprout/sprout/type_traits/is_nothrow_swappable_with.hpp deleted file mode 100644 index bd50466..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_nothrow_swappable_with.hpp +++ /dev/null @@ -1,53 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_NOTHROW_SWAPPABLE_WITH_HPP -#define SPROUT_TYPE_TRAITS_IS_NOTHROW_SWAPPABLE_WITH_HPP - -#include -#include -#include -#include - -namespace sprout_nothrow_swappable_detail { - using std::swap; - - template - struct is_nothrow_swappable_with - : public sprout::bool_constant< - SPROUT_NOEXCEPT_EXPR(swap(std::declval(), std::declval())) - && SPROUT_NOEXCEPT_EXPR(swap(std::declval(), std::declval())) - >::type - {}; -} // namespace sprout_nothrow_swappable_detail - -namespace sprout { - namespace detail { - template - struct is_nothrow_swappable_with_impl - : public sprout::false_type - {}; - template - struct is_nothrow_swappable_with_impl - : public sprout_nothrow_swappable_detail::is_nothrow_swappable_with - {}; - } // namespace detail - // - // is_nothrow_swappable_with - // - template - struct is_nothrow_swappable_with - : public sprout::detail::is_nothrow_swappable_with_impl::value> - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_nothrow_swappable_with_v = sprout::is_nothrow_swappable_with::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_NOTHROW_SWAPPABLE_WITH_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_null_pointer.hpp b/dsp/lib/sprout/sprout/type_traits/is_null_pointer.hpp deleted file mode 100644 index 47e644a..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_null_pointer.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_NULL_POINTER_HPP -#define SPROUT_TYPE_TRAITS_IS_NULL_POINTER_HPP - -#include -#include -#include - -namespace sprout { - // - // is_null_pointer - // - template - struct is_null_pointer - : public sprout::false_type - {}; - template - struct is_null_pointer - : public sprout::is_null_pointer - {}; - template - struct is_null_pointer - : public sprout::is_null_pointer - {}; - template - struct is_null_pointer - : public sprout::is_null_pointer - {}; - template<> - struct is_null_pointer - : public sprout::true_type - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_null_pointer_v = sprout::is_null_pointer::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_NULL_POINTER_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_nullptr_cast.hpp b/dsp/lib/sprout/sprout/type_traits/is_nullptr_cast.hpp deleted file mode 100644 index 9ce399a..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_nullptr_cast.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_NULLPTR_CAST_HPP -#define SPROUT_TYPE_TRAITS_IS_NULLPTR_CAST_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // is_nullptr_cast - // - template - struct is_nullptr_cast - : public sprout::bool_constant< - std::is_pointer::value && sprout::is_same::type, std::nullptr_t>::value - > - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_NULLPTR_CAST_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_object.hpp b/dsp/lib/sprout/sprout/type_traits/is_object.hpp deleted file mode 100644 index 00839f1..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_object.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_OBJECT_HPP -#define SPROUT_TYPE_TRAITS_IS_OBJECT_HPP - -#include -#include -#include - -namespace sprout { - // - // is_object - // - template - struct is_object - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_object_v = sprout::is_object::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_OBJECT_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_pod.hpp b/dsp/lib/sprout/sprout/type_traits/is_pod.hpp deleted file mode 100644 index d66a297..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_pod.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_POD_HPP -#define SPROUT_TYPE_TRAITS_IS_POD_HPP - -#include -#include -#include - -namespace sprout { - // - // is_pod - // - template - struct is_pod - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_pod_v = sprout::is_pod::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_POD_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_pointer.hpp b/dsp/lib/sprout/sprout/type_traits/is_pointer.hpp deleted file mode 100644 index 5ff20c4..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_pointer.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_POINTER_HPP -#define SPROUT_TYPE_TRAITS_IS_POINTER_HPP - -#include -#include -#include - -namespace sprout { - // - // is_pointer - // - template - struct is_pointer - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_pointer_v = sprout::is_pointer::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_POINTER_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_polymorphic.hpp b/dsp/lib/sprout/sprout/type_traits/is_polymorphic.hpp deleted file mode 100644 index e2354bf..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_polymorphic.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_POLYMORPHIC_HPP -#define SPROUT_TYPE_TRAITS_IS_POLYMORPHIC_HPP - -#include -#include -#include - -namespace sprout { - // - // is_polymorphic - // - template - struct is_polymorphic - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_polymorphic_v = sprout::is_polymorphic::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_POLYMORPHIC_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_reference.hpp b/dsp/lib/sprout/sprout/type_traits/is_reference.hpp deleted file mode 100644 index 127d23f..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_reference.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_REFERENCE_HPP -#define SPROUT_TYPE_TRAITS_IS_REFERENCE_HPP - -#include -#include -#include - -namespace sprout { - // - // is_reference - // - template - struct is_reference - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_reference_v = sprout::is_reference::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_REFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_rvalue_reference.hpp b/dsp/lib/sprout/sprout/type_traits/is_rvalue_reference.hpp deleted file mode 100644 index 96b0f44..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_rvalue_reference.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_RVALUE_REFERENCE_HPP -#define SPROUT_TYPE_TRAITS_IS_RVALUE_REFERENCE_HPP - -#include -#include -#include - -namespace sprout { - // - // is_rvalue_reference - // - template - struct is_rvalue_reference - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_rvalue_reference_v = sprout::is_rvalue_reference::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_RVALUE_REFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_same.hpp b/dsp/lib/sprout/sprout/type_traits/is_same.hpp deleted file mode 100644 index c60d796..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_same.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_SAME_HPP -#define SPROUT_TYPE_TRAITS_IS_SAME_HPP - -#include -#include -#include - -namespace sprout { - // - // is_same - // - template - struct is_same - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_same_v = sprout::is_same::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_SAME_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_scalar.hpp b/dsp/lib/sprout/sprout/type_traits/is_scalar.hpp deleted file mode 100644 index 82d880c..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_scalar.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_SCALAR_HPP -#define SPROUT_TYPE_TRAITS_IS_SCALAR_HPP - -#include -#include -#include - -namespace sprout { - // - // is_scalar - // - template - struct is_scalar - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_scalar_v = sprout::is_scalar::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_SCALAR_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_signed.hpp b/dsp/lib/sprout/sprout/type_traits/is_signed.hpp deleted file mode 100644 index de16f80..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_signed.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_SIGNED_HPP -#define SPROUT_TYPE_TRAITS_IS_SIGNED_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // is_signed - // - namespace detail { - template::value> - struct is_signed_impl - : public sprout::false_type - {}; - template - struct is_signed_impl - : public sprout::detail::type_traits_wrapper > - {}; - } // namespace detail - template - struct is_signed - : public sprout::detail::is_signed_impl - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_signed_v = sprout::is_signed::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_SIGNED_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_sint.hpp b/dsp/lib/sprout/sprout/type_traits/is_sint.hpp deleted file mode 100644 index 121cddf..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_sint.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_SINT_HPP -#define SPROUT_TYPE_TRAITS_IS_SINT_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // is_sint - // - template - struct is_sint - : public sprout::bool_constant< - std::is_integral::value && sprout::is_signed::value - > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_sint_v = sprout::is_sint::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_SINT_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_standard_layout.hpp b/dsp/lib/sprout/sprout/type_traits/is_standard_layout.hpp deleted file mode 100644 index 6fddab1..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_standard_layout.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_STANDARD_LAYOUT_HPP -#define SPROUT_TYPE_TRAITS_IS_STANDARD_LAYOUT_HPP - -#include -#include -#include - -namespace sprout { - // - // is_standard_layout - // - template - struct is_standard_layout - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_standard_layout_v = sprout::is_standard_layout::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_STANDARD_LAYOUT_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_swappable.hpp b/dsp/lib/sprout/sprout/type_traits/is_swappable.hpp deleted file mode 100644 index aa29ff8..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_swappable.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_SWAPPABLE_HPP -#define SPROUT_TYPE_TRAITS_IS_SWAPPABLE_HPP - -#include -#include - -namespace sprout { - // - // is_swappable - // - template - struct is_swappable - : public sprout::is_swappable_with - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_swappable_v = sprout::is_swappable::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_SWAPPABLE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_swappable_with.hpp b/dsp/lib/sprout/sprout/type_traits/is_swappable_with.hpp deleted file mode 100644 index d06c11d..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_swappable_with.hpp +++ /dev/null @@ -1,58 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_SWAPPABLE_WITH_HPP -#define SPROUT_TYPE_TRAITS_IS_SWAPPABLE_WITH_HPP - -#include -#include -#include -#include - -namespace sprout_swappable_detail { - using std::swap; - - template - struct is_swappable_with_test { - public: - template< - typename T1 = T, typename U1 = U, - typename = typename sprout::identity(), std::declval()))>::type, - typename = typename sprout::identity(), std::declval()))>::type - > - static sprout::true_type test(int); - static sprout::false_type test(...); - }; -#if defined(_MSC_VER) && (_MSC_VER > 1900) - template::test(0))>::type> - struct is_swappable_with - : public Base_ - {}; -#else - template - struct is_swappable_with - : public sprout::identity::test(0))>::type - {}; -#endif -} // namespace sprout_swappable_detail - -namespace sprout { - // - // is_swappable_with - // - template - struct is_swappable_with - : public sprout_swappable_detail::is_swappable_with - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_swappable_with_v = sprout::is_swappable_with::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_SWAPPABLE_WITH_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_trivial.hpp b/dsp/lib/sprout/sprout/type_traits/is_trivial.hpp deleted file mode 100644 index 37124dc..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_trivial.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_TRIVIAL_HPP -#define SPROUT_TYPE_TRAITS_IS_TRIVIAL_HPP - -#include -#include -#include - -namespace sprout { - // - // is_trivial - // - template - struct is_trivial - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_trivial_v = sprout::is_trivial::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_TRIVIAL_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_trivially_assignable.hpp b/dsp/lib/sprout/sprout/type_traits/is_trivially_assignable.hpp deleted file mode 100644 index 999fd02..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_trivially_assignable.hpp +++ /dev/null @@ -1,67 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_TRIVIALLY_ASSIGNABLE_HPP -#define SPROUT_TYPE_TRAITS_IS_TRIVIALLY_ASSIGNABLE_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // is_trivially_assignable - // -#if !defined(_LIBCPP_VERSION) -#if SPROUT_CLANG_HAS_FUTURE(is_trivially_assignable) - template - struct is_trivially_assignable - : public sprout::bool_constant<__is_trivially_assignable(T, U)> - {}; -#else // #if SPROUT_CLANG_HAS_FUTURE(is_trivially_assignable) - template - struct is_trivially_assignable - : public sprout::false_type - {}; - template - struct is_trivially_assignable - : public sprout::is_scalar - {}; - template - struct is_trivially_assignable - : public sprout::is_scalar - {}; - template - struct is_trivially_assignable - : public sprout::is_scalar - {}; - template - struct is_trivially_assignable - : public sprout::is_scalar - {}; - template - struct is_trivially_assignable - : public sprout::is_scalar - {}; -#endif // #if SPROUT_CLANG_HAS_FUTURE(is_trivially_assignable) -#else // #if !defined(_LIBCPP_VERSION) - template - struct is_trivially_assignable - : public sprout::detail::type_traits_wrapper > - {}; -#endif // #if !defined(_LIBCPP_VERSION) - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_trivially_assignable_v = sprout::is_trivially_assignable::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_TRIVIALLY_ASSIGNABLE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_trivially_constructible.hpp b/dsp/lib/sprout/sprout/type_traits/is_trivially_constructible.hpp deleted file mode 100644 index e331215..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_trivially_constructible.hpp +++ /dev/null @@ -1,74 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_TRIVIALLY_CONSTRUCTIBLE_HPP -#define SPROUT_TYPE_TRAITS_IS_TRIVIALLY_CONSTRUCTIBLE_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // is_trivially_constructible - // -#if !defined(_LIBCPP_VERSION) -#if SPROUT_CLANG_HAS_FUTURE(is_trivially_constructible) - template - struct is_trivially_constructible - : public sprout::bool_constant<__is_trivially_constructible(T, Args...)> - {}; -#else // #if SPROUT_CLANG_HAS_FUTURE(is_trivially_constructible) - template - struct is_trivially_constructible - : public sprout::false_type - {}; -#if SPROUT_CLANG_HAS_FUTURE(has_trivial_constructor) || SPROUT_GCC_OR_LATER(4, 3, 0) - template - struct is_trivially_constructible - : public sprout::bool_constant<__has_trivial_constructor(T)> - {}; -#else // #if SPROUT_CLANG_HAS_FUTURE(has_trivial_constructor) || SPROUT_GCC_OR_LATER(4, 3, 0) - template - struct is_trivially_constructible - : public sprout::is_scalar - {}; -#endif // #if SPROUT_CLANG_HAS_FUTURE(has_trivial_constructor) || SPROUT_GCC_OR_LATER(4, 3, 0) - template - struct is_trivially_constructible - : public sprout::is_scalar - {}; - template - struct is_trivially_constructible - : public sprout::is_scalar - {}; - template - struct is_trivially_constructible - : public sprout::is_scalar - {}; - template - struct is_trivially_constructible - : public sprout::is_scalar - {}; -#endif // #if SPROUT_CLANG_HAS_FUTURE(is_trivially_constructible) -#else // #if !defined(_LIBCPP_VERSION) - template - struct is_trivially_constructible - : public sprout::detail::type_traits_wrapper > - {}; -#endif // #if !defined(_LIBCPP_VERSION) - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_trivially_constructible_v = sprout::is_trivially_constructible::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_TRIVIALLY_CONSTRUCTIBLE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_trivially_copy_assignable.hpp b/dsp/lib/sprout/sprout/type_traits/is_trivially_copy_assignable.hpp deleted file mode 100644 index 1900542..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_trivially_copy_assignable.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_TRIVIALLY_COPY_ASSIGNABLE_HPP -#define SPROUT_TYPE_TRAITS_IS_TRIVIALLY_COPY_ASSIGNABLE_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // is_trivially_copy_assignable - // - namespace detail { - template::value> - struct is_trivially_copy_assignable_impl - : public sprout::false_type - {}; - template - struct is_trivially_copy_assignable_impl - : public sprout::is_trivially_assignable - {}; - } // namespace detail - template - struct is_trivially_copy_assignable - : public sprout::detail::is_trivially_copy_assignable_impl - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_trivially_copy_assignable_v = sprout::is_trivially_copy_assignable::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_TRIVIALLY_COPY_ASSIGNABLE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_trivially_copy_constructible.hpp b/dsp/lib/sprout/sprout/type_traits/is_trivially_copy_constructible.hpp deleted file mode 100644 index d21e471..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_trivially_copy_constructible.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_TRIVIALLY_COPY_CONSTRUCTIBLE_HPP -#define SPROUT_TYPE_TRAITS_IS_TRIVIALLY_COPY_CONSTRUCTIBLE_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // is_trivially_copy_constructible - // - namespace detail { - template::value> - struct is_trivially_copy_constructible_impl - : public sprout::false_type - {}; - template - struct is_trivially_copy_constructible_impl - : public sprout::is_trivially_constructible - {}; - } // namespace detail - template - struct is_trivially_copy_constructible - : public sprout::detail::is_trivially_copy_constructible_impl - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_trivially_copy_constructible_v = sprout::is_trivially_copy_constructible::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_TRIVIALLY_COPY_CONSTRUCTIBLE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_trivially_copyable.hpp b/dsp/lib/sprout/sprout/type_traits/is_trivially_copyable.hpp deleted file mode 100644 index 579d385..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_trivially_copyable.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_TRIVIALLY_COPYABLE_HPP -#define SPROUT_TYPE_TRAITS_IS_TRIVIALLY_COPYABLE_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // is_trivially_copyable - // -#if !defined(_LIBCPP_VERSION) - template - struct is_trivially_copyable - : public sprout::is_scalar::type> - {}; -#else - template - struct is_trivially_copyable - : public sprout::detail::type_traits_wrapper > - {}; -#endif - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_trivially_copyable_v = sprout::is_trivially_copyable::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_TRIVIALLY_COPYABLE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_trivially_default_constructible.hpp b/dsp/lib/sprout/sprout/type_traits/is_trivially_default_constructible.hpp deleted file mode 100644 index 1ae8624..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_trivially_default_constructible.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE_HPP -#define SPROUT_TYPE_TRAITS_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // is_trivially_default_constructible - // -#if !defined(_LIBCPP_VERSION) - template - struct is_trivially_default_constructible - : public sprout::is_trivially_constructible - {}; -#else // #if !defined(_LIBCPP_VERSION) - template - struct is_trivially_default_constructible - : public sprout::detail::type_traits_wrapper > - {}; -#endif // #if !defined(_LIBCPP_VERSION) - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_trivially_default_constructible_v = sprout::is_trivially_default_constructible::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_trivially_destructible.hpp b/dsp/lib/sprout/sprout/type_traits/is_trivially_destructible.hpp deleted file mode 100644 index c870e24..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_trivially_destructible.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_TRIVIALLY_DESTRUCTIBLE_HPP -#define SPROUT_TYPE_TRAITS_IS_TRIVIALLY_DESTRUCTIBLE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // is_trivially_destructible - // -#if !defined(_LIBCPP_VERSION) && SPROUT_GCC_EARLIER(4, 8, 0) -#if SPROUT_CLANG_HAS_FUTURE(has_trivial_destructor) || SPROUT_GCC_OR_LATER(4, 3, 0) - template - struct is_trivially_destructible - : public sprout::bool_constant::value && __has_trivial_destructor(T)> - {}; -#else // #if SPROUT_CLANG_HAS_FUTURE(has_trivial_destructor) || SPROUT_GCC_OR_LATER(4, 3, 0) - template - struct is_trivially_destructible - : public sprout::bool_constant< - sprout::is_destructible::value - && (std::is_scalar::type>::value - || std::is_reference::type>::value - ) - > - {}; -#endif // #if SPROUT_CLANG_HAS_FUTURE(has_trivial_destructor) || SPROUT_GCC_OR_LATER(4, 3, 0) -#else // #if !defined(_LIBCPP_VERSION) && SPROUT_GCC_EARLIER(4, 8, 0) - template - struct is_trivially_destructible - : public sprout::detail::type_traits_wrapper > - {}; -#endif // #if !defined(_LIBCPP_VERSION) && SPROUT_GCC_EARLIER(4, 8, 0) - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_trivially_destructible_v = sprout::is_trivially_destructible::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_TRIVIALLY_DESTRUCTIBLE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_trivially_move_assignable.hpp b/dsp/lib/sprout/sprout/type_traits/is_trivially_move_assignable.hpp deleted file mode 100644 index 3b593ce..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_trivially_move_assignable.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_TRIVIALLY_MOVE_ASSIGNABLE_HPP -#define SPROUT_TYPE_TRAITS_IS_TRIVIALLY_MOVE_ASSIGNABLE_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // is_trivially_move_assignable - // - namespace detail { - template::value> - struct is_trivially_move_assignable_impl - : public sprout::false_type - {}; - template - struct is_trivially_move_assignable_impl - : public sprout::is_trivially_assignable - {}; - } // namespace detail - template - struct is_trivially_move_assignable - : public sprout::detail::is_trivially_move_assignable_impl - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_trivially_move_assignable_v = sprout::is_trivially_move_assignable::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_TRIVIALLY_MOVE_ASSIGNABLE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_trivially_move_constructible.hpp b/dsp/lib/sprout/sprout/type_traits/is_trivially_move_constructible.hpp deleted file mode 100644 index d48b1b7..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_trivially_move_constructible.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE_HPP -#define SPROUT_TYPE_TRAITS_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // is_trivially_move_constructible - // - namespace detail { - template::value> - struct is_trivially_move_constructible_impl - : public sprout::false_type - {}; - template - struct is_trivially_move_constructible_impl - : public sprout::is_trivially_constructible - {}; - } // namespace detail - template - struct is_trivially_move_constructible - : public sprout::detail::is_trivially_move_constructible_impl - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_trivially_move_constructible_v = sprout::is_trivially_move_constructible::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_uint.hpp b/dsp/lib/sprout/sprout/type_traits/is_uint.hpp deleted file mode 100644 index add9ea1..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_uint.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_UINT_HPP -#define SPROUT_TYPE_TRAITS_IS_UINT_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // is_uint - // - template - struct is_uint - : public sprout::bool_constant< - std::is_integral::value && sprout::is_unsigned::value - > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_uint_v = sprout::is_uint::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_UINT_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_union.hpp b/dsp/lib/sprout/sprout/type_traits/is_union.hpp deleted file mode 100644 index 6c693ee..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_union.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_UNION_HPP -#define SPROUT_TYPE_TRAITS_IS_UNION_HPP - -#include -#include -#include - -namespace sprout { - // - // is_union - // - template - struct is_union - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_union_v = sprout::is_union::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_UNION_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_unsigned.hpp b/dsp/lib/sprout/sprout/type_traits/is_unsigned.hpp deleted file mode 100644 index 5154479..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_unsigned.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_UNSIGNED_HPP -#define SPROUT_TYPE_TRAITS_IS_UNSIGNED_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // is_unsigned - // - namespace detail { - template::value> - struct is_unsigned_impl - : public sprout::false_type - {}; - template - struct is_unsigned_impl - : public sprout::detail::type_traits_wrapper > - {}; - } // namespace detail - template - struct is_unsigned - : public sprout::detail::is_unsigned_impl - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_unsigned_v = sprout::is_unsigned::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_UNSIGNED_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_upcast.hpp b/dsp/lib/sprout/sprout/type_traits/is_upcast.hpp deleted file mode 100644 index e04e296..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_upcast.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_UPCAST_HPP -#define SPROUT_TYPE_TRAITS_IS_UPCAST_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // is_upcast - // - template - struct is_upcast - : public sprout::bool_constant< - sprout::is_nullptr_cast::value - || (std::is_pointer::value - && std::is_base_of::type, typename std::remove_pointer::type>::type>::value - ) - || (std::is_reference::value - && std::is_base_of::type, typename std::remove_reference::type>::value - ) - > - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_UPCAST_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_void.hpp b/dsp/lib/sprout/sprout/type_traits/is_void.hpp deleted file mode 100644 index d32726f..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_void.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_VOID_HPP -#define SPROUT_TYPE_TRAITS_IS_VOID_HPP - -#include -#include -#include - -namespace sprout { - // - // is_void - // - template - struct is_void - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_void_v = sprout::is_void::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_VOID_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_volatile.hpp b/dsp/lib/sprout/sprout/type_traits/is_volatile.hpp deleted file mode 100644 index 5c7ebac..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_volatile.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_VOLATILE_HPP -#define SPROUT_TYPE_TRAITS_IS_VOLATILE_HPP - -#include -#include -#include - -namespace sprout { - // - // is_volatile - // - template - struct is_volatile - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_volatile_v = sprout::is_volatile::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_VOLATILE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_volatile_unqualified.hpp b/dsp/lib/sprout/sprout/type_traits/is_volatile_unqualified.hpp deleted file mode 100644 index a3463ca..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_volatile_unqualified.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_VOLATILE_UNQUALIFIED_HPP -#define SPROUT_TYPE_TRAITS_IS_VOLATILE_UNQUALIFIED_HPP - -#include -#include -#include - -namespace sprout { - // - // is_volatile_unqualified - // - template - struct is_volatile_unqualified - : public sprout::bool_constant< - std::is_volatile::value - > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_volatile_unqualified_v = sprout::is_volatile_unqualified::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_VOLATILE_UNQUALIFIED_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_within_namespace.hpp b/dsp/lib/sprout/sprout/type_traits/is_within_namespace.hpp deleted file mode 100644 index 9029ac2..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_within_namespace.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_WITHIN_NAMESPACE_HPP -#define SPROUT_TYPE_TRAITS_IS_WITHIN_NAMESPACE_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_WITHIN_NAMESPACE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_within_namespace_boost.hpp b/dsp/lib/sprout/sprout/type_traits/is_within_namespace_boost.hpp deleted file mode 100644 index bef3beb..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_within_namespace_boost.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_WITHIN_NAMESPACE_BOOST_HPP -#define SPROUT_TYPE_TRAITS_IS_WITHIN_NAMESPACE_BOOST_HPP - -#include -#include - -namespace boost { - SPROUT_ADL_TESTER_DECL(boost); -} // namespace boost - -namespace sprout { - // - // is_within_namespace_boost - // - SPROUT_IS_WITHIN_NAMESPACE_DECL(boost, boost); -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_WITHIN_NAMESPACE_BOOST_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_within_namespace_sprout.hpp b/dsp/lib/sprout/sprout/type_traits/is_within_namespace_sprout.hpp deleted file mode 100644 index 407d5f6..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_within_namespace_sprout.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_WITHIN_NAMESPACE_SPROUT_HPP -#define SPROUT_TYPE_TRAITS_IS_WITHIN_NAMESPACE_SPROUT_HPP - -#include -#include - -namespace sprout { - SPROUT_ADL_TESTER_DECL(sprout); -} // namespace sprout - -namespace sprout { - // - // is_within_namespace_sprout - // - SPROUT_IS_WITHIN_NAMESPACE_DECL(sprout, sprout); -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_WITHIN_NAMESPACE_SPROUT_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_within_namespace_std.hpp b/dsp/lib/sprout/sprout/type_traits/is_within_namespace_std.hpp deleted file mode 100644 index 2d945d7..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_within_namespace_std.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.std.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_WITHIN_NAMESPACE_STD_HPP -#define SPROUT_TYPE_TRAITS_IS_WITHIN_NAMESPACE_STD_HPP - -#include -#include - -// -// note: -// This code is ill-formed in the Standard C++ -// because adding declarations to std namespace. -// However, it will work without problems in practice. -// I want to replace if there is a better way. -// -namespace std { - SPROUT_ADL_TESTER_DECL(std); -} // namespace std - -namespace sprout { - // - // is_within_namespace_std - // - SPROUT_IS_WITHIN_NAMESPACE_DECL(std, std); -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_WITHIN_NAMESPACE_STD_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/is_within_tag_namespace.hpp b/dsp/lib/sprout/sprout/type_traits/is_within_tag_namespace.hpp deleted file mode 100644 index c9262e5..0000000 --- a/dsp/lib/sprout/sprout/type_traits/is_within_tag_namespace.hpp +++ /dev/null @@ -1,106 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_IS_WITHIN_TAG_NAMESPACE_HPP -#define SPROUT_TYPE_TRAITS_IS_WITHIN_TAG_NAMESPACE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -// -// SPROUT_ADL_TEST_TAG_DECL -// -#define SPROUT_ADL_TEST_TAG_DECL(NAME) \ - namespace sprout_adl_test { \ - struct SPROUT_PP_CAT(NAME, _tag); \ - } SPROUT_DETAIL_DO_NOTHING_STATEMENT_WITHIN_NAMESPACE -// -// SPROUT_ADL_TESTER_DECL -// -#define SPROUT_ADL_TESTER_DECL(NAME) \ - SPROUT_ADL_TEST_TAG_DECL(NAME); \ - template \ - void sprout_adl_tester(sprout_adl_test::SPROUT_PP_CAT(NAME, _tag)*&&, T&&) - -// -// SPROUT_ADL_TEST_TAG -// -#define SPROUT_ADL_TEST_TAG(NAME) \ - sprout_adl_test::SPROUT_PP_CAT(NAME, _tag) - -// -// SPROUT_IS_WITHIN_NAMESPACE_DECL -// -#define SPROUT_IS_WITHIN_NAMESPACE_DECL(NAME, NAMESPACE) \ - template \ - struct SPROUT_PP_CAT(is_within_namespace_, NAME) \ - : public sprout::is_within_tag_namespace \ - {}; \ - SPROUT_IS_WITHIN_NAMESPACE_V(NAME, NAMESPACE) -#if SPROUT_USE_VARIABLE_TEMPLATES -# define SPROUT_IS_WITHIN_NAMESPACE_V(NAME, NAMESPACE) \ - template \ - SPROUT_STATIC_CONSTEXPR bool SPROUT_PP_CAT(SPROUT_PP_CAT(is_within_namespace_, NAME), _v) = SPROUT_PP_CAT(is_within_namespace_, NAME)::value -#else // #if SPROUT_USE_VARIABLE_TEMPLATES -# define SPROUT_IS_WITHIN_NAMESPACE_V(NAME, NAMESPACE) \ - SPROUT_DETAIL_DO_NOTHING_STATEMENT_WITHIN_NAMESPACE -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - -namespace sprout_adl { - sprout::not_found_via_adl sprout_adl_tester(...); -} // namespace sprout_adl - -namespace sprout_adl_tester_detail { - using sprout_adl::sprout_adl_tester; - - template - struct is_within_namespace_test { - public: - template< - typename Tag0 = Tag, typename U = T, - typename R = typename sprout::identity(), std::declval()))>::type - > - static sprout::is_found_via_adl test(int); - static sprout::false_type test(...); - }; -} // namespace sprout_adl_tester_detail - -namespace sprout { - // - // is_within_tag_namespace - // -#if defined(_MSC_VER) && (_MSC_VER > 1900) - namespace detail { - template::test(0))>::type> - struct is_within_tag_namespace_impl - : public Base_ - {}; - } // namespace detail - template - struct is_within_tag_namespace - : public sprout::detail::is_within_tag_namespace_impl - {}; -#else - template - struct is_within_tag_namespace - : public sprout::identity::test(0))>::type - {}; -#endif - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_within_tag_namespace_v = sprout::is_within_tag_namespace::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_IS_WITHIN_TAG_NAMESPACE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/logical.hpp b/dsp/lib/sprout/sprout/type_traits/logical.hpp deleted file mode 100644 index 2a8e176..0000000 --- a/dsp/lib/sprout/sprout/type_traits/logical.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_LOGICAL_HPP -#define SPROUT_TYPE_TRAITS_LOGICAL_HPP - -#include -// logical operator traits: -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_TRAITS_LOGICAL_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/lvalue_reference.hpp b/dsp/lib/sprout/sprout/type_traits/lvalue_reference.hpp deleted file mode 100644 index 95e036d..0000000 --- a/dsp/lib/sprout/sprout/type_traits/lvalue_reference.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_LVALUE_REFERENCE_HPP -#define SPROUT_TYPE_TRAITS_LVALUE_REFERENCE_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // lvalue_reference - // - template - struct lvalue_reference - : public sprout::identity()))> - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using lvalue_reference_t = typename sprout::lvalue_reference::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_LVALUE_REFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/make_signed.hpp b/dsp/lib/sprout/sprout/type_traits/make_signed.hpp deleted file mode 100644 index edae115..0000000 --- a/dsp/lib/sprout/sprout/type_traits/make_signed.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_MAKE_SIGNED_HPP -#define SPROUT_TYPE_TRAITS_MAKE_SIGNED_HPP - -#include -#include - -namespace sprout { - // - // make_signed - // - using std::make_signed; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using make_signed_t = typename sprout::make_signed::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_MAKE_SIGNED_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/make_unsigned.hpp b/dsp/lib/sprout/sprout/type_traits/make_unsigned.hpp deleted file mode 100644 index bb4d1fc..0000000 --- a/dsp/lib/sprout/sprout/type_traits/make_unsigned.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_MAKE_UNSIGNED_HPP -#define SPROUT_TYPE_TRAITS_MAKE_UNSIGNED_HPP - -#include -#include - -namespace sprout { - // - // make_unsigned - // - using std::make_unsigned; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using make_unsigned_t = typename sprout::make_unsigned::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_MAKE_UNSIGNED_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/negation.hpp b/dsp/lib/sprout/sprout/type_traits/negation.hpp deleted file mode 100644 index 13a43a1..0000000 --- a/dsp/lib/sprout/sprout/type_traits/negation.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_NEGATION_HPP -#define SPROUT_TYPE_TRAITS_NEGATION_HPP - -#include -#include - -namespace sprout { - // - // negation - // - template - struct negation - : public sprout::bool_constant - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool negation_v = sprout::negation::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_NEGATION_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/pointer_modification.hpp b/dsp/lib/sprout/sprout/type_traits/pointer_modification.hpp deleted file mode 100644 index 99b3c8b..0000000 --- a/dsp/lib/sprout/sprout/type_traits/pointer_modification.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_POINTER_MODIFICATION_HPP -#define SPROUT_TYPE_TRAITS_POINTER_MODIFICATION_HPP - -#include -// 20.10.7.5 Pointer modifications -#include -#include - -#endif // #ifndef SPROUT_TYPE_TRAITS_POINTER_MODIFICATION_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/property.hpp b/dsp/lib/sprout/sprout/type_traits/property.hpp deleted file mode 100644 index 30f0388..0000000 --- a/dsp/lib/sprout/sprout/type_traits/property.hpp +++ /dev/null @@ -1,68 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_PROPERTY_HPP -#define SPROUT_TYPE_TRAITS_PROPERTY_HPP - -#include -// 20.10.4.3 Type properties -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_TRAITS_PROPERTY_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/property_query.hpp b/dsp/lib/sprout/sprout/type_traits/property_query.hpp deleted file mode 100644 index 1a6e2bc..0000000 --- a/dsp/lib/sprout/sprout/type_traits/property_query.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_PROPERTY_QUERY_HPP -#define SPROUT_TYPE_TRAITS_PROPERTY_QUERY_HPP - -#include -// 20.10.5 Type property queries -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_TRAITS_PROPERTY_QUERY_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/rank.hpp b/dsp/lib/sprout/sprout/type_traits/rank.hpp deleted file mode 100644 index 97a5c4c..0000000 --- a/dsp/lib/sprout/sprout/type_traits/rank.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_RANK_HPP -#define SPROUT_TYPE_TRAITS_RANK_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // rank - // - template - struct rank - : public sprout::detail::type_traits_wrapper > - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR std::size_t rank_v = sprout::rank::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_RANK_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/ref_modification.hpp b/dsp/lib/sprout/sprout/type_traits/ref_modification.hpp deleted file mode 100644 index 1f59cf8..0000000 --- a/dsp/lib/sprout/sprout/type_traits/ref_modification.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_REF_MODIFICATION_HPP -#define SPROUT_TYPE_TRAITS_REF_MODIFICATION_HPP - -#include -// 20.10.7.2 Reference modifications -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_TRAITS_REF_MODIFICATION_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/relationship.hpp b/dsp/lib/sprout/sprout/type_traits/relationship.hpp deleted file mode 100644 index d48a656..0000000 --- a/dsp/lib/sprout/sprout/type_traits/relationship.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_RELATIONSHIP_HPP -#define SPROUT_TYPE_TRAITS_RELATIONSHIP_HPP - -#include -// 20.10.6 Relationships between types -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_TRAITS_RELATIONSHIP_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/remove_all_extents.hpp b/dsp/lib/sprout/sprout/type_traits/remove_all_extents.hpp deleted file mode 100644 index 77f7fab..0000000 --- a/dsp/lib/sprout/sprout/type_traits/remove_all_extents.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_REMOVE_ALL_EXTENTS_HPP -#define SPROUT_TYPE_TRAITS_REMOVE_ALL_EXTENTS_HPP - -#include -#include - -namespace sprout { - // - // remove_all_extents - // - using std::remove_all_extents; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using remove_all_extents_t = typename sprout::remove_all_extents::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_REMOVE_ALL_EXTENTS_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/remove_const.hpp b/dsp/lib/sprout/sprout/type_traits/remove_const.hpp deleted file mode 100644 index fe016a5..0000000 --- a/dsp/lib/sprout/sprout/type_traits/remove_const.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_REMOVE_CONST_HPP -#define SPROUT_TYPE_TRAITS_REMOVE_CONST_HPP - -#include -#include - -namespace sprout { - // - // remove_const - // - using std::remove_const; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using remove_const_t = typename sprout::remove_const::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_REMOVE_CONST_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/remove_cv.hpp b/dsp/lib/sprout/sprout/type_traits/remove_cv.hpp deleted file mode 100644 index ad2202a..0000000 --- a/dsp/lib/sprout/sprout/type_traits/remove_cv.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_REMOVE_CV_HPP -#define SPROUT_TYPE_TRAITS_REMOVE_CV_HPP - -#include -#include - -namespace sprout { - // - // remove_cv - // - using std::remove_cv; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using remove_cv_t = typename sprout::remove_cv::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_REMOVE_CV_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/remove_cvref.hpp b/dsp/lib/sprout/sprout/type_traits/remove_cvref.hpp deleted file mode 100644 index 3d1fb89..0000000 --- a/dsp/lib/sprout/sprout/type_traits/remove_cvref.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_REMOVE_CVREF_HPP -#define SPROUT_TYPE_TRAITS_REMOVE_CVREF_HPP - -#include -#include - -namespace sprout { - // - // remove_cvref - // - template - struct remove_cvref - : public std::remove_cv< - typename std::remove_reference::type - > - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using remove_cvref_t = typename sprout::remove_cvref::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_REMOVE_CVREF_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/remove_extent.hpp b/dsp/lib/sprout/sprout/type_traits/remove_extent.hpp deleted file mode 100644 index 300fd6a..0000000 --- a/dsp/lib/sprout/sprout/type_traits/remove_extent.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_REMOVE_EXTENT_HPP -#define SPROUT_TYPE_TRAITS_REMOVE_EXTENT_HPP - -#include -#include - -namespace sprout { - // - // remove_extent - // - using std::remove_extent; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using remove_extent_t = typename sprout::remove_extent::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_REMOVE_EXTENT_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/remove_pointer.hpp b/dsp/lib/sprout/sprout/type_traits/remove_pointer.hpp deleted file mode 100644 index 62df154..0000000 --- a/dsp/lib/sprout/sprout/type_traits/remove_pointer.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_REMOVE_POINTER_HPP -#define SPROUT_TYPE_TRAITS_REMOVE_POINTER_HPP - -#include -#include - -namespace sprout { - // - // remove_pointer - // - using std::remove_pointer; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using remove_pointer_t = typename sprout::remove_pointer::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_REMOVE_POINTER_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/remove_reference.hpp b/dsp/lib/sprout/sprout/type_traits/remove_reference.hpp deleted file mode 100644 index 49f47b6..0000000 --- a/dsp/lib/sprout/sprout/type_traits/remove_reference.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_REMOVE_REFERENCE_HPP -#define SPROUT_TYPE_TRAITS_REMOVE_REFERENCE_HPP - -#include -#include - -namespace sprout { - // - // remove_reference - // - using std::remove_reference; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using remove_reference_t = typename sprout::remove_reference::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_REMOVE_REFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/remove_shallow_const.hpp b/dsp/lib/sprout/sprout/type_traits/remove_shallow_const.hpp deleted file mode 100644 index f14f8b9..0000000 --- a/dsp/lib/sprout/sprout/type_traits/remove_shallow_const.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_REMOVE_SHALLOW_CONST_HPP -#define SPROUT_TYPE_TRAITS_REMOVE_SHALLOW_CONST_HPP - -#include -#include -#include - -namespace sprout { - // - // remove_shallow_const - // - template - struct remove_shallow_const - : public sprout::identity - {}; - template - struct remove_shallow_const - : public std::conditional::value, T const, T> - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using remove_shallow_const_t = typename sprout::remove_shallow_const::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_REMOVE_SHALLOW_CONST_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/remove_shallow_cv.hpp b/dsp/lib/sprout/sprout/type_traits/remove_shallow_cv.hpp deleted file mode 100644 index ebf4d2e..0000000 --- a/dsp/lib/sprout/sprout/type_traits/remove_shallow_cv.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_REMOVE_SHALLOW_CV_HPP -#define SPROUT_TYPE_TRAITS_REMOVE_SHALLOW_CV_HPP - -#include -#include -#include - -namespace sprout { - // - // remove_shallow_cv - // - template - struct remove_shallow_cv - : public sprout::identity - {}; - template - struct remove_shallow_cv - : public std::conditional::value, T const, T> - {}; - template - struct remove_shallow_cv - : public std::conditional::value, T volatile, T> - {}; - template - struct remove_shallow_cv - : public std::conditional::value, T const volatile, T> - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using remove_shallow_cv_t = typename sprout::remove_shallow_cv::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_REMOVE_SHALLOW_CV_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/remove_shallow_cvref.hpp b/dsp/lib/sprout/sprout/type_traits/remove_shallow_cvref.hpp deleted file mode 100644 index 2883802..0000000 --- a/dsp/lib/sprout/sprout/type_traits/remove_shallow_cvref.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_REMOVE_SHALLOW_CVREF_HPP -#define SPROUT_TYPE_TRAITS_REMOVE_SHALLOW_CVREF_HPP - -#include -#include -#include - -namespace sprout { - // - // remove_shallow_cvref - // - template - struct remove_shallow_cvref - : public sprout::remove_shallow_cv< - typename std::remove_reference::type - > - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using remove_shallow_cvref_t = typename sprout::remove_shallow_cvref::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_REMOVE_SHALLOW_CVREF_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/remove_shallow_volatile.hpp b/dsp/lib/sprout/sprout/type_traits/remove_shallow_volatile.hpp deleted file mode 100644 index 8f43ff9..0000000 --- a/dsp/lib/sprout/sprout/type_traits/remove_shallow_volatile.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_REMOVE_SHALLOW_VOLATILE_HPP -#define SPROUT_TYPE_TRAITS_REMOVE_SHALLOW_VOLATILE_HPP - -#include -#include -#include - -namespace sprout { - // - // remove_shallow_volatile - // - template - struct remove_shallow_volatile - : public sprout::identity - {}; - template - struct remove_shallow_volatile - : public std::conditional::value, T volatile, T> - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using remove_shallow_volatile_t = typename sprout::remove_shallow_volatile::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_REMOVE_SHALLOW_VOLATILE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/remove_volatile.hpp b/dsp/lib/sprout/sprout/type_traits/remove_volatile.hpp deleted file mode 100644 index 3dacd41..0000000 --- a/dsp/lib/sprout/sprout/type_traits/remove_volatile.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_REMOVE_VOLATILE_HPP -#define SPROUT_TYPE_TRAITS_REMOVE_VOLATILE_HPP - -#include -#include - -namespace sprout { - // - // remove_volatile - // - using std::remove_volatile; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using remove_volatile_t = typename sprout::remove_volatile::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_REMOVE_VOLATILE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/result_of.hpp b/dsp/lib/sprout/sprout/type_traits/result_of.hpp deleted file mode 100644 index 686152e..0000000 --- a/dsp/lib/sprout/sprout/type_traits/result_of.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_RESULT_OF_HPP -#define SPROUT_TYPE_TRAITS_RESULT_OF_HPP - -#include -#include - -namespace sprout { - // - // result_of - // - template - struct result_of; - template - struct result_of - : public sprout::detail::invoke_result - {}; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using result_of_t = typename sprout::result_of::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_RESULT_OF_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/sign_modification.hpp b/dsp/lib/sprout/sprout/type_traits/sign_modification.hpp deleted file mode 100644 index d423aee..0000000 --- a/dsp/lib/sprout/sprout/type_traits/sign_modification.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_SIGN_MODIFICATION_HPP -#define SPROUT_TYPE_TRAITS_SIGN_MODIFICATION_HPP - -#include -// 20.10.7.3 Sign modifications -#include -#include - -#endif // #ifndef SPROUT_TYPE_TRAITS_SIGN_MODIFICATION_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/std.hpp b/dsp/lib/sprout/sprout/type_traits/std.hpp deleted file mode 100644 index 3a92913..0000000 --- a/dsp/lib/sprout/sprout/type_traits/std.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_STD_HPP -#define SPROUT_TYPE_TRAITS_STD_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_TRAITS_STD_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/std_type_aliases.hpp b/dsp/lib/sprout/sprout/type_traits/std_type_aliases.hpp deleted file mode 100644 index 34ac02f..0000000 --- a/dsp/lib/sprout/sprout/type_traits/std_type_aliases.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 osyo-manga - http://d.hatena.ne.jp/osyo-manga/ - - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_STD_TYPE_ALIASES_HPP -#define SPROUT_TYPE_TRAITS_STD_TYPE_ALIASES_HPP - -#include -#include - -#endif // #ifndef SPROUT_TYPE_TRAITS_STD_TYPE_ALIASES_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/std_type_traits.hpp b/dsp/lib/sprout/sprout/type_traits/std_type_traits.hpp deleted file mode 100644 index 1eef820..0000000 --- a/dsp/lib/sprout/sprout/type_traits/std_type_traits.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_STD_TYPE_TRAITS_HPP -#define SPROUT_TYPE_TRAITS_STD_TYPE_TRAITS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_TRAITS_STD_TYPE_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/std_value_variables.hpp b/dsp/lib/sprout/sprout/type_traits/std_value_variables.hpp deleted file mode 100644 index 7cd99e3..0000000 --- a/dsp/lib/sprout/sprout/type_traits/std_value_variables.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_STD_VALUE_VARIABLES_HPP -#define SPROUT_TYPE_TRAITS_STD_VALUE_VARIABLES_HPP - -#include -#include - -#endif // #ifndef SPROUT_TYPE_TRAITS_STD_VALUE_VARIABLES_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/transformation.hpp b/dsp/lib/sprout/sprout/type_traits/transformation.hpp deleted file mode 100644 index e7eeda8..0000000 --- a/dsp/lib/sprout/sprout/type_traits/transformation.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_TRANSFORMATION_HPP -#define SPROUT_TYPE_TRAITS_TRANSFORMATION_HPP - -#include -// 20.10.7.6 Other transformations -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_TYPE_TRAITS_TRANSFORMATION_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/underlying_type.hpp b/dsp/lib/sprout/sprout/type_traits/underlying_type.hpp deleted file mode 100644 index 8dd833d..0000000 --- a/dsp/lib/sprout/sprout/type_traits/underlying_type.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_UNDERLYING_TYPE_HPP -#define SPROUT_TYPE_TRAITS_UNDERLYING_TYPE_HPP - -#include -#include - -namespace sprout { - // - // underlying_type - // - using std::underlying_type; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using underlying_type_t = typename sprout::underlying_type::type; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_UNDERLYING_TYPE_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/void_t.hpp b/dsp/lib/sprout/sprout/type_traits/void_t.hpp deleted file mode 100644 index 490a1ea..0000000 --- a/dsp/lib/sprout/sprout/type_traits/void_t.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_VOID_T_HPP -#define SPROUT_TYPE_TRAITS_VOID_T_HPP - -#include -#include - -#endif // #ifndef SPROUT_TYPE_TRAITS_VOID_T_HPP diff --git a/dsp/lib/sprout/sprout/type_traits/voider.hpp b/dsp/lib/sprout/sprout/type_traits/voider.hpp deleted file mode 100644 index c28170e..0000000 --- a/dsp/lib/sprout/sprout/type_traits/voider.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_TYPE_TRAITS_VOIDER_HPP -#define SPROUT_TYPE_TRAITS_VOIDER_HPP - -#include - -namespace sprout { - // - // voider - // - template - struct voider { - public: - typedef void type; - }; - -#if SPROUT_USE_TEMPLATE_ALIASES - template - using void_t = void; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -} // namespace sprout - -#endif // #ifndef SPROUT_TYPE_TRAITS_VOIDER_HPP diff --git a/dsp/lib/sprout/sprout/utility.hpp b/dsp/lib/sprout/sprout/utility.hpp deleted file mode 100644 index 58cfd12..0000000 --- a/dsp/lib/sprout/sprout/utility.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_HPP -#define SPROUT_UTILITY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_UTILITY_HPP diff --git a/dsp/lib/sprout/sprout/utility/any_convertible.hpp b/dsp/lib/sprout/sprout/utility/any_convertible.hpp deleted file mode 100644 index a83fad5..0000000 --- a/dsp/lib/sprout/sprout/utility/any_convertible.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_ANY_CONVERTIBLE_HPP -#define SPROUT_UTILITY_ANY_CONVERTIBLE_HPP - -#include - -namespace sprout { - // - // any_convertible - // - struct any_convertible { - public: - template - SPROUT_CONSTEXPR operator T() const { - return T(); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_ANY_CONVERTIBLE_HPP diff --git a/dsp/lib/sprout/sprout/utility/as_const.hpp b/dsp/lib/sprout/sprout/utility/as_const.hpp deleted file mode 100644 index d3e050b..0000000 --- a/dsp/lib/sprout/sprout/utility/as_const.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_AS_CONST_HPP -#define SPROUT_UTILITY_AS_CONST_HPP - -#include -#include -#include - -namespace sprout { - // - // as_const - // - template - inline SPROUT_CONSTEXPR typename std::conditional< - std::is_lvalue_reference::value, - typename std::remove_reference::type const&, - typename std::remove_reference::type const&& - >::type - as_const(T&& t) { - return SPROUT_FORWARD(T, t); - } -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_AS_CONST_HPP diff --git a/dsp/lib/sprout/sprout/utility/as_lvalue.hpp b/dsp/lib/sprout/sprout/utility/as_lvalue.hpp deleted file mode 100644 index d97cc5d..0000000 --- a/dsp/lib/sprout/sprout/utility/as_lvalue.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_AS_LVALUE_HPP -#define SPROUT_UTILITY_AS_LVALUE_HPP - -#include - -namespace sprout { - // - // as_lvalue - // - template - inline SPROUT_CONSTEXPR T& - as_lvalue(T& t) { - return t; - } - template - inline SPROUT_CONSTEXPR T const& - as_lvalue(T const& t) { - return t; - } -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_AS_LVALUE_HPP diff --git a/dsp/lib/sprout/sprout/utility/as_non_const.hpp b/dsp/lib/sprout/sprout/utility/as_non_const.hpp deleted file mode 100644 index 1eaaec4..0000000 --- a/dsp/lib/sprout/sprout/utility/as_non_const.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_AS_NON_CONST_HPP -#define SPROUT_UTILITY_AS_NON_CONST_HPP - -#include -#include - -namespace sprout { - // - // as_non_const - // - template - inline SPROUT_CONSTEXPR typename std::conditional< - std::is_lvalue_reference::value, - typename std::remove_const::type>::type&, - typename std::remove_const::type>::type&& - >::type - as_non_const(T&& t) { - typedef typename std::conditional< - std::is_lvalue_reference::value, - typename std::remove_const::type>::type&, - typename std::remove_const::type>::type&& - >::type type; - return const_cast(t); - } -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_AS_NON_CONST_HPP diff --git a/dsp/lib/sprout/sprout/utility/cast.hpp b/dsp/lib/sprout/sprout/utility/cast.hpp deleted file mode 100644 index 7e52fe4..0000000 --- a/dsp/lib/sprout/sprout/utility/cast.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_CAST_HPP -#define SPROUT_UTILITY_CAST_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_UTILITY_CAST_HPP diff --git a/dsp/lib/sprout/sprout/utility/compare_pointees.hpp b/dsp/lib/sprout/sprout/utility/compare_pointees.hpp deleted file mode 100644 index 00849f3..0000000 --- a/dsp/lib/sprout/sprout/utility/compare_pointees.hpp +++ /dev/null @@ -1,138 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_COMPARE_POINTEES_HPP -#define SPROUT_UTILITY_COMPARE_POINTEES_HPP - -#include -#include - -namespace sprout { - // - // equal_pointees - // - template - inline SPROUT_CONSTEXPR bool - equal_pointees(OptionalPointee const& lhs, OptionalPointee const& rhs) { - return (!lhs) != (!rhs) ? false : (!lhs ? true : (*lhs) == (*rhs)); - } - // - // not_equal_pointees - // - template - inline SPROUT_CONSTEXPR bool - not_equal_pointees(OptionalPointee const& lhs, OptionalPointee const& rhs) { - return !sprout::equal_pointees(lhs, rhs); - } - // - // less_pointees - // - template - inline SPROUT_CONSTEXPR bool - less_pointees(OptionalPointee const& lhs, OptionalPointee const& rhs) { - return !rhs ? false : (!lhs ? true : (*lhs) < (*rhs)); - } - // - // greater_pointees - // - template - inline SPROUT_CONSTEXPR bool - greater_pointees(OptionalPointee const& lhs, OptionalPointee const& rhs) { - return sprout::less_pointees(rhs, lhs); - } - // - // less_equal_pointees - // - template - inline SPROUT_CONSTEXPR bool - less_equal_pointees(OptionalPointee const& lhs, OptionalPointee const& rhs) { - return !sprout::less_pointees(rhs, lhs); - } - // - // greater_equal_pointees - // - template - inline SPROUT_CONSTEXPR bool - greater_equal_pointees(OptionalPointee const& lhs, OptionalPointee const& rhs) { - return !sprout::less_pointees(lhs, rhs); - } - - // - // equal_pointees_t - // - template - struct equal_pointees_t - : public sprout::binary_function - { - SPROUT_CONSTEXPR bool - operator()(OptionalPointee const& lhs, OptionalPointee const& rhs) const { - return sprout::equal_pointees(lhs, rhs); - } - }; - // - // not_equal_pointees_t - // - template - struct not_equal_pointees_t - : public sprout::binary_function - { - SPROUT_CONSTEXPR bool - operator()(OptionalPointee const& lhs, OptionalPointee const& rhs) const { - return sprout::not_equal_pointees(lhs, rhs); - } - }; - // - // less_pointees_t - // - template - struct less_pointees_t - : public sprout::binary_function - { - SPROUT_CONSTEXPR bool - operator()(OptionalPointee const& lhs, OptionalPointee const& rhs) const { - return sprout::less_pointees(lhs, rhs); - } - }; - // - // greater_pointees_t - // - template - struct greater_pointees_t - : public sprout::binary_function - { - SPROUT_CONSTEXPR bool - operator()(OptionalPointee const& lhs, OptionalPointee const& rhs) const { - return sprout::greater_pointees(lhs, rhs); - } - }; - // - // less_equal_pointees_t - // - template - struct less_equal_pointees_t - : public sprout::binary_function - { - SPROUT_CONSTEXPR bool - operator()(OptionalPointee const& lhs, OptionalPointee const& rhs) const { - return sprout::less_equal_pointees(lhs, rhs); - } - }; - // - // greater_equal_pointees_t - // - template - struct greater_equal_pointees_t - : public sprout::binary_function - { - SPROUT_CONSTEXPR bool - operator()(OptionalPointee const& lhs, OptionalPointee const& rhs) const { - return sprout::greater_equal_pointees(lhs, rhs); - } - }; -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_COMPARE_POINTEES_HPP diff --git a/dsp/lib/sprout/sprout/utility/comparison.hpp b/dsp/lib/sprout/sprout/utility/comparison.hpp deleted file mode 100644 index 51ff34d..0000000 --- a/dsp/lib/sprout/sprout/utility/comparison.hpp +++ /dev/null @@ -1,530 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_COMPARISON_HPP -#define SPROUT_UTILITY_COMPARISON_HPP - -#include -#include - -namespace sprout { - // - // comparison_forwarder - // - template - class comparison_forwarder { - public: - typedef Compare compare_type; - private: - sprout::value_holder comp_; - public: - explicit SPROUT_CONSTEXPR comparison_forwarder(compare_type const& comp) - : comp_(comp) - {} - SPROUT_CONSTEXPR compare_type const& comp() const { - return comp_; - } - }; - template<> - class comparison_forwarder {}; - // - // operator->* - // - template - inline SPROUT_CONSTEXPR sprout::comparison_forwarder - operator->*(sprout::comparison_forwarder<>, Compare const& comp) { - return sprout::comparison_forwarder(comp); - } - - // - // comp - // - namespace { - SPROUT_STATIC_CONSTEXPR sprout::comparison_forwarder<> comp = {}; - } // anonymous-namespace - - // - // comparison_holder - // - template - class comparison_holder { - public: - typedef T value_type; - typedef Compare compare_type; - private: - sprout::value_holder value_; - sprout::value_holder comp_; - public: - SPROUT_CONSTEXPR comparison_holder(value_type const& value, compare_type const& comp) - : value_(value), comp_(comp) - {} - SPROUT_CONSTEXPR value_type const& get() const { - return value_; - } - SPROUT_CONSTEXPR compare_type const& comp() const { - return comp_; - } - }; - template - class comparison_holder { - public: - typedef T value_type; - private: - sprout::value_holder value_; - public: - explicit SPROUT_CONSTEXPR comparison_holder(value_type const& value) - : value_(value) - {} - SPROUT_CONSTEXPR value_type const& get() const { - return value_; - } - }; - - // - // operator% - // - template - inline SPROUT_CONSTEXPR sprout::comparison_holder - operator%(sprout::comparison_forwarder const& lhs, T const& rhs) { - return sprout::comparison_holder(rhs, lhs.comp()); - } - template - inline SPROUT_CONSTEXPR sprout::comparison_holder - operator%(sprout::comparison_forwarder<>, T const& rhs) { - return sprout::comparison_holder(rhs); - } - - // - // comparison_base - // - template - class comparison_base { - public: - typedef T value_type; - typedef Compare compare_type; - private: - sprout::value_holder value_; - sprout::value_holder comp_; - bool cond_; - public: - SPROUT_CONSTEXPR comparison_base() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - comparison_base(comparison_base const&) = default; - SPROUT_CONSTEXPR comparison_base(value_type const& value, compare_type const& comp) - : value_(value), comp_(comp), cond_(true) - {} - SPROUT_CONSTEXPR value_type const& get() const { - return value_; - } - SPROUT_CONSTEXPR compare_type const& comp() const { - return comp_; - } - SPROUT_CONSTEXPR operator bool() const { - return cond_; - } - SPROUT_CONSTEXPR bool operator!() const { - return !cond_; - } - }; - template - class comparison_base { - public: - typedef T value_type; - private: - sprout::value_holder value_; - bool cond_; - public: - SPROUT_CONSTEXPR comparison_base() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - comparison_base(comparison_base const&) = default; - explicit SPROUT_CONSTEXPR comparison_base(value_type const& value) - : value_(value), cond_(true) - {} - SPROUT_CONSTEXPR value_type const& get() const { - return value_; - } - SPROUT_CONSTEXPR operator bool() const { - return cond_; - } - SPROUT_CONSTEXPR bool operator!() const { - return !cond_; - } - }; - - // - // less_comparison - // - template - class less_comparison - : public sprout::comparison_base - { - public: - typedef sprout::comparison_base base_type; - typedef typename base_type::value_type value_type; - typedef typename base_type::compare_type compare_type; - public: - SPROUT_CONSTEXPR less_comparison() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - less_comparison(less_comparison const&) = default; - SPROUT_CONSTEXPR less_comparison(value_type const& value, compare_type const& comp) - : base_type(value, comp) - {} - }; - template - class less_comparison - : public sprout::comparison_base - { - public: - typedef sprout::comparison_base base_type; - typedef typename base_type::value_type value_type; - public: - SPROUT_CONSTEXPR less_comparison() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - less_comparison(less_comparison const&) = default; - explicit SPROUT_CONSTEXPR less_comparison(value_type const& value) - : base_type(value) - {} - }; - // - // operator< - // operator<= - // - template - inline SPROUT_CONSTEXPR sprout::less_comparison - operator<(sprout::comparison_forwarder const& lhs, T const& rhs) { - return sprout::less_comparison(rhs, lhs.comp()); - } - template - inline SPROUT_CONSTEXPR sprout::less_comparison - operator<(sprout::comparison_forwarder<>, T const& rhs) { - return sprout::less_comparison(rhs); - } - template - inline SPROUT_CONSTEXPR sprout::less_comparison - operator<=(sprout::comparison_forwarder const& lhs, T const& rhs) { - return sprout::less_comparison(rhs, lhs.comp()); - } - template - inline SPROUT_CONSTEXPR sprout::less_comparison - operator<=(sprout::comparison_forwarder<>, T const& rhs) { - return sprout::less_comparison(rhs); - } - // - // operator< - // - template - inline SPROUT_CONSTEXPR sprout::less_comparison - operator<(sprout::comparison_holder const& lhs, U const& rhs) { - return lhs.comp()(lhs.get(), rhs) ? sprout::less_comparison(rhs, lhs.comp()) - : sprout::less_comparison() - ; - } - template - inline SPROUT_CONSTEXPR sprout::less_comparison - operator<(sprout::comparison_holder const& lhs, U const& rhs) { - return lhs.get() < rhs ? sprout::less_comparison(rhs) - : sprout::less_comparison() - ; - } - template - inline SPROUT_CONSTEXPR sprout::less_comparison - operator<(sprout::less_comparison const& lhs, U const& rhs) { - return lhs.comp()(lhs.get(), rhs) ? sprout::less_comparison(rhs, lhs.comp()) - : sprout::less_comparison() - ; - } - template - inline SPROUT_CONSTEXPR sprout::less_comparison - operator<(sprout::less_comparison const& lhs, U const& rhs) { - return lhs && lhs.get() < rhs ? sprout::less_comparison(rhs) - : sprout::less_comparison() - ; - } - // - // operator<= - // - template - inline SPROUT_CONSTEXPR sprout::less_comparison - operator<=(sprout::comparison_holder const& lhs, U const& rhs) { - return !lhs.comp()(rhs, lhs.get()) ? sprout::less_comparison(rhs, lhs.comp()) - : sprout::less_comparison() - ; - } - template - inline SPROUT_CONSTEXPR sprout::less_comparison - operator<=(sprout::comparison_holder const& lhs, U const& rhs) { - return lhs.get() <= rhs ? sprout::less_comparison(rhs) - : sprout::less_comparison() - ; - } - template - inline SPROUT_CONSTEXPR sprout::less_comparison - operator<=(sprout::less_comparison const& lhs, U const& rhs) { - return !lhs.comp()(rhs, lhs.get()) ? sprout::less_comparison(rhs, lhs.comp()) - : sprout::less_comparison() - ; - } - template - inline SPROUT_CONSTEXPR sprout::less_comparison - operator<=(sprout::less_comparison const& lhs, U const& rhs) { - return lhs && lhs.get() <= rhs ? sprout::less_comparison(rhs) - : sprout::less_comparison() - ; - } - // - // operator> - // operator>= - // operator== - // operator!= - // - template - SPROUT_NON_CONSTEXPR void - operator>(sprout::less_comparison const&, U const&) SPROUT_DELETED_FUNCTION_DECL - template - SPROUT_NON_CONSTEXPR void - operator>=(sprout::less_comparison const&, U const&) SPROUT_DELETED_FUNCTION_DECL - template - SPROUT_NON_CONSTEXPR void - operator==(sprout::less_comparison const&, U const&) SPROUT_DELETED_FUNCTION_DECL - template - SPROUT_NON_CONSTEXPR void - operator!=(sprout::less_comparison const&, U const&) SPROUT_DELETED_FUNCTION_DECL - - // - // greater_comparison - // - template - class greater_comparison - : public sprout::comparison_base - { - public: - typedef sprout::comparison_base base_type; - typedef typename base_type::value_type value_type; - typedef typename base_type::compare_type compare_type; - public: - SPROUT_CONSTEXPR greater_comparison() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - greater_comparison(greater_comparison const&) = default; - SPROUT_CONSTEXPR greater_comparison(value_type const& value, compare_type const& comp) - : base_type(value, comp) - {} - }; - template - class greater_comparison - : public sprout::comparison_base - { - public: - typedef sprout::comparison_base base_type; - typedef typename base_type::value_type value_type; - public: - SPROUT_CONSTEXPR greater_comparison() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - greater_comparison(greater_comparison const&) = default; - explicit SPROUT_CONSTEXPR greater_comparison(value_type const& value) - : base_type(value) - {} - }; - // - // operator> - // operator>= - // - template - inline SPROUT_CONSTEXPR sprout::greater_comparison - operator>(sprout::comparison_forwarder const& lhs, T const& rhs) { - return sprout::greater_comparison(rhs, lhs.comp()); - } - template - inline SPROUT_CONSTEXPR sprout::greater_comparison - operator>(sprout::comparison_forwarder<>, T const& rhs) { - return sprout::greater_comparison(rhs); - } - template - inline SPROUT_CONSTEXPR sprout::greater_comparison - operator>=(sprout::comparison_forwarder const& lhs, T const& rhs) { - return sprout::greater_comparison(rhs, lhs.comp()); - } - template - inline SPROUT_CONSTEXPR sprout::greater_comparison - operator>=(sprout::comparison_forwarder<>, T const& rhs) { - return sprout::greater_comparison(rhs); - } - // - // operator> - // - template - inline SPROUT_CONSTEXPR sprout::greater_comparison - operator>(sprout::comparison_holder const& lhs, U const& rhs) { - return lhs.comp()(rhs, lhs.get()) ? sprout::greater_comparison(rhs, lhs.comp()) - : sprout::greater_comparison() - ; - } - template - inline SPROUT_CONSTEXPR sprout::greater_comparison - operator>(sprout::comparison_holder const& lhs, U const& rhs) { - return rhs < lhs.get() ? sprout::greater_comparison(rhs) - : sprout::greater_comparison() - ; - } - template - inline SPROUT_CONSTEXPR sprout::greater_comparison - operator>(sprout::greater_comparison const& lhs, U const& rhs) { - return lhs.comp()(rhs, lhs.get()) ? sprout::greater_comparison(rhs, lhs.comp()) - : sprout::greater_comparison() - ; - } - template - inline SPROUT_CONSTEXPR sprout::greater_comparison - operator>(sprout::greater_comparison const& lhs, U const& rhs) { - return lhs && rhs < lhs.get() ? sprout::greater_comparison(rhs) - : sprout::greater_comparison() - ; - } - // - // operator>= - // - template - inline SPROUT_CONSTEXPR sprout::greater_comparison - operator>=(sprout::comparison_holder const& lhs, U const& rhs) { - return !lhs.comp()(lhs.get(), rhs) ? sprout::greater_comparison(rhs, lhs.comp()) - : sprout::greater_comparison() - ; - } - template - inline SPROUT_CONSTEXPR sprout::greater_comparison - operator>=(sprout::comparison_holder const& lhs, U const& rhs) { - return !(lhs.get() < rhs) ? sprout::greater_comparison(rhs) - : sprout::greater_comparison() - ; - } - template - inline SPROUT_CONSTEXPR sprout::greater_comparison - operator>=(sprout::greater_comparison const& lhs, U const& rhs) { - return !lhs.comp()(lhs.get(), rhs) ? sprout::greater_comparison(rhs, lhs.comp()) - : sprout::greater_comparison() - ; - } - template - inline SPROUT_CONSTEXPR sprout::greater_comparison - operator>=(sprout::greater_comparison const& lhs, U const& rhs) { - return lhs && !(lhs.get() < rhs) ? sprout::greater_comparison(rhs) - : sprout::greater_comparison() - ; - } - // - // operator< - // operator<= - // operator== - // operator!= - // - template - SPROUT_NON_CONSTEXPR void - operator<(sprout::greater_comparison const&, U const&) SPROUT_DELETED_FUNCTION_DECL - template - SPROUT_NON_CONSTEXPR void - operator<=(sprout::greater_comparison const&, U const&) SPROUT_DELETED_FUNCTION_DECL - template - SPROUT_NON_CONSTEXPR void - operator==(sprout::greater_comparison const&, U const&) SPROUT_DELETED_FUNCTION_DECL - template - SPROUT_NON_CONSTEXPR void - operator!=(sprout::greater_comparison const&, U const&) SPROUT_DELETED_FUNCTION_DECL - - // - // equal_comparison - // - template - class equal_comparison - : public sprout::comparison_base - { - public: - typedef sprout::comparison_base base_type; - typedef typename base_type::value_type value_type; - typedef typename base_type::compare_type compare_type; - public: - SPROUT_CONSTEXPR equal_comparison() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - equal_comparison(equal_comparison const&) = default; - SPROUT_CONSTEXPR equal_comparison(value_type const& value, compare_type const& comp) - : base_type(value, comp) - {} - }; - template - class equal_comparison - : public sprout::comparison_base - { - public: - typedef sprout::comparison_base base_type; - typedef typename base_type::value_type value_type; - public: - SPROUT_CONSTEXPR equal_comparison() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - equal_comparison(equal_comparison const&) = default; - explicit SPROUT_CONSTEXPR equal_comparison(value_type const& value) - : base_type(value) - {} - }; - // - // operator== - // - template - inline SPROUT_CONSTEXPR sprout::equal_comparison - operator==(sprout::comparison_forwarder const& lhs, T const& rhs) { - return sprout::equal_comparison(rhs, lhs.comp()); - } - template - inline SPROUT_CONSTEXPR sprout::equal_comparison - operator==(sprout::comparison_forwarder<>, T const& rhs) { - return sprout::equal_comparison(rhs); - } - // - // operator== - // - template - inline SPROUT_CONSTEXPR sprout::equal_comparison - operator==(sprout::comparison_holder const& lhs, U const& rhs) { - return !lhs.comp()(lhs.get(), rhs) && !lhs.comp()(rhs, lhs.get()) ? sprout::equal_comparison(rhs, lhs.comp()) - : sprout::equal_comparison() - ; - } - template - inline SPROUT_CONSTEXPR sprout::equal_comparison - operator==(sprout::comparison_holder const& lhs, U const& rhs) { - return !(lhs.get() < rhs) && !(rhs < lhs.get()) ? sprout::equal_comparison(rhs) - : sprout::equal_comparison() - ; - } - template - inline SPROUT_CONSTEXPR sprout::equal_comparison - operator==(sprout::equal_comparison const& lhs, U const& rhs) { - return !lhs.comp()(lhs.get(), rhs) && !lhs.comp()(rhs, lhs.get()) ? sprout::equal_comparison(rhs, lhs.comp()) - : sprout::equal_comparison() - ; - } - template - inline SPROUT_CONSTEXPR sprout::equal_comparison - operator==(sprout::equal_comparison const& lhs, U const& rhs) { - return lhs && !(lhs.get() < rhs) && !(rhs < lhs.get()) ? sprout::equal_comparison(rhs) - : sprout::equal_comparison() - ; - } - // - // operator< - // operator<= - // operator> - // operator>= - // operator!= - // - template - SPROUT_NON_CONSTEXPR void - operator<(sprout::equal_comparison const&, U const&) SPROUT_DELETED_FUNCTION_DECL - template - SPROUT_NON_CONSTEXPR void - operator<=(sprout::equal_comparison const&, U const&) SPROUT_DELETED_FUNCTION_DECL - template - SPROUT_NON_CONSTEXPR void - operator>(sprout::equal_comparison const&, U const&) SPROUT_DELETED_FUNCTION_DECL - template - SPROUT_NON_CONSTEXPR void - operator>=(sprout::equal_comparison const&, U const&) SPROUT_DELETED_FUNCTION_DECL - template - SPROUT_NON_CONSTEXPR void - operator!=(sprout::equal_comparison const&, U const&) SPROUT_DELETED_FUNCTION_DECL -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_COMPARISON_HPP diff --git a/dsp/lib/sprout/sprout/utility/dyn_cast.hpp b/dsp/lib/sprout/sprout/utility/dyn_cast.hpp deleted file mode 100644 index 3c9c5e1..0000000 --- a/dsp/lib/sprout/sprout/utility/dyn_cast.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_DYN_CAST_HPP -#define SPROUT_UTILITY_DYN_CAST_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // dyn_cast - // - template< - typename T, typename U, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR T - dyn_cast(U&& x) { - return static_cast(SPROUT_FORWARD(U, x)); - } - template< - typename T, typename U, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_NON_CONSTEXPR T - dyn_cast(U&& x) { - return dynamic_cast(SPROUT_FORWARD(U, x)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_DYN_CAST_HPP diff --git a/dsp/lib/sprout/sprout/utility/eat.hpp b/dsp/lib/sprout/sprout/utility/eat.hpp deleted file mode 100644 index 48b6599..0000000 --- a/dsp/lib/sprout/sprout/utility/eat.hpp +++ /dev/null @@ -1,21 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_EAT_HPP -#define SPROUT_UTILITY_EAT_HPP - -#include - -namespace sprout { - // - // eat - // - inline SPROUT_CXX14_CONSTEXPR void - eat(...) SPROUT_NOEXCEPT {} -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_EAT_HPP diff --git a/dsp/lib/sprout/sprout/utility/enabler_if.hpp b/dsp/lib/sprout/sprout/utility/enabler_if.hpp deleted file mode 100644 index 5cb5eff..0000000 --- a/dsp/lib/sprout/sprout/utility/enabler_if.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_ENABLER_IF_HPP -#define SPROUT_UTILITY_ENABLER_IF_HPP - -#include -#include - -#endif // #ifndef SPROUT_UTILITY_ENABLER_IF_HPP diff --git a/dsp/lib/sprout/sprout/utility/exchange.hpp b/dsp/lib/sprout/sprout/utility/exchange.hpp deleted file mode 100644 index 8f266b5..0000000 --- a/dsp/lib/sprout/sprout/utility/exchange.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_EXCAHNGE_HPP -#define SPROUT_UTILITY_EXCAHNGE_HPP - -#include -#include -#include - -namespace sprout { - // - // 20.2.3 exchange - // - template - inline SPROUT_CXX14_CONSTEXPR T - exchange(T& obj, U&& new_val) { - T old_val = sprout::move(obj); - obj = SPROUT_FORWARD(U, new_val); - return old_val; - } -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_EXCAHNGE_HPP diff --git a/dsp/lib/sprout/sprout/utility/fold.hpp b/dsp/lib/sprout/sprout/utility/fold.hpp deleted file mode 100644 index cca979f..0000000 --- a/dsp/lib/sprout/sprout/utility/fold.hpp +++ /dev/null @@ -1,98 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_FOLD_HPP -#define SPROUT_UTILITY_FOLD_HPP - -#include -#include -#include - -namespace sprout { - template - class folder_forwarder { - public: - typedef BinaryOperation function_type; - private: - function_type binary_op_; - public: - explicit SPROUT_CONSTEXPR folder_forwarder(function_type const& binary_op) - : binary_op_(binary_op) - {} - SPROUT_CONSTEXPR function_type const& func() const { - return binary_op_; - } - }; - - template - class folder { - public: - typedef BinaryOperation function_type; - typedef T value_type; - private: - function_type binary_op_; - value_type value_; - public: - explicit SPROUT_CONSTEXPR folder(function_type const& binary_op, value_type const& value) - : binary_op_(binary_op), value_(value) - {} - template - SPROUT_CXX14_CONSTEXPR folder& left(U&& val) { - return (value_ = binary_op_(value_, SPROUT_FORWARD(U, val))), *this; - } - template - SPROUT_CXX14_CONSTEXPR folder& right(U&& val) { - return (value_ = binary_op_(SPROUT_FORWARD(U, val), value_)), *this; - } - SPROUT_CONSTEXPR function_type const& func() const { - return binary_op_; - } - SPROUT_CONSTEXPR value_type value() const { - return value_; - } - SPROUT_CONSTEXPR value_type get() const { - return value_; - } - SPROUT_CONSTEXPR operator value_type() const { - return value_; - } - }; - - template - inline SPROUT_CONSTEXPR sprout::folder - operator,(sprout::folder_forwarder const& lhs, T&& rhs) { - return sprout::folder(lhs.func(), SPROUT_FORWARD(T, rhs)); - } - template - inline SPROUT_CONSTEXPR sprout::folder - operator,(T&& lhs, sprout::folder_forwarder const& rhs) { - return sprout::folder(rhs.func(), SPROUT_FORWARD(T, lhs)); - } - template - inline SPROUT_CONSTEXPR sprout::folder&& - operator,(sprout::folder&& lhs, U&& rhs) { - return sprout::move(lhs.left(SPROUT_FORWARD(U, rhs))); - } - template - inline SPROUT_CONSTEXPR sprout::folder&& - operator,(U&& lhs, sprout::folder&& rhs) { - return sprout::move(rhs.right(SPROUT_FORWARD(U, lhs))); - } - - template - inline SPROUT_CONSTEXPR sprout::folder_forwarder - fold_by(BinaryOperation const& binary_op) { - return sprout::folder_forwarder(binary_op); - } - template - inline SPROUT_CONSTEXPR sprout::folder - fold_by(BinaryOperation const& binary_op, T&& init) { - return sprout::folder(binary_op, SPROUT_FORWARD(T, init)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_FOLD_HPP diff --git a/dsp/lib/sprout/sprout/utility/forward.hpp b/dsp/lib/sprout/sprout/utility/forward.hpp deleted file mode 100644 index 0942a95..0000000 --- a/dsp/lib/sprout/sprout/utility/forward.hpp +++ /dev/null @@ -1,57 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_FORWARD_HPP -#define SPROUT_UTILITY_FORWARD_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // forward - // - template - inline SPROUT_CONSTEXPR T&& - forward(typename std::remove_reference::type& t) SPROUT_NOEXCEPT { - return static_cast(t); - } - template - inline SPROUT_CONSTEXPR T&& - forward(typename std::remove_reference::type&&) SPROUT_NOEXCEPT SPROUT_DELETED_FUNCTION_DECL -} // namespace sprout - -#if defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) -# define SPROUT_FORWARD_2(TYPE, VAR) \ - static_cast(VAR))>(VAR) -#else -# define SPROUT_FORWARD_2(TYPE, VAR) \ - ::sprout::forward(VAR) -#endif - -// -// SPROUT_AUTO_FORWARD -// -#define SPROUT_AUTO_FORWARD(VAR) SPROUT_FORWARD_2(decltype(VAR), VAR) - -// -// SPROUT_FORWARD -// -#if SPROUT_PP_VARIADICS && !defined(_MSC_VER) -# define SPROUT_FORWARD_1(VAR) \ - SPROUT_AUTO_FORWARD(VAR) -# define SPROUT_FORWARD(...) \ - SPROUT_PP_CAT(SPROUT_FORWARD_, SPROUT_PP_VARIADIC_SIZE(__VA_ARGS__))(__VA_ARGS__) -#else -# define SPROUT_FORWARD(TYPE, VAR) \ - SPROUT_FORWARD_2(TYPE, VAR) -#endif - -#endif // #ifndef SPROUT_UTILITY_FORWARD_HPP diff --git a/dsp/lib/sprout/sprout/utility/ignore_unused.hpp b/dsp/lib/sprout/sprout/utility/ignore_unused.hpp deleted file mode 100644 index 282c0c4..0000000 --- a/dsp/lib/sprout/sprout/utility/ignore_unused.hpp +++ /dev/null @@ -1,21 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_IGNORE_UNUSED_HPP -#define SPROUT_UTILITY_IGNORE_UNUSED_HPP - -#include - -namespace sprout { - // - // ignore_unused - // - inline SPROUT_CXX14_CONSTEXPR void - ignore_unused(...) SPROUT_NOEXCEPT {} -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_IGNORE_UNUSED_HPP diff --git a/dsp/lib/sprout/sprout/utility/implicit_cast.hpp b/dsp/lib/sprout/sprout/utility/implicit_cast.hpp deleted file mode 100644 index 069cc62..0000000 --- a/dsp/lib/sprout/sprout/utility/implicit_cast.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_IMPLICIT_CAST_HPP -#define SPROUT_UTILITY_IMPLICIT_CAST_HPP - -#include -#include - -namespace sprout { - // - // implicit_cast - // - template - inline SPROUT_CONSTEXPR T - implicit_cast(typename sprout::identity::type t) { - return t; - } -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_IMPLICIT_CAST_HPP diff --git a/dsp/lib/sprout/sprout/utility/limited.hpp b/dsp/lib/sprout/sprout/utility/limited.hpp deleted file mode 100644 index 3c39f13..0000000 --- a/dsp/lib/sprout/sprout/utility/limited.hpp +++ /dev/null @@ -1,53 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_INTEGER_LIMITED_HPP -#define SPROUT_INTEGER_LIMITED_HPP - -#include -#include -#include - -namespace sprout { - namespace limited { - // - // plus - // - template - inline SPROUT_CONSTEXPR typename sprout::arithmetic_promote::type - plus(T const& lhs, U const& rhs) { - typedef typename sprout::arithmetic_promote::type type; - return lhs > 0 && rhs > 0 && sprout::numeric_limits::max() - lhs < rhs - ? sprout::numeric_limits::max() - : lhs < 0 && rhs < 0 && sprout::numeric_limits::min() - lhs > rhs - ? sprout::numeric_limits::min() - : lhs + rhs - ; - } - - // - // multiplies - // - template - inline SPROUT_CONSTEXPR typename sprout::arithmetic_promote::type - multiplies(T const& lhs, U const& rhs) { - typedef typename sprout::arithmetic_promote::type type; - return lhs > 0 && rhs > 0 && sprout::numeric_limits::max() / lhs + (sprout::numeric_limits::max() % lhs ? 1 : 0) <= rhs - ? sprout::numeric_limits::max() - : lhs > 0 && rhs < 0 && sprout::numeric_limits::min() / rhs + (sprout::numeric_limits::min() % rhs ? 1 : 0) <= lhs - ? sprout::numeric_limits::min() - : lhs < 0 && rhs > 0 && sprout::numeric_limits::min() / lhs + (sprout::numeric_limits::min() % lhs ? 1 : 0) <= rhs - ? sprout::numeric_limits::min() - : lhs < 0 && rhs < 0 && -(sprout::numeric_limits::min() / rhs + (sprout::numeric_limits::min() % rhs ? 1 : 0)) >= lhs - ? sprout::numeric_limits::max() - : lhs * rhs - ; - } - } // namespace limited -} // namespace sprout - -#endif // #ifndef SPROUT_INTEGER_LIMITED_HPP diff --git a/dsp/lib/sprout/sprout/utility/loop.hpp b/dsp/lib/sprout/sprout/utility/loop.hpp deleted file mode 100644 index 06a48f8..0000000 --- a/dsp/lib/sprout/sprout/utility/loop.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_LOOP_HPP -#define SPROUT_UTILITY_LOOP_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_UTILITY_LOOP_HPP diff --git a/dsp/lib/sprout/sprout/utility/lvalue_forward.hpp b/dsp/lib/sprout/sprout/utility/lvalue_forward.hpp deleted file mode 100644 index 96f8e7a..0000000 --- a/dsp/lib/sprout/sprout/utility/lvalue_forward.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_LVALUE_FORWARD_HPP -#define SPROUT_UTILITY_LVALUE_FORWARD_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // lvalue_forward - // - template - inline SPROUT_CONSTEXPR typename sprout::lvalue_reference::type - lvalue_forward(typename std::remove_reference::type& t) { - return sprout::as_lvalue(SPROUT_FORWARD(T, t)); - } - template - inline SPROUT_CONSTEXPR typename sprout::lvalue_reference::type - lvalue_forward(typename std::remove_reference::type&&) SPROUT_DELETED_FUNCTION_DECL -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_LVALUE_FORWARD_HPP diff --git a/dsp/lib/sprout/sprout/utility/move.hpp b/dsp/lib/sprout/sprout/utility/move.hpp deleted file mode 100644 index 09a63b9..0000000 --- a/dsp/lib/sprout/sprout/utility/move.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_MOVE_HPP -#define SPROUT_UTILITY_MOVE_HPP - -#include -#include - -namespace sprout { - // - // move - // - template - inline SPROUT_CONSTEXPR typename std::remove_reference::type&& - move(T&& x) SPROUT_NOEXCEPT { - return static_cast::type&&>(x); - } - - // - // move_if_noexcept - // - template - inline SPROUT_CONSTEXPR typename std::conditional< - !std::is_nothrow_move_constructible::value && std::is_copy_constructible::value, - T const&, - T&& - >::type - move_if_noexcept(T& x) SPROUT_NOEXCEPT { - return sprout::move(x); - } -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_MOVE_HPP diff --git a/dsp/lib/sprout/sprout/utility/noncopyable.hpp b/dsp/lib/sprout/sprout/utility/noncopyable.hpp deleted file mode 100644 index 9b50fa7..0000000 --- a/dsp/lib/sprout/sprout/utility/noncopyable.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_NONCOPYABLE_HPP -#define SPROUT_UTILITY_NONCOPYABLE_HPP - -#include - -namespace sprout { - namespace noncopyable_detail { - class noncopyable { - protected: - SPROUT_CONSTEXPR noncopyable() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - ~noncopyable() SPROUT_DEFAULTED_DESTRUCTOR_DECL - private: - noncopyable(noncopyable const&) SPROUT_DELETED_FUNCTION_DECL - noncopyable& operator=(noncopyable const&) SPROUT_DELETED_FUNCTION_DECL - }; - } // namespace noncopyable_detail - // - // noncopyable - // - typedef sprout::noncopyable_detail::noncopyable noncopyable; -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_NONCOPYABLE_HPP diff --git a/dsp/lib/sprout/sprout/utility/operation.hpp b/dsp/lib/sprout/sprout/utility/operation.hpp deleted file mode 100644 index c0422a2..0000000 --- a/dsp/lib/sprout/sprout/utility/operation.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_OPERATION_HPP -#define SPROUT_UTILITY_OPERATION_HPP - -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_UTILITY_OPERATION_HPP diff --git a/dsp/lib/sprout/sprout/utility/operation_ext.hpp b/dsp/lib/sprout/sprout/utility/operation_ext.hpp deleted file mode 100644 index 62242a2..0000000 --- a/dsp/lib/sprout/sprout/utility/operation_ext.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_OPERATION_EXT_HPP -#define SPROUT_UTILITY_OPERATION_EXT_HPP - -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_UTILITY_OPERATION_EXT_HPP diff --git a/dsp/lib/sprout/sprout/utility/pack.hpp b/dsp/lib/sprout/sprout/utility/pack.hpp deleted file mode 100644 index 12cee72..0000000 --- a/dsp/lib/sprout/sprout/utility/pack.hpp +++ /dev/null @@ -1,84 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_PACK_HPP -#define SPROUT_UTILITY_PACK_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // pack_element - // - template - struct pack_element - : public std::tuple_element > - {}; - - // - // pack_element_c - // - template - struct pack_element_c - : public sprout::pack_element...> - {}; - - // - // pack_get - // - namespace detail { - template - struct pack_get_helper; - template - struct pack_get_helper > { - template - static SPROUT_CONSTEXPR Head&& - eval(Args&&..., Head&& head, Tail&&...) { - return SPROUT_FORWARD(Head, head); - } - }; - } // namespace detail - template - inline SPROUT_CONSTEXPR typename sprout::pack_element::type - pack_get(Args&&... args) { - return sprout::detail::pack_get_helper< - typename sprout::types::detail::tuple_take >::type - >::eval(SPROUT_FORWARD(Args, args)...); - } - - // - // head_element - // - template - struct head_element; - template - struct head_element - : public sprout::identity - {}; - template<> - struct head_element<> - : public sprout::detail::nil_base - {}; - - // - // head_get - // - template - inline SPROUT_CONSTEXPR Head&& - head_get(Head&& head, Tail&&...) { - return SPROUT_FORWARD(Head, head); - } -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_PACK_HPP diff --git a/dsp/lib/sprout/sprout/utility/pair.hpp b/dsp/lib/sprout/sprout/utility/pair.hpp deleted file mode 100644 index ac64fd8..0000000 --- a/dsp/lib/sprout/sprout/utility/pair.hpp +++ /dev/null @@ -1,21 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_PAIR_HPP -#define SPROUT_UTILITY_PAIR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_UTILITY_PAIR_HPP diff --git a/dsp/lib/sprout/sprout/utility/pair/access.hpp b/dsp/lib/sprout/sprout/utility/pair/access.hpp deleted file mode 100644 index 9cc1933..0000000 --- a/dsp/lib/sprout/sprout/utility/pair/access.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_PAIR_ACCESS_HPP -#define SPROUT_UTILITY_PAIR_ACCESS_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_UTILITY_PAIR_ACCESS_HPP diff --git a/dsp/lib/sprout/sprout/utility/pair/comparison.hpp b/dsp/lib/sprout/sprout/utility/pair/comparison.hpp deleted file mode 100644 index cb8d85c..0000000 --- a/dsp/lib/sprout/sprout/utility/pair/comparison.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_PAIR_COMPARISON_HPP -#define SPROUT_UTILITY_PAIR_COMPARISON_HPP - -#include -#include - -namespace sprout { - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::pair const& x, sprout::pair const& y) { - return x.first == y.first && x.second == y.second; - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::pair const& x, sprout::pair const& y) { - return !(x == y); - } - template - inline SPROUT_CONSTEXPR bool - operator<(sprout::pair const& x, sprout::pair const& y) { - return ((x.first) < (y.first)) || (!((y.first) < (x.first)) && ((x.second) < (y.second))); - } - template - inline SPROUT_CONSTEXPR bool - operator>(sprout::pair const& x, sprout::pair const& y) { - return y < x; - } - template - inline SPROUT_CONSTEXPR bool - operator<=(sprout::pair const& x, sprout::pair const& y) { - return !(y < x); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(sprout::pair const& x, sprout::pair const& y) { - return !(x < y); - } -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_PAIR_COMPARISON_HPP diff --git a/dsp/lib/sprout/sprout/utility/pair/first.hpp b/dsp/lib/sprout/sprout/utility/pair/first.hpp deleted file mode 100644 index c568853..0000000 --- a/dsp/lib/sprout/sprout/utility/pair/first.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_PAIR_FIRST_HPP -#define SPROUT_UTILITY_PAIR_FIRST_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // first - // - template - inline SPROUT_CONSTEXPR auto - first(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::tuples::get<0>(SPROUT_FORWARD(T, t))) - -> decltype(sprout::tuples::get<0>(SPROUT_FORWARD(T, t))) - { - return sprout::tuples::get<0>(SPROUT_FORWARD(T, t)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_PAIR_FIRST_HPP diff --git a/dsp/lib/sprout/sprout/utility/pair/hash.hpp b/dsp/lib/sprout/sprout/utility/pair/hash.hpp deleted file mode 100644 index 56ae464..0000000 --- a/dsp/lib/sprout/sprout/utility/pair/hash.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_PAIR_HASH_HPP -#define SPROUT_UTILITY_PAIR_HASH_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // hash_value - // - template - inline SPROUT_CONSTEXPR std::size_t - hash_value(sprout::pair const& v) { - return sprout::hash_values(v.first, v.second); - } -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // hash - // - template - struct hash > - : public sprout::hash > - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -#endif // #ifndef SPROUT_UTILITY_PAIR_HASH_HPP diff --git a/dsp/lib/sprout/sprout/utility/pair/make_pair.hpp b/dsp/lib/sprout/sprout/utility/pair/make_pair.hpp deleted file mode 100644 index 8f2b896..0000000 --- a/dsp/lib/sprout/sprout/utility/pair/make_pair.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_PAIR_MAKE_PAIR_HPP -#define SPROUT_UTILITY_PAIR_MAKE_PAIR_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // make_pair - // - template - inline SPROUT_CONSTEXPR sprout::pair< - typename sprout::strip_reference::type>::type, - typename sprout::strip_reference::type>::type - > - make_pair(T1&& x, T2&& y) { - return sprout::pair< - typename sprout::strip_reference::type>::type, - typename sprout::strip_reference::type>::type - >( - SPROUT_FORWARD(T1, x), - SPROUT_FORWARD(T2, y) - ); - } -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_PAIR_MAKE_PAIR_HPP diff --git a/dsp/lib/sprout/sprout/utility/pair/pair.hpp b/dsp/lib/sprout/sprout/utility/pair/pair.hpp deleted file mode 100644 index ecc13f3..0000000 --- a/dsp/lib/sprout/sprout/utility/pair/pair.hpp +++ /dev/null @@ -1,92 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_PAIR_PAIR_HPP -#define SPROUT_UTILITY_PAIR_PAIR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // pair - // - template - template - inline SPROUT_CONSTEXPR sprout::pair::pair( - sprout::tuples::tuple first_args, sprout::tuples::tuple second_args, - sprout::index_tuple, sprout::index_tuple - ) - : first(sprout::tuples::get(first_args)...) - , second(sprout::tuples::get(second_args)...) - {} -#if SPROUT_USE_DELEGATING_CONSTRUCTORS - template - template< - typename... Args1, typename... Args2, - typename - > - inline SPROUT_CONSTEXPR sprout::pair::pair( - std::piecewise_construct_t, - sprout::tuples::tuple first_args, sprout::tuples::tuple second_args - ) - : pair( - first_args, - second_args, - sprout::index_pack::make(), - sprout::index_pack::make() - ) - {} -#endif // #if SPROUT_USE_DELEGATING_CONSTRUCTORS - template - template< - typename U, typename V, - typename - > - inline SPROUT_CONSTEXPR sprout::pair::pair(sprout::tuples::tuple const& other) - : first(sprout::tuples::get<0>(other)) - , second(sprout::tuples::get<1>(other)) - {} - template - template< - typename U, typename V, - typename - > - inline SPROUT_CONSTEXPR sprout::pair::pair(sprout::tuples::tuple&& other) - : first(SPROUT_FORWARD(U, sprout::tuples::get<0>(other))) - , second(SPROUT_FORWARD(V, sprout::tuples::get<1>(other))) - {} - - template - template< - typename U, typename V, - typename - > - inline SPROUT_CXX14_CONSTEXPR sprout::pair& sprout::pair::operator=(sprout::tuples::tuple const& rhs) { - first = sprout::tuples::get<0>(rhs); - second = sprout::tuples::get<0>(rhs); - return *this; - } - template - template< - typename U, typename V, - typename - > - inline SPROUT_CXX14_CONSTEXPR sprout::pair& sprout::pair::operator=(sprout::tuples::tuple&& rhs) { - first = SPROUT_FORWARD(U, sprout::tuples::get<0>(rhs)); - second = SPROUT_FORWARD(V, sprout::tuples::get<1>(rhs)); - return *this; - } -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_PAIR_PAIR_HPP diff --git a/dsp/lib/sprout/sprout/utility/pair/pair_decl.hpp b/dsp/lib/sprout/sprout/utility/pair/pair_decl.hpp deleted file mode 100644 index b513ed2..0000000 --- a/dsp/lib/sprout/sprout/utility/pair/pair_decl.hpp +++ /dev/null @@ -1,186 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_PAIR_PAIR_DECL_HPP -#define SPROUT_UTILITY_PAIR_PAIR_DECL_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // pair - // - template - struct pair { - public: - typedef T1 first_type; - typedef T2 second_type; - public: - T1 first; - T2 second; - private: - template - SPROUT_CONSTEXPR pair( - sprout::tuples::tuple first_args, sprout::tuples::tuple second_args, - sprout::index_tuple, sprout::index_tuple - ); - public: - SPROUT_CONSTEXPR pair() - : first() - , second() - {} - pair(pair const&) = default; - pair(pair&&) = default; - SPROUT_CONSTEXPR pair(T1 const& x, T2 const& y) - : first(x) - , second(y) - {} - template< - typename U, typename V, - typename = typename std::enable_if< - std::is_constructible::value && std::is_constructible::value - >::type - > - SPROUT_CONSTEXPR pair(U&& x, V&& y) - : first(SPROUT_FORWARD(U, x)) - , second(SPROUT_FORWARD(V, y)) - {} - template< - typename U, typename V, - typename = typename std::enable_if< - std::is_constructible::value && std::is_constructible::value - >::type - > - SPROUT_CONSTEXPR pair(sprout::pair const& other) - : first(other.first) - , second(other.second) - {} - template< - typename U, typename V, - typename = typename std::enable_if< - std::is_constructible::value && std::is_constructible::value - >::type - > - SPROUT_CONSTEXPR pair(sprout::pair&& other) - : first(SPROUT_FORWARD(U, other.first)) - , second(SPROUT_FORWARD(V, other.second)) - {} - template< - typename... Args1, typename... Args2, - typename = typename std::enable_if< - std::is_constructible::value && std::is_constructible::value - >::type - > - SPROUT_CONSTEXPR pair( - std::piecewise_construct_t, - sprout::tuples::tuple first_args, sprout::tuples::tuple second_args - ); - - template< - typename U, typename V, - typename = typename std::enable_if< - std::is_constructible::value && std::is_constructible::value - >::type - > - SPROUT_CONSTEXPR pair(sprout::tuples::tuple const& other); - template< - typename U, typename V, - typename = typename std::enable_if< - std::is_constructible::value && std::is_constructible::value - >::type - > - SPROUT_CONSTEXPR pair(sprout::tuples::tuple&& other); - - SPROUT_CXX14_CONSTEXPR pair& operator=(pair const& rhs) { - first = rhs.first; - second = rhs.second; - return *this; - } - SPROUT_CXX14_CONSTEXPR pair& operator=(pair&& rhs) - SPROUT_NOEXCEPT_IF(std::is_nothrow_move_assignable::value && std::is_nothrow_move_assignable::value) - { - first = SPROUT_FORWARD(T1, rhs.first); - second = SPROUT_FORWARD(T2, rhs.second); - return *this; - } - template< - typename U, typename V, - typename = typename std::enable_if< - std::is_assignable::value && std::is_assignable::value - >::type - > - SPROUT_CXX14_CONSTEXPR pair& operator=(sprout::pair const& rhs) { - first = rhs.first; - second = rhs.second; - return *this; - } - template< - typename U, typename V, - typename = typename std::enable_if< - std::is_assignable::value && std::is_assignable::value - >::type - > - SPROUT_CXX14_CONSTEXPR pair& operator=(sprout::pair&& rhs) { - first = SPROUT_FORWARD(U, rhs.first); - second = SPROUT_FORWARD(V, rhs.second); - return *this; - } - template< - typename U, typename V, - typename = typename std::enable_if< - std::is_assignable::value && std::is_assignable::value - >::type - > - SPROUT_CXX14_CONSTEXPR pair& operator=(sprout::tuples::tuple const& rhs); - template< - typename U, typename V, - typename = typename std::enable_if< - std::is_assignable::value && std::is_assignable::value - >::type - > - SPROUT_CXX14_CONSTEXPR pair& - operator=(sprout::tuples::tuple&& rhs); - - SPROUT_CXX14_CONSTEXPR void - swap(pair& other) - SPROUT_NOEXCEPT_IF( - SPROUT_NOEXCEPT_EXPR(sprout::swap(first, other.first)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(second, other.second)) - ) - { - sprout::swap(first, other.first); - sprout::swap(second, other.second); - } - - SPROUT_EXPLICIT_CONVERSION SPROUT_CONSTEXPR operator std::pair() const - SPROUT_NOEXCEPT_IF(sprout::is_nothrow_copy_constructible::value && sprout::is_nothrow_copy_constructible::value) - { - return std::pair(first, second); - } - }; - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::pair& lhs, sprout::pair& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_PAIR_PAIR_DECL_HPP diff --git a/dsp/lib/sprout/sprout/utility/pair/pair_fwd.hpp b/dsp/lib/sprout/sprout/utility/pair/pair_fwd.hpp deleted file mode 100644 index a223a79..0000000 --- a/dsp/lib/sprout/sprout/utility/pair/pair_fwd.hpp +++ /dev/null @@ -1,21 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_PAIR_PAIR_FWD_HPP -#define SPROUT_UTILITY_PAIR_PAIR_FWD_HPP - -#include - -namespace sprout { - // - // pair - // - template - struct pair; -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_PAIR_PAIR_FWD_HPP diff --git a/dsp/lib/sprout/sprout/utility/pair/second.hpp b/dsp/lib/sprout/sprout/utility/pair/second.hpp deleted file mode 100644 index 393df5f..0000000 --- a/dsp/lib/sprout/sprout/utility/pair/second.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_PAIR_SECOND_HPP -#define SPROUT_UTILITY_PAIR_SECOND_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // second - // - template - inline SPROUT_CONSTEXPR auto - second(T&& t) - SPROUT_NOEXCEPT_IF_EXPR(sprout::tuples::get<1>(SPROUT_FORWARD(T, t))) - -> decltype(sprout::tuples::get<1>(SPROUT_FORWARD(T, t))) - { - return sprout::tuples::get<1>(SPROUT_FORWARD(T, t)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_PAIR_SECOND_HPP diff --git a/dsp/lib/sprout/sprout/utility/pair/tuple.hpp b/dsp/lib/sprout/sprout/utility/pair/tuple.hpp deleted file mode 100644 index b5bd715..0000000 --- a/dsp/lib/sprout/sprout/utility/pair/tuple.hpp +++ /dev/null @@ -1,111 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_PAIR_TUPLE_HPP -#define SPROUT_UTILITY_PAIR_TUPLE_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace tuples { - namespace detail { - template - struct tuple_element_impl; - template - struct tuple_element_impl > - : public sprout::detail::nil_base - {}; - template - struct tuple_element_impl<0, sprout::pair > - : public sprout::identity - {}; - template - struct tuple_element_impl<1, sprout::pair > - : public sprout::identity - {}; - - template - struct get_impl; - template - struct get_impl<0, sprout::pair > { - public: - SPROUT_CONSTEXPR T1& operator()(sprout::pair& t) const { - return t.first; - } - SPROUT_CONSTEXPR T1 const& operator()(sprout::pair const& t) const { - return t.first; - } - }; - template - struct get_impl<1, sprout::pair > { - public: - SPROUT_CONSTEXPR T2& operator()(sprout::pair& t) const { - return t.second; - } - SPROUT_CONSTEXPR T2 const& operator()(sprout::pair const& t) const { - return t.second; - } - }; - } // namespace detail - } // namespace tuples -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // tuple_size - // - template - struct tuple_size > - : public sprout::integral_constant - {}; - - // - // tuple_element - // - template - struct tuple_element > - : public sprout::tuples::detail::tuple_element_impl > - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -namespace sprout { - // - // tuple_get - // - template - inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element >::type& - tuple_get(sprout::pair& t) SPROUT_NOEXCEPT { - static_assert(I < 2, "tuple_get: index out of range"); - return sprout::tuples::detail::get_impl >()(t); - } - template - inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element >::type const& - tuple_get(sprout::pair const& t) SPROUT_NOEXCEPT { - static_assert(I < 2, "tuple_get: index out of range"); - return sprout::tuples::detail::get_impl >()(t); - } - template - inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element >::type&& - tuple_get(sprout::pair&& t) SPROUT_NOEXCEPT { - return sprout::move(sprout::tuples::get(t)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_PAIR_TUPLE_HPP diff --git a/dsp/lib/sprout/sprout/utility/pass_through.hpp b/dsp/lib/sprout/sprout/utility/pass_through.hpp deleted file mode 100644 index 4b331c2..0000000 --- a/dsp/lib/sprout/sprout/utility/pass_through.hpp +++ /dev/null @@ -1,24 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_PASS_THROUGH_HPP -#define SPROUT_UTILITY_PASS_THROUGH_HPP - -#include - -namespace sprout { - // - // pass_through - // - template - constexpr T&& - pass_through(T&& t) { - return static_cast(t); - } -} // namespace sprout - -#endif // #ifndef SPROUT_MATH_ACOS_HPP diff --git a/dsp/lib/sprout/sprout/utility/reinter_cast.hpp b/dsp/lib/sprout/sprout/utility/reinter_cast.hpp deleted file mode 100644 index 5d9818b..0000000 --- a/dsp/lib/sprout/sprout/utility/reinter_cast.hpp +++ /dev/null @@ -1,54 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_REINTER_CAST_HPP -#define SPROUT_UTILITY_REINTER_CAST_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - struct is_same_reinterpret_cast - : public sprout::bool_constant< - (std::is_reference::value - && std::is_same::type, typename std::decay::type>::value - && std::is_convertible::value - ) - || ((std::is_integral::type || std::is_enum::type || std::is_pointer::type) - && std::is_same::type, To>::value - ) - - > - {}; - } // namespace detail - // - // reinter_cast - // - template< - typename T, typename U, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR T - reinter_cast(U&& x) { - return SPROUT_FORWARD(U, x); - } - template< - typename T, typename U, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_NON_CONSTEXPR T - reinter_cast(U&& x) { - return reinterpret_cast(SPROUT_FORWARD(U, x)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_REINTER_CAST_HPP diff --git a/dsp/lib/sprout/sprout/utility/rel_ops.hpp b/dsp/lib/sprout/sprout/utility/rel_ops.hpp deleted file mode 100644 index 1b896c4..0000000 --- a/dsp/lib/sprout/sprout/utility/rel_ops.hpp +++ /dev/null @@ -1,50 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_REL_OPS_HPP -#define SPROUT_UTILITY_REL_OPS_HPP - -#include - -namespace sprout { - namespace rel_ops { - // - // operator!= - // - template - inline SPROUT_CONSTEXPR bool - operator!=(T const& x, T const& y) { - return !(x == y); - } - // - // operator> - // - template - inline SPROUT_CONSTEXPR bool - operator>(T const& x, T const& y) { - return y < x; - } - // - // operator<= - // - template - inline SPROUT_CONSTEXPR bool - operator<=(T const& x, T const& y) { - return !(y < x); - } - // - // operator>= - // - template - inline SPROUT_CONSTEXPR bool - operator>=(T const& x, T const& y) { - return !(x < y); - } - } // namespace rel_ops -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_REL_OPS_HPP diff --git a/dsp/lib/sprout/sprout/utility/string_ref.hpp b/dsp/lib/sprout/sprout/utility/string_ref.hpp deleted file mode 100644 index 3d6f6ce..0000000 --- a/dsp/lib/sprout/sprout/utility/string_ref.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_STRING_REF_HPP -#define SPROUT_UTILITY_STRING_REF_HPP - -#include -#include - -#endif // #ifndef SPROUT_UTILITY_STRING_REF_HPP diff --git a/dsp/lib/sprout/sprout/utility/string_view.hpp b/dsp/lib/sprout/sprout/utility/string_view.hpp deleted file mode 100644 index 7158d17..0000000 --- a/dsp/lib/sprout/sprout/utility/string_view.hpp +++ /dev/null @@ -1,22 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_STRING_VIEW_HPP -#define SPROUT_UTILITY_STRING_VIEW_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_UTILITY_STRING_VIEW_HPP diff --git a/dsp/lib/sprout/sprout/utility/string_view/alias.hpp b/dsp/lib/sprout/sprout/utility/string_view/alias.hpp deleted file mode 100644 index e7be280..0000000 --- a/dsp/lib/sprout/sprout/utility/string_view/alias.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_STRING_VIEW_ALIAS_HPP -#define SPROUT_UTILITY_STRING_VIEW_ALIAS_HPP - -#include -#include - -namespace sprout { - // - // string_view - // wstring_view - // u16string_view - // u32string_view - // - typedef sprout::basic_string_view string_view; - typedef sprout::basic_string_view wstring_view; -#if SPROUT_USE_UNICODE_LITERALS - typedef sprout::basic_string_view u16string_view; - typedef sprout::basic_string_view u32string_view; -#endif -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_STRING_VIEW_ALIAS_HPP diff --git a/dsp/lib/sprout/sprout/utility/string_view/comparison.hpp b/dsp/lib/sprout/sprout/utility/string_view/comparison.hpp deleted file mode 100644 index 2848c21..0000000 --- a/dsp/lib/sprout/sprout/utility/string_view/comparison.hpp +++ /dev/null @@ -1,116 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_STRING_VIEW_COMPARISON_HPP -#define SPROUT_UTILITY_STRING_VIEW_COMPARISON_HPP - -#include -#include -#include - -namespace sprout { - // - // operator== - // operator!= - // operator< - // operator> - // operator<= - // operator>= - // - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::basic_string_view const& lhs, sprout::basic_string_view const& rhs) { - return lhs.compare(rhs) == 0; - } - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::basic_string_view const& lhs, T const* rhs) { - return lhs.compare(rhs) == 0; - } - template - inline SPROUT_CONSTEXPR bool - operator==(T const* lhs, sprout::basic_string_view const& rhs) { - return 0 == rhs.compare(lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::basic_string_view const& lhs, sprout::basic_string_view const& rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::basic_string_view const& lhs, T const* rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(T const* lhs, sprout::basic_string_view const& rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator<(sprout::basic_string_view const& lhs, sprout::basic_string_view const& rhs) { - return lhs.compare(rhs) < 0; - } - template - inline SPROUT_CONSTEXPR bool - operator<(sprout::basic_string_view const& lhs, T const* rhs) { - return lhs.compare(rhs) < 0; - } - template - inline SPROUT_CONSTEXPR bool - operator<(T const* lhs, sprout::basic_string_view const& rhs) { - return 0 < rhs.compare(lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>(sprout::basic_string_view const& lhs, sprout::basic_string_view const& rhs) { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator>(sprout::basic_string_view const& lhs, T const* rhs) { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator>(T const* lhs, sprout::basic_string_view const& rhs) { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator<=(sprout::basic_string_view const& lhs, sprout::basic_string_view const& rhs) { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator<=(sprout::basic_string_view const& lhs, T const* rhs) { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator<=(T const* lhs, sprout::basic_string_view const& rhs) { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(sprout::basic_string_view const& lhs, sprout::basic_string_view const& rhs) { - return !(lhs < rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(sprout::basic_string_view const& lhs, T const* rhs) { - return !(lhs < rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(T const* lhs, sprout::basic_string_view const& rhs) { - return !(lhs < rhs); - } -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_STRING_VIEW_COMPARISON_HPP diff --git a/dsp/lib/sprout/sprout/utility/string_view/conversion.hpp b/dsp/lib/sprout/sprout/utility/string_view/conversion.hpp deleted file mode 100644 index 9569af7..0000000 --- a/dsp/lib/sprout/sprout/utility/string_view/conversion.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_STRING_VIEW_CONVERSION_HPP -#define SPROUT_UTILITY_STRING_VIEW_CONVERSION_HPP - -#include -#include - -#endif // #ifndef SPROUT_UTILITY_STRING_VIEW_CONVERSION_HPP diff --git a/dsp/lib/sprout/sprout/utility/string_view/from_string.hpp b/dsp/lib/sprout/sprout/utility/string_view/from_string.hpp deleted file mode 100644 index a068e39..0000000 --- a/dsp/lib/sprout/sprout/utility/string_view/from_string.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_STRING_VIEW_FROM_STRING_HPP -#define SPROUT_UTILITY_STRING_VIEW_FROM_STRING_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_UTILITY_STRING_VIEW_FROM_STRING_HPP diff --git a/dsp/lib/sprout/sprout/utility/string_view/hash.hpp b/dsp/lib/sprout/sprout/utility/string_view/hash.hpp deleted file mode 100644 index 2d62cf1..0000000 --- a/dsp/lib/sprout/sprout/utility/string_view/hash.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_STRING_VIEW_HASH_HPP -#define SPROUT_UTILITY_STRING_VIEW_HASH_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // hash_value - // - template - inline SPROUT_CONSTEXPR std::size_t - hash_value(sprout::basic_string_view const& v) { - return sprout::hash_range(v); - } -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // hash - // - template - struct hash > - : public sprout::hash > - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -#endif // #ifndef SPROUT_UTILITY_STRING_VIEW_HASH_HPP diff --git a/dsp/lib/sprout/sprout/utility/string_view/io.hpp b/dsp/lib/sprout/sprout/utility/string_view/io.hpp deleted file mode 100644 index e2bef07..0000000 --- a/dsp/lib/sprout/sprout/utility/string_view/io.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_STRING_IO_HPP -#define SPROUT_UTILITY_STRING_IO_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // operator<< - // - template - inline SPROUT_NON_CONSTEXPR std::basic_ostream& - operator<<(std::basic_ostream& lhs, sprout::basic_string_view const& rhs) { - sprout::copy(rhs.begin(), rhs.end(), std::ostreambuf_iterator(lhs)); - return lhs; - } -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_STRING_IO_HPP diff --git a/dsp/lib/sprout/sprout/utility/string_view/literals.hpp b/dsp/lib/sprout/sprout/utility/string_view/literals.hpp deleted file mode 100644 index b44c26e..0000000 --- a/dsp/lib/sprout/sprout/utility/string_view/literals.hpp +++ /dev/null @@ -1,53 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_STRING_VIEW_LITERALS_HPP -#define SPROUT_UTILITY_STRING_VIEW_LITERALS_HPP - -#include -#include -#include - -#if SPROUT_USE_USER_DEFINED_LITERALS - -#include - -namespace sprout { - namespace literals { - namespace strings { - // - // _sv - // - inline SPROUT_CONSTEXPR sprout::basic_string_view - operator"" _sv(char const* s, std::size_t size) { - return sprout::basic_string_view(s, size); - } - inline SPROUT_CONSTEXPR sprout::basic_string_view - operator"" _sv(wchar_t const* s, std::size_t size) { - return sprout::basic_string_view(s, size); - } -#if SPROUT_USE_UNICODE_LITERALS - inline SPROUT_CONSTEXPR sprout::basic_string_view - operator"" _sv(char16_t const* s, std::size_t size) { - return sprout::basic_string_view(s, size); - } - inline SPROUT_CONSTEXPR sprout::basic_string_view - operator"" _sv(char32_t const* s, std::size_t size) { - return sprout::basic_string_view(s, size); - } -#endif - } // namespace strings - - using sprout::literals::strings::operator"" _sv; - } // namespace literals - - using sprout::literals::strings::operator"" _sv; -} // namespace sprout - -#endif // #if SPROUT_USE_USER_DEFINED_LITERALS - -#endif // #ifndef SPROUT_UTILITY_STRING_VIEW_LITERALS_HPP diff --git a/dsp/lib/sprout/sprout/utility/string_view/string_ref.hpp b/dsp/lib/sprout/sprout/utility/string_view/string_ref.hpp deleted file mode 100644 index c95b533..0000000 --- a/dsp/lib/sprout/sprout/utility/string_view/string_ref.hpp +++ /dev/null @@ -1,194 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_STRING_VIEW_STRING_REF_HPP -#define SPROUT_UTILITY_STRING_VIEW_STRING_REF_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // string_ref - // wstring_ref - // u16string_ref - // u32string_ref - // - typedef sprout::basic_string_view string_ref; - typedef sprout::basic_string_view wstring_ref; -#if SPROUT_USE_UNICODE_LITERALS - typedef sprout::basic_string_view u16string_ref; - typedef sprout::basic_string_view u32string_ref; -#endif - -#if SPROUT_USE_TEMPLATE_ALIASES - // - // basic_string_ref - // - template > - using basic_string_ref = sprout::basic_string_view; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - - // - // to_string_ref - // - template - inline SPROUT_CONSTEXPR sprout::basic_string_view - to_string_ref(sprout::basic_string_view const& s) { - return sprout::to_string_view(s); - } - template - inline SPROUT_CONSTEXPR sprout::basic_string_view - to_string_ref(sprout::basic_string const& s) { - return sprout::to_string_view(s); - } - template - inline SPROUT_NON_CONSTEXPR sprout::basic_string_view - to_string_ref(std::basic_string const& s) { - return sprout::to_string_view(s); - } - template - inline SPROUT_CONSTEXPR sprout::basic_string_view - to_string_ref(T const* str) { - return sprout::to_string_view(str); - } - template - inline SPROUT_CONSTEXPR sprout::basic_string_view - to_string_ref(T const* str, std::size_t len) { - return sprout::to_string_view(str, len); - } - - // - // is_basic_string_ref - // -#if SPROUT_USE_TEMPLATE_ALIASES - template - using is_basic_string_ref = sprout::is_basic_string_view; -#else // #if SPROUT_USE_TEMPLATE_ALIASES - template - struct is_basic_string_ref - : public sprout::is_basic_string_view - {}; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - - // - // is_string_ref_of - // -#if SPROUT_USE_TEMPLATE_ALIASES - template - using is_string_ref_of = sprout::is_string_view_of; -#else // #if SPROUT_USE_TEMPLATE_ALIASES - template - struct is_string_ref_of - : public sprout::is_string_view_of - {}; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - - // - // is_string_ref - // -#if SPROUT_USE_TEMPLATE_ALIASES - template - using is_string_ref = sprout::is_string_view; -#else // #if SPROUT_USE_TEMPLATE_ALIASES - template - struct is_string_ref - : public sprout::is_string_view - {}; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - // - // is_wstring_ref - // -#if SPROUT_USE_TEMPLATE_ALIASES - template - using is_wstring_ref = sprout::is_wstring_view; -#else // #if SPROUT_USE_TEMPLATE_ALIASES - template - struct is_wstring_ref - : public sprout::is_wstring_view - {}; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - -#if SPROUT_USE_UNICODE_LITERALS - // - // is_u16string_ref - // -#if SPROUT_USE_TEMPLATE_ALIASES - template - using is_u16string_ref = sprout::is_u16string_view; -#else // #if SPROUT_USE_TEMPLATE_ALIASES - template - struct is_u16string_ref - : public sprout::is_u16string_view - {}; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES - // - // is_u32string_ref - // -#if SPROUT_USE_TEMPLATE_ALIASES - template - using is_u32string_ref = sprout::is_u32string_view; -#else // #if SPROUT_USE_TEMPLATE_ALIASES - template - struct is_u32string_ref - : public sprout::is_u32string_view - {}; -#endif // #if SPROUT_USE_TEMPLATE_ALIASES -#endif - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_basic_string_ref_v = sprout::is_basic_string_view::value; - template - SPROUT_STATIC_CONSTEXPR bool is_string_ref_of_v = sprout::is_string_view_of::value; - template - SPROUT_STATIC_CONSTEXPR bool is_string_ref_v = sprout::is_string_view::value; - template - SPROUT_STATIC_CONSTEXPR bool is_wstring_ref_v = sprout::is_wstring_view::value; -#if SPROUT_USE_UNICODE_LITERALS - template - SPROUT_STATIC_CONSTEXPR bool is_u16string_ref_v = sprout::is_u16string_view::value; - template - SPROUT_STATIC_CONSTEXPR bool is_u32string_ref_v = sprout::is_u32string_view::value; -#endif -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES - - namespace literals { - namespace strings { - // - // _sr - // - inline SPROUT_CONSTEXPR sprout::basic_string_view - operator"" _sr(char const* s, std::size_t size) { - return sprout::basic_string_view(s, size); - } - inline SPROUT_CONSTEXPR sprout::basic_string_view - operator"" _sr(wchar_t const* s, std::size_t size) { - return sprout::basic_string_view(s, size); - } -#if SPROUT_USE_UNICODE_LITERALS - inline SPROUT_CONSTEXPR sprout::basic_string_view - operator"" _sr(char16_t const* s, std::size_t size) { - return sprout::basic_string_view(s, size); - } - inline SPROUT_CONSTEXPR sprout::basic_string_view - operator"" _sr(char32_t const* s, std::size_t size) { - return sprout::basic_string_view(s, size); - } -#endif - } // namespace strings - - using sprout::literals::strings::operator"" _sr; - } // namespace literals - - using sprout::literals::strings::operator"" _sr; -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_STRING_VIEW_STRING_REF_HPP diff --git a/dsp/lib/sprout/sprout/utility/string_view/string_to_float.hpp b/dsp/lib/sprout/sprout/utility/string_view/string_to_float.hpp deleted file mode 100644 index 03cf2c0..0000000 --- a/dsp/lib/sprout/sprout/utility/string_view/string_to_float.hpp +++ /dev/null @@ -1,116 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_STRING_VIEW_STRING_TO_FLOAT_HPP -#define SPROUT_UTILITY_STRING_VIEW_STRING_TO_FLOAT_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template< - typename FloatType, typename Elem, typename Traits - > - inline FloatType string_to_float_dynamic(sprout::basic_string_view const& str, std::size_t* idx) { - Elem* endptr = nullptr; - FloatType result = sprout::detail::str_to_float(str.c_str(), &endptr); - *idx = endptr - str.c_str(); - return result; - } - } - - // - // string_to_float - // - template< - typename FloatType, typename Elem, typename Traits, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - string_to_float(sprout::basic_string_view const& str, std::size_t* idx) { - return !idx ? sprout::detail::str_to_float(str.begin()) - : sprout::detail::string_to_float_dynamic(str, idx) - ; - } - template< - typename FloatType, typename Elem, typename Traits, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - string_to_float(sprout::basic_string_view const& str) { - return sprout::detail::str_to_float(str.begin()); - } - - // - // stof - // - template - inline SPROUT_CONSTEXPR float - stof(sprout::basic_string_view const& str, std::size_t* idx) { - return sprout::string_to_float(str, idx); - } - template - inline SPROUT_CONSTEXPR float - stof(sprout::basic_string_view const& str) { - return sprout::string_to_float(str); - } - - // - // stod - // - template - inline SPROUT_CONSTEXPR double - stod(sprout::basic_string_view const& str, std::size_t* idx) { - return sprout::string_to_float(str, idx); - } - template - inline SPROUT_CONSTEXPR double - stod(sprout::basic_string_view const& str) { - return sprout::string_to_float(str); - } - - // - // stold - // - template - inline SPROUT_CONSTEXPR long double - stold(sprout::basic_string_view const& str, std::size_t* idx) { - return sprout::string_to_float(str, idx); - } - template - inline SPROUT_CONSTEXPR long double - stold(sprout::basic_string_view const& str) { - return sprout::string_to_float(str); - } - - // - // from_string - // - template< - typename FloatType, typename Elem, typename Traits, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - from_string(sprout::basic_string_view const& str, std::size_t* idx) { - return sprout::string_to_float(str, idx); - } - template< - typename FloatType, typename Elem, typename Traits, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR FloatType - from_string(sprout::basic_string_view const& str) { - return sprout::string_to_float(str); - } -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_STRING_VIEW_STRING_TO_FLOAT_HPP diff --git a/dsp/lib/sprout/sprout/utility/string_view/string_to_int.hpp b/dsp/lib/sprout/sprout/utility/string_view/string_to_int.hpp deleted file mode 100644 index e196b74..0000000 --- a/dsp/lib/sprout/sprout/utility/string_view/string_to_int.hpp +++ /dev/null @@ -1,172 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_STRING_VIEW_STRING_TO_INT_HPP -#define SPROUT_UTILITY_STRING_VIEW_STRING_TO_INT_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - inline IntType - string_to_int_dynamic(sprout::basic_string_view const& str, std::size_t* idx, int base = 10) { - Elem* endptr = nullptr; - IntType result = sprout::detail::str_to_int(str.c_str(), &endptr, base); - *idx = endptr - str.c_str(); - return result; - } - } - - // - // string_to_int - // - template< - typename IntType, typename Elem, typename Traits, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR IntType - string_to_int(sprout::basic_string_view const& str, std::size_t* idx, int base = 10) { - return !idx ? sprout::detail::str_to_int(str.begin(), base) - : sprout::detail::string_to_int_dynamic(str, idx, base) - ; - } - template< - typename IntType, typename Elem, typename Traits, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR IntType - string_to_int(sprout::basic_string_view const& str, int base = 10) { - return sprout::detail::str_to_int(str.begin(), base); - } - - // - // stoi - // - template - inline SPROUT_CONSTEXPR int - stoi(sprout::basic_string_view const& str, std::size_t* idx, int base = 10) { - return sprout::string_to_int(str, idx, base); - } - template - inline SPROUT_CONSTEXPR int - stoi(sprout::basic_string_view const& str, int base = 10) { - return sprout::string_to_int(str, base); - } - - // - // stol - // - template - inline SPROUT_CONSTEXPR long - stol(sprout::basic_string_view const& str, std::size_t* idx, int base = 10) { - return sprout::string_to_int(str, idx, base); - } - template - inline SPROUT_CONSTEXPR long - stol(sprout::basic_string_view const& str, int base = 10) { - return sprout::string_to_int(str, base); - } - - // - // stoul - // - template - inline SPROUT_CONSTEXPR unsigned long - stoul(sprout::basic_string_view const& str, std::size_t* idx, int base = 10) { - return sprout::string_to_int(str, idx, base); - } - template - inline SPROUT_CONSTEXPR unsigned long - stoul(sprout::basic_string_view const& str, int base = 10) { - return sprout::string_to_int(str, base); - } - - // - // stoll - // - template - inline SPROUT_CONSTEXPR long long - stoll(sprout::basic_string_view const& str, std::size_t* idx, int base = 10) { - return sprout::string_to_int(str, idx, base); - } - template - inline SPROUT_CONSTEXPR long long - stoll(sprout::basic_string_view const& str, int base = 10) { - return sprout::string_to_int(str, base); - } - - // - // stoull - // - template - inline SPROUT_CONSTEXPR unsigned long long - stoull(sprout::basic_string_view const& str, std::size_t* idx, int base = 10) { - return sprout::string_to_int(str, idx, base); - } - template - inline SPROUT_CONSTEXPR unsigned long long - stoull(sprout::basic_string_view const& str, int base = 10) { - return sprout::string_to_int(str, base); - } - - // - // stoimax - // - template - inline SPROUT_CONSTEXPR std::intmax_t - stoimax(sprout::basic_string_view const& str, std::size_t* idx, int base = 10) { - return sprout::string_to_int(str, idx, base); - } - template - inline SPROUT_CONSTEXPR std::intmax_t - stoimax(sprout::basic_string_view const& str, int base = 10) { - return sprout::string_to_int(str, base); - } - - // - // stoumax - // - template - inline SPROUT_CONSTEXPR std::uintmax_t - stoumax(sprout::basic_string_view const& str, std::size_t* idx, int base = 10) { - return sprout::string_to_int(str, idx, base); - } - template - inline SPROUT_CONSTEXPR std::uintmax_t - stoumax(sprout::basic_string_view const& str, int base = 10) { - return sprout::string_to_int(str, base); - } - - // - // from_string - // - template< - typename IntType, typename Elem, typename Traits, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR IntType - from_string(sprout::basic_string_view const& str, std::size_t* idx) { - return sprout::string_to_int(str, idx, 0); - } - template< - typename IntType, typename Elem, typename Traits, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR IntType - from_string(sprout::basic_string_view const& str) { - return sprout::string_to_int(str, 0); - } -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_STRING_VIEW_STRING_TO_INT_HPP diff --git a/dsp/lib/sprout/sprout/utility/string_view/string_view.hpp b/dsp/lib/sprout/sprout/utility/string_view/string_view.hpp deleted file mode 100644 index c3415cd..0000000 --- a/dsp/lib/sprout/sprout/utility/string_view/string_view.hpp +++ /dev/null @@ -1,616 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_STRING_VIEW_STRING_VIEW_HPP -#define SPROUT_UTILITY_STRING_VIEW_STRING_VIEW_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT -#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION -# include -#endif - -namespace sprout { - // - // basic_string_view - // - template - class basic_string_view { - public: - typedef T value_type; -#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION - typedef sprout::index_iterator iterator; - typedef sprout::index_iterator const_iterator; -#else - typedef T const* iterator; - typedef T const* const_iterator; -#endif - typedef T const& reference; - typedef T const& const_reference; - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - typedef T const* pointer; - typedef T const* const_pointer; - typedef sprout::reverse_iterator reverse_iterator; - typedef sprout::reverse_iterator const_reverse_iterator; - typedef Traits traits_type; -#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION - private: - template - class is_string_view_iterator - : public sprout::bool_constant< - std::is_same >::value - || std::is_same >::value - > - {}; - template - class is_string_view_iterator - : public is_string_view_iterator - {}; - template - class is_string_view_iterator - : public is_string_view_iterator - {}; - template - class is_string_view_iterator - : public is_string_view_iterator - {}; -#endif - public: - SPROUT_STATIC_CONSTEXPR size_type npos = sprout::npos_t::get::value; - private: - const_pointer ptr_; - size_type len_; - private: - public: - // construct/copy/destroy: - SPROUT_CONSTEXPR basic_string_view() - : ptr_(0), len_(0) - {} - basic_string_view(basic_string_view const& rhs) = default; - SPROUT_CXX14_CONSTEXPR basic_string_view& operator=(basic_string_view const& rhs) { - basic_string_view temp(rhs); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR basic_string_view(const_pointer str) - : ptr_(str), len_(traits_type::length(str)) - {} - template - SPROUT_CONSTEXPR basic_string_view(sprout::basic_string const& str) SPROUT_NOEXCEPT - : ptr_(str.data()), len_(str.size()) - {} - template - SPROUT_NON_CONSTEXPR basic_string_view(std::basic_string const& str) SPROUT_NOEXCEPT - : ptr_(str.data()), len_(str.size()) - {} - SPROUT_CONSTEXPR basic_string_view(const_pointer str, size_type len) SPROUT_NOEXCEPT - : ptr_(str), len_(len) - {} - // iterators: -#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION - SPROUT_CXX14_CONSTEXPR iterator - begin() SPROUT_NOEXCEPT { - return iterator(*this, 0); - } - SPROUT_CONSTEXPR const_iterator - begin() const SPROUT_NOEXCEPT { - return const_iterator(*this, 0); - } - SPROUT_CXX14_CONSTEXPR iterator - end() SPROUT_NOEXCEPT { - return iterator(*this, size()); - } - SPROUT_CONSTEXPR const_iterator - end() const SPROUT_NOEXCEPT { - return const_iterator(*this, size()); - } -#else - SPROUT_CXX14_CONSTEXPR iterator - begin() SPROUT_NOEXCEPT { - return ptr_; - } - SPROUT_CONSTEXPR const_iterator - begin() const SPROUT_NOEXCEPT { - return ptr_; - } - SPROUT_CXX14_CONSTEXPR iterator - end() SPROUT_NOEXCEPT { - return ptr_ + size(); - } - SPROUT_CONSTEXPR const_iterator - end() const SPROUT_NOEXCEPT { - return ptr_ + size(); - } -#endif - SPROUT_CONSTEXPR const_reverse_iterator - rbegin() const SPROUT_NOEXCEPT { - return const_reverse_iterator(end()); - } - SPROUT_CONSTEXPR const_reverse_iterator - rend() const SPROUT_NOEXCEPT { - return const_reverse_iterator(begin()); - } -#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION - SPROUT_CONSTEXPR const_iterator - cbegin() const SPROUT_NOEXCEPT { - return const_iterator(*this, 0); - } - SPROUT_CONSTEXPR const_iterator - cend() const SPROUT_NOEXCEPT { - return const_iterator(*this, size()); - } -#else - SPROUT_CONSTEXPR const_iterator - cbegin() const SPROUT_NOEXCEPT { - return ptr_; - } - SPROUT_CONSTEXPR const_iterator - cend() const SPROUT_NOEXCEPT { - return ptr_ + size(); - } -#endif - SPROUT_CONSTEXPR const_reverse_iterator - crbegin() const SPROUT_NOEXCEPT { - return const_reverse_iterator(end()); - } - SPROUT_CONSTEXPR const_reverse_iterator - crend() const SPROUT_NOEXCEPT { - return const_reverse_iterator(begin()); - } - // capacity: - SPROUT_CONSTEXPR size_type - size() const SPROUT_NOEXCEPT { - return len_; - } - SPROUT_CONSTEXPR size_type - length() const SPROUT_NOEXCEPT { - return size(); - } - SPROUT_CONSTEXPR size_type - max_size() const SPROUT_NOEXCEPT { - return size(); - } - SPROUT_CXX14_CONSTEXPR void - clear() { - len_ = 0; - } - SPROUT_CONSTEXPR bool - empty() const SPROUT_NOEXCEPT { - return size() == 0; - } - // element access: - SPROUT_CONSTEXPR const_reference - operator[](size_type i) const { - return ptr_[i]; - } - SPROUT_CONSTEXPR const_reference - at(size_type i) const { - return i < size() ? ptr_[i] - : (throw std::out_of_range("basic_string_view<>: index out of range"), ptr_[i]) - ; - } - SPROUT_CONSTEXPR const_reference - front() const { - return ptr_[0]; - } - SPROUT_CONSTEXPR const_reference - back() const { - return ptr_[size() - 1]; - } - // modifiers: - SPROUT_CXX14_CONSTEXPR void - swap(basic_string_view& other) - SPROUT_NOEXCEPT - { - sprout::swap(ptr_, other.ptr_); - sprout::swap(len_, other.len_); - } - SPROUT_CXX14_CONSTEXPR void - remove_prefix(size_type n) { - if (n > size()) { - n = size(); - } - ptr_ += n; - len_ -= n; - } - SPROUT_CONSTEXPR basic_string_view - remove_prefix(size_type n) const { - return n > size() ? basic_string_view(ptr_ + size(), 0) - : basic_string_view(ptr_ + n, size() - n) - ; - } - SPROUT_CXX14_CONSTEXPR void - remove_suffix(size_type n) { - if (n > size()) { - n = size(); - } - len_ -= n; - } - SPROUT_CONSTEXPR basic_string_view - remove_suffix(size_type n) const { - return n > size() ? basic_string_view(ptr_, 0) - : basic_string_view(ptr_, size() - n) - ; - } - // string operations: - SPROUT_CONSTEXPR const_pointer - c_str() const SPROUT_NOEXCEPT { - return data(); - } - SPROUT_CONSTEXPR const_pointer - data() const SPROUT_NOEXCEPT { - return ptr_; - } - - SPROUT_CONSTEXPR size_type - find(basic_string_view const& str, size_type pos = 0) const SPROUT_NOEXCEPT { - return sprout::string_detail::find_impl(begin(), size(), str.begin(), pos, str.size()); - } - SPROUT_CONSTEXPR size_type - find(value_type const* s, size_type pos, size_type n) const { - return sprout::string_detail::find_impl(begin(), size(), s, pos, n); - } - SPROUT_CONSTEXPR size_type - find(value_type const* s, size_type pos = 0) const { - return find(s, pos, traits_type::length(s)); - } - SPROUT_CONSTEXPR size_type - find(value_type c, size_type pos = 0) const { - return sprout::string_detail::find_c_impl(begin(), size(), c, pos); - } - SPROUT_CONSTEXPR size_type - rfind(basic_string_view const& str, size_type pos = npos) const SPROUT_NOEXCEPT { - return sprout::string_detail::rfind_impl(begin(), size(), str.begin(), pos, str.size()); - } - SPROUT_CONSTEXPR size_type - rfind(value_type const* s, size_type pos, size_type n) const { - return sprout::string_detail::rfind_impl(begin(), size(), s, pos, n); - } - SPROUT_CONSTEXPR size_type - rfind(value_type const* s, size_type pos = npos) const { - return rfind(s, pos, traits_type::length(s)); - } - SPROUT_CONSTEXPR size_type - rfind(value_type c, size_type pos = npos) const { - return sprout::string_detail::rfind_c_impl(begin(), size(), c, pos); - } - SPROUT_CONSTEXPR size_type - find_first_of(basic_string_view const& str, size_type pos = 0) const SPROUT_NOEXCEPT { - return sprout::string_detail::find_first_of_impl(begin(), size(), str.begin(), pos, str.size()); - } - SPROUT_CONSTEXPR size_type - find_first_of(value_type const* s, size_type pos, size_type n) const { - return sprout::string_detail::find_first_of_impl(begin(), size(), s, pos, n); - } - SPROUT_CONSTEXPR size_type - find_first_of(value_type const* s, size_type pos = 0) const { - return find_first_of(s, pos, traits_type::length(s)); - } - SPROUT_CONSTEXPR size_type - find_first_of(value_type c, size_type pos = 0) const { - return find(c, pos); - } - SPROUT_CONSTEXPR size_type - find_last_of(basic_string_view const& str, size_type pos = npos) const SPROUT_NOEXCEPT { - return sprout::string_detail::find_last_of_impl(begin(), size(), str.begin(), pos, str.size()); - } - SPROUT_CONSTEXPR size_type - find_last_of(value_type const* s, size_type pos, size_type n) const { - return sprout::string_detail::find_last_of_impl(begin(), size(), s, pos, n); - } - SPROUT_CONSTEXPR size_type - find_last_of(value_type const* s, size_type pos = npos) const { - return find_last_of(s, pos, traits_type::length(s)); - } - SPROUT_CONSTEXPR size_type - find_last_of(value_type c, size_type pos = npos) const { - return rfind(c, pos); - } - SPROUT_CONSTEXPR size_type - find_first_not_of(basic_string_view const& str, size_type pos = 0) const SPROUT_NOEXCEPT { - return sprout::string_detail::find_first_not_of_impl(begin(), size(), str.begin(), pos, str.size()); - } - SPROUT_CONSTEXPR size_type - find_first_not_of(value_type const* s, size_type pos, size_type n) const { - return sprout::string_detail::find_first_not_of_impl(begin(), size(), s, pos, n); - } - SPROUT_CONSTEXPR size_type - find_first_not_of(value_type const* s, size_type pos = 0) const { - return find_first_not_of(s, pos, traits_type::length(s)); - } - SPROUT_CONSTEXPR size_type - find_first_not_of(value_type c, size_type pos = 0) const { - return sprout::string_detail::find_first_not_of_c_impl(begin(), size(), c, pos); - } - SPROUT_CONSTEXPR size_type - find_last_not_of(basic_string_view const& str, size_type pos = npos) const SPROUT_NOEXCEPT { - return sprout::string_detail::find_last_not_of_impl(begin(), size(), str.begin(), pos, str.size()); - } - SPROUT_CONSTEXPR size_type - find_last_not_of(value_type const* s, size_type pos, size_type n) const { - return sprout::string_detail::find_last_not_of_impl(begin(), size(), s, pos, n); - } - SPROUT_CONSTEXPR size_type - find_last_not_of(value_type const* s, size_type pos = npos) const { - return find_last_not_of(s, pos, traits_type::length(s)); - } - SPROUT_CONSTEXPR size_type - find_last_not_of(value_type c, size_type pos = npos) const { - return sprout::string_detail::find_last_not_of_c_impl(begin(), size(), c, pos); - } - SPROUT_CXX14_CONSTEXPR size_type - copy(value_type* s, size_type n, size_type pos = 0) const { - rangecheck(pos); - size_type llen = NS_SSCRISK_CEL_OR_SPROUT::min(n, size() - pos); - traits_type::copy(s, begin() + pos, llen); - return llen; - } - SPROUT_CONSTEXPR basic_string_view - substr(size_type pos = 0, size_type n = npos) const { - return !(size() < pos) ? n == npos - ? substr(pos, size() - pos) - : basic_string_view(c_str() + pos, n) - : throw std::out_of_range("basic_string_view<>: index out of range") - ; - } - SPROUT_CONSTEXPR int - compare(basic_string_view const& str) const { - return compare(0, size(), str.begin(), str.size()); - } - SPROUT_CONSTEXPR int - compare(value_type const* s) const { - return compare(0, size(), s, traits_type::length(s)); - } - SPROUT_CONSTEXPR int - compare(size_type pos1, size_type n1, basic_string_view const& str) const { - return compare(pos1, n1, str, 0, npos); - } - SPROUT_CONSTEXPR int - compare(size_type pos1, size_type n1, value_type const* s) const { - return compare(pos1, n1, s, traits_type::length(s)); - } - SPROUT_CONSTEXPR int - compare(size_type pos1, size_type n1, basic_string_view const& str, size_type pos2, size_type n2) const { - return !(str.size() < pos2) - ? compare(pos1, n1, str.begin() + pos2, NS_SSCRISK_CEL_OR_SPROUT::min(n2, str.size() - pos2)) - : throw std::out_of_range("basic_string_view<>: index out of range") - ; - } - SPROUT_CONSTEXPR int - compare(size_type pos1, size_type n1, value_type const* s, size_type n2) const { - return !(size() < pos1) - ? sprout::string_detail::compare_impl(begin(), pos1, NS_SSCRISK_CEL_OR_SPROUT::min(n1, size() - pos1), s, n2) - : throw std::out_of_range("basic_string_view<>: index out of range") - ; - } - SPROUT_CONSTEXPR bool - starts_with(value_type c) const { - return !empty() && traits_type::eq(c, front()); - } - SPROUT_CONSTEXPR bool - starts_with(basic_string_view const& str) const { - return size() >= str.size() && traits_type::compare(begin(), str.begin(), str.size()) == 0; - } - SPROUT_CONSTEXPR bool - ends_with(value_type c) const { - return !empty() && traits_type::eq(c, back()); - } - SPROUT_CONSTEXPR bool - ends_with(basic_string_view const& str) const { - return size() >= str.size() && traits_type::compare(begin() + size() - str.size(), str.begin(), str.size()) == 0; - } - template - SPROUT_CONSTEXPR sprout::basic_string - to_string() const { - return sprout::basic_string(ptr_, size()); - } - template > - SPROUT_NON_CONSTEXPR std::basic_string - to_string() const { - return std::basic_string(ptr_, size()); - } - template - SPROUT_EXPLICIT_CONVERSION SPROUT_CONSTEXPR operator sprout::basic_string() const { - return to_string(); - } - template - SPROUT_EXPLICIT_CONVERSION SPROUT_NON_CONSTEXPR operator std::basic_string() const { - return to_string(); - } - // others: - SPROUT_CXX14_CONSTEXPR void - rangecheck(size_type i) const { - return i >= size() ? throw std::out_of_range("basic_string_view<>: index out of range") - : (void)0 - ; - } - -#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION - template - SPROUT_CONSTEXPR typename std::enable_if< - is_string_view_iterator::value, - size_type - >::type - find(ConstIterator s, size_type pos, size_type n) const { - return sprout::string_detail::find_impl(begin(), size(), s, pos, n); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - is_string_view_iterator::value, - size_type - >::type - find(ConstIterator s, size_type pos = 0) const { - return find(s, pos, traits_type::length(s)); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - is_string_view_iterator::value, - size_type - >::type - rfind(ConstIterator s, size_type pos, size_type n) const { - return sprout::string_detail::rfind_impl(begin(), size(), s, pos, n); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - is_string_view_iterator::value, - size_type - >::type - rfind(ConstIterator s, size_type pos = npos) const { - return rfind(s, pos, traits_type::length(s)); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - is_string_view_iterator::value, - size_type - >::type - find_first_of(ConstIterator s, size_type pos, size_type n) const { - return sprout::string_detail::find_first_of_impl(begin(), size(), s, pos, n); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - is_string_view_iterator::value, - size_type - >::type - find_first_of(ConstIterator s, size_type pos = 0) const { - return find_first_of(s, pos, traits_type::length(s)); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - is_string_view_iterator::value, - size_type - >::type - find_last_of(ConstIterator s, size_type pos, size_type n) const { - return sprout::string_detail::find_last_of_impl(begin(), size(), s, pos, n); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - is_string_view_iterator::value, - size_type - >::type - find_last_of(ConstIterator s, size_type pos = 0) const { - return find_last_of(s, pos, traits_type::length(s)); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - is_string_view_iterator::value, - size_type - >::type - find_first_not_of(ConstIterator s, size_type pos, size_type n) const { - return sprout::string_detail::find_first_not_of_impl(begin(), size(), s, pos, n); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - is_string_view_iterator::value, - size_type - >::type - find_first_not_of(ConstIterator s, size_type pos = 0) const { - return sprout::string_detail::find_first_not_of_impl(s, pos, traits_type::length(s)); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - is_string_view_iterator::value, - size_type - >::type - find_last_not_of(ConstIterator s, size_type pos, size_type n) const { - return sprout::string_detail::find_last_not_of_impl(begin(), size(), s, pos, n); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - is_string_view_iterator::value, - size_type - >::type - find_last_not_of(ConstIterator s, size_type pos = npos) const { - return sprout::string_detail::find_last_not_of_impl(s, pos, traits_type::length(s)); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - is_string_view_iterator::value, - int - >::type - compare(ConstIterator s) const { - return compare(0, size(), s, traits_type::length(s)); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - is_string_view_iterator::value, - int - >::type - compare(size_type pos1, size_type n1, ConstIterator s) const { - return compare(pos1, n1, s, traits_type::length(s)); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - is_string_view_iterator::value, - int - >::type - compare(size_type pos1, size_type n1, ConstIterator s, size_type n2) const { - return !(size() < pos1) - ? sprout::string_detail::compare_impl(begin(), pos1, NS_SSCRISK_CEL_OR_SPROUT::min(n1, size() - pos1), s, n2) - : throw std::out_of_range("basic_string_view<>: index out of range") - ; - } -#endif - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::basic_string_view::size_type sprout::basic_string_view::npos; - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::basic_string_view& lhs, sprout::basic_string_view& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // to_string_view - // - template - inline SPROUT_CONSTEXPR sprout::basic_string_view - to_string_view(sprout::basic_string_view const& s) { - return s; - } - template - inline SPROUT_CONSTEXPR sprout::basic_string_view - to_string_view(sprout::basic_string const& s) { - return sprout::basic_string_view(s); - } - template - inline SPROUT_NON_CONSTEXPR sprout::basic_string_view - to_string_view(std::basic_string const& s) { - return sprout::basic_string_view(s); - } - template - inline SPROUT_CONSTEXPR sprout::basic_string_view - to_string_view(T const* str) { - return sprout::basic_string_view(str); - } - template - inline SPROUT_CONSTEXPR sprout::basic_string_view - to_string_view(T const* str, std::size_t len) { - return sprout::basic_string_view(str, len); - } -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_STRING_VIEW_STRING_VIEW_HPP diff --git a/dsp/lib/sprout/sprout/utility/string_view/string_view_fwd.hpp b/dsp/lib/sprout/sprout/utility/string_view/string_view_fwd.hpp deleted file mode 100644 index f33ba1f..0000000 --- a/dsp/lib/sprout/sprout/utility/string_view/string_view_fwd.hpp +++ /dev/null @@ -1,22 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_STRING_VIEW_STRING_VIEW_FWD_HPP -#define SPROUT_UTILITY_STRING_VIEW_STRING_VIEW_FWD_HPP - -#include -#include - -namespace sprout { - // - // basic_string_view - // - template > - class basic_string_view; -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_STRING_VIEW_STRING_VIEW_FWD_HPP diff --git a/dsp/lib/sprout/sprout/utility/string_view/type_traits.hpp b/dsp/lib/sprout/sprout/utility/string_view/type_traits.hpp deleted file mode 100644 index ba2b49d..0000000 --- a/dsp/lib/sprout/sprout/utility/string_view/type_traits.hpp +++ /dev/null @@ -1,105 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_STRING_VIEW_TYPE_TRAITS_HPP -#define SPROUT_UTILITY_STRING_VIEW_TYPE_TRAITS_HPP - -#include -#include -#include - -namespace sprout { - // - // is_basic_string_view - // - template - struct is_basic_string_view - : public sprout::false_type - {}; - template - struct is_basic_string_view - : public sprout::is_basic_string_view - {}; - template - struct is_basic_string_view - : public sprout::is_basic_string_view - {}; - template - struct is_basic_string_view > - : public sprout::true_type - {}; - - // - // is_string_view_of - // - template - struct is_string_view_of - : public sprout::false_type - {}; - template - struct is_string_view_of - : public sprout::is_string_view_of - {}; - template - struct is_string_view_of - : public sprout::is_string_view_of - {}; - template - struct is_string_view_of, Elem> - : public sprout::true_type - {}; - - // - // is_string_view - // - template - struct is_string_view - : public sprout::is_string_view_of - {}; - // - // is_wstring_view - // - template - struct is_wstring_view - : public sprout::is_string_view_of - {}; -#if SPROUT_USE_UNICODE_LITERALS - // - // is_u16string_view - // - template - struct is_u16string_view - : public sprout::is_string_view_of - {}; - // - // is_u32string_view - // - template - struct is_u32string_view - : public sprout::is_string_view_of - {}; -#endif - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_basic_string_view_v = sprout::is_basic_string_view::value; - template - SPROUT_STATIC_CONSTEXPR bool is_string_view_of_v = sprout::is_string_view_of::value; - template - SPROUT_STATIC_CONSTEXPR bool is_string_view_v = sprout::is_string_view::value; - template - SPROUT_STATIC_CONSTEXPR bool is_wstring_view_v = sprout::is_wstring_view::value; -#if SPROUT_USE_UNICODE_LITERALS - template - SPROUT_STATIC_CONSTEXPR bool is_u16string_view_v = sprout::is_u16string_view::value; - template - SPROUT_STATIC_CONSTEXPR bool is_u32string_view_v = sprout::is_u32string_view::value; -#endif -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_STRING_VIEW_TYPE_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/utility/swallow.hpp b/dsp/lib/sprout/sprout/utility/swallow.hpp deleted file mode 100644 index 1afe214..0000000 --- a/dsp/lib/sprout/sprout/utility/swallow.hpp +++ /dev/null @@ -1,59 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_SWALLOW_HPP -#define SPROUT_UTILITY_SWALLOW_HPP - -#include -#include - -namespace sprout { - // - // swallow_t - // swallow - // - // example: - // swallow({(void)pack, 0}...); - // - struct swallow_t { - public: - template - inline SPROUT_CXX14_CONSTEXPR void - operator()(std::initializer_list) const SPROUT_NOEXCEPT {} - }; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::swallow_t swallow = {}; - } // anonymous-namespace -// template -// inline SPROUT_CONSTEXPR sprout::swallow_t -// operator,(sprout::swallow_t, T&&) SPROUT_NOEXCEPT { -// return sprout::swallow; -// } -// template -// inline SPROUT_CONSTEXPR sprout::swallow_t -// operator,(T&&, sprout::swallow_t) SPROUT_NOEXCEPT { -// return sprout::swallow; -// } - - // - // unused_t - // unused - // - struct unused_t { - public: - template - SPROUT_CONSTEXPR sprout::unused_t const& - operator()(Args&&...) const SPROUT_NOEXCEPT { - return *this; - } - }; - namespace { - SPROUT_STATIC_CONSTEXPR sprout::unused_t unused = {}; - } // anonymous-namespace -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_SWALLOW_HPP diff --git a/dsp/lib/sprout/sprout/utility/swap.hpp b/dsp/lib/sprout/sprout/utility/swap.hpp deleted file mode 100644 index 75739f9..0000000 --- a/dsp/lib/sprout/sprout/utility/swap.hpp +++ /dev/null @@ -1,59 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_SWAP_HPP -#define SPROUT_UTILITY_SWAP_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout_swap_detail { - using std::swap; - - template::value>::type = sprout::enabler> - inline SPROUT_CXX14_CONSTEXPR void - swap_impl(T& a, T& b) SPROUT_NOEXCEPT { - T temp = sprout::move(a); - a = sprout::move(b); - b = sprout::move(temp); - } - template::value>::type = sprout::enabler> - inline SPROUT_CXX14_CONSTEXPR void - swap_impl(T& a, T& b) - SPROUT_NOEXCEPT_IF_EXPR(swap(a, b)) - { - swap(a, b); - } - template - inline SPROUT_CXX14_CONSTEXPR void - swap_impl(T (& a)[N], T (& b)[N]) - SPROUT_NOEXCEPT_IF_EXPR(sprout_swap_detail::swap_impl(*a, *b)) - { - for (std::size_t i = 0; i < N; ++i) { - sprout_swap_detail::swap_impl(a[i], b[i]); - } - } -} // namespace sprout_swap_detail - -namespace sprout { - // - // 20.2.2 swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(T1& lhs, T2& rhs) - SPROUT_NOEXCEPT_IF_EXPR(sprout_swap_detail::swap_impl(lhs, rhs)) - { - return sprout_swap_detail::swap_impl(lhs, rhs); - } -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_SWAP_HPP diff --git a/dsp/lib/sprout/sprout/utility/unmove.hpp b/dsp/lib/sprout/sprout/utility/unmove.hpp deleted file mode 100644 index 4086319..0000000 --- a/dsp/lib/sprout/sprout/utility/unmove.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_UNMOVE_HPP -#define SPROUT_UTILITY_UNMOVE_HPP - -#include -#include - -namespace sprout { - // - // unmove - // - template - inline SPROUT_CONSTEXPR typename std::remove_reference::type& - unmove(T&& x) SPROUT_NOEXCEPT { - return static_cast::type&>(x); - } -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_UNMOVE_HPP diff --git a/dsp/lib/sprout/sprout/utility/until_loop.hpp b/dsp/lib/sprout/sprout/utility/until_loop.hpp deleted file mode 100644 index abf5b73..0000000 --- a/dsp/lib/sprout/sprout/utility/until_loop.hpp +++ /dev/null @@ -1,78 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_UNTIL_LOOP_HPP -#define SPROUT_UTILITY_UNTIL_LOOP_HPP - -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::pair - until_loop_check(T const& init, Predicate pred) { - return sprout::pair(init, pred(init)); - } - template - inline SPROUT_CONSTEXPR sprout::pair - until_loop_impl_1(sprout::pair const& current, Predicate pred, UnaryOperation unary_op, std::size_t n) { - return current.second || pred(current.first) ? current - : n == 1 ? sprout::detail::until_loop_check(unary_op(current.first), pred) - : sprout::detail::until_loop_impl_1( - sprout::detail::until_loop_impl_1( - current, - pred, unary_op, n / 2 - ), - pred, unary_op, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - until_loop_impl(sprout::pair const& current, Predicate pred, UnaryOperation unary_op, std::size_t n) { - return current.second || pred(current.first) ? current - : sprout::detail::until_loop_impl( - sprout::detail::until_loop_impl_1( - current, - pred, unary_op, n - ), - pred, unary_op, n * 2 - ) - ; - } - } // namespace detail - - // - // until_loop - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR T - until_loop(T init, Predicate pred, UnaryOperation unary_op) { - typedef sprout::pair type; - return sprout::detail::until_loop_impl(type(init, false), pred, unary_op, 1).first; - } - - // - // flat_until_loop - // - // recursion depth: - // 0 - // - template - inline SPROUT_CXX14_CONSTEXPR T - flat_until_loop(T init, Predicate pred, UnaryOperation unary_op) { - for (; !pred(init); init = unary_op(init)) - ; - return init; - } -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_UNTIL_LOOP_HPP diff --git a/dsp/lib/sprout/sprout/utility/upcast.hpp b/dsp/lib/sprout/sprout/utility/upcast.hpp deleted file mode 100644 index 825329e..0000000 --- a/dsp/lib/sprout/sprout/utility/upcast.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_UPCAST_HPP -#define SPROUT_UTILITY_UPCAST_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // upcast - // - template< - typename T, typename U, - typename sprout::enabler_if::value>::type = sprout::enabler - > - inline SPROUT_CONSTEXPR T - upcast(U&& x) { - return static_cast(SPROUT_FORWARD(U, x)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_UPCAST_HPP diff --git a/dsp/lib/sprout/sprout/utility/use_default.hpp b/dsp/lib/sprout/sprout/utility/use_default.hpp deleted file mode 100644 index 12c3724..0000000 --- a/dsp/lib/sprout/sprout/utility/use_default.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_USE_DEFAULT_HPP -#define SPROUT_UTILITY_USE_DEFAULT_HPP - -#include -#include - -namespace sprout { - // - // use_default - // - struct use_default; - - // - // is_use_default - // - template - struct is_use_default - : public sprout::is_same - {}; - - // - // select_default - // - template - struct select_default - : public std::conditional::value, Default, T> - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_USE_DEFAULT_HPP diff --git a/dsp/lib/sprout/sprout/utility/value_holder.hpp b/dsp/lib/sprout/sprout/utility/value_holder.hpp deleted file mode 100644 index 383e163..0000000 --- a/dsp/lib/sprout/sprout/utility/value_holder.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2016 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_VALUE_HOLDER_HPP -#define SPROUT_UTILITY_VALUE_HOLDER_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_UTILITY_VALUE_HOLDER_HPP diff --git a/dsp/lib/sprout/sprout/utility/value_holder/comparison.hpp b/dsp/lib/sprout/sprout/utility/value_holder/comparison.hpp deleted file mode 100644 index 54e8ebf..0000000 --- a/dsp/lib/sprout/sprout/utility/value_holder/comparison.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2016 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_VALUE_HOLDER_COMPARISON_HPP -#define SPROUT_UTILITY_VALUE_HOLDER_COMPARISON_HPP - -#include -#include -#include - -namespace sprout { - // - // operator== - // operator!= - // operator< - // operator> - // operator<= - // operator>= - // - template - inline SPROUT_CONSTEXPR bool - operator==(sprout::value_holder const& lhs, sprout::value_holder const& rhs) { - return sprout::equal_pointees(lhs, rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(sprout::value_holder const& lhs, sprout::value_holder const& rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator<(sprout::value_holder const& lhs, sprout::value_holder const& rhs) { - return sprout::less_pointees(lhs, rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>(sprout::value_holder const& lhs, sprout::value_holder const& rhs) { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator<=(sprout::value_holder const& lhs, sprout::value_holder const& rhs) { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(sprout::value_holder const& lhs, sprout::value_holder const& rhs) { - return !(lhs < rhs); - } -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_VALUE_HOLDER_COMPARISON_HPP diff --git a/dsp/lib/sprout/sprout/utility/value_holder/get.hpp b/dsp/lib/sprout/sprout/utility/value_holder/get.hpp deleted file mode 100644 index 415daf7..0000000 --- a/dsp/lib/sprout/sprout/utility/value_holder/get.hpp +++ /dev/null @@ -1,65 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_VALUE_HOLDER_GET_HPP -#define SPROUT_UTILITY_VALUE_HOLDER_GET_HPP - -#include -#include -#include - -namespace sprout { - // - // get - // - template - inline SPROUT_CONSTEXPR typename sprout::value_holder::reference_type - get(sprout::value_holder& x) { - return sprout::value_holder::get(x); - } - template - inline SPROUT_CONSTEXPR typename sprout::value_holder::rvalue_reference - get(sprout::value_holder&& x) { - return sprout::value_holder::get(sprout::move(x)); - } - template - inline SPROUT_CONSTEXPR typename sprout::value_holder::reference_const_type - get(sprout::value_holder const& x) { - return sprout::value_holder::get(x); - } - template - inline SPROUT_CONSTEXPR typename sprout::value_holder::pointer_type - get(sprout::value_holder* x) { - return sprout::value_holder::get_pointer(*x); - } - template - inline SPROUT_CONSTEXPR typename sprout::value_holder::pointer_const_type - get(sprout::value_holder const* x) { - return sprout::value_holder::get_pointer(*x); - } - - // - // get_pointer - // - template - inline SPROUT_CONSTEXPR typename sprout::value_holder::pointer_type - get_pointer(sprout::value_holder& x) { - return sprout::value_holder::get_pointer(x); - } - template - inline SPROUT_CONSTEXPR typename sprout::value_holder::pointer_type - get_pointer(sprout::value_holder&& x) { - return sprout::value_holder::get_pointer(sprout::move(x)); - } - template - inline SPROUT_CONSTEXPR typename sprout::value_holder::pointer_const_type - get_pointer(sprout::value_holder const& x) { - return sprout::value_holder::get_pointer(x); - } -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_VALUE_HOLDER_GET_HPP diff --git a/dsp/lib/sprout/sprout/utility/value_holder/hash.hpp b/dsp/lib/sprout/sprout/utility/value_holder/hash.hpp deleted file mode 100644 index ca0f889..0000000 --- a/dsp/lib/sprout/sprout/utility/value_holder/hash.hpp +++ /dev/null @@ -1,53 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_VALUE_HOLDER_HASH_HPP -#define SPROUT_UTILITY_VALUE_HOLDER_HASH_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // hash_value - // - template - inline SPROUT_CONSTEXPR std::size_t - hash_value(sprout::value_holder const& v) { - return sprout::to_hash(*v) - ; - } - template - inline SPROUT_CONSTEXPR std::size_t - hash_value(sprout::value_holder const& v) { - return v.is_initialized() ? sprout::to_hash(*v) - : 0 - ; - } -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // hash - // - template - struct hash > - : public sprout::hash > - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -#endif // #ifndef SPROUT_UTILITY_VALUE_HOLDER_HASH_HPP diff --git a/dsp/lib/sprout/sprout/utility/value_holder/io.hpp b/dsp/lib/sprout/sprout/utility/value_holder/io.hpp deleted file mode 100644 index ca4dc77..0000000 --- a/dsp/lib/sprout/sprout/utility/value_holder/io.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2016 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_VALUE_HOLDER_IO_HPP -#define SPROUT_UTILITY_VALUE_HOLDER_IO_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // operator>> - // - template - inline SPROUT_NON_CONSTEXPR typename std::enable_if< - !std::is_reference::value, - std::basic_istream& - >::type - operator>>(std::basic_istream& lhs, sprout::value_holder& rhs) { - if (lhs.good()) { - int d = lhs.get(); - if (d == ' ') { - T x; - lhs >> x; - rhs = x; - } else { - lhs.setstate(std::ios::failbit); - } - } - return lhs; - } - // - // operator<< - // - template - inline SPROUT_NON_CONSTEXPR std::basic_ostream& - operator<<(std::basic_ostream& lhs, sprout::value_holder const& rhs) { - if (lhs.good()) { - if (!rhs) { - lhs << "--"; - } else { - lhs << ' ' << *rhs; - } - } - return lhs; - } -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_VALUE_HOLDER_IO_HPP diff --git a/dsp/lib/sprout/sprout/utility/value_holder/value_holder.hpp b/dsp/lib/sprout/sprout/utility/value_holder/value_holder.hpp deleted file mode 100644 index 7b3ae0f..0000000 --- a/dsp/lib/sprout/sprout/utility/value_holder/value_holder.hpp +++ /dev/null @@ -1,343 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2016 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_VALUE_HOLDER_VALUE_HOLDER_HPP -#define SPROUT_UTILITY_VALUE_HOLDER_VALUE_HOLDER_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - struct holder_helper { - public: - typedef T value_type; - typedef T& lvalue_reference; - typedef T&& rvalue_reference; - typedef lvalue_reference reference; - typedef T const& const_lvalue_reference; - typedef T const&& const_rvalue_reference; - typedef const_lvalue_reference const_reference; - typedef T const& mutable_or_const_reference; - typedef T* pointer; - typedef T const* const_pointer; - typedef T const* mutable_or_const_pointer; - typedef T const& param_type; - typedef T&& movable_param_type; - typedef T holder_type; - public: - static SPROUT_CONSTEXPR holder_type const& hold(param_type p) SPROUT_NOEXCEPT { - return p; - } - static SPROUT_CONSTEXPR holder_type&& hold(movable_param_type p) SPROUT_NOEXCEPT { - return sprout::move(p); - } - static SPROUT_CONSTEXPR reference ref(holder_type& r) SPROUT_NOEXCEPT { - return r; - } - static SPROUT_CONSTEXPR const_reference ref(holder_type const& r) SPROUT_NOEXCEPT { - return r; - } - static SPROUT_CONSTEXPR pointer ptr(holder_type& r) SPROUT_NOEXCEPT { - return sprout::addressof(r); - } - static SPROUT_CONSTEXPR const_pointer ptr(holder_type const& r) SPROUT_NOEXCEPT { - return sprout::addressof(r); - } - }; - template - struct holder_helper { - public: - typedef T value_type; - typedef T const& lvalue_reference; - typedef T const&& rvalue_reference; - typedef lvalue_reference reference; - typedef T const& const_lvalue_reference; - typedef T const&& const_rvalue_reference; - typedef const_lvalue_reference const_reference; - typedef T const& mutable_or_const_reference; - typedef T const* pointer; - typedef T const* const_pointer; - typedef T const* mutable_or_const_pointer; - typedef T const& param_type; - typedef T const&& movable_param_type; - typedef T holder_type; - public: - static SPROUT_CONSTEXPR holder_type const& hold(param_type p) SPROUT_NOEXCEPT { - return p; - } - static SPROUT_CONSTEXPR holder_type const&& hold(movable_param_type p) SPROUT_NOEXCEPT { - return sprout::move(p); - } - static SPROUT_CONSTEXPR reference ref(holder_type& r) SPROUT_NOEXCEPT { - return r; - } - static SPROUT_CONSTEXPR const_reference ref(holder_type const& r) SPROUT_NOEXCEPT { - return r; - } - static SPROUT_CONSTEXPR pointer ptr(holder_type& r) SPROUT_NOEXCEPT { - return sprout::addressof(r); - } - static SPROUT_CONSTEXPR const_pointer ptr(holder_type const& r) SPROUT_NOEXCEPT { - return sprout::addressof(r); - } - }; - template - struct holder_helper { - public: - typedef T value_type; - typedef T& lvalue_reference; - typedef T& rvalue_reference; - typedef lvalue_reference reference; - typedef T const& const_lvalue_reference; - typedef T const& const_rvalue_reference; - typedef const_lvalue_reference const_reference; - typedef T& mutable_or_const_reference; - typedef T* pointer; - typedef T const* const_pointer; - typedef T* mutable_or_const_pointer; - typedef T& param_type; - typedef T&& movable_param_type; - typedef T* holder_type; - public: - static SPROUT_CONSTEXPR holder_type hold(param_type p) SPROUT_NOEXCEPT { - return sprout::addressof(p); - } - static SPROUT_CONSTEXPR reference ref(holder_type r) { - return *r; - // !!! -// return r ? *r -// : (throw sprout::bad_optional_access("value_holder<>: bad optional access"), *r) -// ; - } - static SPROUT_CONSTEXPR pointer ptr(holder_type r) SPROUT_NOEXCEPT { - return r; - } - }; - template - struct holder_helper { - public: - typedef T value_type; - typedef T const& lvalue_reference; - typedef T const& rvalue_reference; - typedef lvalue_reference reference; - typedef T const& const_lvalue_reference; - typedef T const& const_rvalue_reference; - typedef const_lvalue_reference const_reference; - typedef T const& mutable_or_const_reference; - typedef T const* pointer; - typedef T const* const_pointer; - typedef T const* mutable_or_const_pointer; - typedef T const& param_type; - typedef T const&& movable_param_type; - typedef T const* holder_type; - public: - static SPROUT_CONSTEXPR holder_type hold(param_type p) SPROUT_NOEXCEPT { - return sprout::addressof(p); - } - static SPROUT_CONSTEXPR reference ref(holder_type r) { - return *r; - // !!! -// return r ? *r -// : (throw sprout::bad_optional_access("value_holder<>: bad optional access"), *r) -// ; - } - static SPROUT_CONSTEXPR pointer ptr(holder_type r) SPROUT_NOEXCEPT { - return r; - } - }; - } // namespace detail - // - // value_holder - // - template - class value_holder { - public: - typedef T type; - private: - typedef sprout::detail::holder_helper helper_type; - typedef typename helper_type::holder_type holder_type; - public: - typedef typename helper_type::value_type value_type; - typedef typename helper_type::lvalue_reference lvalue_reference; - typedef typename helper_type::rvalue_reference rvalue_reference; - typedef typename helper_type::reference reference; - typedef typename helper_type::const_lvalue_reference const_lvalue_reference; - typedef typename helper_type::const_rvalue_reference const_rvalue_reference; - typedef typename helper_type::const_reference const_reference; - typedef typename helper_type::mutable_or_const_reference mutable_or_const_reference; - typedef typename helper_type::pointer pointer; - typedef typename helper_type::const_pointer const_pointer; - typedef typename helper_type::mutable_or_const_pointer mutable_or_const_pointer; - typedef typename helper_type::param_type param_type; - typedef typename helper_type::movable_param_type movable_param_type; - typedef lvalue_reference lvalue_reference_type; - typedef rvalue_reference rvalue_reference_type; - typedef reference reference_type; - typedef mutable_or_const_reference reference_const_type; - typedef pointer pointer_type; - typedef mutable_or_const_pointer pointer_const_type; - typedef param_type argument_type; - typedef movable_param_type movable_argument_type; - public: - template - struct is_constructible_args - : public sprout::is_constructible - {}; - public: - static SPROUT_CONSTEXPR reference get(value_holder& t) SPROUT_NOEXCEPT { - return helper_type::ref(t.holder_); - } - static SPROUT_CONSTEXPR rvalue_reference get(value_holder&& t) SPROUT_NOEXCEPT { - return static_cast(get(t)); - } - static SPROUT_CONSTEXPR mutable_or_const_reference get(value_holder const& t) SPROUT_NOEXCEPT { - return helper_type::ref(t.holder_); - } - static SPROUT_CONSTEXPR pointer get_pointer(value_holder& t) SPROUT_NOEXCEPT { - return helper_type::ptr(t.holder_); - } - static SPROUT_CONSTEXPR pointer get_pointer(value_holder&& t) SPROUT_NOEXCEPT { - return get_pointer(t); - } - static SPROUT_CONSTEXPR mutable_or_const_pointer get_pointer(value_holder const& t) SPROUT_NOEXCEPT { - return helper_type::ptr(t.holder_); - } - private: - holder_type holder_; - public: - SPROUT_CONSTEXPR value_holder() - : holder_() - {} - value_holder(value_holder const&) = default; - value_holder(value_holder&&) = default; - explicit SPROUT_CONSTEXPR value_holder(argument_type p) - : holder_(helper_type::hold(p)) - {} - explicit SPROUT_CONSTEXPR value_holder(movable_argument_type p) - : holder_(helper_type::hold(sprout::move(p))) - {} - template< - typename... Args, - typename = typename std::enable_if::value>::type - > - explicit SPROUT_CONSTEXPR value_holder(sprout::in_place_t, Args&&... args) - : holder_(SPROUT_FORWARD(Args, args)...) - {} - template< - typename U, typename... Args, - typename = typename std::enable_if&, Args...>::value>::type - > - explicit SPROUT_CONSTEXPR value_holder(sprout::in_place_t, std::initializer_list il, Args&&... args) - : holder_(il, SPROUT_FORWARD(Args, args)...) - {} - - SPROUT_CXX14_CONSTEXPR value_holder& operator=(value_holder const& rhs) { - value_holder temp(rhs); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR value_holder& operator=(value_holder&& rhs) { - value_holder temp(sprout::move(rhs)); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR value_holder& operator=(argument_type p) { - value_holder temp(p); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR value_holder& operator=(movable_argument_type p) { - value_holder temp(sprout::move(p)); - temp.swap(*this); - return *this; - } - - SPROUT_CXX14_CONSTEXPR void swap(value_holder& other) - SPROUT_NOEXCEPT_IF_EXPR(sprout::swap(holder_, other.holder_)) - { - sprout::swap(holder_, other.holder_); - } - - SPROUT_CXX14_CONSTEXPR operator reference() { - return helper_type::ref(holder_); - } - SPROUT_CONSTEXPR operator mutable_or_const_reference() const { - return helper_type::ref(holder_); - } - SPROUT_CXX14_CONSTEXPR reference operator*() { - return helper_type::ref(holder_); - } - SPROUT_CONSTEXPR mutable_or_const_reference operator*() const { - return helper_type::ref(holder_); - } - SPROUT_CXX14_CONSTEXPR reference get() { - return helper_type::ref(holder_); - } - SPROUT_CONSTEXPR mutable_or_const_reference get() const { - return helper_type::ref(holder_); - } - SPROUT_CXX14_CONSTEXPR reference value() { - return get(); - } - SPROUT_CONSTEXPR mutable_or_const_reference value() const { - return get(); - } - - SPROUT_CXX14_CONSTEXPR pointer operator->() SPROUT_NOEXCEPT { - return helper_type::ptr(holder_); - } - SPROUT_CONSTEXPR mutable_or_const_pointer operator->() const SPROUT_NOEXCEPT { - return helper_type::ptr(holder_); - } - SPROUT_CXX14_CONSTEXPR pointer get_pointer() SPROUT_NOEXCEPT { - return helper_type::ptr(holder_); - } - SPROUT_CONSTEXPR mutable_or_const_pointer get_pointer() const SPROUT_NOEXCEPT { - return helper_type::ptr(holder_); - } - SPROUT_CXX14_CONSTEXPR pointer get_ptr() SPROUT_NOEXCEPT { - return get_pointer(); - } - SPROUT_CONSTEXPR mutable_or_const_pointer get_ptr() const SPROUT_NOEXCEPT { - return get_pointer(); - } - - SPROUT_EXPLICIT_CONVERSION SPROUT_CONSTEXPR operator bool() const SPROUT_NOEXCEPT { - return is_initialized(); - } - SPROUT_CONSTEXPR bool operator!() const SPROUT_NOEXCEPT { - return !is_initialized(); - } - SPROUT_CONSTEXPR bool is_initialized() const SPROUT_NOEXCEPT { - return !!get_pointer(); - } - }; - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::value_holder& lhs, sprout::value_holder& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_VALUE_HOLDER_VALUE_HOLDER_HPP diff --git a/dsp/lib/sprout/sprout/utility/while_loop.hpp b/dsp/lib/sprout/sprout/utility/while_loop.hpp deleted file mode 100644 index 91a19ef..0000000 --- a/dsp/lib/sprout/sprout/utility/while_loop.hpp +++ /dev/null @@ -1,78 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UTILITY_WHILE_LOOP_HPP -#define SPROUT_UTILITY_WHILE_LOOP_HPP - -#include -#include - -namespace sprout { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::pair - while_loop_check(T const& init, Predicate pred) { - return sprout::pair(init, !pred(init)); - } - template - inline SPROUT_CONSTEXPR sprout::pair - while_loop_impl_1(sprout::pair const& current, Predicate pred, UnaryOperation unary_op, std::size_t n) { - return current.second || !pred(current.first) ? current - : n == 1 ? sprout::detail::while_loop_check(unary_op(current.first), pred) - : sprout::detail::while_loop_impl_1( - sprout::detail::while_loop_impl_1( - current, - pred, unary_op, n / 2 - ), - pred, unary_op, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - while_loop_impl(sprout::pair const& current, Predicate pred, UnaryOperation unary_op, std::size_t n) { - return current.second || !pred(current.first) ? current - : sprout::detail::while_loop_impl( - sprout::detail::while_loop_impl_1( - current, - pred, unary_op, n - ), - pred, unary_op, n * 2 - ) - ; - } - } // namespace detail - - // - // while_loop - // - // recursion depth: - // O(log N) - // - template - inline SPROUT_CONSTEXPR T - while_loop(T init, Predicate pred, UnaryOperation unary_op) { - typedef sprout::pair type; - return sprout::detail::while_loop_impl(type(init, false), pred, unary_op, 1).first; - } - - // - // flat_while_loop - // - // recursion depth: - // 0 - // - template - inline SPROUT_CXX14_CONSTEXPR T - flat_while_loop(T init, Predicate pred, UnaryOperation unary_op) { - for (; pred(init); init = unary_op(init)) - ; - return init; - } -} // namespace sprout - -#endif // #ifndef SPROUT_UTILITY_WHILE_LOOP_HPP diff --git a/dsp/lib/sprout/sprout/uuid.hpp b/dsp/lib/sprout/sprout/uuid.hpp deleted file mode 100644 index 815182c..0000000 --- a/dsp/lib/sprout/sprout/uuid.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UUID_HPP -#define SPROUT_UUID_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_UUID_HPP diff --git a/dsp/lib/sprout/sprout/uuid/detail/table.hpp b/dsp/lib/sprout/sprout/uuid/detail/table.hpp deleted file mode 100644 index 3a5a395..0000000 --- a/dsp/lib/sprout/sprout/uuid/detail/table.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UUID_DETAIL_TABLE_HPP -#define SPROUT_UUID_DETAIL_TABLE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace uuids { - namespace detail { - SPROUT_LITERAL_STRING_DEF(digits, "0123456789abcdefABCDEF", 22); - SPROUT_LITERAL_CHAR_DEF(dash, '-'); - SPROUT_LITERAL_CHAR_DEF(lbrace, '{'); - SPROUT_LITERAL_CHAR_DEF(rbrace, '}'); - - template - struct values; - -# define SPROUT_UUID_TABLE_DEF \ - {{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 10, 11, 12, 13, 14, 15}} - - template - struct values { - public: - typedef sprout::array table_type; - public: - SPROUT_STATIC_CONSTEXPR table_type table - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(SPROUT_UUID_TABLE_DEF) - ; - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::uuids::detail::values::table_type - sprout::uuids::detail::values::table - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(SPROUT_UUID_TABLE_DEF) - ; - -# undef SPROUT_UUID_TABLE_DEF - } // namespace detail - } // namespace uuids -} // namespace sprout - -#endif // #ifndef SPROUT_UUID_DETAIL_TABLE_HPP diff --git a/dsp/lib/sprout/sprout/uuid/generators.hpp b/dsp/lib/sprout/sprout/uuid/generators.hpp deleted file mode 100644 index 6d5935e..0000000 --- a/dsp/lib/sprout/sprout/uuid/generators.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UUID_GENERATORS_HPP -#define SPROUT_UUID_GENERATORS_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_UUID_GENERATORS_HPP diff --git a/dsp/lib/sprout/sprout/uuid/hash.hpp b/dsp/lib/sprout/sprout/uuid/hash.hpp deleted file mode 100644 index 96ce340..0000000 --- a/dsp/lib/sprout/sprout/uuid/hash.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UUID_HASH_HPP -#define SPROUT_UUID_HASH_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // hash_value - // - inline SPROUT_CONSTEXPR std::size_t - hash_value(sprout::uuids::uuid const& v) { - return sprout::hash_range(v); - } -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // hash - // - template<> - struct hash - : public sprout::hash - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -#endif // #ifndef SPROUT_UUID_HASH_HPP diff --git a/dsp/lib/sprout/sprout/uuid/io.hpp b/dsp/lib/sprout/sprout/uuid/io.hpp deleted file mode 100644 index 1819869..0000000 --- a/dsp/lib/sprout/sprout/uuid/io.hpp +++ /dev/null @@ -1,193 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UUID_IO_HPP -#define SPROUT_UUID_IO_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace uuids { - // - // operator>> - // - template - inline std::basic_istream& - operator>>(std::basic_istream& lhs, sprout::uuids::uuid& rhs) { - typedef typename std::basic_ios::char_type char_type; - typename std::basic_istream::sentry const ok(lhs); - typedef std::ctype ctype_type; - if (ok) { - sprout::uuids::uuid::value_type data[16]; - ctype_type const& ctype = std::use_facet(lhs.getloc()); - char_type xdigits[16]; - { - char const szdigits[] = "0123456789ABCDEF"; - ctype.widen(szdigits, szdigits + 16, xdigits); - } - char_type const* const xdigits_end = xdigits + 16; - char_type c; - for (sprout::uuids::uuid::size_type i = 0, last = rhs.size(); i < last && lhs; ++i) { - lhs >> c; - c = ctype.toupper(c); - char_type const* f = sprout::find(xdigits, xdigits_end, c); - if (f == xdigits_end) { - lhs.setstate(std::ios_base::failbit); - break; - } - sprout::uuids::uuid::value_type byte = static_cast(std::distance(&xdigits[0], f)); - lhs >> c; - c = ctype.toupper(c); - f = sprout::find(xdigits, xdigits_end, c); - if (f == xdigits_end) { - lhs.setstate(std::ios_base::failbit); - break; - } - byte <<= 4; - byte |= static_cast(std::distance(&xdigits[0], f)); - data[i] = byte; - if (lhs) { - if (i == 3 || i == 5 || i == 7 || i == 9) { - lhs >> c; - if (c != lhs.widen('-')) { - lhs.setstate(std::ios_base::failbit); - break; - } - } - } - } - if (lhs) { - sprout::copy(data, data + 16, rhs.begin()); - } - } - return lhs; - } - // - // operator<< - // - template - inline SPROUT_NON_CONSTEXPR std::basic_ostream& - operator<<(std::basic_ostream& lhs, sprout::uuids::uuid const& rhs) { - sprout::detail::io::ios_flags_saver flags_saver(lhs); - sprout::detail::io::basic_ios_fill_saver fill_saver(lhs); - typename std::basic_ostream::sentry const ok(lhs); - if (ok) { - std::streamsize const width = lhs.width(0); - std::streamsize const uuid_width = 36; - std::ios_base::fmtflags const flags = lhs.flags(); - typename std::basic_ios::char_type const fill = lhs.fill(); - if (flags & (std::ios_base::right | std::ios_base::internal)) { - for (std::streamsize i = uuid_width; i < width; ++i) { - lhs << fill; - } - } - lhs << std::hex; - lhs.fill(lhs.widen('0')); - std::size_t i = 0; - for (sprout::uuids::uuid::const_iterator i_data = rhs.begin(), i_last = rhs.end(); i_data != i_last; ++i_data, ++i) { - lhs.width(2); - lhs << static_cast(*i_data); - if (i == 3 || i == 5 || i == 7 || i == 9) { - lhs << lhs.widen('-'); - } - } - if (flags & std::ios_base::left) { - for (std::streamsize i = uuid_width; i < width; ++i) { - lhs << fill; - } - } - lhs.width(0); - } - return lhs; - } - - // - // to_string_of - // - template > - inline SPROUT_CONSTEXPR sprout::basic_string - to_string_of(sprout::uuids::uuid const& u) { - typedef sprout::detail::string_construct_access access_type; - return access_type::raw_construct( - 36, - sprout::uuids::detail::digits::value[(u[0] >> 4) & 0x0F], - sprout::uuids::detail::digits::value[(u[0]) & 0x0F], - sprout::uuids::detail::digits::value[(u[1] >> 4) & 0x0F], - sprout::uuids::detail::digits::value[(u[1]) & 0x0F], - sprout::uuids::detail::digits::value[(u[2] >> 4) & 0x0F], - sprout::uuids::detail::digits::value[(u[2]) & 0x0F], - sprout::uuids::detail::digits::value[(u[3] >> 4) & 0x0F], - sprout::uuids::detail::digits::value[(u[3]) & 0x0F], - sprout::uuids::detail::dash::value, - sprout::uuids::detail::digits::value[(u[4] >> 4) & 0x0F], - sprout::uuids::detail::digits::value[(u[4]) & 0x0F], - sprout::uuids::detail::digits::value[(u[5] >> 4) & 0x0F], - sprout::uuids::detail::digits::value[(u[5]) & 0x0F], - sprout::uuids::detail::dash::value, - sprout::uuids::detail::digits::value[(u[6] >> 4) & 0x0F], - sprout::uuids::detail::digits::value[(u[6]) & 0x0F], - sprout::uuids::detail::digits::value[(u[7] >> 4) & 0x0F], - sprout::uuids::detail::digits::value[(u[7]) & 0x0F], - sprout::uuids::detail::dash::value, - sprout::uuids::detail::digits::value[(u[8] >> 4) & 0x0F], - sprout::uuids::detail::digits::value[(u[8]) & 0x0F], - sprout::uuids::detail::digits::value[(u[9] >> 4) & 0x0F], - sprout::uuids::detail::digits::value[(u[9]) & 0x0F], - sprout::uuids::detail::dash::value, - sprout::uuids::detail::digits::value[(u[10] >> 4) & 0x0F], - sprout::uuids::detail::digits::value[(u[10]) & 0x0F], - sprout::uuids::detail::digits::value[(u[11] >> 4) & 0x0F], - sprout::uuids::detail::digits::value[(u[11]) & 0x0F], - sprout::uuids::detail::digits::value[(u[12] >> 4) & 0x0F], - sprout::uuids::detail::digits::value[(u[12]) & 0x0F], - sprout::uuids::detail::digits::value[(u[13] >> 4) & 0x0F], - sprout::uuids::detail::digits::value[(u[13]) & 0x0F], - sprout::uuids::detail::digits::value[(u[14] >> 4) & 0x0F], - sprout::uuids::detail::digits::value[(u[14]) & 0x0F], - sprout::uuids::detail::digits::value[(u[15] >> 4) & 0x0F], - sprout::uuids::detail::digits::value[(u[15]) & 0x0F] - ); - } - // - // to_string - // to_wstring - // to_u16string - // to_u32string - // - inline SPROUT_CONSTEXPR sprout::basic_string - to_string(sprout::uuids::uuid const& u) { - return sprout::uuids::to_string_of(u); - } - inline SPROUT_CONSTEXPR sprout::basic_string - to_wstring(sprout::uuids::uuid const& u) { - return sprout::uuids::to_string_of(u); - } -#if SPROUT_USE_UNICODE_LITERALS - inline SPROUT_CONSTEXPR sprout::basic_string - to_u16string(sprout::uuids::uuid const& u) { - return sprout::uuids::to_string_of(u); - } - inline SPROUT_CONSTEXPR sprout::basic_string - to_u32string(sprout::uuids::uuid const& u) { - return sprout::uuids::to_string_of(u); - } -#endif - } // namespace uuids -} // namespace sprout - -#endif // #ifndef SPROUT_UUID_IO_HPP diff --git a/dsp/lib/sprout/sprout/uuid/literals.hpp b/dsp/lib/sprout/sprout/uuid/literals.hpp deleted file mode 100644 index 229bb20..0000000 --- a/dsp/lib/sprout/sprout/uuid/literals.hpp +++ /dev/null @@ -1,146 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UUID_LITERALS_HPP -#define SPROUT_UUID_LITERALS_HPP - -#include -#include -#include - -#if SPROUT_USE_USER_DEFINED_LITERALS - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace uuids { - namespace detail { - SPROUT_LITERAL_STRING_DEF(dns_token, "dns", 3); - SPROUT_LITERAL_STRING_DEF(url_token, "url", 3); - SPROUT_LITERAL_STRING_DEF(oid_token, "oid", 3); - SPROUT_LITERAL_STRING_DEF(x500_token, "x500", 4); - - template - inline SPROUT_CONSTEXPR sprout::uuids::md5_name_generator - uuid3_impl(InputRange const& rng) { - typedef typename std::decay::type>::type value_type; - typedef sprout::ctypes::nocase_equal_to predicate_type; - return sprout::range::equal(rng, sprout::uuids::detail::dns_token::value, predicate_type()) ? sprout::uuids::make_uuid3_dns() - : sprout::range::equal(rng, sprout::uuids::detail::url_token::value, predicate_type()) ? sprout::uuids::make_uuid3_url() - : sprout::range::equal(rng, sprout::uuids::detail::oid_token::value, predicate_type()) ? sprout::uuids::make_uuid3_oid() - : sprout::range::equal(rng, sprout::uuids::detail::x500_token::value, predicate_type()) ? sprout::uuids::make_uuid3_x500() - : sprout::uuids::make_uuid3(sprout::uuids::make_uuid(sprout::begin(rng), sprout::end(rng))) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::uuids::sha1_name_generator - uuid5_impl(InputRange const& rng) { - typedef typename std::decay::type>::type value_type; - typedef sprout::ctypes::nocase_equal_to predicate_type; - return sprout::range::equal(rng, sprout::uuids::detail::dns_token::value, predicate_type()) ? sprout::uuids::make_uuid5_dns() - : sprout::range::equal(rng, sprout::uuids::detail::url_token::value, predicate_type()) ? sprout::uuids::make_uuid5_url() - : sprout::range::equal(rng, sprout::uuids::detail::oid_token::value, predicate_type()) ? sprout::uuids::make_uuid5_oid() - : sprout::range::equal(rng, sprout::uuids::detail::x500_token::value, predicate_type()) ? sprout::uuids::make_uuid5_x500() - : sprout::uuids::make_uuid5(sprout::uuids::make_uuid(sprout::begin(rng), sprout::end(rng))) - ; - } - } // namespace detail - } // namespace uuids - - namespace literals { - namespace uuids { - // - // _uuid - // - inline SPROUT_CONSTEXPR sprout::uuids::uuid - operator"" _uuid(char const* s, std::size_t size) { - return sprout::uuids::make_uuid(s, s + size); - } - inline SPROUT_CONSTEXPR sprout::uuids::uuid - operator"" _uuid(wchar_t const* s, std::size_t size) { - return sprout::uuids::make_uuid(s, s + size); - } -#if SPROUT_USE_UNICODE_LITERALS - inline SPROUT_CONSTEXPR sprout::uuids::uuid - operator"" _uuid(char16_t const* s, std::size_t size) { - return sprout::uuids::make_uuid(s, s + size); - } - inline SPROUT_CONSTEXPR sprout::uuids::uuid - operator"" _uuid(char32_t const* s, std::size_t size) { - return sprout::uuids::make_uuid(s, s + size); - } -#endif - - // - // _uuid3 - // - inline SPROUT_CONSTEXPR sprout::uuids::md5_name_generator - operator"" _uuid3(char const* s, std::size_t size) { - return sprout::uuids::detail::uuid3_impl(sprout::range::make_ptr_range(s, size)); - } - inline SPROUT_CONSTEXPR sprout::uuids::md5_name_generator - operator"" _uuid3(wchar_t const* s, std::size_t size) { - return sprout::uuids::detail::uuid3_impl(sprout::range::make_ptr_range(s, size)); - } -#if SPROUT_USE_UNICODE_LITERALS - inline SPROUT_CONSTEXPR sprout::uuids::md5_name_generator - operator"" _uuid3(char16_t const* s, std::size_t size) { - return sprout::uuids::detail::uuid3_impl(sprout::range::make_ptr_range(s, size)); - } - inline SPROUT_CONSTEXPR sprout::uuids::md5_name_generator - operator"" _uuid3(char32_t const* s, std::size_t size) { - return sprout::uuids::detail::uuid3_impl(sprout::range::make_ptr_range(s, size)); - } -#endif - - // - // _uuid5 - // - inline SPROUT_CONSTEXPR sprout::uuids::sha1_name_generator - operator"" _uuid5(char const* s, std::size_t size) { - return sprout::uuids::detail::uuid5_impl(sprout::range::make_ptr_range(s, size)); - } - inline SPROUT_CONSTEXPR sprout::uuids::sha1_name_generator - operator"" _uuid5(wchar_t const* s, std::size_t size) { - return sprout::uuids::detail::uuid5_impl(sprout::range::make_ptr_range(s, size)); - } -#if SPROUT_USE_UNICODE_LITERALS - inline SPROUT_CONSTEXPR sprout::uuids::sha1_name_generator - operator"" _uuid5(char16_t const* s, std::size_t size) { - return sprout::uuids::detail::uuid5_impl(sprout::range::make_ptr_range(s, size)); - } - inline SPROUT_CONSTEXPR sprout::uuids::sha1_name_generator - operator"" _uuid5(char32_t const* s, std::size_t size) { - return sprout::uuids::detail::uuid5_impl(sprout::range::make_ptr_range(s, size)); - } -#endif - } // namespace uuids - - using sprout::literals::uuids::operator"" _uuid; - using sprout::literals::uuids::operator"" _uuid3; - using sprout::literals::uuids::operator"" _uuid5; - } // namespace literals - - using sprout::literals::uuids::operator"" _uuid; - using sprout::literals::uuids::operator"" _uuid3; - using sprout::literals::uuids::operator"" _uuid5; -} // namespace sprout - -#endif // #if SPROUT_USE_USER_DEFINED_LITERALS - -#endif // #ifndef SPROUT_UUID_LITERALS_HPP diff --git a/dsp/lib/sprout/sprout/uuid/md5_name_generator.hpp b/dsp/lib/sprout/sprout/uuid/md5_name_generator.hpp deleted file mode 100644 index 2b91d8f..0000000 --- a/dsp/lib/sprout/sprout/uuid/md5_name_generator.hpp +++ /dev/null @@ -1,165 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UUID_MD5_NAME_GENERATOR_HPP -#define SPROUT_UUID_MD5_NAME_GENERATOR_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace uuids { - // - // md5_name_generator - // - class md5_name_generator { - public: - typedef sprout::uuids::uuid result_type; - private: - typedef result_type::value_type value_type; - private: - sprout::md5 sum_; - private: - SPROUT_CONSTEXPR result_type sha_to_uuid_1(sprout::md5::value_type const& value) const { - return result_type{{ - value[0], - value[1], - value[2], - value[3], - value[4], - value[5], - static_cast((value[6] & 0x3F) | 0x30), - value[7], - static_cast((value[8] & 0xBF) | 0x80), - value[9], - value[10], - value[11], - value[12], - value[13], - value[14], - value[15] - }}; - } - SPROUT_CONSTEXPR result_type sha_to_uuid(sprout::md5 const& sha) const { - return sha_to_uuid_1(sha.checksum()); - } - public: - SPROUT_CONSTEXPR md5_name_generator() - : sum_(sprout::md5().c_process_range(sprout::uuids::uuid{{0}})) - {} - explicit SPROUT_CONSTEXPR md5_name_generator(sprout::uuids::uuid const& namespace_uuid) - : sum_(sprout::md5().c_process_range(namespace_uuid)) - {} - template - SPROUT_CONSTEXPR result_type operator()(sprout::basic_string const& name) const { - return sha_to_uuid(sum_.c_process_range(name)); - } - SPROUT_CONSTEXPR result_type operator()(char const* name) const { - return sha_to_uuid(sum_.c_process_bytes(name, sprout::char_traits::length(name))); - } - SPROUT_CONSTEXPR result_type operator()(wchar_t const* name) const { - return sha_to_uuid(sum_.c_process_bytes(name, sprout::char_traits::length(name))); - } -#if SPROUT_USE_UNICODE_LITERALS - SPROUT_CONSTEXPR result_type operator()(char16_t const* name) const { - return sha_to_uuid(sum_.c_process_bytes(name, sprout::char_traits::length(name))); - } - SPROUT_CONSTEXPR result_type operator()(char32_t const* name) const { - return sha_to_uuid(sum_.c_process_bytes(name, sprout::char_traits::length(name))); - } -#endif - }; - - // - // make_uuid3 - // - template - inline SPROUT_CONSTEXPR sprout::uuids::uuid - make_uuid3(sprout::basic_string const& name) { - return sprout::uuids::md5_name_generator()(name); - } - inline SPROUT_CONSTEXPR sprout::uuids::uuid - make_uuid3(char const* name) { - return sprout::uuids::md5_name_generator()(name); - } - inline SPROUT_CONSTEXPR sprout::uuids::uuid - make_uuid3(wchar_t const* name) { - return sprout::uuids::md5_name_generator()(name); - } -#if SPROUT_USE_UNICODE_LITERALS - inline SPROUT_CONSTEXPR sprout::uuids::uuid - make_uuid3(char16_t const* name) { - return sprout::uuids::md5_name_generator()(name); - } - inline SPROUT_CONSTEXPR sprout::uuids::uuid - make_uuid3(char32_t const* name) { - return sprout::uuids::md5_name_generator()(name); - } -#endif - - template - inline SPROUT_CONSTEXPR sprout::uuids::uuid - make_uuid3(sprout::uuids::uuid const& namespace_uuid, sprout::basic_string const& name) { - return sprout::uuids::md5_name_generator(namespace_uuid)(name); - } - inline SPROUT_CONSTEXPR sprout::uuids::uuid - make_uuid3(sprout::uuids::uuid const& namespace_uuid, char const* name) { - return sprout::uuids::md5_name_generator(namespace_uuid)(name); - } - inline SPROUT_CONSTEXPR sprout::uuids::uuid - make_uuid3(sprout::uuids::uuid const& namespace_uuid, wchar_t const* name) { - return sprout::uuids::md5_name_generator(namespace_uuid)(name); - } -#if SPROUT_USE_UNICODE_LITERALS - inline SPROUT_CONSTEXPR sprout::uuids::uuid - make_uuid3(sprout::uuids::uuid const& namespace_uuid, char16_t const* name) { - return sprout::uuids::md5_name_generator(namespace_uuid)(name); - } - inline SPROUT_CONSTEXPR sprout::uuids::uuid - make_uuid3(sprout::uuids::uuid const& namespace_uuid, char32_t const* name) { - return sprout::uuids::md5_name_generator(namespace_uuid)(name); - } -#endif - - inline SPROUT_CONSTEXPR sprout::uuids::md5_name_generator - make_uuid3() { - return sprout::uuids::md5_name_generator(); - } - inline SPROUT_CONSTEXPR sprout::uuids::md5_name_generator - make_uuid3(sprout::uuids::uuid const& namespace_uuid) { - return sprout::uuids::md5_name_generator(namespace_uuid); - } - - // - // make_uuid3_dns - // make_uuid3_url - // make_uuid3_oid - // make_uuid3_x500 - // - inline SPROUT_CONSTEXPR sprout::uuids::md5_name_generator - make_uuid3_dns() { - return sprout::uuids::md5_name_generator(sprout::uuids::namespace_dns_uuid()); - } - inline SPROUT_CONSTEXPR sprout::uuids::md5_name_generator - make_uuid3_url() { - return sprout::uuids::md5_name_generator(sprout::uuids::namespace_url_uuid()); - } - inline SPROUT_CONSTEXPR sprout::uuids::md5_name_generator - make_uuid3_oid() { - return sprout::uuids::md5_name_generator(sprout::uuids::namespace_oid_uuid()); - } - inline SPROUT_CONSTEXPR sprout::uuids::md5_name_generator - make_uuid3_x500() { - return sprout::uuids::md5_name_generator(sprout::uuids::namespace_x500_uuid()); - } - } // namespace uuids -} // namespace sprout - -#endif // #ifndef SPROUT_UUID_MD5_NAME_GENERATOR_HPP diff --git a/dsp/lib/sprout/sprout/uuid/name_generator.hpp b/dsp/lib/sprout/sprout/uuid/name_generator.hpp deleted file mode 100644 index 4988fd5..0000000 --- a/dsp/lib/sprout/sprout/uuid/name_generator.hpp +++ /dev/null @@ -1,24 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UUID_NAME_GENERATOR_HPP -#define SPROUT_UUID_NAME_GENERATOR_HPP - -#include -#include -#include - -namespace sprout { - namespace uuids { - // - // name_generator - // - typedef sprout::uuids::sha1_name_generator name_generator; - } // namespace uuids -} // namespace sprout - -#endif // #ifndef SPROUT_UUID_NAME_GENERATOR_HPP diff --git a/dsp/lib/sprout/sprout/uuid/namespaces.hpp b/dsp/lib/sprout/sprout/uuid/namespaces.hpp deleted file mode 100644 index a0ff2e5..0000000 --- a/dsp/lib/sprout/sprout/uuid/namespaces.hpp +++ /dev/null @@ -1,71 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UUID_NAMESPACES_HPP -#define SPROUT_UUID_NAMESPACES_HPP - -#include -#include - -namespace sprout { - namespace uuids { - // - // namespace_dns_uuid - // - inline SPROUT_CONSTEXPR sprout::uuids::uuid - namespace_dns_uuid() { - return sprout::uuids::uuid{{ - 0x6b, 0xa7, 0xb8, 0x10, - 0x9d, 0xad, - 0x11, 0xd1, - 0x80, 0xb4, - 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8 - }}; - } - // - // namespace_url_uuid - // - inline SPROUT_CONSTEXPR sprout::uuids::uuid - namespace_url_uuid() { - return sprout::uuids::uuid{{ - 0x6b, 0xa7, 0xb8, 0x11, - 0x9d, 0xad, - 0x11, 0xd1, - 0x80, 0xb4, - 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8 - }}; - } - // - // namespace_oid_uuid - // - inline SPROUT_CONSTEXPR sprout::uuids::uuid - namespace_oid_uuid() { - return sprout::uuids::uuid{{ - 0x6b, 0xa7, 0xb8, 0x12, - 0x9d, 0xad, - 0x11, 0xd1, - 0x80, 0xb4, - 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8 - }}; - } - // - // namespace_x500_uuid - // - inline SPROUT_CONSTEXPR sprout::uuids::uuid - namespace_x500_uuid() { - return sprout::uuids::uuid{{ - 0x6b, 0xa7, 0xb8, 0x14, - 0x9d, 0xad, - 0x11, 0xd1, - 0x80, 0xb4, - 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8 - }}; - } - } // namespace uuids -} // namespace sprout - -#endif // #ifndef SPROUT_UUID_NAMESPACES_HPP diff --git a/dsp/lib/sprout/sprout/uuid/nil_generator.hpp b/dsp/lib/sprout/sprout/uuid/nil_generator.hpp deleted file mode 100644 index 498d84c..0000000 --- a/dsp/lib/sprout/sprout/uuid/nil_generator.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UUID_NIL_GENERATOR_HPP -#define SPROUT_UUID_NIL_GENERATOR_HPP - -#include -#include - -namespace sprout { - namespace uuids { - // - // nil_generator - // - class nil_generator { - public: - typedef sprout::uuids::uuid result_type; - public: - SPROUT_CONSTEXPR result_type operator()() const { - return result_type{{0}}; - } - }; - - // - // nil_uuid - // - inline SPROUT_CONSTEXPR sprout::uuids::uuid - nil_uuid() { - return sprout::uuids::nil_generator()(); - } - } // namespace uuids -} // namespace sprout - -#endif // #ifndef SPROUT_UUID_NIL_GENERATOR_HPP diff --git a/dsp/lib/sprout/sprout/uuid/random_generator.hpp b/dsp/lib/sprout/sprout/uuid/random_generator.hpp deleted file mode 100644 index b8a8cf0..0000000 --- a/dsp/lib/sprout/sprout/uuid/random_generator.hpp +++ /dev/null @@ -1,120 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UUID_RANDOM_GENERATOR_HPP -#define SPROUT_UUID_RANDOM_GENERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace uuids { - // - // basic_random_generator - // - template - class basic_random_generator { - public: - typedef sprout::uuids::uuid result_type; - private: - typedef UniformRandomNumberGenerator engine_type; - typedef sprout::random::uniform_int_distribution distribution_type; - typedef typename result_type::value_type value_type; - private: - distribution_type distribution_; - private: - SPROUT_CONSTEXPR result_type random_to_uuid_1(std::uint32_t v0, std::uint32_t v1, std::uint32_t v2, std::uint32_t v3) const { - return result_type{{ - static_cast((v0 >> 24) & 0xFF), - static_cast((v0 >> 16) & 0xFF), - static_cast((v0 >> 8) & 0xFF), - static_cast((v0) & 0xFF), - static_cast((v1 >> 24) & 0xFF), - static_cast((v1 >> 16) & 0xFF), - static_cast(((v1 >> 8) & 0x4F) | 0x40), - static_cast((v1) & 0xFF), - static_cast(((v2 >> 24) & 0xBF) | 0x80), - static_cast((v2 >> 16) & 0xFF), - static_cast((v2 >> 8) & 0xFF), - static_cast((v2) & 0xFF), - static_cast((v3 >> 24) & 0xFF), - static_cast((v3 >> 16) & 0xFF), - static_cast((v3 >> 8) & 0xFF), - static_cast((v3) & 0xFF) - }}; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Args) == 3, - result_type - >::type random_to_uuid(Random const& rnd, Args... args) const { - return random_to_uuid_1(args..., sprout::random::result(rnd)); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Args) != 3, - result_type - >::type random_to_uuid(Random const& rnd, Args... args) const { - return random_to_uuid(sprout::random::next(rnd)(), args..., sprout::random::result(rnd)); - } - public: - SPROUT_CONSTEXPR basic_random_generator() - : distribution_(sprout::numeric_limits::min(), sprout::numeric_limits::max()) - {} - template - SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - result_type - >::type - operator()(T const& seed) const { - return operator()(engine_type(seed)); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - !std::is_integral::value, - result_type - >::type - operator()(Engine const& engine) const { - return random_to_uuid(sprout::random::combine(engine, distribution_)()); - } - }; - - // - // random_generator - // - typedef sprout::uuids::basic_random_generator<> random_generator; - - // - // make_uuid4 - // - template - SPROUT_CONSTEXPR typename std::enable_if< - std::is_integral::value, - sprout::uuids::uuid - >::type - make_uuid4(T const& seed) { - return sprout::uuids::random_generator()(seed); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - !std::is_integral::value, - sprout::uuids::uuid - >::type - make_uuid4(Engine const& engine) { - return sprout::uuids::random_generator()(engine); - } - } // namespace uuids -} // namespace sprout - -#endif // #ifndef SPROUT_UUID_RANDOM_GENERATOR_HPP diff --git a/dsp/lib/sprout/sprout/uuid/sha1_name_generator.hpp b/dsp/lib/sprout/sprout/uuid/sha1_name_generator.hpp deleted file mode 100644 index 33c0e24..0000000 --- a/dsp/lib/sprout/sprout/uuid/sha1_name_generator.hpp +++ /dev/null @@ -1,165 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UUID_SHA1_NAME_GENERATOR_HPP -#define SPROUT_UUID_SHA1_NAME_GENERATOR_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace uuids { - // - // sha1_name_generator - // - class sha1_name_generator { - public: - typedef sprout::uuids::uuid result_type; - private: - typedef result_type::value_type value_type; - private: - sprout::sha1 sum_; - private: - SPROUT_CONSTEXPR result_type sha_to_uuid_1(sprout::sha1::value_type const& value) const { - return result_type{{ - value[0], - value[1], - value[2], - value[3], - value[4], - value[5], - static_cast((value[6] & 0x5F) | 0x50), - value[7], - static_cast((value[8] & 0xBF) | 0x80), - value[9], - value[10], - value[11], - value[12], - value[13], - value[14], - value[15] - }}; - } - SPROUT_CONSTEXPR result_type sha_to_uuid(sprout::sha1 const& sha) const { - return sha_to_uuid_1(sha.checksum()); - } - public: - SPROUT_CONSTEXPR sha1_name_generator() - : sum_(sprout::sha1().c_process_range(sprout::uuids::uuid{{0}})) - {} - explicit SPROUT_CONSTEXPR sha1_name_generator(sprout::uuids::uuid const& namespace_uuid) - : sum_(sprout::sha1().c_process_range(namespace_uuid)) - {} - template - SPROUT_CONSTEXPR result_type operator()(sprout::basic_string const& name) const { - return sha_to_uuid(sum_.c_process_range(name)); - } - SPROUT_CONSTEXPR result_type operator()(char const* name) const { - return sha_to_uuid(sum_.c_process_bytes(name, sprout::char_traits::length(name))); - } - SPROUT_CONSTEXPR result_type operator()(wchar_t const* name) const { - return sha_to_uuid(sum_.c_process_bytes(name, sprout::char_traits::length(name))); - } -#if SPROUT_USE_UNICODE_LITERALS - SPROUT_CONSTEXPR result_type operator()(char16_t const* name) const { - return sha_to_uuid(sum_.c_process_bytes(name, sprout::char_traits::length(name))); - } - SPROUT_CONSTEXPR result_type operator()(char32_t const* name) const { - return sha_to_uuid(sum_.c_process_bytes(name, sprout::char_traits::length(name))); - } -#endif - }; - - // - // make_uuid5 - // - template - inline SPROUT_CONSTEXPR sprout::uuids::uuid - make_uuid5(sprout::basic_string const& name) { - return sprout::uuids::sha1_name_generator()(name); - } - inline SPROUT_CONSTEXPR sprout::uuids::uuid - make_uuid5(char const* name) { - return sprout::uuids::sha1_name_generator()(name); - } - inline SPROUT_CONSTEXPR sprout::uuids::uuid - make_uuid5(wchar_t const* name) { - return sprout::uuids::sha1_name_generator()(name); - } -#if SPROUT_USE_UNICODE_LITERALS - inline SPROUT_CONSTEXPR sprout::uuids::uuid - make_uuid5(char16_t const* name) { - return sprout::uuids::sha1_name_generator()(name); - } - inline SPROUT_CONSTEXPR sprout::uuids::uuid - make_uuid5(char32_t const* name) { - return sprout::uuids::sha1_name_generator()(name); - } -#endif - - template - inline SPROUT_CONSTEXPR sprout::uuids::uuid - make_uuid5(sprout::uuids::uuid const& namespace_uuid, sprout::basic_string const& name) { - return sprout::uuids::sha1_name_generator(namespace_uuid)(name); - } - inline SPROUT_CONSTEXPR sprout::uuids::uuid - make_uuid5(sprout::uuids::uuid const& namespace_uuid, char const* name) { - return sprout::uuids::sha1_name_generator(namespace_uuid)(name); - } - inline SPROUT_CONSTEXPR sprout::uuids::uuid - make_uuid5(sprout::uuids::uuid const& namespace_uuid, wchar_t const* name) { - return sprout::uuids::sha1_name_generator(namespace_uuid)(name); - } -#if SPROUT_USE_UNICODE_LITERALS - inline SPROUT_CONSTEXPR sprout::uuids::uuid - make_uuid5(sprout::uuids::uuid const& namespace_uuid, char16_t const* name) { - return sprout::uuids::sha1_name_generator(namespace_uuid)(name); - } - inline SPROUT_CONSTEXPR sprout::uuids::uuid - make_uuid5(sprout::uuids::uuid const& namespace_uuid, char32_t const* name) { - return sprout::uuids::sha1_name_generator(namespace_uuid)(name); - } -#endif - - inline SPROUT_CONSTEXPR sprout::uuids::sha1_name_generator - make_uuid5() { - return sprout::uuids::sha1_name_generator(); - } - inline SPROUT_CONSTEXPR sprout::uuids::sha1_name_generator - make_uuid5(sprout::uuids::uuid const& namespace_uuid) { - return sprout::uuids::sha1_name_generator(namespace_uuid); - } - - // - // make_uuid5_dns - // make_uuid5_url - // make_uuid5_oid - // make_uuid5_x500 - // - inline SPROUT_CONSTEXPR sprout::uuids::sha1_name_generator - make_uuid5_dns() { - return sprout::uuids::sha1_name_generator(sprout::uuids::namespace_dns_uuid()); - } - inline SPROUT_CONSTEXPR sprout::uuids::sha1_name_generator - make_uuid5_url() { - return sprout::uuids::sha1_name_generator(sprout::uuids::namespace_url_uuid()); - } - inline SPROUT_CONSTEXPR sprout::uuids::sha1_name_generator - make_uuid5_oid() { - return sprout::uuids::sha1_name_generator(sprout::uuids::namespace_oid_uuid()); - } - inline SPROUT_CONSTEXPR sprout::uuids::sha1_name_generator - make_uuid5_x500() { - return sprout::uuids::sha1_name_generator(sprout::uuids::namespace_x500_uuid()); - } - } // namespace uuids -} // namespace sprout - -#endif // #ifndef SPROUT_UUID_SHA1_NAME_GENERATOR_HPP diff --git a/dsp/lib/sprout/sprout/uuid/string_generator.hpp b/dsp/lib/sprout/sprout/uuid/string_generator.hpp deleted file mode 100644 index cc13ce5..0000000 --- a/dsp/lib/sprout/sprout/uuid/string_generator.hpp +++ /dev/null @@ -1,224 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UUID_STRING_GENERATOR_HPP -#define SPROUT_UUID_STRING_GENERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace uuids { - // - // string_generator - // - class string_generator { - public: - typedef sprout::uuids::uuid result_type; - private: - template - struct next_char { - public: - typedef typename std::iterator_traits::value_type char_type; - public: - char_type c; - ForwardIterator first; - ForwardIterator last; - public: - SPROUT_CONSTEXPR next_char(ForwardIterator f, ForwardIterator l) - : c(f != l - ? *f - : throw std::runtime_error("string_generator: invalid uuid string (out of range)") - ) - , first(sprout::next(f)) - , last(l) - {} - SPROUT_CONSTEXPR next_char next() const { - return next_char(first, last); - } - }; - private: - SPROUT_CONSTEXPR std::uint8_t value_at(std::size_t i) const { - return i < 22 - ? sprout::uuids::detail::values::table[i] - : throw std::runtime_error("string_generator: invalid uuid string (invalid character)") - ; - } - template - SPROUT_CONSTEXPR std::uint8_t get_value(Elem c) const { - return value_at( - sprout::distance( - sprout::uuids::detail::digits::value.begin(), - sprout::find( - sprout::uuids::detail::digits::value.begin(), - sprout::uuids::detail::digits::value.end(), - c - ) - ) - ); - } - template - static SPROUT_CONSTEXPR bool is_dash(Elem c) { - return c == sprout::uuids::detail::dash::value; - } - template - static SPROUT_CONSTEXPR bool is_open_brace(Elem c) { - return c == sprout::uuids::detail::lbrace::value; - } - template - static SPROUT_CONSTEXPR bool is_close_brace(Elem c) { - return c == sprout::uuids::detail::rbrace::value; - } - template - static SPROUT_CONSTEXPR bool is_close_brace(Elem c, Elem open_brace) { - return is_open_brace(open_brace) && is_close_brace(c); - } - template - SPROUT_CONSTEXPR result_type - generate_2_3(next_char nc, Char open_brace, bool has_dashes, std::uint8_t byte, Args... args) const { - return generate_2(nc, open_brace, has_dashes, args..., static_cast((byte << 4) | get_value(nc.c))); - } - template - SPROUT_CONSTEXPR result_type - generate_2_2(next_char nc, Char open_brace, bool has_dashes, Args... args) const { - return generate_2_3(nc.next(), open_brace, has_dashes, get_value(nc.c), args...); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Args) == 6 || sizeof...(Args) == 8 || sizeof...(Args) == 10, - result_type - >::type - generate_2_1(next_char nc, Char open_brace, bool has_dashes, Args... args) const { - return has_dashes - ? is_dash(nc.c) - ? generate_2_2(nc.next(), open_brace, has_dashes, args...) - : throw std::runtime_error("string_generator: invalid uuid string (dashes not found)") - : generate_2_2(nc, open_brace, has_dashes, args...) - ; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Args) == 4, - result_type - >::type - generate_2_1(next_char nc, Char open_brace, bool, Args... args) const { - return is_dash(nc.c) - ? generate_2_2(nc.next(), open_brace, true, args...) - : generate_2_2(nc, open_brace, false, args...) - ; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Args) != 4 && sizeof...(Args) != 6 && sizeof...(Args) != 8 && sizeof...(Args) != 10, - result_type - >::type - generate_2_1(next_char nc, Char open_brace, bool has_dashes, Args... args) const { - return generate_2_2(nc, open_brace, has_dashes, args...); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Args) == 16, - result_type - >::type - generate_2(next_char nc, Char open_brace, bool, Args... args) const { - return !open_brace || (open_brace && is_close_brace(nc.next().c, open_brace)) - ? result_type{{args...}} - : throw std::runtime_error("string_generator: invalid uuid string (brace not closed)") - ; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Args) == 0, - result_type - >::type - generate_2(next_char nc, Char open_brace, bool has_dashes, Args... args) const { - return generate_2_2(nc, open_brace, has_dashes, args...); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Args) != 0 && sizeof...(Args) != 16, - result_type - >::type - generate_2(next_char nc, Char open_brace, bool has_dashes, Args... args) const { - return generate_2_1(nc.next(), open_brace, has_dashes, args...); - } - template - SPROUT_CONSTEXPR result_type - generate_1(next_char nc) const { - return is_open_brace(nc.c) - ? generate_2(nc.next(), nc.c, false) - : generate_2(nc, typename next_char::char_type(), false) - ; - } - public: - template - SPROUT_CONSTEXPR result_type operator()(ForwardIterator first, ForwardIterator last) const { - return generate_1(next_char(first, last)); - } - template - SPROUT_CONSTEXPR result_type operator()(sprout::basic_string const& s) const { - return operator()(s.begin(), s.end()); - } - SPROUT_CONSTEXPR result_type operator()(char const* s) const { - return operator()(s, s + sprout::char_traits::length(s)); - } - SPROUT_CONSTEXPR result_type operator()(wchar_t const* s) const { - return operator()(s, s + sprout::char_traits::length(s)); - } -#if SPROUT_USE_UNICODE_LITERALS - SPROUT_CONSTEXPR result_type operator()(char16_t const* s) const { - return operator()(s, s + sprout::char_traits::length(s)); - } - SPROUT_CONSTEXPR result_type operator()(char32_t const* s) const { - return operator()(s, s + sprout::char_traits::length(s)); - } -#endif - }; - - // - // make_uuid - // - template - inline SPROUT_CONSTEXPR sprout::uuids::uuid - make_uuid(ForwardIterator first, ForwardIterator last) { - return sprout::uuids::string_generator()(first, last); - } - template - inline SPROUT_CONSTEXPR sprout::uuids::uuid - make_uuid(sprout::basic_string const& s) { - return sprout::uuids::string_generator()(s); - } - inline SPROUT_CONSTEXPR sprout::uuids::uuid - make_uuid(char const* s) { - return sprout::uuids::string_generator()(s); - } - inline SPROUT_CONSTEXPR sprout::uuids::uuid - make_uuid(wchar_t const* s) { - return sprout::uuids::string_generator()(s); - } -#if SPROUT_USE_UNICODE_LITERALS - inline SPROUT_CONSTEXPR sprout::uuids::uuid - make_uuid(char16_t const* s) { - return sprout::uuids::string_generator()(s); - } - inline SPROUT_CONSTEXPR sprout::uuids::uuid - make_uuid(char32_t const* s) { - return sprout::uuids::string_generator()(s); - } -#endif - } // namespace uuids -} // namespace sprout - -#endif // #ifndef SPROUT_UUID_STRING_GENERATOR_HPP diff --git a/dsp/lib/sprout/sprout/uuid/tuple.hpp b/dsp/lib/sprout/sprout/uuid/tuple.hpp deleted file mode 100644 index 9d9cbf7..0000000 --- a/dsp/lib/sprout/sprout/uuid/tuple.hpp +++ /dev/null @@ -1,70 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UUID_TUPLE_HPP -#define SPROUT_UUID_TUPLE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // tuple_get - // - template - inline SPROUT_CONSTEXPR sprout::uuids::uuid::value_type& - tuple_get(sprout::uuids::uuid& t) SPROUT_NOEXCEPT { - static_assert(I < 16, "tuple_get: index out of range"); - return t[I]; - } - template - inline SPROUT_CONSTEXPR sprout::uuids::uuid::value_type const& - tuple_get(sprout::uuids::uuid const& t) SPROUT_NOEXCEPT { - static_assert(I < 16, "tuple_get: index out of range"); - return t[I]; - } - template - inline SPROUT_CONSTEXPR sprout::uuids::uuid::value_type&& - tuple_get(sprout::uuids::uuid&& t) SPROUT_NOEXCEPT { - return sprout::move(sprout::tuples::get(t)); - } -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // tuple_size - // - template<> - struct tuple_size - : public sprout::integral_constant - {}; - - // - // tuple_element - // - template - struct tuple_element - : public std::conditional<(I < 16), sprout::identity, sprout::detail::nil_base>::type - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -#endif // #ifndef SPROUT_UUID_TUPLE_HPP diff --git a/dsp/lib/sprout/sprout/uuid/uuid.hpp b/dsp/lib/sprout/sprout/uuid/uuid.hpp deleted file mode 100644 index fb8c89c..0000000 --- a/dsp/lib/sprout/sprout/uuid/uuid.hpp +++ /dev/null @@ -1,285 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_UUID_UUID_HPP -#define SPROUT_UUID_UUID_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION -# include -#endif - -namespace sprout { - namespace uuids { - namespace detail { - template - inline SPROUT_CONSTEXPR bool - is_nil(InputIterator first, InputIterator last) { - return first == last ? true - : !*first && sprout::uuids::detail::is_nil(sprout::next(first), last) - ; - } - } // namespace detail - - // - // uuid - // - class uuid { - public: - typedef std::uint8_t value_type; -#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION - typedef sprout::index_iterator iterator; - typedef sprout::index_iterator const_iterator; -#else - typedef std::uint8_t* iterator; - typedef std::uint8_t const* const_iterator; -#endif - typedef std::uint8_t& reference; - typedef std::uint8_t const& const_reference; - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - typedef std::uint8_t* pointer; - typedef std::uint8_t const* const_pointer; - typedef sprout::reverse_iterator reverse_iterator; - typedef sprout::reverse_iterator const_reverse_iterator; - public: - // - // variant_type - // - enum variant_type { - variant_ncs, - variant_rfc_4122, - variant_microsoft, - variant_future - }; - // - // version_type - // - enum version_type { - version_unknown = -1, - version_time_based = 1, - version_dce_security = 2, - version_name_based_md5 = 3, - version_random_number_based = 4, - version_name_based_sha1 = 5 - }; - public: - SPROUT_STATIC_CONSTEXPR size_type static_size = 16; - public: - value_type elems[static_size]; - public: - SPROUT_CXX14_CONSTEXPR void fill(const_reference value) { - sprout::fill_n(begin(), size(), value); - } - SPROUT_CXX14_CONSTEXPR void swap(uuid& other) SPROUT_NOEXCEPT { - sprout::swap_ranges(other.begin(), other.end(), begin()); - } - // iterators: -#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION - SPROUT_CXX14_CONSTEXPR iterator begin() SPROUT_NOEXCEPT { - return iterator(*this, 0); - } - SPROUT_CONSTEXPR const_iterator begin() const SPROUT_NOEXCEPT { - return const_iterator(*this, 0); - } - SPROUT_CXX14_CONSTEXPR iterator end() SPROUT_NOEXCEPT { - return iterator(*this, size()); - } - SPROUT_CONSTEXPR const_iterator end() const SPROUT_NOEXCEPT { - return const_iterator(*this, size()); - } -#else - SPROUT_CXX14_CONSTEXPR iterator begin() SPROUT_NOEXCEPT { - return elems; - } - SPROUT_CONSTEXPR const_iterator begin() const SPROUT_NOEXCEPT { - return elems; - } - SPROUT_CXX14_CONSTEXPR iterator end() SPROUT_NOEXCEPT { - return begin() + size(); - } - SPROUT_CONSTEXPR const_iterator end() const SPROUT_NOEXCEPT { - return begin() + size(); - } -#endif - SPROUT_CXX14_CONSTEXPR reverse_iterator rbegin() SPROUT_NOEXCEPT { - return reverse_iterator(end()); - } - SPROUT_CONSTEXPR const_reverse_iterator rbegin() const SPROUT_NOEXCEPT { - return const_reverse_iterator(end()); - } - SPROUT_CXX14_CONSTEXPR reverse_iterator rend() SPROUT_NOEXCEPT { - return reverse_iterator(begin()); - } - SPROUT_CONSTEXPR const_reverse_iterator rend() const SPROUT_NOEXCEPT { - return const_reverse_iterator(begin()); - } -#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION - SPROUT_CONSTEXPR const_iterator cbegin() const SPROUT_NOEXCEPT { - return const_iterator(*this, 0); - } - SPROUT_CONSTEXPR const_iterator cend() const SPROUT_NOEXCEPT { - return const_iterator(*this, size()); - } -#else - SPROUT_CONSTEXPR const_iterator cbegin() const SPROUT_NOEXCEPT { - return elems; - } - SPROUT_CONSTEXPR const_iterator cend() const SPROUT_NOEXCEPT { - return cbegin() + size(); - } -#endif - SPROUT_CONSTEXPR const_reverse_iterator crbegin() const SPROUT_NOEXCEPT { - return const_reverse_iterator(end()); - } - SPROUT_CONSTEXPR const_reverse_iterator crend() const SPROUT_NOEXCEPT { - return const_reverse_iterator(begin()); - } - // capacity: - SPROUT_CONSTEXPR size_type size() const SPROUT_NOEXCEPT { - return static_size; - } - SPROUT_CONSTEXPR size_type max_size() const SPROUT_NOEXCEPT { - return size(); - } - SPROUT_CONSTEXPR bool empty() const SPROUT_NOEXCEPT { - return size() == 0; - } - // element access: - SPROUT_CXX14_CONSTEXPR reference operator[](size_type i) { - return elems[i]; - } - SPROUT_CONSTEXPR const_reference operator[](size_type i) const { - return elems[i]; - } - SPROUT_CXX14_CONSTEXPR reference at(size_type i) { - return i < size() - ? elems[i] - : (throw std::out_of_range("uuid: index out of range"), elems[i]) - ; - } - SPROUT_CONSTEXPR const_reference at(size_type i) const { - return i < size() - ? elems[i] - : (throw std::out_of_range("uuid: index out of range"), elems[i]) - ; - } - SPROUT_CXX14_CONSTEXPR reference front() { - return elems[0]; - } - SPROUT_CONSTEXPR const_reference front() const { - return elems[0]; - } - SPROUT_CXX14_CONSTEXPR reference back() { - return elems[size() - 1]; - } - SPROUT_CONSTEXPR const_reference back() const { - return elems[size() - 1]; - } - - SPROUT_CXX14_CONSTEXPR pointer data() SPROUT_NOEXCEPT { - return elems; - } - SPROUT_CONSTEXPR const_pointer data() const SPROUT_NOEXCEPT { - return elems; - } - - // others: - SPROUT_CXX14_CONSTEXPR pointer c_array() SPROUT_NOEXCEPT { - return elems; - } - SPROUT_CONSTEXPR const_pointer c_array() const SPROUT_NOEXCEPT { - return elems; - } - SPROUT_CXX14_CONSTEXPR void assign(const_reference value) { - fill(value); - } - SPROUT_CXX14_CONSTEXPR void rangecheck(size_type i) const { - return i >= size() ? throw std::out_of_range("uuid: index out of range") - : (void)0 - ; - } - - SPROUT_CONSTEXPR bool is_nil() const { - return sprout::uuids::detail::is_nil(begin(), end()); - } - SPROUT_CONSTEXPR variant_type variant() const { - return (elems[8] & 0x80) == 0x00 ? variant_ncs - : (elems[8] & 0xC0) == 0x80 ? variant_rfc_4122 - : (elems[8] & 0xE0) == 0xC0 ? variant_microsoft - : variant_future - ; - } - SPROUT_CONSTEXPR version_type version() const { - return (elems[6] & 0xF0) == 0x10 ? version_time_based - : (elems[6] & 0xF0) == 0x20 ? version_dce_security - : (elems[6] & 0xF0) == 0x30 ? version_name_based_md5 - : (elems[6] & 0xF0) == 0x40 ? version_random_number_based - : (elems[6] & 0xF0) == 0x50 ? version_name_based_sha1 - : version_unknown - ; - } - }; - - // - // operator== - // operator!= - // operator< - // operator> - // operator<= - // operator>= - // - inline SPROUT_CONSTEXPR bool - operator==(sprout::uuids::uuid const& lhs, sprout::uuids::uuid const& rhs) { - return sprout::equal(lhs.begin(), lhs.end(), rhs.begin()); - } - inline SPROUT_CONSTEXPR bool - operator!=(sprout::uuids::uuid const& lhs, sprout::uuids::uuid const& rhs) { - return !(lhs == rhs); - } - inline SPROUT_CONSTEXPR bool - operator<(sprout::uuids::uuid const& lhs, sprout::uuids::uuid const& rhs) { - return sprout::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end()); - } - inline SPROUT_CONSTEXPR bool - operator>(sprout::uuids::uuid const& lhs, sprout::uuids::uuid const& rhs) { - return rhs < lhs; - } - inline SPROUT_CONSTEXPR bool - operator<=(sprout::uuids::uuid const& lhs, sprout::uuids::uuid const& rhs) { - return !(rhs < lhs); - } - inline SPROUT_CONSTEXPR bool - operator>=(sprout::uuids::uuid const& lhs, sprout::uuids::uuid const& rhs) { - return !(lhs < rhs); - } - - // - // swap - // - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::uuids::uuid& lhs, sprout::uuids::uuid& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - } // namespace uuids - - using sprout::uuids::uuid; -} // namespace sprout - -#endif // #ifndef SPROUT_UUID_UUID_HPP diff --git a/dsp/lib/sprout/sprout/valarray.hpp b/dsp/lib/sprout/sprout/valarray.hpp deleted file mode 100644 index 69ca3b9..0000000 --- a/dsp/lib/sprout/sprout/valarray.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VALARRAY_HPP -#define SPROUT_VALARRAY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_VALARRAY_HPP diff --git a/dsp/lib/sprout/sprout/valarray/arithmetic.hpp b/dsp/lib/sprout/sprout/valarray/arithmetic.hpp deleted file mode 100644 index 6db75b0..0000000 --- a/dsp/lib/sprout/sprout/valarray/arithmetic.hpp +++ /dev/null @@ -1,116 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VALARRAY_ARITHMETIC_HPP -#define SPROUT_VALARRAY_ARITHMETIC_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // operator+ - // - template - inline SPROUT_CONSTEXPR sprout::valarray - operator+(sprout::valarray const& lhs, sprout::valarray const& rhs) { - return sprout::fixed::transform(lhs.begin(), lhs.end(), rhs.begin(), lhs, sprout::plus<>()); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator+(sprout::valarray const& lhs, T const& rhs) { - return sprout::fixed::transform(lhs.begin(), lhs.end(), lhs, sprout::bind2nd(sprout::plus<>(), rhs)); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator+(T const& lhs, sprout::valarray const& rhs) { - return sprout::fixed::transform(rhs.begin(), rhs.end(), rhs, sprout::bind1st(sprout::plus<>(), lhs)); - } - // - // operator- - // - template - inline SPROUT_CONSTEXPR sprout::valarray - operator-(sprout::valarray const& lhs, sprout::valarray const& rhs) { - return sprout::fixed::transform(lhs.begin(), lhs.end(), rhs.begin(), lhs, sprout::minus<>()); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator-(sprout::valarray const& lhs, T const& rhs) { - return sprout::fixed::transform(lhs.begin(), lhs.end(), lhs, sprout::bind2nd(sprout::minus<>(), rhs)); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator-(T const& lhs, sprout::valarray const& rhs) { - return sprout::fixed::transform(rhs.begin(), rhs.end(), rhs, sprout::bind1st(sprout::minus<>(), lhs)); - } - // - // operator* - // - template - inline SPROUT_CONSTEXPR sprout::valarray - operator*(sprout::valarray const& lhs, sprout::valarray const& rhs) { - return sprout::fixed::transform(lhs.begin(), lhs.end(), rhs.begin(), lhs, sprout::multiplies<>()); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator*(sprout::valarray const& lhs, T const& rhs) { - return sprout::fixed::transform(lhs.begin(), lhs.end(), lhs, sprout::bind2nd(sprout::multiplies<>(), rhs)); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator*(T const& lhs, sprout::valarray const& rhs) { - return sprout::fixed::transform(rhs.begin(), rhs.end(), rhs, sprout::bind1st(sprout::multiplies<>(), lhs)); - } - // - // operator/ - // - template - inline SPROUT_CONSTEXPR sprout::valarray - operator/(sprout::valarray const& lhs, sprout::valarray const& rhs) { - return sprout::fixed::transform(lhs.begin(), lhs.end(), rhs.begin(), lhs, sprout::divides<>()); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator/(sprout::valarray const& lhs, T const& rhs) { - return sprout::fixed::transform(lhs.begin(), lhs.end(), lhs, sprout::bind2nd(sprout::divides<>(), rhs)); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator/(T const& lhs, sprout::valarray const& rhs) { - return sprout::fixed::transform(rhs.begin(), rhs.end(), rhs, sprout::bind1st(sprout::divides<>(), lhs)); - } - // - // operator% - // - template - inline SPROUT_CONSTEXPR sprout::valarray - operator%(sprout::valarray const& lhs, sprout::valarray const& rhs) { - return sprout::fixed::transform(lhs.begin(), lhs.end(), rhs.begin(), lhs, sprout::modulus<>()); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator%(sprout::valarray const& lhs, T const& rhs) { - return sprout::fixed::transform(lhs.begin(), lhs.end(), lhs, sprout::bind2nd(sprout::modulus<>(), rhs)); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator%(T const& lhs, sprout::valarray const& rhs) { - return sprout::fixed::transform(rhs.begin(), rhs.end(), rhs, sprout::bind1st(sprout::modulus<>(), lhs)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_VALARRAY_ARITHMETIC_HPP diff --git a/dsp/lib/sprout/sprout/valarray/bitwise.hpp b/dsp/lib/sprout/sprout/valarray/bitwise.hpp deleted file mode 100644 index 89dc6dc..0000000 --- a/dsp/lib/sprout/sprout/valarray/bitwise.hpp +++ /dev/null @@ -1,116 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VALARRAY_BITWISE_HPP -#define SPROUT_VALARRAY_BITWISE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // operator& - // - template - inline SPROUT_CONSTEXPR sprout::valarray - operator&(sprout::valarray const& lhs, sprout::valarray const& rhs) { - return sprout::fixed::transform(lhs.begin(), lhs.end(), rhs.begin(), lhs, sprout::bit_and<>()); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator&(sprout::valarray const& lhs, T const& rhs) { - return sprout::fixed::transform(lhs.begin(), lhs.end(), lhs, sprout::bind2nd(sprout::bit_and<>(), rhs)); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator&(T const& lhs, sprout::valarray const& rhs) { - return sprout::fixed::transform(rhs.begin(), rhs.end(), rhs, sprout::bind1st(sprout::bit_and<>(), lhs)); - } - // - // operator| - // - template - inline SPROUT_CONSTEXPR sprout::valarray - operator|(sprout::valarray const& lhs, sprout::valarray const& rhs) { - return sprout::fixed::transform(lhs.begin(), lhs.end(), rhs.begin(), lhs, sprout::bit_or<>()); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator|(sprout::valarray const& lhs, T const& rhs) { - return sprout::fixed::transform(lhs.begin(), lhs.end(), lhs, sprout::bind2nd(sprout::bit_or<>(), rhs)); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator|(T const& lhs, sprout::valarray const& rhs) { - return sprout::fixed::transform(rhs.begin(), rhs.end(), rhs, sprout::bind1st(sprout::bit_or<>(), lhs)); - } - // - // operator^ - // - template - inline SPROUT_CONSTEXPR sprout::valarray - operator^(sprout::valarray const& lhs, sprout::valarray const& rhs) { - return sprout::fixed::transform(lhs.begin(), lhs.end(), rhs.begin(), lhs, sprout::bit_xor<>()); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator^(sprout::valarray const& lhs, T const& rhs) { - return sprout::fixed::transform(lhs.begin(), lhs.end(), lhs, sprout::bind2nd(sprout::bit_xor<>(), rhs)); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator^(T const& lhs, sprout::valarray const& rhs) { - return sprout::fixed::transform(rhs.begin(), rhs.end(), rhs, sprout::bind1st(sprout::bit_xor<>(), lhs)); - } - // - // operator<< - // - template - inline SPROUT_CONSTEXPR sprout::valarray - operator<<(sprout::valarray const& lhs, sprout::valarray const& rhs) { - return sprout::fixed::transform(lhs.begin(), lhs.end(), rhs.begin(), lhs, sprout::shift_left<>()); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator<<(sprout::valarray const& lhs, T const& rhs) { - return sprout::fixed::transform(lhs.begin(), lhs.end(), lhs, sprout::bind2nd(sprout::shift_left<>(), rhs)); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator<<(T const& lhs, sprout::valarray const& rhs) { - return sprout::fixed::transform(rhs.begin(), rhs.end(), rhs, sprout::bind1st(sprout::shift_left<>(), lhs)); - } - // - // operator>> - // - template - inline SPROUT_CONSTEXPR sprout::valarray - operator>>(sprout::valarray const& lhs, sprout::valarray const& rhs) { - return sprout::fixed::transform(lhs.begin(), lhs.end(), rhs.begin(), lhs, sprout::shift_right<>()); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator>>(sprout::valarray const& lhs, T const& rhs) { - return sprout::fixed::transform(lhs.begin(), lhs.end(), lhs, sprout::bind2nd(sprout::shift_right<>(), rhs)); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator>>(T const& lhs, sprout::valarray const& rhs) { - return sprout::fixed::transform(rhs.begin(), rhs.end(), rhs, sprout::bind1st(sprout::shift_right<>(), lhs)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_VALARRAY_BITWISE_HPP diff --git a/dsp/lib/sprout/sprout/valarray/comparison.hpp b/dsp/lib/sprout/sprout/valarray/comparison.hpp deleted file mode 100644 index 45e4560..0000000 --- a/dsp/lib/sprout/sprout/valarray/comparison.hpp +++ /dev/null @@ -1,154 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VALARRAY_COMPARISON_HPP -#define SPROUT_VALARRAY_COMPARISON_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // operator== - // - template - inline SPROUT_CONSTEXPR sprout::valarray - operator==(sprout::valarray const& lhs, sprout::valarray const& rhs) { - typedef sprout::sized_pit > sized_pit_type; - return sprout::fixed::transform(lhs.begin(), lhs.end(), rhs.begin(), sized_pit_type(lhs.size()), sprout::equal_to<>()); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator==(sprout::valarray const& lhs, T const& rhs) { - typedef sprout::sized_pit > sized_pit_type; - return sprout::fixed::transform(lhs.begin(), lhs.end(), sized_pit_type(lhs.size()), sprout::bind2nd(sprout::equal_to<>(), rhs)); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator==(T const& lhs, sprout::valarray const& rhs) { - typedef sprout::sized_pit > sized_pit_type; - return sprout::fixed::transform(rhs.begin(), rhs.end(), sized_pit_type(rhs.size()), sprout::bind1st(sprout::equal_to<>(), lhs)); - } - // - // operator!= - // - template - inline SPROUT_CONSTEXPR sprout::valarray - operator!=(sprout::valarray const& lhs, sprout::valarray const& rhs) { - typedef sprout::sized_pit > sized_pit_type; - return sprout::fixed::transform(lhs.begin(), lhs.end(), rhs.begin(), sized_pit_type(lhs.size()), sprout::not_equal_to<>()); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator!=(sprout::valarray const& lhs, T const& rhs) { - typedef sprout::sized_pit > sized_pit_type; - return sprout::fixed::transform(lhs.begin(), lhs.end(), sized_pit_type(lhs.size()), sprout::bind2nd(sprout::not_equal_to<>(), rhs)); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator!=(T const& lhs, sprout::valarray const& rhs) { - typedef sprout::sized_pit > sized_pit_type; - return sprout::fixed::transform(rhs.begin(), rhs.end(), sized_pit_type(rhs.size()), sprout::bind1st(sprout::not_equal_to<>(), lhs)); - } - // - // operator< - // - template - inline SPROUT_CONSTEXPR sprout::valarray - operator<(sprout::valarray const& lhs, sprout::valarray const& rhs) { - typedef sprout::sized_pit > sized_pit_type; - return sprout::fixed::transform(lhs.begin(), lhs.end(), rhs.begin(), sized_pit_type(lhs.size()), sprout::less<>()); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator<(sprout::valarray const& lhs, T const& rhs) { - typedef sprout::sized_pit > sized_pit_type; - return sprout::fixed::transform(lhs.begin(), lhs.end(), sized_pit_type(lhs.size()), sprout::bind2nd(sprout::less<>(), rhs)); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator<(T const& lhs, sprout::valarray const& rhs) { - typedef sprout::sized_pit > sized_pit_type; - return sprout::fixed::transform(rhs.begin(), rhs.end(), sized_pit_type(rhs.size()), sprout::bind1st(sprout::less<>(), lhs)); - } - // - // operator> - // - template - inline SPROUT_CONSTEXPR sprout::valarray - operator>(sprout::valarray const& lhs, sprout::valarray const& rhs) { - typedef sprout::sized_pit > sized_pit_type; - return sprout::fixed::transform(lhs.begin(), lhs.end(), rhs.begin(), sized_pit_type(lhs.size()), sprout::greater<>()); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator>(sprout::valarray const& lhs, T const& rhs) { - typedef sprout::sized_pit > sized_pit_type; - return sprout::fixed::transform(lhs.begin(), lhs.end(), sized_pit_type(lhs.size()), sprout::bind2nd(sprout::greater<>(), rhs)); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator>(T const& lhs, sprout::valarray const& rhs) { - typedef sprout::sized_pit > sized_pit_type; - return sprout::fixed::transform(rhs.begin(), rhs.end(), sized_pit_type(rhs.size()), sprout::bind1st(sprout::greater<>(), lhs)); - } - // - // operator<= - // - template - inline SPROUT_CONSTEXPR sprout::valarray - operator<=(sprout::valarray const& lhs, sprout::valarray const& rhs) { - typedef sprout::sized_pit > sized_pit_type; - return sprout::fixed::transform(lhs.begin(), lhs.end(), rhs.begin(), sized_pit_type(lhs.size()), sprout::less_equal<>()); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator<=(sprout::valarray const& lhs, T const& rhs) { - typedef sprout::sized_pit > sized_pit_type; - return sprout::fixed::transform(lhs.begin(), lhs.end(), sized_pit_type(lhs.size()), sprout::bind2nd(sprout::less_equal<>(), rhs)); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator<=(T const& lhs, sprout::valarray const& rhs) { - typedef sprout::sized_pit > sized_pit_type; - return sprout::fixed::transform(rhs.begin(), rhs.end(), sized_pit_type(rhs.size()), sprout::bind1st(sprout::less_equal<>(), lhs)); - } - // - // operator>= - // - template - inline SPROUT_CONSTEXPR sprout::valarray - operator>=(sprout::valarray const& lhs, sprout::valarray const& rhs) { - typedef sprout::sized_pit > sized_pit_type; - return sprout::fixed::transform(lhs.begin(), lhs.end(), rhs.begin(), sized_pit_type(lhs.size()), sprout::greater_equal<>()); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator>=(sprout::valarray const& lhs, T const& rhs) { - typedef sprout::sized_pit > sized_pit_type; - return sprout::fixed::transform(lhs.begin(), lhs.end(), sized_pit_type(lhs.size()), sprout::bind2nd(sprout::greater_equal<>(), rhs)); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator>=(T const& lhs, sprout::valarray const& rhs) { - typedef sprout::sized_pit > sized_pit_type; - return sprout::fixed::transform(rhs.begin(), rhs.end(), sized_pit_type(rhs.size()), sprout::bind1st(sprout::greater_equal<>(), lhs)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_VALARRAY_COMPARISON_HPP diff --git a/dsp/lib/sprout/sprout/valarray/container.hpp b/dsp/lib/sprout/sprout/valarray/container.hpp deleted file mode 100644 index 818c26a..0000000 --- a/dsp/lib/sprout/sprout/valarray/container.hpp +++ /dev/null @@ -1,63 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VALARRAY_CONTAINER_HPP -#define SPROUT_VALARRAY_CONTAINER_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // container_construct_traits - // - template - struct container_construct_traits > { - public: - typedef sprout::valarray copied_type; - public: - template - static SPROUT_CONSTEXPR copied_type - deep_copy(Cont&& cont) { - return SPROUT_FORWARD(Cont, cont); - } - template - static SPROUT_CONSTEXPR copied_type - make(Args&&... args) { - typedef sprout::detail::make_construct_impl impl_type; - return impl_type::make(SPROUT_FORWARD(Args, args)...); - } - template - static SPROUT_CONSTEXPR copied_type - remake(Cont&&, typename sprout::container_traits >::difference_type size, Args&&... args) { - typedef sprout::detail::make_construct_impl impl_type; - return impl_type::sized_make(static_cast(size), SPROUT_FORWARD(Args, args)...); - } - }; - - // - // container_transform_traits - // - template - struct container_transform_traits > { - public: - template >::size_type Size> - struct rebind_size { - public: - typedef sprout::valarray type; - }; - template - struct rebind_type { - public: - typedef sprout::valarray type; - }; - }; -} // namespace sprout - -#endif // #ifndef SPROUT_VALARRAY_CONTAINER_HPP diff --git a/dsp/lib/sprout/sprout/valarray/exponential.hpp b/dsp/lib/sprout/sprout/valarray/exponential.hpp deleted file mode 100644 index 999a813..0000000 --- a/dsp/lib/sprout/sprout/valarray/exponential.hpp +++ /dev/null @@ -1,260 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VALARRAY_EXPONENTIAL_HPP -#define SPROUT_VALARRAY_EXPONENTIAL_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout_math_detail { - using sprout::math::exp; - using sprout::math::exp10; - using sprout::math::exp2; - using sprout::math::expm1; - using sprout::math::log; - using sprout::math::log10; - using sprout::math::log1p; - using sprout::math::log2; - - template - inline SPROUT_CONSTEXPR decltype(exp(std::declval())) - call_exp(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(exp(std::declval())) - { - return exp(SPROUT_FORWARD(T, x)); - } - template - inline SPROUT_CONSTEXPR decltype(exp10(std::declval())) - call_exp10(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(exp10(std::declval())) - { - return exp10(SPROUT_FORWARD(T, x)); - } - template - inline SPROUT_CONSTEXPR decltype(exp2(std::declval())) - call_exp2(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(exp2(std::declval())) - { - return exp2(SPROUT_FORWARD(T, x)); - } - template - inline SPROUT_CONSTEXPR decltype(expm1(std::declval())) - call_expm1(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(expm1(std::declval())) - { - return expm1(SPROUT_FORWARD(T, x)); - } - template - inline SPROUT_CONSTEXPR decltype(log(std::declval())) - call_log(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(log(std::declval())) - { - return log(SPROUT_FORWARD(T, x)); - } - template - inline SPROUT_CONSTEXPR decltype(log10(std::declval())) - call_log10(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(log10(std::declval())) - { - return log10(SPROUT_FORWARD(T, x)); - } - template - inline SPROUT_CONSTEXPR decltype(log1p(std::declval())) - call_log1p(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(log1p(std::declval())) - { - return log1p(SPROUT_FORWARD(T, x)); - } - template - inline SPROUT_CONSTEXPR decltype(log2(std::declval())) - call_log2(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(log2(std::declval())) - { - return log2(SPROUT_FORWARD(T, x)); - } -} // namespace sprout - -namespace sprout { - namespace detail { - struct exp_f - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(sprout_math_detail::call_exp(std::declval())) - operator()(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(sprout_math_detail::call_exp(std::declval())) - { - return sprout_math_detail::call_exp(SPROUT_FORWARD(T, x)); - } - }; - struct exp10_f - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(sprout_math_detail::call_exp10(std::declval())) - operator()(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(sprout_math_detail::call_exp10(std::declval())) - { - return sprout_math_detail::call_exp10(SPROUT_FORWARD(T, x)); - } - }; - struct exp2_f - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(sprout_math_detail::call_exp2(std::declval())) - operator()(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(sprout_math_detail::call_exp2(std::declval())) - { - return sprout_math_detail::call_exp2(SPROUT_FORWARD(T, x)); - } - }; - struct expm1_f - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(sprout_math_detail::call_expm1(std::declval())) - operator()(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(sprout_math_detail::call_expm1(std::declval())) - { - return sprout_math_detail::call_expm1(SPROUT_FORWARD(T, x)); - } - }; - struct log_f - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(sprout_math_detail::call_log(std::declval())) - operator()(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(sprout_math_detail::call_log(std::declval())) - { - return sprout_math_detail::call_log(SPROUT_FORWARD(T, x)); - } - }; - struct log10_f - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(sprout_math_detail::call_log10(std::declval())) - operator()(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(sprout_math_detail::call_log10(std::declval())) - { - return sprout_math_detail::call_log10(SPROUT_FORWARD(T, x)); - } - }; - struct log1p_f - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(sprout_math_detail::call_log1p(std::declval())) - operator()(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(sprout_math_detail::call_log1p(std::declval())) - { - return sprout_math_detail::call_log1p(SPROUT_FORWARD(T, x)); - } - }; - struct log2_f - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(sprout_math_detail::call_log2(std::declval())) - operator()(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(sprout_math_detail::call_log2(std::declval())) - { - return sprout_math_detail::call_log2(SPROUT_FORWARD(T, x)); - } - }; - } // namespace detail - - // - // exp - // - template - inline SPROUT_CONSTEXPR sprout::valarray - exp(sprout::valarray const& x) { - return sprout::fixed::transform(x.begin(), x.end(), x, sprout::detail::exp_f()); - } - // - // exp10 - // - template - inline SPROUT_CONSTEXPR sprout::valarray - exp10(sprout::valarray const& x) { - return sprout::fixed::transform(x.begin(), x.end(), x, sprout::detail::exp10_f()); - } - // - // exp2 - // - template - inline SPROUT_CONSTEXPR sprout::valarray - exp2(sprout::valarray const& x) { - return sprout::fixed::transform(x.begin(), x.end(), x, sprout::detail::exp2_f()); - } - // - // expm1 - // - template - inline SPROUT_CONSTEXPR sprout::valarray - expm1(sprout::valarray const& x) { - return sprout::fixed::transform(x.begin(), x.end(), x, sprout::detail::expm1_f()); - } - // - // log - // - template - inline SPROUT_CONSTEXPR sprout::valarray - log(sprout::valarray const& x) { - return sprout::fixed::transform(x.begin(), x.end(), x, sprout::detail::log_f()); - } - // - // log10 - // - template - inline SPROUT_CONSTEXPR sprout::valarray - log10(sprout::valarray const& x) { - return sprout::fixed::transform(x.begin(), x.end(), x, sprout::detail::log10_f()); - } - // - // log1p - // - template - inline SPROUT_CONSTEXPR sprout::valarray - log1p(sprout::valarray const& x) { - return sprout::fixed::transform(x.begin(), x.end(), x, sprout::detail::log1p_f()); - } - // - // log2 - // - template - inline SPROUT_CONSTEXPR sprout::valarray - log2(sprout::valarray const& x) { - return sprout::fixed::transform(x.begin(), x.end(), x, sprout::detail::log2_f()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_VALARRAY_EXPONENTIAL_HPP diff --git a/dsp/lib/sprout/sprout/valarray/gslice_array.hpp b/dsp/lib/sprout/sprout/valarray/gslice_array.hpp deleted file mode 100644 index 4901048..0000000 --- a/dsp/lib/sprout/sprout/valarray/gslice_array.hpp +++ /dev/null @@ -1,292 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VALARRAY_GSLICE_ARRAY_HPP -#define SPROUT_VALARRAY_GSLICE_ARRAY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // gslice - // - template - class gslice { - private: - std::size_t start_; - sprout::valarray size_; - sprout::valarray stride_; - public: - SPROUT_CONSTEXPR gslice() - : start_(), size_(), stride_() - {} - SPROUT_CONSTEXPR gslice( - std::size_t start, - sprout::valarray const& size, - sprout::valarray const& stride - ) - : start_(start), size_(size), stride_(stride) - {} - SPROUT_CONSTEXPR std::size_t start() const { - return start_; - } - SPROUT_CONSTEXPR sprout::valarray size() const { - return size_; - } - SPROUT_CONSTEXPR sprout::valarray stride() const { - return stride_; - } - }; - - // - // gslice_array - // - template - class gslice_array { - friend class sprout::valarray; - private: - typedef sprout::valarray valarray_type; - public: - typedef typename valarray_type::value_type value_type; - typedef typename valarray_type::reference reference; - typedef typename valarray_type::size_type size_type; - typedef typename valarray_type::difference_type difference_type; - typedef typename valarray_type::pointer pointer; - typedef sprout::index_iterator iterator; - typedef sprout::reverse_iterator reverse_iterator; - private: - typedef sprout::gslice gslice_type; - typedef sprout::valarray indexes_type; - public: - SPROUT_STATIC_CONSTEXPR size_type static_size = valarray_type::static_size; - private: - sprout::value_holder arr_; - std::size_t start_; - sprout::valarray size_; - sprout::valarray stride_; - private: - gslice_array() SPROUT_DELETED_FUNCTION_DECL - SPROUT_CONSTEXPR gslice_array(sprout::valarray& arr, gslice_type const& gslice) - : arr_(arr) - , start_(gslice.start()) - , size_( - sprout::range::fixed::partial_sum(gslice.size() | sprout::adaptors::reversed, gslice.size(), sprout::multiplies<>()) - | sprout::adaptors::reversed | sprout::adaptors::copied(gslice.size()) - ) - , stride_(gslice.stride()) - {} - template - SPROUT_CONSTEXPR size_type index_impl( - size_type i, - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2 - ) const - { - return first1 != last1 ? *first2 * (i / *first1) + index_impl( - i % *first1, - sprout::next(first1), last1, - sprout::next(first2) - ) - : *first2 * i - ; - } - SPROUT_CONSTEXPR size_type index(size_type i) const { - return i < size() ? start_ + index_impl(i, sprout::next(size_.begin()), size_.end(), stride_.begin()) - : arr_->max_size() - ; - } - public: - SPROUT_CONSTEXPR gslice_array(gslice_array const& other) - : arr_(other.arr_), start_(other.start_), size_(other.size_), stride_(other.stride_) - {} - template - SPROUT_CXX14_CONSTEXPR gslice_array const& - operator=(gslice_array const& ar) const { - sprout::copy(ar.begin(), ar.end(), begin()); - return *this; - } - template - SPROUT_CXX14_CONSTEXPR void - operator=(sprout::valarray const& ar) const { - sprout::copy(ar.begin(), ar.end(), begin()); - } - SPROUT_CXX14_CONSTEXPR void - operator=(T const& value) const { - sprout::fill(begin(), end(), value); - } - template - SPROUT_CXX14_CONSTEXPR void - operator+=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 += *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator-=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 -= *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator*=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 *= *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator/=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 /= *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator%=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 %= *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator&=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 &= *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator|=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 |= *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator^=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 ^= *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator<<=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 <<= *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator>>=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 >>= *it; - } - } - - SPROUT_CXX14_CONSTEXPR void - swap(gslice_array& other) SPROUT_NOEXCEPT { - sprout::swap(arr_, other.arr_); - sprout::swap(start_, other.start_); - sprout::swap(size_, other.size_); - sprout::swap(stride_, other.stride_); - } - - // iterators: - SPROUT_CONSTEXPR iterator - begin() const { - return iterator(*this, 0); - } - SPROUT_CONSTEXPR iterator - end() const { - return iterator(*this, size()); - } - SPROUT_CONSTEXPR reverse_iterator - rbegin() const { - return reverse_iterator(end()); - } - SPROUT_CONSTEXPR reverse_iterator - rend() const { - return reverse_iterator(begin()); - } - // capacity: - SPROUT_CONSTEXPR size_type - size() const SPROUT_NOEXCEPT { - return size_.front(); - } - SPROUT_CONSTEXPR bool - empty() const SPROUT_NOEXCEPT { - return size() == 0; - } - // element access: - SPROUT_CONSTEXPR reference - operator[](size_type i) const { - return (*arr_)[index(i)]; - } - SPROUT_CONSTEXPR reference - at(size_type i) const { - return arr_->at(index(i)); - } - SPROUT_CONSTEXPR reference - front() const { - return (*this)[0]; - } - SPROUT_CONSTEXPR reference - back() const { - return (*this)[size() - 1]; - } - // others: - SPROUT_CONSTEXPR iterator - nth(size_type i) const { - return i < size() ? begin() + i - : (throw std::out_of_range("gslice_array<>: index out of range"), iterator()) - ; - } - SPROUT_CONSTEXPR size_type - index_of(iterator p) const SPROUT_NOEXCEPT { - return p - begin(); - } - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::gslice_array::size_type sprout::gslice_array::static_size; - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::gslice_array& lhs, sprout::gslice_array& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } -} // namespace sprout - -#endif // #ifndef SPROUT_VALARRAY_GSLICE_ARRAY_HPP diff --git a/dsp/lib/sprout/sprout/valarray/hash.hpp b/dsp/lib/sprout/sprout/valarray/hash.hpp deleted file mode 100644 index 07c5bd9..0000000 --- a/dsp/lib/sprout/sprout/valarray/hash.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VALARRAY_HASH_HPP -#define SPROUT_VALARRAY_HASH_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - // - // hash_value - // - template - inline SPROUT_CONSTEXPR std::size_t - hash_value(sprout::valarray const& v) { - return sprout::hash_range(v); - } -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // hash - // - template - struct hash > - : public sprout::hash > - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -#endif // #ifndef SPROUT_VALARRAY_HASH_HPP diff --git a/dsp/lib/sprout/sprout/valarray/hyperbolic.hpp b/dsp/lib/sprout/sprout/valarray/hyperbolic.hpp deleted file mode 100644 index 00ee6dc..0000000 --- a/dsp/lib/sprout/sprout/valarray/hyperbolic.hpp +++ /dev/null @@ -1,202 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VALARRAY_HYPERBOLIC_HPP -#define SPROUT_VALARRAY_HYPERBOLIC_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout_math_detail { - using sprout::math::acosh; - using sprout::math::asinh; - using sprout::math::atanh; - using sprout::math::cosh; - using sprout::math::sinh; - using sprout::math::tanh; - - template - inline SPROUT_CONSTEXPR decltype(acosh(std::declval())) - call_acosh(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(acosh(std::declval())) - { - return acosh(SPROUT_FORWARD(T, x)); - } - template - inline SPROUT_CONSTEXPR decltype(asinh(std::declval())) - call_asinh(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(asinh(std::declval())) - { - return asinh(SPROUT_FORWARD(T, x)); - } - template - inline SPROUT_CONSTEXPR decltype(atanh(std::declval())) - call_atanh(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(atanh(std::declval())) - { - return atanh(SPROUT_FORWARD(T, x)); - } - template - inline SPROUT_CONSTEXPR decltype(cosh(std::declval())) - call_cosh(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(cosh(std::declval())) - { - return cosh(SPROUT_FORWARD(T, x)); - } - template - inline SPROUT_CONSTEXPR decltype(sinh(std::declval())) - call_sinh(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(sinh(std::declval())) - { - return sinh(SPROUT_FORWARD(T, x)); - } - template - inline SPROUT_CONSTEXPR decltype(tanh(std::declval())) - call_tanh(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(tanh(std::declval())) - { - return tanh(SPROUT_FORWARD(T, x)); - } -} // namespace sprout - -namespace sprout { - namespace detail { - struct acosh_f - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(sprout_math_detail::call_acosh(std::declval())) - operator()(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(sprout_math_detail::call_acosh(std::declval())) - { - return sprout_math_detail::call_acosh(SPROUT_FORWARD(T, x)); - } - }; - struct asinh_f - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(sprout_math_detail::call_asinh(std::declval())) - operator()(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(sprout_math_detail::call_asinh(std::declval())) - { - return sprout_math_detail::call_asinh(SPROUT_FORWARD(T, x)); - } - }; - struct atanh_f - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(sprout_math_detail::call_atanh(std::declval())) - operator()(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(sprout_math_detail::call_atanh(std::declval())) - { - return sprout_math_detail::call_atanh(SPROUT_FORWARD(T, x)); - } - }; - struct cosh_f - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(sprout_math_detail::call_cosh(std::declval())) - operator()(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(sprout_math_detail::call_cosh(std::declval())) - { - return sprout_math_detail::call_cosh(SPROUT_FORWARD(T, x)); - } - }; - struct sinh_f - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(sprout_math_detail::call_sinh(std::declval())) - operator()(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(sprout_math_detail::call_sinh(std::declval())) - { - return sprout_math_detail::call_sinh(SPROUT_FORWARD(T, x)); - } - }; - struct tanh_f - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(sprout_math_detail::call_tanh(std::declval())) - operator()(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(sprout_math_detail::call_tanh(std::declval())) - { - return sprout_math_detail::call_tanh(SPROUT_FORWARD(T, x)); - } - }; - } // namespace detail - - // - // acosh - // - template - inline SPROUT_CONSTEXPR sprout::valarray - acosh(sprout::valarray const& x) { - return sprout::fixed::transform(x.begin(), x.end(), x, sprout::detail::acosh_f()); - } - // - // asinh - // - template - inline SPROUT_CONSTEXPR sprout::valarray - asinh(sprout::valarray const& x) { - return sprout::fixed::transform(x.begin(), x.end(), x, sprout::detail::asinh_f()); - } - // - // atanh - // - template - inline SPROUT_CONSTEXPR sprout::valarray - atanh(sprout::valarray const& x) { - return sprout::fixed::transform(x.begin(), x.end(), x, sprout::detail::atanh_f()); - } - // - // cosh - // - template - inline SPROUT_CONSTEXPR sprout::valarray - cosh(sprout::valarray const& x) { - return sprout::fixed::transform(x.begin(), x.end(), x, sprout::detail::cosh_f()); - } - // - // sinh - // - template - inline SPROUT_CONSTEXPR sprout::valarray - sinh(sprout::valarray const& x) { - return sprout::fixed::transform(x.begin(), x.end(), x, sprout::detail::sinh_f()); - } - // - // tanh - // - template - inline SPROUT_CONSTEXPR sprout::valarray - tanh(sprout::valarray const& x) { - return sprout::fixed::transform(x.begin(), x.end(), x, sprout::detail::tanh_f()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_VALARRAY_HYPERBOLIC_HPP diff --git a/dsp/lib/sprout/sprout/valarray/indirect_array.hpp b/dsp/lib/sprout/sprout/valarray/indirect_array.hpp deleted file mode 100644 index 8c13446..0000000 --- a/dsp/lib/sprout/sprout/valarray/indirect_array.hpp +++ /dev/null @@ -1,226 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VALARRAY_INDIRECT_ARRAY_HPP -#define SPROUT_VALARRAY_INDIRECT_ARRAY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // indirect_array - // - template - class indirect_array { - friend class sprout::valarray; - private: - typedef sprout::valarray valarray_type; - public: - typedef typename valarray_type::value_type value_type; - typedef typename valarray_type::reference reference; - typedef typename valarray_type::size_type size_type; - typedef typename valarray_type::difference_type difference_type; - typedef typename valarray_type::pointer pointer; - typedef sprout::index_iterator iterator; - typedef sprout::reverse_iterator reverse_iterator; - private: - typedef sprout::valarray indexes_type; - public: - SPROUT_STATIC_CONSTEXPR size_type static_size = valarray_type::static_size; - private: - sprout::value_holder arr_; - indexes_type indexes_; - private: - indirect_array() SPROUT_DELETED_FUNCTION_DECL - SPROUT_CONSTEXPR indirect_array(sprout::valarray& arr, indexes_type const& indexes) - : arr_(arr) - , indexes_(indexes) - {} - public: - SPROUT_CONSTEXPR indirect_array(indirect_array const& other) - : arr_(other.arr_), indexes_(other.indexes_) - {} - template - SPROUT_CXX14_CONSTEXPR indirect_array const& - operator=(indirect_array const& ar) const { - sprout::copy(ar.begin(), ar.end(), begin()); - return *this; - } - template - SPROUT_CXX14_CONSTEXPR void - operator=(sprout::valarray const& ar) const { - sprout::copy(ar.begin(), ar.end(), begin()); - } - SPROUT_CXX14_CONSTEXPR void - operator=(T const& value) const { - sprout::fill(begin(), end(), value); - } - template - SPROUT_CXX14_CONSTEXPR void - operator+=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 += *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator-=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 -= *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator*=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 *= *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator/=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 /= *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator%=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 %= *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator&=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 &= *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator|=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 |= *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator^=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 ^= *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator<<=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 <<= *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator>>=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 >>= *it; - } - } - - SPROUT_CXX14_CONSTEXPR void - swap(indirect_array& other) SPROUT_NOEXCEPT { - sprout::swap(arr_, other.arr_); - sprout::swap(indexes_, other.indexes_); - } - - // iterators: - SPROUT_CONSTEXPR iterator - begin() const { - return iterator(*this, 0); - } - SPROUT_CONSTEXPR iterator - end() const { - return iterator(*this, size()); - } - SPROUT_CONSTEXPR reverse_iterator - rbegin() const { - return reverse_iterator(end()); - } - SPROUT_CONSTEXPR reverse_iterator - rend() const { - return reverse_iterator(begin()); - } - // capacity: - SPROUT_CONSTEXPR size_type - size() const SPROUT_NOEXCEPT { - return indexes_.size(); - } - SPROUT_CONSTEXPR bool - empty() const SPROUT_NOEXCEPT { - return size() == 0; - } - // element access: - SPROUT_CONSTEXPR reference - operator[](size_type i) const { - return (*arr_)[indexes_[i]]; - } - SPROUT_CONSTEXPR reference - at(size_type i) const { - return arr_->at(indexes_.at(i)); - } - SPROUT_CONSTEXPR reference - front() const { - return (*this)[0]; - } - SPROUT_CONSTEXPR reference - back() const { - return (*this)[size() - 1]; - } - // others: - SPROUT_CONSTEXPR iterator - nth(size_type i) const { - return i < size() ? begin() + i - : (throw std::out_of_range("indirect_array<>: index out of range"), iterator()) - ; - } - SPROUT_CONSTEXPR size_type - index_of(iterator p) const SPROUT_NOEXCEPT { - return p - begin(); - } - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::indirect_array::size_type sprout::indirect_array::static_size; - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::indirect_array& lhs, sprout::indirect_array& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } -} // namespace sprout - -#endif // #ifndef SPROUT_VALARRAY_INDIRECT_ARRAY_HPP diff --git a/dsp/lib/sprout/sprout/valarray/logical.hpp b/dsp/lib/sprout/sprout/valarray/logical.hpp deleted file mode 100644 index 058bd09..0000000 --- a/dsp/lib/sprout/sprout/valarray/logical.hpp +++ /dev/null @@ -1,66 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VALARRAY_LOGICAL_HPP -#define SPROUT_VALARRAY_LOGICAL_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // operator&& - // - template - inline SPROUT_CONSTEXPR sprout::valarray - operator&&(sprout::valarray const& lhs, sprout::valarray const& rhs) { - typedef sprout::sized_pit > sized_pit_type; - return sprout::fixed::transform(lhs.begin(), lhs.end(), rhs.begin(), sized_pit_type(lhs.size()), sprout::logical_and<>()); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator&&(sprout::valarray const& lhs, T const& rhs) { - typedef sprout::sized_pit > sized_pit_type; - return sprout::fixed::transform(lhs.begin(), lhs.end(), sized_pit_type(lhs.size()), sprout::bind2nd(sprout::logical_and<>(), rhs)); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator&&(T const& lhs, sprout::valarray const& rhs) { - typedef sprout::sized_pit > sized_pit_type; - return sprout::fixed::transform(rhs.begin(), rhs.end(), sized_pit_type(rhs.size()), sprout::bind1st(sprout::logical_and<>(), lhs)); - } - // - // operator|| - // - template - inline SPROUT_CONSTEXPR sprout::valarray - operator||(sprout::valarray const& lhs, sprout::valarray const& rhs) { - typedef sprout::sized_pit > sized_pit_type; - return sprout::fixed::transform(lhs.begin(), lhs.end(), rhs.begin(), sized_pit_type(lhs.size()), sprout::logical_or<>()); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator||(sprout::valarray const& lhs, T const& rhs) { - typedef sprout::sized_pit > sized_pit_type; - return sprout::fixed::transform(lhs.begin(), lhs.end(), sized_pit_type(lhs.size()), sprout::bind2nd(sprout::logical_or<>(), rhs)); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - operator||(T const& lhs, sprout::valarray const& rhs) { - typedef sprout::sized_pit > sized_pit_type; - return sprout::fixed::transform(rhs.begin(), rhs.end(), sized_pit_type(rhs.size()), sprout::bind1st(sprout::logical_or<>(), lhs)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_VALARRAY_LOGICAL_HPP diff --git a/dsp/lib/sprout/sprout/valarray/make_valarray.hpp b/dsp/lib/sprout/sprout/valarray/make_valarray.hpp deleted file mode 100644 index 7af012f..0000000 --- a/dsp/lib/sprout/sprout/valarray/make_valarray.hpp +++ /dev/null @@ -1,108 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VALARRAY_MAKE_VALARRAY_HPP -#define SPROUT_VALARRAY_MAKE_VALARRAY_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - enum make_valarray_t { - make_valarray_in_common_elements - }; - } // namespace detail - // - // make_valarray - // - template - inline SPROUT_CONSTEXPR sprout::valarray::type, sizeof...(Types)> - make_valarray(Types&&... args) { - typedef sprout::valarray::type, sizeof...(Types)> type; - typedef sprout::detail::make_construct_impl construct_type; - return construct_type::make(T(SPROUT_FORWARD(Types, args))...); - } - template - inline SPROUT_CONSTEXPR sprout::valarray::type, N> - make_valarray(Types&&... args) { - typedef sprout::valarray::type, N> type; - typedef sprout::detail::make_construct_impl construct_type; - return construct_type::make(T(SPROUT_FORWARD(Types, args))...); - } - template - inline SPROUT_CONSTEXPR sprout::valarray::type, sizeof...(Types)> - make_valarray(Types&&... args) { - typedef typename sprout::common_decay::type value_type; - typedef sprout::valarray type; - typedef sprout::detail::make_construct_impl construct_type; - return construct_type::make(value_type(SPROUT_FORWARD(Types, args))...); - } - template - inline SPROUT_CONSTEXPR sprout::valarray::type, N> - make_valarray(Types&&... args) { - typedef typename sprout::common_decay::type value_type; - typedef sprout::valarray type; - typedef sprout::detail::make_construct_impl construct_type; - return construct_type::make(value_type(SPROUT_FORWARD(Types, args))...); - } - - // - // make_valarray_without_narrowing - // - template - inline SPROUT_CONSTEXPR sprout::valarray::type, sizeof...(Types)> - make_valarray_without_narrowing(Types&&... args) { - typedef sprout::valarray::type, sizeof...(Types)> type; - typedef sprout::detail::make_construct_impl construct_type; - return construct_type::make(SPROUT_FORWARD(Types, args)...); - } - template - inline SPROUT_CONSTEXPR sprout::valarray::type, N> - make_valarray_without_narrowing(Types&&... args) { - typedef sprout::valarray::type, N> type; - typedef sprout::detail::make_construct_impl construct_type; - return construct_type::make(SPROUT_FORWARD(Types, args)...); - } - template - inline SPROUT_CONSTEXPR sprout::valarray::type, sizeof...(Types)> - make_valarray_without_narrowing(Types&&... args) { - typedef typename sprout::common_decay::type value_type; - typedef sprout::valarray type; - typedef sprout::detail::make_construct_impl construct_type; - return construct_type::make(SPROUT_FORWARD(Types, args)...); - } - template - inline SPROUT_CONSTEXPR sprout::valarray::type, N> - make_valarray_without_narrowing(Types&&... args) { - typedef typename sprout::common_decay::type value_type; - typedef sprout::valarray type; - typedef sprout::detail::make_construct_impl construct_type; - return construct_type::make(SPROUT_FORWARD(Types, args)...); - } - - // - // make_common_valarray - // - template - inline SPROUT_CONSTEXPR sprout::valarray::type, sizeof...(Types)> - make_common_valarray(Types&&... args) { - return sprout::make_valarray(SPROUT_FORWARD(Types, args)...); - } - template - inline SPROUT_CONSTEXPR sprout::valarray::type, N> - make_common_valarray(Types&&... args) { - return sprout::make_valarray(SPROUT_FORWARD(Types, args)...); - } -} // namespace sprout - -#endif // #ifndef SPROUT_VALARRAY_MAKE_VALARRAY_HPP diff --git a/dsp/lib/sprout/sprout/valarray/mask_array.hpp b/dsp/lib/sprout/sprout/valarray/mask_array.hpp deleted file mode 100644 index b425b1f..0000000 --- a/dsp/lib/sprout/sprout/valarray/mask_array.hpp +++ /dev/null @@ -1,234 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VALARRAY_MASK_ARRAY_HPP -#define SPROUT_VALARRAY_MASK_ARRAY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // mask_array - // - template - class mask_array { - friend class sprout::valarray; - private: - typedef sprout::valarray valarray_type; - public: - typedef typename valarray_type::value_type value_type; - typedef typename valarray_type::reference reference; - typedef typename valarray_type::size_type size_type; - typedef typename valarray_type::difference_type difference_type; - typedef typename valarray_type::pointer pointer; - typedef sprout::index_iterator iterator; - typedef sprout::reverse_iterator reverse_iterator; - private: - typedef sprout::valarray mask_type; - typedef sprout::valarray indexes_type; - public: - SPROUT_STATIC_CONSTEXPR size_type static_size = valarray_type::static_size; - private: - sprout::value_holder arr_; - indexes_type indexes_; - private: - mask_array() SPROUT_DELETED_FUNCTION_DECL - SPROUT_CONSTEXPR mask_array(sprout::valarray& arr, mask_type const& mask) - : arr_(arr) - , indexes_( - sprout::detail::mask_index( - mask.begin(), mask.end(), - indexes_type(sprout::count(mask.begin(), mask.end(), true)) - ) - ) - {} - public: - SPROUT_CONSTEXPR mask_array(mask_array const& other) - : arr_(other.arr_), indexes_(other.indexes_) - {} - template - SPROUT_CXX14_CONSTEXPR mask_array const& - operator=(mask_array const& ar) const { - sprout::copy(ar.begin(), ar.end(), begin()); - return *this; - } - template - SPROUT_CXX14_CONSTEXPR void - operator=(sprout::valarray const& ar) const { - sprout::copy(ar.begin(), ar.end(), begin()); - } - SPROUT_CXX14_CONSTEXPR void - operator=(T const& value) const { - sprout::fill(begin(), end(), value); - } - template - SPROUT_CXX14_CONSTEXPR void - operator+=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 += *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator-=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 -= *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator*=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 *= *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator/=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 /= *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator%=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 %= *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator&=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 &= *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator|=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 |= *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator^=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 ^= *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator<<=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 <<= *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator>>=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 >>= *it; - } - } - - SPROUT_CXX14_CONSTEXPR void - swap(mask_array& other) SPROUT_NOEXCEPT { - sprout::swap(arr_, other.arr_); - sprout::swap(indexes_, other.indexes_); - } - - // iterators: - SPROUT_CONSTEXPR iterator - begin() const { - return iterator(*this, 0); - } - SPROUT_CONSTEXPR iterator - end() const { - return iterator(*this, size()); - } - SPROUT_CONSTEXPR reverse_iterator - rbegin() const { - return reverse_iterator(end()); - } - SPROUT_CONSTEXPR reverse_iterator - rend() const { - return reverse_iterator(begin()); - } - // capacity: - SPROUT_CONSTEXPR size_type - size() const SPROUT_NOEXCEPT { - return indexes_.size(); - } - SPROUT_CONSTEXPR bool - empty() const SPROUT_NOEXCEPT { - return size() == 0; - } - // element access: - SPROUT_CONSTEXPR reference - operator[](size_type i) const { - return (*arr_)[indexes_[i]]; - } - SPROUT_CONSTEXPR reference - at(size_type i) const { - return arr_->at(indexes_.at(i)); - } - SPROUT_CONSTEXPR reference - front() const { - return (*this)[0]; - } - SPROUT_CONSTEXPR reference - back() const { - return (*this)[size() - 1]; - } - // others: - SPROUT_CONSTEXPR iterator - nth(size_type i) const { - return i < size() ? begin() + i - : (throw std::out_of_range("mask_array<>: index out of range"), iterator()) - ; - } - SPROUT_CONSTEXPR size_type - index_of(iterator p) const SPROUT_NOEXCEPT { - return p - begin(); - } - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::mask_array::size_type sprout::mask_array::static_size; - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::mask_array& lhs, sprout::mask_array& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } -} // namespace sprout - -#endif // #ifndef SPROUT_VALARRAY_MASK_ARRAY_HPP diff --git a/dsp/lib/sprout/sprout/valarray/power.hpp b/dsp/lib/sprout/sprout/valarray/power.hpp deleted file mode 100644 index 34fef61..0000000 --- a/dsp/lib/sprout/sprout/valarray/power.hpp +++ /dev/null @@ -1,234 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VALARRAY_POWER_HPP -#define SPROUT_VALARRAY_POWER_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout_math_detail { - using sprout::math::cbrt; - using sprout::math::abs; - using sprout::math::hypot; - using sprout::math::pow; - using sprout::math::sqrt; - using sprout::math::log_a; - using sprout::abs; - - template - inline SPROUT_CONSTEXPR decltype(cbrt(std::declval())) - call_cbrt(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(cbrt(std::declval())) - { - return cbrt(SPROUT_FORWARD(T, x)); - } - template - inline SPROUT_CONSTEXPR decltype(abs(std::declval())) - call_abs(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(abs(std::declval())) - { - return abs(SPROUT_FORWARD(T, x)); - } - template - inline SPROUT_CONSTEXPR decltype(hypot(std::declval(), std::declval())) - call_hypot(T&& x, U&& y) - SPROUT_NOEXCEPT_IF_EXPR(hypot(std::declval(), std::declval())) - { - return hypot(SPROUT_FORWARD(T, x), SPROUT_FORWARD(U, y)); - } - template - inline SPROUT_CONSTEXPR decltype(pow(std::declval(), std::declval())) - call_pow(T&& x, U&& y) - SPROUT_NOEXCEPT_IF_EXPR(pow(std::declval(), std::declval())) - { - return pow(SPROUT_FORWARD(T, x), SPROUT_FORWARD(U, y)); - } - template - inline SPROUT_CONSTEXPR decltype(sqrt(std::declval())) - call_sqrt(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(sqrt(std::declval())) - { - return sqrt(SPROUT_FORWARD(T, x)); - } - template - inline SPROUT_CONSTEXPR decltype(log_a(std::declval(), std::declval())) - call_log_a(T&& x, U&& y) - SPROUT_NOEXCEPT_IF_EXPR(log_a(std::declval(), std::declval())) - { - return log_a(SPROUT_FORWARD(T, x), SPROUT_FORWARD(U, y)); - } -} // namespace sprout - -namespace sprout { - namespace detail { - struct cbrt_f - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(sprout_math_detail::call_cbrt(std::declval())) - operator()(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(sprout_math_detail::call_cbrt(std::declval())) - { - return sprout_math_detail::call_cbrt(SPROUT_FORWARD(T, x)); - } - }; - struct abs_f - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(sprout_math_detail::call_abs(std::declval())) - operator()(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(sprout_math_detail::call_abs(std::declval())) - { - return sprout_math_detail::call_abs(SPROUT_FORWARD(T, x)); - } - }; - struct hypot_f - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(sprout_math_detail::call_hypot(std::declval(), std::declval())) - operator()(T&& x, U&& y) - SPROUT_NOEXCEPT_IF_EXPR(sprout_math_detail::call_hypot(std::declval(), std::declval())) - { - return sprout_math_detail::call_hypot(SPROUT_FORWARD(T, x), SPROUT_FORWARD(U, y)); - } - }; - struct pow_f - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(sprout_math_detail::call_pow(std::declval(), std::declval())) - operator()(T&& x, U&& y) - SPROUT_NOEXCEPT_IF_EXPR(sprout_math_detail::call_pow(std::declval(), std::declval())) - { - return sprout_math_detail::call_pow(SPROUT_FORWARD(T, x), SPROUT_FORWARD(U, y)); - } - }; - struct sqrt_f - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(sprout_math_detail::call_sqrt(std::declval())) - operator()(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(sprout_math_detail::call_sqrt(std::declval())) - { - return sprout_math_detail::call_sqrt(SPROUT_FORWARD(T, x)); - } - }; - struct log_a_f - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(sprout_math_detail::call_log_a(std::declval(), std::declval())) - operator()(T&& x, U&& y) - SPROUT_NOEXCEPT_IF_EXPR(sprout_math_detail::call_log_a(std::declval(), std::declval())) - { - return sprout_math_detail::call_log_a(SPROUT_FORWARD(T, x), SPROUT_FORWARD(U, y)); - } - }; - } // namespace detail - - // - // cbrt - // - template - inline SPROUT_CONSTEXPR sprout::valarray - cbrt(sprout::valarray const& x) { - return sprout::fixed::transform(x.begin(), x.end(), x, sprout::detail::cbrt_f()); - } - // - // abs - // - template - inline SPROUT_CONSTEXPR sprout::valarray - abs(sprout::valarray const& x) { - return sprout::fixed::transform(x.begin(), x.end(), x, sprout::detail::abs_f()); - } - // - // hypot - // - template - inline SPROUT_CONSTEXPR sprout::valarray - hypot(sprout::valarray const& x, sprout::valarray const& y) { - return sprout::fixed::transform(x.begin(), x.end(), y.end(), x, sprout::detail::hypot_f()); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - hypot(sprout::valarray const& x, T const& y) { - return sprout::fixed::transform(x.begin(), x.end(), x, sprout::bind2nd(sprout::detail::hypot_f(), y)); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - hypot(T const& x, sprout::valarray const& y) { - return sprout::fixed::transform(y.begin(), y.end(), y, sprout::bind1st(sprout::detail::hypot_f(), x)); - } - // - // pow - // - template - inline SPROUT_CONSTEXPR sprout::valarray - pow(sprout::valarray const& x, sprout::valarray const& y) { - return sprout::fixed::transform(x.begin(), x.end(), y.end(), x, sprout::detail::pow_f()); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - pow(sprout::valarray const& x, T const& y) { - return sprout::fixed::transform(x.begin(), x.end(), x, sprout::bind2nd(sprout::detail::pow_f(), y)); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - pow(T const& x, sprout::valarray const& y) { - return sprout::fixed::transform(y.begin(), y.end(), y, sprout::bind1st(sprout::detail::pow_f(), x)); - } - // - // sqrt - // - template - inline SPROUT_CONSTEXPR sprout::valarray - sqrt(sprout::valarray const& x) { - return sprout::fixed::transform(x.begin(), x.end(), x, sprout::detail::sqrt_f()); - } - // - // log_a - // - template - inline SPROUT_CONSTEXPR sprout::valarray - log_a(sprout::valarray const& x, sprout::valarray const& y) { - return sprout::fixed::transform(x.begin(), x.end(), y.end(), x, sprout::detail::log_a_f()); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - log_a(sprout::valarray const& x, T const& y) { - return sprout::fixed::transform(x.begin(), x.end(), x, sprout::bind2nd(sprout::detail::log_a_f(), y)); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - log_a(T const& x, sprout::valarray const& y) { - return sprout::fixed::transform(y.begin(), y.end(), y, sprout::bind1st(sprout::detail::log_a_f(), x)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_VALARRAY_POWER_HPP diff --git a/dsp/lib/sprout/sprout/valarray/slice_array.hpp b/dsp/lib/sprout/sprout/valarray/slice_array.hpp deleted file mode 100644 index e4e77cf..0000000 --- a/dsp/lib/sprout/sprout/valarray/slice_array.hpp +++ /dev/null @@ -1,249 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VALARRAY_SLICE_ARRAY_HPP -#define SPROUT_VALARRAY_SLICE_ARRAY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // slice - // - class slice { - private: - std::size_t start_; - std::size_t size_; - std::size_t stride_; - public: - SPROUT_CONSTEXPR slice() - : start_(), size_(), stride_() - {} - SPROUT_CONSTEXPR slice(std::size_t start, std::size_t size, std::size_t stride) - : start_(start), size_(size), stride_(stride) - {} - SPROUT_CONSTEXPR std::size_t start() const { - return start_; - } - SPROUT_CONSTEXPR std::size_t size() const { - return size_; - } - SPROUT_CONSTEXPR std::size_t stride() const { - return stride_; - } - }; - - // - // slice_array - // - template - class slice_array { - friend class sprout::valarray; - private: - typedef sprout::valarray valarray_type; - public: - typedef typename valarray_type::value_type value_type; - typedef typename valarray_type::reference reference; - typedef typename valarray_type::size_type size_type; - typedef typename valarray_type::difference_type difference_type; - typedef typename valarray_type::pointer pointer; - typedef sprout::index_iterator iterator; - typedef sprout::reverse_iterator reverse_iterator; - public: - SPROUT_STATIC_CONSTEXPR size_type static_size = valarray_type::static_size; - private: - sprout::value_holder arr_; - sprout::slice slice_; - private: - slice_array() SPROUT_DELETED_FUNCTION_DECL - SPROUT_CONSTEXPR slice_array(sprout::valarray& arr, sprout::slice const& slice) - : arr_(arr), slice_(slice) - {} - public: - SPROUT_CONSTEXPR slice_array(slice_array const& other) - : arr_(other.arr_), slice_(other.slice_) - {} - template - SPROUT_CXX14_CONSTEXPR slice_array const& - operator=(slice_array const& ar) const { - sprout::copy(ar.begin(), ar.end(), begin()); - return *this; - } - template - SPROUT_CXX14_CONSTEXPR void - operator=(sprout::valarray const& ar) const { - sprout::copy(ar.begin(), ar.end(), begin()); - } - SPROUT_CXX14_CONSTEXPR void - operator=(T const& value) const { - sprout::fill(begin(), end(), value); - } - template - SPROUT_CXX14_CONSTEXPR void - operator+=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 += *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator-=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 -= *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator*=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 *= *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator/=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 /= *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator%=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 %= *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator&=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 &= *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator|=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 |= *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator^=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 ^= *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator<<=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 <<= *it; - } - } - template - SPROUT_CXX14_CONSTEXPR void - operator>>=(sprout::valarray const& xs) const { - iterator it2 = begin(); - for (typename sprout::valarray::const_iterator it = xs.begin(), last = xs.end(); it != last; ++it, ++it2) { - *it2 >>= *it; - } - } - - SPROUT_CXX14_CONSTEXPR void - swap(slice_array& other) SPROUT_NOEXCEPT { - sprout::swap(arr_, other.arr_); - sprout::swap(slice_, other.slice_); - } - - // iterators: - SPROUT_CONSTEXPR iterator - begin() const { - return iterator(*this, 0); - } - SPROUT_CONSTEXPR iterator - end() const { - return iterator(*this, size()); - } - SPROUT_CONSTEXPR reverse_iterator - rbegin() const { - return reverse_iterator(end()); - } - SPROUT_CONSTEXPR reverse_iterator - rend() const { - return reverse_iterator(begin()); - } - // capacity: - SPROUT_CONSTEXPR size_type - size() const SPROUT_NOEXCEPT { - return slice_.size(); - } - SPROUT_CONSTEXPR bool - empty() const SPROUT_NOEXCEPT { - return size() == 0; - } - // element access: - SPROUT_CONSTEXPR reference - operator[](size_type i) const { - return (*arr_)[slice_.start() + slice_.stride() * i]; - } - SPROUT_CONSTEXPR reference - at(size_type i) const { - return arr_->at(slice_.start() + slice_.stride() * i); - } - SPROUT_CONSTEXPR reference - front() const { - return (*this)[0]; - } - SPROUT_CONSTEXPR reference - back() const { - return (*this)[size() - 1]; - } - // others: - SPROUT_CONSTEXPR iterator - nth(size_type i) const { - return i < size() ? begin() + i - : (throw std::out_of_range("slice_array<>: index out of range"), iterator()) - ; - } - SPROUT_CONSTEXPR size_type - index_of(iterator p) const SPROUT_NOEXCEPT { - return p - begin(); - } - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::slice_array::size_type sprout::slice_array::static_size; - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::slice_array& lhs, sprout::slice_array& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } -} // namespace sprout - -#endif // #ifndef SPROUT_VALARRAY_SLICE_ARRAY_HPP diff --git a/dsp/lib/sprout/sprout/valarray/trigonometric.hpp b/dsp/lib/sprout/sprout/valarray/trigonometric.hpp deleted file mode 100644 index 6d83201..0000000 --- a/dsp/lib/sprout/sprout/valarray/trigonometric.hpp +++ /dev/null @@ -1,240 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VALARRAY_BITWISE_HPP -#define SPROUT_VALARRAY_BITWISE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout_math_detail { - using sprout::math::acos; - using sprout::math::asin; - using sprout::math::atan; - using sprout::math::atan2; - using sprout::math::cos; - using sprout::math::sin; - using sprout::math::tan; - - template - inline SPROUT_CONSTEXPR decltype(acos(std::declval())) - call_acos(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(acos(std::declval())) - { - return acos(SPROUT_FORWARD(T, x)); - } - template - inline SPROUT_CONSTEXPR decltype(asin(std::declval())) - call_asin(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(asin(std::declval())) - { - return asin(SPROUT_FORWARD(T, x)); - } - template - inline SPROUT_CONSTEXPR decltype(atan(std::declval())) - call_atan(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(atan(std::declval())) - { - return atan(SPROUT_FORWARD(T, x)); - } - template - inline SPROUT_CONSTEXPR decltype(atan2(std::declval(), std::declval())) - call_atan2(T&& x, U&& y) - SPROUT_NOEXCEPT_IF_EXPR(atan2(std::declval(), std::declval())) - { - return atan2(SPROUT_FORWARD(T, x), SPROUT_FORWARD(U, u)); - } - template - inline SPROUT_CONSTEXPR decltype(cos(std::declval())) - call_cos(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(cos(std::declval())) - { - return cos(SPROUT_FORWARD(T, x)); - } - template - inline SPROUT_CONSTEXPR decltype(sin(std::declval())) - call_sin(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(sin(std::declval())) - { - return sin(SPROUT_FORWARD(T, x)); - } - template - inline SPROUT_CONSTEXPR decltype(tan(std::declval())) - call_tan(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(tan(std::declval())) - { - return tan(SPROUT_FORWARD(T, x)); - } -} // namespace sprout - -namespace sprout { - namespace detail { - struct acos_f - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(sprout_math_detail::call_acos(std::declval())) - operator()(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(sprout_math_detail::call_acos(std::declval())) - { - return sprout_math_detail::call_acos(SPROUT_FORWARD(T, x)); - } - }; - struct asin_f - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(sprout_math_detail::call_asin(std::declval())) - operator()(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(sprout_math_detail::call_asin(std::declval())) - { - return sprout_math_detail::call_asin(SPROUT_FORWARD(T, x)); - } - }; - struct atan_f - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(sprout_math_detail::call_atan(std::declval())) - operator()(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(sprout_math_detail::call_atan(std::declval())) - { - return sprout_math_detail::call_atan(SPROUT_FORWARD(T, x)); - } - }; - struct atan2_f - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(sprout_math_detail::call_atan2(std::declval(), std::declval())) - operator()(T&& x, U&& y) - SPROUT_NOEXCEPT_IF_EXPR(sprout_math_detail::call_atan2(std::declval(), std::declval())) - { - return sprout_math_detail::call_atan2(SPROUT_FORWARD(T, x), SPROUT_FORWARD(U, y)); - } - }; - struct cos_f - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(sprout_math_detail::call_cos(std::declval())) - operator()(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(sprout_math_detail::call_cos(std::declval())) - { - return sprout_math_detail::call_cos(SPROUT_FORWARD(T, x)); - } - }; - struct sin_f - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(sprout_math_detail::call_sin(std::declval())) - operator()(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(sprout_math_detail::call_sin(std::declval())) - { - return sprout_math_detail::call_sin(SPROUT_FORWARD(T, x)); - } - }; - struct tan_f - : public sprout::transparent<> - { - public: - template - SPROUT_CONSTEXPR decltype(sprout_math_detail::call_tan(std::declval())) - operator()(T&& x) - SPROUT_NOEXCEPT_IF_EXPR(sprout_math_detail::call_tan(std::declval())) - { - return sprout_math_detail::call_tan(SPROUT_FORWARD(T, x)); - } - }; - } // namespace detail - - // - // acos - // - template - inline SPROUT_CONSTEXPR sprout::valarray - acos(sprout::valarray const& x) { - return sprout::fixed::transform(x.begin(), x.end(), x, sprout::detail::acos_f()); - } - // - // asin - // - template - inline SPROUT_CONSTEXPR sprout::valarray - asin(sprout::valarray const& x) { - return sprout::fixed::transform(x.begin(), x.end(), x, sprout::detail::asin_f()); - } - // - // atan - // - template - inline SPROUT_CONSTEXPR sprout::valarray - atan(sprout::valarray const& x) { - return sprout::fixed::transform(x.begin(), x.end(), x, sprout::detail::atan_f()); - } - // - // atan2 - // - template - inline SPROUT_CONSTEXPR sprout::valarray - atan2(sprout::valarray const& x, sprout::valarray const& y) { - return sprout::fixed::transform(x.begin(), x.end(), y.end(), x, sprout::detail::atan2_f()); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - atan2(sprout::valarray const& lhs, T const& y) { - return sprout::fixed::transform(x.begin(), x.end(), x, sprout::bind2nd(sprout::detail::atan2_f()()), y)); - } - template - inline SPROUT_CONSTEXPR sprout::valarray - atan2(T const& x, sprout::valarray const& y) { - return sprout::fixed::transform(y.begin(), y.end(), y, sprout::bind1st(sprout::detail::atan2_f()()), x)); - } - // - // cos - // - template - inline SPROUT_CONSTEXPR sprout::valarray - cos(sprout::valarray const& x) { - return sprout::fixed::transform(x.begin(), x.end(), x, sprout::detail::cos_f()); - } - // - // sin - // - template - inline SPROUT_CONSTEXPR sprout::valarray - sin(sprout::valarray const& x) { - return sprout::fixed::transform(x.begin(), x.end(), x, sprout::detail::sin_f()); - } - // - // tan - // - template - inline SPROUT_CONSTEXPR sprout::valarray - tan(sprout::valarray const& x) { - return sprout::fixed::transform(x.begin(), x.end(), x, sprout::detail::tan_f()); - } -} // namespace sprout - -#endif // #ifndef SPROUT_VALARRAY_BITWISE_HPP diff --git a/dsp/lib/sprout/sprout/valarray/tuple.hpp b/dsp/lib/sprout/sprout/valarray/tuple.hpp deleted file mode 100644 index f71e1a1..0000000 --- a/dsp/lib/sprout/sprout/valarray/tuple.hpp +++ /dev/null @@ -1,70 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VALARRAY_TUPLE_HPP -#define SPROUT_VALARRAY_TUPLE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // tuple_get - // - template - inline SPROUT_CONSTEXPR T& - tuple_get(sprout::valarray& t) SPROUT_NOEXCEPT { - static_assert(I < N, "tuple_get: index out of range"); - return t[I]; - } - template - inline SPROUT_CONSTEXPR T const& - tuple_get(sprout::valarray const& t) SPROUT_NOEXCEPT { - static_assert(I < N, "tuple_get: index out of range"); - return t[I]; - } - template - inline SPROUT_CONSTEXPR T&& - tuple_get(sprout::valarray&& t) SPROUT_NOEXCEPT { - return sprout::move(sprout::tuples::get(t)); - } -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // tuple_size - // - template - struct tuple_size > - : public sprout::integral_constant - {}; - - // - // tuple_element - // - template - struct tuple_element > - : public std::conditional<(I < N), sprout::identity, sprout::detail::nil_base>::type - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -#endif // #ifndef SPROUT_VALARRAY_TUPLE_HPP diff --git a/dsp/lib/sprout/sprout/valarray/type_traits.hpp b/dsp/lib/sprout/sprout/valarray/type_traits.hpp deleted file mode 100644 index a377df5..0000000 --- a/dsp/lib/sprout/sprout/valarray/type_traits.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VALARRAY_TYPE_TRAITS_HPP -#define SPROUT_VALARRAY_TYPE_TRAITS_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // is_valarray - // - template - struct is_valarray - : public sprout::false_type - {}; - template - struct is_valarray - : public sprout::is_valarray - {}; - template - struct is_valarray - : public sprout::is_valarray - {}; - template - struct is_valarray > - : public sprout::true_type - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_valarray_v = sprout::is_valarray::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_VALARRAY_TYPE_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/valarray/valarray.hpp b/dsp/lib/sprout/sprout/valarray/valarray.hpp deleted file mode 100644 index 6c5f6e7..0000000 --- a/dsp/lib/sprout/sprout/valarray/valarray.hpp +++ /dev/null @@ -1,709 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VALARRAY_VALARRAY_HPP -#define SPROUT_VALARRAY_VALARRAY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - struct valarray_raw_construct_t {}; - - template - class valarray_construct_access; - - template - class valarray_impl { - public: - typedef T value_type; - typedef sprout::array array_type; - public: - static SPROUT_CONSTEXPR std::size_t - checked_size(std::size_t n) { - return N >= n ? n - : throw std::length_error("valarray<>: length exceeded") - ; - } - public: - array_type array_; - std::size_t size_; - public: - SPROUT_CONSTEXPR valarray_impl() - : array_{{}}, size_(0) - {} - explicit SPROUT_CONSTEXPR valarray_impl(std::size_t n) - : array_{{}}, size_(checked_size(n)) - {} - template - SPROUT_CONSTEXPR valarray_impl( - sprout::index_tuple, - value_type const& value, std::size_t n - ) - : array_{{ - (sprout::math::less(Indexes, n) ? value - : value_type() - )... - }} - , size_(checked_size(n)) - {} - template - SPROUT_CONSTEXPR valarray_impl( - sprout::index_tuple, - RandomAccessIterator first, std::size_t n - ) - : array_{{ - (sprout::math::less(Indexes, n) ? first[Indexes] - : value_type() - )... - }} - , size_(checked_size(n)) - {} - valarray_impl(valarray_impl const& v) = default; - valarray_impl(valarray_impl&& v) = default; - template - SPROUT_CONSTEXPR valarray_impl( - sprout::index_tuple, - sprout::detail::valarray_raw_construct_t, std::size_t n, Args&&... args - ) - : array_{{ - (sprout::math::less(Indexes, n) ? static_cast(SPROUT_FORWARD(Args, args)) - : value_type() - )... - }} - , size_(n) - {} - }; - } // namespace detail - - // - // valarray - // - template - class valarray { - friend class sprout::detail::valarray_construct_access; - private: - typedef sprout::detail::valarray_impl impl_type; - typedef typename impl_type::array_type array_type; - public: - typedef typename array_type::value_type value_type; - typedef typename array_type::iterator iterator; - typedef typename array_type::const_iterator const_iterator; - typedef typename array_type::reference reference; - typedef typename array_type::const_reference const_reference; - typedef typename array_type::size_type size_type; - typedef typename array_type::difference_type difference_type; - typedef typename array_type::pointer pointer; - typedef typename array_type::const_pointer const_pointer; - typedef typename array_type::reverse_iterator reverse_iterator; - typedef typename array_type::const_reverse_iterator const_reverse_iterator; - typedef value_type result_type; - public: - SPROUT_STATIC_CONSTEXPR size_type static_size = N; - private: - impl_type impl_; - private: - template::type> - SPROUT_CONSTEXPR valarray(sprout::detail::valarray_raw_construct_t, size_type n, Args&&... args) - : impl_( - sprout::index_pack::make(), - sprout::detail::valarray_raw_construct_t(), n, SPROUT_FORWARD(Args, args)... - ) - {} - SPROUT_CXX14_CONSTEXPR void - maxcheck(size_type n) const { - if (n > max_size()) { - throw std::out_of_range("valarray<>: index out of range"); - } - } - SPROUT_CXX14_CONSTEXPR void - lengthcheck(size_type n) const { - if (n > max_size()) { - throw std::length_error("valarray<>: length exceeded"); - } - } - public: - // construct/destroy: - SPROUT_CONSTEXPR valarray() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - explicit SPROUT_CONSTEXPR valarray(std::size_t n) - : impl_(n) - {} - SPROUT_CONSTEXPR valarray(value_type const& value, std::size_t n) - : impl_( - sprout::make_index_tuple::make(), - value, n - ) - {} - SPROUT_CONSTEXPR valarray(value_type const* first, std::size_t n) - : impl_( - sprout::make_index_tuple::make(), - first, n - ) - {} - valarray(valarray const&) = default; - valarray(valarray&&) = default; - SPROUT_INITIALIZER_LIST_CONSTEXPR valarray(std::initializer_list il) - : impl_( - sprout::make_index_tuple::make(), - il.begin(), il.size() - ) - {} - SPROUT_CONSTEXPR valarray(sprout::slice_array const& x) - : impl_( - sprout::make_index_tuple::make(), - x.begin(), x.size() - ) - {} - template - SPROUT_CONSTEXPR valarray(sprout::gslice_array const& x) - : impl_( - sprout::make_index_tuple::make(), - x.begin(), x.size() - ) - {} - template - SPROUT_CONSTEXPR valarray(sprout::mask_array const& x) - : impl_( - sprout::make_index_tuple::make(), - x.begin(), x.size() - ) - {} - template - SPROUT_CONSTEXPR valarray(sprout::indirect_array const& x) - : impl_( - sprout::make_index_tuple::make(), - x.begin(), x.size() - ) - {} - // assignment: - SPROUT_CXX14_CONSTEXPR valarray& - operator=(valarray const& rhs) { - impl_.array_ = rhs.array_; - impl_.size_ = rhs.size_; - return *this; - } - SPROUT_CXX14_CONSTEXPR valarray& - operator=(valarray&& rhs) SPROUT_NOEXCEPT { - impl_.array_ = sprout::move(rhs.array_); - impl_.size_ = sprout::move(rhs.size_); - return *this; - } - SPROUT_CXX14_CONSTEXPR valarray& - operator=(value_type const& rhs) { - impl_.array_.fill(rhs); - return *this; - } - SPROUT_CXX14_CONSTEXPR valarray& - operator=(std::initializer_list rhs) { - lengthcheck(rhs.size()); - sprout::copy(rhs.begin(), rhs.end(), begin()); - impl_.size_ = rhs.size(); - return *this; - } - SPROUT_CXX14_CONSTEXPR valarray& - operator=(sprout::slice_array const& rhs) { - lengthcheck(rhs.size()); - sprout::copy(rhs.begin(), rhs.end(), begin()); - impl_.size_ = rhs.size(); - return *this; - } - template - SPROUT_CXX14_CONSTEXPR valarray& - operator=(sprout::gslice_array const& rhs) { - lengthcheck(rhs.size()); - sprout::copy(rhs.begin(), rhs.end(), begin()); - impl_.size_ = rhs.size(); - return *this; - } - template - SPROUT_CXX14_CONSTEXPR valarray& - operator=(sprout::mask_array const& rhs) { - lengthcheck(rhs.size()); - sprout::copy(rhs.begin(), rhs.end(), begin()); - impl_.size_ = rhs.size(); - return *this; - } - template - SPROUT_CXX14_CONSTEXPR valarray& - operator=(sprout::indirect_array const& rhs) { - lengthcheck(rhs.size()); - sprout::copy(rhs.begin(), rhs.end(), begin()); - impl_.size_ = rhs.size(); - return *this; - } - // element access: - SPROUT_CONSTEXPR value_type const& - operator[](std::size_t i) const { - return impl_.array_[i]; - } - SPROUT_CXX14_CONSTEXPR value_type& - operator[](std::size_t i) { - return impl_.array_[i]; - } - // subset operations: - SPROUT_CONSTEXPR valarray - operator[](sprout::slice s) const { - return valarray(sprout::slice_array(const_cast(*this), s)); - } - SPROUT_CXX14_CONSTEXPR sprout::slice_array - operator[](sprout::slice s) { - return sprout::slice_array(*this, s); - } - template - SPROUT_CONSTEXPR valarray - operator[](sprout::gslice const& gs) const { - return valarray(sprout::gslice_array(const_cast(*this), gs)); - } - template - SPROUT_CXX14_CONSTEXPR sprout::gslice_array - operator[](sprout::gslice const& gs) { - return sprout::gslice_array(*this, gs); - } - template - SPROUT_CONSTEXPR valarray - operator[](valarray const& vb) const { - return valarray(sprout::mask_array(const_cast(*this), vb)); - } - template - SPROUT_CXX14_CONSTEXPR sprout::mask_array - operator[](valarray const& vb) { - return sprout::mask_array(*this, vb); - } - template - SPROUT_CONSTEXPR valarray - operator[](valarray const& vs) const { - return valarray(sprout::indirect_array(const_cast(*this), vs)); - } - template - SPROUT_CXX14_CONSTEXPR sprout::indirect_array - operator[](valarray const& vs) { - return sprout::indirect_array(*this, vs); - } - // unary operators: - SPROUT_CONSTEXPR valarray - operator+() const { - return *this; - } - SPROUT_CONSTEXPR valarray - operator-() const { - return sprout::fixed::transform(begin(), end(), *this, sprout::negate<>()); - } - SPROUT_CONSTEXPR valarray - operator~() const { - return sprout::fixed::transform(begin(), end(), *this, sprout::bit_not<>()); - } - SPROUT_CONSTEXPR valarray - operator!() const { - typedef sprout::sized_pit > sized_pit_type; - return sprout::fixed::transform(begin(), end(), sized_pit_type(size()), sprout::logical_not<>()); - } - // computed assignment: - SPROUT_CXX14_CONSTEXPR valarray& - operator*=(value_type const& x) { - sprout::for_each(begin(), end(), sprout::bind2nd(sprout::multiplies_assign<>(), x)); - return *this; - } - SPROUT_CXX14_CONSTEXPR valarray& - operator/=(value_type const& x) { - sprout::for_each(begin(), end(), sprout::bind2nd(sprout::divides_assign<>(), x)); - return *this; - } - SPROUT_CXX14_CONSTEXPR valarray& - operator%=(value_type const& x) { - sprout::for_each(begin(), end(), sprout::bind2nd(sprout::modulus_assign<>(), x)); - return *this; - } - SPROUT_CXX14_CONSTEXPR valarray& - operator+=(value_type const& x) { - sprout::for_each(begin(), end(), sprout::bind2nd(sprout::plus_assign<>(), x)); - return *this; - } - SPROUT_CXX14_CONSTEXPR valarray& - operator-=(value_type const& x) { - sprout::for_each(begin(), end(), sprout::bind2nd(sprout::minus_assign<>(), x)); - return *this; - } - SPROUT_CXX14_CONSTEXPR valarray& - operator^=(value_type const& x) { - sprout::for_each(begin(), end(), sprout::bind2nd(sprout::bit_xor_assign<>(), x)); - return *this; - } - SPROUT_CXX14_CONSTEXPR valarray& - operator&=(value_type const& x) { - sprout::for_each(begin(), end(), sprout::bind2nd(sprout::bit_and_assign<>(), x)); - return *this; - } - SPROUT_CXX14_CONSTEXPR valarray& - operator|=(value_type const& x) { - sprout::for_each(begin(), end(), sprout::bind2nd(sprout::bit_or_assign<>(), x)); - return *this; - } - SPROUT_CXX14_CONSTEXPR valarray& - operator<<=(value_type const& x) { - sprout::for_each(begin(), end(), sprout::bind2nd(sprout::shift_left_assign<>(), x)); - return *this; - } - SPROUT_CXX14_CONSTEXPR valarray& - operator>>=(value_type const& x) { - sprout::for_each(begin(), end(), sprout::bind2nd(sprout::shift_right_assign<>(), x)); - return *this; - } - // member functions: - SPROUT_CXX14_CONSTEXPR void - swap(valarray& other) SPROUT_NOEXCEPT { - sprout::swap(impl_.array_, other.impl_.array_); - sprout::swap(impl_.size_, other.impl_.size_); - } - SPROUT_CONSTEXPR std::size_t - size() const { - return impl_.size_; - } - SPROUT_CONSTEXPR value_type - sum() const { - return sprout::accumulate(begin(), end(), value_type()); - } - SPROUT_CONSTEXPR value_type - min() const { - return *sprout::min_element(begin(), end()); - } - SPROUT_CONSTEXPR value_type - max() const { - return *sprout::max_element(begin(), end()); - } - SPROUT_CONSTEXPR valarray - shift(int i) const { - return i > 0 ? sprout::fixed::copy(begin() + i, end(), *this) - : i < 0 ? sprout::fixed::copy_backward(begin(), end() + i, *this) - : *this - ; - } - SPROUT_CONSTEXPR valarray - cshift(int i) const { - return i > 0 ? sprout::fixed::rotate(*this, begin() + i) - : i < 0 ? sprout::fixed::rotate(*this, end() + i) - : *this - ; - } - SPROUT_CONSTEXPR valarray - apply(value_type func(value_type)) const { - return sprout::fixed::transform(begin(), end(), *this, func); - } - SPROUT_CONSTEXPR valarray - apply(value_type func(value_type const&)) const { - return sprout::fixed::transform(begin(), end(), *this, func); - } - template - SPROUT_CONSTEXPR valarray - apply(F func) const { - return sprout::fixed::transform(begin(), end(), *this, func); - } - SPROUT_CXX14_CONSTEXPR void - resize(std::size_t n, value_type x = value_type()) { - lengthcheck(n); - impl_.size_ = n; - impl_.array_.fill(x); - } - - // modifiers (array): - SPROUT_CXX14_CONSTEXPR void - fill(const_reference value) { - impl_.array_.fill(value); - } - SPROUT_CONSTEXPR valarray - fill(const_reference value) const { - return valarray(value, size()); - } - SPROUT_CXX14_CONSTEXPR void - assign(const_reference value) { - impl_.array_.assign(value); - } - SPROUT_CONSTEXPR valarray - assign(const_reference value) const { - return valarray(value, size()); - } - // iterators (array): - SPROUT_CXX14_CONSTEXPR iterator - begin() SPROUT_NOEXCEPT { - return impl_.array_.begin(); - } - SPROUT_CONSTEXPR const_iterator - begin() const SPROUT_NOEXCEPT { - return impl_.array_.begin(); - } - SPROUT_CXX14_CONSTEXPR iterator - end() SPROUT_NOEXCEPT { - return impl_.array_.begin() + size(); - } - SPROUT_CONSTEXPR const_iterator - end() const SPROUT_NOEXCEPT { - return impl_.array_.begin() + size(); - } - SPROUT_CXX14_CONSTEXPR reverse_iterator - rbegin() SPROUT_NOEXCEPT { - return impl_.array_.rend() - size(); - } - SPROUT_CONSTEXPR const_reverse_iterator - rbegin() const SPROUT_NOEXCEPT { - return impl_.array_.rend() - size(); - } - SPROUT_CXX14_CONSTEXPR reverse_iterator - rend() SPROUT_NOEXCEPT { - return impl_.array_.rend(); - } - SPROUT_CONSTEXPR const_reverse_iterator - rend() const SPROUT_NOEXCEPT { - return impl_.array_.rend(); - } - SPROUT_CONSTEXPR const_iterator - cbegin() const SPROUT_NOEXCEPT { - return impl_.array_.cbegin(); - } - SPROUT_CONSTEXPR const_iterator - cend() const SPROUT_NOEXCEPT { - return impl_.array_.cbegin() + size(); - } - SPROUT_CONSTEXPR const_reverse_iterator - crbegin() const SPROUT_NOEXCEPT { - return impl_.array_.crend() - size(); - } - SPROUT_CONSTEXPR const_reverse_iterator - crend() const SPROUT_NOEXCEPT { - return impl_.array_.crend(); - } - // capacity (array): - SPROUT_CONSTEXPR size_type - max_size() const SPROUT_NOEXCEPT { - return impl_.array_.max_size(); - } - SPROUT_CONSTEXPR bool - empty() const SPROUT_NOEXCEPT { - return size() != 0; - } - // element access (array): - SPROUT_CXX14_CONSTEXPR reference - at(size_type i) { - return i < size() ? (*this)[i] - : (throw std::out_of_range("valarray<>: index out of range"), (*this)[i]) - ; - } - SPROUT_CONSTEXPR const_reference - at(size_type i) const { - return i < size() ? (*this)[i] - : (throw std::out_of_range("valarray<>: index out of range"), (*this)[i]) - ; - } - SPROUT_CXX14_CONSTEXPR reference - front() { - return impl_.array_.front(); - } - SPROUT_CONSTEXPR const_reference - front() const { - return impl_.array_.front(); - } - SPROUT_CXX14_CONSTEXPR reference - back() { - return (*this)[size() - 1]; - } - SPROUT_CONSTEXPR const_reference - back() const { - return (*this)[size() - 1]; - } - - SPROUT_CXX14_CONSTEXPR pointer - data() SPROUT_NOEXCEPT { - return impl_.array_.data(); - } - SPROUT_CONSTEXPR const_pointer - data() const SPROUT_NOEXCEPT { - return impl_.array_.data(); - } - SPROUT_CXX14_CONSTEXPR pointer - c_array() SPROUT_NOEXCEPT { - return impl_.array_.c_array(); - } - SPROUT_CONSTEXPR const_pointer - c_array() const SPROUT_NOEXCEPT { - return impl_.array_.c_array(); - } - // others (array): - SPROUT_CXX14_CONSTEXPR void - rangecheck(size_type i) const { - return i >= size() ? throw std::out_of_range("valarray<>: index out of range") - : (void)0 - ; - } - - SPROUT_CXX14_CONSTEXPR iterator - nth(size_type i) { - return i < size() ? begin() + i - : (throw std::out_of_range("valarray<>: index out of range"), iterator()) - ; - } - SPROUT_CONSTEXPR const_iterator - nth(size_type i) const { - return i < size() ? begin() + i - : (throw std::out_of_range("valarray<>: index out of range"), const_iterator()) - ; - } - SPROUT_CXX14_CONSTEXPR size_type - index_of(iterator p) SPROUT_NOEXCEPT { - return impl_.array_.index_of(p); - } - SPROUT_CONSTEXPR size_type - index_of(const_iterator p) const SPROUT_NOEXCEPT { - return impl_.array_.index_of(p); - } - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::valarray::size_type sprout::valarray::static_size; - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::valarray& lhs, sprout::valarray& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - namespace detail { - template - class valarray_construct_access { - public: - template - static SPROUT_CONSTEXPR sprout::valarray - raw_construct(typename sprout::valarray::size_type n, Args&&... args) { - return sprout::valarray(sprout::detail::valarray_raw_construct_t(), n, SPROUT_FORWARD(Args, args)...); - } - }; - - template - struct make_construct_impl; - - template - struct make_construct_impl > { - private: - typedef sprout::valarray copied_type; - public: - template - static SPROUT_CONSTEXPR copied_type - make(Args&&... args) { - typedef sprout::detail::valarray_construct_access access_type; - return access_type::raw_construct(sizeof...(args), SPROUT_FORWARD(Args, args)...); - } - template - static SPROUT_CONSTEXPR copied_type - sized_make(typename copied_type::size_type size, Args&&... args) { - typedef sprout::detail::valarray_construct_access access_type; - return access_type::raw_construct(size, SPROUT_FORWARD(Args, args)...); - } - }; - } // namespace detail - - // - // to_valarray - // - template - inline SPROUT_CONSTEXPR sprout::valarray - to_valarray(sprout::valarray const& arr) - SPROUT_NOEXCEPT_IF(sprout::is_nothrow_copy_constructible::value) - { - return arr; - } - template - inline SPROUT_CONSTEXPR sprout::valarray::type, N> - to_valarray(T (& arr)[N]) - SPROUT_NOEXCEPT_IF(sprout::is_nothrow_copy_constructible::type>::value) - { - return sprout::valarray::type, N>(arr, N); - } - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::valarray - to_valarray_impl(std::array const& arr, sprout::index_tuple) - SPROUT_NOEXCEPT_IF(sprout::is_nothrow_copy_constructible::value) - { - typedef sprout::detail::make_construct_impl > construct_type; - return construct_type::make(arr[Indexes]...); - } - } // namespace detail - template - inline SPROUT_CONSTEXPR sprout::valarray - to_valarray(std::array const& arr) - SPROUT_NOEXCEPT_IF(sprout::is_nothrow_copy_constructible::value) - { - return sprout::detail::to_valarray_impl(arr, sprout::make_index_tuple::make()); - } - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::valarray - to_valarray_impl(sprout::array const& arr, sprout::index_tuple) - SPROUT_NOEXCEPT_IF(sprout::is_nothrow_copy_constructible::value) - { - typedef sprout::detail::make_construct_impl > construct_type; - return construct_type::make(arr[Indexes]...); - } - } // namespace detail - template - inline SPROUT_CONSTEXPR sprout::valarray - to_valarray(sprout::array const& arr) - SPROUT_NOEXCEPT_IF(sprout::is_nothrow_copy_constructible::value) - { - return sprout::detail::to_valarray_impl(arr, sprout::make_index_tuple::make()); - } -} // namespace sprout - -#include - -#endif // #ifndef SPROUT_VALARRAY_VALARRAY_HPP diff --git a/dsp/lib/sprout/sprout/valarray/valarray_fwd.hpp b/dsp/lib/sprout/sprout/valarray/valarray_fwd.hpp deleted file mode 100644 index 7a3931b..0000000 --- a/dsp/lib/sprout/sprout/valarray/valarray_fwd.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VALARRAY_VALARRAY_FWD_HPP -#define SPROUT_VALARRAY_VALARRAY_FWD_HPP - -#include -#include - -namespace sprout { - // - // valarray - // - template - class valarray; - - // - // slice - // - class slice; - // - // slice_array - // - template - class slice_array; - - // - // gslice - // - template - class gslice; - // - // gslice_array - // - template - class gslice_array; - - // - // mask_array - // - template - class mask_array; - - // - // indirect_array - // - template - class indirect_array; - -} // namespace sprout - -#endif // #ifndef SPROUT_VALARRAY_VALARRAY_FWD_HPP diff --git a/dsp/lib/sprout/sprout/variant.hpp b/dsp/lib/sprout/sprout/variant.hpp deleted file mode 100644 index 1e3d6ec..0000000 --- a/dsp/lib/sprout/sprout/variant.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VARIANT_HPP -#define SPROUT_VARIANT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_VARIANT_HPP diff --git a/dsp/lib/sprout/sprout/variant/apply_visitor.hpp b/dsp/lib/sprout/sprout/variant/apply_visitor.hpp deleted file mode 100644 index 7fe39de..0000000 --- a/dsp/lib/sprout/sprout/variant/apply_visitor.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VARIANT_APPLY_VISITOR_HPP -#define SPROUT_VARIANT_APPLY_VISITOR_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // apply_visitor - // - template - inline SPROUT_CONSTEXPR typename sprout::visitor_result< - typename std::remove_reference::type, - typename std::remove_reference::type - >::type - apply_visitor(Visitor&& visitor, Visitable&& visitable) { - return SPROUT_FORWARD(Visitable, visitable).apply_visitor(SPROUT_FORWARD(Visitor, visitor)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_VARIANT_APPLY_VISITOR_HPP diff --git a/dsp/lib/sprout/sprout/variant/as_variant_visitor.hpp b/dsp/lib/sprout/sprout/variant/as_variant_visitor.hpp deleted file mode 100644 index 73f3cef..0000000 --- a/dsp/lib/sprout/sprout/variant/as_variant_visitor.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VARIANT_AS_VARIANT_VISITOR_HPP -#define SPROUT_VARIANT_AS_VARIANT_VISITOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // variant_visitor_wrapper - // - template - class variant_visitor_wrapper - : public sprout::static_variant_visitor - { - public: - typedef Visitor visitor_type; - typedef sprout::value_holder holder_type; - private: - holder_type v_; - public: - SPROUT_CONSTEXPR explicit variant_visitor_wrapper(typename holder_type::param_type v) - : v_(v) - {} - template - SPROUT_CONSTEXPR auto operator()(T&& t) const - -> decltype(std::declval().get()(SPROUT_FORWARD(T, t))) - { - return v_.get()(SPROUT_FORWARD(T, t)); - } - }; - - // - // as_variant_visitor - // - template - inline SPROUT_CONSTEXPR sprout::variant_visitor_wrapper::type>::type> - as_variant_visitor(Visitor&& visitor) { - typedef sprout::variant_visitor_wrapper::type>::type> type; - return type(sprout::lvalue_forward(visitor)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_VARIANT_AS_VARIANT_VISITOR_HPP diff --git a/dsp/lib/sprout/sprout/variant/as_visitor.hpp b/dsp/lib/sprout/sprout/variant/as_visitor.hpp deleted file mode 100644 index a1fc29a..0000000 --- a/dsp/lib/sprout/sprout/variant/as_visitor.hpp +++ /dev/null @@ -1,89 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VARIANT_AS_VISITOR_HPP -#define SPROUT_VARIANT_AS_VISITOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - struct result_type_or_void; - template - struct result_type_or_void< - T, - typename std::enable_if >::value>::type - > { - public: - typedef typename sprout::weak_result_type::result_type type; - }; - template - struct result_type_or_void< - T, - typename std::enable_if >::value>::type - > { - public: - typedef void type; - }; - } // namespace detail - - // - // visitor_wrapper - // - template< - typename Visitor, - typename R = typename sprout::detail::result_type_or_void::type - > - class visitor_wrapper - : public sprout::static_visitor - { - public: - typedef Visitor visitor_type; - typedef sprout::value_holder holder_type; - private: - holder_type v_; - public: - SPROUT_CONSTEXPR explicit visitor_wrapper(typename holder_type::param_type v) - : v_(v) - {} - template - SPROUT_CONSTEXPR auto operator()(T&& t) const - -> decltype(std::declval().get()(SPROUT_FORWARD(T, t))) - { - return v_.get()(SPROUT_FORWARD(T, t)); - } - }; - - // - // as_visitor - // - template - inline SPROUT_CONSTEXPR sprout::visitor_wrapper::type>::type> - as_visitor(Visitor&& visitor) { - typedef sprout::visitor_wrapper::type>::type> type; - return type(sprout::lvalue_forward(visitor)); - } - - template - inline SPROUT_CONSTEXPR sprout::visitor_wrapper::type>::type, R> - as_visitor(Visitor&& visitor) { - typedef sprout::visitor_wrapper::type>::type, R> type; - return type(sprout::lvalue_forward(visitor)); - } -} // namespace sprout - -#endif // #ifndef SPROUT_VARIANT_AS_VISITOR_HPP diff --git a/dsp/lib/sprout/sprout/variant/get.hpp b/dsp/lib/sprout/sprout/variant/get.hpp deleted file mode 100644 index 41c9804..0000000 --- a/dsp/lib/sprout/sprout/variant/get.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VARIANT_GET_HPP -#define SPROUT_VARIANT_GET_HPP - -#include -#include -#include -#include - -namespace sprout { - // - // get - // - template - inline SPROUT_CONSTEXPR T const& - get(sprout::variant const& operand) { - return operand.template get(); - } - template - inline SPROUT_CONSTEXPR T& - get(sprout::variant& operand) { - return operand.template get(); - } -} // namespace sprout - -#endif // #ifndef SPROUT_VARIANT_GET_HPP diff --git a/dsp/lib/sprout/sprout/variant/hash.hpp b/dsp/lib/sprout/sprout/variant/hash.hpp deleted file mode 100644 index 9c26b17..0000000 --- a/dsp/lib/sprout/sprout/variant/hash.hpp +++ /dev/null @@ -1,61 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VARIANT_HASH_HPP -#define SPROUT_VARIANT_HASH_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - class variant_hash_visitor - : public sprout::static_visitor - { - public: - template - SPROUT_CONSTEXPR std::size_t operator()(T const& t) const { - return sprout::to_hash(t); - } - }; - } // namespace detail - // - // hash_value - // - template - inline SPROUT_CONSTEXPR std::size_t - hash_value(sprout::variant const& v) { - return sprout::hash_combine( - sprout::apply_visitor(sprout::detail::variant_hash_visitor(), v), - v.which() - ); - } -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // hash - // - template - struct hash > - : public sprout::hash > - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -#endif // #ifndef SPROUT_VARIANT_HASH_HPP diff --git a/dsp/lib/sprout/sprout/variant/io.hpp b/dsp/lib/sprout/sprout/variant/io.hpp deleted file mode 100644 index ac3beeb..0000000 --- a/dsp/lib/sprout/sprout/variant/io.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VARIANT_IO_HPP -#define SPROUT_VARIANT_IO_HPP - -#include -#include -#include - -namespace sprout { - namespace detail { - template - class variant_output_visitor - : public sprout::static_visitor<> - { - public: - typedef OStream ostream_type; - private: - ostream_type& out_; - public: - explicit variant_output_visitor(ostream_type& out) - : out_(out) - {} - template - SPROUT_CXX14_CONSTEXPR void operator()(T const& operand) const { - out_ << operand; - } - }; - } // namespace detail - // - // operator<< - // - template - inline SPROUT_NON_CONSTEXPR std::basic_ostream& - operator<<(std::basic_ostream& lhs, sprout::variant const& rhs) { - sprout::detail::variant_output_visitor > visitor(lhs); - rhs.apply_visitor(visitor); - return lhs; - } -} // namespace sprout - -#endif // #ifndef SPROUT_VARIANT_IO_HPP diff --git a/dsp/lib/sprout/sprout/variant/static_variant_visitor.hpp b/dsp/lib/sprout/sprout/variant/static_variant_visitor.hpp deleted file mode 100644 index 5eac0f6..0000000 --- a/dsp/lib/sprout/sprout/variant/static_variant_visitor.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VARIANT_STATIC_VARIANT_VISITOR_HPP -#define SPROUT_VARIANT_STATIC_VARIANT_VISITOR_HPP - -#include -#include -#include - -namespace sprout { - // - // static_variant_visitor - // - class static_variant_visitor { - public: - template - struct visitor_result { - public: - typedef sprout::variant::type...> type; - }; - }; -} // namespace sprout - -#endif // #ifndef SPROUT_VARIANT_STATIC_VARIANT_VISITOR_HPP diff --git a/dsp/lib/sprout/sprout/variant/static_visitor.hpp b/dsp/lib/sprout/sprout/variant/static_visitor.hpp deleted file mode 100644 index 97f88c6..0000000 --- a/dsp/lib/sprout/sprout/variant/static_visitor.hpp +++ /dev/null @@ -1,24 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VARIANT_STATIC_VISITOR_HPP -#define SPROUT_VARIANT_STATIC_VISITOR_HPP - -#include - -namespace sprout { - // - // static_visitor - // - template - class static_visitor { - public: - typedef R result_type; - }; -} // namespace sprout - -#endif // #ifndef SPROUT_VARIANT_STATIC_VISITOR_HPP diff --git a/dsp/lib/sprout/sprout/variant/tuple.hpp b/dsp/lib/sprout/sprout/variant/tuple.hpp deleted file mode 100644 index 528469f..0000000 --- a/dsp/lib/sprout/sprout/variant/tuple.hpp +++ /dev/null @@ -1,74 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VARIANT_TUPLE_HPP -#define SPROUT_VARIANT_TUPLE_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - // - // tuple_get - // - template - inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element< - I, - sprout::variant - >::type const& - tuple_get(sprout::variant const& t) { - return t.template get_at(); - } - template - inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element< - I, - sprout::variant - >::type& - tuple_get(sprout::variant& t) { - return t.template get_at(); - } - template - inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element< - I, - sprout::variant - >::type&& - tuple_get(sprout::variant&& t) { - return sprout::move(sprout::tuples::get(t)); - } -} // namespace sprout - -namespace std { -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wmismatched-tags" -#endif - // - // tuple_size - // - template - struct tuple_size > - : public std::tuple_size::tuple_type> - {}; - - // - // tuple_element - // - template - struct tuple_element > - : public sprout::tuples::tuple_element::tuple_type> - {}; -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -} // namespace std - -#endif // #ifndef SPROUT_VARIANT_TUPLE_HPP diff --git a/dsp/lib/sprout/sprout/variant/type_traits.hpp b/dsp/lib/sprout/sprout/variant/type_traits.hpp deleted file mode 100644 index 710f14e..0000000 --- a/dsp/lib/sprout/sprout/variant/type_traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VARIANT_TYPE_TRAITS_HPP -#define SPROUT_VARIANT_TYPE_TRAITS_HPP - -#include -#include -#include - -namespace sprout { - // - // is_variant - // - template - struct is_variant - : public sprout::false_type - {}; - template - struct is_variant - : public sprout::is_variant - {}; - template - struct is_variant - : public sprout::is_variant - {}; - template - struct is_variant > - : public sprout::true_type - {}; - -#if SPROUT_USE_VARIABLE_TEMPLATES - template - SPROUT_STATIC_CONSTEXPR bool is_variant_v = sprout::is_variant::value; -#endif // #if SPROUT_USE_VARIABLE_TEMPLATES -} // namespace sprout - -#endif // #ifndef SPROUT_VARIANT_TYPE_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/variant/variant.hpp b/dsp/lib/sprout/sprout/variant/variant.hpp deleted file mode 100644 index 78be15a..0000000 --- a/dsp/lib/sprout/sprout/variant/variant.hpp +++ /dev/null @@ -1,359 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VARIANT_VARIANT_HPP -#define SPROUT_VARIANT_VARIANT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace detail { - template - class variant_impl { - template - friend class variant; - protected: - typedef sprout::tuples::tuple tuple_type; - typedef sprout::types::type_tuple::type...> decayed_tuple_type; - private: - template - static SPROUT_CONSTEXPR tuple_type init(T&& operand, sprout::index_tuple) { - return sprout::tuples::make( - sprout::tuples::flexibly_construct, - typename sprout::tuples::tuple_element::type()..., - SPROUT_FORWARD(T, operand) - ); - } - protected: - tuple_type tuple_; - int which_; - protected: - SPROUT_CONSTEXPR variant_impl() - : tuple_() - , which_() - {} - template - SPROUT_CONSTEXPR variant_impl(T&& operand, Index) - : tuple_(init(SPROUT_FORWARD(T, operand), sprout::make_index_tuple::make())) - , which_(Index::value) - { - static_assert(Index::value < sizeof...(Types), "variant<>: invalid operand"); - } - public: - SPROUT_CXX14_CONSTEXPR void swap(variant_impl& other) - SPROUT_NOEXCEPT_IF_EXPR(sprout::swap(tuple_, other.tuple_)) - { - sprout::swap(tuple_, other.tuple_); - sprout::swap(which_, other.which_); - } - variant_impl& operator=(variant_impl const&) = default; - }; - } // namespace detail - // - // variant - // - template - class variant - : private sprout::detail::variant_impl - { - private: - typedef sprout::detail::variant_impl impl_type; - typedef typename impl_type::decayed_tuple_type decayed_tuple_type; - public: - typedef typename impl_type::tuple_type tuple_type; - private: - template - struct visitor_result_impl_2; - template - struct visitor_result_impl_2 > - : public Visitor::template visitor_result< - decltype((std::declval())(sprout::tuples::get(std::declval())))... - > - {}; - template - struct visitor_result_impl_1; - template - struct visitor_result_impl_1 > - : public sprout::common_decay< - decltype((std::declval())(sprout::tuples::get(std::declval())))... - > - {}; - template - struct visitor_result_impl; - template - struct visitor_result_impl< - Visitor, Tuple, - typename std::enable_if< - sprout::has_result_type >::value - >::type - > { - public: - typedef typename sprout::weak_result_type::result_type type; - }; - template - struct visitor_result_impl< - Visitor, Tuple, - typename std::enable_if< - sprout::has_visitor_result::value - && !sprout::has_result_type >::value - >::type - > - : public visitor_result_impl_2::type> - {}; - template - struct visitor_result_impl< - Visitor, Tuple, - typename std::enable_if< - !sprout::has_visitor_result::value - && !sprout::has_result_type >::value - >::type - > - : public visitor_result_impl_1::type> - {}; - public: - // visitation support - template - struct visitor_result - : public visitor_result_impl - {}; - template - struct visitor_result - : public visitor_result_impl - {}; - template - struct visitor_result - : public visitor_result_impl - {}; - template - struct visitor_result - : public visitor_result_impl - {}; - private: - template - static SPROUT_CONSTEXPR typename std::enable_if< - I == sizeof...(Types), - bool - >::type eq(tuple_type const&, tuple_type const&, int) { - return false; - } - template - static SPROUT_CONSTEXPR typename std::enable_if< - I != sizeof...(Types), - bool - >::type eq(tuple_type const& l, tuple_type const& r, int which) { - return I == which - ? sprout::tuples::get(l) == sprout::tuples::get(r) - : eq(l, r, which) - ; - } - template - static SPROUT_CONSTEXPR typename std::enable_if< - static_cast(I) == sizeof...(Types), - bool - >::type lt(tuple_type const&, tuple_type const&, int) { - return false; - } - template - static SPROUT_CONSTEXPR typename std::enable_if< - static_cast(I) != sizeof...(Types), - bool - >::type lt(tuple_type const& l, tuple_type const& r, int which) { - return I == which - ? sprout::tuples::get(l) < sprout::tuples::get(r) - : lt(l, r, which) - ; - } - template - static SPROUT_NON_CONSTEXPR typename std::enable_if< - static_cast(I) == sizeof...(Types), - std::basic_ostream& - >::type output(std::basic_ostream& os, tuple_type const&, int) { - return os; - } - template - static SPROUT_NON_CONSTEXPR typename std::enable_if< - static_cast(I) != sizeof...(Types), - std::basic_ostream& - >::type output(std::basic_ostream& os, tuple_type const& t, int which) { - return I == which - ? os << sprout::tuples::get(t) - : output(os, t, which) - ; - } - template - static SPROUT_CONSTEXPR typename std::enable_if< - I == sizeof...(Types) - 1, - Result - >::type visit(Tuple&& t, Visitor&& v, int) { - return SPROUT_FORWARD(Visitor, v)(sprout::tuples::get(SPROUT_FORWARD(Tuple, t))); - } - template - static SPROUT_CONSTEXPR typename std::enable_if< - I != sizeof...(Types) - 1, - Result - >::type visit(Tuple&& t, Visitor&& v, int which) { - return I == which - ? SPROUT_FORWARD(Visitor, v)(sprout::tuples::get(SPROUT_FORWARD(Tuple, t))) - : visit(SPROUT_FORWARD(Tuple, t), SPROUT_FORWARD(Visitor, v), which) - ; - } - private: - using impl_type::tuple_; - using impl_type::which_; - public: - // construct/copy/destruct - SPROUT_CONSTEXPR variant() - : impl_type() - {} - variant(variant const&) = default; - variant(variant&&) = default; - template - SPROUT_CONSTEXPR variant(T&& operand) - : impl_type( - SPROUT_FORWARD(T, operand), - sprout::types::find_index::type>() - ) - {} - // modifiers - SPROUT_CXX14_CONSTEXPR void swap(variant& other) - SPROUT_NOEXCEPT_IF_EXPR(std::declval().swap(other)) - { - impl_type::swap(other); - } - SPROUT_CXX14_CONSTEXPR variant& operator=(variant const& rhs) { - static_cast(*this) = rhs; - return *this; - } - SPROUT_CXX14_CONSTEXPR variant& operator=(variant&& rhs) - SPROUT_NOEXCEPT_IF(std::is_nothrow_move_assignable::value) - { - static_cast(*this) = sprout::move(rhs); - return *this; - } - template - SPROUT_CXX14_CONSTEXPR variant& operator=(T&& rhs) { - static_cast(*this) = variant(SPROUT_FORWARD(T, rhs)); - return *this; - } - // queries - SPROUT_CONSTEXPR int which() const { - return which_; - } - SPROUT_CONSTEXPR bool empty() const { - return false; - } - // relational - friend SPROUT_CONSTEXPR bool operator==(variant const& lhs, variant const& rhs) { - return lhs.which_ == rhs.which_ && eq<0>(lhs.tuple_, rhs.tuple_, lhs.which_); - } - friend SPROUT_CONSTEXPR bool operator!=(variant const& lhs, variant const& rhs) { - return !(lhs == rhs); - } - friend SPROUT_CONSTEXPR bool operator<(variant const& lhs, variant const& rhs) { - return lhs.which_ < rhs.which_ - || (lhs.which_ == rhs.which_ && lt<0>(lhs.tuple_, rhs.tuple_, lhs.which_)) - ; - } - friend SPROUT_CONSTEXPR bool operator>(variant const& lhs, variant const& rhs) { - return rhs < lhs; - } - friend SPROUT_CONSTEXPR bool operator<=(variant const& lhs, variant const& rhs) { - return !(rhs < lhs); - } - friend SPROUT_CONSTEXPR bool operator>=(variant const& lhs, variant const& rhs) { - return !(lhs < rhs); - } - - template - friend SPROUT_NON_CONSTEXPR std::basic_ostream& operator<<(std::basic_ostream& lhs, variant const& rhs) { - return output<0>(lhs, rhs.tuple_, rhs.which_); - } - // get support - template - SPROUT_CONSTEXPR typename std::enable_if< - I != sizeof...(Types), - typename sprout::tuples::tuple_element::type const& - >::type get_at() const { - return (SPROUT_ASSERT(I == which_), true) ? sprout::tuples::get(tuple_) - : sprout::tuples::get(tuple_) - ; - } - template - SPROUT_CXX14_CONSTEXPR typename std::enable_if< - I != sizeof...(Types), - typename sprout::tuples::tuple_element::type& - >::type get_at() { - return (SPROUT_ASSERT(I == which_), true) ? sprout::tuples::get(tuple_) - : sprout::tuples::get(tuple_) - ; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sprout::types::contains::value, - U const& - >::type get() const { - return get_at::value>(); - } - template - SPROUT_CXX14_CONSTEXPR typename std::enable_if< - sprout::types::contains::value, - U& - >::type get() { - return get_at::value>(); - } - // visitation support - template - SPROUT_CONSTEXPR typename visitor_result::type, variant const>::type - apply_visitor(Visitor&& visitor) const { - typedef typename visitor_result::type, variant const>::type result_type; - return SPROUT_ASSERT(0 <= which_ && sprout::math::less(which_, sizeof...(Types))), - visit(tuple_, SPROUT_FORWARD(Visitor, visitor), which_) - ; - } - template - SPROUT_CXX14_CONSTEXPR typename visitor_result::type, variant>::type - apply_visitor(Visitor&& visitor) { - typedef typename visitor_result::type, variant>::type result_type; - return SPROUT_ASSERT(0 <= which_ && sprout::math::less(which_, sizeof...(Types))), - visit(tuple_, SPROUT_FORWARD(Visitor, visitor), which_) - ; - } - }; - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(sprout::variant& lhs, sprout::variant& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } -} // namespace sprout - -#endif // #ifndef SPROUT_VARIANT_VARIANT_HPP diff --git a/dsp/lib/sprout/sprout/variant/variant_fwd.hpp b/dsp/lib/sprout/sprout/variant/variant_fwd.hpp deleted file mode 100644 index 1e71f11..0000000 --- a/dsp/lib/sprout/sprout/variant/variant_fwd.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VARIANT_VARIANT_FWD_HPP -#define SPROUT_VARIANT_VARIANT_FWD_HPP - -#include - -namespace sprout { - template - class variant; -} // namespace sprout - -#endif // #ifndef SPROUT_VARIANT_VARIANT_FWD_HPP diff --git a/dsp/lib/sprout/sprout/variant/visitor_result.hpp b/dsp/lib/sprout/sprout/variant/visitor_result.hpp deleted file mode 100644 index 2a6c533..0000000 --- a/dsp/lib/sprout/sprout/variant/visitor_result.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VARIANT_VISITOR_RESULT_HPP -#define SPROUT_VARIANT_VISITOR_RESULT_HPP - -#include -#include - -namespace sprout { - // - // has_visitor_result - // - SPROUT_HAS_XXX_TEMPLATE_DEF_LAZY(visitor_result); - - namespace detail { - template - struct visitor_result_impl; - template - struct visitor_result_impl< - Visitor, Visitable, - typename std::enable_if::value>::type - > - : public Visitable::template visitor_result - {}; - template - struct visitor_result_impl< - Visitor, Visitable, - typename std::enable_if::value>::type - > { - public: - typedef typename Visitor::result_type type; - }; - } // namespace detail - // - // visitor_result - // - template - struct visitor_result - : public sprout::detail::visitor_result_impl - {}; -} // namespace sprout - -#endif // #ifndef SPROUT_VARIANT_VISITOR_RESULT_HPP diff --git a/dsp/lib/sprout/sprout/version.hpp b/dsp/lib/sprout/sprout/version.hpp deleted file mode 100644 index f201f34..0000000 --- a/dsp/lib/sprout/sprout/version.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_VERSION_HPP -#define SPROUT_VERSION_HPP - -#include - -// -// SPROUT_VERSION_YYYYMMDD -// (yyyyMMdd) -// -#define SPROUT_VERSION_YYYYMMDD 20190107 - -#endif // #ifndef SPROUT_VERSION_HPP diff --git a/dsp/lib/sprout/sprout/weed.hpp b/dsp/lib/sprout/sprout/weed.hpp deleted file mode 100644 index 5366dfa..0000000 --- a/dsp/lib/sprout/sprout/weed.hpp +++ /dev/null @@ -1,24 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_HPP -#define SPROUT_WEED_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_WEED_HPP diff --git a/dsp/lib/sprout/sprout/weed/attr_cnv.hpp b/dsp/lib/sprout/sprout/weed/attr_cnv.hpp deleted file mode 100644 index ff08247..0000000 --- a/dsp/lib/sprout/sprout/weed/attr_cnv.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_ATTR_CNV_HPP -#define SPROUT_WEED_ATTR_CNV_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_WEED_ATTR_CNV_HPP diff --git a/dsp/lib/sprout/sprout/weed/attr_cnv/bitwise_or.hpp b/dsp/lib/sprout/sprout/weed/attr_cnv/bitwise_or.hpp deleted file mode 100644 index 1d3659e..0000000 --- a/dsp/lib/sprout/sprout/weed/attr_cnv/bitwise_or.hpp +++ /dev/null @@ -1,157 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_ATTR_CNV_BITWISE_OR_HPP -#define SPROUT_WEED_ATTR_CNV_BITWISE_OR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace attr_cnv { - // - // bitwise_or - // - // container | container -> container - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::detail::is_same_container::value, - typename sprout::weed::attr_cnv::results::bitwise_or::type - >::type bitwise_or(X const& x) { - typedef typename sprout::weed::attr_cnv::results::bitwise_or::type type; - return sprout::fixed::realign_to(x); - } - // container | V -> container - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::detail::is_container_and_elem::value - && sprout::weed::traits::is_container::value, - typename sprout::weed::attr_cnv::results::bitwise_or::type - >::type bitwise_or(X const& x) { - typedef typename sprout::weed::attr_cnv::results::bitwise_or::type type; - return sprout::fixed::realign_to(x); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::detail::is_container_and_elem::value - && !sprout::weed::traits::is_container::value, - typename sprout::weed::attr_cnv::results::bitwise_or::type - >::type bitwise_or(X const& x) { - typedef typename sprout::weed::attr_cnv::results::bitwise_or::type type; - return sprout::make(x); - } - // V | container -> container - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::detail::is_elem_and_container::value - && sprout::weed::traits::is_container::value, - typename sprout::weed::attr_cnv::results::bitwise_or::type - >::type bitwise_or(X const& x) { - typedef typename sprout::weed::attr_cnv::results::bitwise_or::type type; - return sprout::fixed::realign_to(x); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::detail::is_elem_and_container::value - && !sprout::weed::traits::is_container::value, - typename sprout::weed::attr_cnv::results::bitwise_or::type - >::type bitwise_or(X const& x) { - typedef typename sprout::weed::attr_cnv::results::bitwise_or::type type; - return sprout::make(x); - } - // tuple | tuple -> tuple - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::detail::is_both_tuple::value, - typename sprout::weed::attr_cnv::results::bitwise_or::type - >::type bitwise_or(X const& x) { - typedef typename sprout::weed::attr_cnv::results::bitwise_or::type type; - return sprout::tuples::copy(type(), x); - } - // V | V -> V - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::detail::is_same_elem::value, - typename sprout::weed::attr_cnv::results::bitwise_or::type - >::type bitwise_or(X const& x) { - return x; - } - // V | W -> variant - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::detail::is_different_elem::value, - typename sprout::weed::attr_cnv::results::bitwise_or::type - >::type bitwise_or(X const& x) { - return typename sprout::weed::attr_cnv::results::bitwise_or::type(x); - } - // V | unused -> container - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::detail::is_elem_and_unused::value - && !sprout::weed::traits::is_unused::value, - typename sprout::weed::attr_cnv::results::bitwise_or::type - >::type bitwise_or(X const& x) { - typedef typename sprout::weed::attr_cnv::results::bitwise_or::type type; - return sprout::make(x); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::detail::is_elem_and_unused::value - && sprout::weed::traits::is_unused::value, - typename sprout::weed::attr_cnv::results::bitwise_or::type - >::type bitwise_or(X const&) { - typedef typename sprout::weed::attr_cnv::results::bitwise_or::type type; - return sprout::make(); - } - // unused | V -> container - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::detail::is_unused_and_elem::value - && !sprout::weed::traits::is_unused::value, - typename sprout::weed::attr_cnv::results::bitwise_or::type - >::type bitwise_or(X const& x) { - typedef typename sprout::weed::attr_cnv::results::bitwise_or::type type; - return sprout::make(x); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::detail::is_unused_and_elem::value - && sprout::weed::traits::is_unused::value, - typename sprout::weed::attr_cnv::results::bitwise_or::type - >::type bitwise_or(X const&) { - typedef typename sprout::weed::attr_cnv::results::bitwise_or::type type; - return sprout::make(); - } - // unused | unused -> unused - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::detail::is_both_unused::value, - typename sprout::weed::attr_cnv::results::bitwise_or::type - >::type bitwise_or(X const&) { - return sprout::weed::unused(); - } - } // namespace attr_cnv - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_ATTR_CNV_BITWISE_OR_HPP diff --git a/dsp/lib/sprout/sprout/weed/attr_cnv/mem_ptr.hpp b/dsp/lib/sprout/sprout/weed/attr_cnv/mem_ptr.hpp deleted file mode 100644 index 3755412..0000000 --- a/dsp/lib/sprout/sprout/weed/attr_cnv/mem_ptr.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_ATTR_CNV_MEM_PTR_HPP -#define SPROUT_WEED_ATTR_CNV_MEM_PTR_HPP - -#include -#include - -namespace sprout { - namespace weed { - namespace attr_cnv { - // - // mem_ptr - // - template - inline SPROUT_CONSTEXPR typename sprout::weed::attr_cnv::results::mem_ptr::type - mem_ptr(T const& t, U const& u) { - return u(t); - } - } // namespace attr_cnv - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_ATTR_CNV_MEM_PTR_HPP diff --git a/dsp/lib/sprout/sprout/weed/attr_cnv/modulus.hpp b/dsp/lib/sprout/sprout/weed/attr_cnv/modulus.hpp deleted file mode 100644 index ec61503..0000000 --- a/dsp/lib/sprout/sprout/weed/attr_cnv/modulus.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_ATTR_CNV_MODULUS_HPP -#define SPROUT_WEED_ATTR_CNV_MODULUS_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace attr_cnv { - // - // modulus - // - template - inline SPROUT_CONSTEXPR typename sprout::weed::attr_cnv::results::modulus::type - modulus(Args const&... args) { - return sprout::weed::attr_cnv::times(args...); - } - } // namespace attr_cnv - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_ATTR_CNV_MODULUS_HPP diff --git a/dsp/lib/sprout/sprout/weed/attr_cnv/negate.hpp b/dsp/lib/sprout/sprout/weed/attr_cnv/negate.hpp deleted file mode 100644 index 0c80a02..0000000 --- a/dsp/lib/sprout/sprout/weed/attr_cnv/negate.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_ATTR_CNV_NEGATE_HPP -#define SPROUT_WEED_ATTR_CNV_NEGATE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace attr_cnv { - // - // negate - // - // !unused -> unused - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::traits::is_unused::value, - typename sprout::weed::attr_cnv::results::negate::type - >::type negate(T const&, bool) { - return sprout::weed::unused(); - } - } // namespace attr_cnv - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_ATTR_CNV_NEGATE_HPP diff --git a/dsp/lib/sprout/sprout/weed/attr_cnv/results.hpp b/dsp/lib/sprout/sprout/weed/attr_cnv/results.hpp deleted file mode 100644 index 9a137c6..0000000 --- a/dsp/lib/sprout/sprout/weed/attr_cnv/results.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_ATTR_CNV_RESULTS_HPP -#define SPROUT_WEED_ATTR_CNV_RESULTS_HPP - -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_WEED_ATTR_CNV_RESULTS_HPP diff --git a/dsp/lib/sprout/sprout/weed/attr_cnv/results/bitwise_or.hpp b/dsp/lib/sprout/sprout/weed/attr_cnv/results/bitwise_or.hpp deleted file mode 100644 index f83a84c..0000000 --- a/dsp/lib/sprout/sprout/weed/attr_cnv/results/bitwise_or.hpp +++ /dev/null @@ -1,167 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_ATTR_CNV_RESULTS_BITWISE_OR_HPP -#define SPROUT_WEED_ATTR_CNV_RESULTS_BITWISE_OR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace attr_cnv { - namespace results { - // - // bitwise_or - // - template - struct bitwise_or; - // container | container -> container - template - struct bitwise_or< - T, - U, - typename std::enable_if< - sprout::weed::detail::is_same_container::value - >::type - > - : public std::conditional< - !(sprout::tuples::tuple_size::value < sprout::tuples::tuple_size::value), - T, - U - > - {}; - // container | V -> container - template - struct bitwise_or< - T, - U, - typename std::enable_if< - sprout::weed::detail::is_container_and_elem::value - >::type - > - : public std::conditional< - sprout::container_traits::static_size != 0, - T, - typename sprout::container_transform_traits::template rebind_size<1>::type - > - {}; - // V | container -> container - template - struct bitwise_or< - T, - U, - typename std::enable_if< - sprout::weed::detail::is_elem_and_container::value - >::type - > - : public std::conditional< - sprout::container_traits::static_size != 0, - U, - typename sprout::container_transform_traits::template rebind_size<1>::type - > - {}; - // tuple | tuple -> tuple - template - struct bitwise_or< - T, - U, - typename std::enable_if< - sprout::weed::detail::is_both_tuple::value - >::type - > - : public std::conditional< - !(sprout::tuples::tuple_size::value < sprout::tuples::tuple_size::value), - T, - U - > - {}; - // V | V -> V - template - struct bitwise_or< - T, - U, - typename std::enable_if< - sprout::weed::detail::is_same_elem::value - >::type - > - : public sprout::identity - {}; - // V | W -> variant - template - struct bitwise_or< - T, - U, - typename std::enable_if< - sprout::weed::detail::is_different_elem::value - >::type - > - : public sprout::identity > - {}; - // V | unused -> container - template - struct bitwise_or< - T, - U, - typename std::enable_if< - sprout::weed::detail::is_elem_and_unused::value - >::type - > - : public std::conditional< - sprout::weed::traits::is_char_type::value, - sprout::basic_string, - sprout::array - > - {}; - // unused | V -> container - template - struct bitwise_or< - T, - U, - typename std::enable_if< - sprout::weed::detail::is_unused_and_elem::value - >::type - > - : public std::conditional< - sprout::weed::traits::is_char_type::value, - sprout::basic_string, - sprout::array - > - {}; - // unused | unused -> unused - template - struct bitwise_or< - T, - U, - typename std::enable_if< - sprout::weed::detail::is_both_unused::value - >::type - > - : public sprout::identity - {}; - } // namespace results - } // namespace attr_cnv - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_ATTR_CNV_RESULTS_BITWISE_OR_HPP diff --git a/dsp/lib/sprout/sprout/weed/attr_cnv/results/mem_ptr.hpp b/dsp/lib/sprout/sprout/weed/attr_cnv/results/mem_ptr.hpp deleted file mode 100644 index 39f03dd..0000000 --- a/dsp/lib/sprout/sprout/weed/attr_cnv/results/mem_ptr.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_ATTR_CNV_RESULTS_MEM_PTR_HPP -#define SPROUT_WEED_ATTR_CNV_RESULTS_MEM_PTR_HPP - -#include -#include - -namespace sprout { - namespace weed { - namespace attr_cnv { - namespace results { - // - // mem_ptr - // - template - struct mem_ptr - : public sprout::result_of - {}; - } // namespace results - } // namespace attr_cnv - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_ATTR_CNV_RESULTS_MEM_PTR_HPP diff --git a/dsp/lib/sprout/sprout/weed/attr_cnv/results/modulus.hpp b/dsp/lib/sprout/sprout/weed/attr_cnv/results/modulus.hpp deleted file mode 100644 index 261e4f0..0000000 --- a/dsp/lib/sprout/sprout/weed/attr_cnv/results/modulus.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_ATTR_CNV_RESULTS_MODULUS_HPP -#define SPROUT_WEED_ATTR_CNV_RESULTS_MODULUS_HPP - -#include -#include -#include - -namespace sprout { - namespace weed { - namespace attr_cnv { - namespace results { - // - // modulus - // - template - struct modulus - : public sprout::weed::attr_cnv::results::times - {}; - } // namespace results - } // namespace attr_cnv - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_ATTR_CNV_RESULTS_MODULUS_HPP diff --git a/dsp/lib/sprout/sprout/weed/attr_cnv/results/negate.hpp b/dsp/lib/sprout/sprout/weed/attr_cnv/results/negate.hpp deleted file mode 100644 index 423453c..0000000 --- a/dsp/lib/sprout/sprout/weed/attr_cnv/results/negate.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_ATTR_CNV_RESULTS_NEGATE_HPP -#define SPROUT_WEED_ATTR_CNV_RESULTS_NEGATE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace attr_cnv { - namespace results { - // - // negate - // - template - struct negate; - // -unused -> unused - template - struct negate< - T, - typename std::enable_if< - sprout::weed::traits::is_unused::value - >::type - > - : public sprout::identity - {}; - } // namespace results - } // namespace attr_cnv - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_ATTR_CNV_RESULTS_NEGATE_HPP diff --git a/dsp/lib/sprout/sprout/weed/attr_cnv/results/shift_left.hpp b/dsp/lib/sprout/sprout/weed/attr_cnv/results/shift_left.hpp deleted file mode 100644 index a373769..0000000 --- a/dsp/lib/sprout/sprout/weed/attr_cnv/results/shift_left.hpp +++ /dev/null @@ -1,175 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_ATTR_CNV_RESULTS_SHIFT_LEFT_HPP -#define SPROUT_WEED_ATTR_CNV_RESULTS_SHIFT_LEFT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace attr_cnv { - namespace results { - // - // shift_left - // - template - struct shift_left; - // container >> container -> container - template - struct shift_left< - T, - U, - typename std::enable_if< - sprout::weed::detail::is_same_container::value - >::type - > - : public sprout::fixed::results::append_back - {}; - // container >> V -> container - template - struct shift_left< - T, - U, - typename std::enable_if< - sprout::weed::detail::is_container_and_elem::value - >::type - > - : public sprout::fixed::results::push_back - {}; - // V >> container -> container - template - struct shift_left< - T, - U, - typename std::enable_if< - sprout::weed::detail::is_elem_and_container::value - >::type - > - : public sprout::fixed::results::push_front - {}; - // tuple >> tuple -> tuple - template - struct shift_left< - T, - U, - typename std::enable_if< - sprout::weed::detail::is_both_tuple::value - >::type - > - : public sprout::tuples::results::append_back - {}; - // tuple >> V -> tuple - template - struct shift_left< - T, - U, - typename std::enable_if< - sprout::weed::detail::is_tuple_and_elem::value - >::type - > - : public sprout::tuples::results::push_back - {}; - // V >> tuple -> tuple - template - struct shift_left< - T, - U, - typename std::enable_if< - sprout::weed::detail::is_elem_and_tuple::value - >::type - > - : public sprout::tuples::results::push_front - {}; - // V >> V -> container - template - struct shift_left< - T, - U, - typename std::enable_if< - sprout::weed::detail::is_same_elem::value - >::type - > - : public std::conditional< - sprout::weed::traits::is_char_type::value, - sprout::basic_string, - sprout::array - > - {}; - // V >> W -> tuple - template - struct shift_left< - T, - U, - typename std::enable_if< - sprout::weed::detail::is_different_elem::value - >::type - > - : public sprout::identity > - {}; - // V >> unused -> V - template - struct shift_left< - T, - U, - typename std::enable_if< - sprout::weed::detail::is_elem_and_unused::value - >::type - > - : public sprout::identity - {}; - // unused >> V -> V - template - struct shift_left< - T, - U, - typename std::enable_if< - sprout::weed::detail::is_unused_and_elem::value - >::type - > - : public sprout::identity - {}; - // unused >> unused -> unused - template - struct shift_left< - T, - U, - typename std::enable_if< - sprout::weed::detail::is_both_unused::value - >::type - > - : public sprout::identity - {}; - } // namespace results - } // namespace attr_cnv - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_ATTR_CNV_RESULTS_SHIFT_LEFT_HPP diff --git a/dsp/lib/sprout/sprout/weed/attr_cnv/results/times.hpp b/dsp/lib/sprout/sprout/weed/attr_cnv/results/times.hpp deleted file mode 100644 index dabe708..0000000 --- a/dsp/lib/sprout/sprout/weed/attr_cnv/results/times.hpp +++ /dev/null @@ -1,79 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_ATTR_CNV_RESULTS_TIMES_HPP -#define SPROUT_WEED_ATTR_CNV_RESULTS_TIMES_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace attr_cnv { - namespace results { - // - // times - // - template - struct times; - // times(container) -> container - template - struct times< - Limit, - T, - typename std::enable_if< - Limit != std::size_t(-1) - && sprout::weed::traits::is_container::value - >::type - > - : public sprout::algorithm::results::join< - sprout::array - > - {}; - // times(V) -> container - template - struct times< - Limit, - T, - typename std::enable_if< - Limit != std::size_t(-1) - && !sprout::weed::traits::is_container::value - && !sprout::weed::traits::is_unused::value - >::type - > - : public std::conditional< - sprout::weed::traits::is_char_type::value, - sprout::basic_string, - sprout::array - > - {}; - // times(unused) -> unused - template - struct times< - Limit, - T, - typename std::enable_if< - sprout::weed::traits::is_unused::value - >::type - > - : public sprout::identity - {}; - } // namespace results - } // namespace attr_cnv - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_ATTR_CNV_RESULTS_TIMES_HPP diff --git a/dsp/lib/sprout/sprout/weed/attr_cnv/shift_left.hpp b/dsp/lib/sprout/sprout/weed/attr_cnv/shift_left.hpp deleted file mode 100644 index 4bf3c47..0000000 --- a/dsp/lib/sprout/sprout/weed/attr_cnv/shift_left.hpp +++ /dev/null @@ -1,132 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_ATTR_CNV_SHIFT_LEFT_HPP -#define SPROUT_WEED_ATTR_CNV_SHIFT_LEFT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace attr_cnv { - // - // shift_left - // - // container >> container -> container - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::detail::is_same_container::value, - typename sprout::weed::attr_cnv::results::shift_left::type - >::type shift_left(T const& t, U const& u) { - return sprout::fixed::append_back(t, u); - } - // container >> V -> container - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::detail::is_container_and_elem::value, - typename sprout::weed::attr_cnv::results::shift_left::type - >::type shift_left(T const& t, U const& u) { - return sprout::fixed::push_back(t, u); - } - // V >> container -> container - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::detail::is_elem_and_container::value, - typename sprout::weed::attr_cnv::results::shift_left::type - >::type shift_left(T const& t, U const& u) { - return sprout::fixed::push_front(u, t); - } - // tuple >> tuple -> tuple - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::detail::is_both_tuple::value, - typename sprout::weed::attr_cnv::results::shift_left::type - >::type shift_left(T const& t, U const& u) { - return sprout::tuples::append_back(t, u); - } - // tuple >> V -> tuple - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::detail::is_tuple_and_elem::value, - typename sprout::weed::attr_cnv::results::shift_left::type - >::type shift_left(T const& t, U const& u) { - return sprout::tuples::push_back(t, u); - } - // V >> tuple -> tuple - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::detail::is_elem_and_tuple::value, - typename sprout::weed::attr_cnv::results::shift_left::type - >::type shift_left(T const& t, U const& u) { - return sprout::tuples::push_front(u, t); - } - // V >> V -> container - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::detail::is_same_elem::value, - typename sprout::weed::attr_cnv::results::shift_left::type - >::type shift_left(T const& t, U const& u) { - typedef typename sprout::weed::attr_cnv::results::shift_left::type type; - return sprout::make(t, u); - } - // V >> W -> tuple - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::detail::is_different_elem::value, - typename sprout::weed::attr_cnv::results::shift_left::type - >::type shift_left(T const& t, U const& u) { - return typename sprout::weed::attr_cnv::results::shift_left::type(t, u); - } - // V >> unused -> V - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::detail::is_elem_and_unused::value, - typename sprout::weed::attr_cnv::results::shift_left::type - >::type shift_left(T const& t, U const&) { - return t; - } - // unused >> V -> V - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::detail::is_unused_and_elem::value, - typename sprout::weed::attr_cnv::results::shift_left::type - >::type shift_left(T const&, U const& u) { - return u; - } - // unused >> unused -> unused - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::detail::is_both_unused::value, - typename sprout::weed::attr_cnv::results::shift_left::type - >::type shift_left(T const&, U const&) { - return sprout::weed::unused(); - } - } // namespace attr_cnv - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_ATTR_CNV_SHIFT_LEFT_HPP diff --git a/dsp/lib/sprout/sprout/weed/attr_cnv/times.hpp b/dsp/lib/sprout/sprout/weed/attr_cnv/times.hpp deleted file mode 100644 index 92e38d4..0000000 --- a/dsp/lib/sprout/sprout/weed/attr_cnv/times.hpp +++ /dev/null @@ -1,60 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_ATTR_CNV_TIMES_HPP -#define SPROUT_WEED_ATTR_CNV_TIMES_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace attr_cnv { - // - // times - // - // times(container) -> container - template - static SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::traits::is_container::value, - typename sprout::weed::attr_cnv::results::times::type - >::type times(Args const&... args) { - return sprout::algorithm::join( - sprout::make >(args...) - ); - } - // times(V) -> container - template - static SPROUT_CONSTEXPR typename std::enable_if< - !sprout::weed::traits::is_container::value - && !sprout::weed::traits::is_unused::value, - typename sprout::weed::attr_cnv::results::times::type - >::type times(Args const&... args) { - typedef typename sprout::weed::attr_cnv::results::times::type type; - return sprout::make(args...); - } - // times(unused) -> unused - template - static SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::traits::is_unused::value, - typename sprout::weed::attr_cnv::results::times::type - >::type times(Args const&...) { - return sprout::weed::unused(); - } - } // namespace attr_cnv - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_ATTR_CNV_TIMES_HPP diff --git a/dsp/lib/sprout/sprout/weed/context.hpp b/dsp/lib/sprout/sprout/weed/context.hpp deleted file mode 100644 index fcf175b..0000000 --- a/dsp/lib/sprout/sprout/weed/context.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_CONTEXT_HPP -#define SPROUT_WEED_CONTEXT_HPP - -#include -#include - -#endif // #ifndef SPROUT_WEED_CONTEXT_HPP diff --git a/dsp/lib/sprout/sprout/weed/context/parse_context.hpp b/dsp/lib/sprout/sprout/weed/context/parse_context.hpp deleted file mode 100644 index 95b65b0..0000000 --- a/dsp/lib/sprout/sprout/weed/context/parse_context.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_HPP -#define SPROUT_WEED_CONTEXT_PARSE_CONTEXT_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_HPP diff --git a/dsp/lib/sprout/sprout/weed/context/parse_context/operator.hpp b/dsp/lib/sprout/sprout/weed/context/parse_context/operator.hpp deleted file mode 100644 index 7fc55cb..0000000 --- a/dsp/lib/sprout/sprout/weed/context/parse_context/operator.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_OPERATOR_HPP -#define SPROUT_WEED_CONTEXT_PARSE_CONTEXT_OPERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_OPERATOR_HPP diff --git a/dsp/lib/sprout/sprout/weed/context/parse_context/operator/address_of.hpp b/dsp/lib/sprout/sprout/weed/context/parse_context/operator/address_of.hpp deleted file mode 100644 index 44f0bd9..0000000 --- a/dsp/lib/sprout/sprout/weed/context/parse_context/operator/address_of.hpp +++ /dev/null @@ -1,58 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_OPERATOR_ADDRESS_OF_HPP -#define SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_OPERATOR_ADDRESS_OF_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // parse_context::eval - // - template - template - struct parse_context::eval< - Expr, - typename std::enable_if< - std::is_same< - typename sprout::weed::traits::tag_of::type, - sprout::weed::tag::address_of - >::value - >::type - > { - private: - typedef sprout::weed::parse_context context_type; - public: - typedef sprout::weed::unused attribute_type; - typedef sprout::weed::eval_result result_type; - public: - SPROUT_CONSTEXPR result_type operator()( - Expr const& expr, - context_type const& ctx - ) const - { - return sprout::weed::eval(sprout::tuples::get<0>(expr.args()), ctx).success() - ? result_type(true, ctx.begin(), attribute_type(), ctx) - : result_type(false, ctx.begin(), attribute_type(), ctx) - ; - } - }; - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_OPERATOR_ADDRESS_OF_HPP diff --git a/dsp/lib/sprout/sprout/weed/context/parse_context/operator/bitwise_or.hpp b/dsp/lib/sprout/sprout/weed/context/parse_context/operator/bitwise_or.hpp deleted file mode 100644 index 01b4460..0000000 --- a/dsp/lib/sprout/sprout/weed/context/parse_context/operator/bitwise_or.hpp +++ /dev/null @@ -1,105 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_OPERATOR_BITWISE_OR_HPP -#define SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_OPERATOR_BITWISE_OR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // parse_context::eval - // - template - template - struct parse_context::eval< - Expr, - typename std::enable_if< - std::is_same< - typename sprout::weed::traits::tag_of::type, - sprout::weed::tag::bitwise_or - >::value - >::type - > { - private: - typedef sprout::weed::parse_context context_type; - typedef typename sprout::tuples::tuple_element<0, typename Expr::args_type>::type expr1_type; - typedef typename sprout::tuples::tuple_element<1, typename Expr::args_type>::type expr2_type; - typedef typename sprout::weed::traits::attribute_of::type attr1_type; - typedef typename sprout::weed::traits::attribute_of::type attr2_type; - public: - typedef typename sprout::weed::attr_cnv::results::bitwise_or< - typename sprout::weed::traits::attribute_of::type, - typename sprout::weed::traits::attribute_of::type - >::type attribute_type; - typedef sprout::weed::eval_result result_type; - private: - template - SPROUT_CONSTEXPR result_type call_2( - typename Expr::args_type const&, - context_type const& ctx, - Result2 const& res - ) const - { - return res.success() - ? result_type( - true, - res.current(), - sprout::weed::attr_cnv::bitwise_or(res.attr()), - context_type(ctx, res.current()) - ) - : result_type(false, ctx.begin(), attribute_type(), ctx) - ; - } - template - SPROUT_CONSTEXPR result_type call_1( - typename Expr::args_type const& args, - context_type const& ctx, - Result1 const& res - ) const - { - return res.success() - ? result_type( - true, - res.current(), - sprout::weed::attr_cnv::bitwise_or(res.attr()), - context_type(ctx, res.current()) - ) - : call_2(args, ctx, sprout::weed::eval(sprout::tuples::get<1>(args), ctx)) - ; - } - SPROUT_CONSTEXPR result_type call( - typename Expr::args_type const& args, - context_type const& ctx - ) const - { - return call_1(args, ctx, sprout::weed::eval(sprout::tuples::get<0>(args), ctx)); - } - public: - SPROUT_CONSTEXPR result_type operator()( - Expr const& expr, - context_type const& ctx - ) const - { - return call(expr.args(), ctx); - } - }; - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_OPERATOR_BITWISE_OR_HPP diff --git a/dsp/lib/sprout/sprout/weed/context/parse_context/operator/dereference.hpp b/dsp/lib/sprout/sprout/weed/context/parse_context/operator/dereference.hpp deleted file mode 100644 index 9f1909f..0000000 --- a/dsp/lib/sprout/sprout/weed/context/parse_context/operator/dereference.hpp +++ /dev/null @@ -1,225 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_OPERATOR_DEREFERENCE_HPP -#define SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_OPERATOR_DEREFERENCE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // parse_context::eval - // - template - template - struct parse_context::eval< - Expr, - typename std::enable_if< - std::is_same< - typename sprout::weed::traits::tag_of::type, - sprout::weed::tag::dereference - >::value - >::type - > { - private: - typedef sprout::weed::parse_context context_type; - typedef typename sprout::tuples::tuple_element<0, typename Expr::args_type>::type expr_type; - typedef typename sprout::weed::traits::limit_of::type limit; - typedef typename sprout::weed::traits::attribute_of::type attr_type; - public: - typedef typename sprout::weed::attr_cnv::results::times< - limit::value, - typename sprout::weed::traits::attribute_of::type - >::type attribute_type; - typedef sprout::weed::eval_result result_type; - private: - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Attrs) + 1 == limit::value, - result_type - >::type call( - expr_type const& expr, - context_type const& ctx, - sprout::weed::limited::category limited_category, - Result const& res, - Head const& head, - Attrs const&... attrs - ) const - { - return res.success() - ? limited_category == sprout::weed::limited::discard - ? call( - expr, - res.ctx(), - limited_category, - sprout::weed::eval(expr, res.ctx()), - head, - attrs... - ) - : call( - expr, - res.ctx(), - limited_category, - sprout::weed::eval(expr, res.ctx()), - attrs..., - res.attr() - ) - : result_type( - true, - ctx.begin(), - sprout::weed::attr_cnv::times(head, attrs...), - ctx - ) - ; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Attrs) + 2 == limit::value, - result_type - >::type call( - expr_type const& expr, - context_type const& ctx, - sprout::weed::limited::category limited_category, - Result const& res, - Head const& head, - Attrs const&... attrs - ) const - { - return res.success() - ? limited_category != sprout::weed::limited::stopover - ? call( - expr, - res.ctx(), - limited_category, - sprout::weed::eval(expr, res.ctx()), - head, - attrs..., - res.attr() - ) - : result_type( - true, - res.current(), - sprout::weed::attr_cnv::times(head, attrs..., res.attr()), - res.ctx() - ) - : result_type( - true, - ctx.begin(), - sprout::weed::attr_cnv::times(head, attrs...), - ctx - ) - ; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - (sizeof...(Attrs) + 2 < limit::value), - result_type - >::type call( - expr_type const& expr, - context_type const& ctx, - sprout::weed::limited::category limited_category, - Result const& res, - Head const& head, - Attrs const&... attrs - ) const - { - return res.success() - ? call( - expr, - res.ctx(), - limited_category, - sprout::weed::eval(expr, res.ctx()), - head, - attrs..., - res.attr() - ) - : result_type( - true, - ctx.begin(), - sprout::weed::attr_cnv::times(head, attrs...), - ctx - ) - ; - } - template - SPROUT_CONSTEXPR result_type call_inf( - expr_type const& expr, - context_type const& ctx, - Result const& res - ) const - { - return res.success() - ? call_inf(expr, res.ctx(), sprout::weed::eval(expr, res.ctx())) - : result_type(true, ctx.begin(), attribute_type(), ctx) - ; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - Infinity, - result_type - >::type call( - expr_type const& expr, - context_type const& ctx, - Result const& res - ) const - { - return res.success() - ? call_inf(expr, res.ctx(), sprout::weed::eval(expr, res.ctx())) - : result_type(true, ctx.begin(), attribute_type(), ctx) - ; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - !Infinity, - result_type - >::type call( - expr_type const& expr, - context_type const& ctx, - Result const& res - ) const - { - return res.success() - ? call( - expr, - res.ctx(), - sprout::tuples::get<0>(expr.args()).limited_category(), - sprout::weed::eval(expr, res.ctx()), - res.attr() - ) - : result_type(true, ctx.begin(), attribute_type(), ctx) - ; - } - public: - SPROUT_CONSTEXPR result_type operator()( - Expr const& expr, - context_type const& ctx - ) const - { - return call( - sprout::tuples::get<0>(expr.args()), - ctx, - sprout::weed::eval(sprout::tuples::get<0>(expr.args()), ctx) - ); - } - }; - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_OPERATOR_DEREFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/weed/context/parse_context/operator/logical_not.hpp b/dsp/lib/sprout/sprout/weed/context/parse_context/operator/logical_not.hpp deleted file mode 100644 index bada413..0000000 --- a/dsp/lib/sprout/sprout/weed/context/parse_context/operator/logical_not.hpp +++ /dev/null @@ -1,58 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_OPERATOR_LOGICAL_NOT_HPP -#define SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_OPERATOR_LOGICAL_NOT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // parse_context::eval - // - template - template - struct parse_context::eval< - Expr, - typename std::enable_if< - std::is_same< - typename sprout::weed::traits::tag_of::type, - sprout::weed::tag::logical_not - >::value - >::type - > { - private: - typedef sprout::weed::parse_context context_type; - public: - typedef sprout::weed::unused attribute_type; - typedef sprout::weed::eval_result result_type; - public: - SPROUT_CONSTEXPR result_type operator()( - Expr const& expr, - context_type const& ctx - ) const - { - return !sprout::weed::eval(sprout::tuples::get<0>(expr.args()), ctx).success() - ? result_type(true, ctx.begin(), attribute_type(), ctx) - : result_type(false, ctx.begin(), attribute_type(), ctx) - ; - } - }; - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_OPERATOR_LOGICAL_NOT_HPP diff --git a/dsp/lib/sprout/sprout/weed/context/parse_context/operator/mem_ptr.hpp b/dsp/lib/sprout/sprout/weed/context/parse_context/operator/mem_ptr.hpp deleted file mode 100644 index 358cf2a..0000000 --- a/dsp/lib/sprout/sprout/weed/context/parse_context/operator/mem_ptr.hpp +++ /dev/null @@ -1,88 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_OPERATOR_MEM_PTR_HPP -#define SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_OPERATOR_MEM_PTR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // parse_context::eval - // - template - template - struct parse_context::eval< - Expr, - typename std::enable_if< - std::is_same< - typename sprout::weed::traits::tag_of::type, - sprout::weed::tag::mem_ptr - >::value - >::type - > { - private: - typedef sprout::weed::parse_context context_type; - typedef typename sprout::tuples::tuple_element<0, typename Expr::args_type>::type expr1_type; - typedef typename sprout::tuples::tuple_element<1, typename Expr::args_type>::type expr2_type; - public: - typedef typename sprout::weed::attr_cnv::results::mem_ptr< - typename sprout::weed::traits::attribute_of::type, - typename sprout::tuples::tuple_element<0, typename expr2_type::args_type>::type - >::type attribute_type; - typedef sprout::weed::eval_result result_type; - private: - template - SPROUT_CONSTEXPR result_type call_1( - typename Expr::args_type const& args, - context_type const& ctx, - Result1 const& res - ) const - { - return res.success() - ? result_type( - true, - res.current(), - sprout::weed::attr_cnv::mem_ptr( - res.attr(), sprout::tuples::get<0>(sprout::tuples::get<1>(args).args()) - ), - context_type(ctx, res.current()) - ) - : result_type(false, ctx.begin(), attribute_type(), ctx) - ; - } - SPROUT_CONSTEXPR result_type call( - typename Expr::args_type const& args, - context_type const& ctx - ) const - { - return call_1(args, ctx, sprout::weed::eval(sprout::tuples::get<0>(args), ctx)); - } - public: - SPROUT_CONSTEXPR result_type operator()( - Expr const& expr, - context_type const& ctx - ) const - { - return call(expr.args(), ctx); - } - }; - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_OPERATOR_MEM_PTR_HPP diff --git a/dsp/lib/sprout/sprout/weed/context/parse_context/operator/minus.hpp b/dsp/lib/sprout/sprout/weed/context/parse_context/operator/minus.hpp deleted file mode 100644 index 17b0158..0000000 --- a/dsp/lib/sprout/sprout/weed/context/parse_context/operator/minus.hpp +++ /dev/null @@ -1,76 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_OPERATOR_MINUS_HPP -#define SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_OPERATOR_MINUS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // parse_context::eval - // - template - template - struct parse_context::eval< - Expr, - typename std::enable_if< - std::is_same< - typename sprout::weed::traits::tag_of::type, - sprout::weed::tag::minus - >::value - >::type - > { - private: - typedef sprout::weed::parse_context context_type; - typedef typename sprout::tuples::tuple_element<0, typename Expr::args_type>::type expr1_type; - typedef typename sprout::tuples::tuple_element<1, typename Expr::args_type>::type expr2_type; - public: - typedef typename sprout::weed::traits::attribute_of::type attribute_type; - typedef sprout::weed::eval_result result_type; - private: - template - SPROUT_CONSTEXPR result_type call_1( - typename Expr::args_type const& args, - context_type const& ctx, - Result1 const& res - ) const - { - return res.success() && !sprout::weed::eval(sprout::tuples::get<1>(args), ctx).success() - ? res - : result_type(false, ctx.begin(), attribute_type(), ctx) - ; - } - SPROUT_CONSTEXPR result_type call( - typename Expr::args_type const& args, - context_type const& ctx - ) const - { - return call_1(args, ctx, sprout::weed::eval(sprout::tuples::get<0>(args), ctx)); - } - public: - SPROUT_CONSTEXPR result_type operator()( - Expr const& expr, - context_type const& ctx - ) const - { - return call(expr.args(), ctx); - } - }; - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_OPERATOR_MINUS_HPP diff --git a/dsp/lib/sprout/sprout/weed/context/parse_context/operator/modulus.hpp b/dsp/lib/sprout/sprout/weed/context/parse_context/operator/modulus.hpp deleted file mode 100644 index 68d5854..0000000 --- a/dsp/lib/sprout/sprout/weed/context/parse_context/operator/modulus.hpp +++ /dev/null @@ -1,277 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_OPERATOR_MODULUS_HPP -#define SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_OPERATOR_MODULUS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // parse_context::eval - // - template - template - struct parse_context::eval< - Expr, - typename std::enable_if< - std::is_same< - typename sprout::weed::traits::tag_of::type, - sprout::weed::tag::modulus - >::value - >::type - > { - private: - typedef sprout::weed::parse_context context_type; - typedef typename sprout::tuples::tuple_element<0, typename Expr::args_type>::type expr1_type; - typedef typename sprout::tuples::tuple_element<1, typename Expr::args_type>::type expr2_type; - typedef typename sprout::weed::traits::limit_of::type limit; - typedef typename sprout::weed::traits::attribute_of::type attr_type; - public: - typedef typename sprout::weed::attr_cnv::results::modulus< - limit::value, - typename sprout::weed::traits::attribute_of::type - >::type attribute_type; - typedef sprout::weed::eval_result result_type; - private: - template - SPROUT_CONSTEXPR result_type call_1( - expr1_type const& expr1, - expr2_type const& expr2, - context_type const& ctx, - sprout::weed::limited::category limited_category, - Result const& res, - Attrs const&... attrs - ) const - { - return res.success() - ? call( - expr1, - expr2, - res.ctx(), - limited_category, - sprout::weed::eval(expr1, res.ctx()), - attrs... - ) - : result_type( - true, - ctx.begin(), - sprout::weed::attr_cnv::modulus(attrs...), - ctx - ) - ; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Attrs) + 1 == limit::value, - result_type - >::type call( - expr1_type const& expr1, - expr2_type const& expr2, - context_type const& ctx, - sprout::weed::limited::category limited_category, - Result const& res, - Head const& head, - Attrs const&... attrs - ) const - { - return res.success() - ? limited_category == sprout::weed::limited::discard - ? call_1( - expr1, - expr2, - res.ctx(), - limited_category, - sprout::weed::eval(expr2, res.ctx()), - head, - attrs... - ) - : call_1( - expr1, - expr2, - res.ctx(), - limited_category, - sprout::weed::eval(expr2, res.ctx()), - attrs..., - res.attr() - ) - : result_type( - true, - ctx.begin(), - sprout::weed::attr_cnv::modulus(head, attrs...), - ctx - ) - ; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Attrs) + 2 == limit::value, - result_type - >::type call( - expr1_type const& expr1, - expr2_type const& expr2, - context_type const& ctx, - sprout::weed::limited::category limited_category, - Result const& res, - Head const& head, - Attrs const&... attrs - ) const - { - return res.success() - ? limited_category != sprout::weed::limited::stopover - ? call_1( - expr1, - expr2, - res.ctx(), - limited_category, - sprout::weed::eval(expr2, res.ctx()), - head, - attrs..., - res.attr() - ) - : result_type( - true, - res.current(), - sprout::weed::attr_cnv::modulus(head, attrs..., res.attr()), - res.ctx() - ) - : result_type( - true, - ctx.begin(), - sprout::weed::attr_cnv::modulus(head, attrs...), - ctx - ) - ; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - (sizeof...(Attrs) + 2 < limit::value), - result_type - >::type call( - expr1_type const& expr1, - expr2_type const& expr2, - context_type const& ctx, - sprout::weed::limited::category limited_category, - Result const& res, - Head const& head, - Attrs const&... attrs - ) const - { - return res.success() - ? call_1( - expr1, - expr2, - res.ctx(), - limited_category, - sprout::weed::eval(expr2, res.ctx()), - head, - attrs..., - res.attr() - ) - : result_type( - true, - ctx.begin(), - sprout::weed::attr_cnv::modulus(head, attrs...), - ctx - ) - ; - } - template - SPROUT_CONSTEXPR result_type call_inf_1( - expr1_type const& expr1, - expr2_type const& expr2, - context_type const& ctx, - Result const& res - ) const - { - return res.success() - ? call_inf(expr1, expr2, res.ctx(), sprout::weed::eval(expr1, res.ctx())) - : result_type(true, ctx.begin(), attribute_type(), ctx) - ; - } - template - SPROUT_CONSTEXPR result_type call_inf( - expr1_type const& expr1, - expr2_type const& expr2, - context_type const& ctx, - Result const& res - ) const - { - return res.success() - ? call_inf_1(expr1, expr2, res.ctx(), sprout::weed::eval(expr2, res.ctx())) - : result_type(true, ctx.begin(), attribute_type(), ctx) - ; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - Infinity, - result_type - >::type call( - expr1_type const& expr1, - expr2_type const& expr2, - context_type const& ctx, - Result const& res - ) const - { - return res.success() - ? call_inf_1(expr1, expr2, res.ctx(), sprout::weed::eval(expr2, res.ctx())) - : result_type(false, ctx.begin(), attribute_type(), ctx) - ; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - !Infinity, - result_type - >::type call( - expr1_type const& expr1, - expr2_type const& expr2, - context_type const& ctx, - Result const& res - ) const - { - return res.success() - ? call_1( - expr1, - expr2, - res.ctx(), - sprout::tuples::get<0>(expr1.args()).limited_category(), - sprout::weed::eval(expr2, res.ctx()), res.attr() - ) - : result_type(false, ctx.begin(), attribute_type(), ctx) - ; - } - public: - SPROUT_CONSTEXPR result_type operator()( - Expr const& expr, - context_type const& ctx - ) const - { - return call( - sprout::tuples::get<0>(expr.args()), - sprout::tuples::get<1>(expr.args()), - ctx, - sprout::weed::eval(sprout::tuples::get<0>(expr.args()), ctx) - ); - } - }; - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_OPERATOR_MODULUS_HPP diff --git a/dsp/lib/sprout/sprout/weed/context/parse_context/operator/negate.hpp b/dsp/lib/sprout/sprout/weed/context/parse_context/operator/negate.hpp deleted file mode 100644 index ef44f7b..0000000 --- a/dsp/lib/sprout/sprout/weed/context/parse_context/operator/negate.hpp +++ /dev/null @@ -1,73 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_OPERATOR_NEGATE_HPP -#define SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_OPERATOR_NEGATE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // parse_context::eval - // - template - template - struct parse_context::eval< - Expr, - typename std::enable_if< - std::is_same< - typename sprout::weed::traits::tag_of::type, - sprout::weed::tag::negate - >::value - >::type - > { - private: - typedef sprout::weed::parse_context context_type; - typedef typename sprout::tuples::tuple_element<0, typename Expr::args_type>::type expr_type; - public: - typedef typename sprout::weed::attr_cnv::results::negate< - typename sprout::weed::traits::attribute_of::type - >::type attribute_type; - typedef sprout::weed::eval_result result_type; - private: - template - SPROUT_CONSTEXPR result_type call( - context_type const& ctx, - Result const& res - ) const - { - return result_type( - true, - res.current(), - sprout::weed::attr_cnv::negate(res.attr(), res.success()), - res.success() ? context_type(ctx, res.current()) : ctx - ); - } - public: - SPROUT_CONSTEXPR result_type operator()( - Expr const& expr, - context_type const& ctx - ) const - { - return call(ctx, sprout::weed::eval(sprout::tuples::get<0>(expr.args()), ctx)); - } - }; - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_OPERATOR_NEGATE_HPP diff --git a/dsp/lib/sprout/sprout/weed/context/parse_context/operator/shift_left.hpp b/dsp/lib/sprout/sprout/weed/context/parse_context/operator/shift_left.hpp deleted file mode 100644 index eceaf8a..0000000 --- a/dsp/lib/sprout/sprout/weed/context/parse_context/operator/shift_left.hpp +++ /dev/null @@ -1,104 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_OPERATOR_SHIFT_LEFT_HPP -#define SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_OPERATOR_SHIFT_LEFT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // parse_context::eval - // - template - template - struct parse_context::eval< - Expr, - typename std::enable_if< - std::is_same< - typename sprout::weed::traits::tag_of::type, - sprout::weed::tag::shift_left - >::value - >::type - > { - private: - typedef sprout::weed::parse_context context_type; - typedef typename sprout::tuples::tuple_element<0, typename Expr::args_type>::type expr1_type; - typedef typename sprout::tuples::tuple_element<1, typename Expr::args_type>::type expr2_type; - public: - typedef typename sprout::weed::attr_cnv::results::shift_left< - typename sprout::weed::traits::attribute_of::type, - typename sprout::weed::traits::attribute_of::type - >::type attribute_type; - typedef sprout::weed::eval_result result_type; - private: - template - SPROUT_CONSTEXPR result_type call_2( - typename Expr::args_type const&, - context_type const& ctx, - Attr1 const& attr, - Result2 const& res - ) const - { - return res.success() - ? result_type( - true, - res.current(), - sprout::weed::attr_cnv::shift_left(attr, res.attr()), - context_type(ctx, res.current()) - ) - : result_type(false, ctx.begin(), attribute_type(), ctx) - ; - } - template - SPROUT_CONSTEXPR result_type call_1( - typename Expr::args_type const& args, - context_type const& ctx, - Result1 const& res - ) const - { - return res.success() - ? call_2( - args, - ctx, - res.attr(), - sprout::weed::eval(sprout::tuples::get<1>(args), context_type(ctx, res.current())) - ) - : result_type(false, ctx.begin(), attribute_type(), ctx) - ; - } - SPROUT_CONSTEXPR result_type call( - typename Expr::args_type const& args, - context_type const& ctx - ) const - { - return call_1(args, ctx, sprout::weed::eval(sprout::tuples::get<0>(args), ctx)); - } - public: - SPROUT_CONSTEXPR result_type operator()( - Expr const& expr, - context_type const& ctx - ) const - { - return call(expr.args(), ctx); - } - }; - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_OPERATOR_SHIFT_LEFT_HPP diff --git a/dsp/lib/sprout/sprout/weed/context/parse_context/operator/unary_plus.hpp b/dsp/lib/sprout/sprout/weed/context/parse_context/operator/unary_plus.hpp deleted file mode 100644 index 9b00c45..0000000 --- a/dsp/lib/sprout/sprout/weed/context/parse_context/operator/unary_plus.hpp +++ /dev/null @@ -1,225 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_OPERATOR_UNARY_PLUS_HPP -#define SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_OPERATOR_UNARY_PLUS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // parse_context::eval - // - template - template - struct parse_context::eval< - Expr, - typename std::enable_if< - std::is_same< - typename sprout::weed::traits::tag_of::type, - sprout::weed::tag::unary_plus - >::value - >::type - > { - private: - typedef sprout::weed::parse_context context_type; - typedef typename sprout::tuples::tuple_element<0, typename Expr::args_type>::type expr_type; - typedef typename sprout::weed::traits::limit_of::type limit; - typedef typename sprout::weed::traits::attribute_of::type attr_type; - public: - typedef typename sprout::weed::attr_cnv::results::times< - limit::value, - typename sprout::weed::traits::attribute_of::type - >::type attribute_type; - typedef sprout::weed::eval_result result_type; - private: - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Attrs) + 1 == limit::value, - result_type - >::type call( - expr_type const& expr, - context_type const& ctx, - sprout::weed::limited::category limited_category, - Result const& res, - Head const& head, - Attrs const&... attrs - ) const - { - return res.success() - ? limited_category == sprout::weed::limited::discard - ? call( - expr, - res.ctx(), - limited_category, - sprout::weed::eval(expr, res.ctx()), - head, - attrs... - ) - : call( - expr, - res.ctx(), - limited_category, - sprout::weed::eval(expr, res.ctx()), - attrs..., - res.attr() - ) - : result_type( - true, - ctx.begin(), - sprout::weed::attr_cnv::times(head, attrs...), - ctx - ) - ; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Attrs) + 2 == limit::value, - result_type - >::type call( - expr_type const& expr, - context_type const& ctx, - sprout::weed::limited::category limited_category, - Result const& res, - Head const& head, - Attrs const&... attrs - ) const - { - return res.success() - ? limited_category != sprout::weed::limited::stopover - ? call( - expr, - res.ctx(), - limited_category, - sprout::weed::eval(expr, res.ctx()), - head, - attrs..., - res.attr() - ) - : result_type( - true, - res.current(), - sprout::weed::attr_cnv::times(head, attrs..., res.attr()), - res.ctx() - ) - : result_type( - true, - ctx.begin(), - sprout::weed::attr_cnv::times(head, attrs...), - ctx - ) - ; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - (sizeof...(Attrs) + 2 < limit::value), - result_type - >::type call( - expr_type const& expr, - context_type const& ctx, - sprout::weed::limited::category limited_category, - Result const& res, - Head const& head, - Attrs const&... attrs - ) const - { - return res.success() - ? call( - expr, - res.ctx(), - limited_category, - sprout::weed::eval(expr, res.ctx()), - head, - attrs..., - res.attr() - ) - : result_type( - true, - ctx.begin(), - sprout::weed::attr_cnv::times(head, attrs...), - ctx - ) - ; - } - template - SPROUT_CONSTEXPR result_type call_inf( - expr_type const& expr, - context_type const& ctx, - Result const& res - ) const - { - return res.success() - ? call_inf(expr, res.ctx(), sprout::weed::eval(expr, res.ctx())) - : result_type(true, ctx.begin(), attribute_type(), ctx) - ; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - Infinity, - result_type - >::type call( - expr_type const& expr, - context_type const& ctx, - Result const& res - ) const - { - return res.success() - ? call_inf(expr, res.ctx(), sprout::weed::eval(expr, res.ctx())) - : result_type(false, ctx.begin(), attribute_type(), ctx) - ; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - !Infinity, - result_type - >::type call( - expr_type const& expr, - context_type const& ctx, - Result const& res - ) const - { - return res.success() - ? call( - expr, - res.ctx(), - sprout::tuples::get<0>(expr.args()).limited_category(), - sprout::weed::eval(expr, res.ctx()), - res.attr() - ) - : result_type(false, ctx.begin(), attribute_type(), ctx) - ; - } - public: - SPROUT_CONSTEXPR result_type operator()( - Expr const& expr, - context_type const& ctx - ) const - { - return call( - sprout::tuples::get<0>(expr.args()), - ctx, - sprout::weed::eval(sprout::tuples::get<0>(expr.args()), ctx) - ); - } - }; - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_OPERATOR_UNARY_PLUS_HPP diff --git a/dsp/lib/sprout/sprout/weed/context/parse_context/terminal.hpp b/dsp/lib/sprout/sprout/weed/context/parse_context/terminal.hpp deleted file mode 100644 index f5a066d..0000000 --- a/dsp/lib/sprout/sprout/weed/context/parse_context/terminal.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_HPP -#define SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_HPP diff --git a/dsp/lib/sprout/sprout/weed/context/parse_context/terminal/char_type.hpp b/dsp/lib/sprout/sprout/weed/context/parse_context/terminal/char_type.hpp deleted file mode 100644 index ffc7c08..0000000 --- a/dsp/lib/sprout/sprout/weed/context/parse_context/terminal/char_type.hpp +++ /dev/null @@ -1,69 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_CHAR_TYPE_HPP -#define SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_CHAR_TYPE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // parse_context::eval - // - template - template - struct parse_context::eval< - Expr, - typename std::enable_if< - std::is_same< - typename sprout::weed::traits::tag_of::type, - sprout::weed::tag::terminal - >::value - && sprout::weed::traits::is_char_type< - typename sprout::tuples::tuple_element<0, typename Expr::args_type>::type - >::value - >::type - > { - private: - typedef sprout::weed::parse_context context_type; - public: - typedef sprout::weed::unused attribute_type; - typedef sprout::weed::eval_result result_type; - public: - SPROUT_CONSTEXPR result_type operator()( - Expr const& expr, - context_type const& ctx - ) const - { - typedef typename std::iterator_traits::value_type elem_type; - return ctx.begin() != ctx.end() - && *ctx.begin() == elem_type(sprout::tuples::get<0>(expr.args())) - ? result_type( - true, - sprout::next(ctx.begin()), - attribute_type(), - context_type(ctx, sprout::next(ctx.begin())) - ) - : result_type(false, ctx.begin(), attribute_type(), ctx) - ; - } - }; - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_CHAR_TYPE_HPP diff --git a/dsp/lib/sprout/sprout/weed/context/parse_context/terminal/parser.hpp b/dsp/lib/sprout/sprout/weed/context/parse_context/terminal/parser.hpp deleted file mode 100644 index 76fcaa2..0000000 --- a/dsp/lib/sprout/sprout/weed/context/parse_context/terminal/parser.hpp +++ /dev/null @@ -1,83 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_PARSER_HPP -#define SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_PARSER_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // parse_context::eval - // - template - template - struct parse_context::eval< - Expr, - typename std::enable_if< - std::is_same< - typename sprout::weed::traits::tag_of::type, - sprout::weed::tag::terminal - >::value - && sprout::weed::traits::is_parser< - typename sprout::tuples::tuple_element<0, typename Expr::args_type>::type - >::value - && !sprout::weed::traits::is_char_type< - typename sprout::tuples::tuple_element<0, typename Expr::args_type>::type - >::value - && !sprout::weed::traits::is_string< - typename sprout::tuples::tuple_element<0, typename Expr::args_type>::type - >::value - >::type - > { - private: - typedef sprout::weed::parse_context context_type; - typedef typename sprout::tuples::tuple_element<0, typename Expr::args_type>::type parser_type; - public: - typedef typename sprout::weed::traits::attribute_of< - parser_type, - Iterator, - context_type - >::type attribute_type; - typedef sprout::weed::eval_result result_type; - private: - template - SPROUT_CONSTEXPR result_type call( - Result const& res, - context_type const& ctx - ) const - { - return result_type(res, context_type(ctx, res.current())); - } - public: - SPROUT_CONSTEXPR result_type operator()( - Expr const& expr, - context_type const& ctx - ) const - { - return call( - sprout::tuples::get<0>(expr.args()) - .template operator()(ctx.begin(), ctx.end(), ctx), - ctx - ); - } - }; - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_PARSER_HPP diff --git a/dsp/lib/sprout/sprout/weed/context/parse_context/terminal/string.hpp b/dsp/lib/sprout/sprout/weed/context/parse_context/terminal/string.hpp deleted file mode 100644 index 648259f..0000000 --- a/dsp/lib/sprout/sprout/weed/context/parse_context/terminal/string.hpp +++ /dev/null @@ -1,80 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_STRING_HPP -#define SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_STRING_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // parse_context::eval - // - template - template - struct parse_context::eval< - Expr, - typename std::enable_if< - std::is_same< - typename sprout::weed::traits::tag_of::type, - sprout::weed::tag::terminal - >::value - && sprout::weed::traits::is_string< - typename sprout::tuples::tuple_element<0, typename Expr::args_type>::type - >::value - >::type - > { - private: - typedef sprout::weed::parse_context context_type; - public: - typedef sprout::weed::unused attribute_type; - typedef sprout::weed::eval_result result_type; - private: - template - SPROUT_CONSTEXPR result_type call( - Arg const& arg, - context_type const& ctx - ) const - { - return sprout::distance(ctx.begin(), ctx.end()) >= sprout::size(arg) - && sprout::equal(sprout::begin(arg), sprout::end(arg), ctx.begin()) - ? result_type( - true, - sprout::next(ctx.begin(), sprout::size(arg)), - attribute_type(), - context_type(ctx, sprout::next(ctx.begin(), sprout::size(arg))) - ) - : result_type(false, ctx.begin(), attribute_type(), ctx) - ; - } - public: - SPROUT_CONSTEXPR result_type operator()( - Expr const& expr, - context_type const& ctx - ) const - { - return call(sprout::tuples::get<0>(expr.args()), ctx); - } - }; - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_TERMINAL_STRING_HPP diff --git a/dsp/lib/sprout/sprout/weed/context/parse_context_fwd.hpp b/dsp/lib/sprout/sprout/weed/context/parse_context_fwd.hpp deleted file mode 100644 index 5fcda69..0000000 --- a/dsp/lib/sprout/sprout/weed/context/parse_context_fwd.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_FWD_HPP -#define SPROUT_WEED_CONTEXT_PARSE_CONTEXT_FWD_HPP - -#include - -namespace sprout { - namespace weed { - // - // parse_context - // - template - class parse_context { - public: - template - struct eval; - private: - Iterator first_; - Iterator last_; - public: - SPROUT_CONSTEXPR parse_context(Iterator first, Iterator last) - : first_(first) - , last_(last) - {} - SPROUT_CONSTEXPR parse_context(parse_context const& other, Iterator current) - : first_(current) - , last_(other.last_) - {} - SPROUT_CONSTEXPR Iterator begin() const { - return first_; - } - SPROUT_CONSTEXPR Iterator end() const { - return last_; - } - SPROUT_CONSTEXPR bool empty() const { - return first_ == last_; - } - }; - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_CONTEXT_PARSE_CONTEXT_FWD_HPP diff --git a/dsp/lib/sprout/sprout/weed/detail/bdigits.hpp b/dsp/lib/sprout/sprout/weed/detail/bdigits.hpp deleted file mode 100644 index 4b474fd..0000000 --- a/dsp/lib/sprout/sprout/weed/detail/bdigits.hpp +++ /dev/null @@ -1,78 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_DETAIL_BDIGITS_HPP -#define SPROUT_WEED_DETAIL_BDIGITS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace detail { - SPROUT_LITERAL_STRING_DEF(bdigits, "01", 2); - - template - struct bvalues; - -# define SPROUT_WEED_BDIGITS_TABLE_DEF \ - {{0, 1}} - - template - struct bvalues { - public: - typedef sprout::array value_type; - public: - SPROUT_STATIC_CONSTEXPR value_type value - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(SPROUT_WEED_BDIGITS_TABLE_DEF) - ; - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::weed::detail::bvalues::value_type - sprout::weed::detail::bvalues::value - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(SPROUT_WEED_BDIGITS_TABLE_DEF) - ; - -# undef SPROUT_WEED_BDIGITS_TABLE_DEF - - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple bvalue_at(std::size_t i) { - return i < 2 - ? sprout::tuples::tuple( - static_cast(sprout::weed::detail::bvalues::value[i]), - true - ) - : sprout::tuples::tuple( - IntType(), - false - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple from_bdigit(Elem c) { - return sprout::weed::detail::bvalue_at( - sprout::distance( - sprout::weed::detail::bdigits::value.begin(), - sprout::find( - sprout::weed::detail::bdigits::value.begin(), - sprout::weed::detail::bdigits::value.end(), - c - ) - ) - ); - } - } // namespace detail - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_DETAIL_BDIGITS_HPP diff --git a/dsp/lib/sprout/sprout/weed/detail/c_str_as_string.hpp b/dsp/lib/sprout/sprout/weed/detail/c_str_as_string.hpp deleted file mode 100644 index e84dda4..0000000 --- a/dsp/lib/sprout/sprout/weed/detail/c_str_as_string.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_DETAIL_C_STR_AS_STRING_HPP -#define SPROUT_WEED_DETAIL_C_STR_AS_STRING_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace detail { - template - struct c_str_as_string - : public sprout::identity - {}; - template - struct c_str_as_string - : public sprout::weed::detail::c_str_as_string - {}; - template - struct c_str_as_string - : public sprout::weed::detail::c_str_as_string - {}; - template - struct c_str_as_string - : public sprout::weed::detail::c_str_as_string - {}; - template - struct c_str_as_string - : public sprout::identity > - {}; - template - struct c_str_as_string - : public sprout::identity > - {}; - template - struct c_str_as_string - : public sprout::identity > - {}; - template - struct c_str_as_string - : public sprout::identity > - {}; - } // namespace detail - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_DETAIL_C_STR_AS_STRING_HPP diff --git a/dsp/lib/sprout/sprout/weed/detail/digits.hpp b/dsp/lib/sprout/sprout/weed/detail/digits.hpp deleted file mode 100644 index 72f5790..0000000 --- a/dsp/lib/sprout/sprout/weed/detail/digits.hpp +++ /dev/null @@ -1,78 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_DETAIL_DIGITS_HPP -#define SPROUT_WEED_DETAIL_DIGITS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace detail { - SPROUT_LITERAL_STRING_DEF(digits, "0123456789", 10); - - template - struct values; - -# define SPROUT_WEED_DIGITS_TABLE_DEF \ - {{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}} - - template - struct values { - public: - typedef sprout::array value_type; - public: - SPROUT_STATIC_CONSTEXPR value_type value - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(SPROUT_WEED_DIGITS_TABLE_DEF) - ; - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::weed::detail::values::value_type - sprout::weed::detail::values::value - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(SPROUT_WEED_DIGITS_TABLE_DEF) - ; - -# undef SPROUT_WEED_DIGITS_TABLE_DEF - - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple value_at(std::size_t i) { - return i < 10 - ? sprout::tuples::tuple( - static_cast(sprout::weed::detail::values::value[i]), - true - ) - : sprout::tuples::tuple( - IntType(), - false - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple from_digit(Elem c) { - return sprout::weed::detail::value_at( - sprout::distance( - sprout::weed::detail::digits::value.begin(), - sprout::find( - sprout::weed::detail::digits::value.begin(), - sprout::weed::detail::digits::value.end(), - c - ) - ) - ); - } - } // namespace detail - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_DETAIL_DIGITS_HPP diff --git a/dsp/lib/sprout/sprout/weed/detail/find_character_set.hpp b/dsp/lib/sprout/sprout/weed/detail/find_character_set.hpp deleted file mode 100644 index 154b467..0000000 --- a/dsp/lib/sprout/sprout/weed/detail/find_character_set.hpp +++ /dev/null @@ -1,120 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_DETAIL_FIND_CHARACTER_SET_HPP -#define SPROUT_WEED_DETAIL_FIND_CHARACTER_SET_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace detail { - template - inline SPROUT_CONSTEXPR RandomAccessIterator - find_character_set_impl_ra( - RandomAccessIterator const& first, RandomAccessIterator const& last, T const& value, - typename std::iterator_traits::difference_type pivot, RandomAccessIterator const& found - ) - { - return found != first ? found - : pivot == 0 ? ( - *first == SPROUT_CHAR_LITERAL('-', T) ? *sprout::prev(first) <= value && *sprout::next(first) >= value - : *first == value - ) ? first : last - : sprout::weed::detail::find_character_set_impl_ra( - sprout::next(first, pivot), last, value, - (sprout::distance(first, last) - pivot) / 2, - sprout::weed::detail::find_character_set_impl_ra( - first, sprout::next(first, pivot), value, - pivot / 2, - first - ) - ) - ; - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::is_constant_distance_iterator::value, - RandomAccessIterator - >::type - find_character_set( - RandomAccessIterator const& first, RandomAccessIterator const& last, T const& value, - std::random_access_iterator_tag* - ) - { - return first == last ? last - : sprout::weed::detail::find_character_set_impl_ra(first, last, value, sprout::distance(first, last) / 2, first) - ; - } - - template - inline SPROUT_CONSTEXPR sprout::pair - find_character_set_impl_1( - sprout::pair const& current, - BidirectionalIterator const& last, T const& value, typename std::iterator_traits::difference_type n - ) - { - typedef sprout::pair type; - return current.second || current.first == last ? current - : n == 1 ? ( - *current.first == SPROUT_CHAR_LITERAL('-', T) ? *sprout::prev(current.first) <= value && *sprout::next(current.first) >= value - : *current.first == value - ) ? type(current.first, true) : type(sprout::next(current.first), false) - : sprout::weed::detail::find_character_set_impl_1( - sprout::weed::detail::find_character_set_impl_1( - current, - last, value, n / 2 - ), - last, value, n - n / 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::pair - find_character_set_impl( - sprout::pair const& current, - BidirectionalIterator const& last, T const& value, typename std::iterator_traits::difference_type n - ) - { - return current.second || current.first == last ? current - : sprout::weed::detail::find_character_set_impl( - sprout::weed::detail::find_character_set_impl_1( - current, - last, value, n - ), - last, value, n * 2 - ) - ; - } - template - inline SPROUT_CONSTEXPR BidirectionalIterator - find_character_set( - BidirectionalIterator const& first, BidirectionalIterator const& last, T const& value, - std::input_iterator_tag* - ) - { - typedef sprout::pair type; - return sprout::weed::detail::find_character_set_impl(type(first, false), last, value, 1).first; - } - - template - inline SPROUT_CONSTEXPR BidirectionalIterator - find_character_set(BidirectionalIterator const& first, BidirectionalIterator const& last, T const& value) { - typedef typename std::iterator_traits::iterator_category* category; - return sprout::weed::detail::find_character_set(first, last, value, category()); - } - } // namespace detail - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_DETAIL_FIND_CHARACTER_SET_HPP diff --git a/dsp/lib/sprout/sprout/weed/detail/is_both_tuple.hpp b/dsp/lib/sprout/sprout/weed/detail/is_both_tuple.hpp deleted file mode 100644 index 73add4f..0000000 --- a/dsp/lib/sprout/sprout/weed/detail/is_both_tuple.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_DETAIL_IS_BOTH_TUPLE_HPP -#define SPROUT_WEED_DETAIL_IS_BOTH_TUPLE_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace detail { - template - struct is_both_tuple - : public sprout::false_type - {}; - template - struct is_both_tuple< - T, - U, - typename std::enable_if< - sprout::weed::traits::is_tuple::value - && sprout::weed::traits::is_tuple::value - >::type - > - : public sprout::true_type - {}; - } // namespace detail - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_DETAIL_IS_BOTH_TUPLE_HPP diff --git a/dsp/lib/sprout/sprout/weed/detail/is_both_unused.hpp b/dsp/lib/sprout/sprout/weed/detail/is_both_unused.hpp deleted file mode 100644 index ce0f0f4..0000000 --- a/dsp/lib/sprout/sprout/weed/detail/is_both_unused.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_DETAIL_IS_BOTH_UNUSED_HPP -#define SPROUT_WEED_DETAIL_IS_BOTH_UNUSED_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace detail { - template - struct is_both_unused - : public sprout::false_type - {}; - template - struct is_both_unused< - T, - U, - typename std::enable_if< - sprout::weed::traits::is_unused::value - && sprout::weed::traits::is_unused::value - >::type - > - : public sprout::true_type - {}; - } // namespace detail - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_DETAIL_IS_BOTH_UNUSED_HPP diff --git a/dsp/lib/sprout/sprout/weed/detail/is_container_and_elem.hpp b/dsp/lib/sprout/sprout/weed/detail/is_container_and_elem.hpp deleted file mode 100644 index 061311e..0000000 --- a/dsp/lib/sprout/sprout/weed/detail/is_container_and_elem.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_DETAIL_IS_CONTAINER_AND_ELEM_HPP -#define SPROUT_WEED_DETAIL_IS_CONTAINER_AND_ELEM_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace detail { - template - struct is_container_and_elem - : public sprout::false_type - {}; - template - struct is_container_and_elem< - T, - U, - typename std::enable_if< - sprout::weed::traits::is_container::value - && std::is_same< - typename T::value_type, - U - >::value - >::type - > - : public sprout::true_type - {}; - } // namespace detail - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_DETAIL_IS_CONTAINER_AND_ELEM_HPP diff --git a/dsp/lib/sprout/sprout/weed/detail/is_different_elem.hpp b/dsp/lib/sprout/sprout/weed/detail/is_different_elem.hpp deleted file mode 100644 index 4e46afc..0000000 --- a/dsp/lib/sprout/sprout/weed/detail/is_different_elem.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_DETAIL_IS_DIFFERENT_ELEM_HPP -#define SPROUT_WEED_DETAIL_IS_DIFFERENT_ELEM_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace detail { - template - struct is_different_elem - : public sprout::false_type - {}; - template - struct is_different_elem< - T, - U, - typename std::enable_if< - !std::is_same::value - && !is_same_container::value - && !is_container_and_elem::value - && !is_elem_and_container::value - && !is_both_tuple::value - && !is_tuple_and_elem::value - && !is_elem_and_tuple::value - && !sprout::weed::traits::is_unused::value - && !sprout::weed::traits::is_unused::value - >::type - > - : public sprout::true_type - {}; - } // namespace detail - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_DETAIL_IS_DIFFERENT_ELEM_HPP diff --git a/dsp/lib/sprout/sprout/weed/detail/is_elem_and_container.hpp b/dsp/lib/sprout/sprout/weed/detail/is_elem_and_container.hpp deleted file mode 100644 index 885ebb1..0000000 --- a/dsp/lib/sprout/sprout/weed/detail/is_elem_and_container.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_DETAIL_IS_ELEM_AND_CONTAINER_HPP -#define SPROUT_WEED_DETAIL_IS_ELEM_AND_CONTAINER_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace detail { - template - struct is_elem_and_container - : public sprout::false_type - {}; - template - struct is_elem_and_container< - T, - U, - typename std::enable_if< - sprout::weed::traits::is_container::value - && std::is_same< - typename U::value_type, - T - >::value - >::type - > - : public sprout::true_type - {}; - } // namespace detail - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_DETAIL_IS_ELEM_AND_CONTAINER_HPP diff --git a/dsp/lib/sprout/sprout/weed/detail/is_elem_and_tuple.hpp b/dsp/lib/sprout/sprout/weed/detail/is_elem_and_tuple.hpp deleted file mode 100644 index 0d40a64..0000000 --- a/dsp/lib/sprout/sprout/weed/detail/is_elem_and_tuple.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_DETAIL_IS_ELEM_AND_TUPLE_HPP -#define SPROUT_WEED_DETAIL_IS_ELEM_AND_TUPLE_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace detail { - template - struct is_elem_and_tuple - : public sprout::false_type - {}; - template - struct is_elem_and_tuple< - T, - U, - typename std::enable_if< - !sprout::weed::traits::is_tuple::value - && !sprout::weed::traits::is_unused::value - && sprout::weed::traits::is_tuple::value - >::type - > - : public sprout::true_type - {}; - } // namespace detail - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_DETAIL_IS_ELEM_AND_TUPLE_HPP diff --git a/dsp/lib/sprout/sprout/weed/detail/is_elem_and_unused.hpp b/dsp/lib/sprout/sprout/weed/detail/is_elem_and_unused.hpp deleted file mode 100644 index 7ba90d1..0000000 --- a/dsp/lib/sprout/sprout/weed/detail/is_elem_and_unused.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_DETAIL_IS_ELEM_AND_UNUSED_HPP -#define SPROUT_WEED_DETAIL_IS_ELEM_AND_UNUSED_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace detail { - template - struct is_elem_and_unused - : public sprout::false_type - {}; - template - struct is_elem_and_unused< - T, - U, - typename std::enable_if< - !sprout::weed::traits::is_unused::value - && sprout::weed::traits::is_unused::value - >::type - > - : public sprout::true_type - {}; - } // namespace detail - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_DETAIL_IS_ELEM_AND_UNUSED_HPP diff --git a/dsp/lib/sprout/sprout/weed/detail/is_same_container.hpp b/dsp/lib/sprout/sprout/weed/detail/is_same_container.hpp deleted file mode 100644 index 0f6bb4d..0000000 --- a/dsp/lib/sprout/sprout/weed/detail/is_same_container.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_DETAIL_IS_SAME_CONTAINER_HPP -#define SPROUT_WEED_DETAIL_IS_SAME_CONTAINER_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace detail { - template - struct is_same_container - : public sprout::false_type - {}; - template - struct is_same_container< - T, - U, - typename std::enable_if< - sprout::weed::traits::is_container::value - && sprout::weed::traits::is_container::value - && std::is_same< - typename T::value_type, - typename U::value_type - >::value - >::type - > - : public sprout::true_type - {}; - } // namespace detail - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_DETAIL_IS_SAME_CONTAINER_HPP diff --git a/dsp/lib/sprout/sprout/weed/detail/is_same_elem.hpp b/dsp/lib/sprout/sprout/weed/detail/is_same_elem.hpp deleted file mode 100644 index e93ed43..0000000 --- a/dsp/lib/sprout/sprout/weed/detail/is_same_elem.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_DETAIL_IS_SAME_ELEM_HPP -#define SPROUT_WEED_DETAIL_IS_SAME_ELEM_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace detail { - template - struct is_same_elem - : public sprout::false_type - {}; - template - struct is_same_elem< - T, - U, - typename std::enable_if< - std::is_same::value - && !is_same_container::value - && !is_container_and_elem::value - && !is_elem_and_container::value - && !is_both_tuple::value - && !is_tuple_and_elem::value - && !is_elem_and_tuple::value - && !sprout::weed::traits::is_unused::value - && !sprout::weed::traits::is_unused::value - >::type - > - : public sprout::true_type - {}; - } // namespace detail - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_DETAIL_IS_SAME_ELEM_HPP diff --git a/dsp/lib/sprout/sprout/weed/detail/is_tuple_and_elem.hpp b/dsp/lib/sprout/sprout/weed/detail/is_tuple_and_elem.hpp deleted file mode 100644 index d74d834..0000000 --- a/dsp/lib/sprout/sprout/weed/detail/is_tuple_and_elem.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_DETAIL_IS_TUPLE_AND_ELEM_HPP -#define SPROUT_WEED_DETAIL_IS_TUPLE_AND_ELEM_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace detail { - template - struct is_tuple_and_elem - : public sprout::false_type - {}; - template - struct is_tuple_and_elem< - T, - U, - typename std::enable_if< - sprout::weed::traits::is_tuple::value - && !sprout::weed::traits::is_tuple::value - && !sprout::weed::traits::is_unused::value - >::type - > - : public sprout::true_type - {}; - } // namespace detail - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_DETAIL_IS_TUPLE_AND_ELEM_HPP diff --git a/dsp/lib/sprout/sprout/weed/detail/is_unused_and_elem.hpp b/dsp/lib/sprout/sprout/weed/detail/is_unused_and_elem.hpp deleted file mode 100644 index a0a70d4..0000000 --- a/dsp/lib/sprout/sprout/weed/detail/is_unused_and_elem.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_DETAIL_IS_UNUSED_AND_ELEM_HPP -#define SPROUT_WEED_DETAIL_IS_UNUSED_AND_ELEM_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace detail { - template - struct is_unused_and_elem - : public sprout::false_type - {}; - template - struct is_unused_and_elem< - T, - U, - typename std::enable_if< - sprout::weed::traits::is_unused::value - && !sprout::weed::traits::is_unused::value - >::type - > - : public sprout::true_type - {}; - } // namespace detail - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_DETAIL_IS_UNUSED_AND_ELEM_HPP diff --git a/dsp/lib/sprout/sprout/weed/detail/ndigits.hpp b/dsp/lib/sprout/sprout/weed/detail/ndigits.hpp deleted file mode 100644 index 619d45c..0000000 --- a/dsp/lib/sprout/sprout/weed/detail/ndigits.hpp +++ /dev/null @@ -1,59 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_DETAIL_NDIGITS_HPP -#define SPROUT_WEED_DETAIL_NDIGITS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace detail { - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple from_ndigit( - Elem c, - typename std::enable_if::type* = 0 - ) - { - return sprout::weed::detail::from_digit(c); - } - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple from_ndigit( - Elem c, - typename std::enable_if::type* = 0 - ) - { - return sprout::weed::detail::from_bdigit(c); - } - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple from_ndigit( - Elem c, - typename std::enable_if::type* = 0 - ) - { - return sprout::weed::detail::from_odigit(c); - } - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple from_ndigit( - Elem c, - typename std::enable_if::type* = 0 - ) - { - return sprout::weed::detail::from_xdigit(c); - } - } // namespace detail - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_DETAIL_NDIGITS_HPP diff --git a/dsp/lib/sprout/sprout/weed/detail/odigits.hpp b/dsp/lib/sprout/sprout/weed/detail/odigits.hpp deleted file mode 100644 index 79ff6a1..0000000 --- a/dsp/lib/sprout/sprout/weed/detail/odigits.hpp +++ /dev/null @@ -1,78 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_DETAIL_ODIGITS_HPP -#define SPROUT_WEED_DETAIL_ODIGITS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace detail { - SPROUT_LITERAL_STRING_DEF(odigits, "01234567", 8); - - template - struct ovalues; - -# define SPROUT_WEED_ODIGITS_TABLE_DEF \ - {{0, 1, 2, 3, 4, 5, 6, 7}} - - template - struct ovalues { - public: - typedef sprout::array value_type; - public: - SPROUT_STATIC_CONSTEXPR value_type value - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(SPROUT_WEED_ODIGITS_TABLE_DEF) - ; - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::weed::detail::ovalues::value_type - sprout::weed::detail::ovalues::value - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(SPROUT_WEED_ODIGITS_TABLE_DEF) - ; - -# undef SPROUT_WEED_ODIGITS_TABLE_DEF - - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple ovalue_at(std::size_t i) { - return i < 8 - ? sprout::tuples::tuple( - static_cast(sprout::weed::detail::ovalues::value[i]), - true - ) - : sprout::tuples::tuple( - IntType(), - false - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple from_odigit(Elem c) { - return sprout::weed::detail::ovalue_at( - sprout::distance( - sprout::weed::detail::odigits::value.begin(), - sprout::find( - sprout::weed::detail::odigits::value.begin(), - sprout::weed::detail::odigits::value.end(), - c - ) - ) - ); - } - } // namespace detail - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_DETAIL_ODIGITS_HPP diff --git a/dsp/lib/sprout/sprout/weed/detail/xdigits.hpp b/dsp/lib/sprout/sprout/weed/detail/xdigits.hpp deleted file mode 100644 index 87c1f7c..0000000 --- a/dsp/lib/sprout/sprout/weed/detail/xdigits.hpp +++ /dev/null @@ -1,78 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_DETAIL_XDIGITS_HPP -#define SPROUT_WEED_DETAIL_XDIGITS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace detail { - SPROUT_LITERAL_STRING_DEF(xdigits, "0123456789abcdefABCDEF", 22); - - template - struct xvalues; - -# define SPROUT_WEED_XDIGITS_TABLE_DEF \ - {{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 10, 11, 12, 13, 14, 15}} - - template - struct xvalues { - public: - typedef sprout::array value_type; - public: - SPROUT_STATIC_CONSTEXPR value_type value - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(SPROUT_WEED_XDIGITS_TABLE_DEF) - ; - }; - template - SPROUT_CONSTEXPR_OR_CONST typename sprout::weed::detail::xvalues::value_type - sprout::weed::detail::xvalues::value - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(SPROUT_WEED_XDIGITS_TABLE_DEF) - ; - -# undef SPROUT_WEED_XDIGITS_TABLE_DEF - - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple xvalue_at(std::size_t i) { - return i < 22 - ? sprout::tuples::tuple( - static_cast(sprout::weed::detail::xvalues::value[i]), - true - ) - : sprout::tuples::tuple( - IntType(), - false - ) - ; - } - template - inline SPROUT_CONSTEXPR sprout::tuples::tuple from_xdigit(Elem c) { - return sprout::weed::detail::xvalue_at( - sprout::distance( - sprout::weed::detail::xdigits::value.begin(), - sprout::find( - sprout::weed::detail::xdigits::value.begin(), - sprout::weed::detail::xdigits::value.end(), - c - ) - ) - ); - } - } // namespace detail - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_DETAIL_XDIGITS_HPP diff --git a/dsp/lib/sprout/sprout/weed/eval_result.hpp b/dsp/lib/sprout/sprout/weed/eval_result.hpp deleted file mode 100644 index df27347..0000000 --- a/dsp/lib/sprout/sprout/weed/eval_result.hpp +++ /dev/null @@ -1,63 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_EVAL_RESULT_HPP -#define SPROUT_WEED_EVAL_RESULT_HPP - -#include -#include - -namespace sprout { - namespace weed { - // - // eval_result - // - template - class eval_result { - public: - typedef sprout::weed::parser_result presult_type; - private: - presult_type presult_; - Context ctx_; - public: - SPROUT_CONSTEXPR eval_result() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - SPROUT_CONSTEXPR eval_result( - bool success, - Iterator current, - Attribute const& attr, - Context const& ctx - ) - : presult_(success, current, attr) - , ctx_(ctx) - {} - SPROUT_CONSTEXPR eval_result( - presult_type const& presult, - Context const& ctx - ) - : presult_(presult) - , ctx_(ctx) - {} - SPROUT_CONSTEXPR presult_type const& presult() const { - return presult_; - } - SPROUT_CONSTEXPR bool success() const { - return presult_.success(); - } - SPROUT_CONSTEXPR Iterator current() const { - return presult_.current(); - } - SPROUT_CONSTEXPR Attribute const& attr() const { - return presult_.attr(); - } - SPROUT_CONSTEXPR Context const& ctx() const { - return ctx_; - } - }; - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_EVAL_RESULT_HPP diff --git a/dsp/lib/sprout/sprout/weed/expr.hpp b/dsp/lib/sprout/sprout/weed/expr.hpp deleted file mode 100644 index 4cecf4a..0000000 --- a/dsp/lib/sprout/sprout/weed/expr.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_EXPR_HPP -#define SPROUT_WEED_EXPR_HPP - -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_WEED_EXPR_HPP diff --git a/dsp/lib/sprout/sprout/weed/expr/eval.hpp b/dsp/lib/sprout/sprout/weed/expr/eval.hpp deleted file mode 100644 index f4457e0..0000000 --- a/dsp/lib/sprout/sprout/weed/expr/eval.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_EXPR_EVAL_HPP -#define SPROUT_WEED_EXPR_EVAL_HPP - -#include -#include -#include - -namespace sprout { - namespace weed { - // - // eval - // - template - inline SPROUT_CONSTEXPR typename Context::template eval< - typename sprout::weed::traits::terminal_or_expr_of::type - >::result_type eval( - Expr const& expr, - Context const& ctx - ) - { - typedef typename Context::template eval< - typename sprout::weed::traits::terminal_or_expr_of::type - > eval_type; - return eval_type()( - sprout::weed::make_terminal_or_expr(expr), - ctx - ); - } - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_EXPR_EVAL_HPP diff --git a/dsp/lib/sprout/sprout/weed/expr/expr.hpp b/dsp/lib/sprout/sprout/weed/expr/expr.hpp deleted file mode 100644 index c2251ad..0000000 --- a/dsp/lib/sprout/sprout/weed/expr/expr.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_EXPR_EXPR_HPP -#define SPROUT_WEED_EXPR_EXPR_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // expr - // - template - class expr { - public: - typedef Tag expr_tag; - typedef sprout::tuples::tuple args_type; - private: - args_type args_; - public: - template - explicit SPROUT_CONSTEXPR expr(As&&... args) - : args_(SPROUT_FORWARD(As, args)...) - {} - SPROUT_CONSTEXPR args_type const& args() const { - return args_; - } - }; - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_EXPR_EXPR_HPP diff --git a/dsp/lib/sprout/sprout/weed/expr/expr_fwd.hpp b/dsp/lib/sprout/sprout/weed/expr/expr_fwd.hpp deleted file mode 100644 index 97617f0..0000000 --- a/dsp/lib/sprout/sprout/weed/expr/expr_fwd.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_EXPR_EXPR_FWD_HPP -#define SPROUT_WEED_EXPR_EXPR_FWD_HPP - -#include - -namespace sprout { - namespace weed { - // - // expr - // - template - class expr; - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_EXPR_EXPR_FWD_HPP diff --git a/dsp/lib/sprout/sprout/weed/expr/make_expr.hpp b/dsp/lib/sprout/sprout/weed/expr/make_expr.hpp deleted file mode 100644 index c15a15f..0000000 --- a/dsp/lib/sprout/sprout/weed/expr/make_expr.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_EXPR_MAKE_EXPR_HPP -#define SPROUT_WEED_EXPR_MAKE_EXPR_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // make_expr - // - template - inline SPROUT_CONSTEXPR typename sprout::weed::traits::expr_of::type - make_expr(Args&&... args) { - return typename sprout::weed::traits::expr_of::type( - sprout::weed::make_terminal_or_expr(SPROUT_FORWARD(Args, args))... - ); - } - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_EXPR_MAKE_EXPR_HPP diff --git a/dsp/lib/sprout/sprout/weed/expr/make_terminal.hpp b/dsp/lib/sprout/sprout/weed/expr/make_terminal.hpp deleted file mode 100644 index aea3267..0000000 --- a/dsp/lib/sprout/sprout/weed/expr/make_terminal.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_EXPR_MAKE_TERMINAL_HPP -#define SPROUT_WEED_EXPR_MAKE_TERMINAL_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // make_terminal - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::weed::traits::is_c_str< - typename std::remove_reference::type - >::value, - typename sprout::weed::traits::terminal_of::type - >::type make_terminal(Arg&& arg) { - return typename sprout::weed::traits::terminal_of::type( - SPROUT_FORWARD(Arg, arg) - ); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::traits::is_c_str< - typename std::remove_reference::type - >::value, - typename sprout::weed::traits::terminal_of::type - >::type make_terminal(Arg&& arg) { - return typename sprout::weed::traits::terminal_of::type( - sprout::to_string(SPROUT_FORWARD(Arg, arg)) - ); - } - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_EXPR_MAKE_TERMINAL_HPP diff --git a/dsp/lib/sprout/sprout/weed/expr/make_terminal_or_expr.hpp b/dsp/lib/sprout/sprout/weed/expr/make_terminal_or_expr.hpp deleted file mode 100644 index 644e1db..0000000 --- a/dsp/lib/sprout/sprout/weed/expr/make_terminal_or_expr.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_EXPR_MAKE_TERMINAL_OR_EXPR_HPP -#define SPROUT_WEED_EXPR_MAKE_TERMINAL_OR_EXPR_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // make_terminal_or_expr - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::traits::is_expr< - typename std::remove_reference::type - >::value, - typename sprout::weed::traits::terminal_or_expr_of::type - >::type make_terminal_or_expr(Arg&& arg) { - return SPROUT_FORWARD(Arg, arg); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !sprout::weed::traits::is_expr< - typename std::remove_reference::type - >::value, - typename sprout::weed::traits::terminal_or_expr_of::type - >::type make_terminal_or_expr(Arg&& arg) { - return sprout::weed::make_terminal(SPROUT_FORWARD(Arg, arg)); - } - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_EXPR_MAKE_TERMINAL_OR_EXPR_HPP diff --git a/dsp/lib/sprout/sprout/weed/expr/tag.hpp b/dsp/lib/sprout/sprout/weed/expr/tag.hpp deleted file mode 100644 index 9e7aac4..0000000 --- a/dsp/lib/sprout/sprout/weed/expr/tag.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_EXPR_TAG_HPP -#define SPROUT_WEED_EXPR_TAG_HPP - -#include - -namespace sprout { - namespace weed { - namespace tag { - struct terminal {}; - struct unary_plus {}; - struct negate {}; - struct dereference {}; - struct address_of {}; - struct logical_not {}; - struct shift_left {}; - struct modulus {}; - struct minus {}; - struct bitwise_or {}; - struct mem_ptr {}; - } // namespace tag - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_EXPR_TAG_HPP diff --git a/dsp/lib/sprout/sprout/weed/limited.hpp b/dsp/lib/sprout/sprout/weed/limited.hpp deleted file mode 100644 index a38f1b5..0000000 --- a/dsp/lib/sprout/sprout/weed/limited.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_LIMITED_HPP -#define SPROUT_WEED_LIMITED_HPP - -#include - -namespace sprout { - namespace weed { - // - // limited - // - struct limited { - public: - enum category { - discard, - circular, - stopover - }; - }; - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_LIMITED_HPP diff --git a/dsp/lib/sprout/sprout/weed/operator.hpp b/dsp/lib/sprout/sprout/weed/operator.hpp deleted file mode 100644 index 3142903..0000000 --- a/dsp/lib/sprout/sprout/weed/operator.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_OPERATOR_HPP -#define SPROUT_WEED_OPERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_WEED_OPERATOR_HPP diff --git a/dsp/lib/sprout/sprout/weed/operator/address_of.hpp b/dsp/lib/sprout/sprout/weed/operator/address_of.hpp deleted file mode 100644 index 48b9ca2..0000000 --- a/dsp/lib/sprout/sprout/weed/operator/address_of.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_OPERATOR_ADDRESS_OF_HPP -#define SPROUT_WEED_OPERATOR_ADDRESS_OF_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // operator& - // - template< - typename Arg, - typename = typename std::enable_if< - sprout::weed::traits::is_parser< - typename std::remove_reference::type - >::value - >::type - > - inline SPROUT_CONSTEXPR typename sprout::weed::traits::expr_of< - sprout::weed::tag::address_of, - Arg - >::type operator&(Arg&& arg) { - return sprout::weed::make_expr( - SPROUT_FORWARD(Arg, arg) - ); - } - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_OPERATOR_ADDRESS_OF_HPP diff --git a/dsp/lib/sprout/sprout/weed/operator/bitwise_or.hpp b/dsp/lib/sprout/sprout/weed/operator/bitwise_or.hpp deleted file mode 100644 index 8816b6f..0000000 --- a/dsp/lib/sprout/sprout/weed/operator/bitwise_or.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_OPERATOR_BITWISE_OR_HPP -#define SPROUT_WEED_OPERATOR_BITWISE_OR_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // operator| - // - template< - typename Arg1, - typename Arg2, - typename = typename std::enable_if< - sprout::weed::traits::is_parser< - typename std::remove_reference::type - >::value - && sprout::weed::traits::is_parser< - typename std::remove_reference::type - >::value - >::type - > - inline SPROUT_CONSTEXPR typename sprout::weed::traits::expr_of< - sprout::weed::tag::bitwise_or, - Arg1, - Arg2 - >::type operator|(Arg1&& arg1, Arg2&& arg2) { - return sprout::weed::make_expr( - SPROUT_FORWARD(Arg1, arg1), - SPROUT_FORWARD(Arg2, arg2) - ); - } - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_OPERATOR_BITWISE_OR_HPP diff --git a/dsp/lib/sprout/sprout/weed/operator/dereference.hpp b/dsp/lib/sprout/sprout/weed/operator/dereference.hpp deleted file mode 100644 index 040248d..0000000 --- a/dsp/lib/sprout/sprout/weed/operator/dereference.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_OPERATOR_DEREFERENCE_HPP -#define SPROUT_WEED_OPERATOR_DEREFERENCE_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // operator* - // - template< - typename Arg, - typename = typename std::enable_if< - sprout::weed::traits::is_parser< - typename std::remove_reference::type - >::value - >::type - > - inline SPROUT_CONSTEXPR typename sprout::weed::traits::expr_of< - sprout::weed::tag::dereference, - Arg - >::type operator*(Arg&& arg) { - return sprout::weed::make_expr( - SPROUT_FORWARD(Arg, arg) - ); - } - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_OPERATOR_DEREFERENCE_HPP diff --git a/dsp/lib/sprout/sprout/weed/operator/logical_not.hpp b/dsp/lib/sprout/sprout/weed/operator/logical_not.hpp deleted file mode 100644 index d4b600f..0000000 --- a/dsp/lib/sprout/sprout/weed/operator/logical_not.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_OPERATOR_LOGICAL_NOT_HPP -#define SPROUT_WEED_OPERATOR_LOGICAL_NOT_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // operator! - // - template< - typename Arg, - typename = typename std::enable_if< - sprout::weed::traits::is_parser< - typename std::remove_reference::type - >::value - >::type - > - inline SPROUT_CONSTEXPR typename sprout::weed::traits::expr_of< - sprout::weed::tag::logical_not, - Arg - >::type operator!(Arg&& arg) { - return sprout::weed::make_expr( - SPROUT_FORWARD(Arg, arg) - ); - } - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_OPERATOR_LOGICAL_NOT_HPP diff --git a/dsp/lib/sprout/sprout/weed/operator/mem_ptr.hpp b/dsp/lib/sprout/sprout/weed/operator/mem_ptr.hpp deleted file mode 100644 index 9708d6a..0000000 --- a/dsp/lib/sprout/sprout/weed/operator/mem_ptr.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_OPERATOR_MEM_PTR_HPP -#define SPROUT_WEED_OPERATOR_MEM_PTR_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // operator->* - // - template< - typename Arg1, - typename Arg2, - typename = typename std::enable_if< - sprout::weed::traits::is_parser< - typename std::remove_reference::type - >::value - >::type - > - inline SPROUT_CONSTEXPR typename sprout::weed::traits::expr_of< - sprout::weed::tag::mem_ptr, - Arg1, - Arg2 - >::type operator->*(Arg1&& arg1, Arg2&& arg2) { - return sprout::weed::make_expr( - SPROUT_FORWARD(Arg1, arg1), - SPROUT_FORWARD(Arg2, arg2) - ); - } - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_OPERATOR_MEM_PTR_HPP diff --git a/dsp/lib/sprout/sprout/weed/operator/minus.hpp b/dsp/lib/sprout/sprout/weed/operator/minus.hpp deleted file mode 100644 index c3458bf..0000000 --- a/dsp/lib/sprout/sprout/weed/operator/minus.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_OPERATOR_MINUS_HPP -#define SPROUT_WEED_OPERATOR_MINUS_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // operator- - // - template< - typename Arg1, - typename Arg2, - typename = typename std::enable_if< - sprout::weed::traits::is_parser< - typename std::remove_reference::type - >::value - && sprout::weed::traits::is_parser< - typename std::remove_reference::type - >::value - >::type - > - inline SPROUT_CONSTEXPR typename sprout::weed::traits::expr_of< - sprout::weed::tag::minus, - Arg1, - Arg2 - >::type operator-(Arg1&& arg1, Arg2&& arg2) { - return sprout::weed::make_expr( - SPROUT_FORWARD(Arg1, arg1), - SPROUT_FORWARD(Arg2, arg2) - ); - } - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_OPERATOR_MINUS_HPP diff --git a/dsp/lib/sprout/sprout/weed/operator/modulus.hpp b/dsp/lib/sprout/sprout/weed/operator/modulus.hpp deleted file mode 100644 index 2af9b60..0000000 --- a/dsp/lib/sprout/sprout/weed/operator/modulus.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_OPERATOR_MODULUS_HPP -#define SPROUT_WEED_OPERATOR_MODULUS_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // operator% - // - template< - typename Arg1, - typename Arg2, - typename = typename std::enable_if< - sprout::weed::traits::is_parser< - typename std::remove_reference::type - >::value - && sprout::weed::traits::is_parser< - typename std::remove_reference::type - >::value - >::type - > - inline SPROUT_CONSTEXPR typename sprout::weed::traits::expr_of< - sprout::weed::tag::modulus, - Arg1, - Arg2 - >::type operator%(Arg1&& arg1, Arg2&& arg2) { - return sprout::weed::make_expr( - SPROUT_FORWARD(Arg1, arg1), - SPROUT_FORWARD(Arg2, arg2) - ); - } - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_OPERATOR_MODULUS_HPP diff --git a/dsp/lib/sprout/sprout/weed/operator/negate.hpp b/dsp/lib/sprout/sprout/weed/operator/negate.hpp deleted file mode 100644 index cb9deb1..0000000 --- a/dsp/lib/sprout/sprout/weed/operator/negate.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_OPERATOR_NEGATE_HPP -#define SPROUT_WEED_OPERATOR_NEGATE_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // operator- - // - template< - typename Arg, - typename = typename std::enable_if< - sprout::weed::traits::is_parser< - typename std::remove_reference::type - >::value - >::type - > - inline SPROUT_CONSTEXPR typename sprout::weed::traits::expr_of< - sprout::weed::tag::negate, - Arg - >::type operator-(Arg&& arg) { - return sprout::weed::make_expr( - SPROUT_FORWARD(Arg, arg) - ); - } - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_OPERATOR_NEGATE_HPP diff --git a/dsp/lib/sprout/sprout/weed/operator/shift_left.hpp b/dsp/lib/sprout/sprout/weed/operator/shift_left.hpp deleted file mode 100644 index d1bb22b..0000000 --- a/dsp/lib/sprout/sprout/weed/operator/shift_left.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_OPERATOR_SHIFT_LEFT_HPP -#define SPROUT_WEED_OPERATOR_SHIFT_LEFT_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // operator>> - // - template< - typename Arg1, - typename Arg2, - typename = typename std::enable_if< - sprout::weed::traits::is_parser< - typename std::remove_reference::type - >::value - && sprout::weed::traits::is_parser< - typename std::remove_reference::type - >::value - >::type - > - inline SPROUT_CONSTEXPR typename sprout::weed::traits::expr_of< - sprout::weed::tag::shift_left, - Arg1, - Arg2 - >::type operator>>(Arg1&& arg1, Arg2&& arg2) { - return sprout::weed::make_expr( - SPROUT_FORWARD(Arg1, arg1), - SPROUT_FORWARD(Arg2, arg2) - ); - } - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_OPERATOR_SHIFT_LEFT_HPP diff --git a/dsp/lib/sprout/sprout/weed/operator/unary_plus.hpp b/dsp/lib/sprout/sprout/weed/operator/unary_plus.hpp deleted file mode 100644 index 5ed023a..0000000 --- a/dsp/lib/sprout/sprout/weed/operator/unary_plus.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_OPERATOR_UNARY_PLUS_HPP -#define SPROUT_WEED_OPERATOR_UNARY_PLUS_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // operator+ - // - template< - typename Arg, - typename = typename std::enable_if< - sprout::weed::traits::is_parser< - typename std::remove_reference::type - >::value - >::type - > - inline SPROUT_CONSTEXPR typename sprout::weed::traits::expr_of< - sprout::weed::tag::unary_plus, - Arg - >::type operator+(Arg&& arg) { - return sprout::weed::make_expr( - SPROUT_FORWARD(Arg, arg) - ); - } - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_OPERATOR_UNARY_PLUS_HPP diff --git a/dsp/lib/sprout/sprout/weed/parse.hpp b/dsp/lib/sprout/sprout/weed/parse.hpp deleted file mode 100644 index fe4522e..0000000 --- a/dsp/lib/sprout/sprout/weed/parse.hpp +++ /dev/null @@ -1,61 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_PARSE_HPP -#define SPROUT_WEED_PARSE_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // parse - // - template - inline SPROUT_CONSTEXPR typename sprout::weed::parse_context< - Iterator - >::template eval< - typename sprout::weed::traits::terminal_or_expr_of::type - >::result_type::presult_type - parse(Iterator first, Iterator last, Parser const& parser) { - return sprout::weed::eval( - sprout::weed::make_terminal_or_expr(parser), - sprout::weed::parse_context(first, last) - ).presult() - ; - } - template - inline SPROUT_CONSTEXPR typename sprout::weed::parse_context< - typename sprout::container_traits::const_iterator - >::template eval< - typename sprout::weed::traits::terminal_or_expr_of::type - >::result_type::presult_type - parse(Range const& range, Parser const& parser) { - return sprout::weed::parse(sprout::begin(range), sprout::end(range), parser); - } - - // - // parse_range - // - template - inline SPROUT_CONSTEXPR typename sprout::weed::parse_context< - typename sprout::container_traits::const_iterator - >::template eval< - typename sprout::weed::traits::terminal_or_expr_of::type - >::result_type::presult_type - parse_range(Range const& range, Parser const& parser) { - return sprout::weed::parse(range, parser); - } - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_PARSE_HPP diff --git a/dsp/lib/sprout/sprout/weed/parser.hpp b/dsp/lib/sprout/sprout/weed/parser.hpp deleted file mode 100644 index d94cd17..0000000 --- a/dsp/lib/sprout/sprout/weed/parser.hpp +++ /dev/null @@ -1,21 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_PARSER_HPP -#define SPROUT_WEED_PARSER_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_WEED_PARSER_HPP diff --git a/dsp/lib/sprout/sprout/weed/parser/auxiliary.hpp b/dsp/lib/sprout/sprout/weed/parser/auxiliary.hpp deleted file mode 100644 index 9c5cf75..0000000 --- a/dsp/lib/sprout/sprout/weed/parser/auxiliary.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_PARSER_AUXILIARY_HPP -#define SPROUT_WEED_PARSER_AUXILIARY_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_WEED_PARSER_AUXILIARY_HPP diff --git a/dsp/lib/sprout/sprout/weed/parser/auxiliary/eoi.hpp b/dsp/lib/sprout/sprout/weed/parser/auxiliary/eoi.hpp deleted file mode 100644 index 77c7c82..0000000 --- a/dsp/lib/sprout/sprout/weed/parser/auxiliary/eoi.hpp +++ /dev/null @@ -1,54 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_PARSER_AUXILIARY_EOI_HPP -#define SPROUT_WEED_PARSER_AUXILIARY_EOI_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // eoi_p - // - struct eoi_p - : public sprout::weed::parser_base - { - public: - template - struct attribute - : public sprout::identity - {}; - template - struct result - : public sprout::identity::type> > - {}; - public: - template - SPROUT_CONSTEXPR typename result::type operator()( - Iterator first, Iterator last, - Context const& - ) const - { - typedef typename result::type result_type; - typedef typename attribute::type attribute_type; - return result_type(first == last, first, attribute_type()); - } - }; - // - // eoi - // - SPROUT_STATIC_CONSTEXPR sprout::weed::eoi_p eoi = sprout::weed::eoi_p(); - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_PARSER_AUXILIARY_EOI_HPP diff --git a/dsp/lib/sprout/sprout/weed/parser/auxiliary/eol.hpp b/dsp/lib/sprout/sprout/weed/parser/auxiliary/eol.hpp deleted file mode 100644 index 3ee8ba1..0000000 --- a/dsp/lib/sprout/sprout/weed/parser/auxiliary/eol.hpp +++ /dev/null @@ -1,68 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_PARSER_AUXILIARY_EOL_HPP -#define SPROUT_WEED_PARSER_AUXILIARY_EOL_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // eol_p - // - struct eol_p - : public sprout::weed::parser_base - { - public: - template - struct attribute - : public sprout::identity - {}; - template - struct result - : public sprout::identity::type> > - {}; - public: - template - SPROUT_CONSTEXPR typename result::type operator()( - Iterator first, Iterator last, - Context const& - ) const - { - typedef typename result::type result_type; - typedef typename attribute::type attribute_type; - typedef typename std::iterator_traits::value_type elem_type; - return first != last - ? *first == SPROUT_CHAR_LITERAL('\r', elem_type) - ? sprout::next(first) != last - ? *sprout::next(first) == SPROUT_CHAR_LITERAL('\n', elem_type) - ? result_type(true, sprout::next(sprout::next(first)), attribute_type()) - : result_type(true, sprout::next(first), attribute_type()) - : result_type(true, sprout::next(first), attribute_type()) - : *first == SPROUT_CHAR_LITERAL('\n', elem_type) - ? result_type(true, sprout::next(first), attribute_type()) - : result_type(false, first, attribute_type()) - : result_type(false, first, attribute_type()) - ; - } - }; - // - // eol - // - SPROUT_STATIC_CONSTEXPR sprout::weed::eol_p eol = sprout::weed::eol_p(); - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_PARSER_AUXILIARY_EOL_HPP diff --git a/dsp/lib/sprout/sprout/weed/parser/auxiliary/eps.hpp b/dsp/lib/sprout/sprout/weed/parser/auxiliary/eps.hpp deleted file mode 100644 index a0f1046..0000000 --- a/dsp/lib/sprout/sprout/weed/parser/auxiliary/eps.hpp +++ /dev/null @@ -1,54 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_PARSER_AUXILIARY_EPS_HPP -#define SPROUT_WEED_PARSER_AUXILIARY_EPS_HPP - -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // eps_p - // - struct eps_p - : public sprout::weed::parser_base - { - public: - template - struct attribute - : public sprout::identity - {}; - template - struct result - : public sprout::identity::type> > - {}; - public: - template - SPROUT_CONSTEXPR typename result::type operator()( - Iterator first, Iterator, - Context const& - ) const - { - typedef typename result::type result_type; - typedef typename attribute::type attribute_type; - return result_type(true, first, attribute_type()); - } - }; - // - // eps - // - SPROUT_STATIC_CONSTEXPR sprout::weed::eps_p eps = sprout::weed::eps_p(); - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_PARSER_AUXILIARY_EPS_HPP diff --git a/dsp/lib/sprout/sprout/weed/parser/char.hpp b/dsp/lib/sprout/sprout/weed/parser/char.hpp deleted file mode 100644 index 5806a16..0000000 --- a/dsp/lib/sprout/sprout/weed/parser/char.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_PARSER_CHAR_HPP -#define SPROUT_WEED_PARSER_CHAR_HPP - -#include -#include -#include - -#endif // #ifndef SPROUT_WEED_PARSER_CHAR_HPP diff --git a/dsp/lib/sprout/sprout/weed/parser/char/char.hpp b/dsp/lib/sprout/sprout/weed/parser/char/char.hpp deleted file mode 100644 index ad4d0ee..0000000 --- a/dsp/lib/sprout/sprout/weed/parser/char/char.hpp +++ /dev/null @@ -1,277 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_PARSER_CHAR_CHAR_HPP -#define SPROUT_WEED_PARSER_CHAR_CHAR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // lit_char_p - // - template - struct lit_char_p - : public sprout::weed::parser_base - { - public: - template - struct attribute - : public sprout::identity - {}; - template - struct result - : public sprout::identity::type> > - {}; - private: - T t_; - public: - SPROUT_CONSTEXPR lit_char_p() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - explicit SPROUT_CONSTEXPR lit_char_p(T const& t) - : t_(t) - {} - template - SPROUT_CONSTEXPR typename result::type operator()( - Iterator first, Iterator last, - Context const& - ) const - { - typedef typename result::type result_type; - typedef typename attribute::type attribute_type; - typedef typename std::iterator_traits::value_type elem_type; - return first != last && *first == elem_type(t_) - ? result_type(true, sprout::next(first), attribute_type()) - : result_type(false, first, typename attribute::type()) - ; - } - }; - // - // lit_g - // - template - struct lit_g::eval< - T, - typename std::enable_if< - sprout::weed::traits::is_char_type::value - >::type - > { - public: - typedef sprout::weed::lit_char_p result_type; - public: - SPROUT_CONSTEXPR result_type operator()(T const& t) const { - return result_type(t); - } - }; - - // - // char_p - // - template - struct char_p - : public sprout::weed::parser_base - { - public: - template - struct attribute - : public sprout::identity::value_type> - {}; - template - struct result - : public sprout::identity::type> > - {}; - private: - T t_; - public: - SPROUT_CONSTEXPR char_p() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - explicit SPROUT_CONSTEXPR char_p(T const& t) - : t_(t) - {} - template - SPROUT_CONSTEXPR typename result::type operator()( - Iterator first, Iterator last, - Context const& - ) const - { - typedef typename result::type result_type; - typedef typename attribute::type attribute_type; - typedef typename std::iterator_traits::value_type elem_type; - return first != last && *first == elem_type(t_) - ? result_type(true, sprout::next(first), *first) - : result_type(false, first, attribute_type()) - ; - } - }; - - // - // char_range_p - // - template - struct char_range_p - : public sprout::weed::parser_base - { - public: - template - struct attribute - : public sprout::identity::value_type> - {}; - template - struct result - : public sprout::identity::type> > - {}; - private: - T f_; - T l_; - public: - SPROUT_CONSTEXPR char_range_p() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - SPROUT_CONSTEXPR char_range_p(T const& f, T const& l) - : f_(f), l_(l) - {} - template - SPROUT_CONSTEXPR typename result::type operator()( - Iterator first, Iterator last, - Context const& - ) const - { - typedef typename result::type result_type; - typedef typename attribute::type attribute_type; - typedef typename std::iterator_traits::value_type elem_type; - return first != last && *first >= elem_type(f_) && *first <= elem_type(l_) - ? result_type(true, sprout::next(first), *first) - : result_type(false, first, attribute_type()) - ; - } - }; - - // - // char_set_p - // - template - struct char_set_p - : public sprout::weed::parser_base - { - public: - template - struct attribute - : public sprout::identity::value_type> - {}; - template - struct result - : public sprout::identity::type> > - {}; - private: - T t_; - public: - SPROUT_CONSTEXPR char_set_p() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - explicit SPROUT_CONSTEXPR char_set_p(T const& t) - : t_(t) - {} - template - SPROUT_CONSTEXPR typename result::type operator()( - Iterator first, Iterator last, - Context const& - ) const - { - typedef typename result::type result_type; - typedef typename attribute::type attribute_type; - return first != last && sprout::weed::detail::find_character_set(sprout::begin(t_), sprout::end(t_), *first) != sprout::end(t_) - ? result_type(true, sprout::next(first), *first) - : result_type(false, first, attribute_type()) - ; - } - }; - - // - // any_char_p - // - struct any_char_p - : public sprout::weed::parser_base - { - public: - template - struct attribute - : public sprout::identity::value_type> - {}; - template - struct result - : public sprout::identity::type> > - {}; - public: - template - SPROUT_CONSTEXPR typename result::type operator()( - Iterator first, Iterator last, - Context const& - ) const - { - typedef typename result::type result_type; - typedef typename attribute::type attribute_type; - return first != last - ? result_type(true, sprout::next(first), *first) - : result_type(false, first, attribute_type()) - ; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::traits::is_char_type::value, - sprout::weed::char_p - >::type - operator()(T const& t) const { - return sprout::weed::char_p(t); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::traits::is_char_type::value, - sprout::weed::char_range_p - >::type - operator()(T const& f, T const& l) const { - return sprout::weed::char_range_p(f, l); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::traits::is_c_str::value, - sprout::weed::char_set_p< - typename sprout::weed::detail::c_str_as_string::type - > - >::type - operator()(T const& t) const { - return sprout::weed::char_set_p< - typename sprout::weed::detail::c_str_as_string::type - >(sprout::to_string(t)); - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::traits::is_string::value, - sprout::weed::char_set_p - >::type - operator()(T const& t) const { - return sprout::weed::char_set_p(t); - } - }; - // - // char_ - // - SPROUT_STATIC_CONSTEXPR sprout::weed::any_char_p char_ = sprout::weed::any_char_p(); - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_PARSER_CHAR_CHAR_HPP diff --git a/dsp/lib/sprout/sprout/weed/parser/char/char_class.hpp b/dsp/lib/sprout/sprout/weed/parser/char/char_class.hpp deleted file mode 100644 index 4df2a34..0000000 --- a/dsp/lib/sprout/sprout/weed/parser/char/char_class.hpp +++ /dev/null @@ -1,140 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_PARSER_CHAR_CHAR_CLASS_HPP -#define SPROUT_WEED_PARSER_CHAR_CHAR_CLASS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { -#define SPROUT_WEED_DEFINE_CTYPE_P(NAME, ISNAME) \ - template \ - struct NAME \ - : public sprout::weed::parser_base \ - { \ - public: \ - template \ - struct attribute \ - : public std::conditional< \ - Nil, \ - sprout::weed::unused, \ - typename std::iterator_traits::value_type \ - > \ - {}; \ - template \ - struct result \ - : public sprout::identity::type> > \ - {}; \ - public: \ - template \ - SPROUT_CONSTEXPR typename result::type operator()( \ - Iterator first, Iterator last, \ - Context const& \ - ) const \ - { \ - typedef typename result::type result_type; \ - typedef typename attribute::type attribute_type; \ - return first != last && sprout::ascii::ISNAME(*first) \ - ? result_type(true, sprout::next(first), *first) \ - : result_type(false, first, attribute_type()) \ - ; \ - } \ - } - - // - // alnum_p - // alpha_p - // blank_p - // cntrl_p - // digit_p - // graph_p - // print_p - // punct_p - // space_p - // xdigit_p - // lower_p - // upper_p - // - SPROUT_WEED_DEFINE_CTYPE_P(alnum_p, isalnum); - SPROUT_WEED_DEFINE_CTYPE_P(alpha_p, isalpha); - SPROUT_WEED_DEFINE_CTYPE_P(blank_p, isblank); - SPROUT_WEED_DEFINE_CTYPE_P(cntrl_p, iscntrl); - SPROUT_WEED_DEFINE_CTYPE_P(digit_p, isdigit); - SPROUT_WEED_DEFINE_CTYPE_P(graph_p, isgraph); - SPROUT_WEED_DEFINE_CTYPE_P(print_p, isprint); - SPROUT_WEED_DEFINE_CTYPE_P(punct_p, ispunct); - SPROUT_WEED_DEFINE_CTYPE_P(space_p, isspace); - SPROUT_WEED_DEFINE_CTYPE_P(xdigit_p, isxdigit); - SPROUT_WEED_DEFINE_CTYPE_P(lower_p, islower); - SPROUT_WEED_DEFINE_CTYPE_P(upper_p, isupper); - -#undef SPROUT_WEED_DEFINE_CTYPE_P - - // - // alnum - // alpha - // blank - // cntrl - // digit - // graph - // print - // punct - // space - // xdigit - // lower - // upper - // - SPROUT_STATIC_CONSTEXPR sprout::weed::alnum_p<> alnum = sprout::weed::alnum_p<>(); - SPROUT_STATIC_CONSTEXPR sprout::weed::alpha_p<> alpha = sprout::weed::alpha_p<>(); - SPROUT_STATIC_CONSTEXPR sprout::weed::blank_p<> blank = sprout::weed::blank_p<>(); - SPROUT_STATIC_CONSTEXPR sprout::weed::cntrl_p<> cntrl = sprout::weed::cntrl_p<>(); - SPROUT_STATIC_CONSTEXPR sprout::weed::digit_p<> digit = sprout::weed::digit_p<>(); - SPROUT_STATIC_CONSTEXPR sprout::weed::graph_p<> graph = sprout::weed::graph_p<>(); - SPROUT_STATIC_CONSTEXPR sprout::weed::print_p<> print = sprout::weed::print_p<>(); - SPROUT_STATIC_CONSTEXPR sprout::weed::punct_p<> punct = sprout::weed::punct_p<>(); - SPROUT_STATIC_CONSTEXPR sprout::weed::space_p<> space = sprout::weed::space_p<>(); - SPROUT_STATIC_CONSTEXPR sprout::weed::xdigit_p<> xdigit = sprout::weed::xdigit_p<>(); - SPROUT_STATIC_CONSTEXPR sprout::weed::lower_p<> lower = sprout::weed::lower_p<>(); - SPROUT_STATIC_CONSTEXPR sprout::weed::upper_p<> upper = sprout::weed::upper_p<>(); - // - // alnum_ - // alpha_ - // blank_ - // cntrl_ - // digit_ - // graph_ - // print_ - // punct_ - // space_ - // xdigit_ - // lower_ - // upper_ - // - SPROUT_STATIC_CONSTEXPR sprout::weed::alnum_p alnum_ = sprout::weed::alnum_p(); - SPROUT_STATIC_CONSTEXPR sprout::weed::alpha_p alpha_ = sprout::weed::alpha_p(); - SPROUT_STATIC_CONSTEXPR sprout::weed::blank_p blank_ = sprout::weed::blank_p(); - SPROUT_STATIC_CONSTEXPR sprout::weed::cntrl_p cntrl_ = sprout::weed::cntrl_p(); - SPROUT_STATIC_CONSTEXPR sprout::weed::digit_p digit_ = sprout::weed::digit_p(); - SPROUT_STATIC_CONSTEXPR sprout::weed::graph_p graph_ = sprout::weed::graph_p(); - SPROUT_STATIC_CONSTEXPR sprout::weed::print_p print_ = sprout::weed::print_p(); - SPROUT_STATIC_CONSTEXPR sprout::weed::punct_p punct_ = sprout::weed::punct_p(); - SPROUT_STATIC_CONSTEXPR sprout::weed::space_p space_ = sprout::weed::space_p(); - SPROUT_STATIC_CONSTEXPR sprout::weed::xdigit_p xdigit_ = sprout::weed::xdigit_p(); - SPROUT_STATIC_CONSTEXPR sprout::weed::lower_p lower_ = sprout::weed::lower_p(); - SPROUT_STATIC_CONSTEXPR sprout::weed::upper_p upper_ = sprout::weed::upper_p(); - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_PARSER_CHAR_CHAR_CLASS_HPP diff --git a/dsp/lib/sprout/sprout/weed/parser/directive.hpp b/dsp/lib/sprout/sprout/weed/parser/directive.hpp deleted file mode 100644 index 81cf4e3..0000000 --- a/dsp/lib/sprout/sprout/weed/parser/directive.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_PARSER_DIRECTIVE_HPP -#define SPROUT_WEED_PARSER_DIRECTIVE_HPP - -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_WEED_PARSER_DIRECTIVE_HPP diff --git a/dsp/lib/sprout/sprout/weed/parser/directive/as_array.hpp b/dsp/lib/sprout/sprout/weed/parser/directive/as_array.hpp deleted file mode 100644 index db8e438..0000000 --- a/dsp/lib/sprout/sprout/weed/parser/directive/as_array.hpp +++ /dev/null @@ -1,97 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_PARSER_DIRECTIVE_AS_ARRAY_HPP -#define SPROUT_WEED_PARSER_DIRECTIVE_AS_ARRAY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // as_array_p - // - template - struct as_array_p - : public sprout::weed::parser_base - { - public: - template - struct attribute { - private: - typedef typename sprout::weed::traits::attribute_of::type attr_type; - private: - static_assert(!sprout::weed::traits::is_unused::value, "invalid attribute : unused"); - public: - typedef sprout::array type; - }; - template - struct result - : public sprout::identity::type> > - {}; - private: - typedef typename sprout::weed::traits::terminal_or_expr_of::type expr_type; - private: - expr_type expr_; - private: - template - SPROUT_CONSTEXPR typename result::type call( - Iterator first, - Result const& res - ) const - { - typedef typename result::type result_type; - typedef typename attribute::type attribute_type; - return res.success() - ? result_type(true, res.current(), attribute_type{res.attr()}) - : result_type(false, first, attribute_type()) - ; - } - public: - SPROUT_CONSTEXPR as_array_p() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - explicit SPROUT_CONSTEXPR as_array_p( - Parser const& p - ) - : expr_(sprout::weed::make_terminal_or_expr(p)) - {} - template - SPROUT_CONSTEXPR typename result::type operator()( - Iterator first, Iterator, - Context const& ctx - ) const - { - return call(first, sprout::weed::eval(expr_, ctx)); - } - }; - // - // as_array_d - // - struct as_array_d { - public: - template - SPROUT_CONSTEXPR sprout::weed::as_array_p operator[](Parser const& p) const { - return sprout::weed::as_array_p(p); - } - }; - // - // as_array - // - SPROUT_CONSTEXPR sprout::weed::as_array_d as_array = sprout::weed::as_array_d(); - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_PARSER_DIRECTIVE_AS_ARRAY_HPP diff --git a/dsp/lib/sprout/sprout/weed/parser/directive/as_tuple.hpp b/dsp/lib/sprout/sprout/weed/parser/directive/as_tuple.hpp deleted file mode 100644 index 6893163..0000000 --- a/dsp/lib/sprout/sprout/weed/parser/directive/as_tuple.hpp +++ /dev/null @@ -1,97 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_PARSER_DIRECTIVE_AS_TUPLE_HPP -#define SPROUT_WEED_PARSER_DIRECTIVE_AS_TUPLE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // as_tuple_p - // - template - struct as_tuple_p - : public sprout::weed::parser_base - { - public: - template - struct attribute { - private: - typedef typename sprout::weed::traits::attribute_of::type attr_type; - private: - static_assert(!sprout::weed::traits::is_unused::value, "invalid attribute : unused"); - public: - typedef sprout::tuples::tuple type; - }; - template - struct result - : public sprout::identity::type> > - {}; - private: - typedef typename sprout::weed::traits::terminal_or_expr_of::type expr_type; - private: - expr_type expr_; - private: - template - SPROUT_CONSTEXPR typename result::type call( - Iterator first, - Result const& res - ) const - { - typedef typename result::type result_type; - typedef typename attribute::type attribute_type; - return res.success() - ? result_type(true, res.current(), attribute_type(res.attr())) - : result_type(false, first, attribute_type()) - ; - } - public: - SPROUT_CONSTEXPR as_tuple_p() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - explicit SPROUT_CONSTEXPR as_tuple_p( - Parser const& p - ) - : expr_(sprout::weed::make_terminal_or_expr(p)) - {} - template - SPROUT_CONSTEXPR typename result::type operator()( - Iterator first, Iterator, - Context const& ctx - ) const - { - return call(first, sprout::weed::eval(expr_, ctx)); - } - }; - // - // as_tuple_d - // - struct as_tuple_d { - public: - template - SPROUT_CONSTEXPR sprout::weed::as_tuple_p operator[](Parser const& p) const { - return sprout::weed::as_tuple_p(p); - } - }; - // - // as_tuple - // - SPROUT_CONSTEXPR sprout::weed::as_tuple_d as_tuple = sprout::weed::as_tuple_d(); - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_PARSER_DIRECTIVE_AS_TUPLE_HPP diff --git a/dsp/lib/sprout/sprout/weed/parser/directive/omit.hpp b/dsp/lib/sprout/sprout/weed/parser/directive/omit.hpp deleted file mode 100644 index 46d3bfa..0000000 --- a/dsp/lib/sprout/sprout/weed/parser/directive/omit.hpp +++ /dev/null @@ -1,91 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_PARSER_DIRECTIVE_OMIT_HPP -#define SPROUT_WEED_PARSER_DIRECTIVE_OMIT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // omit_p - // - template - struct omit_p - : public sprout::weed::parser_base - { - public: - template - struct attribute - : public sprout::identity - {}; - template - struct result - : public sprout::identity::type> > - {}; - private: - typedef typename sprout::weed::traits::terminal_or_expr_of::type expr_type; - private: - expr_type expr_; - private: - template - SPROUT_CONSTEXPR typename result::type call( - Iterator first, - Result const& res - ) const - { - typedef typename result::type result_type; - typedef typename attribute::type attribute_type; - return res.success() - ? result_type(true, res.current(), attribute_type()) - : result_type(false, first, attribute_type()) - ; - } - public: - SPROUT_CONSTEXPR omit_p() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - explicit SPROUT_CONSTEXPR omit_p( - Parser const& p - ) - : expr_(sprout::weed::make_terminal_or_expr(p)) - {} - template - SPROUT_CONSTEXPR typename result::type operator()( - Iterator first, Iterator, - Context const& ctx - ) const - { - return call(first, sprout::weed::eval(expr_, ctx)); - } - }; - // - // omit_d - // - struct omit_d { - public: - template - SPROUT_CONSTEXPR sprout::weed::omit_p operator[](Parser const& p) const { - return sprout::weed::omit_p(p); - } - }; - // - // omit - // - SPROUT_CONSTEXPR sprout::weed::omit_d omit = sprout::weed::omit_d(); - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_PARSER_DIRECTIVE_OMIT_HPP diff --git a/dsp/lib/sprout/sprout/weed/parser/directive/repeat.hpp b/dsp/lib/sprout/sprout/weed/parser/directive/repeat.hpp deleted file mode 100644 index ba62465..0000000 --- a/dsp/lib/sprout/sprout/weed/parser/directive/repeat.hpp +++ /dev/null @@ -1,221 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_PARSER_DIRECTIVE_REPEAT_HPP -#define SPROUT_WEED_PARSER_DIRECTIVE_REPEAT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // repeat_p - // - template - struct repeat_p - : public sprout::weed::parser_base - { - public: - template - struct attribute; - template - struct result; - private: - template - struct eval { - private: - typedef typename sprout::weed::traits::limit_of::type limit; - typedef typename sprout::weed::traits::attribute_of::type attr_type; - public: - typedef typename repeat_p::template attribute::type attribute_type; - typedef typename repeat_p::template result::type result_type; - private: - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Attrs) + 1 == limit::value, - result_type - >::type call( - repeat_p const& p, - Iterator first, - Result const& res, - Attrs const&... attrs - ) const - { - return res.success() - ? result_type(true, res.current(), sprout::weed::attr_cnv::times(attrs..., res.attr())) - : p.count_ <= sizeof...(Attrs) - ? result_type(true, first, sprout::weed::attr_cnv::times(attrs...)) - : result_type(false, first, attribute_type()) - ; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - sizeof...(Attrs) + 1 != limit::value, - result_type - >::type call( - repeat_p const& p, - Iterator first, - Result const& res, - Attrs const&... attrs - ) const - { - return res.success() - ? call(p, p.count_ <= sizeof...(Attrs) ? res.current() : first, sprout::weed::eval(p.expr_, res.ctx()), attrs..., res.attr()) - : p.count_ <= sizeof...(Attrs) - ? result_type(true, first, sprout::weed::attr_cnv::times(attrs...)) - : result_type(false, first, attribute_type()) - ; - } - template - SPROUT_CONSTEXPR result_type call_inf( - repeat_p const& p, - Iterator first, - Result const& res, - std::size_t n - ) const - { - return res.success() - ? call_inf(p, p.count_ <= n ? res.current() : first, sprout::weed::eval(p.expr_, res.ctx()), n + 1) - : result_type(p.count_ <= n || p.count_ == std::size_t(-1), first, attribute_type()) - ; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - Infinity, - result_type - >::type call( - repeat_p const& p, - Iterator first, - Result const& res - ) const - { - return res.success() - ? call_inf( - p, - p.count_ <= 0 ? res.current() : first, - sprout::weed::eval(p.expr_, res.ctx()), - 1 - ) - : result_type(p.count_ <= 0 || p.count_ == std::size_t(-1), first, attribute_type()) - ; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - !Infinity, - result_type - >::type call( - repeat_p const& p, - Iterator first, - Result const& res - ) const - { - return res.success() - ? call( - p, - p.count_ <= 0 ? res.current() : first, - sprout::weed::eval(p.expr_, res.ctx()), - res.attr() - ) - : result_type(p.count_ <= 0, first, attribute_type()) - ; - } - public: - SPROUT_CONSTEXPR result_type operator()( - repeat_p const& p, - Iterator first, - Context const& ctx - ) const - { - return call( - p, - first, - sprout::weed::eval(p.expr_, ctx) - ); - } - }; - public: - template - struct attribute - : public sprout::weed::attr_cnv::results::times< - sprout::weed::traits::limit_of::value, - typename sprout::weed::traits::attribute_of::type - > - {}; - template - struct result - : public sprout::identity::type> > - {}; - private: - typedef typename sprout::weed::traits::terminal_or_expr_of::type expr_type; - private: - expr_type expr_; - std::size_t count_; - public: - SPROUT_CONSTEXPR repeat_p() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - explicit SPROUT_CONSTEXPR repeat_p(Parser const& p, std::size_t count = -1) - : expr_(sprout::weed::make_terminal_or_expr(p)) - , count_(count) - {} - template - SPROUT_CONSTEXPR typename result::type operator()( - Iterator first, Iterator, - Context const& ctx - ) const - { - return eval()(*this, first, ctx); - } - }; - - // - // repeat_g - // - struct repeat_g { - private: - std::size_t count_; - public: - explicit SPROUT_CONSTEXPR repeat_g(std::size_t count) - : count_(count) - {} - template - SPROUT_CONSTEXPR sprout::weed::repeat_p operator[](Parser const& p) const { - return sprout::weed::repeat_p(p, count_); - } - }; - - // - // repeat_d - // - struct repeat_d { - public: - template - SPROUT_CONSTEXPR sprout::weed::repeat_p operator[](Parser const& p) const { - return sprout::weed::repeat_p(p); - } - SPROUT_CONSTEXPR sprout::weed::repeat_g operator()(std::size_t count) const { - return sprout::weed::repeat_g(count); - } - }; - - // - // repeat - // - SPROUT_CONSTEXPR sprout::weed::repeat_d repeat = sprout::weed::repeat_d(); - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_PARSER_DIRECTIVE_REPEAT_HPP diff --git a/dsp/lib/sprout/sprout/weed/parser/directive/replace.hpp b/dsp/lib/sprout/sprout/weed/parser/directive/replace.hpp deleted file mode 100644 index d3ff162..0000000 --- a/dsp/lib/sprout/sprout/weed/parser/directive/replace.hpp +++ /dev/null @@ -1,112 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_PARSER_DIRECTIVE_REPLACE_HPP -#define SPROUT_WEED_PARSER_DIRECTIVE_REPLACE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // replace_p - // - template - struct replace_p - : public sprout::weed::parser_base - { - public: - typedef T value_type; - template - struct attribute - : public sprout::identity - {}; - template - struct result - : public sprout::identity::type> > - {}; - private: - typedef typename sprout::weed::traits::terminal_or_expr_of::type expr_type; - private: - expr_type expr_; - value_type value_; - private: - template - SPROUT_CONSTEXPR typename result::type call( - Iterator first, - Result const& res - ) const - { - typedef typename result::type result_type; - return res.success() - ? result_type(true, res.current(), value_) - : result_type(false, first, value_) - ; - } - public: - SPROUT_CONSTEXPR replace_p() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - SPROUT_CONSTEXPR replace_p( - Parser const& p, - value_type const& value - ) - : expr_(sprout::weed::make_terminal_or_expr(p)) - , value_(value) - {} - template - SPROUT_CONSTEXPR typename result::type operator()( - Iterator first, Iterator, - Context const& ctx - ) const - { - return call(first, sprout::weed::eval(expr_, ctx)); - } - }; - // - // replace_d - // - template - struct replace_d { - public: - typedef T value_type; - private: - value_type value_; - public: - explicit SPROUT_CONSTEXPR replace_d(value_type const& value) - : value_(value) - {} - template - SPROUT_CONSTEXPR sprout::weed::replace_p operator[](Parser const& p) const { - return sprout::weed::replace_p(p, value_); - } - }; - // - // replace_g - // - struct replace_g { - public: - template - SPROUT_CONSTEXPR sprout::weed::replace_d operator()(T const& value) const { - return sprout::weed::replace_d(value); - } - }; - // - // replace - // - SPROUT_CONSTEXPR sprout::weed::replace_g replace = sprout::weed::replace_g(); - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_PARSER_DIRECTIVE_REPLACE_HPP diff --git a/dsp/lib/sprout/sprout/weed/parser/lim.hpp b/dsp/lib/sprout/sprout/weed/parser/lim.hpp deleted file mode 100644 index dcfaad6..0000000 --- a/dsp/lib/sprout/sprout/weed/parser/lim.hpp +++ /dev/null @@ -1,101 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_PARSER_LIM_HPP -#define SPROUT_WEED_PARSER_LIM_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // limit_p - // - template - struct limit_p - : public sprout::weed::parser_base - { - public: - SPROUT_STATIC_CONSTEXPR std::size_t limit = Limit; - public: - template - struct attribute - : public sprout::weed::traits::attribute_of - {}; - template - struct result - : public sprout::identity::type> > - {}; - private: - typedef typename sprout::weed::traits::terminal_or_expr_of::type expr_type; - private: - expr_type expr_; - sprout::weed::limited::category limited_category_; - public: - SPROUT_CONSTEXPR limit_p() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - explicit SPROUT_CONSTEXPR limit_p( - Parser const& p, - sprout::weed::limited::category limited_category = sprout::weed::limited::discard - ) - : expr_(sprout::weed::make_terminal_or_expr(p)) - , limited_category_(limited_category) - {} - SPROUT_CONSTEXPR sprout::weed::limited::category limited_category() const { - return limited_category_; - } - template - SPROUT_CONSTEXPR typename result::type operator()( - Iterator, Iterator, - Context const& ctx - ) const - { - return sprout::weed::eval(expr_, ctx).presult(); - } - }; - template - SPROUT_CONSTEXPR_OR_CONST std::size_t limit_p::limit; - - // - // lim - // - template - SPROUT_CONSTEXPR sprout::weed::limit_p lim(Parser const& p) { - return sprout::weed::limit_p(p); - } - template - SPROUT_CONSTEXPR sprout::weed::limit_p lim( - Parser const& p, - sprout::weed::limited::category limited_category - ) - { - return sprout::weed::limit_p(p, limited_category); - } - - namespace traits { - // - // limit_of - // - template - struct limit_of, Iterator, Context> - : public sprout::integral_constant - {}; - } // namespace traits - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_PARSER_LIM_HPP diff --git a/dsp/lib/sprout/sprout/weed/parser/lit.hpp b/dsp/lib/sprout/sprout/weed/parser/lit.hpp deleted file mode 100644 index 014cae0..0000000 --- a/dsp/lib/sprout/sprout/weed/parser/lit.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_PARSER_LIT_HPP -#define SPROUT_WEED_PARSER_LIT_HPP - -#include -#include -#include - -namespace sprout { - namespace weed { - // - // lit_g - // - struct lit_g { - public: - template - struct eval; - public: - template - SPROUT_CONSTEXPR typename eval< - typename sprout::remove_shallow_cvref::type - >::result_type - operator()(T&& t) const { - typedef eval::type> eval_type; - return eval_type()(SPROUT_FORWARD(T, t)); - } - }; - // - // lit - // - SPROUT_STATIC_CONSTEXPR sprout::weed::lit_g lit = sprout::weed::lit_g(); - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_PARSER_LIT_HPP diff --git a/dsp/lib/sprout/sprout/weed/parser/numeric.hpp b/dsp/lib/sprout/sprout/weed/parser/numeric.hpp deleted file mode 100644 index e2df4bb..0000000 --- a/dsp/lib/sprout/sprout/weed/parser/numeric.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_PARSER_NUMERIC_HPP -#define SPROUT_WEED_PARSER_NUMERIC_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_WEED_PARSER_NUMERIC_HPP diff --git a/dsp/lib/sprout/sprout/weed/parser/numeric/bin.hpp b/dsp/lib/sprout/sprout/weed/parser/numeric/bin.hpp deleted file mode 100644 index d3c4ed4..0000000 --- a/dsp/lib/sprout/sprout/weed/parser/numeric/bin.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_PARSER_NUMERIC_BIN_HPP -#define SPROUT_WEED_PARSER_NUMERIC_BIN_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // bin - // - SPROUT_STATIC_CONSTEXPR auto bin = sprout::weed::uint_p(-1)>(); - - // - // bin8 - // bin16 - // bin32 - // bin64 - // - SPROUT_STATIC_CONSTEXPR auto bin8 = sprout::weed::uint_p(); - SPROUT_STATIC_CONSTEXPR auto bin16 = sprout::weed::uint_p(); - SPROUT_STATIC_CONSTEXPR auto bin32 = sprout::weed::uint_p(); - SPROUT_STATIC_CONSTEXPR auto bin64 = sprout::weed::uint_p(); - - // - // bin8f - // bin16f - // bin32f - // bin64f - // - SPROUT_STATIC_CONSTEXPR auto bin8f = sprout::weed::uint_p::value>(); - SPROUT_STATIC_CONSTEXPR auto bin16f = sprout::weed::uint_p::value>(); - SPROUT_STATIC_CONSTEXPR auto bin32f = sprout::weed::uint_p::value>(); - SPROUT_STATIC_CONSTEXPR auto bin64f = sprout::weed::uint_p::value>(); - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_PARSER_NUMERIC_BIN_HPP diff --git a/dsp/lib/sprout/sprout/weed/parser/numeric/hex.hpp b/dsp/lib/sprout/sprout/weed/parser/numeric/hex.hpp deleted file mode 100644 index 575cb32..0000000 --- a/dsp/lib/sprout/sprout/weed/parser/numeric/hex.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_PARSER_NUMERIC_HEX_HPP -#define SPROUT_WEED_PARSER_NUMERIC_HEX_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // hex - // - SPROUT_STATIC_CONSTEXPR auto hex = sprout::weed::uint_p(-1)>(); - - // - // hex8 - // hex16 - // hex32 - // hex64 - // - SPROUT_STATIC_CONSTEXPR auto hex8 = sprout::weed::uint_p(); - SPROUT_STATIC_CONSTEXPR auto hex16 = sprout::weed::uint_p(); - SPROUT_STATIC_CONSTEXPR auto hex32 = sprout::weed::uint_p(); - SPROUT_STATIC_CONSTEXPR auto hex64 = sprout::weed::uint_p(); - - // - // hex8f - // hex16f - // hex32f - // hex64f - // - SPROUT_STATIC_CONSTEXPR auto hex8f = sprout::weed::uint_p::value>(); - SPROUT_STATIC_CONSTEXPR auto hex16f = sprout::weed::uint_p::value>(); - SPROUT_STATIC_CONSTEXPR auto hex32f = sprout::weed::uint_p::value>(); - SPROUT_STATIC_CONSTEXPR auto hex64f = sprout::weed::uint_p::value>(); - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_PARSER_NUMERIC_HEX_HPP diff --git a/dsp/lib/sprout/sprout/weed/parser/numeric/int.hpp b/dsp/lib/sprout/sprout/weed/parser/numeric/int.hpp deleted file mode 100644 index a3a3493..0000000 --- a/dsp/lib/sprout/sprout/weed/parser/numeric/int.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_PARSER_NUMERIC_INT_HPP -#define SPROUT_WEED_PARSER_NUMERIC_INT_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // int_ - // - SPROUT_STATIC_CONSTEXPR auto int_ = sprout::weed::int_p(-1)>(); - - // - // int8 - // int16 - // int32 - // int64 - // - SPROUT_STATIC_CONSTEXPR auto int8 = sprout::weed::int_p(); - SPROUT_STATIC_CONSTEXPR auto int16 = sprout::weed::int_p(); - SPROUT_STATIC_CONSTEXPR auto int32 = sprout::weed::int_p(); - SPROUT_STATIC_CONSTEXPR auto int64 = sprout::weed::int_p(); - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_PARSER_NUMERIC_INT_HPP diff --git a/dsp/lib/sprout/sprout/weed/parser/numeric/int_p.hpp b/dsp/lib/sprout/sprout/weed/parser/numeric/int_p.hpp deleted file mode 100644 index c5682cc..0000000 --- a/dsp/lib/sprout/sprout/weed/parser/numeric/int_p.hpp +++ /dev/null @@ -1,219 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_PARSER_NUMERIC_INT_P_HPP -#define SPROUT_WEED_PARSER_NUMERIC_INT_P_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // int_p - // - template< - typename IntType, - std::size_t Radix = 10, - std::size_t MinDigits = 1, - std::size_t MaxDigits = sprout::integer_digits::value - > - struct int_p - : public sprout::weed::parser_base - { - private: - SPROUT_STATIC_CONSTEXPR std::size_t limit_digits = MaxDigits <= sprout::integer_digits::value - ? MaxDigits - : sprout::integer_digits::value - ; - public: - template - struct attribute - : public sprout::identity - {}; - template - struct result - : public sprout::identity::type> > - {}; - private: - template - SPROUT_CONSTEXPR typename result::type make_result( - typename result::type const& res, - int sign = 0 - ) const - { - typedef typename result::type result_type; - return res.success() && sign < 0 - ? result_type(true, res.current(), -res.attr()) - : res - ; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - N == limit_digits, - typename result::type - >::type call_1( - Iterator first, Iterator last, - Iterator temp_first, - IntType t, - std::size_t n, - PResult const& res - ) const - { - typedef typename result::type result_type; - typedef typename attribute::type attribute_type; - return sprout::tuples::get<1>(res) - ? n < MaxDigits - ? call_0( - sprout::next(first), last, - temp_first, - static_cast(t * Radix + sprout::tuples::get<0>(res)), - n - ) - : result_type( - true, - sprout::next(first), - static_cast(t * Radix + sprout::tuples::get<0>(res)) - ) - : N < MinDigits - ? result_type(false, temp_first, attribute_type()) - : result_type(true, first, t) - ; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - N != limit_digits, - typename result::type - >::type call_1( - Iterator first, Iterator last, - Iterator temp_first, - IntType t, - std::size_t n, - PResult const& res - ) const - { - typedef typename result::type result_type; - typedef typename attribute::type attribute_type; - return sprout::tuples::get<1>(res) - ? call_0( - sprout::next(first), last, - temp_first, - static_cast(t * Radix + sprout::tuples::get<0>(res)), - n - ) - : N < MinDigits - ? result_type(false, temp_first, attribute_type()) - : result_type(true, first, t) - ; - } - template - SPROUT_CONSTEXPR typename result::type call_0( - Iterator first, Iterator last, - Iterator temp_first, - IntType t, - std::size_t n - ) const - { - typedef typename result::type result_type; - typedef typename attribute::type attribute_type; - return first != last - ? call_1( - first, last, - temp_first, - t, - n + 1, - sprout::weed::detail::from_ndigit(*first) - ) - : N < MinDigits - ? result_type(false, temp_first, attribute_type()) - : result_type(true, first, t) - ; - } - template - SPROUT_CONSTEXPR typename result::type call_i( - Iterator first, Iterator last, - Iterator temp_first, - PResult const& res - ) const - { - typedef typename result::type result_type; - typedef typename attribute::type attribute_type; - return sprout::tuples::get<1>(res) - ? call_0<1, Context>( - sprout::next(first), last, - temp_first, - sprout::tuples::get<0>(res), - 1 - ) - : result_type(false, temp_first, attribute_type()) - ; - } - template - SPROUT_CONSTEXPR typename result::type call( - Iterator first, Iterator last, - Iterator temp_first, - int sign = 0 - ) const - { - typedef typename result::type result_type; - typedef typename attribute::type attribute_type; - return first != last - ? make_result( - call_i( - first, last, - temp_first, - sprout::weed::detail::from_ndigit(*first) - ), - sign - ) - : result_type(false, temp_first, attribute_type()) - ; - } - public: - template - SPROUT_CONSTEXPR typename result::type operator()( - Iterator first, Iterator last, - Context const& - ) const - { - typedef typename std::iterator_traits::value_type elem_type; - typedef typename result::type result_type; - typedef typename attribute::type attribute_type; - return first != last - ? *first == SPROUT_CHAR_LITERAL('+', elem_type) - ? call( - sprout::next(first), last, - first, - 1 - ) - : *first == SPROUT_CHAR_LITERAL('-', elem_type) - ? call( - sprout::next(first), last, - first, - -1 - ) - : call( - first, last, - first - ) - : result_type(false, first, attribute_type()) - ; - } - }; - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_PARSER_NUMERIC_INT_P_HPP diff --git a/dsp/lib/sprout/sprout/weed/parser/numeric/oct.hpp b/dsp/lib/sprout/sprout/weed/parser/numeric/oct.hpp deleted file mode 100644 index bacf56b..0000000 --- a/dsp/lib/sprout/sprout/weed/parser/numeric/oct.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_PARSER_NUMERIC_OCT_HPP -#define SPROUT_WEED_PARSER_NUMERIC_OCT_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // oct - // - SPROUT_STATIC_CONSTEXPR auto oct = sprout::weed::uint_p(-1)>(); - - // - // oct8 - // oct16 - // oct32 - // oct64 - // - SPROUT_STATIC_CONSTEXPR auto oct8 = sprout::weed::uint_p(); - SPROUT_STATIC_CONSTEXPR auto oct16 = sprout::weed::uint_p(); - SPROUT_STATIC_CONSTEXPR auto oct32 = sprout::weed::uint_p(); - SPROUT_STATIC_CONSTEXPR auto oct64 = sprout::weed::uint_p(); - - // - // oct8f - // oct16f - // oct32f - // oct64f - // - SPROUT_STATIC_CONSTEXPR auto oct8f = sprout::weed::uint_p::value>(); - SPROUT_STATIC_CONSTEXPR auto oct16f = sprout::weed::uint_p::value>(); - SPROUT_STATIC_CONSTEXPR auto oct32f = sprout::weed::uint_p::value>(); - SPROUT_STATIC_CONSTEXPR auto oct64f = sprout::weed::uint_p::value>(); - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_PARSER_NUMERIC_OCT_HPP diff --git a/dsp/lib/sprout/sprout/weed/parser/numeric/uint.hpp b/dsp/lib/sprout/sprout/weed/parser/numeric/uint.hpp deleted file mode 100644 index 84902b5..0000000 --- a/dsp/lib/sprout/sprout/weed/parser/numeric/uint.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_PARSER_NUMERIC_UINT_HPP -#define SPROUT_WEED_PARSER_NUMERIC_UINT_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // uint_ - // - SPROUT_STATIC_CONSTEXPR auto uint_ = sprout::weed::uint_p(-1)>(); - - // - // uint8 - // uint16 - // uint32 - // uint64 - // - SPROUT_STATIC_CONSTEXPR auto uint8 = sprout::weed::uint_p(); - SPROUT_STATIC_CONSTEXPR auto uint16 = sprout::weed::uint_p(); - SPROUT_STATIC_CONSTEXPR auto uint32 = sprout::weed::uint_p(); - SPROUT_STATIC_CONSTEXPR auto uint64 = sprout::weed::uint_p(); - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_PARSER_NUMERIC_UINT_HPP diff --git a/dsp/lib/sprout/sprout/weed/parser/numeric/uint_p.hpp b/dsp/lib/sprout/sprout/weed/parser/numeric/uint_p.hpp deleted file mode 100644 index 82e8c2b..0000000 --- a/dsp/lib/sprout/sprout/weed/parser/numeric/uint_p.hpp +++ /dev/null @@ -1,196 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_PARSER_NUMERIC_UINT_P_HPP -#define SPROUT_WEED_PARSER_NUMERIC_UINT_P_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // uint_p - // - template< - typename UIntType, - std::size_t Radix = 10, - std::size_t MinDigits = 1, - std::size_t MaxDigits = sprout::integer_digits::value - > - struct uint_p - : public sprout::weed::parser_base - { - private: - SPROUT_STATIC_CONSTEXPR std::size_t limit_digits = MaxDigits <= sprout::integer_digits::value - ? MaxDigits - : sprout::integer_digits::value - ; - public: - template - struct attribute - : public sprout::identity - {}; - template - struct result - : public sprout::identity::type> > - {}; - private: - template - SPROUT_CONSTEXPR typename result::type make_result( - typename result::type const& res, - int sign = 0 - ) const - { - typedef typename result::type result_type; - return res.success() && sign < 0 - ? result_type(true, res.current(), -res.attr()) - : res - ; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - N == limit_digits, - typename result::type - >::type call_1( - Iterator first, Iterator last, - Iterator temp_first, - UIntType t, - std::size_t n, - PResult const& res - ) const - { - typedef typename result::type result_type; - typedef typename attribute::type attribute_type; - return sprout::tuples::get<1>(res) - ? n < MaxDigits - ? call_0( - sprout::next(first), last, - temp_first, - static_cast(t * Radix + sprout::tuples::get<0>(res)), - n - ) - : result_type( - true, - sprout::next(first), - static_cast(t * Radix + sprout::tuples::get<0>(res)) - ) - : N < MinDigits - ? result_type(false, temp_first, attribute_type()) - : result_type(true, first, t) - ; - } - template - SPROUT_CONSTEXPR typename std::enable_if< - N != limit_digits, - typename result::type - >::type call_1( - Iterator first, Iterator last, - Iterator temp_first, - UIntType t, - std::size_t n, - PResult const& res - ) const - { - typedef typename result::type result_type; - typedef typename attribute::type attribute_type; - return sprout::tuples::get<1>(res) - ? call_0( - sprout::next(first), last, - temp_first, - static_cast(t * Radix + sprout::tuples::get<0>(res)), - n - ) - : N < MinDigits - ? result_type(false, temp_first, attribute_type()) - : result_type(true, first, t) - ; - } - template - SPROUT_CONSTEXPR typename result::type call_0( - Iterator first, Iterator last, - Iterator temp_first, - UIntType t, - std::size_t n - ) const - { - typedef typename result::type result_type; - typedef typename attribute::type attribute_type; - return first != last - ? call_1( - first, last, - temp_first, - t, - n + 1, - sprout::weed::detail::from_ndigit(*first) - ) - : N < MinDigits - ? result_type(false, temp_first, attribute_type()) - : result_type(true, first, t) - ; - } - template - SPROUT_CONSTEXPR typename result::type call_i( - Iterator first, Iterator last, - Iterator temp_first, - PResult const& res - ) const - { - typedef typename result::type result_type; - typedef typename attribute::type attribute_type; - return sprout::tuples::get<1>(res) - ? call_0<1, Context>( - sprout::next(first), last, - temp_first, - sprout::tuples::get<0>(res), - 1 - ) - : result_type(false, temp_first, attribute_type()) - ; - } - template - SPROUT_CONSTEXPR typename result::type call( - Iterator first, Iterator last, - Iterator temp_first - ) const - { - return call_i( - first, last, - temp_first, - sprout::weed::detail::from_ndigit(*first) - ); - } - public: - template - SPROUT_CONSTEXPR typename result::type operator()( - Iterator first, Iterator last, - Context const& - ) const - { - typedef typename result::type result_type; - typedef typename attribute::type attribute_type; - return first != last - ? call( - first, last, - first - ) - : result_type(false, first, attribute_type()) - ; - } - }; - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_PARSER_NUMERIC_UINT_P_HPP diff --git a/dsp/lib/sprout/sprout/weed/parser/parser_base.hpp b/dsp/lib/sprout/sprout/weed/parser/parser_base.hpp deleted file mode 100644 index 93b7721..0000000 --- a/dsp/lib/sprout/sprout/weed/parser/parser_base.hpp +++ /dev/null @@ -1,22 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_PARSER_PARSER_BASE_HPP -#define SPROUT_WEED_PARSER_PARSER_BASE_HPP - -#include - -namespace sprout { - namespace weed { - // - // parser_base - // - class parser_base {}; - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_PARSER_PARSER_BASE_HPP diff --git a/dsp/lib/sprout/sprout/weed/parser/string.hpp b/dsp/lib/sprout/sprout/weed/parser/string.hpp deleted file mode 100644 index 3a5f41b..0000000 --- a/dsp/lib/sprout/sprout/weed/parser/string.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_PARSER_STRING_HPP -#define SPROUT_WEED_PARSER_STRING_HPP - -#include -#include - -#endif // #ifndef SPROUT_WEED_PARSER_STRING_HPP diff --git a/dsp/lib/sprout/sprout/weed/parser/string/string.hpp b/dsp/lib/sprout/sprout/weed/parser/string/string.hpp deleted file mode 100644 index 39bb419..0000000 --- a/dsp/lib/sprout/sprout/weed/parser/string/string.hpp +++ /dev/null @@ -1,164 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_PARSER_STRING_STRING_HPP -#define SPROUT_WEED_PARSER_STRING_STRING_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - // - // lit_str_p - // - template - struct lit_str_p - : public sprout::weed::parser_base - { - public: - template - struct attribute - : public sprout::identity - {}; - template - struct result - : public sprout::identity::type> > - {}; - private: - T t_; - public: - SPROUT_CONSTEXPR lit_str_p() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - explicit SPROUT_CONSTEXPR lit_str_p(T const& t) - : t_(t) - {} - template - SPROUT_CONSTEXPR typename result::type operator()( - Iterator first, Iterator last, - Context const& - ) const - { - typedef typename result::type result_type; - typedef typename attribute::type attribute_type; - return sprout::distance(first, last) >= sprout::size(t_) - && sprout::equal(sprout::begin(t_), sprout::end(t_), first) - ? result_type(true, sprout::next(first, sprout::size(t_)), attribute_type()) - : result_type(false, first, typename attribute::type()) - ; - } - }; - // - // lit_g - // - template - struct lit_g::eval< - T, - typename std::enable_if< - sprout::weed::traits::is_c_str::value - >::type - > { - public: - typedef sprout::weed::lit_str_p< - typename sprout::weed::detail::c_str_as_string::type - > result_type; - public: - SPROUT_CONSTEXPR result_type operator()(T const& t) const { - return result_type(sprout::to_string(t)); - } - }; - template - struct lit_g::eval< - T, - typename std::enable_if< - sprout::weed::traits::is_string::value - >::type - > { - public: - typedef sprout::weed::lit_str_p result_type; - public: - SPROUT_CONSTEXPR result_type operator()(T const& t) const { - return result_type(t); - } - }; - - // - // str_p - // - template - struct str_p - : public sprout::weed::parser_base - { - public: - template - struct attribute - : public sprout::identity - {}; - template - struct result - : public sprout::identity::type> > - {}; - private: - T t_; - public: - SPROUT_CONSTEXPR str_p() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - explicit SPROUT_CONSTEXPR str_p(T const& t) - : t_(t) - {} - template - SPROUT_CONSTEXPR typename result::type operator()( - Iterator first, Iterator last, - Context const& - ) const - { - typedef typename result::type result_type; - typedef typename attribute::type attribute_type; - return sprout::distance(first, last) >= sprout::size(t_) - && sprout::equal(sprout::begin(t_), sprout::end(t_), first) - ? result_type(true, sprout::next(first, sprout::size(t_)), attribute_type()) - : result_type(false, first, typename attribute::type()) - ; - } - }; - // - // string - // - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::traits::is_c_str::value, - sprout::weed::str_p< - typename sprout::weed::detail::c_str_as_string::type - > - >::type string(T const& t) { - return sprout::weed::str_p< - typename sprout::weed::detail::c_str_as_string::type - >(sprout::to_string(t)); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - sprout::weed::traits::is_string::value, - sprout::weed::str_p - >::type string(T const& t) { - return sprout::weed::str_p(t); - } - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_PARSER_STRING_STRING_HPP diff --git a/dsp/lib/sprout/sprout/weed/parser_result.hpp b/dsp/lib/sprout/sprout/weed/parser_result.hpp deleted file mode 100644 index 5679ef6..0000000 --- a/dsp/lib/sprout/sprout/weed/parser_result.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_PARSER_RESULT_HPP -#define SPROUT_WEED_PARSER_RESULT_HPP - -#include - -namespace sprout { - namespace weed { - // - // parser_result - // - template - class parser_result { - private: - bool success_; - Iterator current_; - Attribute attr_; - public: - SPROUT_CONSTEXPR parser_result() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - SPROUT_CONSTEXPR parser_result( - bool success, - Iterator current, - Attribute const& attr - ) - : success_(success) - , current_(current) - , attr_(attr) - {} - SPROUT_CONSTEXPR bool success() const { - return success_; - } - SPROUT_CONSTEXPR Iterator current() const { - return current_; - } - SPROUT_CONSTEXPR Attribute const& attr() const { - return attr_; - } - }; - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_PARSER_RESULT_HPP diff --git a/dsp/lib/sprout/sprout/weed/traits.hpp b/dsp/lib/sprout/sprout/weed/traits.hpp deleted file mode 100644 index deeb9f9..0000000 --- a/dsp/lib/sprout/sprout/weed/traits.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_TRAITS_HPP -#define SPROUT_WEED_TRAITS_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_WEED_TRAITS_HPP diff --git a/dsp/lib/sprout/sprout/weed/traits/expr.hpp b/dsp/lib/sprout/sprout/weed/traits/expr.hpp deleted file mode 100644 index 888d184..0000000 --- a/dsp/lib/sprout/sprout/weed/traits/expr.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_TRAITS_EXPR_HPP -#define SPROUT_WEED_TRAITS_EXPR_HPP - -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_WEED_TRAITS_EXPR_HPP diff --git a/dsp/lib/sprout/sprout/weed/traits/expr/expr_of.hpp b/dsp/lib/sprout/sprout/weed/traits/expr/expr_of.hpp deleted file mode 100644 index 0130757..0000000 --- a/dsp/lib/sprout/sprout/weed/traits/expr/expr_of.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_TRAITS_EXPR_EXPR_OF_HPP -#define SPROUT_WEED_TRAITS_EXPR_EXPR_OF_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace traits { - // - // expr_of - // - template - struct expr_of - : public sprout::identity< - sprout::weed::expr< - Tag, - typename sprout::weed::traits::terminal_or_expr_of< - typename std::remove_reference::type - >::type... - > - > - {}; - } // namespace traits - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_TRAITS_EXPR_EXPR_OF_HPP diff --git a/dsp/lib/sprout/sprout/weed/traits/expr/is_expr.hpp b/dsp/lib/sprout/sprout/weed/traits/expr/is_expr.hpp deleted file mode 100644 index 6c819bb..0000000 --- a/dsp/lib/sprout/sprout/weed/traits/expr/is_expr.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_TRAITS_EXPR_IS_EXPR_HPP -#define SPROUT_WEED_TRAITS_EXPR_IS_EXPR_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace traits { - // - // is_expr - // - template - struct is_expr - : public sprout::false_type - {}; - template - struct is_expr - : public sprout::weed::traits::is_expr - {}; - template - struct is_expr - : public sprout::weed::traits::is_expr - {}; - template - struct is_expr - : public sprout::weed::traits::is_expr - {}; - template - struct is_expr > - : public sprout::true_type - {}; - } // namespace traits - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_TRAITS_EXPR_IS_EXPR_HPP diff --git a/dsp/lib/sprout/sprout/weed/traits/expr/tag_of.hpp b/dsp/lib/sprout/sprout/weed/traits/expr/tag_of.hpp deleted file mode 100644 index 552f83d..0000000 --- a/dsp/lib/sprout/sprout/weed/traits/expr/tag_of.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_TRAITS_EXPR_TAG_OF_HPP -#define SPROUT_WEED_TRAITS_EXPR_TAG_OF_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace traits { - // - // tag_of - // - template - struct tag_of; - template - struct tag_of - : public sprout::weed::traits::tag_of - {}; - template - struct tag_of< - Expr, - typename std::enable_if< - sprout::weed::traits::is_expr::value - >::type - > - : public sprout::identity - {}; - } // namespace traits - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_TRAITS_EXPR_TAG_OF_HPP diff --git a/dsp/lib/sprout/sprout/weed/traits/expr/terminal_of.hpp b/dsp/lib/sprout/sprout/weed/traits/expr/terminal_of.hpp deleted file mode 100644 index 8b59499..0000000 --- a/dsp/lib/sprout/sprout/weed/traits/expr/terminal_of.hpp +++ /dev/null @@ -1,66 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_TRAITS_EXPR_TERMINAL_OF_HPP -#define SPROUT_WEED_TRAITS_EXPR_TERMINAL_OF_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace traits { - // - // terminal_of - // - template - struct terminal_of; - template - struct terminal_of< - Arg, - typename std::enable_if< - !sprout::weed::traits::is_c_str< - typename std::remove_reference::type - >::value - >::type - > - : public sprout::identity< - sprout::weed::expr< - sprout::weed::tag::terminal, - typename sprout::remove_shallow_cvref::type - > - > - {}; - template - struct terminal_of< - Arg, - typename std::enable_if< - sprout::weed::traits::is_c_str< - typename std::remove_reference::type - >::value - >::type - > - : public sprout::identity< - sprout::weed::expr< - sprout::weed::tag::terminal, - typename sprout::weed::detail::c_str_as_string< - typename std::remove_reference::type - >::type - > - > - {}; - } // namespace traits - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_TRAITS_EXPR_TERMINAL_OF_HPP diff --git a/dsp/lib/sprout/sprout/weed/traits/expr/terminal_or_expr_of.hpp b/dsp/lib/sprout/sprout/weed/traits/expr/terminal_or_expr_of.hpp deleted file mode 100644 index 5c79d60..0000000 --- a/dsp/lib/sprout/sprout/weed/traits/expr/terminal_or_expr_of.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_TRAITS_EXPR_TERMINAL_OR_EXPR_OF_HPP -#define SPROUT_WEED_TRAITS_EXPR_TERMINAL_OR_EXPR_OF_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace traits { - // - // terminal_or_expr_of - // - template - struct terminal_or_expr_of - : public std::conditional< - sprout::weed::traits::is_expr< - typename std::remove_reference::type - >::value, - sprout::remove_shallow_cvref, - sprout::weed::traits::terminal_of - >::type - {}; - } // namespace traits - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_TRAITS_EXPR_TERMINAL_OR_EXPR_OF_HPP diff --git a/dsp/lib/sprout/sprout/weed/traits/parser.hpp b/dsp/lib/sprout/sprout/weed/traits/parser.hpp deleted file mode 100644 index 742ec44..0000000 --- a/dsp/lib/sprout/sprout/weed/traits/parser.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_TRAITS_PARSER_HPP -#define SPROUT_WEED_TRAITS_PARSER_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_WEED_TRAITS_PARSER_HPP diff --git a/dsp/lib/sprout/sprout/weed/traits/parser/attribute_of.hpp b/dsp/lib/sprout/sprout/weed/traits/parser/attribute_of.hpp deleted file mode 100644 index 31d0754..0000000 --- a/dsp/lib/sprout/sprout/weed/traits/parser/attribute_of.hpp +++ /dev/null @@ -1,83 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_TRAITS_PARSER_ATTRIBUTE_OF_HPP -#define SPROUT_WEED_TRAITS_PARSER_ATTRIBUTE_OF_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace traits { - // - // attribute_of - // - template - struct attribute_of; - template - struct attribute_of - : public sprout::weed::traits::attribute_of - {}; - template - struct attribute_of< - T, - Iterator, - Context, - typename std::enable_if< - sprout::weed::traits::is_parser::value - && !sprout::weed::traits::is_expr::value - && !sprout::weed::traits::is_char_type::value - && !sprout::weed::traits::is_c_str::value - && !sprout::weed::traits::is_string::value - >::type - > - : public T::template attribute - {}; - template - struct attribute_of< - T, - Iterator, - Context, - typename std::enable_if< - sprout::weed::traits::is_expr::value - >::type - > - : public sprout::identity::attribute_type> - {}; - template - struct attribute_of< - T, - Iterator, - Context, - typename std::enable_if< - sprout::weed::traits::is_char_type::value - || sprout::weed::traits::is_c_str::value - || sprout::weed::traits::is_string::value - >::type - > - : public sprout::weed::traits::attribute_of< - typename sprout::weed::traits::terminal_of::type, - Iterator, - Context - > - {}; - } // namespace traits - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_TRAITS_PARSER_ATTRIBUTE_OF_HPP diff --git a/dsp/lib/sprout/sprout/weed/traits/parser/is_parser.hpp b/dsp/lib/sprout/sprout/weed/traits/parser/is_parser.hpp deleted file mode 100644 index 1db0127..0000000 --- a/dsp/lib/sprout/sprout/weed/traits/parser/is_parser.hpp +++ /dev/null @@ -1,83 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_TRAITS_PARSER_IS_PARSER_HPP -#define SPROUT_WEED_TRAITS_PARSER_IS_PARSER_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace traits { - // - // is_parser - // - template - struct is_parser; - template - struct is_parser< - T, - typename std::enable_if< - std::is_base_of::value - && !std::is_const::value - >::type - > - : public sprout::true_type - {}; - template - struct is_parser< - T, - typename std::enable_if< - sprout::weed::traits::is_expr::value - && !std::is_const::value - >::type - > - : public sprout::true_type - {}; - template - struct is_parser< - T, - typename std::enable_if< - sprout::weed::traits::is_char_type::value - && !std::is_const::value - >::type - > - : public sprout::true_type - {}; - template - struct is_parser< - T, - typename std::enable_if< - sprout::weed::traits::is_c_str::value - && !std::is_const::value - >::type - > - : public sprout::true_type - {}; - template - struct is_parser< - T, - typename std::enable_if< - std::is_const::value - >::type - > - : public sprout::weed::traits::is_parser< - typename std::remove_const::type - > - {}; - } // namespace traits - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_TRAITS_PARSER_IS_PARSER_HPP diff --git a/dsp/lib/sprout/sprout/weed/traits/parser/limit_of.hpp b/dsp/lib/sprout/sprout/weed/traits/parser/limit_of.hpp deleted file mode 100644 index abbc203..0000000 --- a/dsp/lib/sprout/sprout/weed/traits/parser/limit_of.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_TRAITS_PARSER_LIMIT_OF_HPP -#define SPROUT_WEED_TRAITS_PARSER_LIMIT_OF_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace traits { - // - // limit_of - // - template - struct limit_of - : public sprout::integral_constant(-1)> - {}; - template - struct limit_of - : public sprout::weed::traits::limit_of - {}; - template - struct limit_of, Iterator, Context> - : public sprout::weed::traits::limit_of - {}; - } // namespace traits - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_TRAITS_PARSER_LIMIT_OF_HPP diff --git a/dsp/lib/sprout/sprout/weed/traits/type.hpp b/dsp/lib/sprout/sprout/weed/traits/type.hpp deleted file mode 100644 index 6baafc3..0000000 --- a/dsp/lib/sprout/sprout/weed/traits/type.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_TRAITS_TYPE_HPP -#define SPROUT_WEED_TRAITS_TYPE_HPP - -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef SPROUT_WEED_TRAITS_TYPE_HPP diff --git a/dsp/lib/sprout/sprout/weed/traits/type/is_c_str.hpp b/dsp/lib/sprout/sprout/weed/traits/type/is_c_str.hpp deleted file mode 100644 index 85bf754..0000000 --- a/dsp/lib/sprout/sprout/weed/traits/type/is_c_str.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_TRAITS_TYPE_IS_C_STR_HPP -#define SPROUT_WEED_TRAITS_TYPE_IS_C_STR_HPP - -#include -#include - -namespace sprout { - namespace weed { - namespace traits { - // - // is_c_str - // - template - struct is_c_str - : public sprout::is_c_str - {}; - } // namespace traits - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_TRAITS_TYPE_IS_C_STR_HPP diff --git a/dsp/lib/sprout/sprout/weed/traits/type/is_char_type.hpp b/dsp/lib/sprout/sprout/weed/traits/type/is_char_type.hpp deleted file mode 100644 index 6a120b6..0000000 --- a/dsp/lib/sprout/sprout/weed/traits/type/is_char_type.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_TRAITS_TYPE_IS_CHAR_TYPE_HPP -#define SPROUT_WEED_TRAITS_TYPE_IS_CHAR_TYPE_HPP - -#include -#include - -namespace sprout { - namespace weed { - namespace traits { - // - // is_char_type - // - template - struct is_char_type - : public sprout::is_char_type - {}; - } // namespace traits - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_TRAITS_TYPE_IS_CHAR_TYPE_HPP diff --git a/dsp/lib/sprout/sprout/weed/traits/type/is_container.hpp b/dsp/lib/sprout/sprout/weed/traits/type/is_container.hpp deleted file mode 100644 index d4876dc..0000000 --- a/dsp/lib/sprout/sprout/weed/traits/type/is_container.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_TRAITS_TYPE_IS_CONTAINER_HPP -#define SPROUT_WEED_TRAITS_TYPE_IS_CONTAINER_HPP - -#include -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace traits { - // - // is_container - // - template - struct is_container - : public sprout::false_type - {}; - template - struct is_container - : public sprout::weed::traits::is_container - {}; - template - struct is_container - : public sprout::weed::traits::is_container - {}; - template - struct is_container - : public sprout::weed::traits::is_container - {}; - template - struct is_container > - : public sprout::true_type - {}; - template - struct is_container > - : public sprout::true_type - {}; - } // namespace traits - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_TRAITS_TYPE_IS_CONTAINER_HPP diff --git a/dsp/lib/sprout/sprout/weed/traits/type/is_string.hpp b/dsp/lib/sprout/sprout/weed/traits/type/is_string.hpp deleted file mode 100644 index 3a7d67b..0000000 --- a/dsp/lib/sprout/sprout/weed/traits/type/is_string.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_TRAITS_TYPE_IS_STRING_HPP -#define SPROUT_WEED_TRAITS_TYPE_IS_STRING_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace traits { - // - // is_string - // - template - struct is_string - : public sprout::false_type - {}; - template - struct is_string - : public sprout::weed::traits::is_string - {}; - template - struct is_string - : public sprout::weed::traits::is_string - {}; - template - struct is_string - : public sprout::weed::traits::is_string - {}; - template - struct is_string > - : public sprout::true_type - {}; - } // namespace traits - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_TRAITS_TYPE_IS_STRING_HPP diff --git a/dsp/lib/sprout/sprout/weed/traits/type/is_tuple.hpp b/dsp/lib/sprout/sprout/weed/traits/type/is_tuple.hpp deleted file mode 100644 index d63905d..0000000 --- a/dsp/lib/sprout/sprout/weed/traits/type/is_tuple.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_TRAITS_TYPE_IS_TUPLE_HPP -#define SPROUT_WEED_TRAITS_TYPE_IS_TUPLE_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace traits { - // - // is_tuple - // - template - struct is_tuple - : public sprout::false_type - {}; - template - struct is_tuple - : public sprout::weed::traits::is_tuple - {}; - template - struct is_tuple - : public sprout::weed::traits::is_tuple - {}; - template - struct is_tuple - : public sprout::weed::traits::is_tuple - {}; - template - struct is_tuple > - : public sprout::true_type - {}; - } // namespace traits - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_TRAITS_TYPE_IS_TUPLE_HPP diff --git a/dsp/lib/sprout/sprout/weed/traits/type/is_unused.hpp b/dsp/lib/sprout/sprout/weed/traits/type/is_unused.hpp deleted file mode 100644 index 40d0171..0000000 --- a/dsp/lib/sprout/sprout/weed/traits/type/is_unused.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_TRAITS_TYPE_IS_UNUSED_HPP -#define SPROUT_WEED_TRAITS_TYPE_IS_UNUSED_HPP - -#include -#include -#include -#include - -namespace sprout { - namespace weed { - namespace traits { - // - // is_unused - // - template - struct is_unused - : public sprout::false_type - {}; - template - struct is_unused - : public sprout::weed::traits::is_unused - {}; - template - struct is_unused - : public sprout::weed::traits::is_unused - {}; - template - struct is_unused - : public sprout::weed::traits::is_unused - {}; - template<> - struct is_unused - : public sprout::true_type - {}; - } // namespace traits - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_TRAITS_TYPE_IS_UNUSED_HPP diff --git a/dsp/lib/sprout/sprout/weed/unused.hpp b/dsp/lib/sprout/sprout/weed/unused.hpp deleted file mode 100644 index b8cdeba..0000000 --- a/dsp/lib/sprout/sprout/weed/unused.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WEED_UNUSED_HPP -#define SPROUT_WEED_UNUSED_HPP - -#include - -namespace sprout { - namespace weed { - // - // unused - // - struct unused { - public: - SPROUT_CONSTEXPR unused() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - template - SPROUT_CONSTEXPR unused(T) {} - template - SPROUT_CONSTEXPR operator T() const { - return T(); - } - }; - } // namespace weed -} // namespace sprout - -#endif // #ifndef SPROUT_WEED_UNUSED_HPP diff --git a/dsp/lib/sprout/sprout/workaround.hpp b/dsp/lib/sprout/sprout/workaround.hpp deleted file mode 100644 index 073b40b..0000000 --- a/dsp/lib/sprout/sprout/workaround.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WORKAROUND_HPP -#define SPROUT_WORKAROUND_HPP - -#include -#include -#include -#include - -#endif // #ifndef SPROUT_WORKAROUND_HPP diff --git a/dsp/lib/sprout/sprout/workaround/base_class_construct.hpp b/dsp/lib/sprout/sprout/workaround/base_class_construct.hpp deleted file mode 100644 index b405a41..0000000 --- a/dsp/lib/sprout/sprout/workaround/base_class_construct.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WORKAROUND_BASE_CLASS_CONSTRUCT_HPP -#define SPROUT_WORKAROUND_BASE_CLASS_CONSTRUCT_HPP - -#include - -// -// SPROUT_EXPLICIT_EMPTY_BASE_CLASS_CONSTRUCT -// SPROUT_EXPLICIT_EMPTY_BASE_CLASS_CONSTRUCT_TRAIL -// SPROUT_EXPLICIT_EMPTY_BASE_CLASS_CONSTRUCT_BODY -// -#ifdef SPROUT_WORKAROUND_NEEDS_EXPLICIT_EMPTY_BASE_CLASS_CONSTRUCT -# define SPROUT_EXPLICIT_EMPTY_BASE_CLASS_CONSTRUCT(base) : base() -# define SPROUT_EXPLICIT_EMPTY_BASE_CLASS_CONSTRUCT_TRAIL(base) , base() -# define SPROUT_EXPLICIT_EMPTY_BASE_CLASS_CONSTRUCT_BODY {} -#else -# define SPROUT_EXPLICIT_EMPTY_BASE_CLASS_CONSTRUCT(base) -# define SPROUT_EXPLICIT_EMPTY_BASE_CLASS_CONSTRUCT_TRAIL(base) -# define SPROUT_EXPLICIT_EMPTY_BASE_CLASS_CONSTRUCT_BODY SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL -#endif - -#endif // #ifndef SPROUT_WORKAROUND_BASE_CLASS_CONSTRUCT_HPP diff --git a/dsp/lib/sprout/sprout/workaround/detail/uniform_int_distribution.hpp b/dsp/lib/sprout/sprout/workaround/detail/uniform_int_distribution.hpp deleted file mode 100644 index 282671f..0000000 --- a/dsp/lib/sprout/sprout/workaround/detail/uniform_int_distribution.hpp +++ /dev/null @@ -1,21 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WORKAROUND_DETAIL_UNIFORM_INT_DISTRIBUTION_HPP -#define SPROUT_WORKAROUND_DETAIL_UNIFORM_INT_DISTRIBUTION_HPP - -#include - -#ifdef SPROUT_WORKAROUND_NOT_TERMINATE_RECURSIVE_CONSTEXPR_FUNCTION_TEMPLATE -# include -# define SPROUT_WORKAROUND_DETAIL_UNIFORM_INT_DISTRIBUTION sprout::random::uniform_smallint -#else -# include -# define SPROUT_WORKAROUND_DETAIL_UNIFORM_INT_DISTRIBUTION sprout::random::uniform_int_distribution -#endif - -#endif // #ifndef SPROUT_WORKAROUND_DETAIL_UNIFORM_INT_DISTRIBUTION_HPP diff --git a/dsp/lib/sprout/sprout/workaround/enable_if_with_array.hpp b/dsp/lib/sprout/sprout/workaround/enable_if_with_array.hpp deleted file mode 100644 index b90664f..0000000 --- a/dsp/lib/sprout/sprout/workaround/enable_if_with_array.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WORKAROUND_ENABLE_IF_WITH_ARRAY_HPP -#define SPROUT_WORKAROUND_ENABLE_IF_WITH_ARRAY_HPP - -#include -#include - -// -// SPROUT_ENABLE_IF_WITH_ARRAY_IN_TEMPLATE_PARAMS -// SPROUT_ENABLE_IF_WITH_ARRAY_IN_PARAMS -// -#ifdef SPROUT_WORKAROUND_NO_DEFAULT_TEMPLATE_PARAMETERS_SFINAE_WITH_ARRAY -# define SPROUT_ENABLE_IF_WITH_ARRAY_IN_TEMPLATE_PARAMS(EXPR) -# define SPROUT_ENABLE_IF_WITH_ARRAY_IN_PARAMS(EXPR) , typename std::enable_if<(EXPR)>::type* = 0 -#else -# define SPROUT_ENABLE_IF_WITH_ARRAY_IN_TEMPLATE_PARAMS(EXPR) , typename = typename std::enable_if<(EXPR)>::type -# define SPROUT_ENABLE_IF_WITH_ARRAY_IN_PARAMS(EXPR) -#endif - -#endif // #ifndef SPROUT_WORKAROUND_ENABLE_IF_WITH_ARRAY_HPP diff --git a/dsp/lib/sprout/sprout/workaround/recursive_function_template.hpp b/dsp/lib/sprout/sprout/workaround/recursive_function_template.hpp deleted file mode 100644 index 5c8c4c0..0000000 --- a/dsp/lib/sprout/sprout/workaround/recursive_function_template.hpp +++ /dev/null @@ -1,82 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WORKAROUND_RECURSIVE_FUNCTION_TEMPLATE_HPP -#define SPROUT_WORKAROUND_RECURSIVE_FUNCTION_TEMPLATE_HPP - -#include -#include -#include -#include -#include -#include -#include - -// -// SPROUT_RECURSIVE_FUNCTION_TEMPLATE_INSTANTIATION_LIMIT -// -#ifndef SPROUT_RECURSIVE_FUNCTION_TEMPLATE_INSTANTIATION_LIMIT -# if SPROUT_CLANG_OR_LATER(3, 3, 0) -# define SPROUT_RECURSIVE_FUNCTION_TEMPLATE_INSTANTIATION_LIMIT 256 -# else -# define SPROUT_RECURSIVE_FUNCTION_TEMPLATE_INSTANTIATION_LIMIT 512 -# endif -#endif - -// -// SPROUT_RECURSIVE_FUNCTION_TEMPLATE_CONTINUE_DECL -// SPROUT_RECURSIVE_FUNCTION_TEMPLATE_BREAK_DECL -// -#define SPROUT_RECURSIVE_FUNCTION_TEMPLATE_CONTINUE_DECL(DEPTH) \ - typename sprout::enabler_if<((DEPTH) < SPROUT_RECURSIVE_FUNCTION_TEMPLATE_INSTANTIATION_LIMIT - 1)>::type -#define SPROUT_RECURSIVE_FUNCTION_TEMPLATE_BREAK_DECL(DEPTH) \ - typename sprout::enabler_if<((DEPTH) >= SPROUT_RECURSIVE_FUNCTION_TEMPLATE_INSTANTIATION_LIMIT - 1)>::type - -// -// SPROUT_RECURSIVE_FUNCTION_TEMPLATE_CONTINUE -// SPROUT_RECURSIVE_FUNCTION_TEMPLATE_BREAK -// -#define SPROUT_RECURSIVE_FUNCTION_TEMPLATE_CONTINUE(DEPTH) \ - SPROUT_RECURSIVE_FUNCTION_TEMPLATE_CONTINUE_DECL(DEPTH) = sprout::enabler -#define SPROUT_RECURSIVE_FUNCTION_TEMPLATE_BREAK(DEPTH) \ - SPROUT_RECURSIVE_FUNCTION_TEMPLATE_BREAK_DECL(DEPTH) = sprout::enabler - -// -// SPROUT_RECURSIVE_FUNCTION_TEMPLATE_INSTANTIATION_EXCEEDED_MESSAGE -// -#define SPROUT_RECURSIVE_FUNCTION_TEMPLATE_INSTANTIATION_EXCEEDED_MESSAGE \ - "recursive template instantiation exceeded maximum depth of " SPROUT_PP_STRINGIZE(SPROUT_RECURSIVE_FUNCTION_TEMPLATE_INSTANTIATION_LIMIT) - -namespace sprout { - // - // recursive_function_template_instantiation_exeeded - // - class recursive_function_template_instantiation_exeeded - : public std::runtime_error - { - public: - recursive_function_template_instantiation_exeeded() SPROUT_NOEXCEPT - : std::runtime_error(SPROUT_RECURSIVE_FUNCTION_TEMPLATE_INSTANTIATION_EXCEEDED_MESSAGE) - {} - }; - - // - // throw_recursive_function_template_instantiation_exeeded - // - template - inline SPROUT_CONSTEXPR T - throw_recursive_function_template_instantiation_exeeded() { - return throw sprout::recursive_function_template_instantiation_exeeded(), T(); - } - template - inline SPROUT_CONSTEXPR T&& - throw_recursive_function_template_instantiation_exeeded(T&& t) { - return throw sprout::recursive_function_template_instantiation_exeeded(), SPROUT_FORWARD(T, t); - } -} // namespace sprout - -#endif // #ifndef SPROUT_WORKAROUND_RECURSIVE_FUNCTION_TEMPLATE_HPP diff --git a/dsp/lib/sprout/sprout/workaround/std/cstddef.hpp b/dsp/lib/sprout/sprout/workaround/std/cstddef.hpp deleted file mode 100644 index 7fccfe8..0000000 --- a/dsp/lib/sprout/sprout/workaround/std/cstddef.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef SPROUT_WORKAROUND_STD_CSTDDEF_HPP -#define SPROUT_WORKAROUND_STD_CSTDDEF_HPP - -#include -#include - -#if defined(__clang__) && defined(__GLIBCXX__) -# if SPROUT_CLANG_EARLIER(3, 4, 2) && (__GLIBCXX__ >= 20140422) -# include -# -# if defined(__STDDEF_H) -struct max_align_t { - long long __max_align_ll __attribute__((__aligned__(__alignof__(long long)))); - long double __max_align_ld __attribute__((__aligned__(__alignof__(long double)))); -}; -# endif -# endif -#endif - -#include - -#endif // #ifndef SPROUT_WORKAROUND_STD_CSTDDEF_HPP diff --git a/dsp/lib/sprout/testspr/algorithm.hpp b/dsp/lib/sprout/testspr/algorithm.hpp deleted file mode 100644 index d4bdccd..0000000 --- a/dsp/lib/sprout/testspr/algorithm.hpp +++ /dev/null @@ -1,116 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef TESTSPR_ALGORITHM_HPP -#define TESTSPR_ALGORITHM_HPP - -#include -#include -#include - -namespace testspr { - // - // distance - // - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type - distance(InputIterator first, InputIterator last) { - return first == last ? 0 - : 1 + testspr::distance(first + 1, last) - ; - } - - // - // equal - // - template - inline SPROUT_CONSTEXPR bool - equal(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2) { - return first1 == last1 ? first2 == last2 - : first2 == last2 ? false - : !(*first1 == *first2) ? false - : testspr::equal(first1 + 1, last1, first2 + 1, last2) - ; - } - template - inline SPROUT_CONSTEXPR bool - equal(InputRange1 const& range1, InputRange2 const& range2) { - return testspr::equal(sprout::begin(range1), sprout::end(range1), sprout::begin(range2), sprout::end(range2)); - } - - // - // is_found - // - template - inline SPROUT_CONSTEXPR bool - is_found(InputIterator first, InputIterator last, T const& value) { - return first == last ? false - : *first == value ? true - : testspr::is_found(first + 1, last, value) - ; - } - template - inline SPROUT_CONSTEXPR bool - is_found(InputRange const& range, T const& value) { - return testspr::is_found(sprout::begin(range), sprout::end(range), value); - } - - // - // count - // - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type - count(InputIterator first, InputIterator last, T const& value) { - return first == last ? 0 - : (*first == value ? 1 : 0) + testspr::count(first + 1, last, value) - ; - } - template - inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type - count(InputRange const& range, T const& value) { - return testspr::count(sprout::begin(range), sprout::end(range), value); - } - - namespace detail { - template - inline SPROUT_CONSTEXPR bool - is_permutation_impl( - ForwardIterator1 first1, ForwardIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2, - ForwardIterator1 first1_, ForwardIterator2 first2_ - ) - { - return first1_ == last1 && first2_ == last2 ? true - : testspr::count(first1, last1, *first1_) != testspr::count(first2, first2 + testspr::distance(first1, last1), *first1_) - ? false - : testspr::detail::is_permutation_impl(first1, last1, first2, last2, first1_ + 1, first2_ + 1) - ; - } - } // namespace detail - // - // is_permutation - // - template - inline SPROUT_CONSTEXPR bool - is_permutation( - ForwardIterator1 first1, ForwardIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2 - ) - { - return testspr::detail::is_permutation_impl(first1, last1, first2, last2, first1, first2); - } - template - inline SPROUT_CONSTEXPR bool - is_permutation(ForwardRange1 const& range1, ForwardRange2 const& range2) { - return testspr::is_permutation( - sprout::begin(range1), sprout::end(range1), - sprout::begin(range2), sprout::end(range2) - ); - } -} // namespace testspr - -#endif // #ifndef TESTSPR_ALGORITHM_HPP diff --git a/dsp/lib/sprout/testspr/assert.hpp b/dsp/lib/sprout/testspr/assert.hpp deleted file mode 100644 index d24b4d0..0000000 --- a/dsp/lib/sprout/testspr/assert.hpp +++ /dev/null @@ -1,90 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef TESTSPR_ASSERT_HPP -#define TESTSPR_ASSERT_HPP - -#include -#include -#include -#include -#ifdef TESTSPR_CONFIG_ENABLE_STATIC_WARNING -# include -#endif - -namespace testspr { - // - // assertion_failed - // - class assertion_failed - : public std::runtime_error - { - public: - explicit SPROUT_NON_CONSTEXPR assertion_failed(std::string const& msg) - : std::runtime_error(msg) - {} - explicit SPROUT_NON_CONSTEXPR assertion_failed(char const* msg) - : std::runtime_error(msg) - {} - }; - - namespace detail { - inline SPROUT_CONSTEXPR bool - assertion_check(bool cond, std::string const& msg) { - return cond ? true - : throw testspr::assertion_failed(msg) - ; - } - inline SPROUT_CONSTEXPR bool - assertion_check(bool cond, char const* msg) { - return cond ? true - : throw testspr::assertion_failed(msg) - ; - } - } // namespace detail -} // namespace testspr - -// -// TESTSPR_STATIC_ASSERT -// TESTSPR_ASSERT -// -#define TESTSPR_STATIC_ASSERT(expr) \ - static_assert(expr, #expr) -#define TESTSPR_ASSERT(expr) \ - SPROUT_ASSERT(expr) -// -// TESTSPR_BOTH_ASSERT -// -#if !defined(SPROUT_CONFIG_DISABLE_CONSTEXPR) && !defined(SPROUT_NO_STATIC_CONSTEXPR_INITIALIZATION) -# define TESTSPR_BOTH_ASSERT(expr) TESTSPR_STATIC_ASSERT(expr); TESTSPR_ASSERT(expr) -#else -# define TESTSPR_BOTH_ASSERT(expr) TESTSPR_ASSERT(expr) -#endif - -// -// TESTSPR_STATIC_WARNING -// -#ifdef TESTSPR_CONFIG_ENABLE_STATIC_WARNING -# define TESTSPR_STATIC_WARNING(expr) BOOST_STATIC_WARNING(expr) -#else -# define TESTSPR_STATIC_WARNING(expr) -#endif - -// -// TESTSPR_STATIC_UNCHECKED -// TESTSPR_UNCHECKED -// TESTSPR_BOTH_UNCHECKED -// -#define TESTSPR_STATIC_UNCHECKED(expr) TESTSPR_STATIC_WARNING(expr) -#define TESTSPR_UNCHECKED(expr) (expr) -#ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR -# define TESTSPR_BOTH_UNCHECKED(expr) TESTSPR_STATIC_UNCHECKED(expr); TESTSPR_UNCHECKED(expr) -#else // #ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR -# define TESTSPR_BOTH_UNCHECKED(expr) TESTSPR_UNCHECKED(expr) -#endif // #ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR - -#endif // #ifndef TESTSPR_ASSERT_HPP diff --git a/dsp/lib/sprout/testspr/functional.hpp b/dsp/lib/sprout/testspr/functional.hpp deleted file mode 100644 index b3036e2..0000000 --- a/dsp/lib/sprout/testspr/functional.hpp +++ /dev/null @@ -1,224 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef TESTSPR_FUNCTIONAL_HPP -#define TESTSPR_FUNCTIONAL_HPP - -#include - -namespace testspr { - // - // do_nothing - // - template - inline SPROUT_CONSTEXPR bool - do_nothing(T const&) SPROUT_NOEXCEPT { - return true; - } - - // - // is_even - // - template - struct is_even { - public: - typedef T argument_type; - typedef bool result_type; - public: - SPROUT_CONSTEXPR bool operator()(T const& t) const { return t % 2 == 0; } - }; - // - // is_odd - // - template - struct is_odd { - public: - typedef T argument_type; - typedef bool result_type; - public: - SPROUT_CONSTEXPR bool operator()(T const& t) const { return t % 2 != 0; } - }; - // - // is_multiple_of - // - template - struct is_multiple_of { - public: - typedef T first_argument_type; - typedef U second_argument_type; - typedef bool result_type; - public: - SPROUT_CONSTEXPR bool operator()(T const& t, U const& u) const { return t % u == 0; } - }; - - // - // less - // - template - struct less { - public: - typedef T first_argument_type; - typedef T second_argument_type; - typedef bool result_type; - public: - SPROUT_CONSTEXPR bool operator()(T const& lhs, T const& rhs) const { return lhs < rhs; } - }; - // - // greater - // - template - struct greater { - public: - typedef T first_argument_type; - typedef T second_argument_type; - typedef bool result_type; - public: - SPROUT_CONSTEXPR bool operator()(T const& lhs, T const& rhs) const { return lhs > rhs; } - }; - // - // equal_to - // - template - struct equal_to { - public: - typedef T first_argument_type; - typedef T second_argument_type; - typedef bool result_type; - public: - SPROUT_CONSTEXPR bool operator()(T const& lhs, T const& rhs) const { return lhs == rhs; } - }; - // - // mod_less - // - template - struct mod_less { - public: - typedef T first_argument_type; - typedef T second_argument_type; - typedef bool result_type; - public: - SPROUT_CONSTEXPR bool operator()(T const& lhs, T const& rhs) const { return lhs % mod < rhs % mod; } - }; - - // - // less_than - // - template - struct less_than { - public: - typedef T argument_type; - typedef bool result_type; - public: - T value; - public: - explicit SPROUT_CONSTEXPR less_than(T const& value) : value(value) {} - SPROUT_CONSTEXPR bool operator()(T const& x) const { return x < value; } - }; - // - // greater_than - // - template - struct greater_than { - public: - typedef T argument_type; - typedef bool result_type; - public: - T value; - public: - explicit SPROUT_CONSTEXPR greater_than(T const& value) : value(value) {} - SPROUT_CONSTEXPR bool operator()(T const& x) const { return x > value; } - }; - - // - // x2 - // - template - struct x2 { - public: - typedef T argument_type; - typedef T result_type; - public: - SPROUT_CONSTEXPR T operator()(T const& t) const { return t + t; } - }; - - // - // plus - // - template - struct plus { - public: - typedef T first_argument_type; - typedef T second_argument_type; - typedef T result_type; - public: - SPROUT_CONSTEXPR T operator()(T const& lhs, T const& rhs) const { return lhs + rhs; } - }; - - // - // gen_iota - // - template - struct gen_iota { - public: - struct result { - public: - T val; - gen_iota gen; - public: - SPROUT_CONSTEXPR T const& generated_value() const { return val; } - SPROUT_CONSTEXPR gen_iota const& next_generator() const { return gen; } - }; - private: - T val; - public: - explicit SPROUT_CONSTEXPR gen_iota(T const& val = T()) - : val(val) - {} - SPROUT_CONSTEXPR result operator()() const { return result{val, gen_iota(val + 1)}; } - }; - // - // unf_iota - // - template - struct unf_iota { - public: - struct result { - public: - T val; - public: - SPROUT_CONSTEXPR T const& generated_value() const { return val; } - SPROUT_CONSTEXPR T next_generator() const { return val + 1; } - }; - public: - SPROUT_CONSTEXPR result operator()(T const& val) const { return result{val}; } - }; - - // - // x2_visitor - // - template - class x2_visitor { - public: - typedef R result_type; - public: - template - SPROUT_CONSTEXPR result_type operator()(T const& t) const { return static_cast(t + t); } - }; - // - // x2_assign_visitor - // - template - class x2_assign_visitor { - public: - typedef R result_type; - public: - template - SPROUT_CONSTEXPR result_type operator()(T& t) const { return static_cast(t += t); } - }; -} // namespace testspr - -#endif // #ifndef TESTSPR_FUNCTIONAL_HPP diff --git a/dsp/lib/sprout/testspr/header_all.hpp b/dsp/lib/sprout/testspr/header_all.hpp deleted file mode 100644 index e980b8f..0000000 --- a/dsp/lib/sprout/testspr/header_all.hpp +++ /dev/null @@ -1,269 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef TESTSPR_HEADER_ALL_HPP -#define TESTSPR_HEADER_ALL_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include - -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include - -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include - -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include - -//#include -//#include -//#include -//#include -//#include -//#include -//#include - -#endif // #ifndef TESTSPR_HEADER_ALL_HPP diff --git a/dsp/lib/sprout/testspr/include_main.hpp b/dsp/lib/sprout/testspr/include_main.hpp deleted file mode 100644 index 8d2d171..0000000 --- a/dsp/lib/sprout/testspr/include_main.hpp +++ /dev/null @@ -1,55 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef TESTSPR_INCLUDE_MAIN_HPP -#define TESTSPR_INCLUDE_MAIN_HPP - -#ifndef TESTSPR_CPP_INCLUDE - -#ifndef TESTSPR_TEST_FUNCTION -# error undefined TESTSPR_TEST_FUNCTION -#endif - -#include -#include -#include -#include -#include -#include - -int main() { - std::cout << "testspr exec(" << SPROUT_PP_STRINGIZE(TESTSPR_TEST_FUNCTION) << "):" << std::endl; - try { - TESTSPR_TEST_FUNCTION(); - } catch (testspr::assertion_failed const& e) { - std::cout - << " testspr failed." << std::endl - << " " << e.what() << std::endl - ; - return EXIT_FAILURE; - } catch (std::exception const& e) { - std::cout - << " testspr failed for some reason." << std::endl - << " exception handled:" << std::endl - << " type = " << testspr::typename_of(e) << std::endl - << " what = " << e.what() << std::endl - ; - return EXIT_FAILURE; - } catch (...) { - std::cout - << " testspr failed for some reason." << std::endl - << " exception handled:" << std::endl - << " type = " << std::endl - ; - return EXIT_FAILURE; - } - std::cout << " testspr succeeded." << std::endl; -} - -#endif - -#endif // #ifndef TESTSPR_INCLUDE_MAIN_HPP diff --git a/dsp/lib/sprout/testspr/iterator.hpp b/dsp/lib/sprout/testspr/iterator.hpp deleted file mode 100644 index 098eb4d..0000000 --- a/dsp/lib/sprout/testspr/iterator.hpp +++ /dev/null @@ -1,267 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef TESTSPR_ITERATOR_HPP -#define TESTSPR_ITERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace testspr { - // - // reduce_iterator - // - template::iterator_category> - class reduce_iterator - : public std::iterator< - Category, - typename std::iterator_traits::value_type, - typename std::iterator_traits::difference_type, - typename std::iterator_traits::pointer, - typename std::iterator_traits::reference - > - { - public: - typedef Iterator iterator_type; - typedef Category iterator_category; - typedef typename std::iterator_traits::value_type value_type; - typedef typename std::iterator_traits::difference_type difference_type; - typedef typename std::iterator_traits::pointer pointer; - typedef typename std::iterator_traits::reference reference; - protected: - iterator_type current; - public: - SPROUT_CONSTEXPR reduce_iterator() - : current() - {} - reduce_iterator(reduce_iterator const& other) = default; - explicit SPROUT_CONSTEXPR reduce_iterator(iterator_type it) - : current(it) - {} - template::value>::type = sprout::enabler> - SPROUT_CONSTEXPR reduce_iterator(reduce_iterator const& it) - : current(it.base()) - {} - template::value>::type = sprout::enabler> - SPROUT_CXX14_CONSTEXPR reduce_iterator& operator=(reduce_iterator const& it) { - reduce_iterator temp(it); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR iterator_type base() const { - return current; - } - SPROUT_CONSTEXPR reference operator*() const { - return *current; - } - SPROUT_CONSTEXPR pointer operator->() const { - return &*current; - } - SPROUT_CXX14_CONSTEXPR reduce_iterator& operator++() { - ++current; - return *this; - } - SPROUT_CXX14_CONSTEXPR reduce_iterator operator++(int) { - reduce_iterator result(*this); - ++current; - return result; - } - SPROUT_CXX14_CONSTEXPR reduce_iterator& operator--() { - --current; - return *this; - } - SPROUT_CXX14_CONSTEXPR reduce_iterator operator--(int) { - reduce_iterator temp(*this); - --current; - return temp; - } - SPROUT_CONSTEXPR reduce_iterator operator+(difference_type n) const { - return reduce_iterator(current + n); - } - SPROUT_CONSTEXPR reduce_iterator operator-(difference_type n) const { - return reduce_iterator(current - n); - } - SPROUT_CXX14_CONSTEXPR reduce_iterator& operator+=(difference_type n) { - reduce_iterator temp(current + n); - temp.swap(*this); - return *this; - } - SPROUT_CXX14_CONSTEXPR reduce_iterator& operator-=(difference_type n) { - reduce_iterator temp(current - n); - temp.swap(*this); - return *this; - } - SPROUT_CONSTEXPR reference operator[](difference_type n) const { - return current[n]; - } - SPROUT_CONSTEXPR reduce_iterator next() const { - return reduce_iterator(sprout::next(current)); - } - SPROUT_CONSTEXPR reduce_iterator prev() const { - return reduce_iterator(sprout::prev(current)); - } - SPROUT_CXX14_CONSTEXPR void swap(reduce_iterator& other) - SPROUT_NOEXCEPT_IF( - SPROUT_NOEXCEPT_EXPR(swap(current, other.current)) - ) - { - using std::swap; - swap(current, other.current); - } - }; - - template - inline SPROUT_CONSTEXPR bool - operator==(testspr::reduce_iterator const& lhs, testspr::reduce_iterator const& rhs) { - return lhs.base() == rhs.base(); - } - template - inline SPROUT_CONSTEXPR bool - operator!=(testspr::reduce_iterator const& lhs, testspr::reduce_iterator const& rhs) { - return !(lhs == rhs); - } - template - inline SPROUT_CONSTEXPR bool - operator<(testspr::reduce_iterator const& lhs, testspr::reduce_iterator const& rhs) { - return lhs.base() < rhs.base(); - } - template - inline SPROUT_CONSTEXPR bool - operator>(testspr::reduce_iterator const& lhs, testspr::reduce_iterator const& rhs) { - return rhs < lhs; - } - template - inline SPROUT_CONSTEXPR bool - operator<=(testspr::reduce_iterator const& lhs, testspr::reduce_iterator const& rhs) { - return !(rhs < lhs); - } - template - inline SPROUT_CONSTEXPR bool - operator>=(testspr::reduce_iterator const& lhs, testspr::reduce_iterator const& rhs) { - return !(lhs < rhs); - } - template - inline SPROUT_CONSTEXPR decltype(std::declval() - std::declval()) - operator-(testspr::reduce_iterator const& lhs, testspr::reduce_iterator const& rhs) { - return lhs.base() - rhs.base(); - } - template - inline SPROUT_CONSTEXPR testspr::reduce_iterator - operator+( - typename testspr::reduce_iterator::difference_type n, - testspr::reduce_iterator const& it - ) - { - return it + n; - } - - // - // make_reduce_iterator - // - template - inline SPROUT_CONSTEXPR testspr::reduce_iterator - make_reduce_iterator(Iterator it) { - return testspr::reduce_iterator(it); - } - template - inline SPROUT_CONSTEXPR testspr::reduce_iterator - make_reduce_iterator(Iterator it) { - return testspr::reduce_iterator(it); - } - - // - // reduce_input - // reduce_forward - // reduce_bidirectional - // reduce_random_access - // - template - inline SPROUT_CONSTEXPR testspr::reduce_iterator - reduce_input(Iterator it) { - return testspr::reduce_iterator(it); - } - template - inline SPROUT_CONSTEXPR testspr::reduce_iterator - reduce_forward(Iterator it) { - return testspr::reduce_iterator(it); - } - template - inline SPROUT_CONSTEXPR testspr::reduce_iterator - reduce_bidirectional(Iterator it) { - return testspr::reduce_iterator(it); - } - template - inline SPROUT_CONSTEXPR testspr::reduce_iterator - reduce_random_access(Iterator it) { - return testspr::reduce_iterator(it); - } - - // - // swap - // - template - inline SPROUT_CXX14_CONSTEXPR void - swap(testspr::reduce_iterator& lhs, testspr::reduce_iterator& rhs) - SPROUT_NOEXCEPT_IF_EXPR(lhs.swap(rhs)) - { - lhs.swap(rhs); - } - - // - // iterator_distance - // - template - inline SPROUT_CONSTEXPR typename std::iterator_traits >::difference_type - iterator_distance(testspr::reduce_iterator first, testspr::reduce_iterator last) { - return sprout::distance(first.base(), last.base()); - } - - // - // iterator_next - // - template - inline SPROUT_CONSTEXPR testspr::reduce_iterator - iterator_next(testspr::reduce_iterator const& it) { - return it.next(); - } - template - inline SPROUT_CONSTEXPR testspr::reduce_iterator - iterator_next( - testspr::reduce_iterator const& it, - typename testspr::reduce_iterator::difference_type n - ) - { - return testspr::reduce_iterator(sprout::next(it.base(), n)); - } - - // - // iterator_prev - // - template - inline SPROUT_CONSTEXPR testspr::reduce_iterator - iterator_prev(testspr::reduce_iterator const& it) { - return it.prev(); - } - template - inline SPROUT_CONSTEXPR testspr::reduce_iterator - iterator_prev( - testspr::reduce_iterator const& it, - typename testspr::reduce_iterator::difference_type n - ) - { - return testspr::reduce_iterator(sprout::next(it.base(), n)); - } -} // namespace testspr - -#endif // #ifndef TESTSPR_ITERATOR_HPP diff --git a/dsp/lib/sprout/testspr/print.hpp b/dsp/lib/sprout/testspr/print.hpp deleted file mode 100644 index 278004c..0000000 --- a/dsp/lib/sprout/testspr/print.hpp +++ /dev/null @@ -1,340 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef TESTSPR_PRINT_HPP -#define TESTSPR_PRINT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace testspr { - namespace detail { - inline SPROUT_NON_CONSTEXPR std::ostream& - output(std::ostream& os) { - return os; - } - template - inline SPROUT_NON_CONSTEXPR std::ostream& - output(std::ostream& os, Head const& head, Tail const&... tail) { - return testspr::detail::output(os << head, tail...); - } - } // namespace detail - - // - // to_string - // - template - inline SPROUT_NON_CONSTEXPR std::string - to_string(Head const& head, Tail const&... tail) { - std::ostringstream os; - testspr::detail::output(os, head, tail...); - return os.str(); - } - - // - // endl - // - class endl_t {}; - template - inline SPROUT_NON_CONSTEXPR std::basic_ostream& - operator<<(std::basic_ostream& lhs, testspr::endl_t) { - return lhs << std::endl; - } - namespace { - SPROUT_STATIC_CONSTEXPR endl_t endl = {}; - } // anonymous-namespace - // - // ends - // - class ends_t {}; - template - inline SPROUT_NON_CONSTEXPR std::basic_ostream& - operator<<(std::basic_ostream& lhs, testspr::ends_t) { - return lhs << std::ends; - } - namespace { - SPROUT_STATIC_CONSTEXPR ends_t ends = {}; - } // anonymous-namespace - // - // flush - // - class flush_t {}; - template - inline SPROUT_NON_CONSTEXPR std::basic_ostream& - operator<<(std::basic_ostream& lhs, testspr::flush_t) { - return lhs << std::flush; - } - namespace { - SPROUT_STATIC_CONSTEXPR flush_t flush = {}; - } // anonymous-namespace - - // - // ios_all_saver - // - class ios_all_saver { - private: - sprout::detail::io::ios_all_saver saver_; - public: - SPROUT_NON_CONSTEXPR ios_all_saver() - : saver_(std::cout) - {} - SPROUT_NON_CONSTEXPR ios_all_saver(std::ostream& os) - : saver_(os) - {} - }; - - // - // print - // - inline SPROUT_NON_CONSTEXPR void - print() {} - template - inline SPROUT_NON_CONSTEXPR void - print(Head const& head, Tail const&... tail) { - std::cout << head; - testspr::print(tail...); - } - - // - // print_ln - // - inline SPROUT_NON_CONSTEXPR void - print_ln() { - testspr::print(testspr::endl); - } - template - inline SPROUT_NON_CONSTEXPR void - print_ln(Args const&... args) { - testspr::ios_all_saver saver; - testspr::print(args..., testspr::endl); - } - - // - // print_tokens_d - // - template - inline SPROUT_NON_CONSTEXPR void - print_tokens_d(T const&) { - testspr::print_ln(); - } - template - inline SPROUT_NON_CONSTEXPR void - print_tokens_d(T const& delim, Head const& head, Tail const&... tail) { - testspr::ios_all_saver saver; - testspr::print(head); - sprout::swallow({(testspr::print(delim, tail), 0)...}); - testspr::print_ln(); - } - // - // print_tokens - // - template - inline SPROUT_NON_CONSTEXPR void - print_tokens(Args const&... args) { - print_tokens_d(' ', args...); - } - - // - // print_quotes_d - // - template - inline SPROUT_NON_CONSTEXPR void - print_quotes_d(T const&) { - testspr::print_ln(); - } - template - inline SPROUT_NON_CONSTEXPR void - print_quotes_d(T const& delim, Head const& head, Tail const&... tail) { - testspr::ios_all_saver saver; - testspr::print('\"', head, '\"'); - sprout::swallow({(testspr::print(delim, '\"', tail, '\"'), 0)...}); - testspr::print_ln(); - } - // - // print_quotes - // - template - inline SPROUT_NON_CONSTEXPR void - print_quotes(Args const&... args) { - print_quotes_d(' ', args...); - } - - // - // print_range_d - // - template - inline SPROUT_NON_CONSTEXPR void - print_range_d(T const& delim, InputIterator first, InputIterator last) { - testspr::ios_all_saver saver; - if (first != last) { - testspr::print(*first); - } - ++first; - for (; first != last; ++first) { - testspr::print(delim, *first); - } - testspr::print_ln(); - } - template - inline SPROUT_NON_CONSTEXPR void - print_range_d(T const& delim, InputRange const& range) { - testspr::print_range_d(delim, sprout::begin(range), sprout::end(range)); - } - // - // print_range - // - template - inline SPROUT_NON_CONSTEXPR void - print_range(InputIterator first, InputIterator last) { - print_range_d(' ', first, last); - } - template - inline SPROUT_NON_CONSTEXPR void - print_range(InputRange const& range) { - print_range_d(' ', range); - } - - // - // print_bits - // - template - inline SPROUT_NON_CONSTEXPR void - print_bits(T const& t) { - testspr::print_ln(std::bitset(t).template to_string()); - } - - // - // print_typename - // - template - inline SPROUT_NON_CONSTEXPR void - print_typename() { - testspr::print_ln(testspr::typename_of()); - } - template - inline SPROUT_NON_CONSTEXPR void - print_typename(T&& t) { - testspr::print_ln(testspr::typename_of(std::forward(t))); - } - - // - // print_type - // - template - inline SPROUT_NON_CONSTEXPR void - print_type() { - testspr::print_ln(testspr::qualified_typename_of()); - } - - // - // print_hl - // - inline SPROUT_NON_CONSTEXPR void - print_hl() { - testspr::print_ln("--------------------------------------------------------------------------------"); - } - template - inline SPROUT_NON_CONSTEXPR void - print_hl(char c) { - for (std::string::size_type i = 0, last = 80; i != last; ++i) { - testspr::print(c); - } - testspr::print_ln(); - } - template - inline SPROUT_NON_CONSTEXPR void - print_hl(T const& t) { - std::string s(testspr::to_string(t)); - for (std::string::size_type i = 0, n = 80 / s.size(); i != n; ++i) { - testspr::print(s); - } - for (std::string::const_iterator it = s.begin(), last = s.begin() + 80 % s.size(); it != last; ++it) { - testspr::print(*it); - } - testspr::print_ln(); - } - - // - // manip_holder - // - template - class manip_holder { - public: - typedef T value_type; - private: - value_type m_; - public: - SPROUT_CONSTEXPR manip_holder(value_type const& m) - : m_(m) - {} - SPROUT_CONSTEXPR value_type const& get() const { - return m_; - } - }; - template - inline SPROUT_NON_CONSTEXPR std::basic_ostream& - operator<<(std::basic_ostream& lhs, testspr::manip_holder const& rhs) { - return lhs << rhs.get(); - } - template - inline SPROUT_NON_CONSTEXPR std::basic_istream& - operator>>(std::basic_istream& lhs, testspr::manip_holder const& rhs) { - return lhs >> rhs.get(); - } - // - // manip - // - template - inline SPROUT_NON_CONSTEXPR T& - manip(T& t) { - return t; - } - template - inline SPROUT_NON_CONSTEXPR T const& - manip(T const& t) { - return t; - } - inline SPROUT_NON_CONSTEXPR testspr::manip_holder - manip(std::ostream& (*pf)(std::ostream&)) { - return pf; - } - template - inline SPROUT_NON_CONSTEXPR testspr::manip_holder - manip(std::ios& (*pf)(std::ios&)) { - return pf; - } - inline SPROUT_NON_CONSTEXPR testspr::manip_holder - manip(std::ios_base& (*pf)(std::ios_base&)) { - return pf; - } -} // namespace testspr - -// -// TESTSPR_PRINT_EXPR -// -#if SPROUT_PP_VARIADICS -# define TESTSPR_PRINT_EXPR(...) \ - ::testspr::print_ln(SPROUT_PP_STRINGIZE((__VA_ARGS__)), " => ", __VA_ARGS__) -#else -# define TESTSPR_PRINT_EXPR(EXPR) \ - ::testspr::print_ln(SPROUT_PP_STRINGIZE((EXPR)), " => ", EXPR) -#endif - -#endif // #ifndef TESTSPR_PRINT_HPP diff --git a/dsp/lib/sprout/testspr/range.hpp b/dsp/lib/sprout/testspr/range.hpp deleted file mode 100644 index 52b8d08..0000000 --- a/dsp/lib/sprout/testspr/range.hpp +++ /dev/null @@ -1,132 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef TESTSPR_RANGE_HPP -#define TESTSPR_RANGE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace testspr { - namespace range { - // - // reducted_range - // - template::iterator>::iterator_category> - class reducted_range - : public sprout::adaptors::detail::adapted_range_default< - Range, - testspr::reduce_iterator::iterator, Category> - > - { - public: - typedef sprout::adaptors::detail::adapted_range_default< - Range, - testspr::reduce_iterator::iterator, Category> - > base_type; - typedef typename base_type::range_type range_type; - typedef typename base_type::iterator iterator; - public: - SPROUT_CONSTEXPR reducted_range() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL - reducted_range(reducted_range const&) = default; - explicit SPROUT_CONSTEXPR reducted_range(range_type& range) - : base_type( - iterator(sprout::end(range)), - iterator(sprout::begin(range)) - ) - {} - }; - - // - // make_reduce_range - // - template - inline SPROUT_CONSTEXPR testspr::range::reducted_range< - typename std::remove_reference::type>::type - > - make_reduce_range(Range&& rng) { - return testspr::range::reducted_range< - typename std::remove_reference::type>::type - >( - sprout::lvalue_forward(rng) - ); - } - template - inline SPROUT_CONSTEXPR testspr::range::reducted_range< - typename std::remove_reference::type>::type, - Category - > - make_reduce_range(Range&& rng) { - return testspr::range::reducted_range< - typename std::remove_reference::type>::type, - Category - >( - sprout::lvalue_forward(rng) - ); - } - - // - // reduce_input - // reduce_forward - // reduce_bidirectional - // reduce_random_access - // - template - inline SPROUT_CONSTEXPR testspr::range::reducted_range< - typename std::remove_reference::type>::type, - std::input_iterator_tag - > - reduce_input(Range&& rng) { - return testspr::range::make_reduce_range(SPROUT_FORWARD(Range, rng)); - } - template - inline SPROUT_CONSTEXPR testspr::range::reducted_range< - typename std::remove_reference::type>::type, - std::forward_iterator_tag - > - reduce_forward(Range&& rng) { - return testspr::range::make_reduce_range(SPROUT_FORWARD(Range, rng)); - } - template - inline SPROUT_CONSTEXPR testspr::range::reducted_range< - typename std::remove_reference::type>::type, - std::bidirectional_iterator_tag - > - reduce_bidirectional(Range&& rng) { - return testspr::range::make_reduce_range(SPROUT_FORWARD(Range, rng)); - } - template - inline SPROUT_CONSTEXPR testspr::range::reducted_range< - typename std::remove_reference::type>::type, - std::random_access_iterator_tag - > - reduce_random_access(Range&& rng) { - return testspr::range::make_reduce_range(SPROUT_FORWARD(Range, rng)); - } - } // namespace range -} // namespace testspr - -namespace sprout { - // - // container_construct_traits - // - template - struct container_construct_traits > - : public sprout::container_construct_traits::base_type> - {}; -} // namespace sprout - -#endif // #ifndef TESTSPR_RANGE_HPP diff --git a/dsp/lib/sprout/testspr/singleton.hpp b/dsp/lib/sprout/testspr/singleton.hpp deleted file mode 100644 index a90a904..0000000 --- a/dsp/lib/sprout/testspr/singleton.hpp +++ /dev/null @@ -1,90 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef TESTSPR_SINGLETON_HPP -#define TESTSPR_SINGLETON_HPP - -#include -#include -#include - -namespace testspr { - // - // singleton_module - // - class singleton_module - : public sprout::noncopyable - { - private: - static inline SPROUT_NON_CONSTEXPR bool& get_lock() { - static bool lock = false; - return lock; - } - public: - static inline SPROUT_NON_CONSTEXPR void lock() { - get_lock() = true; - } - static inline SPROUT_NON_CONSTEXPR void unlock() { - get_lock() = false; - } - static inline SPROUT_NON_CONSTEXPR bool is_locked() { - return get_lock(); - } - }; - - namespace detail { - template - class singleton_wrapper - : public T - { - public: - static bool m_is_destroyed; - public: - ~singleton_wrapper() { - m_is_destroyed = true; - } - }; - template - bool testspr::detail::singleton_wrapper::m_is_destroyed = false; - } // namespace detail - - // - // singleton - // - template - class singleton - : public testspr::singleton_module - { - public: - typedef T instance_type; - private: - static instance_type& instance; - private: - static inline SPROUT_NON_CONSTEXPR void use(const instance_type&) {} - static inline SPROUT_NON_CONSTEXPR instance_type& get_instance() { - static detail::singleton_wrapper t; - SPROUT_ASSERT(!testspr::detail::singleton_wrapper::m_is_destroyed); - use(instance); - return static_cast(t); - } - public: - static inline SPROUT_NON_CONSTEXPR instance_type& get_mutable_instance() { - SPROUT_ASSERT(!is_locked()); - return get_instance(); - } - static inline SPROUT_NON_CONSTEXPR instance_type const& get_const_instance() { - return get_instance(); - } - static inline SPROUT_NON_CONSTEXPR bool is_destroyed() { - return testspr::detail::singleton_wrapper::m_is_destroyed; - } - }; - template - T& singleton::instance = testspr::singleton::get_instance(); -} // namespace testspr - -#endif // #ifndef TESTSPR_SINGLETON_HPP diff --git a/dsp/lib/sprout/testspr/sprout.cpp b/dsp/lib/sprout/testspr/sprout.cpp deleted file mode 100644 index 87094cb..0000000 --- a/dsp/lib/sprout/testspr/sprout.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef TESTSPR_SPROUT_CPP -#define TESTSPR_SPROUT_CPP - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_CPP_INCLUDE_DISABLE_TESTSPR_SPROUT_HPP -# define TESTSPR_CPP_INCLUDE -#endif - -#include "../libs/array/test/array.cpp" -#include "../libs/string/test/string.cpp" -#include "../libs/bitset/test/bitset.cpp" -#include "../libs/tuple/test/tuple.cpp" -#include "../libs/optional/test/optional.cpp" -#include "../libs/variant/test/variant.cpp" -#include "../libs/algorithm/test/algorithm.cpp" -#include "../libs/random/test/random.cpp" -#include "../libs/utility/string_view/test/string_view.cpp" -#include "../libs/cstring/test/cstring.cpp" -#include "../libs/net/test/endian.cpp" - -#ifdef TESTSPR_CPP_INCLUDE_DISABLE_TESTSPR_SPROUT_HPP -# undef TESTSPR_CPP_INCLUDE -#endif - -namespace testspr { - static void sprout_test() { - testspr::array_test(); - testspr::string_test(); - testspr::bitset_test(); - testspr::tuple_test(); - testspr::optional_test(); - testspr::variant_test(); - testspr::algorithm_test(); - testspr::random_test(); - testspr::string_view_test(); - testspr::cstring_test(); - testspr::endian_test(); - } -} // namespace testspr - -#ifndef TESTSPR_CPP_INCLUDE -# define TESTSPR_TEST_FUNCTION testspr::sprout_test -# include -#endif - -#endif // #ifndef TESTSPR_SPROUT_CPP diff --git a/dsp/lib/sprout/testspr/tools.hpp b/dsp/lib/sprout/testspr/tools.hpp deleted file mode 100644 index 0114055..0000000 --- a/dsp/lib/sprout/testspr/tools.hpp +++ /dev/null @@ -1,22 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef TESTSPR_TOOLS_HPP -#define TESTSPR_TOOLS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // #ifndef TESTSPR_TOOLS_HPP diff --git a/dsp/lib/sprout/testspr/trace.hpp b/dsp/lib/sprout/testspr/trace.hpp deleted file mode 100644 index d3075dd..0000000 --- a/dsp/lib/sprout/testspr/trace.hpp +++ /dev/null @@ -1,616 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef TESTSPR_TRACE_HPP -#define TESTSPR_TRACE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace testspr { - // - // trace_info - // - class trace_info { - private: - std::string file_; - long line_; - std::string tag_; - std::string what_; - public: - SPROUT_NON_CONSTEXPR trace_info(std::string const& file, long line) - : file_(file), line_(line), tag_("(unknown)"), what_("(unknown)") - {} - SPROUT_NON_CONSTEXPR trace_info(std::string const& file, long line, std::string const& tag) - : file_(file), line_(line), tag_(tag), what_("(unknown)") - SPROUT_NON_CONSTEXPR {} - trace_info(std::string const& file, long line, std::string const& tag, std::string const& what) - : file_(file), line_(line), tag_(tag), what_(what) - {} - SPROUT_NON_CONSTEXPR std::string const& file() const { - return file_; - } - SPROUT_NON_CONSTEXPR long line() const { - return line_; - } - SPROUT_NON_CONSTEXPR std::string const& tag() const { - return tag_; - } - SPROUT_NON_CONSTEXPR std::string const& what() const { - return what_; - } - }; - template - inline SPROUT_NON_CONSTEXPR std::basic_ostream& - operator<<(std::basic_ostream& lhs, testspr::trace_info const& rhs) { - return lhs << rhs.file() << ':' << rhs.line() << ": " << rhs.tag() << ": " << rhs.what(); - } - - // - // trace_record - // - class trace_record - : public testspr::singleton - { - private: - typedef testspr::singleton self_type; - public: - typedef std::vector > container_type; - typedef container_type::size_type size_type; - typedef container_type::value_type value_type; - typedef container_type::reference reference; - typedef container_type::const_reference const_reference; - typedef container_type::iterator iterator; - typedef container_type::const_iterator const_iterator; - public: - static inline SPROUT_NON_CONSTEXPR trace_record& instance() { - return get_mutable_instance(); - } - private: - container_type info_; - public: - SPROUT_NON_CONSTEXPR void push(std::string const& command, testspr::trace_info const& info) { - info_.emplace_back(command, info); - } - SPROUT_NON_CONSTEXPR void pop() { - info_.pop_back(); - } - SPROUT_NON_CONSTEXPR reference top() { - return info_.back(); - } - SPROUT_NON_CONSTEXPR const_reference top() const { - return info_.back(); - } - SPROUT_NON_CONSTEXPR size_type size() const { - return info_.size(); - } - SPROUT_NON_CONSTEXPR iterator begin() { - return info_.begin(); - } - SPROUT_NON_CONSTEXPR iterator end() { - return info_.end(); - } - SPROUT_NON_CONSTEXPR const_iterator begin() const { - return info_.begin(); - } - SPROUT_NON_CONSTEXPR const_iterator end() const { - return info_.end(); - } - SPROUT_NON_CONSTEXPR const_iterator cbegin() const { - return info_.cbegin(); - } - SPROUT_NON_CONSTEXPR const_iterator cend() const { - return info_.cend(); - } - SPROUT_NON_CONSTEXPR void clear() { - info_.clear(); - } - template - SPROUT_NON_CONSTEXPR void copy(OutputIterator out) const { - std::copy(begin(), end(), out); - } - SPROUT_NON_CONSTEXPR void print() const { - testspr::print_ln("trace-record current: size:", size(), ':'); - for (const_iterator it = cbegin(), last = cend(); it != last; ++it) { - testspr::print_ln(" ", it->first, " - ", it->second); - } - } - SPROUT_NON_CONSTEXPR void print_stratified() const { - testspr::print_ln("trace-record current: size:", size(), ':'); - std::string indent; - for (const_iterator it = cbegin(), last = cend(); it != last; ++it) { - if (it->first == "push") { - testspr::print_ln(" ", indent, it->second, " {"); - indent.append(2, ' '); - } else if (it->first == "pop") { - indent.erase(indent.size() - 2); - testspr::print_ln(" ", indent, '}'); - } else if (it->first == "notify") { - testspr::print_ln(" ", indent, it->second); - } else { - testspr::print_ln(" ", indent, it->first, " - ", it->second); - } - } - } - }; - - // - // trace_stack - // - class trace_stack - : public testspr::singleton - { - private: - typedef testspr::singleton self_type; - public: - typedef std::vector container_type; - typedef container_type::size_type size_type; - typedef container_type::value_type value_type; - typedef container_type::reference reference; - typedef container_type::const_reference const_reference; - typedef container_type::iterator iterator; - typedef container_type::const_iterator const_iterator; - typedef std::function function_type; - private: - class comparable_function { - private: - function_type func_; - public: - SPROUT_NON_CONSTEXPR comparable_function(function_type const& f) - : func_(f) - {} - SPROUT_NON_CONSTEXPR bool operator()(trace_stack const& t) const { - return func_(t); - } - SPROUT_NON_CONSTEXPR bool operator==(function_type const& rhs) const { - return func_ == nullptr ? rhs == nullptr - : rhs == nullptr ? false - : func_.target_type() == rhs.target_type() - && func_.target() == rhs.target() - ; - } - SPROUT_NON_CONSTEXPR bool operator!=(function_type const& rhs) const { - return !(*this == rhs); - } - }; - private: - typedef std::vector function_container_type; - private: - class print_on_push { - public: - SPROUT_NON_CONSTEXPR bool operator()(testspr::trace_stack const& stack) const { - testspr::print_ln("trace-stack push: ", stack.top()); - return false; - } - }; - class print_on_pop { - public: - SPROUT_NON_CONSTEXPR bool operator()(testspr::trace_stack const& stack) const { - testspr::print_ln("trace-stack pop: ", stack.top()); - return false; - } - }; - class record_on_push { - public: - SPROUT_NON_CONSTEXPR bool operator()(testspr::trace_stack const& stack) const { - testspr::trace_record::instance().push("push", stack.top()); - return false; - } - }; - class record_on_pop { - public: - SPROUT_NON_CONSTEXPR bool operator()(testspr::trace_stack const& stack) const { - testspr::trace_record::instance().push("pop", stack.top()); - return false; - } - }; - class print_on_notify { - public: - SPROUT_NON_CONSTEXPR bool operator()(testspr::trace_stack const& stack) const { - testspr::trace_info const& info = stack.top(); - testspr::print_ln("trace-stack notify: ", info); - if (info.tag() == "assertion-failed") { - testspr::trace_stack::instance().print(); - testspr::trace_record::instance().print(); - } - return false; - } - }; - class record_on_notify { - public: - SPROUT_NON_CONSTEXPR bool operator()(testspr::trace_stack const& stack) const { - testspr::trace_record::instance().push("notify", stack.top()); - return false; - } - }; - public: - static inline SPROUT_NON_CONSTEXPR trace_stack& instance() { - return get_mutable_instance(); - } - private: - container_type info_; - function_container_type callback_on_push_; - function_container_type callback_on_pop_; - function_container_type callback_on_notify_; - private: - SPROUT_NON_CONSTEXPR bool callback_on_push() { - for (function_container_type::iterator it = callback_on_push_.begin(), last = callback_on_push_.end(); it != last; ++it) { - if ((*it)(*this)) { - return true; - } - } - return false; - } - SPROUT_NON_CONSTEXPR bool callback_on_pop() { - for (function_container_type::reverse_iterator it = callback_on_pop_.rbegin(), last = callback_on_pop_.rend(); it != last; ++it) { - if ((*it)(*this)) { - return true; - } - } - return false; - } - SPROUT_NON_CONSTEXPR bool callback_on_notify() { - for (function_container_type::iterator it = callback_on_notify_.begin(), last = callback_on_notify_.end(); it != last; ++it) { - if ((*it)(*this)) { - return true; - } - } - return false; - } - public: - SPROUT_NON_CONSTEXPR void push(std::string const& file, long line) { - info_.emplace_back(file, line); - callback_on_push(); - } - SPROUT_NON_CONSTEXPR void push(std::string const& file, long line, std::string const& tag) { - info_.emplace_back(file, line, tag); - callback_on_push(); - } - SPROUT_NON_CONSTEXPR void push(std::string const& file, long line, std::string const& tag, std::string const& what) { - info_.emplace_back(file, line, tag, what); - callback_on_push(); - } - SPROUT_NON_CONSTEXPR void pop() { - callback_on_pop(); - info_.pop_back(); - } - SPROUT_NON_CONSTEXPR reference top() { - return info_.back(); - } - SPROUT_NON_CONSTEXPR const_reference top() const { - return info_.back(); - } - SPROUT_NON_CONSTEXPR size_type size() const { - return info_.size(); - } - SPROUT_NON_CONSTEXPR iterator begin() { - return info_.begin(); - } - SPROUT_NON_CONSTEXPR iterator end() { - return info_.end(); - } - SPROUT_NON_CONSTEXPR const_iterator begin() const { - return info_.begin(); - } - SPROUT_NON_CONSTEXPR const_iterator end() const { - return info_.end(); - } - SPROUT_NON_CONSTEXPR const_iterator cbegin() const { - return info_.cbegin(); - } - SPROUT_NON_CONSTEXPR const_iterator cend() const { - return info_.cend(); - } - template - SPROUT_NON_CONSTEXPR void copy(OutputIterator out) const { - std::copy(begin(), end(), out); - } - SPROUT_NON_CONSTEXPR void print() const { - testspr::print_ln("trace-stack current: size:", size(), ':'); - for (const_iterator it = cbegin(), last = cend(); it != last; ++it) { - testspr::print_ln(" ", *it); - } - } - - SPROUT_NON_CONSTEXPR void notify_assertion_failed(std::string const& expr, std::string const& file, long line) { - info_.emplace_back(file, line, "assertion-failed", expr); - callback_on_notify(); - info_.pop_back(); - } - template - SPROUT_NON_CONSTEXPR void notify_throw_exception(E const& exception, std::string const& file, long line) { - info_.emplace_back(file, line, "throw-exception", testspr::typename_of(exception)); - callback_on_notify(); - info_.pop_back(); - } - template - SPROUT_NON_CONSTEXPR void notify_caught_exception(E const& exception, std::string const& file, long line) { - info_.emplace_back(file, line, "caught-exception", testspr::typename_of(exception)); - callback_on_notify(); - info_.pop_back(); - } - SPROUT_NON_CONSTEXPR void notify_mark(std::string const& name, std::string const& file, long line) { - info_.emplace_back(file, line, "mark", name); - callback_on_notify(); - info_.pop_back(); - } - - SPROUT_NON_CONSTEXPR void push_callback_on_push(function_type const& callback) { - callback_on_push_.push_back(callback); - } - SPROUT_NON_CONSTEXPR void pop_callback_on_push(function_type const& callback) { - function_container_type::reverse_iterator rfound - = std::find(callback_on_push_.rbegin(), callback_on_push_.rend(), callback); - if (rfound != callback_on_push_.rend()) { - callback_on_push_.erase(rfound.base() - 1); - } - } - SPROUT_NON_CONSTEXPR void push_callback_on_pop(function_type const& callback) { - callback_on_pop_.push_back(callback); - } - SPROUT_NON_CONSTEXPR void pop_callback_on_pop(function_type const& callback) { - function_container_type::reverse_iterator rfound - = std::find(callback_on_pop_.rbegin(), callback_on_pop_.rend(), callback); - if (rfound != callback_on_pop_.rend()) { - callback_on_pop_.erase(rfound.base() - 1); - } - } - SPROUT_NON_CONSTEXPR void push_callback_on_notify(function_type const& callback) { - callback_on_notify_.push_back(callback); - } - SPROUT_NON_CONSTEXPR void pop_callback_on_notify(function_type const& callback) { - function_container_type::reverse_iterator rfound - = std::find(callback_on_notify_.rbegin(), callback_on_notify_.rend(), callback); - if (rfound != callback_on_notify_.rend()) { - callback_on_notify_.erase(rfound.base() - 1); - } - } - - SPROUT_NON_CONSTEXPR void enable_print_on_entry() { - { - function_type callback = print_on_push(); - function_container_type::iterator found - = std::find(callback_on_push_.begin(), callback_on_push_.end(), callback); - if (found == callback_on_push_.end()) { - push_callback_on_push(callback); - } - } - { - function_type callback = print_on_pop(); - function_container_type::iterator found - = std::find(callback_on_pop_.begin(), callback_on_pop_.end(), callback); - if (found == callback_on_pop_.end()) { - push_callback_on_pop(callback); - } - } - { - function_type callback = print_on_notify(); - function_container_type::iterator found - = std::find(callback_on_notify_.begin(), callback_on_notify_.end(), callback); - if (found == callback_on_notify_.end()) { - push_callback_on_notify(callback); - } - } - } - SPROUT_NON_CONSTEXPR void disable_print_on_entry() { - { - function_type callback = print_on_push(); - pop_callback_on_push(callback); - } - { - function_type callback = print_on_pop(); - pop_callback_on_pop(callback); - } - { - function_type callback = print_on_notify(); - pop_callback_on_notify(callback); - } - } - - SPROUT_NON_CONSTEXPR void enable_record_on_entry() { - { - function_type callback = record_on_push(); - function_container_type::iterator found - = std::find(callback_on_push_.begin(), callback_on_push_.end(), callback); - if (found == callback_on_push_.end()) { - push_callback_on_push(callback); - } - } - { - function_type callback = record_on_pop(); - function_container_type::iterator found - = std::find(callback_on_pop_.begin(), callback_on_pop_.end(), callback); - if (found == callback_on_pop_.end()) { - push_callback_on_pop(callback); - } - } - { - function_type callback = record_on_notify(); - function_container_type::iterator found - = std::find(callback_on_notify_.begin(), callback_on_notify_.end(), callback); - if (found == callback_on_notify_.end()) { - push_callback_on_notify(callback); - } - } - } - SPROUT_NON_CONSTEXPR void disable_record_on_entry() { - { - function_type callback = record_on_push(); - pop_callback_on_push(callback); - } - { - function_type callback = record_on_pop(); - pop_callback_on_pop(callback); - } - { - function_type callback = record_on_notify(); - pop_callback_on_notify(callback); - } - } - }; - - // - // function_tracer - // - class function_tracer { - public: - SPROUT_NON_CONSTEXPR function_tracer(std::string const& file, long line) { - testspr::trace_stack::instance().push(file, line, "function"); - } - SPROUT_NON_CONSTEXPR function_tracer(std::string const& file, long line, std::string const& function) { - testspr::trace_stack::instance().push(file, line, "function", function); - } - ~function_tracer() SPROUT_NOEXCEPT { - testspr::trace_stack::instance().pop(); - } - }; - // - // TESTSPR_TRACE_FUNCTION - // -# define TESTSPR_TRACE_FUNCTION() \ - testspr::function_tracer SPROUT_PP_CAT(testspr_function_tracer_, __LINE__)(__FILE__, __LINE__, SPROUT_CURRENT_FUNCTION) - // - // TESTSPR_TRACE_FUNCTION_EXPR - // -# define TESTSPR_TRACE_FUNCTION_EXPR() \ - ((void)testspr::function_tracer(__FILE__, __LINE__, SPROUT_CURRENT_FUNCTION)) - - // - // block_tracer - // - class block_tracer { - public: - SPROUT_NON_CONSTEXPR block_tracer(std::string const& file, long line) { - testspr::trace_stack::instance().push(file, line, "block"); - } - SPROUT_NON_CONSTEXPR block_tracer(std::string const& file, long line, std::string const& name) { - testspr::trace_stack::instance().push(file, line, "block", name); - } - ~block_tracer() SPROUT_NOEXCEPT { - testspr::trace_stack::instance().pop(); - } - }; - // - // TESTSPR_TRACE_BLOCK - // -# define TESTSPR_TRACE_BLOCK(name) \ - testspr::block_tracer SPROUT_PP_CAT(testspr_block_tracer_, __LINE__)(__FILE__, __LINE__, testspr::to_string(name)) - // - // TESTSPR_TRACE_BLOCK_EXPR - // -# define TESTSPR_TRACE_BLOCK_EXPR(name) \ - ((void)testspr::block_tracer(__FILE__, __LINE__, testspr::to_string(name))) - - namespace detail { - inline SPROUT_NON_CONSTEXPR bool - trace_assertion_failed(char const* formatted, char const* expr, char const* file, long line) { - testspr::trace_stack::instance().notify_assertion_failed(expr, file, line); - return (std::cerr << formatted << std::endl), std::abort(), false; - } - inline SPROUT_NON_CONSTEXPR bool - trace_assertion_check(bool cond, char const* formatted, char const* expr, char const* file, long line) { - return cond ? true - : testspr::detail::trace_assertion_failed(formatted, expr, file, line) - ; - } - } // namespace detail - // - // TESTSPR_TRACE_ASSERT - // -# define TESTSPR_TRACE_ASSERT(expr) \ - ((void)testspr::detail::trace_assertion_check((expr), SPROUT_ASSERTION_FAILED_FORMAT(expr, __FILE__, __LINE__), SPROUT_PP_STRINGIZE((expr)), __FILE__, __LINE__)) - - namespace detail { - template - inline SPROUT_NON_CONSTEXPR void - trace_throw(E&& exception, char const* file, long line) { - testspr::trace_stack::instance().notify_throw_exception(exception, file, line); - throw sprout::forward(exception); - } - } // namespace detail - // - // TESTSPR_TRACE_THROW - // -# define TESTSPR_TRACE_THROW(e) \ - ((void)testspr::detail::trace_throw(e, __FILE__, __LINE__)) - - namespace detail { - template - inline SPROUT_NON_CONSTEXPR void - trace_caught(E&& exception, char const* file, long line) { - testspr::trace_stack::instance().notify_caught_exception(exception, file, line); - } - } // namespace detail - // - // TESTSPR_TRACE_CAUGHT - // -# define TESTSPR_TRACE_CAUGHT(e) \ - ((void)testspr::detail::trace_caught(e, __FILE__, __LINE__)) - - // - // TESTSPR_TRACE_MARK - // -# define TESTSPR_TRACE_MARK(name) \ - ((void)testspr::trace_stack::instance().notify_mark(testspr::to_string(name), __FILE__, __LINE__)) - - // - // TESTSPR_PRINT_CURRENT - // -# define TESTSPR_PRINT_CURRENT(name) \ - ((void)testspr::print_ln(testspr::trace_info(__FILE__, __LINE__, "current", name))) - - // - // TESTSPR_PRINT_TRACE_STACK - // TESTSPR_PRINT_TRACE_RECORD - // -# define TESTSPR_PRINT_TRACE_STACK() \ - ((void)testspr::trace_stack::instance().print()) -# define TESTSPR_PRINT_TRACE_RECORD() \ - ((void)testspr::trace_record::instance().print()) - - // - // TESTSPR_PRINT_STRATIFIED_TRACE_RECORD - // -# define TESTSPR_PRINT_STRATIFIED_TRACE_RECORD() \ - ((void)testspr::trace_record::instance().print_stratified()) - - - // - // TESTSPR_ENABLE_PRINT_ON_ENTRY - // TESTSPR_DISABLE_PRINT_ON_ENTRY - // -# define TESTSPR_ENABLE_PRINT_ON_ENTRY() \ - ((void)testspr::trace_stack::instance().enable_print_on_entry()) -# define TESTSPR_DISABLE_PRINT_ON_ENTRY() \ - ((void)testspr::trace_stack::instance().disable_print_on_entry()) - - // - // TESTSPR_ENABLE_RECORD_ON_ENTRY - // TESTSPR_DISABLE_RECORD_ON_ENTRY - // -# define TESTSPR_ENABLE_RECORD_ON_ENTRY() \ - ((void)testspr::trace_stack::instance().enable_record_on_entry()) -# define TESTSPR_DISABLE_RECORD_ON_ENTRY() \ - ((void)testspr::trace_stack::instance().disable_record_on_entry()) -} // namespace testspr - -#endif // #ifndef TESTSPR_TRACE_HPP diff --git a/dsp/lib/sprout/testspr/typeinfo.hpp b/dsp/lib/sprout/testspr/typeinfo.hpp deleted file mode 100644 index 5eed765..0000000 --- a/dsp/lib/sprout/testspr/typeinfo.hpp +++ /dev/null @@ -1,131 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef TESTSPR_TYPEINFO_HPP -#define TESTSPR_TYPEINFO_HPP - -// -// TESTSPR_HAS_CXXABI_H -// -#if defined(__clang__) -# if defined(__has_include) && __has_include() -# define TESTSPR_HAS_CXXABI_H -# endif -#elif defined(__GNUC__) && !defined(__QNX__) -# define TESTSPR_HAS_CXXABI_H -#endif - -#include -#include -#include -#ifdef TESTSPR_HAS_CXXABI_H -# include -# include -#endif -#include - -namespace testspr { - // - // id - // - template - struct id { - public: - typedef T type; - }; - - // - // demangle - // -#ifdef TESTSPR_HAS_CXXABI_H - namespace detail { - inline SPROUT_NON_CONSTEXPR char* - demangle_alloc(char const* name) { - int status = 0; - return abi::__cxa_demangle(name, 0, 0, &status); - } - inline SPROUT_NON_CONSTEXPR void - demangle_free(char* demangled) { - std::free(demangled); - } - class scoped_demangled_name { - private: - char* demangled_; - public: - explicit SPROUT_NON_CONSTEXPR scoped_demangled_name(char const* name) SPROUT_NOEXCEPT - : demangled_(testspr::detail::demangle_alloc(name)) - {} - ~scoped_demangled_name() SPROUT_NOEXCEPT { - testspr::detail::demangle_free(demangled_); - } - SPROUT_NON_CONSTEXPR char const* get() const SPROUT_NOEXCEPT { - return demangled_; - } - }; - } // namespace detail - - inline SPROUT_NON_CONSTEXPR std::string - demangle(char const* name) { - testspr::detail::scoped_demangled_name demangled(name); - return demangled.get() ? demangled.get() : name; - } -#else - inline SPROUT_NON_CONSTEXPR std::string - demangle(char const* name) { - return name; - } -#endif - inline SPROUT_NON_CONSTEXPR std::string - demangle(std::string const& name) { - return testspr::demangle(name.c_str()); - } - - // - // typename_of - // - inline SPROUT_NON_CONSTEXPR std::string - typename_of(std::type_info const& t) { - return testspr::demangle(t.name()); - } - template - inline SPROUT_NON_CONSTEXPR std::string - typename_of() { - return testspr::typename_of(typeid(T)); - } - template - inline SPROUT_NON_CONSTEXPR std::string - typename_of(T&& t) { - return testspr::typename_of(typeid(std::forward(t))); - } - - // - // strip_outer_template - // - inline SPROUT_NON_CONSTEXPR std::string - strip_outer_template(std::string const& s) { - std::string::size_type f = s.find('<'); - if (f == std::string::npos) { - return s; - } - std::string::size_type l = s.rfind('>'); - if (l == std::string::npos || f > l) { - return s; - } - return s.substr(f + 1, l - f - 1); - } - - // - // qualified_typename_of - // - template - inline SPROUT_NON_CONSTEXPR std::string - qualified_typename_of() { - return testspr::strip_outer_template(testspr::typename_of >()); - } -} // namespace testspr - -#endif // #ifndef TESTSPR_TYPEINFO_HPP diff --git a/dsp/lib/sprout/testspr/utility.hpp b/dsp/lib/sprout/testspr/utility.hpp deleted file mode 100644 index 3967f8f..0000000 --- a/dsp/lib/sprout/testspr/utility.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef TESTSPR_UTILITY_HPP -#define TESTSPR_UTILITY_HPP - -#include -#include -#include -#include - -namespace testspr { - // - // as_const - // - template - inline SPROUT_CONSTEXPR typename std::conditional< - std::is_lvalue_reference::value, - typename std::remove_reference::type const&, - typename std::remove_reference::type const&& - >::type - as_const(T&& t) { - return SPROUT_FORWARD(T, t); - } - - // - // as_non_const - // - template - inline SPROUT_CONSTEXPR typename std::conditional< - std::is_lvalue_reference::value, - typename std::remove_const::type>::type&, - typename std::remove_const::type>::type&& - >::type - as_non_const(T&& t) { - typedef typename std::conditional< - std::is_lvalue_reference::value, - typename std::remove_const::type>::type&, - typename std::remove_const::type>::type&& - >::type type; - return const_cast(t); - } -} // namespace testspr - -#endif // #ifndef TESTSPR_UTILITY_HPP diff --git a/dsp/lib/sprout/tools/CMakeLists.txt b/dsp/lib/sprout/tools/CMakeLists.txt deleted file mode 100644 index b9920fd..0000000 --- a/dsp/lib/sprout/tools/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -subdirs( compost darkroom ) diff --git a/dsp/lib/sprout/tools/compost/CMakeLists.txt b/dsp/lib/sprout/tools/compost/CMakeLists.txt deleted file mode 100644 index b1ed949..0000000 --- a/dsp/lib/sprout/tools/compost/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -add_executable( tools_compost_wavconv wavconv.cpp ) -set_target_properties( tools_compost_wavconv PROPERTIES OUTPUT_NAME "wavconv" ) -install( TARGETS tools_compost_wavconv - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib -) diff --git a/dsp/lib/sprout/tools/compost/wavconv.cpp b/dsp/lib/sprout/tools/compost/wavconv.cpp deleted file mode 100644 index b4dea2f..0000000 --- a/dsp/lib/sprout/tools/compost/wavconv.cpp +++ /dev/null @@ -1,136 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace toolspr { - template - std::string read_chunk(InputIterator& it) { - std::string s; - for (std::size_t i = 0; i != N; ++i, ++it) { - s.push_back(*it); - } - return s; - } - - template - IntType read_int(InputIterator& it) { - IntType n = 0; - for (std::size_t i = 0; i != sizeof(IntType); ++i, ++it) { - n |= static_cast(static_cast(*it)) << (i * CHAR_BIT); - } - return n; - } -} // namespace toolspr - -int main(int argc, char* argv[]) { - if (argc < 2) { - std::cerr - << "#error missing parameter.\n" - << std::flush - ; - return 0; - } - - std::ifstream ifs(argv[1], std::ios_base::in | std::ios_base::binary); - std::istreambuf_iterator it(ifs); - std::istreambuf_iterator last; - std::cout - << "#if defined(COMPOST_LOADING_SOURCE_VERSION)\n" - "\n" - "COMPOST_SRC_VERSION(0)\n" - "\n" - "#elif defined(COMPOST_LOADING_SOURCE_INFO)\n" - "\n" - ; - - if (toolspr::read_chunk(it) != "RIFF") { - std::cerr - << "#error not RIFF file.\n" - << std::flush - ; - return EXIT_FAILURE; - } - /*auto file_size = */toolspr::read_int(it); - if (toolspr::read_chunk(it) != "WAVE") { - std::cerr - << "#error not WAVE format.\n" - << std::flush - ; - return EXIT_FAILURE; - } - - while (toolspr::read_chunk(it) != "fmt ") { - auto chunk_size = toolspr::read_int(it); - std::advance(it, chunk_size); - } - auto fmt_size = toolspr::read_int(it); - auto format_tag = toolspr::read_int(it); - auto channels = toolspr::read_int(it); - auto samples_per_sec = toolspr::read_int(it); - auto bytes_per_sec = toolspr::read_int(it); - auto block_size = toolspr::read_int(it); - auto bits_per_sample = toolspr::read_int(it); - std::cout - << format_tag << ",\n" - << channels << ",\n" - << samples_per_sec << ",\n" - << bytes_per_sec << ",\n" - << block_size << ",\n" - << bits_per_sample << ",\n" - ; - std::advance(it, fmt_size - 16); - - while (toolspr::read_chunk(it) != "data") { - auto chunk_size = toolspr::read_int(it); - std::advance(it, chunk_size); - } - auto data_size = toolspr::read_int(it); - std::size_t size = data_size / (bits_per_sample / CHAR_BIT); - std::cout - << size << "\n" - << "\n" - "#elif defined(COMPOST_LOADING_SOURCE_DATA)\n" - "\n" - ; - if (size > 0) { - if (bits_per_sample == 16) { - for (std::size_t i = 1; i != size; ++i) { - std::cout - << toolspr::read_int(it) << ",\n" - ; - } - std::cout - << toolspr::read_int(it) << "\n" - ; - } else if (bits_per_sample == 8) { - for (std::size_t i = 1; i != size; ++i) { - std::cout - << toolspr::read_int(it) << ",\n" - ; - } - std::cout - << toolspr::read_int(it) << "\n" - ; - } - } - - std::cout - << "\n" - "#endif\n" - << std::flush - ; -} diff --git a/dsp/lib/sprout/tools/compost/wave_io.hpp b/dsp/lib/sprout/tools/compost/wave_io.hpp deleted file mode 100644 index b7bb5ed..0000000 --- a/dsp/lib/sprout/tools/compost/wave_io.hpp +++ /dev/null @@ -1,176 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef TOOLS_COMPOST_WAVE_IO_HPP -#define TOOLS_COMPOST_WAVE_IO_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace toolspr { - // - // output_plot - // - // output for gnuplot - // - template - std::basic_ostream& output_plot(std::basic_ostream& os, InputRange const& range) { - os << std::fixed; - unsigned x = 0; - for (auto const& e : range) { - os << x++ << ',' << e << '\n'; - } - return os; - } - template - std::basic_ostream& output_plot(std::string const& filename, InputRange const& range) { - std::ofstream os(filename); - output_plot(os, range); - } - - // - // output_plot_real - // - // output for gnuplot (only real part) - // - template - std::basic_ostream& output_plot_real(std::basic_ostream& os, InputRange const& range) { - os << std::fixed; - unsigned x = 0; - for (auto const& e : range) { - os << x++ << ',' << real(e) << '\n'; - } - return os; - } - template - std::basic_ostream& output_plot_real(std::string const& filename, InputRange const& range) { - std::ofstream os(filename); - output_plot_real(os, range); - } - - // - // write_chunk - // write_int - // write_wav - // - // write data for wav format - // - template - void write_chunk(OutputIterator& it, std::string const& s) { - it = std::copy(s.begin(), s.end(), it); - } - template - void write_int(OutputIterator& it, IntType const& n) { - for (std::size_t i = 0; i != sizeof(IntType); ++i, ++it) { - *it = static_cast((static_cast::type>(n) >> (i * CHAR_BIT)) & 0xFF); - } - } - template - void write_wav(OutputIterator& it, sprout::compost::sources::info_type const& info, InputRange const& data) { - std::size_t data_size = info.size * info.bits_per_sample / CHAR_BIT; - - write_chunk(it, "RIFF"); - write_int(it, 36 + data_size); - write_chunk(it, "WAVE"); - write_chunk(it, "fmt "); - write_int(it, 16); - write_int(it, info.format_tag); - write_int(it, info.channels); - write_int(it, info.samples_per_sec); - write_int(it, info.bytes_per_sec); - write_int(it, info.block_size); - write_int(it, info.bits_per_sample); - write_chunk(it, "data"); - write_int(it, data_size); - if (info.bits_per_sample == 16) { - for (auto e : data) { - write_int(it, e); - } - } else if (info.bits_per_sample == 8) { - for (auto e : data) { - write_int(it, e); - } - } - } - - // - // output_wav - // - // output for wav format - // - template - void output_wav(std::basic_ostream& os, sprout::compost::sources::info_type const& info, InputRange const& data) { - std::ostreambuf_iterator it(os); - write_wav(it, info, data); - } - template - void output_wav(std::string const& filename, sprout::compost::sources::info_type const& info, InputRange const& data) { - std::ofstream os(filename, std::ios_base::out | std::ios_base::binary); - output_wav(os, info, data); - } - - // - // setup_dev_dsp - // - // Setting up dsp device - // - int setup_dev_dsp(sprout::compost::sources::info_type const& info) { - /* open of dsp device */ - int fd = open("/dev/dsp", O_RDWR); - if (fd < 0) { - std::cerr << "open of /dev/dsp failed" << std::endl; - return -1; - } - - /* initializations of dsp device */ - int arg = 0; - int status = 0; - /* sampling bit rate */ - arg = info.bits_per_sample; - status = ioctl(fd, SOUND_PCM_WRITE_BITS, &arg); - if (status == -1 || arg != info.bits_per_sample) { - return -1; - } - /* stereo or monoral */ - arg = info.channels; - status = ioctl(fd, SOUND_PCM_WRITE_CHANNELS, &arg); - if (status == -1 || arg != info.channels) { - return -1; - } - /* sampling frequency */ - arg = info.samples_per_sec; - status = ioctl(fd, SOUND_PCM_WRITE_RATE, &arg); - if (status == -1 || arg != static_cast(info.samples_per_sec)) { - return -1; - } - - return fd; - } - - // - // write_dev_dsp - // - // write to dsp device - // - ssize_t write_dev_dsp(int fd, void const* buf, std::size_t n) { - return write(fd, buf, n); - } -} // namespace toolspr - -#endif // #ifndef TOOLS_COMPOST_WAVE_IO_HPP diff --git a/dsp/lib/sprout/tools/darkroom/CMakeLists.txt b/dsp/lib/sprout/tools/darkroom/CMakeLists.txt deleted file mode 100644 index 2298cd1..0000000 --- a/dsp/lib/sprout/tools/darkroom/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -if( OpenCV_FOUND ) - include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${Boost_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS} ) - add_executable( tools_darkroom_texconv texconv.cpp ) - target_link_libraries( tools_darkroom_texconv ${OpenCV_LDFLAGS} ) - set_target_properties( tools_darkroom_texconv PROPERTIES OUTPUT_NAME "texconv" ) - install( TARGETS tools_darkroom_texconv - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ) -endif( OpenCV_FOUND ) diff --git a/dsp/lib/sprout/tools/darkroom/darkcult.cpp b/dsp/lib/sprout/tools/darkroom/darkcult.cpp deleted file mode 100644 index aac187a..0000000 --- a/dsp/lib/sprout/tools/darkroom/darkcult.cpp +++ /dev/null @@ -1,99 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -// -// DARKROOM_SOURCE -// -#ifndef DARKROOM_SOURCE -# error DARKROOM_SOURCE not defined. for example: "../../example/darkroom/two_spheres.hpp" -#else -# include DARKROOM_SOURCE -#endif - -// -// DARKROOM_TOTAL_WIDTH -// DARKROOM_TOTAL_HEIGHT -// -#ifndef DARKROOM_TOTAL_WIDTH -# define DARKROOM_TOTAL_WIDTH 16 -#endif -#ifndef DARKROOM_TOTAL_HEIGHT -# define DARKROOM_TOTAL_HEIGHT DARKROOM_TOTAL_WIDTH -#endif - -// -// DARKROOM_TILE_WIDTH -// DARKROOM_TILE_HEIGHT -// -#ifndef DARKROOM_TILE_WIDTH -# define DARKROOM_TILE_WIDTH DARKROOM_TOTAL_WIDTH -#endif -#ifndef DARKROOM_TILE_HEIGHT -# define DARKROOM_TILE_HEIGHT DARKROOM_TOTAL_HEIGHT -#endif - -// -// DARKROOM_OFFSET_X -// DARKROOM_OFFSET_Y -// -#ifndef DARKROOM_OFFSET_X -# define DARKROOM_OFFSET_X 0 -#endif -#ifndef DARKROOM_OFFSET_Y -# define DARKROOM_OFFSET_Y 0 -#endif - -// -// DARKROOM_RUNTIME/DARKROOM_VARIABLE -// -#ifndef DARKROOM_RUNTIME -# define DARKROOM_VARIABLE SPROUT_STATIC_CONSTEXPR -#else -# define DARKROOM_VARIABLE -#endif - -#include -#include -#include - -namespace darkcult { - SPROUT_STATIC_CONSTEXPR std::size_t total_width = DARKROOM_TOTAL_WIDTH; - SPROUT_STATIC_CONSTEXPR std::size_t total_height = DARKROOM_TOTAL_HEIGHT; - SPROUT_STATIC_CONSTEXPR std::size_t tile_width = DARKROOM_TILE_WIDTH; - SPROUT_STATIC_CONSTEXPR std::size_t tile_height = DARKROOM_TILE_HEIGHT; - SPROUT_STATIC_CONSTEXPR std::size_t offset_x = DARKROOM_OFFSET_X; - SPROUT_STATIC_CONSTEXPR std::size_t offset_y = DARKROOM_OFFSET_Y; -} // namespace darkcult - -int main() { - using namespace sprout::darkroom; - - typedef pixels::color_pixels::type image_type; - DARKROOM_VARIABLE auto image = pixels::generate( - darkcult::raytracer, darkcult::renderer, darkcult::camera, - darkcult::object, darkcult::light, - darkcult::offset_x, darkcult::offset_y, - darkcult::total_width, darkcult::total_height - ); - - std::cout - << "P3" << std::endl - << image[0].size() << ' ' << image.size() << std::endl - << 255 << std::endl - ; - for (auto i = image.begin(), last = image.end(); i != last; ++i) { - auto const& line = *i; - for (auto j = line.begin(), last = line.end(); j != last; ++j) { - auto const& pixel = *j; - std::cout - << unsigned(colors::r(pixel)) << ' ' - << unsigned(colors::g(pixel)) << ' ' - << unsigned(colors::b(pixel)) << std::endl - ; - } - } -} diff --git a/dsp/lib/sprout/tools/darkroom/darkcult.py b/dsp/lib/sprout/tools/darkroom/darkcult.py deleted file mode 100644 index b8e9292..0000000 --- a/dsp/lib/sprout/tools/darkroom/darkcult.py +++ /dev/null @@ -1,121 +0,0 @@ -#!/usr/bin/env python -# ============================================================================= -# Copyright (c) 2011-2019 Bolero MURAKAMI -# https://github.com/bolero-MURAKAMI/Sprout -# -# Distributed under the Boost Software License, Version 1.0. (See accompanying -# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -# ============================================================================= -import sys -import optparse -import subprocess -import multiprocessing -import logging -import tty - -def build(command): - sys.stdout.write(".") - sys.stdout.flush() - return subprocess.call(command, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE) - -def continue_build(command): - if command[2]: - sys.stdout.write("*") - sys.stdout.flush() - return 0 - sys.stdout.write(".") - sys.stdout.flush() - result = subprocess.call(command[0], shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE) - if not result: - logging.critical(command[1]) - return result - -def main(): - parser = optparse.OptionParser(description='darkcult.py') - parser.add_option('--source', type='string', default='../../example/darkroom/two_spheres.hpp') - parser.add_option('--stagedir', type='string', default='darkroom') - parser.add_option('--output', type='string', default='out.ppm') - parser.add_option('--compiler', type='string', default='g++') - parser.add_option('--width', type='int', default=16) - parser.add_option('--height', type='int', default=16) - parser.add_option('--tile_width', type='int', default=16) - parser.add_option('--tile_height', type='int', default=16) - parser.add_option('--left', type='int', default=0) - parser.add_option('--top', type='int', default=0) - parser.add_option('--right', type='int') - parser.add_option('--bottom', type='int') - parser.add_option('--compile_options', type='string', default='') - parser.add_option('--darkcult_cpp', type='string') - parser.add_option('--continuable', type='int', default=0) - parser.add_option('--continue_file', type='string', default='continue.log') - parser.add_option('--max_procs', type='int', default=0) - (opts, args) = parser.parse_args() - - def format_command(x, y): - bin = "%s/%d/%d.out" % (opts.stagedir, y, x) - out = "%s/%d/%d.ppm" % (opts.stagedir, y, x) - return "%s -o %s" \ - " %s" \ - " -DDARKROOM_SOURCE=\'\"%s\"\'" \ - " -DDARKROOM_TOTAL_WIDTH=%d -DDARKROOM_TOTAL_HEIGHT=%d" \ - " -DDARKROOM_TILE_WIDTH=%d -DDARKROOM_TILE_HEIGHT=%d" \ - " -DDARKROOM_OFFSET_X=%d -DDARKROOM_OFFSET_Y=%d" \ - " %s" \ - " && %s > %s" \ - % (opts.compiler, bin, - opts.compile_options, - opts.source, - opts.width, opts.height, - opts.tile_width, opts.tile_height, - x, y, - opts.darkcult_cpp, - bin, out - ) - - if opts.continuable: - logging.basicConfig( - filename=opts.continue_file, - format="%(message)s" - ) - completed = [line.strip() for line in open(opts.continue_file)] - - fd = sys.stdin.fileno() - tc_old = tty.tcgetattr(fd) - tty.setcbreak(fd) - - def format_continue_command(x, y): - key = "%d %d" % (x, y) - return (format_command(x, y), key, key in completed) - - pool = multiprocessing.Pool(opts.max_procs if opts.max_procs != 0 else None) - try: - results = pool.map_async( - continue_build, - [format_continue_command(x, y) - for y in range(opts.top, opts.bottom, opts.tile_height) - for x in range(opts.left, opts.right, opts.tile_width) - ] - ) - while True: - code = sys.stdin.read(1) - if results.ready(): - break - if code == 'q': - pool.terminate() - return 2 - return any(results.get()) - finally: - tty.tcsetattr(fd, tty.TCSADRAIN, tc_old) - logging.shutdown() - else: - pool = multiprocessing.Pool(opts.max_procs if opts.max_procs != 0 else None) - return any(pool.map( - build, - [format_command(x, y) - for y in range(opts.top, opts.bottom, opts.tile_height) - for x in range(opts.left, opts.right, opts.tile_width) - ] - )) - -if __name__ == "__main__": - sys.exit(main()) diff --git a/dsp/lib/sprout/tools/darkroom/darkcult.sh b/dsp/lib/sprout/tools/darkroom/darkcult.sh deleted file mode 100644 index b8b56c2..0000000 --- a/dsp/lib/sprout/tools/darkroom/darkcult.sh +++ /dev/null @@ -1,284 +0,0 @@ -#!/bin/bash -# ============================================================================= -# Copyright (c) 2011-2019 Bolero MURAKAMI -# https://github.com/bolero-MURAKAMI/Sprout -# -# Distributed under the Boost Software License, Version 1.0. (See accompanying -# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -# ============================================================================= -# -# requires: Netpbm (http://netpbm.sourceforge.net/) -# requires: Python (http://www.python.org/) if parallel mode -# -src="../../example/darkroom/two_spheres.hpp" -stagedir="darkroom" -output="out.ppm" -compiler="g++" -width=16 -height=16 -tile_width=16 -tile_height=16 -l=0 -t=0 -r= -b= -declare -a common_options=() -declare -a user_macros=() -declare -a include_paths=() -max_procs= -force=0 -continuable=0 -runtime=0 -use_version=0 -use_help=0 -darkcult_cpp=$(cd $(dirname $0); pwd)/darkcult.cpp -darkcult_py=$(cd $(dirname $0); pwd)/darkcult.py - -get_used_mem() { - local mem_info=(`free -m | sed -n "/^Mem:/s/^Mem:[ \t]*//p"`) - echo -n "${mem_info[1]}" -} - -args=`getopt -o s:S:o:C:w:h:W:H:l:t:r:b:O:D:I:P:fc -l source:,stagedir:,output:,compiler:,width:,height:,tile-width:,tile-height:,left:,top:,right:,bottom:,option:,define:,include:,max-procs:,force,continuable,runtime,version,help -- "$@"` -if [ "$?" -ne 0 ]; then - echo >&2 "error: options parse error. See 'darkcult.sh --help'" - exit 1 -fi -eval set -- ${args} -while [ -n "$1" ]; do - case $1 in - -s|--source) src=$2; shift 2;; - -S|--stagedir) stagedir=$2; shift 2;; - -o|--output) output=$2; shift 2;; - -C|--compiler) compiler=$2; shift 2;; - -w|--width) width=$2; shift 2;; - -h|--height) height=$2; shift 2;; - -W|--tile-width) tile_width=$2; shift 2;; - -H|--tile-height) tile_height=$2; shift 2;; - -l|--left) l=$2; shift 2;; - -t|--top) t=$2; shift 2;; - -r|--right) r=$2; shift 2;; - -b|--bottom) b=$2; shift 2;; - -O|--option) common_options=(${common_options[@]} "$2"); shift 2;; - -D|--define) user_macros=(${user_macros[@]} "$2"); shift 2;; - -I|--include) include_paths=(${include_paths[@]} "$2"); shift 2;; - -P|--max-procs) max_procs=$2; shift 2;; - -f|--force) force=1; shift;; - -c|--continuable) continuable=1; shift;; - --runtime) runtime=1; shift;; - --version) use_version=1; shift;; - --help) use_help=1; shift;; - --) shift; break;; - *) echo >&2 "error: unknown option($1) used."; exit 1;; - esac -done -: ${r:=${width}} -: ${b:=${height}} - -if [ ${use_help} -ne 0 ]; then - echo "overview:" - echo " Sprout.Darkroom library split rendering script" - echo "usage:" - echo " darkcult.sh [options]" - echo "options:" - echo " -s, --source= Indicates the source file." - echo " Default; '../../example/darkroom/two_spheres.hpp'" - echo "" - echo " -S, --stagedir= Output files here." - echo " Default; 'darkroom'" - echo "" - echo " -o, --output= Output file of the result." - echo " Default; 'out.ppm'" - echo "" - echo " -C, --compiler= Compiler to use." - echo " Default; 'g++'" - echo "" - echo " -w, --width= Output width of rendering." - echo " Default; 16" - echo "" - echo " -h, --height= Output height of rendering." - echo " Default; 16" - echo "" - echo " -W, --tile-width= Output width of divided rendering." - echo " Default; 16" - echo "" - echo " -H, --tile-height= Output height of divided rendering." - echo " Default; 16" - echo "" - echo " -l, --left= Left X position of rendering range." - echo " Default; 0" - echo "" - echo " -t, --top= Top Y position of rendering range." - echo " Default; 0" - echo "" - echo " -r, --right= Right X position of rendering range." - echo " Default; " - echo "" - echo " -b, --bottom= Bottom Y position of rendering range." - echo " Default; " - echo "" - echo " -O, --option= Add compile option." - echo "" - echo " -D, --define= Define macro for preprocessor." - echo "" - echo " -I, --include= Add system include path." - echo "" - echo " -P, --max-procs= The maximum number of process use." - echo " If other than null, processing in parallel mode." - echo " If 0, using the number of CPUs in the system." - echo "" - echo " -f, --force Allow overwrite of ." - echo "" - echo " -c, --continuable Enable break/continue mode." - echo " Press ; check finished." - echo " Press 'q' ; terminate compile." - echo "" - echo " --runtime Enable runtime mode." - echo "" - echo " --version Show version." - echo "" - echo " --help This message." - exit 0 -fi - -if [ ${use_version} -ne 0 ]; then - script_dir=$(cd $(dirname $0); pwd) - version_hpp_path="${script_dir}/../../sprout/version.hpp" - sprout_version_yyyymmdd=`sed -n "s/[ \t]*#[ \t]*define[ \t]\+SPROUT_VERSION_YYYYMMDD[ \t]\+//p" ${version_hpp_path}` - sprout_copyright=`sed -n "/\/\*=/,/=\*\//s/^[ \t]\+/ /p" ${version_hpp_path}` - echo "version:" - echo " Sprout version(YYYYMMDD) = ${sprout_version_yyyymmdd}" - echo "copyright:" - echo "${sprout_copyright}" - exit 0 -fi - -echo "settings:" -echo " source = '${src}'" -echo " stagedir = '${stagedir}'" -echo " output = '${output}'" -echo " compiler = '${compiler}'" -echo " width = ${width}" -echo " height = ${height}" -echo " tile-width = ${tile_width}" -echo " tile-height = ${tile_height}" -echo " left = ${l}" -echo " top = ${t}" -echo " right = ${r}" -echo " bottom = ${b}" -echo " user-macros = (${user_macros[*]})" -echo " include-paths = (${include_paths[*]})" -echo " max-procs = ${max_procs}" -echo " force = ${force}" -echo " continuable = ${continuable}" -echo " runtime = ${runtime}" - -if [ ! -f "${src}" -a ! -f "$(cd $(dirname $0); pwd)/${src}" ]; then - echo >&2 "error: source(${src}) not exists." - exit 1 -fi - -for user_macro in ${user_macros}; do - define_options="${define_options} -D${user_macro}" -done -for include_path in ${include_paths}; do - include_options="${include_options} -I${include_path}" -done -compile_options="-std=c++11 ${define_options} ${include_options} ${common_options[*]}" -if [ ${runtime} -ne 0 ]; then - compile_options="${compile_options} -DDARKROOM_RUNTIME" -fi - -if [ -d "${stagedir}" ]; then - if [ ${force} -eq 0 ]; then - if [ ${continuable} -eq 0 ]; then - echo >&2 "error: stagedir(${stagedir}) already exists." - exit 1 - fi - else - rm -f -r ${stagedir}/* - fi - rm -f ${stagedir}/*.ppm -else - mkdir -p ${stagedir} -fi -for ((y=0; y ${out} - if [ $? -ne 0 ]; then - echo "" - echo >&2 " error: compile(${y}/${x}) failed." - exit 1 - fi - - done - echo "" - - let y_elapsed=${SECONDS}-${y_start} - echo " elapsed = ${y_elapsed}s" - done -else - echo " processing in parallel mode." - if [ ${continuable} -ne 0 ]; then - echo " enable break/continue mode." - fi - echo -n " " - python "${darkcult_py}" \ - "--source=${src}" "--stagedir=${stagedir}" "--output=${output}" "--compiler=${compiler}" \ - "--width=${width}" "--height=${height}" \ - "--tile_width=${tile_width}" "--tile_height=${tile_height}"" "\ - "--left=${l}" "--top=${t}" \ - "--right=${r}" "--bottom=${b}" \ - "--compile_options=${compile_options}" "--darkcult_cpp=${darkcult_cpp}" \ - "--continuable=${continuable}" "--continue_file=${stagedir}/continue.log" \ - "--max_procs=${max_procs}" - result=$? - echo "" - if [ ${result} -eq 2 ]; then - echo " compile terminated." - is_terminated=1 - exit 0 - elif [ ${result} -ne 0 ]; then - echo >&2 " error: compile failed." - exit 1 - fi -fi - -let elapsed=${SECONDS}-${start} -echo " elapsed(total) = ${elapsed}s" - -if [ ${is_uncompleted} -eq 0 ]; then - for ((y=0; y /dev/null - pnmcat -lr $(ls *.ppm | sort -n) > ../${y}.ppm - popd > /dev/null - done - pushd ${stagedir} > /dev/null - pnmcat -tb $(ls *.ppm | sort -n) > ${output} - popd > /dev/null -fi - -echo "finished." diff --git a/dsp/lib/sprout/tools/darkroom/texconv.cpp b/dsp/lib/sprout/tools/darkroom/texconv.cpp deleted file mode 100644 index a8dfb02..0000000 --- a/dsp/lib/sprout/tools/darkroom/texconv.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -/* - requires: OpenCV (http://opencv.jp/) -*/ -#include -#include -#include -#include -#include -#include -#include - -int main(int argc, char* argv[]) { - if (argc < 2) { - std::cerr - << "#error missing parameter.\n" - << std::flush - ; - return 0; - } - - cv::Mat image(cv::imread(argv[1])); - std::cout - << "#if defined(DARKROOM_LOADING_TEXTURE_VERSION)\n" - "\n" - "DARKROOM_TEX_VERSION(0)\n" - "\n" - "#elif defined(DARKROOM_LOADING_TEXTURE_INFO)\n" - "\n" - "DARKROOM_TEX_IMAGE_DEFAULT,\n" - "DARKROOM_TEX_PIXEL_INT_R8G8B8,\n" - << image.cols << ",\n" - << image.rows << "\n" - << "\n" - "#elif defined(DARKROOM_LOADING_TEXTURE_PIXEL)\n" - "\n" - ; - - std::cout << std::hex; - for (std::size_t y = 0, h = image.rows; y != h; ++y) { - for (std::size_t x = 0, w = image.cols; x != w; ++x) { - auto pixel = image.ptr(y) + x * 3; - std::cout - << "0x" - << std::setfill('0') << std::setw(2) << unsigned(pixel[2]) - << std::setfill('0') << std::setw(2) << unsigned(pixel[1]) - << std::setfill('0') << std::setw(2) << unsigned(pixel[0]) - ; - if (!(y == h - 1 && x == w - 1)) { - std::cout << ','; - if (x != w - 1) { - std::cout << ' '; - } - } - } - std::cout << '\n'; - } - std::cout << std::dec; - - std::cout - << "\n" - "#endif\n" - << std::flush - ; -} diff --git a/dsp/lib/sprout/tools/files/CMakeLists.txt b/dsp/lib/sprout/tools/files/CMakeLists.txt deleted file mode 100644 index 3174c5b..0000000 --- a/dsp/lib/sprout/tools/files/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -add_executable( tools_files_filegraph filegraph.cpp ) -set_target_properties( tools_files_filegraph PROPERTIES OUTPUT_NAME "filegraph" ) -install( TARGETS tools_files_filegraph - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib -) diff --git a/dsp/lib/sprout/tools/files/filegraph.cpp b/dsp/lib/sprout/tools/files/filegraph.cpp deleted file mode 100644 index c68cb4e..0000000 --- a/dsp/lib/sprout/tools/files/filegraph.cpp +++ /dev/null @@ -1,431 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "../sprig/algorithm/string.hpp" -#include "../sprig/graph/depth_first_search.hpp" - -class include_graph_hooks - : public boost::wave::context_policies::default_preprocessing_hooks -{ -private: - typedef boost::wave::context_policies::default_preprocessing_hooks base_type; -public: - // node of graph - struct node_type { - boost::filesystem::path absolute; - boost::filesystem::path filename; - bool has_include_guard; - public: - node_type(boost::filesystem::path const& absolute, boost::filesystem::path const& filename) - : absolute(absolute), filename(filename), has_include_guard(false) - {} - operator boost::filesystem::path const&() const { - return filename; - } - operator std::string() const { - return filename.generic_string(); - } - friend bool operator==(node_type const& lhs, node_type const& rhs) { - return lhs.absolute == rhs.absolute; - } - friend bool operator==(node_type const& lhs, boost::filesystem::path const& rhs) { - return lhs.absolute == rhs; - } - friend bool operator==(boost::filesystem::path const& lhs, node_type const& rhs) { - return lhs == rhs.absolute; - } - friend bool operator!=(node_type const& lhs, node_type const& rhs) { - return !(lhs == rhs); - } - friend bool operator!=(node_type const& lhs, boost::filesystem::path const& rhs) { - return !(lhs == rhs); - } - friend bool operator!=(boost::filesystem::path const& lhs, node_type const& rhs) { - return !(lhs == rhs); - } - template - friend std::basic_ostream& operator<<(std::basic_ostream& lhs, node_type const& rhs) { - return lhs << rhs.filename.generic_string(); - } - }; - typedef std::pair edge_type; - typedef boost::adjacency_list< - boost::vecS, - boost::vecS, - boost::bidirectionalS, - boost::no_property - > graph_type; -private: - std::vector node_list_; - std::vector edge_list_; - std::vector current_list_; - int current_; -public: - explicit include_graph_hooks(boost::filesystem::path const& start) - : node_list_{node_type{boost::filesystem::absolute(start), start.filename()}} - , edge_list_{} - , current_list_{0} - , current_(0) - {} - std::vector const& - nodes() const { - return node_list_; - } - std::vector const& - edges() const { - return edge_list_; - } - // make graph - template - Graph make_graph() const { - return Graph(edge_list_.begin(), edge_list_.end(), node_list_.size()); - } - graph_type make_graph() const { - return make_graph(); - } - // output graphviz - void write_graphviz(std::ostream& out) const { - boost::write_graphviz( - out, - make_graph(), - boost::make_label_writer(&node_list_[0]) - ); - } - // collect no include guard files - template - void collect_no_include_guard_files(OutputIterator result) const { - std::copy_if( - node_list_.begin() + 1, node_list_.end(), result, - [](node_type const& e) { return !e.has_include_guard; } - ); - } - // collect circulated includes - template - void collect_circulated_includes(OutputIterator result) const { - boost::depth_first_search( - make_graph(), - boost::visitor(sprig::make_back_edge_recorder(result)) - ); - } - // collect isolated files - template - void collect_isolated_files(OutputIterator result, boost::filesystem::path const& path) const { - typedef boost::filesystem::recursive_directory_iterator iterator; - for (auto it = iterator(path), last = iterator(); it != last; ++it) { - if (!boost::filesystem::is_directory(*it)) { - boost::filesystem::path abspath(boost::filesystem::absolute(*it)); - auto found = std::find(node_list_.begin(), node_list_.end(), abspath); - if (found == node_list_.end()) { // add result if not include - *result++ = abspath.generic_string(); - } - } - } - } -public: - // hook the locate include file process - template - bool locate_include_file( - Context& ctx, - std::string& file_path, - bool is_system, - char const* current_name, - std::string& dir_path, - std::string& native_name - ) - { - std::string filename = is_system ? ('<' + file_path + '>') : ('\"' + file_path + '\"'); - if (!base_type::locate_include_file(ctx, file_path, is_system, current_name, dir_path, native_name)) { - return false; - } - dir_path = filename; // overwrite the include directive text - return true; - } - // hook the opened include file process - template - void opened_include_file( - Context const& /*ctx*/, - std::string const& relname, - std::string const& absname, - bool /*is_system_include*/ - ) - { - boost::filesystem::path abspath(boost::filesystem::absolute(absname)); - auto found = std::find(node_list_.begin(), node_list_.end(), abspath); - auto to = std::distance(node_list_.begin(), found); - if (found == node_list_.end()) { // add node if first include - node_list_.emplace_back(abspath, relname); - } - edge_list_.emplace_back(current_list_.back(), to); - current_list_.push_back(to); // update current - current_ = to; - } - // hook the returning from include file process - template - void returning_from_include_file(Context const& /*ctx*/) { - current_ = current_list_.back(); - current_list_.pop_back(); // revert current - } - // hook the detected include guard process - template - void detected_include_guard( - Context const& /*ctx*/, - std::string const& /*filename*/, - std::string const& /*include_guard*/ - ) - { - node_list_.at(current_).has_include_guard = true; - } - template - void detected_pragma_once( - Context const& /*ctx*/, - Token const& /*pragma_token*/, - std::string const& /*filename*/ - ) - { - node_list_.at(current_).has_include_guard = true; - } -}; - -// collect sysinclude paths -template -void collect_sysinclude_paths(OutputIterator result, std::string const& command = "g++") { - { - std::ofstream ofs("_collect_sysinclude_paths.cpp"); - } - std::system((command + " -v -E _collect_sysinclude_paths.cpp 1> /dev/null 2> _collect_sysinclude_paths").c_str()); - { - std::ifstream ifs("_collect_sysinclude_paths"); - std::string text( - std::istreambuf_iterator(ifs.rdbuf()), - std::istreambuf_iterator() - ); - auto rng = boost::make_iterator_range(text); - rng = sprig::find_skip(rng, boost::algorithm::first_finder("#include <...>")); // skip to begin of the include path - rng = sprig::find_skip(rng, boost::algorithm::first_finder("\n")); - while (boost::algorithm::starts_with(rng, " ")) { - auto found = sprig::find_between( - rng, - boost::algorithm::token_finder(boost::algorithm::is_space(), boost::algorithm::token_compress_on), - boost::algorithm::first_finder("\n") - ); - *result++ = std::string(boost::begin(found), boost::end(found)); - rng = boost::make_iterator_range(boost::end(found), boost::end(rng)); - rng = sprig::find_skip(rng, boost::algorithm::first_finder("\n")); - } - } -} - -int main(int argc, const char* argv[]) { - std::string src; - std::string command; - std::string text; - - if (argc >= 2) { - src = argv[1]; - - // read text from file - std::ifstream ifs(argv[1]); - text = std::string( - std::istreambuf_iterator(ifs.rdbuf()), - std::istreambuf_iterator() - ); - } - if (argc >= 3) { - command = argv[2]; - } - - try { - // prepare preprocessor - typedef boost::wave::context< - std::string::iterator, - boost::wave::cpplexer::lex_iterator >, - boost::wave::iteration_context_policies::load_file_to_string, - ::include_graph_hooks - > context_type; - context_type ctx(text.begin(), text.end(), src.c_str(), ::include_graph_hooks(src)); - - // set language - ctx.set_language( - boost::wave::language_support( - boost::wave::support_cpp11 - | boost::wave::support_option_include_guard_detection // include guard detection - ) - ); - // set include paths - if (!command.empty()) { - std::cout - << "collect command :\n" - << command << "\n" - ; - } - { - std::vector list; - if (command.empty()) { - ::collect_sysinclude_paths(std::back_inserter(list)); - } else { - ::collect_sysinclude_paths(std::back_inserter(list), command); - } - std::cout - << "sysinclude paths :\n" - ; - for (auto&& e : list) { - std::cout - << " " << e << "\n" - ; - ctx.add_sysinclude_path(e.c_str()); - } - std::cout - << std::flush - ; - } - - if (!src.empty()) { - // run preprocessor - for (auto&& e : ctx) { - //std::cout << e.get_value(); - } - } - - for ( ; ;) { - std::cout - << "> " - << std::flush - ; - std::string line; - std::getline(std::cin, line); - if (line.empty()) { - break; - } - std::vector tokens; - boost::algorithm::split(tokens, line, boost::algorithm::is_space()); - if (tokens.at(0) == "find") { - // find include paths - if (tokens.size() < 2) { - std::cout - << "missing parameter.\n" - << std::flush - ; - continue; - } - std::cout - << "find <" << tokens.at(1) << "> :\n" - ; - std::string filepath(tokens.at(1)); - std::string dirpath; - if (!ctx.find_include_file(filepath, dirpath, true, 0)) { - std::cout - << " not found\n" - << std::flush - ; - continue; - } - std::cout - << " " << filepath << "\n" - << std::flush - ; - } else if (tokens.at(0) == "graph") { - // output graph - std::cout - << "graph output > out.graph.dot\n" - ; - std::ofstream ofs("out.graph.dot"); - ctx.get_hooks().write_graphviz(ofs); - std::cout - << std::flush - ; - } else if (tokens.at(0) == "noguard") { - // output no include guarde files - std::vector<::include_graph_hooks::node_type> list; - ctx.get_hooks().collect_no_include_guard_files(std::back_inserter(list)); - std::cout - << "no include guarde files (" << list.size() << ") :\n" - ; - for (auto const& e : list) { - std::cout - << " " << e << "\n" - ; - } - std::cout - << std::flush - ; - } else if (tokens.at(0) == "circulated") { - // output circulated includes - std::vector::edge_descriptor> list; - ctx.get_hooks().collect_circulated_includes(std::back_inserter(list)); - auto g = ctx.get_hooks().make_graph(); - std::cout - << "circulated includes (" << list.size() << ") :\n" - ; - for (auto const& e : list) { - std::cout - << " " << boost::source(e, g) << "[" << ctx.get_hooks().nodes()[boost::source(e, g)] << "]\n" - << " -> " << boost::target(e, g) << "[" << ctx.get_hooks().nodes()[boost::target(e, g)] << "]\n" - ; - } - std::cout - << std::flush - ; - } else if (tokens.at(0) == "isolated") { - // output Sprout isolated files - std::cout - << "isolated files output > out.isolated.txt\n" - ; - std::ofstream ofs("out.isolated.txt"); - // get Sprout system include path - std::string filepath("sprout/config.hpp"); - std::string dirpath; - if (!ctx.find_include_file(filepath, dirpath, true, 0)) { - std::cerr - << "#error sprout not found\n" - << std::flush - ; - continue; - } - dirpath = boost::filesystem::path(filepath).parent_path().generic_string(); - // output list - std::vector list; - ctx.get_hooks().collect_isolated_files(std::back_inserter(list), dirpath); - std::sort(list.begin(), list.end()); - std::copy(list.begin(), list.end(), std::ostream_iterator(ofs, "\n")); - std::cout - << std::flush - ; - } else { - std::cout - << "invalid command\n" - << std::flush - ; - } - } - } catch (boost::wave::cpp_exception& e) { - // eorror handling - std::cerr - << "#error " << e.file_name() << "(" << e.line_no() << "):" << e.description() << "\n" - << std::flush - ; - } -} diff --git a/dsp/lib/sprout/tools/sprig/algorithm/string.hpp b/dsp/lib/sprout/tools/sprig/algorithm/string.hpp deleted file mode 100644 index 9d43f37..0000000 --- a/dsp/lib/sprout/tools/sprig/algorithm/string.hpp +++ /dev/null @@ -1,13 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef TOOLS_SPRIG_ALGORITHM_STRING_HPP -#define TOOLS_SPRIG_ALGORITHM_STRING_HPP - -#include "./string/find.hpp" - -#endif // #ifndef TOOLS_SPRIG_ALGORITHM_STRING_HPP diff --git a/dsp/lib/sprout/tools/sprig/algorithm/string/find.hpp b/dsp/lib/sprout/tools/sprig/algorithm/string/find.hpp deleted file mode 100644 index a52720c..0000000 --- a/dsp/lib/sprout/tools/sprig/algorithm/string/find.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef TOOLS_SPRIG_ALGORITHM_STRING_FIND_HPP -#define TOOLS_SPRIG_ALGORITHM_STRING_FIND_HPP - -#include "./find_skip.hpp" -#include "./find_between.hpp" - -#endif // #ifndef TOOLS_SPRIG_ALGORITHM_STRING_FIND_HPP diff --git a/dsp/lib/sprout/tools/sprig/algorithm/string/find_between.hpp b/dsp/lib/sprout/tools/sprig/algorithm/string/find_between.hpp deleted file mode 100644 index b6e5971..0000000 --- a/dsp/lib/sprout/tools/sprig/algorithm/string/find_between.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef TOOLS_SPRIG_ALGORITHM_STRING_FIND_BETWEEN_HPP -#define TOOLS_SPRIG_ALGORITHM_STRING_FIND_BETWEEN_HPP - -#include -#include -#include -#include - -namespace sprig { - // - // between_finder - // - template - struct between_finderF { - private: - Finder1 finder1_; - Finder2 finder2_; - public: - between_finderF(Finder1 const& finder1, Finder2 const& finder2) - : finder1_(finder1), finder2_(finder2) - {} - template - boost::iterator_range - operator()(ForwardIterator first, ForwardIterator last) const { - first = boost::end(finder1_(first, last)); - return boost::iterator_range(first, boost::begin(finder2_(first, last))); - } - }; - template - inline sprig::between_finderF - between_finder(Finder1 const& finder1, Finder2 const& finder2) { - return sprig::between_finderF(finder1, finder2); - } - // - // find_between - // - template - inline boost::iterator_range::type> - find_between(Range& input, Finder1 const& finder1, Finder2 const& finder2) { - return boost::algorithm::find(input, sprig::between_finder(finder1, finder2)); - } -} // namespace sprig - -#endif // #ifndef TOOLS_SPRIG_ALGORITHM_STRING_FIND_BETWEEN_HPP diff --git a/dsp/lib/sprout/tools/sprig/algorithm/string/find_skip.hpp b/dsp/lib/sprout/tools/sprig/algorithm/string/find_skip.hpp deleted file mode 100644 index 7ff02f0..0000000 --- a/dsp/lib/sprout/tools/sprig/algorithm/string/find_skip.hpp +++ /dev/null @@ -1,80 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef TOOLS_SPRIG_ALGORITHM_STRING_FIND_SKIP_HPP -#define TOOLS_SPRIG_ALGORITHM_STRING_FIND_SKIP_HPP - -#include -#include -#include -#include - -namespace sprig { - // - // skip_finder - // - template - struct skip_finderF { - private: - Finder finder_; - public: - explicit skip_finderF(Finder const& finder) - : finder_(finder) - {} - template - boost::iterator_range - operator()(ForwardIterator first, ForwardIterator last) const { - return boost::iterator_range(boost::end(finder_(first, last)), last); - } - }; - template - inline sprig::skip_finderF - skip_finder(Finder const& finder) { - return sprig::skip_finderF(finder); - } - // - // find_skip - // - template - inline boost::iterator_range::type> - find_skip(Range& input, Finder const& finder) { - return boost::algorithm::find(input, sprig::skip_finder(finder)); - } - - // - // skip_backward_finder - // - template - struct skip_backward_finderF { - private: - Finder finder_; - public: - explicit skip_backward_finderF(Finder const& finder) - : finder_(finder) - {} - template - boost::iterator_range - operator()(ForwardIterator first, ForwardIterator last) const { - return boost::iterator_range(first, boost::begin(finder_(first, last))); - } - }; - template - inline sprig::skip_backward_finderF - skip_backward_finder(Finder const& finder) { - return sprig::skip_backward_finderF(finder); - } - // - // find_skip_backward - // - template - inline boost::iterator_range::type> - find_skip_backward(Range& input, Finder const& finder) { - return boost::algorithm::find(input, sprig::skip_backward_finder(finder)); - } -} // namespace sprig - -#endif // #ifndef TOOLS_SPRIG_ALGORITHM_STRING_FIND_SKIP_HPP diff --git a/dsp/lib/sprout/tools/sprig/graph/back_edge_recorder.hpp b/dsp/lib/sprout/tools/sprig/graph/back_edge_recorder.hpp deleted file mode 100644 index 7945d61..0000000 --- a/dsp/lib/sprout/tools/sprig/graph/back_edge_recorder.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef TOOLS_SPRIG_GRAPH_BACK_EDGE_RECORDER_HPP -#define TOOLS_SPRIG_GRAPH_BACK_EDGE_RECORDER_HPP - -#include - -namespace sprig { - // - // back_edge_recorder - // - template - struct back_edge_recorder - : public boost::default_dfs_visitor - { - private: - OutputIterator out_; - public: - explicit back_edge_recorder(OutputIterator out) - : out_(out) - {} - template - void back_edge(Edge const& e, Graph const&) { - *out_++ = e; - } - }; - // - // make_back_edge_recorder - // - template - inline sprig::back_edge_recorder - make_back_edge_recorder(OutputIterator out) { - return sprig::back_edge_recorder(out); - } -} // namespace sprig - -#endif // #ifndef TOOLS_SPRIG_GRAPH_BACK_EDGE_RECORDER_HPP diff --git a/dsp/lib/sprout/tools/sprig/graph/depth_first_search.hpp b/dsp/lib/sprout/tools/sprig/graph/depth_first_search.hpp deleted file mode 100644 index 4e40ebc..0000000 --- a/dsp/lib/sprout/tools/sprig/graph/depth_first_search.hpp +++ /dev/null @@ -1,13 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifndef TOOLS_SPRIG_GRAPH_DEPTH_FIRST_SEARCH_HPP -#define TOOLS_SPRIG_GRAPH_DEPTH_FIRST_SEARCH_HPP - -#include "./back_edge_recorder.hpp" - -#endif // #ifndef TOOLS_SPRIG_GRAPH_DEPTH_FIRST_SEARCH_HPP diff --git a/dsp/lib/sprout/tools/testspr/test.cpp b/dsp/lib/sprout/tools/testspr/test.cpp deleted file mode 100644 index d407bd4..0000000 --- a/dsp/lib/sprout/tools/testspr/test.cpp +++ /dev/null @@ -1,12 +0,0 @@ -/*============================================================================= - Copyright (c) 2011-2019 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ -#ifdef TESTSPR_CONFIG_INCLUDE_HEADER_ALL -# include "../../testspr/header_all.hpp" -#endif - -#include "../../testspr/sprout.cpp" diff --git a/dsp/lib/sprout/tools/testspr/test.py b/dsp/lib/sprout/tools/testspr/test.py deleted file mode 100644 index 9e158e8..0000000 --- a/dsp/lib/sprout/tools/testspr/test.py +++ /dev/null @@ -1,81 +0,0 @@ -#!/usr/bin/env python -# ============================================================================= -# Copyright (c) 2011-2019 Bolero MURAKAMI -# https://github.com/bolero-MURAKAMI/Sprout -# -# Distributed under the Boost Software License, Version 1.0. (See accompanying -# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -# ============================================================================= -import sys -import optparse -import subprocess -import multiprocessing - -def build(command): - sys.stdout.write(".") - sys.stdout.flush() - return subprocess.call(command, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE) - -def main(): - parser = optparse.OptionParser(description='test.py') - parser.add_option('--stagedir', type='string', default='testspr') - parser.add_option('--gcc_version', type='string', default='.') - parser.add_option('--clang_version', type='string', default='.') - parser.add_option('--gcc_root', type='string', default='/usr/local') - parser.add_option('--clang_root', type='string', default='/usr/local') - parser.add_option('--all_options', type='string', default='') - parser.add_option('--test_cpp', type='string') - parser.add_option('--serialized_std_options', type='string', default='{}') - parser.add_option('--serialized_compiler_specific_options', type='string', default='{}') - parser.add_option('--serialized_version_specific_options', type='string', default='{}') - parser.add_option('--max_procs', type='int', default=0) - (opts, args) = parser.parse_args() - - std_options = eval(opts.serialized_std_options) - version_specific_options = eval(opts.serialized_version_specific_options) - compiler_specific_options = eval(opts.serialized_compiler_specific_options) - - def format_command(name, version, root): - base = "%s-%s" % (name, version) if version != "." else name - bin = "%s/test.%s.out" % (opts.stagedir, base.replace('.', '')) - compile_log = "%s/test.%s.compile.log" % (opts.stagedir, base.replace('.', '')) - execute_log = "%s/test.%s.execute.log" % (opts.stagedir, base.replace('.', '')) - fail_log = "%s/fail.log" % (opts.stagedir) - compiler = "%s/%s/bin/%s++" % (root, base, name.rstrip('c')) if version != "." else "%s++" % name.rstrip('c') - command = "%s -o %s" \ - " %s %s" \ - " %s %s" \ - " %s" \ - % (compiler, bin, - std_options.get(base, ''), opts.all_options, - compiler_specific_options.get(name, ''), version_specific_options.get(base, ''), - opts.test_cpp - ) - fail_info = "%s : %s" % (base, command) - return "(" \ - " %s > %s 2>&1" \ - " && %s > %s 2>&1" \ - " ) || !(echo %s >> %s)" \ - % (command, compile_log, - bin, execute_log, - fail_info, fail_log - ) - - pool = multiprocessing.Pool(opts.max_procs if opts.max_procs != 0 else None) - return sum(result != 0 for result in pool.map( - build, - ([format_command('gcc', version, opts.gcc_root) - for version in opts.gcc_version.split(' ') - ] if opts.gcc_version != ' ' - else [] - ) - + - ([format_command('clang', version, opts.clang_root) - for version in opts.clang_version.split(' ') - ] if opts.clang_version != ' ' - else [] - ) - )) - -if __name__ == "__main__": - sys.exit(main()) diff --git a/dsp/lib/sprout/tools/testspr/test.sh b/dsp/lib/sprout/tools/testspr/test.sh deleted file mode 100644 index e1651c4..0000000 --- a/dsp/lib/sprout/tools/testspr/test.sh +++ /dev/null @@ -1,377 +0,0 @@ -#!/bin/bash -# ============================================================================= -# Copyright (c) 2011-2019 Bolero MURAKAMI -# https://github.com/bolero-MURAKAMI/Sprout -# -# Distributed under the Boost Software License, Version 1.0. (See accompanying -# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -# ============================================================================= -# -# requires: Python (http://www.python.org/) if parallel mode -# -stagedir="testspr" -gcc_version="." -clang_version="." -gcc_root="/usr/local" -clang_root="/usr/local" -declare -a user_macros=() -declare -a include_paths=() -max_procs= -force=0 -use_version=0 -use_help=0 -std="c++11" -declare -a common_options=() -declare -a compiler_options=() -declare -A compiler_specific_options=() -declare -a version_options=() -declare -A version_specific_options=( -# [clang-3.3]='-ftemplate-depth=512' -# [clang-3.4]='-ftemplate-depth=512' -) -test_cpp=$(cd $(dirname $0); pwd)/test.cpp -test_py=$(cd $(dirname $0); pwd)/test.py - -get_std_option() { - vn=0 - if [ "${2}" = "." ]; then - if [ "${1}" = "gcc" ]; then - read -ra current_version_array <<< `g++ --version` - vn=${current_version_array[2]//.} - elif [ "${1}" = "clang" ]; then - read -ra current_version_array <<< `clang++ --version` - vn=${current_version_array[2]//.} - fi - else - vn=${2//.} - fi - if [ "${3}" = "c++20" -o "${3}" = "c++2a" ]; then - if [ "${1}" = "gcc" ]; then - if [ "${vn}" -lt "480" ]; then - echo -n "-std=c++11" - elif [ "${vn}" -lt "510" ]; then - echo -n "-std=c++1y" - elif [ "${vn}" -lt "800" ]; then - echo -n "-std=c++17" - else - echo -n "-std=c++2a" - fi - elif [ "${1}" = "clang" ]; then - if [ "${vn}" -lt "32" ]; then - echo -n "-std=c++11" - elif [ "${vn}" -lt "350" ]; then - echo -n "-std=c++1y" - elif [ "${vn}" -lt "500" ]; then - echo -n "-std=c++1z" - elif [ "${vn}" -lt "600" ]; then - echo -n "-std=c++17" - else - echo -n "-std=c++2a" - fi - fi - elif [ "${3}" = "c++17" -o "${3}" = "c++1z" ]; then - if [ "${1}" = "gcc" ]; then - if [ "${vn}" -lt "480" ]; then - echo -n "-std=c++11" - elif [ "${vn}" -lt "510" ]; then - echo -n "-std=c++1y" - else - echo -n "-std=c++17" - fi - elif [ "${1}" = "clang" ]; then - if [ "${vn}" -lt "32" ]; then - echo -n "-std=c++11" - elif [ "${vn}" -lt "350" ]; then - echo -n "-std=c++1y" - elif [ "${vn}" -lt "500" ]; then - echo -n "-std=c++1z" - else - echo -n "-std=c++17" - fi - fi - elif [ "${3}" = "c++14" -o "${3}" = "c++1y" ]; then - if [ "${1}" = "gcc" ]; then - if [ "${vn}" -lt "480" ]; then - echo -n "-std=c++11" - elif [ "${vn}" -lt "510" ]; then - echo -n "-std=c++1y" - else - echo -n "-std=c++14" - fi - elif [ "${1}" = "clang" ]; then - if [ "${vn}" -lt "32" ]; then - echo -n "-std=c++11" - elif [ "${vn}" -lt "350" ]; then - echo -n "-std=c++1y" - else - echo -n "-std=c++14" - fi - fi - else - echo -n "-std=c++11" - fi -} - -args=`getopt -o S:s:g:c:O:C:V:D:I:P:f -l stagedir:,source:,gcc-version:,clang-version:,gcc-root:,clang-root:,std:,option:,compiler-option:,version-option:,define:,include:,max-procs:,force,version,help -- "$@"` -if [ "$?" -ne 0 ]; then - echo >&2 "error: options parse error. See 'test.sh --help'" - exit 1 -fi -eval set -- ${args} -while [ -n "$1" ]; do - case $1 in - -S|--stagedir) stagedir=$2; shift 2;; - -s|--source) test_cpp=$2; shift 2;; - -g|--gcc-version) gcc_version="$2"; shift 2;; - -c|--clang-version) clang_version="$2"; shift 2;; - --gcc-root) gcc_root="$2"; shift 2;; - --clang-root) clang_root="$2"; shift 2;; - --std) std="$2"; shift 2;; - -O|--option) common_options=("${common_options[@]}" "$2"); shift 2;; - -C|--compiler-option) compiler_options=("${compiler_options[@]}" "$2"); shift 2;; - -V|--version-option) version_options=("${version_options[@]}" "$2"); shift 2;; - -D|--define) user_macros=("${user_macros[@]}" "$2"); shift 2;; - -I|--include) include_paths=("${include_paths[@]}" "$2"); shift 2;; - -P|--max-procs) max_procs=$2; shift 2;; - -f|--force) force=1; shift;; - --version) use_version=1; shift;; - --help) use_help=1; shift;; - --) shift; break;; - *) echo >&2 "error: unknown option($1) used."; exit 1;; - esac -done - -if [ ${use_help} -ne 0 ]; then - echo "overview:" - echo " Sprout C++ libraries automatic test script" - echo "usage:" - echo " test.sh [options]" - echo "options:" - echo " -S, --stagedir= Output files here." - echo " Default; 'testspr'" - echo "" - echo " -s, --source= C++ source file." - echo " Default; './test.cpp'" - echo "" - echo " -g, --gcc-version= Indicates gcc version list (space separated)." - echo " If '.', version that is installed on the system." - echo " Default; '.'" - echo "" - echo " -c, --clang-version= Indicates clang version list (space separated)." - echo " If '.', version that is installed on the system." - echo " Default; '.'" - echo "" - echo " --gcc-root= Root directory that gcc installed." - echo " Default; '/usr/local'" - echo "" - echo " --clang-root= Root directory that clang installed." - echo " Default; '/usr/local'" - echo "" - echo " --std= Standard C++ version." - echo " c++11, c++14, or c++17." - echo " Default; 'c++11'" - echo "" - echo " -O, --option= Add compile option." - echo "" - echo " -C, --compiler-option= Add compiler specific compile option." - echo " Example; 'clang -ftemplate-depth=512'" - echo "" - echo " -V, --version-option= Add version specific compile option." - echo " Example; 'clang-3.3 -ftemplate-depth=512'" - echo "" - echo " -D, --define= Define macro for preprocessor." - echo "" - echo " -I, --include= Add system include path." - echo "" - echo " -P, --max-procs= The maximum number of process use." - echo " If other than null, processing in parallel mode." - echo " If 0, using the number of CPUs in the system." - echo "" - echo " -f, --force Allow overwrite of ." - echo "" - echo " --version Show version." - echo "" - echo " --help This message." - exit 0 -fi - -if [ ${use_version} -ne 0 ]; then - script_dir=$(cd $(dirname $0); pwd) - version_hpp_path="${script_dir}/../../sprout/version.hpp" - sprout_version_yyyymmdd=`sed -n "s/[ \t]*#[ \t]*define[ \t]\+SPROUT_VERSION_YYYYMMDD[ \t]\+//p" ${version_hpp_path}` - sprout_copyright=`sed -n "/\/\*=/,/=\*\//s/^[ \t]\+/ /p" ${version_hpp_path}` - echo "version:" - echo " Sprout version(YYYYMMDD) = ${sprout_version_yyyymmdd}" - echo "copyright:" - echo "${sprout_copyright}" - exit 0 -fi - -echo "settings:" -echo " stagedir = '${stagedir}'" -echo " source = '${test_cpp}'" -echo " gcc-version = (${gcc_version})" -echo " clang-version = (${clang_version})" -echo " gcc-root = '${gcc_root}'" -echo " clang-root = '${clang_root}'" -echo " std = '${std}'" -echo " common-options = (${common_options[*]})" -echo " compiler-options = (${compiler_options[*]})" -echo " version-options = (${version_options[*]})" -echo " user-macros = (${user_macros[*]})" -echo " include-paths = (${include_paths[*]})" -echo " max-procs = ${max_procs}" -echo " force = ${force}" - -if [ -z "${gcc_version}" ]; then - gcc_version=" " -fi -if [ -z "${clang_version}" ]; then - clang_version=" " -fi -for user_macro in ${user_macros[*]}; do - define_options="${define_options} -D${user_macro}" -done -for include_path in ${include_paths[*]}; do - include_options="${include_options} -I${include_path}" -done -all_options="-v -Wall -pedantic -pedantic-errors ${define_options} ${include_options} ${common_options[*]}" -vo=0 -vkey="" -for option in ${compiler_options[*]}; do - if [ ${vo} -eq 0 ]; then - vkey=${option} - vo=1 - else - compiler_specific_options[${vkey}]="${compiler_specific_options[${vkey}]} ${option}" - vo=0 - fi -done -for option in ${version_options[*]}; do - if [ ${vo} -eq 0 ]; then - vkey=${option} - vo=1 - else - version_specific_options[${vkey}]="${version_specific_options[${vkey}]} ${option}" - vo=0 - fi -done - -if [ -d "${stagedir}" ]; then - if [ ${force} -eq 0 ]; then - echo >&2 "error: stagedir(${stagedir}) already exists." - exit 1 - else - rm -f -r ${stagedir}/* - fi -else - mkdir -p ${stagedir} -fi - -echo "test:" -compile() { - local base - if [ ${2} != "." ]; then - base=${1}-${2} - else - base=${1} - fi - local bin=${stagedir}/test.${base//.}.out - local compile_log=${stagedir}/test.${base//.}.compile.log - local execute_log=${stagedir}/test.${base//.}.execute.log - local compiler - if [ ${2} != "." ]; then - compiler=${5}/${base}/bin/${1/%cc}++ - else - compiler=${1/%cc}++ - fi - echo " compile(${base})..." - ${compiler} -o ${bin} ${4} ${version_specific_options[${base}]} ${3} >${compile_log} 2>&1 - if [ $? -eq 0 ]; then - echo " compile succeeded." - echo " execute(${base})..." - ${bin} >${execute_log} 2>&1 - if [ $? -eq 0 ]; then - echo " execute succeeded." - else - echo >&2 " error: execute(${base}) failed." - return 1 - fi - else - echo >&2 " error: compile(${base}) failed." - return 1 - fi - return 0 -} -if [ -z "${max_procs}" ]; then - fail_count=0 - for version in ${gcc_version}; do - std_option=`get_std_option "gcc" "${version}" "${std}"` - compile "gcc" "${version}" "${test_cpp}" "${std_option} ${all_options} ${compiler_specific_options[gcc]}" "${gcc_root}" - let fail_count=${fail_count}+$? - done - for version in ${clang_version}; do - std_option=`get_std_option "clang" "${version}" "${std}"` - compile "clang" "${version}" "${test_cpp}" "${std_option} ${all_options} ${compiler_specific_options[clang]}" "${clang_root}" - let fail_count=${fail_count}+$? - done - if [ ${fail_count} -ne 0 ]; then - echo >&2 " error: test(${fail_count}) failed." - else - echo " test succeeded." - fi -else - echo " processing in parallel mode." - echo -n " " - serialized_compiler_specific_options={` - for key in $(echo ${!compiler_specific_options[*]}); do - echo \'${key}\':\'${compiler_specific_options[${key}]}\', - done - echo \'_\':\'\' - `} - serialized_version_specific_options={` - for key in $(echo ${!version_specific_options[*]}); do - echo \'${key}\':\'${version_specific_options[${key}]}\', - done - echo \'_\':\'\' - `} - serialized_std_options={` - for version in ${gcc_version}; do - if [ "${version}" = "." ]; then - echo -n \'gcc\':\' - else - echo -n \'gcc-${version}\':\' - fi - get_std_option "gcc" "${version}" "${std}" - echo \', - done - for version in ${clang_version}; do - if [ "${version}" = "." ]; then - echo -n \'clang\':\' - else - echo -n \'clang-${version}\':\' - fi - get_std_option "clang" "${version}" "${std}" - echo \', - done - echo \'_\':\'\' - `} - python "${test_py}" \ - "--stagedir=${stagedir}" \ - "--gcc_version=${gcc_version}" "--clang_version=${clang_version}" \ - "--gcc_root=${gcc_root}" "--clang_root=${clang_root}" \ - "--all_options=${all_options}" "--test_cpp=${test_cpp}" \ - "--serialized_std_options=${serialized_std_options}" \ - "--serialized_compiler_specific_options=${serialized_compiler_specific_options}" \ - "--serialized_version_specific_options=${serialized_version_specific_options}" \ - "--max_procs=${max_procs}" - fail_count=$? - echo "" - if [ ${fail_count} -ne 0 ]; then - echo >&2 " error: test(${fail_count}) failed." - else - echo " test succeeded." - fi -fi - -echo "finished." diff --git a/dsp/src/dsp/AudioBuffer.h b/dsp/src/dsp/AudioBuffer.h index 9a2dcb5..b1b69da 100644 --- a/dsp/src/dsp/AudioBuffer.h +++ b/dsp/src/dsp/AudioBuffer.h @@ -1,16 +1,16 @@ -/** +/** * Copyright (C) Johannes Elliesen, 2021 - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ diff --git a/dsp/src/dsp/Biquad.h b/dsp/src/dsp/Biquad.h index 4fd7985..43a645d 100644 --- a/dsp/src/dsp/Biquad.h +++ b/dsp/src/dsp/Biquad.h @@ -1,28 +1,24 @@ -/** +/** * Copyright (C) Johannes Elliesen, 2021 - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #pragma once -#include -#include -#include -#include -#include -#include -#include + +#include +#include template class Biquad @@ -48,8 +44,8 @@ class Biquad { // according to U.Zoelzer - DAFX, second edition, sec. 2.2, p.49 const FloatType K = (mathType == MathType::accurate) - ? FloatType(sprout::math::tan(sprout::math::pi() * frequency / sampleRate)) - : FloatType(fastTan(sprout::math::pi() * frequency / sampleRate)); + ? FloatType(gcem::tan(FloatType(M_PI) * frequency / sampleRate)) + : FloatType(fastTan(FloatType(M_PI) * frequency / sampleRate)); const FloatType Kp1 = K + 1; Coefficients result; result.b0 = K / Kp1; @@ -66,8 +62,8 @@ class Biquad { // according to U.Zoelzer - DAFX, second edition, sec. 2.2, p.49 const FloatType K = (mathType == MathType::accurate) - ? FloatType(sprout::math::tan(sprout::math::pi() * frequency / sampleRate)) - : FloatType(fastTan(sprout::math::pi() * frequency / sampleRate)); + ? FloatType(gcem::tan(FloatType(M_PI) * frequency / sampleRate)) + : FloatType(fastTan(FloatType(M_PI) * frequency / sampleRate)); const FloatType K2 = K * K; const FloatType K2Q = K2 * Q; const FloatType denom = K2Q + K + Q; @@ -86,8 +82,8 @@ class Biquad { // according to U.Zoelzer - DAFX, second edition, sec. 2.2, p.49 const FloatType K = (mathType == MathType::accurate) - ? FloatType(sprout::math::tan(sprout::math::pi() * frequency / sampleRate)) - : FloatType(fastTan(sprout::math::pi() * frequency / sampleRate)); + ? FloatType(gcem::tan(FloatType(M_PI) * frequency / sampleRate)) + : FloatType(fastTan(FloatType(M_PI) * frequency / sampleRate)); const FloatType Kp1 = K + 1; Coefficients result; result.b0 = 1 / Kp1; @@ -104,8 +100,8 @@ class Biquad { // according to U.Zoelzer - DAFX, second edition, sec. 2.2, p.49 const FloatType K = (mathType == MathType::accurate) - ? FloatType(sprout::math::tan(sprout::math::pi() * frequency / sampleRate)) - : FloatType(fastTan(sprout::math::pi() * frequency / sampleRate)); + ? FloatType(gcem::tan(FloatType(M_PI) * frequency / sampleRate)) + : FloatType(fastTan(FloatType(M_PI) * frequency / sampleRate)); const FloatType K2 = K * K; Coefficients result; result.b0 = Q / (K2 * Q + K + Q); @@ -122,8 +118,8 @@ class Biquad { // according to U.Zoelzer - DAFX, second edition, sec. 2.2, p.49 const FloatType K = (mathType == MathType::accurate) - ? FloatType(sprout::math::tan(sprout::math::pi() * frequency / sampleRate)) - : FloatType(fastTan(sprout::math::pi() * frequency / sampleRate)); + ? FloatType(gcem::tan(FloatType(M_PI) * frequency / sampleRate)) + : FloatType(fastTan(FloatType(M_PI) * frequency / sampleRate)); const FloatType K2 = K * K; Coefficients result; result.b0 = K / (K2 * Q + K + Q); @@ -140,8 +136,8 @@ class Biquad { // according to U.Zoelzer - DAFX, second edition, sec. 2.2, p.49 const FloatType K = (mathType == MathType::accurate) - ? FloatType(sprout::math::tan(sprout::math::pi() * frequency / sampleRate)) - : FloatType(fastTan(sprout::math::pi() * frequency / sampleRate)); + ? FloatType(gcem::tan(FloatType(M_PI) * frequency / sampleRate)) + : FloatType(fastTan(FloatType(M_PI) * frequency / sampleRate)); const FloatType K2 = K * K; Coefficients result; result.b0 = Q * (1 + K2) / (K2 * Q + K + Q); @@ -158,9 +154,9 @@ class Biquad { // according to U.Zoelzer - DAFX, second edition, sec. 2.3.2, p.66, table 2.4 const FloatType K = (mathType == MathType::accurate) - ? FloatType(sprout::math::tan(sprout::math::pi() * frequency / sampleRate)) - : FloatType(fastTan(sprout::math::pi() * frequency / sampleRate)); - const FloatType V0 = sprout::math::pow(tenPow1div20, gain); // == pow(10, gain/20) + ? FloatType(gcem::tan(FloatType(M_PI) * frequency / sampleRate)) + : FloatType(fastTan(FloatType(M_PI) * frequency / sampleRate)); + const FloatType V0 = gcem::pow(tenPow1div20, gain); // == pow(10, gain/20) const FloatType K2 = K * K; Coefficients result; if (gain > 0) @@ -188,11 +184,11 @@ class Biquad static constexpr Coefficients createLowShelf1(FloatType sampleRate, FloatType frequency, FloatType gain) { // Bilinear transform - const auto sqrtA = sprout::math::pow(tenPow1div40, gain); // = sqrt(10^(gain/20)) + const auto sqrtA = gcem::pow(tenPow1div40, gain); // = sqrt(10^(gain/20)) const auto scaledFreq = frequency / sqrtA; const auto warpedFreq = (mathType == MathType::accurate) - ? FloatType(sprout::math::tan(sprout::math::pi() * scaledFreq / sampleRate)) - : FloatType(fastTan(sprout::math::pi() * scaledFreq / sampleRate)); + ? FloatType(gcem::tan(FloatType(M_PI) * scaledFreq / sampleRate)) + : FloatType(fastTan(FloatType(M_PI) * scaledFreq / sampleRate)); const auto A = sqrtA * sqrtA; // = 10^(gain/20) const auto wfp1 = (warpedFreq + FloatType(1.0)); @@ -213,12 +209,12 @@ class Biquad { static_assert(mathType == MathType::accurate, "MathType::fast is not yet supported!"); - const FloatType A = sprout::math::pow(tenPow1div40, gain); // == pow(10, gain/40) == sqrt(pow(10, gain/20)) + const FloatType A = gcem::pow(tenPow1div40, gain); // == pow(10, gain/40) == sqrt(pow(10, gain/20)) const auto aminus1 = A - FloatType(1); const auto aplus1 = A + FloatType(1); - const auto omega = (sprout::math::two_pi() * std::max(frequency, FloatType(2))) / sampleRate; - const auto coso = sprout::math::cos(omega); - const auto beta = sprout::math::sin(omega) * sprout::math::sqrt(A) / Q; + const auto omega = (FloatType(2.0 * M_PI) * gcem::max(frequency, FloatType(2))) / sampleRate; + const auto coso = gcem::cos(omega); + const auto beta = gcem::sin(omega) * gcem::sqrt(A) / Q; const auto aminus1TimesCoso = aminus1 * coso; // coefficients for transposed Form II Biquad @@ -245,11 +241,11 @@ class Biquad static constexpr Coefficients createHighShelf1(FloatType sampleRate, FloatType frequency, FloatType gain) { // Bilinear transform - const auto sqrtA = sprout::math::pow(tenPow1div40, gain); // = sqrt(10^(gain/20)) + const auto sqrtA = gcem::pow(tenPow1div40, gain); // = sqrt(10^(gain/20)) const auto scaledFreq = frequency * sqrtA; const auto warpedFreq = (mathType == MathType::accurate) - ? FloatType(sprout::math::tan(sprout::math::pi() * scaledFreq / sampleRate)) - : FloatType(fastTan(sprout::math::pi() * scaledFreq / sampleRate)); + ? FloatType(gcem::tan(FloatType(M_PI) * scaledFreq / sampleRate)) + : FloatType(fastTan(FloatType(M_PI) * scaledFreq / sampleRate)); const auto A = sqrtA * sqrtA; // = 10^(gain/20) const auto wfp1 = (warpedFreq + FloatType(1.0)); @@ -270,12 +266,12 @@ class Biquad { static_assert(mathType == MathType::accurate, "MathType::fast is not yet supported!"); - const FloatType A = sprout::math::pow(tenPow1div40, gain); // == pow(10, gain/40) == sqrt(pow(10, gain/20)) + const FloatType A = gcem::pow(tenPow1div40, gain); // == pow(10, gain/40) == sqrt(pow(10, gain/20)) const auto aminus1 = A - FloatType(1); const auto aplus1 = A + FloatType(1); - const auto omega = (sprout::math::two_pi() * std::max(frequency, FloatType(2))) / sampleRate; - const auto coso = sprout::math::cos(omega); - const auto beta = sprout::math::sin(omega) * sprout::math::sqrt(A) / Q; + const auto omega = (FloatType(2.0 * M_PI) * std::max(frequency, FloatType(2))) / sampleRate; + const auto coso = gcem::cos(omega); + const auto beta = gcem::sin(omega) * gcem::sqrt(A) / Q; const auto aminus1TimesCoso = aminus1 * coso; // coefficients for transposed Form II Biquad @@ -302,7 +298,7 @@ class Biquad static constexpr FloatType tenPow1div40 = FloatType(1.05925372517728887881); static constexpr FloatType sqrt2Inv = FloatType(0.70710678118654752440); /** Taylor series expansion of tan(x) around x=0; - * Valid for |x| << pi/2 */ + * Valid for |x| << pi/2 */ static constexpr FloatType fastTan(FloatType input) { const FloatType input2 = input * input; diff --git a/dsp/src/dsp/DspHelpers.h b/dsp/src/dsp/DspHelpers.h index 9869838..02c48af 100644 --- a/dsp/src/dsp/DspHelpers.h +++ b/dsp/src/dsp/DspHelpers.h @@ -18,10 +18,15 @@ #pragma once #ifndef MANUAL_INLINE -# define MANUAL_INLINE inline __attribute__((always_inline)) +# ifdef _MSC_VER +# define MANUAL_INLINE __forceinline +# else +# define MANUAL_INLINE inline __attribute__((always_inline)) +# endif #endif -#include +#include +#include template class WrappedInt @@ -130,7 +135,7 @@ class ExponentialSmoother { public: constexpr TimeConstant(float smoothingTimeInS, float sampleRate, int blockSize) : - value_(1.0f - sprout::math::exp(-2.2f * float(blockSize) / sampleRate / smoothingTimeInS)) + value_(1.0f - gcem::exp(-2.2f * float(blockSize) / sampleRate / smoothingTimeInS)) { } diff --git a/dsp/src/dsp/EmphasisEq.h b/dsp/src/dsp/EmphasisEq.h index bb0315b..6342298 100644 --- a/dsp/src/dsp/EmphasisEq.h +++ b/dsp/src/dsp/EmphasisEq.h @@ -1,23 +1,22 @@ -/** +/** * Copyright (C) Johannes Elliesen, 2021 - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #pragma once -#include -#include +#include #include "DspHelpers.h" enum class OnePoleShelvingEqType @@ -26,8 +25,8 @@ enum class OnePoleShelvingEqType highShelf }; -/** - * This class serves as a "relay" to allow specifying +/** + * This class serves as a "relay" to allow specifying * float parameters with template arguments */ template . */ @@ -27,7 +27,7 @@ class PeakMeter lastPeak_ = 0.0f; // calculate time constants for the smoother // according to Udo Zoelzer, DAFX, sec. 4.2, p. 109 - timeConstant_ = 0.0217597649487899548f; //1.0f - std::expf(-2.2f * float(blockSize) / float(sampleRate) / releaseTimeInS); + timeConstant_ = 0.0217597649487899548f; // 1.0f - std::expf(-2.2f * float(blockSize) / float(sampleRate) / releaseTimeInS); } void readPeaks(const float* samples) diff --git a/dsp/src/dsp/Player.h b/dsp/src/dsp/Player.h index eba2950..6c31eac 100644 --- a/dsp/src/dsp/Player.h +++ b/dsp/src/dsp/Player.h @@ -21,7 +21,11 @@ #include "AudioBuffer.h" #ifndef MANUAL_INLINE -# define MANUAL_INLINE inline __attribute__((always_inline)) +# ifdef _MSC_VER +# define MANUAL_INLINE __forceinline +# else +# define MANUAL_INLINE inline __attribute__((always_inline)) +# endif #endif enum class Direction diff --git a/dsp/src/dsp/TapeEq.h b/dsp/src/dsp/TapeEq.h index e364057..c27a251 100644 --- a/dsp/src/dsp/TapeEq.h +++ b/dsp/src/dsp/TapeEq.h @@ -1,16 +1,16 @@ -/** +/** * Copyright (C) Johannes Elliesen, 2021 - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ diff --git a/dsp/src/dsp/TapeGrain.h b/dsp/src/dsp/TapeGrain.h index 647cd3f..a671cee 100644 --- a/dsp/src/dsp/TapeGrain.h +++ b/dsp/src/dsp/TapeGrain.h @@ -1,16 +1,16 @@ -/** +/** * Copyright (C) Johannes Elliesen, 2021 - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ @@ -40,9 +40,9 @@ class ClockedNoiseGenerator } /** Sets the amount of jitter between 0 (none) and 1 (full). - * At full jitter, the frequency of the individual cycles varies between - * 0.00001 and 2 times the base frequency. - */ + * At full jitter, the frequency of the individual cycles varies between + * 0.00001 and 2 times the base frequency. + */ void setJitter(FloatType jitterAmount) { jitter_ = limit(FloatType(0), FloatType(1), jitterAmount); @@ -94,7 +94,7 @@ class ClockedNoiseGenerator FloatType currentOutputValue_; }; -/** +/** * Amplitude-modulates a signal with filtered noise * to simulate the grain of magnetic tape. */ diff --git a/dsp/src/dsp/TapeProcessor.h b/dsp/src/dsp/TapeProcessor.h index 846ffc1..186d2fe 100644 --- a/dsp/src/dsp/TapeProcessor.h +++ b/dsp/src/dsp/TapeProcessor.h @@ -24,7 +24,11 @@ #include "TapeSaturator.h" #ifndef MANUAL_INLINE -# define MANUAL_INLINE inline __attribute__((always_inline)) +# ifdef _MSC_VER +# define MANUAL_INLINE __forceinline +# else +# define MANUAL_INLINE inline __attribute__((always_inline)) +# endif #endif struct TapeProcessorParameters diff --git a/dsp/src/dsp/TapeSaturator.h b/dsp/src/dsp/TapeSaturator.h index 1833081..e6ce401 100644 --- a/dsp/src/dsp/TapeSaturator.h +++ b/dsp/src/dsp/TapeSaturator.h @@ -1,16 +1,16 @@ -/** +/** * Copyright (C) Johannes Elliesen, 2021 - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ diff --git a/dsp/src/dsp/WowAndFlutter.h b/dsp/src/dsp/WowAndFlutter.h index 4a3153c..d82b448 100644 --- a/dsp/src/dsp/WowAndFlutter.h +++ b/dsp/src/dsp/WowAndFlutter.h @@ -1,23 +1,23 @@ -/** +/** * Copyright (C) Johannes Elliesen, 2021 - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #pragma once #include "DspHelpers.h" -#include +#include template class WowAndFlutterOscillator diff --git a/dsp/src/util/Memory.h b/dsp/src/util/Memory.h index fb4cb82..d6e6083 100644 --- a/dsp/src/util/Memory.h +++ b/dsp/src/util/Memory.h @@ -1,16 +1,16 @@ -/** +/** * Copyright (C) Johannes Elliesen, 2021 - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ @@ -20,11 +20,11 @@ #include #include -/** +/** * Represents a fixed size chunk of memory to which data can be written. * Access to the memory is provided by the MemoryProviderType template argument, * allowing to implement various storage backends, e.g. raw memory, file access, etc. - * @tparam MemoryProviderType A storage provider backend. Must implement the following + * @tparam MemoryProviderType A storage provider backend. Must implement the following * public member functions: * // returns the maximum number of bytes that can be written * size_t getAvailableSize() const; @@ -50,12 +50,12 @@ class WritableMemory ~WritableMemory() {} - /** - * Returns the number of bytes that can still be written + /** + * Returns the number of bytes that can still be written */ size_t getRemainingSize() const { return size_; } - /** + /** * Attempts to write to the memory. * If enough bytes are available, the data is written and true is returned. * Otherwise, false is returned and the data is not written. @@ -70,7 +70,7 @@ class WritableMemory return true; } - /** + /** * Attempts to write a value to the memory. * If enough bytes are available, the data is written and true is returned. * Otherwise, false is returned and the data is not written. @@ -81,7 +81,7 @@ class WritableMemory return writeRaw((const void*) &value, sizeof(T)); } - /** + /** * Attempts to write multiple values to the memory. * If enough bytes are available to store all values, they're written and true is returned. * Otherwise, false is returned and none of the values is written. @@ -103,11 +103,11 @@ class WritableMemory size_t size_; }; -/** +/** * Represents a fixed size chunk of memory from which data can be read. * Access to the memory is provided by the MemoryProviderType template argument, * allowing to implement various storage backends, e.g. raw memory, file access, etc. - * @tparam MemoryProviderType A storage provider backend. Must implement the following + * @tparam MemoryProviderType A storage provider backend. Must implement the following * public member functions: * // returns the maximum number of bytes that can be read * size_t getAvailableSize() const; @@ -131,8 +131,8 @@ class ReadableMemory } ~ReadableMemory() {} - /** - * Returns the number of bytes that can still be read + /** + * Returns the number of bytes that can still be read */ size_t getRemainingSize() const { return size_; } @@ -151,7 +151,7 @@ class ReadableMemory return true; } - /** + /** * Attempts to read a value from the memory. * If enough bytes are available, the data is read and true is returned. * Otherwise, false is returned and the value is unchanged. @@ -162,7 +162,7 @@ class ReadableMemory return readRaw((void*) &value, sizeof(T)); } - /** + /** * Attempts to read multiple values from the memory. * If enough bytes are available to read all values, they're read and true is returned. * Otherwise, false is returned and all values are unchanged. @@ -184,7 +184,7 @@ class ReadableMemory size_t size_; }; -/** +/** * A memory provider that allocates a fixed size buffer * on the Stack. For use with ReadableMemory and WritableMemory */ diff --git a/dsp/tests/Makefile b/dsp/tests/Makefile index 3114a63..1957007 100644 --- a/dsp/tests/Makefile +++ b/dsp/tests/Makefile @@ -1,14 +1,14 @@ ### Based on: https://gist.github.com/mauriciopoppe/de8908f67923091982c8c8136a063ea6 ### Thanks! -CXX ?= clang++ +CXX ?= clang++ # path # SRC_PATH = . BUILD_PATH = build BIN_PATH = $(BUILD_PATH)/bin -# executable # +# executable # BIN_NAME = TapeLooperDSP_gtest # extensions # @@ -34,7 +34,7 @@ DEPS = $(OBJECTS:.o=.d) # flags # COMPILE_FLAGS = -std=gnu++17 -Wall -Wextra -g -Werror -pthread -DUNIT_TEST=1 INCLUDES = -I /usr/local/include/ \ - -I ../lib/sprout/ \ + -I ../lib/gcem/include \ -I ../../lib/googletest/ \ -I ../../lib/googletest/googlemock/ \ -I ../../lib/googletest/googlemock/include \ diff --git a/dsp/tests/Memory_gtest.cpp b/dsp/tests/Memory_gtest.cpp index fcbff86..8f3e3f9 100644 --- a/dsp/tests/Memory_gtest.cpp +++ b/dsp/tests/Memory_gtest.cpp @@ -1,16 +1,16 @@ -/** +/** * Copyright (C) Johannes Elliesen, 2021 - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ @@ -173,13 +173,11 @@ TEST(ReadableMemory, b_readSingleitem) EXPECT_CALL(memProvider, getAvailableSize()) .WillOnce(::testing::Return(3ul)); EXPECT_CALL(memProvider, read((void*) &value1, sizeof(value1))) - .WillOnce(testing::Invoke([](void* dest, size_t) { - *((uint8_t*) dest) = 12u; - })); + .WillOnce(testing::Invoke([](void* dest, size_t) + { *((uint8_t*) dest) = 12u; })); EXPECT_CALL(memProvider, read((void*) &value2, sizeof(value2))) - .WillOnce(testing::Invoke([](void* dest, size_t) { - *((uint16_t*) dest) = 234u; - })); + .WillOnce(testing::Invoke([](void* dest, size_t) + { *((uint16_t*) dest) = 234u; })); EXPECT_CALL(memProvider, write(_, _)).Times(0); ReadableMemory mem(memProvider); @@ -208,13 +206,11 @@ TEST(ReadableMemory, c_readMultipleItems) EXPECT_CALL(memProvider, getAvailableSize()) .WillOnce(::testing::Return(3ul)); EXPECT_CALL(memProvider, read((void*) &value1, sizeof(value1))) - .WillOnce(testing::Invoke([](void* dest, size_t) { - *((uint8_t*) dest) = 12u; - })); + .WillOnce(testing::Invoke([](void* dest, size_t) + { *((uint8_t*) dest) = 12u; })); EXPECT_CALL(memProvider, read((void*) &value2, sizeof(value2))) - .WillOnce(testing::Invoke([](void* dest, size_t) { - *((uint16_t*) dest) = 234u; - })); + .WillOnce(testing::Invoke([](void* dest, size_t) + { *((uint16_t*) dest) = 234u; })); EXPECT_CALL(memProvider, write(_, _)).Times(0); ReadableMemory mem(memProvider); @@ -241,13 +237,11 @@ TEST(ReadableMemory, d_readRaw) EXPECT_CALL(memProvider, getAvailableSize()) .WillOnce(::testing::Return(3ul)); EXPECT_CALL(memProvider, read((void*) &value1, sizeof(value1))) - .WillOnce(testing::Invoke([](void* dest, size_t) { - *((uint8_t*) dest) = 12u; - })); + .WillOnce(testing::Invoke([](void* dest, size_t) + { *((uint8_t*) dest) = 12u; })); EXPECT_CALL(memProvider, read((void*) &value2, sizeof(value2))) - .WillOnce(testing::Invoke([](void* dest, size_t) { - *((uint16_t*) dest) = 234u; - })); + .WillOnce(testing::Invoke([](void* dest, size_t) + { *((uint16_t*) dest) = 234u; })); EXPECT_CALL(memProvider, write(_, _)).Times(0); ReadableMemory mem(memProvider); diff --git a/dsp/tests/Player_gtest.cpp b/dsp/tests/Player_gtest.cpp index 87851df..8cc8b98 100644 --- a/dsp/tests/Player_gtest.cpp +++ b/dsp/tests/Player_gtest.cpp @@ -1,16 +1,16 @@ -/** +/** * Copyright (C) Johannes Elliesen, 2021 - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ @@ -135,14 +135,14 @@ TEST_F(DSP_Player, c_playForwardsNormalSpeed) std::array, numChannels_> processCallArgs_input; std::vector processCallArgs_param; ON_CALL(player_.getProcessor(), process(_, _)) - .WillByDefault([&](float inputsAndOutputs[numChannels_], const MockProcessor::Parameters& params) { + .WillByDefault([&](float inputsAndOutputs[numChannels_], const MockProcessor::Parameters& params) + { for (size_t ch = 0; ch < numChannels_; ch++) { processCallArgs_input[ch].push_back(inputsAndOutputs[ch]); inputsAndOutputs[ch] += 100; } - processCallArgs_param.push_back(params.value); - }); + processCallArgs_param.push_back(params.value); }); // expect processor to be called the correct number of times. // linear interpolation requires samples i and i+1, even if fractional is 0 (and i+1 isn't actually used) @@ -261,14 +261,14 @@ TEST_F(DSP_Player, d_playForwardsHalfSpeed) std::array, numChannels_> processCallArgs_input; std::vector processCallArgs_param; ON_CALL(player_.getProcessor(), process(_, _)) - .WillByDefault([&](float inputsAndOutputs[numChannels_], const MockProcessor::Parameters& params) { + .WillByDefault([&](float inputsAndOutputs[numChannels_], const MockProcessor::Parameters& params) + { for (size_t ch = 0; ch < numChannels_; ch++) { processCallArgs_input[ch].push_back(inputsAndOutputs[ch]); inputsAndOutputs[ch] += 100; } - processCallArgs_param.push_back(params.value); - }); + processCallArgs_param.push_back(params.value); }); // expect processor to be called once for two output samples. // linear interpolation requires samples i and i+1, even if fractional is 0 (and i+1 isn't actually used) @@ -376,14 +376,14 @@ TEST_F(DSP_Player, e_playForwardsDoubleSpeed) std::array, numChannels_> processCallArgs_input; std::vector processCallArgs_param; ON_CALL(player_.getProcessor(), process(_, _)) - .WillByDefault([&](float inputsAndOutputs[numChannels_], const MockProcessor::Parameters& params) { + .WillByDefault([&](float inputsAndOutputs[numChannels_], const MockProcessor::Parameters& params) + { for (size_t ch = 0; ch < numChannels_; ch++) { processCallArgs_input[ch].push_back(inputsAndOutputs[ch]); inputsAndOutputs[ch] += 100; } - processCallArgs_param.push_back(params.value); - }); + processCallArgs_param.push_back(params.value); }); // expect processor to be called twice for each output sample. // linear interpolation requires samples i and i+1, even if fractional is 0 (and i+1 isn't actually used) @@ -497,14 +497,14 @@ TEST_F(DSP_Player, f_playBackwardsNormalSpeed) std::array, numChannels_> processCallArgs_input; std::vector processCallArgs_param; ON_CALL(player_.getProcessor(), process(_, _)) - .WillByDefault([&](float inputsAndOutputs[numChannels_], const MockProcessor::Parameters& params) { + .WillByDefault([&](float inputsAndOutputs[numChannels_], const MockProcessor::Parameters& params) + { for (size_t ch = 0; ch < numChannels_; ch++) { processCallArgs_input[ch].push_back(inputsAndOutputs[ch]); inputsAndOutputs[ch] += 100; } - processCallArgs_param.push_back(params.value); - }); + processCallArgs_param.push_back(params.value); }); // expect processor to be called the correct number of times. // linear interpolation requires samples i and i+1, even if fractional is 0 (and i+1 isn't actually used) @@ -623,14 +623,14 @@ TEST_F(DSP_Player, g_playBackwardsHalfSpeed) std::array, numChannels_> processCallArgs_input; std::vector processCallArgs_param; ON_CALL(player_.getProcessor(), process(_, _)) - .WillByDefault([&](float inputsAndOutputs[numChannels_], const MockProcessor::Parameters& params) { + .WillByDefault([&](float inputsAndOutputs[numChannels_], const MockProcessor::Parameters& params) + { for (size_t ch = 0; ch < numChannels_; ch++) { processCallArgs_input[ch].push_back(inputsAndOutputs[ch]); inputsAndOutputs[ch] += 100; } - processCallArgs_param.push_back(params.value); - }); + processCallArgs_param.push_back(params.value); }); // expect processor to be called once for two output samples. // linear interpolation requires samples i and i+1, even if fractional is 0 (and i+1 isn't actually used) @@ -736,14 +736,14 @@ TEST_F(DSP_Player, h_playBackwardsDoubleSpeed) std::array, numChannels_> processCallArgs_input; std::vector processCallArgs_param; ON_CALL(player_.getProcessor(), process(_, _)) - .WillByDefault([&](float inputsAndOutputs[numChannels_], const MockProcessor::Parameters& params) { + .WillByDefault([&](float inputsAndOutputs[numChannels_], const MockProcessor::Parameters& params) + { for (size_t ch = 0; ch < numChannels_; ch++) { processCallArgs_input[ch].push_back(inputsAndOutputs[ch]); inputsAndOutputs[ch] += 100; } - processCallArgs_param.push_back(params.value); - }); + processCallArgs_param.push_back(params.value); }); // expect processor to be called twice for each output sample. // linear interpolation requires samples i and i+1, even if fractional is 0 (and i+1 isn't actually used) @@ -851,10 +851,10 @@ TEST_F(DSP_Player, i_applySmoothingToPostGain) // the processor mock always returns 1.0f ON_CALL(player_.getProcessor(), process(_, _)) - .WillByDefault([&](float inputsAndOutputs[numChannels_], const MockProcessor::Parameters&) { + .WillByDefault([&](float inputsAndOutputs[numChannels_], const MockProcessor::Parameters&) + { inputsAndOutputs[0] = 1.0f; - inputsAndOutputs[1] = 10.0f; - }); + inputsAndOutputs[1] = 10.0f; }); // add this expectation to silence gmock warning. EXPECT_CALL(player_.getProcessor(), process(_, _)).Times(::testing::AnyNumber()); @@ -988,9 +988,8 @@ TEST_F(DSP_Player, k_applyNoSmoothingToProcessorParameters) // the processor mock stores its argument values std::vector processCallArgs_param; ON_CALL(player_.getProcessor(), process(_, _)) - .WillByDefault([&](float[], const MockProcessor::Parameters& params) { - processCallArgs_param.push_back(params.value); - }); + .WillByDefault([&](float[], const MockProcessor::Parameters& params) + { processCallArgs_param.push_back(params.value); }); // add this expectation to silence gmock warning. EXPECT_CALL(player_.getProcessor(), process(_, _)).Times(::testing::AnyNumber()); diff --git a/dsp/tests/gtest-all.cpp b/dsp/tests/gtest-all.cpp index 749e4ac..da95501 100644 --- a/dsp/tests/gtest-all.cpp +++ b/dsp/tests/gtest-all.cpp @@ -1,16 +1,16 @@ -/** +/** * Copyright (C) Johannes Elliesen, 2021 - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ diff --git a/dsp/tests/gtest_main.cpp b/dsp/tests/gtest_main.cpp index 8f0a045..438a43f 100644 --- a/dsp/tests/gtest_main.cpp +++ b/dsp/tests/gtest_main.cpp @@ -1,16 +1,16 @@ -/** +/** * Copyright (C) Johannes Elliesen, 2021 - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ diff --git a/firmware/Makefile b/firmware/Makefile index 3e12837..dcb1e0b 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -8,7 +8,7 @@ else GCC_PATH ?= ~/dev/gcc-arm-none-eabi-9-2020-q2-update/bin endif -# programming +# programming PGM_DEVICE = interface/ftdi/olimex-arm-usb-tiny-h.cfg CPP_STANDARD ?= -std=gnu++17 @@ -16,14 +16,14 @@ CPP_STANDARD ?= -std=gnu++17 # Sources CPP_SOURCES = app/main.cpp -C_INCLUDES ?= +C_INCLUDES ?= C_INCLUDES += \ --Ilib/sprout \ +-Ilib/gcem \ -Iapp/ ifeq ($(DEBUG), 1) OPT = -O0 -else +else OPT = -O3 endif diff --git a/firmware/src/LooperController.h b/firmware/src/LooperController.h index 12cbc0a..8b83679 100644 --- a/firmware/src/LooperController.h +++ b/firmware/src/LooperController.h @@ -20,6 +20,7 @@ #include #include +#include #include "constants.h" #include "util/LateInitializedObject.h" @@ -225,7 +226,7 @@ class LooperController // ln(maxLag / minLag) / (numSteps-1) = b // log(maxLag / minLag) / ((numSteps-1) * log(e)) = b constexpr auto a = minLag; - constexpr auto b = sprout::math::log(maxLag / minLag) / (float(numSteps - 1) * sprout::math::log(2.718281828f)); + constexpr auto b = gcem::log(maxLag / minLag) / (float(numSteps - 1) * gcem::log(2.718281828f)); switch (acceleration) { @@ -234,13 +235,13 @@ class LooperController case MotorAcceleration::veryFast: return a; case MotorAcceleration::fast: - return a * sprout::exp(b); + return a * gcem::exp(b); case MotorAcceleration::medium: - return a * sprout::exp(2 * b); + return a * gcem::exp(2 * b); case MotorAcceleration::slow: - return a * sprout::exp(3 * b); + return a * gcem::exp(3 * b); case MotorAcceleration::verySlow: - return a * sprout::exp(4 * b); + return a * gcem::exp(4 * b); } } diff --git a/firmware/src/constants.h b/firmware/src/constants.h index bab8216..4056ad9 100644 --- a/firmware/src/constants.h +++ b/firmware/src/constants.h @@ -1,16 +1,16 @@ -/** +/** * Copyright (C) Johannes Elliesen, 2021 - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ diff --git a/firmware/src/hardware/UiHardware.h b/firmware/src/hardware/UiHardware.h index 9a5fdf5..7b6e1f2 100644 --- a/firmware/src/hardware/UiHardware.h +++ b/firmware/src/hardware/UiHardware.h @@ -264,22 +264,11 @@ class KnobAndCvReader + coeffs[int(cv)].offset; } - struct CvInCoefficients - { - bool operator==(const CvInCoefficients& other) const - { - return scale == other.scale && offset == other.offset; - } - float scale; - float offset; - }; - using CalibrationData = std::array; - - CalibrationData& getCalibrationData() { return calibrationStorage_.GetSettings(); } + CvCalibrationData& getCalibrationData() { return calibrationStorage_.GetSettings(); } void saveCalibrationData() { calibrationStorage_.Save(); } private: - static constexpr CalibrationData getDefaultCalibrationData() + static constexpr CvCalibrationData getDefaultCalibrationData() { /** The general formula for the CV inputs is @@ -317,9 +306,9 @@ class KnobAndCvReader constexpr auto kScaleVolume = -4.852941f; constexpr auto kOffsetVolume = 5.0f; - constexpr CalibrationData defaults = []() constexpr + constexpr CvCalibrationData defaults = []() constexpr { - CalibrationData result = { { 0.0f, 0.0f } }; + CvCalibrationData result = { { 0.0f, 0.0f } }; for (size_t i = 0; i < result.size(); i++) { const auto isSpeedCv = i % 2 == 0; @@ -332,7 +321,7 @@ class KnobAndCvReader } static constexpr auto kCalibrationDataOffset = 0; - mutable daisy::PersistentStorage calibrationStorage_; + mutable daisy::PersistentStorage calibrationStorage_; daisy::AdcHandle adc_; }; diff --git a/firmware/src/hardware/UiHardwareTypes.h b/firmware/src/hardware/UiHardwareTypes.h index 131b19a..99324b6 100644 --- a/firmware/src/hardware/UiHardwareTypes.h +++ b/firmware/src/hardware/UiHardwareTypes.h @@ -115,4 +115,16 @@ enum class LedColour pulsingRed, pulsingYellow, pulsingGreen, -}; \ No newline at end of file +}; + +struct CvInCoefficients +{ + bool operator==(const CvInCoefficients& other) const + { + return scale == other.scale && offset == other.offset; + } + float scale; + float offset; +}; + +using CvCalibrationData = std::array; diff --git a/firmware/src/ui/UiCalibrationPage.h b/firmware/src/ui/UiCalibrationPage.h index 17206f4..1253fa9 100644 --- a/firmware/src/ui/UiCalibrationPage.h +++ b/firmware/src/ui/UiCalibrationPage.h @@ -222,10 +222,10 @@ class UiCalibrationPage : public daisy::UiPage } } - typename KnobAndCvReader::CvInCoefficients calculateCoefficients(float rawMin, - float realMin, - float rawMax, - float realMax) + CvInCoefficients calculateCoefficients(float rawMin, + float realMin, + float rawMax, + float realMax) { const auto scale = (realMax - realMin) / (rawMax - rawMin); const auto offset = realMax - scale * (rawMax); @@ -245,5 +245,5 @@ class UiCalibrationPage : public daisy::UiPage int selectedChannel_ = -1; State state_ = State::idle; float recordedMin_; - typename KnobAndCvReader::CalibrationData newCalibrationData_; + CvCalibrationData newCalibrationData_; }; \ No newline at end of file diff --git a/firmware/src/ui/UiSettingsPage.h b/firmware/src/ui/UiSettingsPage.h index 091c0e2..2ef67e8 100644 --- a/firmware/src/ui/UiSettingsPage.h +++ b/firmware/src/ui/UiSettingsPage.h @@ -181,8 +181,9 @@ class UiSettingsPage : public daisy::UiPage case Button::save: if (saveButtonState_ && loadButtonState_) { + auto* parent = GetParentUI(); Close(); - GetParentUI()->OpenPage(calibrationPage_); + parent->OpenPage(calibrationPage_); } default: break; diff --git a/firmware/src/util/PlateauMap.h b/firmware/src/util/PlateauMap.h index 232151c..6d795f7 100644 --- a/firmware/src/util/PlateauMap.h +++ b/firmware/src/util/PlateauMap.h @@ -1,16 +1,16 @@ -/** +/** * Copyright (C) Johannes Elliesen, 2021 - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ @@ -84,7 +84,7 @@ class PlateauMapParameters const FloatType slopeLeft = isFirst ? FloatType(1) : FloatType(0); const FloatType slopeRight = isLast ? FloatType(1) : FloatType(0); - /* + /* Using this prototype for the transition function: f(x) = ax^3 + bx^2 + cx + d These are the boundary conditions: @@ -129,31 +129,31 @@ class PlateauMapParameters * Maps an input value of 0..1 to an output value of 0..1, creating * a number of plateaus. This can be used to map a potentiometer value * so that it's easier to hit certain values. - * + * * At each plateau value, the slope of the mapping function will be * zero, so that the mapping function is level at the plateau. * It looks something like this: - * + * * 1 + / * | / * | /----/ * | / * | /-----/ * | / - * | / + * | / * |/ * 0 +------------------+--> * 0 1 - * + * * At each plateau, the output value is equal to the input value. * Between the plateaus, a qubic polynomial function creates a smooth * transition zone. - * - * The PlateauMapParameters class is used to specify the level of the - * plateaus. It can be specified as constexpr so that all the - * preprocessing of the transition function parameters is done at compile + * + * The PlateauMapParameters class is used to specify the level of the + * plateaus. It can be specified as constexpr so that all the + * preprocessing of the transition function parameters is done at compile * time. - * + * * // Create plateaus at 0.5 and 0.75 * // The values will be evaluated ad compile time. * constexpr PlateauMapParameters parameters({ 0.5f, 0.75f }); diff --git a/firmware/tests/LooperController_gtest.cpp b/firmware/tests/LooperController_gtest.cpp index a8069dc..5828a60 100644 --- a/firmware/tests/LooperController_gtest.cpp +++ b/firmware/tests/LooperController_gtest.cpp @@ -69,14 +69,14 @@ class StereoLooperMock : public LooperMock // clang-format off MOCK_METHOD(void, process, ( - float speedParam, - float wowAndFlutterParam, - Direction direction, - ProcessorParametersMock processorParams, - float gainParam, - (AudioBufferPtr<2, const float>) input, - AudioBufferPtr<2> output, - ExponentialSmoother::TimeConstant postGainSmootherTimeConstant, + float speedParam, + float wowAndFlutterParam, + Direction direction, + ProcessorParametersMock processorParams, + float gainParam, + (AudioBufferPtr<2, const float>) input, + AudioBufferPtr<2> output, + ExponentialSmoother::TimeConstant postGainSmootherTimeConstant, ExponentialSmoother::TimeConstant speedSmootherTimeConstant), ()); // clang-format on @@ -101,14 +101,14 @@ class MonoLooperMock : public LooperMock // clang-format off MOCK_METHOD(void, process, ( - float speedParam, - float wowAndFlutterParam, - Direction direction, - ProcessorParametersMock processorParams, - float gainParam, - (AudioBufferPtr<1, const float>) input, - AudioBufferPtr<1> output, - ExponentialSmoother::TimeConstant postGainSmootherTimeConstant, + float speedParam, + float wowAndFlutterParam, + Direction direction, + ProcessorParametersMock processorParams, + float gainParam, + (AudioBufferPtr<1, const float>) input, + AudioBufferPtr<1> output, + ExponentialSmoother::TimeConstant postGainSmootherTimeConstant, ExponentialSmoother::TimeConstant speedSmootherTimeConstant), ()); // clang-format on @@ -336,12 +336,12 @@ TEST_F(LooperController_Test, process_shouldUseCorrectMotorSpeedTimeConstants) constexpr float expectedBlockSize = float(blockSize); constexpr float expectedSampleRate = sampleRateHz; // according to Udo Zoelzer: - // timeConstant = 1.0f - sprout::math::exp(-2.2f * float(expectedBlockSize) / expectedSampleRate / smoothingTimeInS); + // timeConstant = 1.0f - gcem::exp(-2.2f * float(expectedBlockSize) / expectedSampleRate / smoothingTimeInS); // hence: // ln(1.0f - timeConstant) = -2.2f * float(expectedBlockSize) / expectedSampleRate / smoothingTimeInS // smoothingTime = -2.2f * float(expectedBlockSize) / expectedSampleRate * log(e) / log(1.0f - timeConstant) return -2.2f * float(expectedBlockSize) / expectedSampleRate - * sprout::math::log(2.718281828f) / sprout::math::log(1.0f - timeConstant); + * gcem::log(2.718281828f) / gcem::log(1.0f - timeConstant); }; // finally capture the time constants for each acceleration setting @@ -364,7 +364,7 @@ TEST_F(LooperController_Test, process_shouldUseCorrectMotorSpeedTimeConstants) // expect the other times to be scaled exponentially in between (== constant factor) constexpr float totalRange = 20.0f / 0.1f; constexpr size_t numSettings = 5; - constexpr float expectedFactor = sprout::pow(totalRange, 1.0f / float(numSettings - 1)); + constexpr float expectedFactor = gcem::pow(totalRange, 1.0f / float(numSettings - 1)); EXPECT_NEAR(measuredSmoothingTimes[MotorAcceleration::fast] / measuredSmoothingTimes[MotorAcceleration::veryFast], expectedFactor, diff --git a/firmware/tests/Makefile b/firmware/tests/Makefile index 042440b..247d0cc 100644 --- a/firmware/tests/Makefile +++ b/firmware/tests/Makefile @@ -1,14 +1,14 @@ ### Based on: https://gist.github.com/mauriciopoppe/de8908f67923091982c8c8136a063ea6 ### Thanks! -CXX ?= clang++ +CXX ?= clang++ # path # SRC_PATH = . BUILD_PATH = build BIN_PATH = $(BUILD_PATH)/bin -# executable # +# executable # BIN_NAME = TapeLooper_gtest # extensions # @@ -34,7 +34,7 @@ DEPS = $(OBJECTS:.o=.d) # flags # COMPILE_FLAGS = -std=gnu++17 -Wall -Wextra -g -Werror -pthread -DUNIT_TEST=1 INCLUDES = -I /usr/local/include/ \ - -I ../../dsp/lib/sprout/ \ + -I ../../dsp/lib/gcem/include/ \ -I ../../dsp/src/ \ -I ../../lib/libDaisy/src/ \ -I ../../lib/googletest/ \ diff --git a/firmware/tests/PlateauMap_gtest.cpp b/firmware/tests/PlateauMap_gtest.cpp index b38aa8e..9526a80 100644 --- a/firmware/tests/PlateauMap_gtest.cpp +++ b/firmware/tests/PlateauMap_gtest.cpp @@ -1,16 +1,16 @@ -/** +/** * Copyright (C) Johannes Elliesen, 2021 - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ diff --git a/firmware/tests/Ui_gtest.cpp b/firmware/tests/Ui_gtest.cpp index 8f1da4f..9f980cd 100644 --- a/firmware/tests/Ui_gtest.cpp +++ b/firmware/tests/Ui_gtest.cpp @@ -78,6 +78,7 @@ std::ostream& operator<<(std::ostream& out, LedColour colour) case LedColour::pulsingRed: return out << "LedColour::pulsingRed"; } + return out; } // the clear and flush functions of the UI cancas must be function pointers. @@ -508,7 +509,7 @@ TEST_F(UiFixture, recordingPage_onlyRecordLedShouldBeOn) EXPECT_LED_COLOUR(Led::record, LedColour::pulsingRed); } -TEST_F(UiFixture, recordingPage_exitRecordPage) +TEST_F(UiFixture, recordingPage_exitRecordPageToSettings) { // enter recording page simulateEvents({ Event(Event::Type::buttonPressedAndReleased, Button::record) }); @@ -525,8 +526,11 @@ TEST_F(UiFixture, recordingPage_exitRecordPage) EXPECT_LED_COLOUR(Led::save, LedColour::off); EXPECT_LED_COLOUR(Led::load, LedColour::off); EXPECT_LED_COLOUR(Led::record, LedColour::off); +} - // enter recording page again +TEST_F(UiFixture, recordingPage_exitRecordPageToSavePage) +{ + // enter recording page simulateEvents({ Event(Event::Type::buttonPressedAndReleased, Button::record) }); waitUntilDisplayDrawn(); EXPECT_LED_COLOUR(Led::settings, LedColour::off); @@ -541,8 +545,11 @@ TEST_F(UiFixture, recordingPage_exitRecordPage) EXPECT_LED_COLOUR(Led::save, LedColour::pulsingRed); EXPECT_LED_COLOUR(Led::load, LedColour::off); EXPECT_LED_COLOUR(Led::record, LedColour::off); +} - // enter recording page again +TEST_F(UiFixture, recordingPage_exitRecordPageToLoadPage) +{ + // enter recording page simulateEvents({ Event(Event::Type::buttonPressedAndReleased, Button::record) }); waitUntilDisplayDrawn(); EXPECT_LED_COLOUR(Led::settings, LedColour::off); @@ -557,8 +564,11 @@ TEST_F(UiFixture, recordingPage_exitRecordPage) EXPECT_LED_COLOUR(Led::save, LedColour::off); EXPECT_LED_COLOUR(Led::load, LedColour::pulsingRed); EXPECT_LED_COLOUR(Led::record, LedColour::off); +} - // enter recording page again +TEST_F(UiFixture, recordingPage_exitRecordPageToBasePage) +{ + // enter recording page simulateEvents({ Event(Event::Type::buttonPressedAndReleased, Button::record) }); waitUntilDisplayDrawn(); EXPECT_LED_COLOUR(Led::settings, LedColour::off); @@ -720,7 +730,7 @@ TEST_F(UiFixture, settingsPage_settingsLedShouldCycleThroughColours) EXPECT_LED_COLOUR(Led::record, LedColour::off); } -TEST_F(UiFixture, settingsPage_exitSettingsPage) +TEST_F(UiFixture, settingsPage_exitSettingsPageToCalibration) { // enter settings page simulateEvents({ Event(Event::Type::buttonPressedAndReleased, Button::settings) }); @@ -730,47 +740,26 @@ TEST_F(UiFixture, settingsPage_exitSettingsPage) EXPECT_LED_COLOUR(Led::load, LedColour::off); EXPECT_LED_COLOUR(Led::record, LedColour::off); - // leave towards save page - simulateEvents({ Event(Event::Type::buttonPressedAndReleased, Button::save) }); - waitUntilDisplayDrawn(); - EXPECT_LED_COLOUR(Led::settings, LedColour::off); - EXPECT_LED_COLOUR(Led::save, LedColour::pulsingRed); - EXPECT_LED_COLOUR(Led::load, LedColour::off); - EXPECT_LED_COLOUR(Led::record, LedColour::off); - - // enter settings page again - simulateEvents({ Event(Event::Type::buttonPressedAndReleased, Button::settings) }); + // press save button (nothing happens yet) + simulateEvents({ Event(Event::Type::buttonPressed, Button::save) }); waitUntilDisplayDrawn(); EXPECT_LED_COLOUR(Led::settings, LedColour::pulsingRed); EXPECT_LED_COLOUR(Led::save, LedColour::off); EXPECT_LED_COLOUR(Led::load, LedColour::off); EXPECT_LED_COLOUR(Led::record, LedColour::off); - // leave towards load page - simulateEvents({ Event(Event::Type::buttonPressedAndReleased, Button::load) }); + // press save button as well (both now pressed => leave towards calibration page) + simulateEvents({ Event(Event::Type::buttonPressed, Button::load) }); waitUntilDisplayDrawn(); EXPECT_LED_COLOUR(Led::settings, LedColour::off); - EXPECT_LED_COLOUR(Led::save, LedColour::off); + EXPECT_LED_COLOUR(Led::save, LedColour::pulsingRed); EXPECT_LED_COLOUR(Led::load, LedColour::pulsingRed); EXPECT_LED_COLOUR(Led::record, LedColour::off); +} - // enter settings page again - simulateEvents({ Event(Event::Type::buttonPressedAndReleased, Button::settings) }); - waitUntilDisplayDrawn(); - EXPECT_LED_COLOUR(Led::settings, LedColour::pulsingRed); - EXPECT_LED_COLOUR(Led::save, LedColour::off); - EXPECT_LED_COLOUR(Led::load, LedColour::off); - EXPECT_LED_COLOUR(Led::record, LedColour::off); - - // leave towards recording page - simulateEvents({ Event(Event::Type::buttonPressedAndReleased, Button::record) }); - waitUntilDisplayDrawn(); - EXPECT_LED_COLOUR(Led::settings, LedColour::off); - EXPECT_LED_COLOUR(Led::save, LedColour::off); - EXPECT_LED_COLOUR(Led::load, LedColour::off); - EXPECT_LED_COLOUR(Led::record, LedColour::pulsingRed); - - // enter settings page again +TEST_F(UiFixture, settingsPage_exitSettingsPageToBasePage) +{ + // enter settings page simulateEvents({ Event(Event::Type::buttonPressedAndReleased, Button::settings) }); waitUntilDisplayDrawn(); EXPECT_LED_COLOUR(Led::settings, LedColour::pulsingRed); diff --git a/firmware/tests/gtest-all.cpp b/firmware/tests/gtest-all.cpp index 749e4ac..da95501 100644 --- a/firmware/tests/gtest-all.cpp +++ b/firmware/tests/gtest-all.cpp @@ -1,16 +1,16 @@ -/** +/** * Copyright (C) Johannes Elliesen, 2021 - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ diff --git a/firmware/tests/gtest_main.cpp b/firmware/tests/gtest_main.cpp index 8f0a045..438a43f 100644 --- a/firmware/tests/gtest_main.cpp +++ b/firmware/tests/gtest_main.cpp @@ -1,16 +1,16 @@ -/** +/** * Copyright (C) Johannes Elliesen, 2021 - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ diff --git a/firmware/tests/mocks/UiHardware_mock.h b/firmware/tests/mocks/UiHardware_mock.h index 6e36396..de101be 100644 --- a/firmware/tests/mocks/UiHardware_mock.h +++ b/firmware/tests/mocks/UiHardware_mock.h @@ -21,6 +21,18 @@ #include "hardware/UiHardwareTypes.h" +class KnobsAndCvMock +{ +public: + float getCvRaw(CvInput cv) { return cvRawValues_[int(cv)]; } + CvCalibrationData& getCalibrationData() { return calibrationData_; } + void saveCalibrationData() { savedCalibrationData_ = calibrationData_; } + + float cvRawValues_[int(CvInput::NUM_CVS)] = { 0 }; + CvCalibrationData calibrationData_; + CvCalibrationData savedCalibrationData_; +}; + class UiHardwareMock { public: @@ -56,4 +68,8 @@ class UiHardwareMock led.colour = LedColour::off; } } + + KnobsAndCvMock& getKnobsAndCv() { return knobsAndCv_; }; + + KnobsAndCvMock knobsAndCv_; }; \ No newline at end of file diff --git a/plugin/CMakeLists.txt b/plugin/CMakeLists.txt index 2f438a9..9704abe 100644 --- a/plugin/CMakeLists.txt +++ b/plugin/CMakeLists.txt @@ -64,7 +64,7 @@ juce_generate_juce_header(TapeLooperPlugin) set( plugin_sourcefiles - + src/PluginEditor.h src/PluginEditor.cpp src/PluginProcessor.h @@ -101,7 +101,8 @@ target_compile_definitions(TapeLooperPlugin JUCE_USE_CURL=0 # If you remove this, add `NEEDS_CURL TRUE` to the `juce_add_plugin` call JUCE_MODAL_LOOPS_PERMITTED=1 JUCE_VST3_CAN_REPLACE_VST2=0 - MANUAL_INLINE= # overrides inline statements used to optimize dsp code for the hardware + MANUAL_INLINE=inline # overrides inline statements used to optimize dsp code for the hardware + _USE_MATH_DEFINES ) # If your target needs extra binary assets, you can add them here. The first argument is the name of @@ -130,7 +131,7 @@ target_link_libraries(TapeLooperPlugin juce::juce_recommended_warning_flags) ################################################################################################### -## Googletest console application +## Googletest console application ################################################################################################### # find thread library @@ -155,7 +156,7 @@ add_executable(TapeLooperPlugin_Gtest) set_target_properties (TapeLooperPlugin_Gtest PROPERTIES FOLDER TapeLooperPlugin ) - + target_sources(TapeLooperPlugin_Gtest PRIVATE ${test_sourcefiles} @@ -169,7 +170,7 @@ foreach(source IN LISTS test_sourcefiles) endforeach() # link thread library -target_link_libraries(TapeLooperPlugin_Gtest +target_link_libraries(TapeLooperPlugin_Gtest PRIVATE ${CMAKE_THREAD_LIBS_INIT} juce::juce_gui_extra @@ -181,8 +182,8 @@ target_link_libraries(TapeLooperPlugin_Gtest juce::juce_recommended_warning_flags ) - -set_property(TARGET TapeLooperPlugin_Gtest - PROPERTY + +set_property(TARGET TapeLooperPlugin_Gtest + PROPERTY CXX_STANDARD 17 ) \ No newline at end of file diff --git a/plugin/src/DspDefinitions.h b/plugin/src/DspDefinitions.h index 8729353..f699283 100644 --- a/plugin/src/DspDefinitions.h +++ b/plugin/src/DspDefinitions.h @@ -1,16 +1,16 @@ -/** +/** * Copyright (C) Johannes Elliesen, 2021 - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ diff --git a/plugin/src/PluginEditor.cpp b/plugin/src/PluginEditor.cpp index 04f5f38..fa85324 100644 --- a/plugin/src/PluginEditor.cpp +++ b/plugin/src/PluginEditor.cpp @@ -1,16 +1,16 @@ -/** +/** * Copyright (C) Johannes Elliesen, 2021 - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ diff --git a/plugin/src/PluginEditor.h b/plugin/src/PluginEditor.h index ab8f5a9..fbc030d 100644 --- a/plugin/src/PluginEditor.h +++ b/plugin/src/PluginEditor.h @@ -1,16 +1,16 @@ -/** +/** * Copyright (C) Johannes Elliesen, 2021 - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ diff --git a/plugin/src/PluginProcessor.cpp b/plugin/src/PluginProcessor.cpp index 9004af6..8ea2d62 100644 --- a/plugin/src/PluginProcessor.cpp +++ b/plugin/src/PluginProcessor.cpp @@ -1,16 +1,16 @@ -/** +/** * Copyright (C) Johannes Elliesen, 2021 - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ @@ -74,7 +74,7 @@ double TapeLooperPluginAudioProcessor::getTailLengthSeconds() const int TapeLooperPluginAudioProcessor::getNumPrograms() { return 1; // NB: some hosts don't cope very well if you tell them there are 0 programs, - // so this should be at least 1, even if you're not really implementing programs. + // so this should be at least 1, even if you're not really implementing programs. } int TapeLooperPluginAudioProcessor::getCurrentProgram() @@ -204,7 +204,8 @@ juce::AudioProcessorValueTreeState::ParameterLayout TapeLooperPluginAudioProcess 1.0f, // default value "", // label juce::AudioProcessorParameter::genericParameter, // category - [](float value, int) { return juce::String(value, 2); }) // value-to-string function + [](float value, int) + { return juce::String(value, 2); }) // value-to-string function ); juce::NormalisableRange driveRange(0.25f, 4.0f); driveRange.setSkewForCentre(1.0f); @@ -214,7 +215,8 @@ juce::AudioProcessorValueTreeState::ParameterLayout TapeLooperPluginAudioProcess 1.0f, // default value "", // label juce::AudioProcessorParameter::genericParameter, // category - [](float value, int) { return juce::String(value, 2); }) // value-to-string function + [](float value, int) + { return juce::String(value, 2); }) // value-to-string function ); result.add(std::make_unique(juce::String(dspdefs::paramIds::chGrainAmt) + chStr, // parameterID "GrainAmt " + chStr, // parameter name diff --git a/plugin/src/PluginProcessor.h b/plugin/src/PluginProcessor.h index a63bb20..3a1efaf 100644 --- a/plugin/src/PluginProcessor.h +++ b/plugin/src/PluginProcessor.h @@ -1,16 +1,16 @@ -/** +/** * Copyright (C) Johannes Elliesen, 2021 - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ diff --git a/plugin/src/TapeLooperComponent.h b/plugin/src/TapeLooperComponent.h index 751cf40..5864700 100644 --- a/plugin/src/TapeLooperComponent.h +++ b/plugin/src/TapeLooperComponent.h @@ -1,16 +1,16 @@ -/** +/** * Copyright (C) Johannes Elliesen, 2021 - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ @@ -24,7 +24,8 @@ class PlayStopRecButtons : public juce::Component, private juce::Button::Listene { public: PlayStopRecButtons(juce::AudioParameterChoice& playStateParameter) : - paramAttachment_(playStateParameter, [this](float val) { updateButtons(val); }) + paramAttachment_(playStateParameter, [this](float val) + { updateButtons(val); }) { recButton_.setButtonText("Rec"); addAndMakeVisible(recButton_); @@ -160,7 +161,8 @@ class TapeLooperComponent : public juce::Component void paint(juce::Graphics& g) override { - const auto drawVerticalText = [&](const juce::String& text, juce::Rectangle boundingBox) { + const auto drawVerticalText = [&](const juce::String& text, juce::Rectangle boundingBox) + { g.saveState(); g.setOrigin(boundingBox.getCentre()); g.addTransform(juce::AffineTransform().rotated(-juce::MathConstants::halfPi)); diff --git a/plugin/src/TapeLooperProcessor.h b/plugin/src/TapeLooperProcessor.h index 1bf187b..df6a75c 100644 --- a/plugin/src/TapeLooperProcessor.h +++ b/plugin/src/TapeLooperProcessor.h @@ -1,16 +1,16 @@ -/** +/** * Copyright (C) Johannes Elliesen, 2021 - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ @@ -206,7 +206,8 @@ class TapeLooperProcessor : public ITapeLooperProcessor if (!result) throw std::runtime_error("Error loading looper state"); - const auto setParam = [](juce::RangedAudioParameter& param, float value) { + const auto setParam = [](juce::RangedAudioParameter& param, float value) + { param.beginChangeGesture(); param.setValueNotifyingHost(param.convertTo0to1(value)); param.endChangeGesture(); diff --git a/plugin/tests/Example_gtest.cpp b/plugin/tests/Example_gtest.cpp index 17d3df9..24ec4f1 100644 --- a/plugin/tests/Example_gtest.cpp +++ b/plugin/tests/Example_gtest.cpp @@ -1,16 +1,16 @@ -/** +/** * Copyright (C) Johannes Elliesen, 2021 - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ @@ -18,7 +18,7 @@ #include "PluginProcessor.h" #include -/* This example test shows how to create an instance of the plugin as +/* This example test shows how to create an instance of the plugin as part of a test. */ TEST(ExampleTest, CreatePluginAndGUITest) { diff --git a/scripts/setup-clangformat-precommit-hook.sh b/scripts/setup-clangformat-precommit-hook.sh new file mode 100755 index 0000000..a8ae8c8 --- /dev/null +++ b/scripts/setup-clangformat-precommit-hook.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# run this script from the repository root to install the pre-commit +# hook that will check formatting before you commit. + +pip install pre-commit +pre-commit install \ No newline at end of file