mirror of
https://github.com/boostorg/lambda.git
synced 2026-01-31 08:12:26 +00:00
Compare commits
12 Commits
boost-1.72
...
feature/tr
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
016b12959b | ||
|
|
ca87d33f3d | ||
|
|
a96b87e777 | ||
|
|
bbbe1a9041 | ||
|
|
1a8f8cfead | ||
|
|
7be3075575 | ||
|
|
ddf7dfe25e | ||
|
|
8de6d9cb9f | ||
|
|
641dd2b0a6 | ||
|
|
d27fc70114 | ||
|
|
1c11cf9570 | ||
|
|
7355f36b9f |
160
.travis.yml
160
.travis.yml
@@ -1,28 +1,161 @@
|
|||||||
# Copyright 2016 Edward Diener
|
# Copyright 2016 Edward Diener
|
||||||
|
# Copyright 2016, 2017, 2021 Peter Dimov
|
||||||
# Distributed under the Boost Software License, Version 1.0.
|
# Distributed under the Boost Software License, Version 1.0.
|
||||||
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
|
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
language: cpp
|
language: cpp
|
||||||
|
|
||||||
sudo: false
|
dist: xenial
|
||||||
|
|
||||||
python: "2.7"
|
|
||||||
|
|
||||||
os:
|
|
||||||
- linux
|
|
||||||
- osx
|
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
- develop
|
- develop
|
||||||
|
- /feature\/.*/
|
||||||
|
|
||||||
|
env:
|
||||||
|
matrix:
|
||||||
|
- BOGUS_JOB=true
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
|
||||||
|
exclude:
|
||||||
|
- env: BOGUS_JOB=true
|
||||||
|
|
||||||
|
include:
|
||||||
|
- os: linux
|
||||||
|
compiler: g++-4.4
|
||||||
|
env: TOOLSET=gcc CXXSTD=98
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- g++-4.4
|
||||||
|
sources:
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
|
||||||
|
- os: linux
|
||||||
|
compiler: g++-4.6
|
||||||
|
env: TOOLSET=gcc CXXSTD=03,0x
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- g++-4.6
|
||||||
|
sources:
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
|
||||||
|
- os: linux
|
||||||
|
compiler: g++-4.8
|
||||||
|
env: TOOLSET=gcc CXXSTD=03,11
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- g++-4.8
|
||||||
|
sources:
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
|
||||||
|
- os: linux
|
||||||
|
compiler: g++-5
|
||||||
|
env: TOOLSET=gcc CXXSTD=03,11,14
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- g++-5
|
||||||
|
sources:
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
|
||||||
|
- os: linux
|
||||||
|
compiler: g++-7
|
||||||
|
env: TOOLSET=gcc CXXSTD=03,11,14,17
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- g++-7
|
||||||
|
sources:
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
|
||||||
|
- os: linux
|
||||||
|
compiler: g++-9
|
||||||
|
env: TOOLSET=gcc CXXSTD=03,11,14,17
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- g++-9
|
||||||
|
sources:
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
|
||||||
|
- os: linux
|
||||||
|
dist: bionic
|
||||||
|
compiler: g++-10
|
||||||
|
env: TOOLSET=gcc CXXSTD=03,11,14,17,2a
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- g++-10
|
||||||
|
sources:
|
||||||
|
- sourceline: "ppa:ubuntu-toolchain-r/test"
|
||||||
|
|
||||||
|
- os: linux
|
||||||
|
dist: bionic
|
||||||
|
compiler: g++-11
|
||||||
|
env: UBSAN=1 TOOLSET=gcc CXXSTD=03,11,14,17,20 UBSAN_OPTIONS=print_stacktrace=1 LINKFLAGS=-fuse-ld=gold
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- g++-11
|
||||||
|
sources:
|
||||||
|
- sourceline: "ppa:ubuntu-toolchain-r/test"
|
||||||
|
|
||||||
|
- os: linux
|
||||||
|
compiler: clang++-11
|
||||||
|
env: TOOLSET=clang CXXSTD=03,11,14,17,20
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- clang-11
|
||||||
|
sources:
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
- sourceline: 'deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-11 main'
|
||||||
|
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
|
||||||
|
|
||||||
|
- os: linux
|
||||||
|
compiler: clang++-12
|
||||||
|
env: UBSAN=1 TOOLSET=clang CXXSTD=03,11,14,17,20 UBSAN_OPTIONS=print_stacktrace=1
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- clang-12
|
||||||
|
sources:
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
- sourceline: 'deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-12 main'
|
||||||
|
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
|
||||||
|
|
||||||
|
- os: linux
|
||||||
|
dist: bionic
|
||||||
|
compiler: clang++-libc++
|
||||||
|
env: TOOLSET=clang CXXSTD=03,11,14,17,2a
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- libc++-dev
|
||||||
|
|
||||||
|
- os: linux
|
||||||
|
dist: focal
|
||||||
|
compiler: clang++-libc++
|
||||||
|
env: UBSAN=1 TOOLSET=clang CXXSTD=03,11,14,17,2a UBSAN_OPTIONS=print_stacktrace=1
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- libc++-dev
|
||||||
|
|
||||||
|
- os: osx
|
||||||
|
compiler: clang++
|
||||||
|
env: UBSAN=1 TOOLSET=clang CXXSTD=03,11,14,1z UBSAN_OPTIONS=print_stacktrace=1
|
||||||
|
|
||||||
install:
|
install:
|
||||||
|
- BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
|
||||||
- cd ..
|
- cd ..
|
||||||
- git clone -b $TRAVIS_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
|
- git clone -b $BOOST_BRANCH https://github.com/boostorg/boost.git boost-root
|
||||||
- cd boost-root
|
- cd boost-root
|
||||||
- git submodule update --init tools/build
|
|
||||||
- git submodule update --init libs/config
|
|
||||||
- git submodule update --init tools/boostdep
|
- git submodule update --init tools/boostdep
|
||||||
- cp -r $TRAVIS_BUILD_DIR/* libs/lambda
|
- cp -r $TRAVIS_BUILD_DIR/* libs/lambda
|
||||||
- python tools/boostdep/depinst/depinst.py lambda
|
- python tools/boostdep/depinst/depinst.py lambda
|
||||||
@@ -30,10 +163,9 @@ install:
|
|||||||
- ./b2 headers
|
- ./b2 headers
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- TOOLSET=gcc,clang
|
- |-
|
||||||
- if [ $TRAVIS_OS_NAME == osx ]; then TOOLSET=clang; fi
|
echo "using $TOOLSET : : $TRAVIS_COMPILER ;" > ~/user-config.jam
|
||||||
- ./b2 --verbose-test libs/config/test//config_info toolset=$TOOLSET || true
|
- ./b2 -j3 libs/lambda/test toolset=$TOOLSET cxxstd=$CXXSTD variant=debug,release ${UBSAN:+cxxflags=-fsanitize=undefined cxxflags=-fno-sanitize-recover=undefined linkflags=-fsanitize=undefined define=UBSAN=1 debug-symbols=on} ${LINKFLAGS:+linkflags=$LINKFLAGS}
|
||||||
- ./b2 libs/lambda/test toolset=$TOOLSET
|
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email:
|
email:
|
||||||
|
|||||||
34
CMakeLists.txt
Normal file
34
CMakeLists.txt
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
# Generated by `boostdep --cmake lambda`
|
||||||
|
# Copyright 2020 Peter Dimov
|
||||||
|
# Distributed under the Boost Software License, Version 1.0.
|
||||||
|
# https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
|
cmake_minimum_required(VERSION 3.5...3.16)
|
||||||
|
|
||||||
|
project(boost_lambda VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
|
||||||
|
|
||||||
|
add_library(boost_lambda INTERFACE)
|
||||||
|
add_library(Boost::lambda ALIAS boost_lambda)
|
||||||
|
|
||||||
|
target_include_directories(boost_lambda INTERFACE include)
|
||||||
|
|
||||||
|
target_link_libraries(boost_lambda
|
||||||
|
INTERFACE
|
||||||
|
Boost::bind
|
||||||
|
Boost::config
|
||||||
|
Boost::core
|
||||||
|
Boost::detail
|
||||||
|
Boost::iterator
|
||||||
|
Boost::mpl
|
||||||
|
Boost::preprocessor
|
||||||
|
Boost::tuple
|
||||||
|
Boost::type_traits
|
||||||
|
Boost::utility
|
||||||
|
)
|
||||||
|
|
||||||
|
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
|
||||||
|
|
||||||
|
add_subdirectory(test)
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
||||||
@@ -25,6 +25,8 @@ install:
|
|||||||
- git submodule update --init tools/build
|
- git submodule update --init tools/build
|
||||||
- git submodule update --init libs/config
|
- git submodule update --init libs/config
|
||||||
- git submodule update --init tools/boostdep
|
- git submodule update --init tools/boostdep
|
||||||
|
- git submodule update --init tools/boost_install
|
||||||
|
- git submodule update --init libs/headers
|
||||||
- xcopy /s /e /q %APPVEYOR_BUILD_FOLDER% libs\lambda
|
- xcopy /s /e /q %APPVEYOR_BUILD_FOLDER% libs\lambda
|
||||||
- python tools/boostdep/depinst/depinst.py lambda
|
- python tools/boostdep/depinst/depinst.py lambda
|
||||||
- bootstrap
|
- bootstrap
|
||||||
|
|||||||
@@ -3281,7 +3281,7 @@ was dropped.
|
|||||||
<abbrev>SGI02</abbrev>
|
<abbrev>SGI02</abbrev>
|
||||||
<title>The SGI Standard Template Library</title>
|
<title>The SGI Standard Template Library</title>
|
||||||
<pubdate>2002</pubdate>
|
<pubdate>2002</pubdate>
|
||||||
<bibliomisc><ulink url="http://www.sgi.com/tech/stl/">www.sgi.com/tech/stl/</ulink></bibliomisc>
|
<bibliomisc><ulink url="https://www.boost.org/sgi/stl/">www.boost.org/sgi/stl/</ulink></bibliomisc>
|
||||||
|
|
||||||
</biblioentry>
|
</biblioentry>
|
||||||
|
|
||||||
|
|||||||
@@ -3286,7 +3286,7 @@ was dropped.
|
|||||||
<abbrev>SGI02</abbrev>
|
<abbrev>SGI02</abbrev>
|
||||||
<title>The SGI Standard Template Library</title>
|
<title>The SGI Standard Template Library</title>
|
||||||
<pubdate>2002</pubdate>
|
<pubdate>2002</pubdate>
|
||||||
<bibliomisc><ulink url="http://www.sgi.com/tech/stl/">www.sgi.com/tech/stl/</ulink></bibliomisc>
|
<bibliomisc><ulink url="https://www.boost.org/sgi/stl/">www.boost.org/sgi/stl/</ulink></bibliomisc>
|
||||||
|
|
||||||
</biblioentry>
|
</biblioentry>
|
||||||
|
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
URL: http://spirit.sourceforge.net/
|
URL: http://spirit.sourceforge.net/
|
||||||
|
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#ifndef PHOENIX_CLOSURES_HPP
|
#ifndef BOOST_LAMBDA_CLOSURES_HPP
|
||||||
#define PHOENIX_CLOSURES_HPP
|
#define BOOST_LAMBDA_CLOSURES_HPP
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
#include "boost/lambda/core.hpp"
|
#include "boost/lambda/core.hpp"
|
||||||
|
|||||||
@@ -300,7 +300,8 @@ int test_main(int, char *[]) {
|
|||||||
|
|
||||||
// Check using result_of with lambda functors
|
// Check using result_of with lambda functors
|
||||||
BOOST_CHECK(apply0(constant(0)) == 0);
|
BOOST_CHECK(apply0(constant(0)) == 0);
|
||||||
BOOST_CHECK(apply1<int>(_1, one) == 1);
|
// returns local address and leads to undefined behavior
|
||||||
|
//~ BOOST_CHECK(apply1<int>(_1, one) == 1);
|
||||||
BOOST_CHECK(apply1<int&>(_1, one) == 1);
|
BOOST_CHECK(apply1<int&>(_1, one) == 1);
|
||||||
BOOST_CHECK(apply1<const int&>(_1, one) == 1);
|
BOOST_CHECK(apply1<const int&>(_1, one) == 1);
|
||||||
BOOST_CHECK((apply2<int, int>(_1 + _2, one, two) == 3));
|
BOOST_CHECK((apply2<int, int>(_1 + _2, one, two) == 3));
|
||||||
|
|||||||
Reference in New Issue
Block a user