mirror of
https://github.com/BlackMATov/invoke.hpp.git
synced 2025-12-13 05:56:31 +07:00
11
.appveyor.yml
Normal file
11
.appveyor.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
version: "{build}"
|
||||
shallow_clone: true
|
||||
image:
|
||||
- Visual Studio 2015
|
||||
- Visual Studio 2017
|
||||
platform:
|
||||
- Win32
|
||||
- x64
|
||||
build_script:
|
||||
- scripts\build_all.bat
|
||||
test: off
|
||||
68
.travis.yml
Normal file
68
.travis.yml
Normal file
@@ -0,0 +1,68 @@
|
||||
language: cpp
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
dist: trusty
|
||||
addons: { apt: { sources: ubuntu-toolchain-r-test, packages: ["xorg-dev", "g++-4.9"] } }
|
||||
env: MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9"
|
||||
- os: linux
|
||||
dist: trusty
|
||||
addons: { apt: { sources: ubuntu-toolchain-r-test, packages: ["xorg-dev", "g++-5"] } }
|
||||
env: MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
|
||||
- os: linux
|
||||
dist: trusty
|
||||
addons: { apt: { sources: ubuntu-toolchain-r-test, packages: ["xorg-dev", "g++-6"] } }
|
||||
env: MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"
|
||||
- os: linux
|
||||
dist: trusty
|
||||
addons: { apt: { sources: ubuntu-toolchain-r-test, packages: ["xorg-dev", "g++-7"] } }
|
||||
env: MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
|
||||
- os: linux
|
||||
dist: trusty
|
||||
addons: { apt: { sources: ubuntu-toolchain-r-test, packages: ["xorg-dev", "g++-8"] } }
|
||||
env: MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
|
||||
- os: linux
|
||||
dist: trusty
|
||||
addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.8"], packages: ["xorg-dev", "clang-3.8", "g++-5"] } }
|
||||
env: MATRIX_EVAL="CC=clang-3.8 && CXX=clang++-3.8"
|
||||
- os: linux
|
||||
dist: trusty
|
||||
addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.9"], packages: ["xorg-dev", "clang-3.9", "g++-5"] } }
|
||||
env: MATRIX_EVAL="CC=clang-3.9 && CXX=clang++-3.9"
|
||||
- os: linux
|
||||
dist: trusty
|
||||
addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-trusty-4.0"], packages: ["xorg-dev", "clang-4.0", "g++-5"] } }
|
||||
env: MATRIX_EVAL="CC=clang-4.0 && CXX=clang++-4.0"
|
||||
- os: linux
|
||||
dist: trusty
|
||||
addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-trusty-5.0"], packages: ["xorg-dev", "clang-5.0", "g++-7"] } }
|
||||
env: MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0"
|
||||
- os: linux
|
||||
dist: trusty
|
||||
addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-trusty-6.0"], packages: ["xorg-dev", "clang-6.0", "g++-7"] } }
|
||||
env: MATRIX_EVAL="CC=clang-6.0 && CXX=clang++-6.0"
|
||||
- os: osx
|
||||
osx_image: xcode8.3
|
||||
compiler: clang
|
||||
- os: osx
|
||||
osx_image: xcode9
|
||||
compiler: clang
|
||||
- os: osx
|
||||
osx_image: xcode9.1
|
||||
compiler: clang
|
||||
- os: osx
|
||||
osx_image: xcode9.2
|
||||
compiler: clang
|
||||
- os: osx
|
||||
osx_image: xcode9.3
|
||||
compiler: clang
|
||||
- os: osx
|
||||
osx_image: xcode9.4
|
||||
compiler: clang
|
||||
- os: osx
|
||||
osx_image: xcode10
|
||||
compiler: clang
|
||||
before_install:
|
||||
- eval "${MATRIX_EVAL}"
|
||||
script:
|
||||
- ./scripts/build_all.sh
|
||||
20
README.md
20
README.md
@@ -2,6 +2,24 @@
|
||||
|
||||
> std::invoke/std::apply analogs for C++14
|
||||
|
||||
[![travis][badge.travis]][travis]
|
||||
[![appveyor][badge.appveyor]][appveyor]
|
||||
[![language][badge.language]][language]
|
||||
[![license][badge.license]][license]
|
||||
[![paypal][badge.paypal]][paypal]
|
||||
|
||||
[badge.travis]: https://img.shields.io/travis/BlackMATov/invoke.hpp/master.svg?logo=travis&style=for-the-badge
|
||||
[badge.appveyor]: https://img.shields.io/appveyor/ci/BlackMATov/invoke-hpp/master.svg?logo=appveyor&style=for-the-badge
|
||||
[badge.language]: https://img.shields.io/badge/language-C%2B%2B14-red.svg?style=for-the-badge
|
||||
[badge.license]: https://img.shields.io/badge/license-MIT-blue.svg?style=for-the-badge
|
||||
[badge.paypal]: https://img.shields.io/badge/donate-PayPal-orange.svg?logo=paypal&colorA=00457C&style=for-the-badge
|
||||
|
||||
[travis]: https://travis-ci.org/BlackMATov/invoke.hpp
|
||||
[appveyor]: https://ci.appveyor.com/project/BlackMATov/invoke-hpp
|
||||
[language]: https://en.wikipedia.org/wiki/C%2B%2B14
|
||||
[license]: https://en.wikipedia.org/wiki/MIT_License
|
||||
[paypal]: https://www.paypal.me/matov
|
||||
|
||||
[invoke]: https://github.com/BlackMATov/invoke.hpp
|
||||
|
||||
## Installation
|
||||
@@ -25,3 +43,5 @@ Analog of [std::invoke_result](https://en.cppreference.com/w/cpp/types/result_of
|
||||
### `invoke_hpp::apply(F&& f, Tuple&& args)`
|
||||
|
||||
Analog of [std::apply](https://en.cppreference.com/w/cpp/utility/apply) from C++17
|
||||
|
||||
## [License (MIT)](./LICENSE.md)
|
||||
|
||||
10
scripts/build_all.bat
Normal file
10
scripts/build_all.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
@echo off
|
||||
set SCRIPT_DIR=%~dp0%
|
||||
%SCRIPT_DIR%\build_debug.bat || goto :error
|
||||
%SCRIPT_DIR%\build_release.bat || goto :error
|
||||
|
||||
goto :EOF
|
||||
|
||||
:error
|
||||
echo Failed with error #%errorlevel%.
|
||||
exit /b %errorlevel%
|
||||
5
scripts/build_all.sh
Executable file
5
scripts/build_all.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
SCRIPT_DIR=`dirname "$BASH_SOURCE"`
|
||||
$SCRIPT_DIR/build_debug.sh
|
||||
$SCRIPT_DIR/build_release.sh
|
||||
14
scripts/build_debug.bat
Normal file
14
scripts/build_debug.bat
Normal file
@@ -0,0 +1,14 @@
|
||||
@echo off
|
||||
set BUILD_DIR=%~dp0%\..\build
|
||||
mkdir %BUILD_DIR%\debug || goto :error
|
||||
cd %BUILD_DIR%\debug || goto :error
|
||||
cmake ../.. || goto :error
|
||||
cmake --build . --config Debug || goto :error
|
||||
ctest --verbose || goto :error
|
||||
cd ..\.. || goto :error
|
||||
|
||||
goto :EOF
|
||||
|
||||
:error
|
||||
echo Failed with error #%errorlevel%.
|
||||
exit /b %errorlevel%
|
||||
9
scripts/build_debug.sh
Executable file
9
scripts/build_debug.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
BUILD_DIR=`dirname "$BASH_SOURCE"`/../build
|
||||
mkdir -p $BUILD_DIR/debug
|
||||
cd $BUILD_DIR/debug
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug ../..
|
||||
cmake --build . -- -j8
|
||||
ctest --verbose
|
||||
cd ../..
|
||||
14
scripts/build_release.bat
Normal file
14
scripts/build_release.bat
Normal file
@@ -0,0 +1,14 @@
|
||||
@echo off
|
||||
set BUILD_DIR=%~dp0%\..\build
|
||||
mkdir %BUILD_DIR%\release || goto :error
|
||||
cd %BUILD_DIR%\release || goto :error
|
||||
cmake ../.. || goto :error
|
||||
cmake --build . --config Release || goto :error
|
||||
ctest --verbose || goto :error
|
||||
cd ..\.. || goto :error
|
||||
|
||||
goto :EOF
|
||||
|
||||
:error
|
||||
echo Failed with error #%errorlevel%.
|
||||
exit /b %errorlevel%
|
||||
9
scripts/build_release.sh
Executable file
9
scripts/build_release.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
BUILD_DIR=`dirname "$BASH_SOURCE"`/../build
|
||||
mkdir -p $BUILD_DIR/release
|
||||
cd $BUILD_DIR/release
|
||||
cmake -DCMAKE_BUILD_TYPE=Release ../..
|
||||
cmake --build . -- -j8
|
||||
ctest --verbose
|
||||
cd ../..
|
||||
Reference in New Issue
Block a user